Merge commit '235aac64377cb73110d833cb8180126955618b6e' into
OT_BETA_JAVA8

Conflicts:
	features/org.eclipse.objectteams.otdt.core.patch/feature.xml
	org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
	org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
	org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
	org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
	releng/build-scripts/build/otdt_prerequisites.sh
	releng/build-scripts/build/run.properties
diff --git a/features/org.eclipse.objectteams.otdt.core.patch/feature.xml b/features/org.eclipse.objectteams.otdt.core.patch/feature.xml
index dc677b8..0ad9c14 100644
--- a/features/org.eclipse.objectteams.otdt.core.patch/feature.xml
+++ b/features/org.eclipse.objectteams.otdt.core.patch/feature.xml
@@ -59,14 +59,21 @@
    </url>
 
    <requires>
-      <import feature="org.eclipse.jdt" version="3.10.0.v20131030-2000" patch="true"/>
+      <import feature="org.eclipse.jdt" version="3.9.0.v20130605-2000" patch="true"/>
    </requires>
 
    <plugin
          id="org.eclipse.jdt.core"
          download-size="5614"
          install-size="5614"
-         version="3.10.0.v_OTDT_r230_qualifier"
+         version="3.9.1.v_OTDT_r230_qualifier"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.jdt.ui"
+         download-size="0"
+         install-size="0"
+         version="3.9.1.qualifier"
          unpack="false"/>
 
 </feature>
diff --git a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
index d54be1e..ad496df 100644
--- a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
 Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jdt.core.tests.compiler
+Bundle-SymbolicName: org.eclipse.jdt.core.tests.compiler;singleton:=true
 Bundle-Version: 3.9.0
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
@@ -19,8 +19,10 @@
  org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
  org.eclipse.test.performance;bundle-version="[3.1.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
- org.eclipse.jdt.annotation;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
+ org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
  org.eclipse.objectteams.otdt
 Bundle-RequiredExecutionEnvironment: J2SE-1.4
 Eclipse-BundleShape: dir
+Bundle-Activator: org.eclipse.jdt.core.tests.compiler.Activator
 Bundle-ActivationPolicy: lazy
diff --git a/org.eclipse.jdt.core.tests.compiler/pom.xml b/org.eclipse.jdt.core.tests.compiler/pom.xml
index 84cd6ec..2b0f25b 100644
--- a/org.eclipse.jdt.core.tests.compiler/pom.xml
+++ b/org.eclipse.jdt.core.tests.compiler/pom.xml
@@ -15,12 +15,12 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.4.0-SNAPSHOT</version>
+    <version>4.3.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.core.tests.compiler</artifactId>
-  <version>3.9.0-SNAPSHOT</version>
+  <version>3.8.3-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
 
   <properties>
diff --git a/org.eclipse.jdt.core.tests.compiler/src/EvalTestsTarget.zip b/org.eclipse.jdt.core.tests.compiler/src/EvalTestsTarget.zip
new file mode 100644
index 0000000..19bb2e9
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/EvalTestsTarget.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.compiler/src/TestJavadocVisibility.zip b/org.eclipse.jdt.core.tests.compiler/src/TestJavadocVisibility.zip
new file mode 100644
index 0000000..cfb2c9b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/TestJavadocVisibility.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/Activator.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/Activator.java
new file mode 100644
index 0000000..18a8e1b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/Activator.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Stephan Herrmann 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * Make the PackageAdmin service accessible to tests.
+ * 
+ * @deprecated uses deprecated class PackageAdmin.
+ */
+public class Activator extends Plugin {
+
+	private static final String PLUGIN_ID = "org.eclipse.jdt.core.tests.compiler";
+
+	static org.osgi.service.packageadmin.PackageAdmin packageAdmin = null;
+
+
+	public void start(BundleContext context) throws Exception {
+		
+		ServiceReference ref= context.getServiceReference(org.osgi.service.packageadmin.PackageAdmin.class.getName());
+		if (ref!=null)
+			packageAdmin = (org.osgi.service.packageadmin.PackageAdmin)context.getService(ref);
+		else
+			getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, "Failed to load PackageAdmin service. Will not be able to access bundles org.eclipse.jdt.annotation."));
+	}
+
+	public void stop(BundleContext context) throws Exception {
+		// nothing
+	}
+
+	public static org.osgi.service.packageadmin.PackageAdmin getPackageAdmin() {
+		return packageAdmin;
+	}
+	
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AbstractSyntaxTreeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AbstractSyntaxTreeTest.java
new file mode 100644
index 0000000..6e52392
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/AbstractSyntaxTreeTest.java
@@ -0,0 +1,504 @@
+package org.eclipse.jdt.core.tests.compiler.parser;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.Locale;
+
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.codeassist.complete.CompletionParser;
+import org.eclipse.jdt.internal.codeassist.select.SelectionParser;
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
+import org.eclipse.jdt.internal.compiler.DocumentElementParser;
+import org.eclipse.jdt.internal.compiler.IDocumentElementRequestor;
+import org.eclipse.jdt.internal.compiler.ISourceElementRequestor;
+import org.eclipse.jdt.internal.compiler.SourceElementParser;
+import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.Expression;
+import org.eclipse.jdt.internal.compiler.ast.ImportReference;
+import org.eclipse.jdt.internal.compiler.batch.CompilationUnit;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;
+import org.eclipse.jdt.internal.compiler.parser.Parser;
+import org.eclipse.jdt.internal.compiler.problem.DefaultProblem;
+import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
+import org.eclipse.jdt.internal.compiler.problem.ProblemReporter;
+import org.eclipse.jdt.internal.core.search.indexing.IndexingParser;
+import org.eclipse.jdt.internal.core.util.CommentRecorderParser;
+
+public class AbstractSyntaxTreeTest extends AbstractCompilerTest implements IDocumentElementRequestor, ISourceElementRequestor {
+
+	protected static final int CHECK_PARSER = 0x1;
+	protected static final int CHECK_COMPLETION_PARSER = 0x2;
+	protected static final int CHECK_SELECTION_PARSER = 0x4;
+	protected static final int CHECK_DOCUMENT_ELEMENT_PARSER = 0x8;
+	protected static final int CHECK_COMMENT_RECORDER_PARSER = 0x10;
+	protected static final int CHECK_SOURCE_ELEMENT_PARSER = 0x20;
+	protected static final int CHECK_INDEXING_PARSER = 0x40;
+	protected static final int CHECK_JAVAC_PARSER = 0x80;
+	protected static int CHECK_ALL = (CHECK_PARSER | CHECK_COMPLETION_PARSER | CHECK_SELECTION_PARSER |
+												CHECK_DOCUMENT_ELEMENT_PARSER | CHECK_COMMENT_RECORDER_PARSER |
+//{ObjectTeams: with our grammar testing the IndexingParser is even less useful (creates false positives), just disable it:
+/* orig:
+												CHECK_SOURCE_ELEMENT_PARSER | CHECK_INDEXING_PARSER); 
+   :giro */
+												CHECK_SOURCE_ELEMENT_PARSER /*| CHECK_INDEXING_PARSER */);
+// SH}
+	public static boolean optimizeStringLiterals = false;
+	private String referenceCompiler;
+	private String referenceCompilerTestsScratchArea;
+
+	public AbstractSyntaxTreeTest(String name, String referenceCompiler, String referenceCompilerTestsScratchArea) {
+		super(name);
+		this.referenceCompiler = referenceCompiler;
+		this.referenceCompilerTestsScratchArea = referenceCompilerTestsScratchArea;
+	}
+
+	public void checkParse(int parserToCheck, char[] source, String expectedSyntaxErrorDiagnosis,
+			String testName, String expectedUnitToString, ASTVisitor visitor) throws IOException {
+			
+				CompilerOptions options = new CompilerOptions(getCompilerOptions());
+				options.complianceLevel = ClassFileConstants.JDK1_8;
+				options.sourceLevel = ClassFileConstants.JDK1_8;
+				options.targetJDK = ClassFileConstants.JDK1_8;
+			
+				ICompilationUnit sourceUnit = null;
+				CompilationResult compilationResult = null;
+				CompilationUnitDeclaration unit = null;
+			
+				if (this.referenceCompiler != null && (parserToCheck & CHECK_JAVAC_PARSER) != 0) {
+					String javaFilePath = this.referenceCompilerTestsScratchArea + "\\Xyz.java";
+					File f = new File(javaFilePath);
+					FileOutputStream o = new FileOutputStream(f);
+					OutputStreamWriter w = new OutputStreamWriter(o);
+					w.write(source);
+					w.close();
+					Process p = Runtime.getRuntime().exec (new String[] { this.referenceCompiler, "-sourcepath", this.referenceCompilerTestsScratchArea, javaFilePath }, null, new File(this.referenceCompilerTestsScratchArea));
+					try {
+						BufferedReader stdout  = new BufferedReader(new InputStreamReader(p.getInputStream()));
+						BufferedReader stderr  = new BufferedReader(new InputStreamReader(p.getErrorStream()));
+						String line;
+						while ((line = stderr.readLine())!= null)
+							System.out.println(line);
+						while ((line = stdout.readLine())!= null)
+							System.out.println(line);
+						assertTrue("javac unhappy", p.waitFor() == 0);
+					} catch (InterruptedException e) {
+						System.err.println("Skipped javac behavior check due to interrupt...");
+					}
+				}
+				if ((parserToCheck & CHECK_PARSER) != 0) {
+					Parser parser1 =
+						new Parser(
+								new ProblemReporter(
+										DefaultErrorHandlingPolicies.proceedWithAllProblems(),
+										options,
+										new DefaultProblemFactory(Locale.getDefault())),
+										optimizeStringLiterals);
+					sourceUnit = new CompilationUnit(source, testName, null);
+					compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
+					unit = parser1.parse(sourceUnit, compilationResult);
+					parser1.getMethodBodies(unit);
+					assertDianosticEquals(expectedSyntaxErrorDiagnosis, testName, compilationResult);
+					assertParseTreeEquals(expectedUnitToString, unit.toString());
+					if (visitor != null) {
+						unit.traverse(visitor, (CompilationUnitScope) null);
+					}
+					parser1 = null;
+				}
+			
+				if ((parserToCheck & CHECK_COMPLETION_PARSER) != 0) {
+					CompletionParser parser2 = new CompletionParser(
+							new ProblemReporter(
+									DefaultErrorHandlingPolicies.proceedWithAllProblems(),
+									options,
+									new DefaultProblemFactory(Locale.getDefault())),
+									false);
+					compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
+					unit = parser2.parse(sourceUnit, compilationResult, Integer.MAX_VALUE);
+					parser2.getMethodBodies(unit);
+					assertDianosticEquals(expectedSyntaxErrorDiagnosis, testName, compilationResult);
+					assertParseTreeEquals(expectedUnitToString, unit.toString());
+					parser2 = null;
+				}
+				if ((parserToCheck & CHECK_SELECTION_PARSER) != 0) {
+					SelectionParser parser3 = new SelectionParser(
+							new ProblemReporter(
+									DefaultErrorHandlingPolicies.proceedWithAllProblems(),
+									options,
+									new DefaultProblemFactory(Locale.getDefault())));
+					compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
+					unit = parser3.parse(sourceUnit, compilationResult, Integer.MAX_VALUE, Integer.MAX_VALUE);
+					parser3.getMethodBodies(unit);
+					assertDianosticEquals(expectedSyntaxErrorDiagnosis, testName, compilationResult);
+					assertParseTreeEquals(expectedUnitToString, unit.toString());
+					parser3 = null;
+				}
+				if ((parserToCheck & CHECK_DOCUMENT_ELEMENT_PARSER) != 0) {
+					DocumentElementParser parser4 = new DocumentElementParser(
+							this,
+							new DefaultProblemFactory(Locale.getDefault()),
+							options);
+					compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
+					unit = parser4.parse(sourceUnit, compilationResult);
+					parser4.getMethodBodies(unit);
+					assertDianosticEquals(expectedSyntaxErrorDiagnosis, testName, compilationResult);
+					assertParseTreeEquals(expectedUnitToString, unit.toString());
+					parser4 = null;
+				}
+				if ((parserToCheck & CHECK_COMMENT_RECORDER_PARSER) != 0) {
+					CommentRecorderParser parser5 = new CommentRecorderParser(
+							new ProblemReporter(
+									DefaultErrorHandlingPolicies.proceedWithAllProblems(),
+									options,
+									new DefaultProblemFactory(Locale.getDefault())),
+									optimizeStringLiterals);
+					compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
+					unit = parser5.parse(sourceUnit, compilationResult);
+					parser5.getMethodBodies(unit);
+					assertDianosticEquals(expectedSyntaxErrorDiagnosis, testName, compilationResult);
+					assertParseTreeEquals(expectedUnitToString, unit.toString());
+					parser5 = null;
+				}
+				if ((parserToCheck & CHECK_SOURCE_ELEMENT_PARSER) != 0) {
+					SourceElementParser parser6 = new SourceElementParser(this,
+							new DefaultProblemFactory(Locale.getDefault()),
+							options,
+							true,
+							optimizeStringLiterals);
+					compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
+					unit = parser6.parse(sourceUnit, compilationResult);
+					parser6.getMethodBodies(unit);
+					assertDianosticEquals(expectedSyntaxErrorDiagnosis, testName, compilationResult);
+					assertParseTreeEquals(expectedUnitToString, unit.toString());
+					parser6 = null;
+				}
+				if ((parserToCheck & CHECK_INDEXING_PARSER) != 0) {
+					IndexingParser parser7 = new IndexingParser(this,
+							new DefaultProblemFactory(Locale.getDefault()),
+							options,
+							true,
+							optimizeStringLiterals, false);
+					compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
+					unit = parser7.parse(sourceUnit, compilationResult);
+					parser7.getMethodBodies(unit);
+					assertDianosticEquals(expectedSyntaxErrorDiagnosis, testName, compilationResult);
+					assertParseTreeEquals(expectedUnitToString, unit.toString());
+					parser7 = null;
+				}
+			}
+
+	public void checkParse(int parserToCheck, char[] source, String expectedSyntaxErrorDiagnosis,
+			String testName, String expectedUnitToString) throws IOException {
+				checkParse(parserToCheck, source, expectedSyntaxErrorDiagnosis, testName, expectedUnitToString, null);
+			}
+
+	public void checkParse(char[] source, String expectedSyntaxErrorDiagnosis, String testName, String expectedUnitToString)
+			throws IOException {
+				checkParse(CHECK_ALL, source, expectedSyntaxErrorDiagnosis, testName, expectedUnitToString);
+			}
+
+	public void checkParse(char[] source, String expectedSyntaxErrorDiagnosis, String testName,
+			String expectedUnitToString, ASTVisitor visitor) throws IOException {
+				checkParse(CHECK_ALL, source, expectedSyntaxErrorDiagnosis, testName, expectedUnitToString, visitor);
+			}
+
+	private void assertParseTreeEquals(String expectedUnitToString, String computedUnitToString) {
+			if (expectedUnitToString == null) {  // just checking that we are able to digest.
+				return;
+			}
+			if (!expectedUnitToString.equals(computedUnitToString)) {
+				System.out.println(Util.displayString(computedUnitToString));
+			}
+			assertEquals("Parse Tree is wrong",
+					Util.convertToIndependantLineDelimiter(expectedUnitToString),
+					Util.convertToIndependantLineDelimiter(computedUnitToString));
+	}
+
+	private void assertDianosticEquals(String expectedSyntaxErrorDiagnosis, String testName, CompilationResult compilationResult) {
+		String computedSyntaxErrorDiagnosis = getCompilerMessages(compilationResult);
+		assertEquals(
+			"Invalid syntax error diagnosis" + testName,
+			Util.convertToIndependantLineDelimiter(expectedSyntaxErrorDiagnosis),
+			Util.convertToIndependantLineDelimiter(computedSyntaxErrorDiagnosis));
+	}
+
+	private String getCompilerMessages(CompilationResult compilationResult) {
+		StringBuffer buffer = new StringBuffer(100);
+		if (compilationResult.hasProblems() || compilationResult.hasTasks()) {
+			CategorizedProblem[] problems = compilationResult.getAllProblems();
+			int count = problems.length;
+			int problemCount = 0;
+			char[] unitSource = compilationResult.compilationUnit.getContents();
+			for (int i = 0; i < count; i++) {
+				if (problems[i] != null) {
+					if (problemCount == 0)
+						buffer.append("----------\n");
+					problemCount++;
+					buffer.append(problemCount + (problems[i].isError() ? ". ERROR" : ". WARNING"));
+					buffer.append(" in " + new String(problems[i].getOriginatingFileName()).replace('/', '\\'));
+					try {
+						buffer.append(((DefaultProblem)problems[i]).errorReportSource(unitSource));
+						buffer.append("\n");
+						buffer.append(problems[i].getMessage());
+						buffer.append("\n");
+					} catch (Exception e) {
+					}
+					buffer.append("----------\n");
+				}
+			}
+		}
+		String computedSyntaxErrorDiagnosis = buffer.toString();
+		return computedSyntaxErrorDiagnosis;
+	}
+
+	public void acceptImport(int declarationStart, int declarationEnd, int[] javaDocPositions,
+			char[] name, int nameStartPosition, boolean onDemand, int modifiers) {
+			
+			
+			}
+
+	public void acceptInitializer(int declarationStart, int declarationEnd, int[] javaDocPositions,
+			int modifiers, int modifiersStart, int bodyStart, int bodyEnd) {
+			
+			
+			}
+
+	public void acceptLineSeparatorPositions(int[] positions) {
+	
+	
+	}
+
+	public void acceptPackage(int declarationStart, int declarationEnd, int[] javaDocPositions,
+			char[] name, int nameStartPosition) {
+			
+			
+			}
+
+	public void acceptProblem(CategorizedProblem problem) {
+	
+	
+	}
+
+	public void enterClass(int declarationStart, int[] javaDocPositions, int modifiers,
+			int modifiersStart, int classStart, char[] name, int nameStart, int nameEnd,
+			char[] superclass, int superclassStart, int superclassEnd, char[][] superinterfaces, int[] superinterfaceStarts,
+			int[] superinterfaceEnds, int bodyStart) {
+			
+			
+			}
+
+	public void enterCompilationUnit() {
+	
+	
+	}
+
+	public void enterConstructor(int declarationStart, int[] javaDocPositions, int modifiers,
+			int modifiersStart, char[] name, int nameStart, int nameEnd, char[][] parameterTypes,
+			int[] parameterTypeStarts, int[] parameterTypeEnds, char[][] parameterNames, int[] parameterNameStarts, int[] parameterNameEnds,
+			int parametersEnd, char[][] exceptionTypes, int[] exceptionTypeStarts, int[] exceptionTypeEnds, int bodyStart) {
+			
+			
+			}
+
+	public void enterField(int declarationStart, int[] javaDocPositions, int modifiers,
+			int modifiersStart, char[] type, int typeStart, int typeEnd, int typeDimensionCount,
+			char[] name, int nameStart, int nameEnd, int extendedTypeDimensionCount, int extendedTypeDimensionEnd) {
+			
+			
+			}
+
+	public void enterInterface(int declarationStart, int[] javaDocPositions, int modifiers,
+			int modifiersStart, int interfaceStart, char[] name, int nameStart, int nameEnd,
+			char[][] superinterfaces, int[] superinterfaceStarts, int[] superinterfaceEnds, int bodyStart) {
+			
+			
+			}
+
+	public void enterMethod(int declarationStart, int[] javaDocPositions, int modifiers,
+			int modifiersStart, char[] returnType, int returnTypeStart, int returnTypeEnd, int returnTypeDimensionCount,
+			char[] name, int nameStart, int nameEnd, char[][] parameterTypes, int[] parameterTypeStarts,
+			int[] parameterTypeEnds, char[][] parameterNames, int[] parameterNameStarts, int[] parameterNameEnds, int parametersEnd,
+			int extendedReturnTypeDimensionCount, int extendedReturnTypeDimensionEnd, char[][] exceptionTypes, int[] exceptionTypeStarts, int[] exceptionTypeEnds,
+			int bodyStart) {
+			
+			
+			}
+
+	public void exitClass(int bodyEnd, int declarationEnd) {
+	
+	
+	}
+
+	public void exitCompilationUnit(int declarationEnd) {
+	
+	
+	}
+
+	public void exitConstructor(int bodyEnd, int declarationEnd) {
+	
+	
+	}
+
+	public void exitField(int bodyEnd, int declarationEnd) {
+	
+	
+	}
+
+	public void exitInterface(int bodyEnd, int declarationEnd) {
+	
+	
+	}
+
+	public void exitMethod(int bodyEnd, int declarationEnd) {
+	
+	
+	}
+
+	public void acceptAnnotationTypeReference(char[][] annotation, int sourceStart,
+			int sourceEnd) {
+			
+			
+			}
+
+	public void acceptAnnotationTypeReference(char[] annotation, int sourcePosition) {
+	
+	
+	}
+
+	public void acceptConstructorReference(char[] typeName, int argCount,
+			int sourcePosition) {
+			
+			
+			}
+
+	public void acceptFieldReference(char[] fieldName, int sourcePosition) {
+	
+	
+	}
+
+	public void acceptImport(int declarationStart, int declarationEnd, int nameStart,
+			int nameEnd, char[][] tokens, boolean onDemand, int modifiers) {
+			
+			
+			}
+
+	public void acceptMethodReference(char[] methodName, int argCount, int sourcePosition) {
+	
+	
+	}
+
+	public void acceptPackage(ImportReference importReference) {
+	
+	
+	}
+
+	public void acceptTypeReference(char[][] typeName, int sourceStart, int sourceEnd) {
+	
+	
+	}
+
+	public void acceptTypeReference(char[] typeName, int sourcePosition) {
+	
+	
+	}
+
+	public void acceptUnknownReference(char[][] name, int sourceStart, int sourceEnd) {
+	
+	
+	}
+
+	public void acceptUnknownReference(char[] name, int sourcePosition) {
+	
+	
+	}
+
+	public void enterConstructor(MethodInfo methodInfo) {
+	
+	
+	}
+
+	public void enterField(FieldInfo fieldInfo) {
+	
+	
+	}
+
+	public void enterInitializer(int declarationStart, int modifiers) {
+	
+	
+	}
+
+	public void enterMethod(MethodInfo methodInfo) {
+	
+	
+	}
+
+	public void enterType(TypeInfo typeInfo) {
+	
+	
+	}
+
+	public void exitConstructor(int declarationEnd) {
+	
+	
+	}
+
+	public void exitField(int initializationStart, int declarationEnd, int declarationSourceEnd) {
+	
+	
+	}
+
+	public void exitInitializer(int declarationEnd) {
+	
+	
+	}
+
+	public void exitMethod(int declarationEnd, Expression defaultValue) {
+	
+	
+	}
+
+	public void exitType(int declarationEnd) {
+	
+	
+	}
+
+//{ObjectTeams: new methods
+	public void acceptBaseReference(char[][] typeName, int sourceStart, int sourceEnd) {
+		
+	}
+
+	public void enterCalloutMapping(CalloutInfo info) {
+		
+	}
+
+	public void enterCalloutToFieldMapping(CalloutToFieldInfo info) {
+		
+	}
+
+	public void enterCallinMapping(CallinInfo info) {
+		
+	}
+
+	public void exitCalloutMapping(int sourceEnd, int declarationSourceEnd) {
+		
+	}
+
+	public void exitCalloutToFieldMapping(int sourceEnd, int declarationSourceEnd) {
+		
+	}
+
+	public void exitCallinMapping(int sourceEnd, int declarationSourceEnd) {
+		
+	}
+// SH}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
index 0b4da40..c1a83c5 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ComplianceDiagnoseTest.java
@@ -1,13 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
+ *     Jesper S Moller - realigned with bug 399695
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.parser;
 
@@ -22,11 +27,11 @@
 	}
 // Static initializer to specify tests subset using TESTS_* static variables
 // All specified tests which does not belong to the class are skipped...
-//static {
-//	TESTS_NAMES = new String[] { "test000" };
+static {
+//	TESTS_NAMES = new String[] { "test0061" };
 //	TESTS_NUMBERS = new int[] { 50 };
 //	TESTS_RANGE = new int[] { 21, 50 };
-//}
+}
 public static Test suite() {
 	return buildAllCompliancesTestSuite(testClass());
 }
@@ -62,6 +67,47 @@
 			this.runNegativeTest(testFiles, expected17ProblemLog);
 		}
 	}
+public void runComplianceParserTest(
+		String[] testFiles,
+		String expected13ProblemLog,
+		String expected14ProblemLog,
+		String expected15ProblemLog,
+		String expected16ProblemLog,
+		String expected17ProblemLog){
+		if (this.complianceLevel == ClassFileConstants.JDK1_3) {
+			this.runNegativeTest(testFiles, expected13ProblemLog);
+		} else if(this.complianceLevel == ClassFileConstants.JDK1_4) {
+			this.runNegativeTest(testFiles, expected14ProblemLog);
+		} else if(this.complianceLevel == ClassFileConstants.JDK1_5) {
+			this.runNegativeTest(testFiles, expected15ProblemLog);
+		} else if(this.complianceLevel == ClassFileConstants.JDK1_6) {
+			this.runNegativeTest(testFiles, expected16ProblemLog);
+		} else if(this.complianceLevel < ClassFileConstants.JDK1_8) {
+			this.runNegativeTest(testFiles, expected17ProblemLog);
+		}
+	}
+public void runComplianceParserTest(
+		String[] testFiles,
+		String expected13ProblemLog,
+		String expected14ProblemLog,
+		String expected15ProblemLog,
+		String expected16ProblemLog,
+		String expected17ProblemLog,
+		String expected18ProblemLog){
+		if (this.complianceLevel == ClassFileConstants.JDK1_3) {
+			this.runNegativeTest(testFiles, expected13ProblemLog);
+		} else if(this.complianceLevel == ClassFileConstants.JDK1_4) {
+			this.runNegativeTest(testFiles, expected14ProblemLog);
+		} else if(this.complianceLevel == ClassFileConstants.JDK1_5) {
+			this.runNegativeTest(testFiles, expected15ProblemLog);
+		} else if(this.complianceLevel == ClassFileConstants.JDK1_6) {
+			this.runNegativeTest(testFiles, expected16ProblemLog);
+		} else if(this.complianceLevel < ClassFileConstants.JDK1_8) {
+			this.runNegativeTest(testFiles, expected17ProblemLog);
+		} else {
+			this.runNegativeTest(testFiles, expected18ProblemLog);
+		}
+	}
 public void test0001() {
 	String[] testFiles = new String[] {
 		"X.java",
@@ -1061,12 +1107,12 @@
 		expected13ProblemLog;
 
 	String expected15ProblemLog =
-		"----------\n" +
-		"1. ERROR in X.java (at line 1)\n" +
-		"	import static for;\n" +
-		"	              ^^^\n" +
-		"Syntax error on token \"for\", Identifier expected\n" +
-		"----------\n";
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	import static for;\n" + 
+			"	              ^^^\n" + 
+			"Syntax error on token \"for\", invalid Name\n" + 
+			"----------\n";
 
 	runComplianceParserTest(
 		testFiles,
@@ -1344,7 +1390,7 @@
 		expected15ProblemLog
 	);
 }
-public void test0030() {
+public void _test0030() {
 	String[] testFiles = new String[] {
 		"X.java",
 		"public class X {\n" +
@@ -1459,7 +1505,7 @@
 		expected15ProblemLog
 	);
 }
-public void test0032() {
+public void _test0032() {
 	String[] testFiles = new String[] {
 		"X.java",
 		"public class X <T1 extends String, T2 extends Y {\n" +
@@ -2641,4 +2687,688 @@
 		expected17ProblemLog
 	);
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383714
+public void test0057() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"  public default void foo() { System.out.println(); }\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	public default void foo() { System.out.println(); }\n" + 
+			"	                           ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Default methods are allowed only at source level 1.8 or above\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383714
+public void test0058() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"  void foo(int p);\n" +
+		"}\n" +
+		"public class X {\n" +
+		"  I i = System::exit;\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	I i = System::exit;\n" + 
+			"	      ^^^^^^^^^^^^\n" + 
+			"Method references are allowed only at source level 1.8 or above\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383714
+public void test0059() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"  void foo(int p);\n" +
+		"}\n" +
+		"class Y {\n" +
+		"   static void goo(int x) {\n" +
+		"   }\n" +
+		"}\n" +
+		"public class X extends Y {\n" +
+		"  I i = super::goo;\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	I i = super::goo;\n" + 
+			"	      ^^^^^^^^^^\n" + 
+			"Method references are allowed only at source level 1.8 or above\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	I i = super::goo;\n" + 
+			"	      ^^^^^^^^^^\n" + 
+			"The method goo(int) from the type Y should be accessed in a static way \n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383714
+public void test0060() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"  void foo(int p);\n" +
+		"}\n" +
+		"class Y {\n" +
+		"   void goo(int x) {\n" +
+		"   }\n" +
+		"}\n" +
+		"public class X extends Y {\n" +
+		"  I i = new Y()::goo;\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	I i = new Y()::goo;\n" + 
+			"	      ^^^^^^^^^^^^\n" + 
+			"Method references are allowed only at source level 1.8 or above\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383714
+public void test0061() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"  void foo(int p);\n" +
+		"}\n" +
+		"class Y {\n" +
+		"   void goo(int x) {\n" +
+		"   }\n" +
+		"   Y() {}\n" +
+		"   Y(int x) {}\n" +
+		"}\n" +
+		"public class X extends Y {\n" +
+		"  I i = Y::new;\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 11)\n" + 
+			"	I i = Y::new;\n" + 
+			"	      ^^^^^^\n" + 
+			"Constructor references are allowed only at source level 1.8 or above\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383714
+public void test0062() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"  int foo(int p);\n" +
+		"}\n" +
+		"public class X {\n" +
+		"  I i = p -> 10 + 20 + 30;\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	I i = p -> 10 + 20 + 30;\n" + 
+			"	      ^^^^^^^^^^^^^^^^^\n" + 
+			"Lambda expressions are allowed only at source level 1.8 or above\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=381358
+public void test0063() {
+	if (this.complianceLevel <= ClassFileConstants.JDK1_4 || this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"  int foo(int p);\n" +
+		"}\n" +
+		"public class X<T> {\n" +
+		"  I i = X<String>::foo;\n" +
+		"  I i2 = (p) -> 10;\n" +
+		"  public static int foo(int p) {\n" +
+		"	return p;\n" +
+		"  }\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	I i = X<String>::foo;\n" + 
+			"	      ^^^^^^^^^^^^^^\n" + 
+			"Method references are allowed only at source level 1.8 or above\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 5)\n" + 
+			"	I i = X<String>::foo;\n" + 
+			"	      ^^^^^^^^^^^^^^\n" + 
+			"The method foo(int) from the type X<String> should be accessed in a static way \n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 6)\n" + 
+			"	I i2 = (p) -> 10;\n" + 
+			"	       ^^^^^^^^^\n" + 
+			"Lambda expressions are allowed only at source level 1.8 or above\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913#c22
+public void test0064() {
+	if (this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] source = new String[] {
+		"X.java",
+		"class X {\n" +
+		"	void foo(X this){}\n" +
+		"}"
+	};
+	String expectedProblemLog =
+			"----------\n" +
+			"1. ERROR in X.java (at line 2)\n" +
+			"	void foo(X this){}\n" +
+			"	           ^^^^\n" +
+			"Explicit declaration of 'this' parameter is allowed only at source level 1.8 or above\n" +
+			"----------\n";
+	runComplianceParserTest(
+			source,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog
+		);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391201
+public void testBug391201() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8 || this.complianceLevel < ClassFileConstants.JDK1_5) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"X.java",
+		"public class X {\n" +
+		"	@Marker int foo(@Marker int p) {\n" +
+		"		@Marker int i = 0;\n" +
+		"		return i;\n" +
+		"	}\n" +
+		"	@Marker\n" +
+		"	class Y {}\n" +
+		"	@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+		"	@interface Marker {}" +
+		"}",
+		"java/lang/annotation/ElementType.java",
+		"package java.lang.annotation;\n" +
+		"public enum ElementType {\n" +
+		"    TYPE,\n" +
+		"    FIELD,\n" +
+		"    METHOD,\n" +
+		"    PARAMETER,\n" +
+		"    CONSTRUCTOR,\n" +
+		"    LOCAL_VARIABLE,\n" +
+		"    ANNOTATION_TYPE,\n" +
+		"    PACKAGE,\n" +
+		"    TYPE_PARAMETER,\n" +
+		"    TYPE_USE\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	@Marker int foo(@Marker int p) {\n" + 
+			"	^^^^^^^\n" + 
+			"Syntax error, type annotations are available only when source level is at least 1.8\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 2)\n" + 
+			"	@Marker int foo(@Marker int p) {\n" + 
+			"	                ^^^^^^^\n" + 
+			"Syntax error, type annotations are available only when source level is at least 1.8\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 3)\n" + 
+			"	@Marker int i = 0;\n" + 
+			"	^^^^^^^\n" + 
+			"Syntax error, type annotations are available only when source level is at least 1.8\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 6)\n" + 
+			"	@Marker\n" + 
+			"	^^^^^^^\n" + 
+			"Syntax error, type annotations are available only when source level is at least 1.8\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+public void testBug399773() {
+	if (this.complianceLevel >= ClassFileConstants.JDK1_8)
+		return;
+	String[] testFiles = new String[] {
+		"X.java",
+		"interface I {\n" +
+		"	void doit();\n" +
+		"	default void doitalso () {}\n" +
+		"}\n" +
+		"interface J {\n" +
+		"	void doit();\n" +
+		"	default void doitalso () {}\n" +
+		"}\n" +
+		"public class X {\n" +
+		"	Object p = (I & J) () -> {};\n" +
+		"}\n" ,
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java\n" + 
+			"Default methods are allowed only at source level 1.8 or above\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java\n" + 
+			"Default methods are allowed only at source level 1.8 or above\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & J) () -> {};\n" + 
+			"	            ^^^^^\n" + 
+			"Additional bounds are not allowed in cast operator at source levels below 1.8\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & J) () -> {};\n" + 
+			"	                   ^^^^^^^^\n" + 
+			"Lambda expressions are allowed only at source level 1.8 or above\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & J) () -> {};\n" + 
+			"	                   ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399778,  [1.8][compiler] Conditional operator expressions should propagate target types
+public void testBug399778() {
+	if (this.complianceLevel < ClassFileConstants.JDK1_5)
+		return;
+	String[] testFiles = new String[] {
+		"X.java",
+		"import java.util.Arrays;\n" +
+		"import java.util.List;\n" +
+		"public class X  {\n" +
+		"		List<String> l = null == null ? Arrays.asList() : Arrays.asList(\"Hello\",\"world\");\n" +
+		"}\n",
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	List<String> l = null == null ? Arrays.asList() : Arrays.asList(\"Hello\",\"world\");\n" + 
+			"	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Type mismatch: cannot convert from List<capture#1-of ? extends Object> to List<String>\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		""   // 1.8 should compile this fine.
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399778,  [1.8][compiler] Conditional operator expressions should propagate target types
+public void testBug399778a() {
+	if (this.complianceLevel < ClassFileConstants.JDK1_5)
+		return;
+	String[] testFiles = new String[] {
+		"X.java",
+		"import java.util.Arrays;\n" +
+		"import java.util.List;\n" +
+		"public class X  {\n" +
+		"		List<String> l = (List<String>) (null == null ? Arrays.asList() : Arrays.asList(\"Hello\",\"world\"));\n" +
+		"}\n",
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. WARNING in X.java (at line 4)\n" + 
+			"	List<String> l = (List<String>) (null == null ? Arrays.asList() : Arrays.asList(\"Hello\",\"world\"));\n" + 
+			"	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Type safety: Unchecked cast from List<capture#1-of ? extends Object> to List<String>\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog   // 1.8 also issue type safety warning.
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780: static methods in interfaces.
+public void testBug399780() {
+	if(this.complianceLevel >= ClassFileConstants.JDK1_8) {
+		return;
+	}
+	String[] testFiles = new String[] {
+		"I.java",
+		"interface I {\n" +
+		"  public static void foo1() { System.out.println(); }\n" +
+		"  public static void foo2();\n" +
+		"  public abstract static void foo3();\n" +
+		"}\n"
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in I.java (at line 2)\n" + 
+			"	public static void foo1() { System.out.println(); }\n" + 
+			"	                   ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo1; only public & abstract are permitted\n" + 
+			"----------\n" + 
+			"2. ERROR in I.java (at line 2)\n" + 
+			"	public static void foo1() { System.out.println(); }\n" + 
+			"	                           ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Static methods are allowed in interfaces only at source level 1.8 or above\n" + 
+			"----------\n" + 
+			"3. ERROR in I.java (at line 3)\n" + 
+			"	public static void foo2();\n" + 
+			"	                   ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo2; only public & abstract are permitted\n" + 
+			"----------\n" + 
+			"4. ERROR in I.java (at line 4)\n" + 
+			"	public abstract static void foo3();\n" + 
+			"	                            ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo3; only public & abstract are permitted\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+		testFiles,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog,
+		expectedProblemLog
+	);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=399769:  Use of '_' as identifier name should trigger a diagnostic
+public void testBug399781() {
+	String[] testFiles = new String[] {
+		"X.java",
+		"public class X {\n" +
+		"   int _;\n" +
+		"	void foo(){\n" +
+		"		int _   = 3;\n" +
+        "		int _123 = 4;\n" +
+        "		int a_   = 5;\n" +
+		"	}\n" +
+        "   void goo(int _) {}\n" +
+		"   void zoo() {\n" +
+        "      try {\n" +
+		"      } catch (Exception _) {\n" +
+        "      }\n" +
+		"   }\n" +
+		"}\n",
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. WARNING in X.java (at line 2)\n" + 
+			"	int _;\n" + 
+			"	    ^\n" + 
+			"\'_\' should not be used as an identifier, since it is a reserved keyword from source level 1.8 on\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 4)\n" + 
+			"	int _   = 3;\n" + 
+			"	    ^\n" + 
+			"\'_\' should not be used as an identifier, since it is a reserved keyword from source level 1.8 on\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 4)\n" + 
+			"	int _   = 3;\n" + 
+			"	    ^\n" + 
+			"The local variable _ is hiding a field from type X\n" + 
+			"----------\n" + 
+			"4. WARNING in X.java (at line 8)\n" + 
+			"	void goo(int _) {}\n" + 
+			"	             ^\n" + 
+			"\'_\' should not be used as an identifier, since it is a reserved keyword from source level 1.8 on\n" + 
+			"----------\n" + 
+			"5. WARNING in X.java (at line 8)\n" + 
+			"	void goo(int _) {}\n" + 
+			"	             ^\n" + 
+			"The parameter _ is hiding a field from type X\n" + 
+			"----------\n" + 
+			"6. WARNING in X.java (at line 11)\n" + 
+			"	} catch (Exception _) {\n" + 
+			"	                   ^\n" + 
+			"\'_\' should not be used as an identifier, since it is a reserved keyword from source level 1.8 on\n" + 
+			"----------\n" + 
+			"7. WARNING in X.java (at line 11)\n" + 
+			"	} catch (Exception _) {\n" + 
+			"	                   ^\n" + 
+			"The parameter _ is hiding a field from type X\n" + 
+			"----------\n";
+	String expected13ProblemLog =
+			"----------\n" + 
+			"1. WARNING in X.java (at line 4)\n" + 
+			"	int _   = 3;\n" + 
+			"	    ^\n" + 
+			"The local variable _ is hiding a field from type X\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 8)\n" + 
+			"	void goo(int _) {}\n" + 
+			"	             ^\n" + 
+			"The parameter _ is hiding a field from type X\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 11)\n" + 
+			"	} catch (Exception _) {\n" + 
+			"	                   ^\n" + 
+			"The parameter _ is hiding a field from type X\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+			testFiles,
+			expected13ProblemLog,
+			expected13ProblemLog,
+			expected13ProblemLog,
+			expected13ProblemLog,
+			expected13ProblemLog,
+			expectedProblemLog
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406846:  [1.8] compiler NPE for method reference/lambda code compiled with < 1.8 compliance
+public void test406846() {
+	
+	if (this.complianceLevel >= ClassFileConstants.JDK1_8) // tested in LET.
+		return;
+	
+	String[] testFiles = new String[] {
+		"X.java",
+		"import java.util.*;\n" +
+		"public class X {\n" +
+		"  public static <E> void printItem(E value, int index) {\n" +
+		"    String output = String.format(\"%d -> %s\", index, value);\n" +
+		"    System.out.println(output);\n" +
+		"  }\n" +
+		"  public static void main(String[] argv) {\n" +
+		"    List<String> list = Arrays.asList(\"A\",\"B\",\"C\");\n" +
+		"    eachWithIndex(list,X::printItem);\n" +
+		"  }\n" +
+		"  interface ItemWithIndexVisitor<E> {\n" +
+		"    public void visit(E item, int index);\n" +
+		"  }\n" +
+		"  public static <E> void eachWithIndex(List<E> list, ItemWithIndexVisitor<E> visitor) {\n" +
+		"    for (int i = 0; i < list.size(); i++) {\n" +
+		"         visitor.visit(list.get(i), i);\n" +
+		"    }\n" +
+		"  }\n" +
+		"}\n",
+	};
+
+	String expectedProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	eachWithIndex(list,X::printItem);\n" + 
+			"	                   ^^^^^^^^^^^^\n" + 
+			"Method references are allowed only at source level 1.8 or above\n" + 
+			"----------\n";
+	String expected1314ProblemLog =
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	public static <E> void printItem(E value, int index) {\n" + 
+			"	               ^\n" + 
+			"Syntax error, type parameters are only available if source level is 1.5 or greater\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 4)\n" + 
+			"	String output = String.format(\"%d -> %s\", index, value);\n" + 
+			"	                       ^^^^^^\n" + 
+			"The method format(String, Object[]) in the type String is not applicable for the arguments (String, int, E)\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 8)\n" + 
+			"	List<String> list = Arrays.asList(\"A\",\"B\",\"C\");\n" + 
+			"	     ^^^^^^\n" + 
+			"Syntax error, parameterized types are only available if source level is 1.5 or greater\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 8)\n" + 
+			"	List<String> list = Arrays.asList(\"A\",\"B\",\"C\");\n" + 
+			"	                           ^^^^^^\n" + 
+			"The method asList(T[]) in the type Arrays is not applicable for the arguments (String, String, String)\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 9)\n" + 
+			"	eachWithIndex(list,X::printItem);\n" + 
+			"	                   ^^^^^^^^^^^^\n" + 
+			"Method references are allowed only at source level 1.8 or above\n" + 
+			"----------\n" + 
+			"6. ERROR in X.java (at line 11)\n" + 
+			"	interface ItemWithIndexVisitor<E> {\n" + 
+			"	                               ^\n" + 
+			"Syntax error, type parameters are only available if source level is 1.5 or greater\n" + 
+			"----------\n" + 
+			"7. ERROR in X.java (at line 14)\n" + 
+			"	public static <E> void eachWithIndex(List<E> list, ItemWithIndexVisitor<E> visitor) {\n" + 
+			"	               ^\n" + 
+			"Syntax error, type parameters are only available if source level is 1.5 or greater\n" + 
+			"----------\n" + 
+			"8. ERROR in X.java (at line 14)\n" + 
+			"	public static <E> void eachWithIndex(List<E> list, ItemWithIndexVisitor<E> visitor) {\n" + 
+			"	                                          ^\n" + 
+			"Syntax error, parameterized types are only available if source level is 1.5 or greater\n" + 
+			"----------\n" + 
+			"9. ERROR in X.java (at line 14)\n" + 
+			"	public static <E> void eachWithIndex(List<E> list, ItemWithIndexVisitor<E> visitor) {\n" + 
+			"	                                                                        ^\n" + 
+			"Syntax error, parameterized types are only available if source level is 1.5 or greater\n" + 
+			"----------\n";
+
+	runComplianceParserTest(
+			testFiles,
+			expected1314ProblemLog,
+			expected1314ProblemLog,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog,
+			expectedProblemLog
+	);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java
index 5eb01c8..ba11373 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/DietRecoveryTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
@@ -2500,7 +2504,7 @@
  * Should recover from method with missing argument names
  */
 
-public void test32() {
+public void _test32() {
 
 	String s =
 		"public class WB2 {											\n"+
@@ -4646,14 +4650,14 @@
 		"        super();\n" +
 		"      }\n" +
 		"      int hello() {\n" +
-		"        fo = $missing$;\n" +
+		"        fo $missing$;\n" +
 		"      }\n" +
 		"      int world() {\n" +
 		"      }\n" +
 		"      void foo() {\n" +
 		"      }\n" +
 		"    }\n" +
-		"    ba = $missing$;\n" +
+		"    ba $missing$;\n" +
 		"  }\n" +
 		"}\n";
 
@@ -4848,7 +4852,7 @@
 		"    else\n" +
 		"        if ((depth > 1))\n" +
 		"            {\n" +
-		"              sol = $missing$;\n" +
+		"              sol $missing$;\n" +
 		"            }\n" +
 		"        else\n" +
 		"            ;\n" +
@@ -6003,7 +6007,7 @@
 		"    restricts breakpoint;\n" +
 		"    given thread;\n" +
 		"    any other;\n" +
-		"    specified = $missing$;\n" +
+		"    specified $missing$;\n" +
 		"  }\n" +
 		"  public void removeThreadFilter(IJavaThread thread) {\n" +
 		"    removes the;\n" +
@@ -6014,7 +6018,7 @@
 		"    request as;\n" +
 		"    does not;\n" +
 		"    the removal;\n" +
-		"    thread = $missing$;\n" +
+		"    thread $missing$;\n" +
  :giro */
 // SH}		
 		"  }\n" +
@@ -6582,7 +6586,7 @@
 		expectedFullUnitToString,
 		expectedCompletionDietUnitToString, testName);
 }
-public void test110() {
+public void _test110() {
 	String s =
 		"public class X {\n" +
 		"	void bar(){\n" +
@@ -7585,7 +7589,7 @@
 		expectedCompletionDietUnitToString, testName);
 }
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=157570
-public void test124() {
+public void _test124() {
 	String s =
 		"public class Test {\n" +
 		"	void aMethod() {\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java
index 55209fb..512232e 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/GenericDietRecoveryTest.java
@@ -1,13 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
+ *		Stephan Herrmann - Contribution for
+ *								bug 401035 - [1.8] A few tests have started failing recently
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.parser;
 
@@ -36,7 +42,9 @@
 public GenericDietRecoveryTest(String testName){
 	super(testName);
 }
-
+static {
+//	TESTS_NAMES = new String[] { "test0025" };
+}
 /*
  * Toggle compiler in mode -1.5
  */
@@ -949,7 +957,7 @@
 		expectedFullUnitToString,
 		expectedCompletionDietUnitToString, testName);
 }
-public void test0019() {
+public void _test0019() {
 
 	String s =
 		"package a;											\n"
@@ -1208,7 +1216,7 @@
 	String expectedDietUnitToString =
 		"import java.util.*;\n" +
 		"public interface X<T> {\n" +
-		"  <K>Map<K, T> foo();\n" +
+		"  public <K>Map<K, T> foo();\n" +
 		"}\n";
 
 	String expectedDietPlusBodyUnitToString =
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/LambdaExpressionSyntaxTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/LambdaExpressionSyntaxTest.java
new file mode 100644
index 0000000..744c33f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/LambdaExpressionSyntaxTest.java
@@ -0,0 +1,719 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.parser;
+
+import java.io.File;
+import java.io.IOException;
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.tests.util.CompilerTestSetup;
+
+public class LambdaExpressionSyntaxTest extends AbstractSyntaxTreeTest {
+
+	private static String  jsr335TestScratchArea = "c:\\Jsr335TestScratchArea";
+	private static String referenceCompiler = "C:\\jdk-7-ea-bin-b75-windows-i586-30_oct_2009\\jdk7\\bin\\javac.exe"; // TODO: Patch when RI becomes available.
+
+	public static Class testClass() {
+		return LambdaExpressionSyntaxTest.class;
+	}
+	public void initialize(CompilerTestSetup setUp) {
+		super.initialize(setUp);
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+
+	public LambdaExpressionSyntaxTest(String testName){
+		super(testName, referenceCompiler, jsr335TestScratchArea);
+		if (referenceCompiler != null) {
+			File f = new File(jsr335TestScratchArea);
+			if (!f.exists()) {
+				f.mkdir();
+			}
+			CHECK_ALL |= CHECK_JAVAC_PARSER;
+		}
+	}
+
+	static {
+		//		TESTS_NAMES = new String[] { "test0012" };
+		//		TESTS_NUMBERS = new int[] { 133, 134, 135 };
+		if (!(new File(referenceCompiler).exists())) {
+			referenceCompiler = null;
+			jsr335TestScratchArea = null;
+		}
+	}
+	// type elided, unparenthesized parameter + expression body lambda in casting context.
+	public void test0001() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        System.out.println(((I) x -> x * x).square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    System.out.println(((I) (<no type> x) -> (x * x)).square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0001", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda as initializer.
+	public void test0002() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i =  x -> x * x;\n" +
+				"        System.out.println(i.square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = (<no type> x) -> (x * x);\n" + 
+				"    System.out.println(i.square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0002", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda as initializer, full lambda is parenthesized.
+	public void test0003() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i =  ((((x -> x * x))));\n" +
+				"        System.out.println(i.square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = (((((<no type> x) -> (x * x)))));\n" + 
+				"    System.out.println(i.square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0003", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda as RHS of assignment, full lambda is parenthesized.
+	public void test0004() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i;\n" +
+				"        i =  (x -> x * x);\n" +
+				"        System.out.println(i.square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i;\n" + 
+				"    i = ((<no type> x) -> (x * x));\n" + 
+				"    System.out.println(i.square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0004", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda in return statement, full lambda is parenthesized.
+	public void test0005() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    static I getI() {\n" +
+				"        return (x -> x * x);\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = getI();\n" +
+				"        System.out.println(i.square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  static I getI() {\n" + 
+				"    return ((<no type> x) -> (x * x));\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = getI();\n" + 
+				"    System.out.println(i.square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0005", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda in conditional expression.
+	public void test0006() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = args == null ? x -> x * x : x -> x * x * x;\n" +
+				"        System.out.println(i.square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = ((args == null) ? (<no type> x) -> (x * x) : (<no type> x) -> ((x * x) * x));\n" + 
+				"    System.out.println(i.square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0006", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda in message send.
+	public void test0007() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    static void foo(I i1, I i2) {\n" +
+				"        System.out.println(i1.square(10));\n" +
+				"        System.out.println(i2.square(10));\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        foo(x -> x * x, x -> x * x * x);\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  static void foo(I i1, I i2) {\n" + 
+				"    System.out.println(i1.square(10));\n" + 
+				"    System.out.println(i2.square(10));\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    foo((<no type> x) -> (x * x), (<no type> x) -> ((x * x) * x));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0007", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda in constructor call.
+	public void test0008() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    X (I i1, I i2) {\n" +
+				"        System.out.println(i1.square(10));\n" +
+				"        System.out.println(i2.square(10));\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        new X(x -> x * x, x -> x * x * x);\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  X(I i1, I i2) {\n" + 
+				"    super();\n" + 
+				"    System.out.println(i1.square(10));\n" + 
+				"    System.out.println(i2.square(10));\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    new X((<no type> x) -> (x * x), (<no type> x) -> ((x * x) * x));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0008", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda in lambda.
+	public void test0009() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    I square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"      System.out.println (((I) a->b->c->d->e->f->g-> null).square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  I square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    System.out.println(((I) (<no type> a) -> (<no type> b) -> (<no type> c) -> (<no type> d) -> (<no type> e) -> (<no type> f) -> (<no type> g) -> null).square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0009", expectedUnitToString);
+	}
+	// type elided, unparenthesized parameter + expression body lambda in an initializer block
+	public void test00010() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    static I i = x -> x * x;\n" +
+				"    {\n" +
+				"        i = x -> x * x * x;\n" +
+				"    }\n" +
+				"    static {\n" +
+				"        i = x -> x * x * x;\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  static I i = (<no type> x) -> (x * x);\n" + 
+				"  {\n" + 
+				"    i = (<no type> x) -> ((x * x) * x);\n" + 
+				"  }\n" + 
+				"  static {\n" + 
+				"    i = (<no type> x) -> ((x * x) * x);\n" + 
+				"  }\n" + 
+				"  <clinit>() {\n" + 
+				"  }\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test00010", expectedUnitToString);
+	}
+	// type elided, parenthesized parameter + expression body lambda in casting context.
+	public void test0011() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        System.out.println(((I) (x) -> x * x).square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    System.out.println(((I) (<no type> x) -> (x * x)).square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0011", expectedUnitToString);
+	}
+	// Normal & minimal parameter list + expression body lambda in assignment context.
+	public void test0012() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = (int x) -> x * x;\n" +
+				"        System.out.println(i.square(10));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = (int x) -> (x * x);\n" + 
+				"    System.out.println(i.square(10));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0012", expectedUnitToString);
+	}
+	// Normal parameter list, with modifiers & annotations  + expression body lambda in invocation context.
+	public void test0013() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    @interface Positive {}\n" +
+				"    static void foo(I i1, I i2) {\n" +
+				"        System.out.println(i1.square(10));\n" +
+				"        System.out.println(i2.square(10));\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        foo((final int x) -> x * x, (final @Positive int x) -> x * x * x);\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  @interface Positive {\n" + 
+				"  }\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  static void foo(I i1, I i2) {\n" + 
+				"    System.out.println(i1.square(10));\n" + 
+				"    System.out.println(i2.square(10));\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    foo((final int x) -> (x * x), (final @Positive int x) -> ((x * x) * x));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0013", expectedUnitToString);
+	}
+	// Vararg parameter list, with modifiers & annotations + expression body lambda in message send context.
+	public void test0014() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int square(int ... x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    @interface Positive {}\n" +
+				"    static void foo(I i1, I i2) {\n" +
+				"        System.out.println(i1.square(10));\n" +
+				"        System.out.println(i2.square(10));\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        foo((final int ... x) -> 10, (final @Positive int [] x) -> 20);\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int square(int... x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  @interface Positive {\n" + 
+				"  }\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  static void foo(I i1, I i2) {\n" + 
+				"    System.out.println(i1.square(10));\n" + 
+				"    System.out.println(i2.square(10));\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    foo((final int... x) -> 10, (final @Positive int[] x) -> 20);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0014", expectedUnitToString);
+	}
+	// multi parameter type elided list + expression body lambda in return statement.
+	public void test0015() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int product(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    static I getI() {\n" +
+				"        return ((x, y) -> x * y);\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = getI();\n" +
+				"        System.out.println(i.product(5, 6));\n" +
+				"    }\n" +
+				"};\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int product(int x, int y);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  static I getI() {\n" + 
+				"    return ((<no type> x, <no type> y) -> (x * y));\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = getI();\n" + 
+				"    System.out.println(i.product(5, 6));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0015", expectedUnitToString);
+	}
+	// multi parameter type specified list + block body lambda in return statement.
+	public void test0016() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    int product(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    static I getI() {\n" +
+				"        return (int x, int y) -> { return x * y; };\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = getI();\n" +
+				"        System.out.println(i.product(5, 6));\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  int product(int x, int y);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  static I getI() {\n" + 
+				"    return (int x, int y) -> {\n" + 
+				"  return (x * y);\n" + 
+				"};\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = getI();\n" + 
+				"    System.out.println(i.product(5, 6));\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0016", expectedUnitToString);
+	}
+	// noarg + block body lambda 
+	public void test0017() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    String noarg();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        System.out.println( ((I) () -> { return \"noarg\"; }).noarg());\n" +
+				"    }\n" +
+				"}\n";
+
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  String noarg();\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    System.out.println(((I) () -> {\n" + 
+				"  return \"noarg\";\n" + 
+				"}).noarg());\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0017", expectedUnitToString);
+	}
+	// Assorted tests.
+	public void test0018() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo();\n" +
+				"}\n" +
+				"\n" +
+				"interface J {\n" +
+				"    int foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  I i1 = ()->{}; \n" +
+				"  J j1 = ()->0;\n" +
+				"  J j2 = ()->{ return 0; };\n" +
+				"  I i2 = ()->{ System.gc(); };\n" +
+				"  J j3 = ()->{\n" +
+				"    if (true) return 0;\n" +
+				"    else {\n" +
+				"      int r = 12;\n" +
+				"      for (int i = 1; i < 8; i++)\n" +
+				"        r += i;\n" +
+				"      return r;\n" +
+				"    }\n" +
+				"  };\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo();\n" + 
+				"}\n" + 
+				"interface J {\n" + 
+				"  int foo();\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  I i1 = () ->   {\n" + 
+				"  };\n" + 
+				"  J j1 = () -> 0;\n" + 
+				"  J j2 = () ->   {\n" + 
+				"    return 0;\n" + 
+				"  };\n" + 
+				"  I i2 = () ->   {\n" + 
+				"    System.gc();\n" + 
+				"  };\n" + 
+				"  J j3 = () ->   {\n" + 
+				"    if (true)\n" + 
+				"        return 0;\n" + 
+				"    else\n" + 
+				"        {\n" + 
+				"          int r = 12;\n" + 
+				"          for (int i = 1;; (i < 8); i ++) \n" + 
+				"            r += i;\n" + 
+				"          return r;\n" + 
+				"        }\n" + 
+				"  };\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0018", expectedUnitToString);
+	}
+
+	// like test0001() but body expression is an assignment
+	public void test0019() throws IOException {
+		String source = 
+				"interface I {\n" +
+						"    int square(int x);\n" +
+						"}\n" +
+						"public class X {\n" +
+						"    int y;\n" +
+						"    public static void main(String [] args) {\n" +
+						"        System.out.println(((I) x -> y = x * x ).square(10));\n" +
+						"    }\n" +
+						"}\n";
+		
+		String expectedUnitToString = 
+				"interface I {\n" + 
+						"  int square(int x);\n" + 
+						"}\n" + 
+						"public class X {\n" + 
+						"  int y;\n" +
+						"  public X() {\n" + 
+						"    super();\n" + 
+						"  }\n" + 
+						"  public static void main(String[] args) {\n" + 
+						"    System.out.println(((I) (<no type> x) -> y = (x * x)).square(10));\n" + 
+						"  }\n" + 
+						"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0019", expectedUnitToString);
+	}
+	
+	// Coverage:  exercise this condition in Parser.consumeExpression():
+	//   if (this.valueLambdaNestDepth >= 0 && this.stateStackLengthStack[this.valueLambdaNestDepth] == this.stateStackTop - 1)
+	// make sure we see a (true && false) combination
+	public void testNestedLambda01() throws IOException {
+		String source = 
+				"public class C {\n" +
+				"	I foo() {\n" +
+				"		return (i1, i2) -> 	(String x1, String x2) -> { \n" +
+				"								return x1+x2; \n" + // here end-of-expression does not finish the type-eliding lambda (i1,i2)->...
+				"							};\n" +
+				"	}\n" +
+				"}\n" +
+				"\n" +
+				"interface I {\n" +
+				"	String doit(String s1, String s2);\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"public class C {\n" +
+				"  public C() {\n" +
+				"    super();\n" +
+				"  }\n" +
+				"  I foo() {\n" +
+				"    return (<no type> i1, <no type> i2) -> (String x1, String x2) -> {\n" +
+				"  return (x1 + x2);\n" +
+				"};\n" +
+				"  }\n" +
+				"}\n" +
+				"interface I {\n" +
+				"  String doit(String s1, String s2);\n" +
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "testNestedLambda01", expectedUnitToString);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385132
+	public void test385132() throws IOException {
+		String source = "->";
+		String expectedErrorString = 
+				"----------\n" +
+				"1. ERROR in test385132 (at line 1)\n" +
+				"	->\n" +
+				"	^^\n" +
+				"Syntax error on token \"->\", delete this token\n" +
+				"----------\n";
+				
+		checkParse(CHECK_PARSER , source.toCharArray(), expectedErrorString, "test385132", null);
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java
index 75d26ea..a4651ea 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -71,18 +75,22 @@
 			"	}\n" +
 			"}\n"
 		},
-		"----------\n" +
-		"1. ERROR in X.java (at line 3)\n" +
-		"	throws new X\n" +
-		"	^^^^^^\n" +
-		"Syntax error on token \"throws\", throw expected\n" +
-		"----------\n" +
-		"2. ERROR in X.java (at line 3)\n" +
-		"	throws new X\n" +
-		"	           ^\n" +
-		"Syntax error, unexpected end of method\n" +
-		"----------\n"
-	);
+		"----------\n" + 
+		"1. ERROR in X.java (at line 3)\n" + 
+		"	throws new X\n" + 
+		"	^^^^^^\n" + 
+		"Syntax error on token \"throws\", throw expected\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 3)\n" + 
+		"	throws new X\n" + 
+		"	           ^\n" + 
+		"Syntax error, insert \"( )\" to complete Expression\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 3)\n" + 
+		"	throws new X\n" + 
+		"	           ^\n" + 
+		"Syntax error, insert \";\" to complete BlockStatements\n" + 
+		"----------\n");
 }
 public void test004() {
 	this.runNegativeTest(
@@ -130,18 +138,22 @@
 			"	}\n" +
 			"}\n"
 		},
-		"----------\n" +
-		"1. ERROR in X.java (at line 3)\n" +
-		"	throws new X\n" +
-		"	^^^^^^\n" +
-		"Syntax error on token \"throws\", throw expected\n" +
-		"----------\n" +
-		"2. ERROR in X.java (at line 3)\n" +
-		"	throws new X\n" +
-		"	           ^\n" +
-		"Syntax error, unexpected end of initializer\n" +
-		"----------\n"
-	);
+		"----------\n" + 
+		"1. ERROR in X.java (at line 3)\n" + 
+		"	throws new X\n" + 
+		"	^^^^^^\n" + 
+		"Syntax error on token \"throws\", throw expected\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 3)\n" + 
+		"	throws new X\n" + 
+		"	           ^\n" + 
+		"Syntax error, insert \"( )\" to complete Expression\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 3)\n" + 
+		"	throws new X\n" + 
+		"	           ^\n" + 
+		"Syntax error, insert \";\" to complete BlockStatements\n" + 
+		"----------\n");
 }
 public void test007() {
 	this.runNegativeTest(
@@ -228,7 +240,7 @@
 		"----------\n"
 	);
 }
-public void test011() {
+public void _test011() {
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ReferenceExpressionSyntaxTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ReferenceExpressionSyntaxTest.java
new file mode 100644
index 0000000..80517b3
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/ReferenceExpressionSyntaxTest.java
@@ -0,0 +1,983 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.parser;
+
+import java.io.File;
+import java.io.IOException;
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.tests.util.CompilerTestSetup;
+
+public class ReferenceExpressionSyntaxTest extends AbstractSyntaxTreeTest {
+
+	private static String  jsr335TestScratchArea = "c:\\Jsr335TestScratchArea";
+	private static String referenceCompiler = "C:\\jdk-7-ea-bin-b75-windows-i586-30_oct_2009\\jdk7\\bin\\javac.exe"; // TODO: Patch when RI becomes available.
+
+	public static Class testClass() {
+		return ReferenceExpressionSyntaxTest.class;
+	}
+	public void initialize(CompilerTestSetup setUp) {
+		super.initialize(setUp);
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+
+	public ReferenceExpressionSyntaxTest(String testName){
+		super(testName, referenceCompiler, jsr335TestScratchArea);
+		if (referenceCompiler != null) {
+			File f = new File(jsr335TestScratchArea);
+			if (!f.exists()) {
+				f.mkdir();
+			}
+			CHECK_ALL |= CHECK_JAVAC_PARSER;
+		}
+	}
+
+	static {
+		//		TESTS_NAMES = new String[] { "test0012" };
+		//		TESTS_NUMBERS = new int[] { 133, 134, 135 };
+		if (!(new File(referenceCompiler).exists())) {
+			referenceCompiler = null;
+			jsr335TestScratchArea = null;
+		}
+	}
+	// Reference expression - super:: form, without type arguments. 
+	public void test0001() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X extends Y {\n" +
+				"    public static void main(String [] args) {\n" +
+				"	new X().doit();\n" +
+				"    }\n" +
+				"    void doit() {\n" +
+				"        I i = super::foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    public void foo(int x) {\n" +
+				"	System.out.println(x);\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X extends Y {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    new X().doit();\n" + 
+				"  }\n" + 
+				"  void doit() {\n" + 
+				"    I i = super::foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0001", expectedUnitToString);
+	}
+	// Reference expression - super:: form, with type arguments. 
+	public void test0002() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X extends Y {\n" +
+				"    public static void main(String [] args) {\n" +
+				"	new X().doit();\n" +
+				"    }\n" +
+				"    void doit() {\n" +
+				"        I i = super::<String>foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    public void foo(int x) {\n" +
+				"	System.out.println(x);\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X extends Y {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    new X().doit();\n" + 
+				"  }\n" + 
+				"  void doit() {\n" + 
+				"    I i = super::<String>foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0002", expectedUnitToString);
+	}
+	// Reference expression - SimpleName:: form, without type arguments.
+	public void test0003() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y::foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    public static void foo(int x) {\n" +
+				"	System.out.println(x);\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y::foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0003", expectedUnitToString);
+	}
+	// Reference expression - SimpleName:: form, with type arguments.
+	public void test0004() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y::<String>foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    public static void foo(int x) {\n" +
+				"	System.out.println(x);\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y::<String>foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0004", expectedUnitToString);
+	}
+	// Reference expression - QualifiedName:: form, without type arguments.
+	public void test0005() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y.Z::foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    static class Z {\n" +
+				"        public static void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y.Z::foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  static class Z {\n" + 
+				"    Z() {\n" + 
+				"      super();\n" + 
+				"    }\n" + 
+				"    public static void foo(int x) {\n" + 
+				"      System.out.println(x);\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0005", expectedUnitToString);
+	}
+	// Reference expression - QualifiedName:: form, with type arguments.
+	public void test0006() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y.Z::<String>foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    static class Z {\n" +
+				"        public static void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y.Z::<String>foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  static class Z {\n" + 
+				"    Z() {\n" + 
+				"      super();\n" + 
+				"    }\n" + 
+				"    public static void foo(int x) {\n" + 
+				"      System.out.println(x);\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0006", expectedUnitToString);
+	}
+	// Reference expression - Primary:: form, without type arguments.
+	public void test0007() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = new Y()::foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = new Y()::foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0007", expectedUnitToString);
+	}
+	// Reference expression - primary:: form, with type arguments.
+	public void test0008() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = new Y()::<String>foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = new Y()::<String>foo;\n" + 
+				"    i.foo(10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0008", expectedUnitToString);
+	}
+	// Reference expression - X<T>:: form, without type arguments.
+	public void test0009() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(Y<String> y, int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>::foo;\n" +
+				"        i.foo(new Y<String>(), 10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(Y<String> y, int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y<String>::foo;\n" + 
+				"    i.foo(new Y<String>(), 10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y<T> {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0009", expectedUnitToString);
+	}
+	// Reference expression - X<T>:: form, with type arguments.
+	public void test0010() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(Y<String> y, int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>::<String>foo;\n" +
+				"        i.foo(new Y<String>(), 10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(Y<String> y, int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y<String>::<String>foo;\n" + 
+				"    i.foo(new Y<String>(), 10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y<T> {\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  void foo(int x) {\n" + 
+				"    System.out.println(x);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0010", expectedUnitToString);
+	}
+	// Reference expression - X<T>.Name:: form, without type arguments.
+	public void test0011() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(Y<String>.Z z, int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>.Z::foo;\n" +
+				"        i.foo(new Y<String>().new Z(), 10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"    class Z {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(Y<String>.Z z, int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y<String>.Z::foo;\n" + 
+				"    i.foo(new Y<String>().new Z(), 10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y<T> {\n" + 
+				"  class Z {\n" + 
+				"    Z() {\n" + 
+				"      super();\n" + 
+				"    }\n" + 
+				"    void foo(int x) {\n" + 
+				"      System.out.println(x);\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0011", expectedUnitToString);
+	}
+	// Reference expression - X<T>.Name:: form, with type arguments.
+	public void test0012() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(Y<String>.Z z, int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>.Z::<String>foo;\n" +
+				"        i.foo(new Y<String>().new Z(), 10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"    class Z {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(Y<String>.Z z, int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y<String>.Z::<String>foo;\n" + 
+				"    i.foo(new Y<String>().new Z(), 10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y<T> {\n" + 
+				"  class Z {\n" + 
+				"    Z() {\n" + 
+				"      super();\n" + 
+				"    }\n" + 
+				"    void foo(int x) {\n" + 
+				"      System.out.println(x);\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0012", expectedUnitToString);
+	}
+	// Reference expression - X<T>.Y<K>:: form, without type arguments.
+	public void test0013() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(Y<String>.Z<Integer> z, int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>.Z<Integer>::foo;\n" +
+				"        i.foo(new Y<String>().new Z<Integer>(), 10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"    class Z<K> {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(Y<String>.Z<Integer> z, int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y<String>.Z<Integer>::foo;\n" + 
+				"    i.foo(new Y<String>().new Z<Integer>(), 10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y<T> {\n" + 
+				"  class Z<K> {\n" + 
+				"    Z() {\n" + 
+				"      super();\n" + 
+				"    }\n" + 
+				"    void foo(int x) {\n" + 
+				"      System.out.println(x);\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0013", expectedUnitToString);
+	}
+	// Reference expression - X<T>.Y<K>:: form, with type arguments.
+	public void test0014() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(Y<String>.Z<Integer> z, int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>.Z<Integer>::<String>foo;\n" +
+				"        i.foo(new Y<String>().new Z<Integer>(), 10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"    class Z<K> {\n" +
+				"        void foo(int x) {\n" +
+				"	    System.out.println(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(Y<String>.Z<Integer> z, int x);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = Y<String>.Z<Integer>::<String>foo;\n" + 
+				"    i.foo(new Y<String>().new Z<Integer>(), 10);\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"class Y<T> {\n" + 
+				"  class Z<K> {\n" + 
+				"    Z() {\n" + 
+				"      super();\n" + 
+				"    }\n" + 
+				"    void foo(int x) {\n" + 
+				"      System.out.println(x);\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Y() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0014", expectedUnitToString);
+	}
+	// Constructor reference expression - X<T>.Y<K>::new form, with type arguments.
+	public void test0015() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(Y<String> y);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>.Z<Integer>::<String>new;\n" +
+				"        i.foo(new Y<String>()); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"    class Z<K> {\n" +
+				"        Z() {\n" +
+				"            System.out.println(\"Y<T>.Z<K>::new\");\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+					"  void foo(Y<String> y);\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public X() {\n" + 
+					"    super();\n" + 
+					"  }\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    I i = Y<String>.Z<Integer>::<String>new;\n" + 
+					"    i.foo(new Y<String>());\n" + 
+					"  }\n" + 
+					"}\n" + 
+					"class Y<T> {\n" + 
+					"  class Z<K> {\n" + 
+					"    Z() {\n" + 
+					"      super();\n" + 
+					"      System.out.println(\"Y<T>.Z<K>::new\");\n" + 
+					"    }\n" + 
+					"  }\n" + 
+					"  Y() {\n" + 
+					"    super();\n" + 
+					"  }\n" + 
+					"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0015", expectedUnitToString);
+	}
+	// Reference expression - PrimitiveType[]:: form, with type arguments.
+	public void test0016() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    Object copy(int [] ia);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = int[]::<String>clone;\n" +
+				"        i.copy(new int[10]); \n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  Object copy(int[] ia);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = int[]::<String>clone;\n" + 
+				"    i.copy(new int[10]);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0016", expectedUnitToString);
+	}	
+	// Reference expression - Name[]:: form, with type arguments.
+	public void test0017() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    Object copy(X [] ia);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = X[]::<String>clone;\n" +
+				"        i.copy(new X[10]); \n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  Object copy(X[] ia);\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = X[]::<String>clone;\n" + 
+				"    i.copy(new X[10]);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0017", expectedUnitToString);
+	}	
+	// Reference expression - X<T>.Y<K>[]:: form, with type arguments.
+	public void test0018() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    Object copy(X<String>.Y<Integer> [] p);\n" +
+				"}\n" +
+				"public class X<T>  {\n" +
+				"    class Y<K> {\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = X<String>.Y<Integer>[]::<String>clone;\n" +
+				"        X<String>.Y<Integer>[] xs = null;\n" +
+				"        i.copy(xs); \n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  Object copy(X<String>.Y<Integer>[] p);\n" + 
+				"}\n" + 
+				"public class X<T> {\n" + 
+				"  class Y<K> {\n" + 
+				"    Y() {\n" + 
+				"      super();\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  public static void main(String[] args) {\n" + 
+				"    I i = X<String>.Y<Integer>[]::<String>clone;\n" + 
+				"    X<String>.Y<Integer>[] xs = null;\n" + 
+				"    i.copy(xs);\n" + 
+				"  }\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0018", expectedUnitToString);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384320, syntax error while mixing 308 and 335.
+	public void test0019() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    void foo(X<String> s, int x);\n" +
+				"}\n" +
+				"public class X<T> {\n" +
+				"    I i = X<@Foo({\"hello\"}) String>::foo;\n" +
+				"    void foo(int x) {\n" +
+				"    }\n" +
+				"}\n" +
+				"@interface Foo {\n" +
+				"    String [] value();\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" + 
+				"  void foo(X<String> s, int x);\n" + 
+				"}\n" + 
+				"public class X<T> {\n" + 
+				"  I i = X<@Foo({\"hello\"}) String>::foo;\n" + 
+				"  public X() {\n" + 
+				"    super();\n" + 
+				"  }\n" + 
+				"  void foo(int x) {\n" + 
+				"  }\n" + 
+				"}\n" + 
+				"@interface Foo {\n" + 
+				"  String[] value();\n" + 
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0019", expectedUnitToString);
+	}
+
+	// Reference expression - Name::new forms, with/without type arguments.
+	public void test0020() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"    Y foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    class Z extends Y {\n" +
+				"        public Z(int x) {\n" +
+				"            super(x);\n" +
+				"            System.out.println(\"Z\"+x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        Y y;\n" +
+				"        I i = Y::new;\n" +
+				"        y = i.foo(10); \n" +
+				"        i = X.Z::new;\n" +
+				"        y = i.foo(20); \n" +
+				"        i = W<Integer>::new;\n" +
+				"        y = i.foo(23);\n" +
+				"    }\n" +
+				"}\n" +
+				"class W<T> extends Y {\n" +
+				"    public W(T x) {\n" +
+				"        super(0);\n" +
+				"        System.out.println(x);\n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    public Y(int x) {\n" +
+				"        System.out.println(x);\n" +
+				"    }\n" +
+				"}\n";
+		String expectedUnitToString = 
+				"interface I {\n" +
+				"  Y foo(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  class Z extends Y {\n" +
+				"    public Z(int x) {\n" +
+				"      super(x);\n" +
+				"      System.out.println((\"Z\" + x));\n" +
+				"    }\n" +
+				"  }\n" +
+				"  public X() {\n" +
+				"    super();\n" +
+				"  }\n" +
+				"  public static void main(String[] args) {\n" +
+				"    Y y;\n" +
+				"    I i = Y::new;\n" +
+				"    y = i.foo(10);\n" +
+				"    i = X.Z::new;\n" +
+				"    y = i.foo(20);\n" +
+				"    i = W<Integer>::new;\n" +
+				"    y = i.foo(23);\n" +
+				"  }\n" +
+				"}\n" +
+				"class W<T> extends Y {\n" +
+				"  public W(T x) {\n" +
+				"    super(0);\n" +
+				"    System.out.println(x);\n" +
+				"  }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"  public Y(int x) {\n" +
+				"    super();\n" +
+				"    System.out.println(x);\n" +
+				"  }\n" +
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0003", expectedUnitToString);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385132
+	public void test385132() throws IOException {
+		String source = "::";
+		String expectedErrorString = 
+				"----------\n" +
+				"1. ERROR in test385132 (at line 1)\n" +
+				"	::\n" +
+				"	^^\n" +
+				"Syntax error on token \"::\", delete this token\n" +
+				"----------\n";
+				
+		checkParse(CHECK_PARSER , source.toCharArray(), expectedErrorString, "test385132", null);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385374, Support for 308 style type annotations on 335 constructs.
+	public void test385374() throws IOException {
+		String source = 
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"@interface TypeAnnotation {\n" +
+				"}\n" +
+				"\n" +
+				"class X<T> {\n" +
+				"	 // Primitive array form\n" +
+				"	 I x1 = @TypeAnnotation int []::clone;\n" +
+				"	 // Primitive array form with dimension annotations.\n" +
+				"	 I x2 = @TypeAnnotation int @ArrayAnnotation[]@ArrayAnnotation[]::clone; \n" +
+				"	 // Primitive array form with dimension annotations and type parameter annotations.\n" +
+				"	 I x3 = @TypeAnnotation int @ArrayAnnotation[]@ArrayAnnotation[]::<@TypeParameterAnnotation String>clone; \n" +
+				"	 // Reference type name form\n" +
+				"	 I x4 = @TypeAnnotation X::clone;\n" +
+				"	 // Reference type name array form\n" +
+				"	 I x5 = @TypeAnnotation X []::clone;\n" +
+				"	 // Reference type name array form with dimension annotations.\n" +
+				"	 I x6 = @TypeAnnotation X @ArrayAnnotation[]@ArrayAnnotation[]::clone; \n" +
+				"	 // Reference type name array form with dimension annotations and type parameter annotations.\n" +
+				"	 I x7 = @TypeAnnotation X @ArrayAnnotation[]@ArrayAnnotation[]::<@TypeParameterAnnotation String>clone; \n" +
+				"	 // Generic type array form with dimension annotations and type parameter annotations.\n" +
+				"	 I x8 = @TypeAnnotation X<@TypeParameterAnnotation String> @ArrayAnnotation[]@ArrayAnnotation[]::<@TypeParameterAnnotation String>clone; \n" +
+				"	 // Qualified generic type array form with dimension annotations and type parameter annotations.\n" +
+				"	 I x9 = @TypeAnnotation X<@TypeParameterAnnotation String>.Y<@TypeParameterAnnotation String> @ArrayAnnotation[]@ArrayAnnotation[]::<@TypeParameterAnnotation String>clone; \n" +
+				"}\n";
+		
+		String expectedUnitToString = 
+				"interface I {\n" +
+				"  void foo();\n" +
+				"}\n" +
+				"@interface TypeAnnotation {\n" +
+				"}\n" +
+				"class X<T> {\n" +
+				"  I x1 = @TypeAnnotation int[]::clone;\n" +
+				"  I x2 = @TypeAnnotation int @ArrayAnnotation [] @ArrayAnnotation []::clone;\n" +
+				"  I x3 = @TypeAnnotation int @ArrayAnnotation [] @ArrayAnnotation []::<@TypeParameterAnnotation String>clone;\n" +
+				"  I x4 = @TypeAnnotation X::clone;\n" +
+				"  I x5 = @TypeAnnotation X[]::clone;\n" +
+				"  I x6 = @TypeAnnotation X @ArrayAnnotation [] @ArrayAnnotation []::clone;\n" +
+				"  I x7 = @TypeAnnotation X @ArrayAnnotation [] @ArrayAnnotation []::<@TypeParameterAnnotation String>clone;\n" +
+				"  I x8 = @TypeAnnotation X<@TypeParameterAnnotation String> @ArrayAnnotation [] @ArrayAnnotation []::<@TypeParameterAnnotation String>clone;\n" +
+				"  I x9 = @TypeAnnotation X<@TypeParameterAnnotation String>.Y<@TypeParameterAnnotation String> @ArrayAnnotation [] @ArrayAnnotation []::<@TypeParameterAnnotation String>clone;\n" +
+				"  X() {\n" +
+				"    super();\n" +
+				"  }\n" +
+				"}\n";
+		checkParse(CHECK_PARSER | CHECK_JAVAC_PARSER , source.toCharArray(), null, "test385374", expectedUnitToString);
+	}
+	/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=385374, Support for 308 style type annotations on 335 constructs - make sure illegal modifiers are rejected
+	   This test has been rendered meaningless as the grammar has been so throughly changed - Type annotations are not accepted via modifiers in the first place.
+	   Disabling this test as we don't want fragile and unstable tests that are at the whimsy of the diagnose parser's complex algorithms. 
+	*/
+	public void test385374a() throws IOException {
+		// Nop.
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java
index f07295e..9d90885 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/RunCompletionParserTests.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -110,6 +114,17 @@
 			TestCase.RUN_ONLY_ID = null;
 			all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK1_7, tests_1_7));
 		}
+		if ((possibleComplianceLevels & AbstractCompilerTest.F_1_8) != 0) {
+			ArrayList tests_1_8 = (ArrayList)testClasses.clone();
+			tests_1_8.addAll(TEST_CLASSES_1_5);
+			// Reset forgotten subsets tests
+			TestCase.TESTS_PREFIX = null;
+			TestCase.TESTS_NAMES = null;
+			TestCase.TESTS_NUMBERS= null;
+			TestCase.TESTS_RANGE = null;
+			TestCase.RUN_ONLY_ID = null;
+			all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK1_8, tests_1_8));
+		}
 
 		return all;
 	}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java
index e5a9a09..1ca2a31 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/SyntaxErrorTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
@@ -163,27 +167,27 @@
 		"}										\n";
 
 	String expectedSyntaxErrorDiagnosis =
-		"----------\n" +
-		"1. ERROR in <parenthesis mismatch> (at line 3)\n" +
-		"	[ arg1, 						\n" +
-		"	^\n" +
-		"Syntax error on token \"[\", invalid Type\n" +
-		"----------\n" +
-		"2. ERROR in <parenthesis mismatch> (at line 4)\n" +
-		"	{ arg2, ]						\n" +
-		"	^\n" +
-		"Syntax error on token \"{\", invalid Type\n" +
-		"----------\n" +
-		"3. ERROR in <parenthesis mismatch> (at line 4)\n" +
-		"	{ arg2, ]						\n" +
-		"	        ^\n" +
-		"Syntax error on token \"]\", invalid Type\n" +
-		"----------\n" +
-		"4. ERROR in <parenthesis mismatch> (at line 5)\n" +
-		"	arg3, 						\n" +
-		"	    ^\n" +
-		"Syntax error on token \",\", FormalParameter expected after this token\n" +
-		"----------\n";
+			"----------\n" +
+			"1. ERROR in <parenthesis mismatch> (at line 3)\n" +
+			"	[ arg1, 						\n" +
+			"	^\n" +
+			"Syntax error on token \"[\", byte expected\n" +
+			"----------\n" +
+			"2. ERROR in <parenthesis mismatch> (at line 4)\n" +
+			"	{ arg2, ]						\n" +
+			"	^\n" +
+			"Syntax error on token \"{\", byte expected\n" +
+			"----------\n" +
+			"3. ERROR in <parenthesis mismatch> (at line 4)\n" +
+			"	{ arg2, ]						\n" +
+			"	        ^\n" +
+			"Syntax error on token \"]\", byte expected\n" +
+			"----------\n" +
+			"4. ERROR in <parenthesis mismatch> (at line 5)\n" +
+			"	arg3, 						\n" +
+			"	    ^\n" +
+			"Syntax error on token \",\", FormalParameter expected after this token\n" +
+			"----------\n";
 
 	String testName = "<parenthesis mismatch>";
 	checkParse(
@@ -270,12 +274,12 @@
 		"}											\n";
 
 	String expectedSyntaxErrorDiagnosis =
-		"----------\n"+
-		"1. ERROR in <test> (at line 3)\n"+
-		"	i; 									\n"+
-		"	^\n"+
-		"Syntax error, insert \"AssignmentOperator Expression\" to complete Expression\n"+
-		"----------\n";
+			"----------\n" +
+			"1. ERROR in <test> (at line 3)\n" +
+			"	i; 									\n" +
+			"	^\n" +
+			"Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration\n" +
+			"----------\n";
 
 	String testName = "<test>";
 	checkParse(
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
index 44d8b3c..61516cf 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TestAll.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -44,7 +48,7 @@
 	super(testName);
 }
 
-public static Test suite() {
+public static TestSuite getTestSuite(boolean addComplianceDiagnoseTest) {
 	ArrayList testClasses = new ArrayList();
 
 	/* completion tests */
@@ -70,7 +74,8 @@
 	testClasses.add(SyntaxErrorTest.class);
 	testClasses.add(DualParseSyntaxErrorTest.class);
 	testClasses.add(ParserTest.class);
-	testClasses.add(ComplianceDiagnoseTest.class);
+	if (addComplianceDiagnoseTest)
+		testClasses.add(ComplianceDiagnoseTest.class);
 
 	TestSuite all = new TestSuite(TestAll.class.getName());
 	int possibleComplianceLevels = AbstractCompilerTest.getPossibleComplianceLevels();
@@ -128,7 +133,25 @@
 		TestCase.RUN_ONLY_ID = null;
 		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK1_7, tests_1_7));
 	}
+	if ((possibleComplianceLevels & AbstractCompilerTest.F_1_8) != 0) {
+		ArrayList tests_1_8 = (ArrayList)testClasses.clone();
+		tests_1_8.addAll(TEST_CLASSES_1_5);
+		tests_1_8.add(ParserTest1_7.class);
+		tests_1_8.add(LambdaExpressionSyntaxTest.class);
+		tests_1_8.add(ReferenceExpressionSyntaxTest.class);
+		tests_1_8.add(TypeAnnotationSyntaxTest.class);
+		// Reset forgotten subsets tests
+		TestCase.TESTS_PREFIX = null;
+		TestCase.TESTS_NAMES = null;
+		TestCase.TESTS_NUMBERS= null;
+		TestCase.TESTS_RANGE = null;
+		TestCase.RUN_ONLY_ID = null;
+		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK1_8, tests_1_8));
+	}
 
 	return all;
 }
+public static Test suite() {
+	return getTestSuite(true);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TypeAnnotationSyntaxTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TypeAnnotationSyntaxTest.java
new file mode 100644
index 0000000..5847c78
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/parser/TypeAnnotationSyntaxTest.java
@@ -0,0 +1,3796 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.parser;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.util.HashMap;
+import java.util.Map;
+import junit.framework.Test;
+import org.eclipse.jdt.core.tests.util.CompilerTestSetup;
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
+import org.eclipse.jdt.internal.compiler.ast.Argument;
+import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation;
+import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.NormalAnnotation;
+import org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation;
+import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
+
+public class TypeAnnotationSyntaxTest extends AbstractSyntaxTreeTest {
+
+	private static String  jsr308TestScratchArea = "c:\\Jsr308TestScratchArea";
+	private static String referenceCompiler = "C:\\jdk-7-ea-bin-b75-windows-i586-30_oct_2009\\jdk7\\bin\\javac.exe";
+	
+	static {
+//		TESTS_NAMES = new String [] { "test0137" };
+	}
+	public static Class testClass() {
+		return TypeAnnotationSyntaxTest.class;
+	}
+	public void initialize(CompilerTestSetup setUp) {
+		super.initialize(setUp);
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+	
+	static final class LocationPrinterVisitor extends ASTVisitor {
+		TypeReference enclosingReference;
+		Map locations;
+
+		public LocationPrinterVisitor() {
+			this.locations = new HashMap();
+		}
+
+		public Map getLocations() {
+			return this.locations;
+		}
+		public boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope) {
+			this.enclosingReference = fieldDeclaration.type;
+			return true;
+		}
+		public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) {
+			TypeReference returnType = methodDeclaration.returnType;
+			if (returnType != null) {
+				this.enclosingReference = returnType;
+				returnType.traverse(this, scope);
+			}
+			if (methodDeclaration.thrownExceptions != null) {
+				int thrownExceptionsLength = methodDeclaration.thrownExceptions.length;
+				for (int i = 0; i < thrownExceptionsLength; i++) {
+					TypeReference typeReference = methodDeclaration.thrownExceptions[i];
+					this.enclosingReference = typeReference;
+					typeReference.traverse(this, scope);
+				}
+			}
+			return false;
+		}
+		public boolean visit(Argument argument, ClassScope scope) {
+			this.enclosingReference = argument.type;
+			return true;
+		}
+		public boolean visit(Argument argument, BlockScope scope) {
+			this.enclosingReference = argument.type;
+			return true;
+		}
+		public boolean visit(MarkerAnnotation annotation, BlockScope scope) {
+			if (this.enclosingReference != null) {
+				storeLocations(annotation, Annotation.getLocations(this.enclosingReference, annotation));
+			}
+			return false;
+		}
+		public boolean visit(SingleMemberAnnotation annotation, BlockScope scope) {
+			if (this.enclosingReference != null) {
+				storeLocations(annotation, Annotation.getLocations(this.enclosingReference, annotation));
+			}
+			return false;
+		}
+		public boolean visit(NormalAnnotation annotation, BlockScope scope) {
+			if (this.enclosingReference != null) {
+				storeLocations(annotation, Annotation.getLocations(this.enclosingReference, annotation));
+			}
+			return false;
+		}
+		public void storeLocations(Annotation annotation, int[] tab) {
+			String key = String.valueOf(annotation);
+			if (this.locations.get(key) != null) {
+				return;
+			}
+			if (tab == null) {
+				this.locations.put(key, null);
+				return;
+			}
+			
+			StringBuffer buffer = new StringBuffer("[");
+			for (int i = 0, max = tab.length; i < max; i += 2) {
+				if (i > 0) {
+					buffer.append(", ");
+				}
+				switch (tab[i]) {
+				case 0:
+					buffer.append("ARRAY");
+					break;
+				case 1:
+					buffer.append("INNER_TYPE");
+					break;
+				case 2:
+					buffer.append("WILDCARD");
+					break;
+				case 3:
+					buffer.append("TYPE_ARGUMENT(").append(tab[i+1]).append(')');
+					break;
+				}
+			}
+			buffer.append(']');
+			this.locations.put(key, String.valueOf(buffer));
+		}
+
+		public boolean visit(ArrayTypeReference arrayReference, BlockScope scope) {
+			if (this.enclosingReference == null) return false;
+			return true;
+		}
+		public boolean visit(ParameterizedSingleTypeReference typeReference, BlockScope scope) {
+			if (this.enclosingReference == null) return false;
+			return true;
+		}
+		public boolean visit(SingleTypeReference typeReference, BlockScope scope) {
+			if (this.enclosingReference == null) return false;
+			return true;
+		}
+	}
+public TypeAnnotationSyntaxTest(String testName){
+	super(testName, referenceCompiler, jsr308TestScratchArea);
+	if (referenceCompiler != null) {
+		File f = new File(jsr308TestScratchArea);
+		if (!f.exists()) {
+			f.mkdir();
+		}
+		if (f.exists()) {
+			try {
+				OutputStreamWriter w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "Marker.java")));
+				w.write("@interface Marker {}\n".toCharArray());
+				w.close();
+				w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "Normal.java")));
+				w.write("@interface Normal {\n\tint value() default 10;\n}\n".toCharArray());
+				w.close();
+				w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "SingleMember.java")));
+				w.write("@interface SingleMember {\n\tint value() default 10;\n}\n".toCharArray());
+				w.close();
+				w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "Positive.java")));
+				w.write("@interface Positive {}\n".toCharArray());
+				w.close();
+				w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "Negative.java")));
+				w.write("@interface Negative{}\n".toCharArray());
+				w.close();
+				w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "Readonly.java")));
+				w.write("@interface Readonly {}\n".toCharArray());
+				w.close();
+				w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "NonNull.java")));
+				w.write("@interface NonNull {}\n".toCharArray());
+				w.close();
+				w = new OutputStreamWriter(new FileOutputStream(new File(jsr308TestScratchArea + File.separator + "HashMap.java")));
+				w.write("class HashMap<X,Y> {\n class Iterator {}; \n}\n".toCharArray());
+				w.close();
+				CHECK_ALL |= CHECK_JAVAC_PARSER;
+			} catch (IOException e) {
+				// ignore
+			}
+		}
+	}
+}
+
+static {
+//	TESTS_NAMES = new String[] { "test0038", "test0039", "test0040a" };
+//	TESTS_NUMBERS = new int[] { 133, 134, 135 };
+	if (!(new File(referenceCompiler).exists())) {
+		referenceCompiler = null;
+		jsr308TestScratchArea = null;
+	}
+}
+void traverse (File f) throws IOException {
+	if (f.isDirectory()) {
+		File [] files = f.listFiles();
+		for (int i = 0; i < files.length; i++) {
+			traverse(files[i]);
+		}
+	} else {
+		if (f.getName().endsWith(".java")) {
+			System.out.println(f.getCanonicalPath());
+			char [] contents = new char[(int) f.length()];
+			FileInputStream fs = new FileInputStream(f);
+			InputStreamReader isr = new InputStreamReader(fs);
+			isr.read(contents);
+			checkParse(contents, null, f.getCanonicalPath(), null);
+		}
+	}
+}
+public void _test000() throws IOException {
+	traverse(new File("C:\\jsr308tests"));
+}
+
+public void test0001() throws IOException {
+	String source = "@Marker class A extends String {}\n;" +
+					"@Marker class B extends @Marker String {}\n" +
+					"@Marker class C extends @Marker @SingleMember(0) String {}\n" +
+					"@Marker class D extends @Marker @SingleMember(0) @Normal(Value = 0) String {}\n" +
+					"@Marker class E extends String {}\n;";
+
+	String expectedUnitToString = 
+		"@Marker class A extends String {\n" + 
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"@Marker class B extends @Marker String {\n" + 
+		"  B() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"@Marker class C extends @Marker @SingleMember(0) String {\n" + 
+		"  C() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"@Marker class D extends @Marker @SingleMember(0) @Normal(Value = 0) String {\n" + 
+		"  D() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"@Marker class E extends String {\n" + 
+		"  E() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER , source.toCharArray(), null, "test0001", expectedUnitToString);
+}
+public void test0002() throws IOException {
+	String source = "class A extends String {}\n;" +
+					"class B extends @Marker String {}\n" +
+					"class C extends @Marker @SingleMember(0) String {}\n" +
+					"class D extends @Marker @SingleMember(0) @Normal(Value = 0) String {}\n" +
+					"class E extends String {}\n;";
+    
+	String expectedUnitToString = 
+		"class A extends String {\n" + 
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"class B extends @Marker String {\n" + 
+		"  B() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"class C extends @Marker @SingleMember(0) String {\n" + 
+		"  C() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"class D extends @Marker @SingleMember(0) @Normal(Value = 0) String {\n" + 
+		"  D() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n" + 
+		"class E extends String {\n" + 
+		"  E() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0002", expectedUnitToString);
+}
+public void test0003() throws IOException {
+	String source = "@Marker class A implements Comparable, " +
+					"                   @Marker Serializable," +
+					"                   Cloneable {\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"@Marker class A implements Comparable, @Marker Serializable, Cloneable {\n" + 
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0003", expectedUnitToString);
+}
+public void test0004() throws IOException {
+	String source = "@Marker class A implements Comparable, " +
+					"                   @Marker @SingleMember(0) Serializable," +
+					"                   Cloneable {\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"@Marker class A implements Comparable, @Marker @SingleMember(0) Serializable, Cloneable {\n" + 
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0004", expectedUnitToString);
+}
+public void test0005() throws IOException {
+	String source = "@Marker class A implements Comparable, " +
+					"                   @Marker @SingleMember(0) @Normal(Value=0) Serializable," +
+					"                   Cloneable {\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"@Marker class A implements Comparable, @Marker @SingleMember(0) @Normal(Value = 0) Serializable, Cloneable {\n" +
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0005", expectedUnitToString);
+}
+public void test0006() throws IOException {
+	String source = "@Marker class A implements @Marker Comparable, " +
+					"                   @Marker @SingleMember(0) @Normal(Value=0) Serializable," +
+					"                   @Marker Cloneable {\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"@Marker class A implements @Marker Comparable, @Marker @SingleMember(0) @Normal(Value = 0) Serializable, @Marker Cloneable {\n" +
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0006", expectedUnitToString);
+}
+public void test007() throws IOException {
+	String source = "@Marker class A extends Object implements Comparable, " +
+					"                   @Marker @SingleMember(10) @Normal(Value=0) Serializable," +
+					"                   Cloneable {\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"@Marker class A extends Object implements Comparable, @Marker @SingleMember(10) @Normal(Value = 0) Serializable, Cloneable {\n" +
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0007", expectedUnitToString);
+}
+public void test0008() throws IOException {
+	String source = "@Marker class A extends @Marker Object implements Comparable, " +
+					"                   @Marker @SingleMember(0) @Normal(Value=0) Serializable," +
+					"                   Cloneable {\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"@Marker class A extends @Marker Object implements Comparable, @Marker @SingleMember(0) @Normal(Value = 0) Serializable, Cloneable {\n" +
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0008", expectedUnitToString);
+}
+public void test0009() throws IOException {
+	String source = "@Marker class A extends @Marker @SingleMember(0) Object implements Comparable, " +
+	"                   @Marker @SingleMember(0) @Normal(Value=0) Serializable," +
+	"                   Cloneable {\n" +
+	"}\n";
+	String expectedUnitToString = 
+		"@Marker class A extends @Marker @SingleMember(0) Object implements Comparable, @Marker @SingleMember(0) @Normal(Value = 0) Serializable, Cloneable {\n" +
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0009", expectedUnitToString);
+}
+public void test0010() throws IOException {
+	String source = "@Marker class A extends @Marker @SingleMember(0) @Normal(Value=0) Object implements Comparable, " +
+	"                   @Marker @SingleMember(0) @Normal(Value=0) Serializable," +
+	"                   Cloneable {\n" +
+	"}\n";
+	String expectedUnitToString = 
+		"@Marker class A extends @Marker @SingleMember(0) @Normal(Value = 0) Object implements Comparable, @Marker @SingleMember(0) @Normal(Value = 0) Serializable, Cloneable {\n" +
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0010", expectedUnitToString);
+}
+public void test0011() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker String[] @Marker[][] s[] @SingleMember(0)[][] @Normal(Value = 0)[][];\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker String[] @Marker [][][] @SingleMember(0) [][] @Normal(Value = 0) [][] s;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0011", expectedUnitToString);
+}
+public void test0012() throws IOException {
+	String source = "public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" +
+					"    int[] f[];\n" +
+					"    @English String[] @NonNull[] s[] @Nullable[][];\n" +
+					"    float[] p[];\n" +
+					"public static void main(String args[]) {\n" +
+					"    @Readonly String @Nullable[] @NonNull[] s;\n" +
+					"    s = new @Readonly String @NonNull[5] @Nullable[];\n" +
+					"}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" + 
+		"  int[][] f;\n" + 
+		"  @English String[] @NonNull [][] @Nullable [][] s;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" + 
+		"    @Readonly String @Nullable [] @NonNull [] s;\n" + 
+		"    s = new @Readonly String @NonNull [5] @Nullable [];\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0012", expectedUnitToString);
+}
+public void test0013() throws IOException {
+	String source = "public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" +
+					"    int[] f[];\n" +
+					"    @English String[] @NonNull[] s[] @Nullable[][];\n" +
+					"    float[] p[];\n" +
+					"public static void main(String args[]) {\n" +
+					"    @Readonly String s;\n" +
+					"	 s = new @Readonly String @NonNull[] @Nullable[] { {\"Hello\"}, {\"World\"}} [0][0];\n" +
+					"}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" + 
+		"  int[][] f;\n" + 
+		"  @English String[] @NonNull [][] @Nullable [][] s;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" + 
+		"    @Readonly String s;\n" + 
+		"    s = new @Readonly String @NonNull [] @Nullable []{{\"Hello\"}, {\"World\"}}[0][0];\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0013", expectedUnitToString);
+}
+public void test0014() throws IOException {
+	String source = "public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" +
+					"    int[] f[];\n" +
+					"    @English String[] @NonNull[] s[] @Nullable[][];\n" +
+					"    float[] p[];\n" +
+					"public static int main(String args[])[] @Marker[][] @Marker @SingleMember(0) @Normal(Value=0)[][] {\n" +
+					"    @Readonly String @Nullable[] @NonNull[] s;\n" +
+					"    s = new @Readonly String @NonNull[5] @Nullable[];\n" +
+					"}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" + 
+		"  int[][] f;\n" + 
+		"  @English String[] @NonNull [][] @Nullable [][] s;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static int[] @Marker [][] @Marker @SingleMember(0) @Normal(Value = 0) [][] main(String[] args) {\n" +
+		"    @Readonly String @Nullable [] @NonNull [] s;\n" + 
+		"    s = new @Readonly String @NonNull [5] @Nullable [];\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0014", expectedUnitToString);
+
+}
+public void test0015() throws IOException {
+	String source = "public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" +
+					"    int[] f[];\n" +
+					"    @English String[] @NonNull[] s[] @Nullable[][];\n" +
+					"    float[] p[];\n" +
+					"public static int main(String args[])[] @Marker[][] @Marker @SingleMember(0) @Normal(Value=0)[][] {\n" +
+					"    @Readonly String @Nullable[] @NonNull[] s;\n" +
+					"    s = new @Readonly String @NonNull[5] @Nullable[];\n" +
+					"}\n" +
+					"@Marker public A () {}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" + 
+		"  int[][] f;\n" + 
+		"  @English String[] @NonNull [][] @Nullable [][] s;\n" + 
+		"  float[][] p;\n" + 
+		"  public static int[] @Marker [][] @Marker @SingleMember(0) @Normal(Value = 0) [][] main(String[] args) {\n" + 
+		"    @Readonly String @Nullable [] @NonNull [] s;\n" + 
+		"    s = new @Readonly String @NonNull [5] @Nullable [];\n" + 
+		"  }\n" + 
+		"  public @Marker A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0015", expectedUnitToString);
+}
+// parameters
+public void test0016() throws IOException {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker[][] main(int[] @SingleMember(10)[][] args[] @Normal(Value = 10)[][])[] @Marker[][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(int[] @SingleMember(10) [][][] @Normal(Value = 10) [][] args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0016", expectedUnitToString);
+}
+public void test0017() throws IOException  {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker[][] main(String[] @SingleMember(10)[][] args[] @Normal(Value = 10)[][])[] @Marker[][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(String[] @SingleMember(10) [][][] @Normal(Value = 10) [][] args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0017", expectedUnitToString);
+}
+public void test0018() throws IOException {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker[][] main(HashMap<String, Object>[] @SingleMember(10)[][] args[] @Normal(Value = 10)[][])[] @Marker[][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(HashMap<String, Object>[] @Normal(Value = 10) [][][] @SingleMember(10) [][] args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0018", expectedUnitToString);
+}
+public void test0019() throws IOException {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker [][] main(HashMap<String, Object>.Iterator[] @SingleMember(10) [][] args[] @Normal(Value = 10) [][])[] @Marker [][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(HashMap<String, Object>.Iterator[] @Normal(Value = 10) [][][] @SingleMember(10) [][] args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0019", expectedUnitToString);
+}
+// varargs annotation
+public void test0020() throws IOException {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker[][] main(int[] @SingleMember(10)[][] @Marker ... args )[] @Marker[][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(int[] @SingleMember(10) [][] @Marker ... args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0020", expectedUnitToString);
+}
+public void test0021() throws IOException {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker[][] main(String[] @SingleMember(10)[][] @Marker ... args )[] @Marker[][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(String[] @SingleMember(10) [][] @Marker ... args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0021", expectedUnitToString);
+}
+public void test0022() throws IOException {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker[][] main(HashMap<Integer,String>[] @SingleMember(10)[][] @Marker ... args )[] @Marker[][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(HashMap<Integer, String>[] @SingleMember(10) [][] @Marker ... args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0022", expectedUnitToString);
+}
+public void test0023() throws IOException {
+	String source = "public class A {\n" +
+					"@Marker public int[] @Marker[][] main(HashMap<Integer,String>.Iterator[] @SingleMember(10)[][] @Marker ... args )[] @Marker[][] {\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @Marker [][][] @Marker [][] main(HashMap<Integer, String>.Iterator[] @SingleMember(10) [][] @Marker ... args) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0023", expectedUnitToString);
+}
+// local variables
+public void test0024() throws IOException {
+	String source = "public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" +
+					"public static void main(String args[]) {\n" +
+					"    int[] f[];\n" +
+					"    @English String[] @NonNull[] s[] @Nullable[][];\n" +
+					"    float[] p[];\n" +
+					"}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A implements @Readonly Comparable, @NonNull Serializable, Cloneable {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" + 
+		"    int[][] f;\n" + 
+		"    @English String[] @NonNull [][] @Nullable [][] s;\n" + 
+		"    float[][] p;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0024", expectedUnitToString);
+}
+// type parameter
+public void test0025() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> void foo() {\n" +
+					"}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"class A {\n" + 
+		"  A() {\n" + 
+		"    super();\n" + 
+		"  }\n" +
+		"  public <Integer, @Positive Integer, @Negative Integer, Integer>void foo() {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0025", expectedUnitToString);
+}
+// Type
+public void test0026() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker int foo() {\n" +
+					"    return 0;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> int bar() {\n" +
+					"    return 0;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0026", null);
+}
+// Type
+public void test0027() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker String foo() {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> String bar () {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0027", null);
+}
+//Type
+public void test0028() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker HashMap<@Readonly String, Object> foo() {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> HashMap<String, @NonNull Object> bar () {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0028", null);
+}
+// Type
+public void test0029() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker HashMap<@Readonly String, Object>.Iterator foo() {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> HashMap<String, @NonNull Object>.Iterator bar () {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0029", null);
+}
+//Type
+public void test0030() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker HashMap<@Readonly String, Object>.Iterator[] @NonEmpty[][] foo() {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> HashMap<String, @NonNull Object>.Iterator[] @NonEmpty[][] bar () {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0030", null);
+}
+//Type
+public void test0031() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker int[] @NonEmpty[][] foo() {\n" +
+					"    return 0;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> int[] @NonEmpty[][] bar() {\n" +
+					"    return 0;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0031", null);
+}
+// Type
+public void test0032() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker String[]@NonEmpty[][] foo() {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> String[]@NonEmpty[][] bar () {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0032", null);
+}
+//Type
+public void test0033() throws IOException {
+	String source = "class A {\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> @Marker HashMap<@Readonly String, Object>[] @NonEmpty[][] foo() {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"public <Integer, @Positive Integer, @Negative Integer, Integer> HashMap<String, @NonNull Object>[]@NonEmpty[][] bar () {\n" +
+					"    return null;\n" +
+					"}\n" +
+					"}\n";
+	String expectedError = "";
+	checkParse(CHECK_PARSER, source.toCharArray(), expectedError, "test0033", null);
+}
+// Type0 field declaration.
+public void test0034() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker int k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker int k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0034", expectedUnitToString);
+}
+//Type0 field declaration.
+public void test0035() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker String k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker String k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0035", expectedUnitToString);
+}
+//Type0 field declaration.
+public void test0036() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker HashMap<@Positive Integer, @Negative Integer> k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker HashMap<@Positive Integer, @Negative Integer> k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0036", expectedUnitToString);
+}
+//Type0 field declaration.
+public void test0037() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0037", expectedUnitToString);
+}
+//Type0 field declaration.
+public void test0038() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker int[] @NonEmpty[][] k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker int[] @NonEmpty [][] k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0038", expectedUnitToString);
+}
+//Type0 field declaration.
+public void test0039() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker String[] @NonEmpty[][]k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker String[] @NonEmpty [][] k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0039", expectedUnitToString);
+}
+//Type0 field declaration.
+public void test0040() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker HashMap<@Positive Integer, @Negative Integer>[] @NonEmpty[][] k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker HashMap<@Positive Integer, @Negative Integer>[] @NonEmpty [][] k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0040", expectedUnitToString);
+}
+//Type0 field declaration.
+public void test0041() throws IOException {
+	String source = "public class A {\n" +
+					"    int[] f[];\n" +
+					"    @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonEmpty[][] k;\n" +
+					"    float[] p[];\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  int[][] f;\n" + 
+		"  @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonEmpty [][] k;\n" + 
+		"  float[][] p;\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0041", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0042() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker int foo() { return 0; }\n" +
+					"    public int bar() { return 0; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int foo() {\n" + 
+		"    return 0;\n" + 
+		"  }\n" + 
+		"  public int bar() {\n" + 
+		"    return 0;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0042", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0043() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker String foo() { return null; }\n" +
+					"    public String bar() { return null; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker String foo() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"  public String bar() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0043", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0044() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker HashMap<@Positive Integer, @Negative Integer> foo() { return null; }\n" +
+					"    public HashMap<@Positive Integer, @Negative Integer>  bar() { return null; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker HashMap<@Positive Integer, @Negative Integer> foo() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"  public HashMap<@Positive Integer, @Negative Integer> bar() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0044", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0045() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator foo() { return null; }\n" +
+					"    public HashMap<@Positive Integer, @Negative Integer>.Iterator  bar() { return null; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator foo() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"  public HashMap<@Positive Integer, @Negative Integer>.Iterator bar() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0045", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0046() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker int[] foo() @NonEmpty[][] { return 0; }\n" +
+					"    public int[] @NonEmpty[][] bar() { return 0; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker int[] @NonEmpty [][] foo() {\n" + 
+		"    return 0;\n" + 
+		"  }\n" + 
+		"  public int[] @NonEmpty [][] bar() {\n" + 
+		"    return 0;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0046", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0047() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker String[]  foo() @NonEmpty[][] { return null; }\n" +
+					"    public String[] @NonEmpty[][] bar() { return null; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker String[] @NonEmpty [][] foo() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"  public String[] @NonEmpty [][] bar() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0047", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0048() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker HashMap<@Positive Integer, @Negative Integer>[] foo() @NonEmpty[][] { return null; }\n" +
+					"    public HashMap<@Positive Integer, @Negative Integer> [] @NonEmpty[][] bar() { return null; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker HashMap<@Positive Integer, @Negative Integer> @NonEmpty [][][] foo() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"  public HashMap<@Positive Integer, @Negative Integer>[] @NonEmpty [][] bar() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0048", expectedUnitToString);
+}
+//Type0 MethodHeaderName.
+public void test0049() throws IOException {
+	String source = "public class A {\n" +
+					"    public @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator[]  foo() @NonEmpty[][] { return null; }\n" +
+					"    public HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonEmpty[][] bar() { return null; }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator @NonEmpty [][][] foo() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"  public HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonEmpty [][] bar() {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0049", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0050() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker int p;\n" +
+					"        int q;\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker int p;\n" + 
+		"    int q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0050", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0051() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker String p;\n" +
+					"        String q;\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker String p;\n" + 
+		"    String q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0051", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0052() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker HashMap<@Positive Integer, @Negative Integer> p;\n" +
+					"        HashMap<@Positive Integer, @Negative Integer> q;\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker HashMap<@Positive Integer, @Negative Integer> p;\n" + 
+		"    HashMap<@Positive Integer, @Negative Integer> q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0052", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0053() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator p;\n" +
+					"        HashMap<@Positive Integer, @Negative Integer>.Iterator q;\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator p;\n" + 
+		"    HashMap<@Positive Integer, @Negative Integer>.Iterator q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0053", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0054() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker int[] @NonNull[] p @NonEmpty[][];\n" +
+					"        int[] @NonNull[] q @NonEmpty[][];\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker int[] @NonNull [] @NonEmpty [][] p;\n" + 
+		"    int[] @NonNull [] @NonEmpty [][] q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0054", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0055() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker String[] @NonNull[] p @NonEmpty[][];\n" +
+					"        String[] @NonNull[] q @NonEmpty[][];\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker String[] @NonNull [] @NonEmpty [][] p;\n" + 
+		"    String[] @NonNull [] @NonEmpty [][] q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0055", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0056() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker HashMap<@Positive Integer, @Negative Integer>[] @NonNull[] p @NonEmpty[][];\n" +
+					"        HashMap<@Positive Integer, @Negative Integer>[] @NonNull[] q @NonEmpty[][];\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker HashMap<@Positive Integer, @Negative Integer> @NonEmpty [][][] @NonNull [] p;\n" + 
+		"    HashMap<@Positive Integer, @Negative Integer> @NonEmpty [][][] @NonNull [] q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0056", expectedUnitToString);
+}
+//Type0 local variable declaration
+public void test0057() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonNull[] p @NonEmpty[][];\n" +
+					"        HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonNull[] @NonEmpty[][] q;\n" + 
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    @Marker HashMap<@Positive Integer, @Negative Integer>.Iterator @NonEmpty [][][] @NonNull [] p;\n" + 
+		"    HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonNull [] @NonEmpty [][] q;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0057", expectedUnitToString);
+}
+//Type0 foreach
+public void test0058() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        String @NonNull[] @Marker[] s @Readonly[];\n" +
+					"    	 for (@Readonly String @NonNull[] si @Marker[] : s) {}\n" +
+					"    	 for (String @NonNull[] sii @Marker[] : s) {}\n" +
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    String @NonNull [] @Marker [] @Readonly [] s;\n" + 
+		"    for (@Readonly String @NonNull [] @Marker [] si : s) \n" + 
+		"      {\n" + 
+		"      }\n" + 
+		"    for (String @NonNull [] @Marker [] sii : s) \n" + 
+		"      {\n" + 
+		"      }\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0058", expectedUnitToString);
+}
+//Type0 foreach
+public void test0059() throws IOException {
+	String source = "public class A {\n" +
+					"    public void foo() {\n" +
+					"        int @NonNull[] @Marker[] s @Readonly[];\n" +
+					"    	 for (@Readonly int @NonNull[] si @Marker[] : s) {}\n" +
+					"    	 for (int @NonNull[] sii @Marker[] : s) {}\n" +
+					"    }\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class A {\n" + 
+		"  public A() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo() {\n" + 
+		"    int @NonNull [] @Marker [] @Readonly [] s;\n" + 
+		"    for (@Readonly int @NonNull [] @Marker [] si : s) \n" + 
+		"      {\n" + 
+		"      }\n" + 
+		"    for (int @NonNull [] @Marker [] sii : s) \n" + 
+		"      {\n" + 
+		"      }\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0059", expectedUnitToString);
+}
+// cast expression
+public void test0060() throws IOException {
+	String source = "public class Clazz {\n" +
+					"public static void main(String[] args) {\n" +
+					"int x;\n" +
+					"x = (Integer)\n" +
+					"(@Readonly Object)\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @Normal(Value=0)[][] )\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @SingleMember(0)[][] )\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @Marker[][] )\n" +
+					"(@Readonly Object)\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>[] @Normal(Value=0)[][] )\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>[] @SingleMember(0)[][] )\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>[] @Marker[][] )\n" +
+					"(@Readonly Object)\n" +
+					"(@Readonly String[] @Normal(Value=0)[][] )\n" +
+					"(@Readonly String[] @SingleMember(0)[][] )\n" +
+					"(@Readonly String[] @Marker[][] )\n" +
+					"(@Readonly Object)\n" +
+					"(@Readonly int[] @Normal(Value=0)[][] )\n" +
+					"(@Readonly int[] @SingleMember(0)[][] )\n" +
+					"(@Readonly int[] @Marker[][] )\n" +
+					"(@Readonly Object)\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator)\n" +
+					"(@Readonly Object)\n" +
+					"(@Readonly HashMap<@Positive Integer, @Negative Integer>)\n" +
+					"(@Readonly Object)\n" +
+					"(@ReadOnly String)\n" +
+					"(@Readonly Object)\n" +
+					"(@Readonly int) 10;\n" +
+					"}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class Clazz {\n" + 
+		"  public Clazz() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" + 
+		"    int x;\n" + 
+		"    x = (Integer) (@Readonly Object) (@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @Normal(Value = 0) [][]) (@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @SingleMember(0) [][]) (@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @Marker [][]) (@Readonly Object) (@Readonly HashMap<@Positive Integer, @Negative Integer>[] @Normal(Value = 0) [][]) (@Readonly HashMap<@Positive Integer, @Negative Integer>[] @SingleMember(0) [][]) (@Readonly HashMap<@Positive Integer, @Negative Integer>[] @Marker [][]) (@Readonly Object) (@Readonly String[] @Normal(Value = 0) [][]) (@Readonly String[] @SingleMember(0) [][]) (@Readonly String[] @Marker [][]) (@Readonly Object) (@Readonly int[] @Normal(Value = 0) [][]) (@Readonly int[] @SingleMember(0) [][]) (@Readonly int[] @Marker [][]) (@Readonly Object) (@Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator) (@Readonly Object) (@Readonly HashMap<@Positive Integer, @Negative Integer>) (@Readonly Object) (@ReadOnly String) (@Readonly Object) (@Readonly int) 10;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0060", expectedUnitToString);
+}
+//cast expression
+public void test0061() throws IOException {
+	String source = "public class Clazz {\n" +
+					"public static void main(String[] args) {\n" +
+					"int x;\n" +
+					"x = (Integer)\n" +
+					"(Object)\n" +
+					"(@Readonly HashMap<Integer, @Negative Integer>.Iterator[] @Normal(Value=0)[][] )\n" +
+					"(HashMap<@Positive Integer, Integer>.Iterator[] @SingleMember(0)[][] )\n" +
+					"(@Readonly HashMap<Integer, @Negative Integer>.Iterator[] @Marker[][] )\n" +
+					"(Object)\n" +
+					"(@Readonly HashMap<@Positive Integer, Integer>[] @Normal(Value=0)[][] )\n" +
+					"(HashMap<Integer, @Negative Integer>[] @SingleMember(0)[][] )\n" +
+					"(@Readonly HashMap<@Positive Integer, Integer>[] @Marker[][] )\n" +
+					"(Object)\n" +
+					"(@Readonly String[] @Normal(Value=0)[][] )\n" +
+					"(String[] @SingleMember(0)[][] )\n" +
+					"(@Readonly String[] @Marker[][] )\n" +
+					"(Object)\n" +
+					"(@Readonly int[] @Normal(Value=0)[][] )\n" +
+					"(int[] @SingleMember(0)[][] )\n" +
+					"(@Readonly int[] @Marker[][] )\n" +
+					"(Object)\n" +
+					"(@Readonly HashMap<Integer, @Negative Integer>.Iterator)\n" +
+					"(Object)\n" +
+					"(@Readonly HashMap<@Positive Integer, Integer>)\n" +
+					"(Object)\n" +
+					"(@ReadOnly String)\n" +
+					"(Object)\n" +
+					"(@Readonly int) 10;\n" +
+					"}\n" +
+					"}\n";
+	String expectedUnitToString = 
+		"public class Clazz {\n" + 
+		"  public Clazz() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" + 
+		"    int x;\n" + 
+		"    x = (Integer) (Object) (@Readonly HashMap<Integer, @Negative Integer>.Iterator[] @Normal(Value = 0) [][]) (HashMap<@Positive Integer, Integer>.Iterator[] @SingleMember(0) [][]) (@Readonly HashMap<Integer, @Negative Integer>.Iterator[] @Marker [][]) (Object) (@Readonly HashMap<@Positive Integer, Integer>[] @Normal(Value = 0) [][]) (HashMap<Integer, @Negative Integer>[] @SingleMember(0) [][]) (@Readonly HashMap<@Positive Integer, Integer>[] @Marker [][]) (Object) (@Readonly String[] @Normal(Value = 0) [][]) (String[] @SingleMember(0) [][]) (@Readonly String[] @Marker [][]) (Object) (@Readonly int[] @Normal(Value = 0) [][]) (int[] @SingleMember(0) [][]) (@Readonly int[] @Marker [][]) (Object) (@Readonly HashMap<Integer, @Negative Integer>.Iterator) (Object) (@Readonly HashMap<@Positive Integer, Integer>) (Object) (@ReadOnly String) (Object) (@Readonly int) 10;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0061", expectedUnitToString);
+}
+// instanceof checks 
+public void test0062() throws IOException {
+	String source = "public class Clazz {\n" +
+					"public static void main(Object o) {\n" +
+					"if (o instanceof @Readonly String) {\n" +
+					"} else if (o instanceof @Readonly int[] @NonEmpty[][] ) {\n" +
+					"} else if (o instanceof @Readonly String[] @NonEmpty[][] ) {\n" +
+					"} else if (o instanceof @Readonly HashMap<?,?>[] @NonEmpty[][] ) {\n" +
+					"} else if (o instanceof @Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonEmpty[][] ) {\n" +	
+					"} else if (o instanceof @Readonly HashMap<?,?>) {\n" +
+					"} else if (o instanceof @Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator) {\n" +
+					"}\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class Clazz {\n" + 
+		"  public Clazz() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(Object o) {\n" + 
+		"    if ((o instanceof @Readonly String))\n" + 
+		"        {\n" + 
+		"        }\n" + 
+		"    else\n" + 
+		"        if ((o instanceof @Readonly int[] @NonEmpty [][]))\n" + 
+		"            {\n" + 
+		"            }\n" + 
+		"        else\n" + 
+		"            if ((o instanceof @Readonly String[] @NonEmpty [][]))\n" + 
+		"                {\n" + 
+		"                }\n" + 
+		"            else\n" + 
+		"                if ((o instanceof @Readonly HashMap<?, ?>[] @NonEmpty [][]))\n" + 
+		"                    {\n" + 
+		"                    }\n" + 
+		"                else\n" + 
+		"                    if ((o instanceof @Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator[] @NonEmpty [][]))\n" + 
+		"                        {\n" + 
+		"                        }\n" + 
+		"                    else\n" + 
+		"                        if ((o instanceof @Readonly HashMap<?, ?>))\n" + 
+		"                            {\n" + 
+		"                            }\n" + 
+		"                        else\n" + 
+		"                            if ((o instanceof @Readonly HashMap<@Positive Integer, @Negative Integer>.Iterator))\n" + 
+		"                                {\n" + 
+		"                                }\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0062", expectedUnitToString);
+}
+// assorted unclassified 
+public void test0063() throws IOException {
+	String source = "import java.util.HashMap;\n" +
+					"import java.util.Map; \n" +  
+					"\n" +
+					"public class Clazz <@A M extends @B String, @C N extends @D Comparable> extends\n" +
+					"								@E Object implements @F Comparable <@G Object> {\n" +
+					"	\n" +
+					"  Clazz(char[] ...args) { \n" +   
+					"   }\n" +
+					"   \n" +
+					"  int @I[] f @J[], g, h[], i@K[];\n" +
+					"  int @L[][]@M[] f2; \n" +
+					"   \n" +
+					"  Clazz (int @N[] @O... a) {}\n" +
+					" int @R[]@S[] aa() {}\n" +
+					" \n" +
+					" int @T[]@U[]@V[] a () @W[]@X[]@Y[] { return null; }\n" +
+					"   \n" +
+					"  public void main(String @A[] @B ... args) throws @D Exception {\n" +
+					"  	\n" +
+					"       HashMap<@E String, @F String> b1;\n" +
+					"      \n" +
+					"     int b; b = (@G int) 10;\n" +
+					"      \n" +
+					"     char @H[]@I[] ch; ch = (@K char @L[]@M[])(@N char @O[]@P[]) null;\n" +
+					"      \n" +
+					"      int[] i; i = new @Q int @R[10];\n" +
+					"       \n" +
+					"      \n" +
+					"   Integer w; w = new X<@S String, @T Integer>().get(new @U Integer(12));\n" +
+					"    throw new @V Exception(\"test\");\n" +
+					"    boolean c; c  = null instanceof @W String;\n" +
+					"	} \n" +
+					" public <@X X, @Y Y> void foo(X x, Y @Z... y) {  \n" +
+					"	\n" +
+					"}\n" +
+					" \n" +
+					" void foo(Map<? super @A Object, ? extends @B String> m){}\n" +
+					" public int compareTo(Object arg0) {\n" +
+					"     return 0;\n" +
+					" }\n" +
+					"\n" +
+					"}\n" +
+					"class X<@C K, @D T extends @E Object & @F Comparable<? super @G T>> {\n" +
+					"	\n" +
+					"  public Integer get(Integer integer) {\n" +
+					"       return null;\n" +
+					"   }\n" +
+					"}\n";
+					
+					
+	String expectedUnitToString = "import java.util.HashMap;\n" + 
+								  "import java.util.Map;\n" + 
+								  "public class Clazz<@A M extends @B String, @C N extends @D Comparable> extends @E Object implements @F Comparable<@G Object> {\n" + 
+								  "  int @I [] @J [] f;\n" + 
+								  "  int @I [] g;\n" + 
+								  "  int @I [][] h;\n" + 
+								  "  int @I [] @K [] i;\n" + 
+								  "  int @L [][] @M [] f2;\n" + 
+								  "  Clazz(char[]... args) {\n" + 
+								  "    super();\n" + 
+								  "  }\n" + 
+								  "  Clazz(int @N [] @O ... a) {\n" + 
+								  "    super();\n" + 
+								  "  }\n" + 
+								  "  int @R [] @S [] aa() {\n" + 
+								  "  }\n" + 
+								  "  int @T [] @U [] @V [] @W [] @X [] @Y [] a() {\n" + 
+								  "    return null;\n" + 
+								  "  }\n" + 
+								  "  public void main(String @A [] @B ... args) throws @D Exception {\n" + 
+								  "    HashMap<@E String, @F String> b1;\n" + 
+								  "    int b;\n" +
+								  "    b = (@G int) 10;\n" + 
+								  "    char @H [] @I [] ch;\n" +
+								  "    ch = (@K char @L [] @M []) (@N char @O [] @P []) null;\n" + 
+								  "    int[] i;\n" +
+								  "    i = new @Q int @R [10];\n" + 
+								  "    Integer w;\n" +
+								  "    w = new X<@S String, @T Integer>().get(new @U Integer(12));\n" + 
+								  "    throw new @V Exception(\"test\");\n" + 
+								  "    boolean c;\n" +
+								  "    c = (null instanceof @W String);\n" + 
+								  "  }\n" + 
+								  "  public <@X X, @Y Y>void foo(X x, Y @Z ... y) {\n" + 
+								  "  }\n" + 
+								  "  void foo(Map<? super @A Object, ? extends @B String> m) {\n" + 
+								  "  }\n" + 
+								  "  public int compareTo(Object arg0) {\n" + 
+								  "    return 0;\n" + 
+								  "  }\n" + 
+								  "}\n" + 
+								  "class X<@C K, @D T extends @E Object & @F Comparable<? super @G T>> {\n" + 
+								  "  X() {\n" + 
+								  "    super();\n" + 
+								  "  }\n" + 
+								  "  public Integer get(Integer integer) {\n" + 
+								  "    return null;\n" + 
+								  "  }\n" + 
+								  "}\n";
+	// indexing parser avoids creating lots of nodes, so parse tree comes out incorrectly.
+	// this is not bug, but intended behavior - see IndexingParser.newSingleNameReference(char[], long)
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0063", expectedUnitToString);
+}
+//assorted unclassified 
+public void test0064() throws IOException {
+	String source = "class X<T extends @E Object & @F Comparable<? super T>> {}\n";
+	String expectedUnitToString = "class X<T extends @E Object & @F Comparable<? super T>> {\n" + 
+								  "  X() {\n" + 
+								  "    super();\n" + 
+								  "  }\n" + 
+								  "}\n";
+	// indexing parser avoids creating lots of nodes, so parse tree comes out incorrectly.
+	// this is not bug, but intended behavior - see IndexingParser.newSingleNameReference(char[], long)
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test064", expectedUnitToString);
+}
+//type class literal expression
+public void test0066() throws IOException {
+	String source = "public class X {\n" + 
+			"	<T extends Y<@A String @C[][]@B[]> & Cloneable> void foo(T t) {}\n" + 
+			"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  <T extends Y<@A String @C [][] @B []> & Cloneable>void foo(T t) {\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0066", expectedUnitToString);
+}
+//check locations
+public void test0067() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@H String @E[] @F[] @G[] field;\n" + 
+		"	@A Map<@B String, @C List<@D Object>> field2;\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @H String @E [] @F [] @G [] field;\n" + 
+		"  @A Map<@B String, @C List<@D Object>> field2;\n" + 
+		"  @A Map<@B String, @H String @E [] @F [] @G []> field3;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0067", expectedUnitToString);
+}
+//check locations
+public void test0068() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@H String @E[] @F[] @G[] field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @H String @E [] @F [] @G [] field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0068", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 4, locations.size());
+	assertEquals("Wrong location", null, locations.get("@E"));
+	assertEquals("Wrong location", "[ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY]", locations.get("@G"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+}
+//check locations
+public void test0069() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B String, @H String> field3;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B String, @H String> field3;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0069", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 3, locations.size());
+	assertEquals("Wrong location", null, locations.get("@A"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1)]", locations.get("@H"));
+}
+//check locations
+public void test0070() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B String, @H String @E [] @F [] @G []> field3;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0070", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 6, locations.size());
+	assertEquals("Wrong location", null, locations.get("@A"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1)]", locations.get("@E"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), ARRAY, ARRAY]", locations.get("@G"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+}
+//check locations
+public void test0071() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B String, @C List<@H String @E[][] @G[]>> field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B String, @C List<@H String @E [][] @G []>> field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0071", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 6, locations.size());
+	assertEquals("Wrong location", null, locations.get("@A"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1)]", locations.get("@C"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]", locations.get("@E"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), TYPE_ARGUMENT(0), ARRAY, ARRAY]", locations.get("@G"));
+}
+//check locations
+public void test0072() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B String, @C List<@H String @E[][] @G[]>>[] @I[] @J[] field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B String, @C List<@H String @E [][] @G []>>[] @I [] @J [] field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0072", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 8, locations.size());
+	assertEquals("Wrong location", "[ARRAY]", locations.get("@I"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY]", locations.get("@J"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY]", locations.get("@A"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1)]", locations.get("@C"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]", locations.get("@E"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), TYPE_ARGUMENT(0), ARRAY, ARRAY]", locations.get("@G"));
+}
+//check locations
+public void test0073() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B String, @C List<@H String @E[][] @G[]>> @I[][] @J[] field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B String, @C List<@H String @E [][] @G []>> @I [][] @J [] field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0073", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 8, locations.size());
+	assertEquals("Wrong location", null, locations.get("@I"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY]", locations.get("@J"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY]", locations.get("@A"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1)]", locations.get("@C"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]", locations.get("@E"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), TYPE_ARGUMENT(0), ARRAY, ARRAY]", locations.get("@G"));
+}
+//check locations
+public void test0074() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@C List<@H String @E[][] @G[]>, String @B[] @D[]> @I[] @F[] @J[] field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@C List<@H String @E [][] @G []>, String @B [] @D []> @I [] @F [] @J [] field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0074", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 10, locations.size());
+	assertEquals("Wrong location", null, locations.get("@I"));
+	assertEquals("Wrong location", "[ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY]", locations.get("@J"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY]", locations.get("@A"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0)]", locations.get("@C"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0), TYPE_ARGUMENT(0)]", locations.get("@E"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY]", locations.get("@G"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), ARRAY]", locations.get("@D"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1)]", locations.get("@B"));
+}
+//check locations
+public void test0075() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@C List<@H String @E[][] @G[]>, @B List<String [] @D[]>> [] @I[] @F[] @J[] field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@C List<@H String @E [][] @G []>, @B List<String[] @D []>>[] @I [] @F [] @J [] field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0075", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 10, locations.size());
+	assertEquals("Wrong location", "[ARRAY]", locations.get("@I"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY]", locations.get("@J"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, ARRAY]", locations.get("@A"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0)]", locations.get("@C"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0), TYPE_ARGUMENT(0)]", locations.get("@E"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY]", locations.get("@G"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1)]", locations.get("@B"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY, ARRAY, TYPE_ARGUMENT(1), TYPE_ARGUMENT(0), ARRAY]", locations.get("@D"));
+}
+//check locations
+public void test0076() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B String, @C List<@D Object>> field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B String, @C List<@D Object>> field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0076", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 4, locations.size());
+	assertEquals("Wrong location", null, locations.get("@A"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1)]", locations.get("@C"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]", locations.get("@D"));
+}
+//check locations
+public void test0077() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@H String @E[] @F[] @G[] field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @H String @E [] @F [] @G [] field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0077", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 4, locations.size());
+	assertEquals("Wrong location", null, locations.get("@E"));
+	assertEquals("Wrong location", "[ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY]", locations.get("@G"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+}
+//check locations
+public void test0078() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B Comparable<@C Object @D[] @E[] @F[]>, @G List<@H Document>> field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B Comparable<@C Object @D [] @E [] @F []>, @G List<@H Document>> field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0078", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 8, locations.size());
+	assertEquals("Wrong location", null, locations.get("@A"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", locations.get("@C"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0)]", locations.get("@D"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY]", locations.get("@E"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1)]", locations.get("@G"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]", locations.get("@H"));
+}
+//check locations
+public void test0079() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A java.util.Map<@B Comparable<@C Object @D[] @E[] @F[]>, @G List<@H Document>> field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A java.util.Map<@B Comparable<@C Object @D [] @E [] @F []>, @G List<@H Document>> field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0079", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 8, locations.size());
+	assertEquals("Wrong location", null, locations.get("@A"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", locations.get("@C"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0)]", locations.get("@D"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY]", locations.get("@E"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1)]", locations.get("@G"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]", locations.get("@H"));
+}
+//check locations
+public void test0080() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@B Map<? extends Z, ? extends @A Z> field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @B Map<? extends Z, ? extends @A Z> field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0080", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 2, locations.size());
+	assertEquals("Wrong location", null, locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), WILDCARD]", locations.get("@A"));
+}
+//check locations
+public void test0081() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@H java.lang.String @E[] @F[] @G[] field;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @H java.lang.String @E [] @F [] @G [] field;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0081", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 4, locations.size());
+	assertEquals("Wrong location", null, locations.get("@E"));
+	assertEquals("Wrong location", "[ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY]", locations.get("@G"));
+	assertEquals("Wrong location", "[ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+}
+//check locations
+public void test0082() throws IOException {
+	String source = 
+		"public class X {\n" + 
+		"	@A Map<@B java.lang.String, @H java.lang.String @E[] @F[] @G[]> field3;\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  @A Map<@B java.lang.String, @H java.lang.String @E [] @F [] @G []> field3;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	LocationPrinterVisitor visitor = new LocationPrinterVisitor();
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0082", expectedUnitToString, visitor);
+	Map locations = visitor.getLocations();
+	assertEquals("Wrong size", 6, locations.size());
+	assertEquals("Wrong location", null, locations.get("@A"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(0)]", locations.get("@B"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1)]", locations.get("@E"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), ARRAY]", locations.get("@F"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), ARRAY, ARRAY]", locations.get("@G"));
+	assertEquals("Wrong location", "[TYPE_ARGUMENT(1), ARRAY, ARRAY, ARRAY]", locations.get("@H"));
+}
+public void test0083() throws IOException {
+	String source =
+		"@Marker class A {}\n;" +
+		"@Marker class B extends @Marker A {}\n" +
+		"@Marker class C extends @Marker @SingleMember(0) A {}\n" +
+		"@Marker class D extends @Marker @SingleMember(0) @Normal(value = 0) A {}\n" +
+		"@Marker class E extends B {}\n;";
+
+	String expectedUnitToString =
+		"@Marker class A {\n" +
+		"  A() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class B extends @Marker A {\n" +
+		"  B() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class C extends @Marker @SingleMember(0) A {\n" +
+		"  C() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class D extends @Marker @SingleMember(0) @Normal(value = 0) A {\n" +
+		"  D() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class E extends B {\n" +
+		"  E() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0083", expectedUnitToString);
+}
+
+// To test Parser.consumeAdditionalBound() with Type annotations
+public void test0084() throws IOException {
+	String source =
+		"@Marker interface I<@Negative T> {}\n" +
+		"@SingleMember(0) interface J<@Positive T> {}\n" +
+		"@Marker class A implements I<@SingleMember(0) A>, J<@Marker A> {}\n" +
+		"@Normal(value = 1) class X<E extends @Positive A & @Marker I<A> & @Marker @SingleMember(1) J<@Readonly A>>  {\n" +
+		"}";
+	String expectedUnitToString =
+		"@Marker interface I<@Negative T> {\n" +
+		"}\n" +
+		"@SingleMember(0) interface J<@Positive T> {\n" +
+		"}\n" +
+		"@Marker class A implements I<@SingleMember(0) A>, J<@Marker A> {\n" +
+		"  A() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Normal(value = 1) class X<E extends @Positive A & @Marker I<A> & @Marker @SingleMember(1) J<@Readonly A>> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0084", expectedUnitToString );
+}
+
+// To test Parser.consumeAdditionalBound() with Type annotations
+public void test0085() throws IOException {
+	String source =
+		"import java.io.Serializable;\n" +
+		"\n" +
+		"@SingleMember(10) class X<T extends @Marker Serializable & @Normal(value = 10) Runnable, V extends @Marker T> {\n" +
+		"	@Negative T t;\n" +
+		"	@Marker X(@Readonly T t) {\n" +
+		"		this.t = t;\n" +
+		"	}\n" +
+		"	void foo(@Marker X this) {\n" +
+		"		(this == null ? t : t).run();\n" +
+		"		((@Marker V) t).run();\n" +
+		"	}\n" +
+		"	public static void main(@Readonly String @Marker [] args) {\n" +
+		"		new @Marker  X<@Marker A, @Negative A>(new @Marker A()).foo();\n" +
+		"	}\n" +
+		"}\n" +
+		"@Marker class A implements @Marker Serializable, @SingleMember(1) Runnable {\n" +
+		"	public void run() {\n" +
+		"		System.out.print(\"AA\");\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"import java.io.Serializable;\n" +
+		"@SingleMember(10) class X<T extends @Marker Serializable & @Normal(value = 10) Runnable, V extends @Marker T> {\n" +
+		"  @Negative T t;\n" +
+		"  @Marker X(@Readonly T t) {\n" +
+		"    super();\n" +
+		"    this.t = t;\n" +
+		"  }\n" +
+		"  void foo(@Marker X this) {\n" +
+		"    ((this == null) ? t : t).run();\n" +
+		"    ((@Marker V) t).run();\n" +
+		"  }\n" +
+		"  public static void main(@Readonly String @Marker [] args) {\n" +
+		"    new @Marker X<@Marker A, @Negative A>(new @Marker A()).foo();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class A implements @Marker Serializable, @SingleMember(1) Runnable {\n" +
+		"  A() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void run() {\n" +
+		"    System.out.print(\"AA\");\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0085", expectedUnitToString );
+}
+
+// To test Parser.classInstanceCreation() with type annotations
+public void test0086() throws IOException {
+	String source =
+		"class X {\n" +
+		"	@Marker X() {\n" +
+		"		System.out.print(\"new X created\");\n" +
+		"	}\n" +
+		"  	void f() throws @Marker InstantiationException {\n" +
+		"       X testX;\n" +
+		"		testX = new @Readonly @Negative X();\n" +
+		"		Double d;\n" +
+		"		d = new @Marker @Positive Double(1.1);\n" +
+		"     	throw new @Positive @Normal(value = 10) InstantiationException(\"test\");\n" +
+		"   }\n" +
+		"}";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  @Marker X() {\n" +
+		"    super();\n" +
+		"    System.out.print(\"new X created\");\n" +
+		"  }\n" +
+		"  void f() throws @Marker InstantiationException {\n" +
+		"    X testX;\n" +
+		"    testX = new @Readonly @Negative X();\n" +
+		"    Double d;\n" +
+		"    d = new @Marker @Positive Double(1.1);\n" +
+		"    throw new @Positive @Normal(value = 10) InstantiationException(\"test\");\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0086", expectedUnitToString );
+}
+
+// To test Parser.classInstanceCreation() with type annotations
+public void test0087() throws IOException {
+	String source =
+		"class X {\n" +
+		"	@Marker X() {\n" +
+		"		System.out.print(\"new X created\");\n" +
+		"	}\n" +
+		"	@Marker class Inner {\n" +
+		"		@Normal(value = 10) Inner(){\n" +
+		"			System.out.print(\"X.Inner created\");\n" +
+		"		}\n" +
+		"	}\n" +
+		"	public String getString(){\n" +
+		"		return \"hello\";\n" +
+		"	}\n" +
+		"  	void f(@Marker X this) {\n" +
+		"       String testString;\n" +
+		"		testString = new @Readonly @Negative X().getString();\n" +
+		"		X.Inner testInner;\n" +
+		"		testInner = new @Readonly X.Inner();\n" +
+		"		int i;\n" +
+		"		for(i = 0; i < 10; i++)\n" +
+		"			System.out.print(\"test\");\n" +
+		"   }\n" +
+		"}";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  @Marker class Inner {\n" +
+		"    @Normal(value = 10) Inner() {\n" +
+		"      super();\n" +
+		"      System.out.print(\"X.Inner created\");\n" +
+		"    }\n" +
+		"  }\n" +
+		"  @Marker X() {\n" +
+		"    super();\n" +
+		"    System.out.print(\"new X created\");\n" +
+		"  }\n" +
+		"  public String getString() {\n" +
+		"    return \"hello\";\n" +
+		"  }\n" +
+		"  void f(@Marker X this) {\n" +
+		"    String testString;\n" +
+		"    testString = new @Readonly @Negative X().getString();\n" +
+		"    X.Inner testInner;\n" +
+		"    testInner = new @Readonly X.Inner();\n" +
+		"    int i;\n" +
+		"    for (i = 0; (i < 10); i ++) \n" +
+		"      System.out.print(\"test\");\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0087", expectedUnitToString );
+}
+
+// To test Parser.classInstanceCreation() with type annotations
+public void test0088() throws IOException {
+	String source =
+		"import java.io.Serializable;\n" +
+		"class X {\n" +
+		"	public static void main(String[] args) {\n" +
+		"		new @Marker Serializable() {\n" +
+		"		};\n" +
+		"		new @Positive @Marker Serializable() {\n" +
+		"			public long serialVersion;\n" +
+		"		};\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"import java.io.Serializable;\n" +
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    new @Marker Serializable() {\n" +
+		"    };\n" +
+		"    new @Positive @Marker Serializable() {\n" +
+		"      public long serialVersion;\n" +
+		"    };\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0088", expectedUnitToString );
+}
+
+// To test Parser.classInstanceCreation() with type annotations
+public void test0089() throws IOException {
+	String source =
+		"import java.io.Serializable;\n" +
+		"class X<T>{\n" +
+		"	public void f() {\n" +
+		"		X testX;\n" +
+		"		testX = new @Marker @SingleMember(10) X<@Negative Integer>();\n" +
+		"		System.out.print(\"object created\");\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"import java.io.Serializable;\n" +
+		"class X<T> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void f() {\n" +
+		"    X testX;\n" +
+		"    testX = new @Marker @SingleMember(10) X<@Negative Integer>();\n" +
+		"    System.out.print(\"object created\");\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0089", expectedUnitToString );
+}
+
+// To test Parser.classInstanceCreation() with type annotations
+public void test0090() throws IOException {
+	String source =
+		"class X <@Marker T extends @Readonly String> {\n" +
+		"    T foo(T t) {\n" +
+		"        return t;\n" +
+		"    }\n" +
+		"    public static void main(String[] args) {\n" +
+		"        new @Readonly X<String>().baz(\"SUCCESS\");\n" +	// Parser.classInstanceCreation called
+		"    }\n" +
+		"    void baz(final T t) {\n" +
+		"        new @Readonly @Marker Object() {\n" +	// Parser.classInstanceCreation called
+		"            void print() {\n" +
+		"            }\n" +
+		"        }.print();\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X<@Marker T extends @Readonly String> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  T foo(T t) {\n" +
+		"    return t;\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    new @Readonly X<String>().baz(\"SUCCESS\");\n" +
+		"  }\n" +
+		"  void baz(final T t) {\n" +
+		"    new @Readonly @Marker Object() {\n" +
+		"  void print() {\n" +
+		"  }\n" +
+		"}.print();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0090", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithInitializer() with Type Annotations
+public void test0091() throws IOException {
+	String source =
+		"class X <@Marker T extends @Readonly String> {\n" +
+		"    public static void main(String[] args) {\n" +
+		"		int [] x1;\n" +
+		"		x1 = new int @Marker @SingleMember(2) [] {-1, -2};\n" +
+		"       Integer [][] x2;\n" +
+		"		x2 = new @Positive Integer @Marker @SingleMember(3) [] @SingleMember(3) [] {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X<@Marker T extends @Readonly String> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    int[] x1;\n" +
+		"    x1 = new int @Marker @SingleMember(2) []{(- 1), (- 2)};\n" +
+		"    Integer[][] x2;\n" +
+		"    x2 = new @Positive Integer @Marker @SingleMember(3) [] @SingleMember(3) []{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}};\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0091", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithInitializer() with Type Annotations
+public void test0092() throws IOException {
+	String source =
+		"class X {\n" +
+		"	static class T {\n" +
+		"		public @Readonly Object @Normal(value = 10) [] f() {\n" +
+		"			return new @Readonly Object @Normal(value = 10) [] {this, T.this};\n" +
+		"		}\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  static class T {\n" +
+		"    T() {\n" +
+		"      super();\n" +
+		"    }\n" +
+		"    public @Readonly Object @Normal(value = 10) [] f() {\n" +
+		"      return new @Readonly Object @Normal(value = 10) []{this, T.this};\n" +
+		"    }\n" +
+		"  }\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0092", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithInitializer() with Type Annotations
+public void test0093() throws IOException {
+	String source =
+		"class X {\n" +
+		"    public static void main(String[] args) {\n" +
+		"        java.util.Arrays.asList(new @Readonly Object @SingleMember(1) [] {\"1\"});\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    java.util.Arrays.asList(new @Readonly Object @SingleMember(1) []{\"1\"});\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0093", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithInitializer() with Type Annotations
+public void test0094() throws IOException {
+	String source =
+		"class X {\n" +
+		"	public boolean test() {\n" +
+		"		String[] s;\n" +
+		"		s = foo(new @Marker String @SingleMember(1) []{\"hello\"});\n" +
+		"		return s != null;\n" +
+		"	}\n" +
+		"	public <@Marker F> F @SingleMember(1) [] foo(F[] f) {\n" +
+		"		return f;\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public boolean test() {\n" +
+		"    String[] s;\n" +
+		"    s = foo(new @Marker String @SingleMember(1) []{\"hello\"});\n" +
+		"    return (s != null);\n" +
+		"  }\n" +
+		"  public <@Marker F>F @SingleMember(1) [] foo(F[] f) {\n" +
+		"    return f;\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0094", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithInitializer() with Type Annotations
+public void test0095() throws IOException {
+	String source =
+		"import java.util.Arrays;\n" +
+		"import java.util.List;\n" +
+		"@Marker class Deejay {\n" +
+		"	@Marker class Counter<@Marker T> {}\n" +
+		"	public void f(String[] args) {\n" +
+		"		Counter<@Positive Integer> songCounter;\n" +
+		"		songCounter = new Counter<@Positive Integer>();\n" +
+		"		Counter<@Readonly String> genre;\n" +
+		"		genre = new Counter<@Readonly String>();\n" +
+		"		List<@Marker Counter<?>> list1;\n" +
+		"		list1 = Arrays.asList(new @Marker Counter<?> @Normal(value = 2) @Marker [] {songCounter, genre});\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"import java.util.Arrays;\n" +
+		"import java.util.List;\n" +
+		"@Marker class Deejay {\n" +
+		"  @Marker class Counter<@Marker T> {\n" +
+		"    Counter() {\n" +
+		"      super();\n" +
+		"    }\n" +
+		"  }\n" +
+		"  Deejay() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void f(String[] args) {\n" +
+		"    Counter<@Positive Integer> songCounter;\n" +
+		"    songCounter = new Counter<@Positive Integer>();\n" +
+		"    Counter<@Readonly String> genre;\n" +
+		"    genre = new Counter<@Readonly String>();\n" +
+		"    List<@Marker Counter<?>> list1;\n" +
+		"    list1 = Arrays.asList(new @Marker Counter<?> @Normal(value = 2) @Marker []{songCounter, genre});\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0095", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithoutInitializer() with Type Annotations
+public void test0096() throws IOException {
+	String source =
+		"class X <@Marker T extends @Readonly String> {\n" +
+		"    public static void main(String[] args) {\n" +
+		"		int [] x1;\n" +
+		"		x1 = new int @Marker @SingleMember(10) [10];\n" +
+		"       Integer [][] x2;\n" +
+		"		x2 = new @Positive Integer @Marker [10] @Normal(value = 10) [10];\n" +
+		"		char[][] tokens;\n" +
+		"		tokens = new char @SingleMember(0) [0] @Normal(value = 10) @Marker [];\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X<@Marker T extends @Readonly String> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    int[] x1;\n" +
+		"    x1 = new int @Marker @SingleMember(10) [10];\n" +
+		"    Integer[][] x2;\n" +
+		"    x2 = new @Positive Integer @Marker [10] @Normal(value = 10) [10];\n" +
+		"    char[][] tokens;\n" +
+		"    tokens = new char @SingleMember(0) [0] @Normal(value = 10) @Marker [];\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0096", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithoutInitializer() with Type Annotations
+public void test0097() throws IOException {
+	String source =
+		"class X {\n" +
+		"	public @Readonly Object @Normal(value = 10) [] f(@Marker X this) {\n" +
+		"		return new @Readonly Object @Normal(value = 10) [10];\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public @Readonly Object @Normal(value = 10) [] f(@Marker X this) {\n" +
+		"    return new @Readonly Object @Normal(value = 10) [10];\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0097", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithoutInitializer() with Type Annotations
+public void test0098() throws IOException {
+	String source =
+		"class X {\n" +
+		"	public boolean test() {\n" +
+		"		String[] s;\n" +
+		"		s = foo(new @Marker String @SingleMember(1) [10]);\n" +
+		"		return s != null;\n" +
+		"	}\n" +
+		"	public <@Marker F> F @SingleMember(1) [] foo(F[] f) {\n" +
+		"		return f;\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public boolean test() {\n" +
+		"    String[] s;\n" +
+		"    s = foo(new @Marker String @SingleMember(1) [10]);\n" +
+		"    return (s != null);\n" +
+		"  }\n" +
+		"  public <@Marker F>F @SingleMember(1) [] foo(F[] f) {\n" +
+		"    return f;\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0098", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithoutInitializer() with Type Annotations
+public void test0099() throws IOException {
+	String source =
+		"import java.util.Arrays;\n" +
+		"import java.util.List;\n" +
+		"class X<@Marker T> {\n" +
+		"	public void test() {\n" +
+		"		List<@Marker X<?>> a;\n" +
+		"		a = Arrays.asList(new @Marker X<?> @SingleMember(0) [0]);\n" +
+		"		String @Marker [] @SingleMember(1) [] x;\n" +
+		"		x = new @Readonly String @Normal(value = 5) [5] @SingleMember(1) [1];\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"import java.util.Arrays;\n" +
+		"import java.util.List;\n" +
+		"class X<@Marker T> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void test() {\n" +
+		"    List<@Marker X<?>> a;\n" +
+		"    a = Arrays.asList(new @Marker X<?> @SingleMember(0) [0]);\n" +
+		"    String @Marker [] @SingleMember(1) [] x;\n" +
+		"    x = new @Readonly String @Normal(value = 5) [5] @SingleMember(1) [1];\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0099", expectedUnitToString );
+}
+
+// To test Parser.consumeArrayCreationExpressionWithoutInitializer() with Type Annotations
+public void test0100() throws IOException {
+	String source =
+		"import java.util.*;\n" +
+		"class X {\n" +
+		"    public Integer[] getTypes() {\n" +
+		"        List<@Positive Integer> list;\n" +
+		"		 list = new ArrayList<@Positive Integer>();\n" +
+		"        return list == null \n" +
+		"            ? new @Positive Integer @SingleMember(0) [0] \n" +
+		"            : list.toArray(new @Positive Integer @Marker [list.size()]);\n" +
+		"    }\n" +
+		"}";
+	String expectedUnitToString =
+		"import java.util.*;\n" +
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public Integer[] getTypes() {\n" +
+		"    List<@Positive Integer> list;\n" +
+		"    list = new ArrayList<@Positive Integer>();\n" +
+		"    return ((list == null) ? new @Positive Integer @SingleMember(0) [0] : list.toArray(new @Positive Integer @Marker [list.size()]));\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0100", expectedUnitToString );
+}
+
+// To test Parser.consumeCastExpressionWithGenericsArray() with Type Annotations
+public void test0101() throws IOException {
+	String source =
+		"import java.util.*;\n" +
+		"\n" +
+		"@Marker class X {\n" +
+		"    Vector<Object> data;\n" +
+		"    public void t() {\n" +
+		"        Vector<@Readonly Object> v;\n" +
+		" 		 v = (@Marker @SingleMember(0) Vector<@Readonly Object>) data.elementAt(0);\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"import java.util.*;\n" +
+		"@Marker class X {\n" +
+		"  Vector<Object> data;\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void t() {\n" +
+		"    Vector<@Readonly Object> v;\n" +
+		"    v = (@Marker @SingleMember(0) Vector<@Readonly Object>) data.elementAt(0);\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0101", expectedUnitToString );
+}
+
+// To test Parser.consumeCastExpressionWithGenericsArray() with Type Annotations
+// To test Parser.consumeClassHeaderExtends() with Type Annotations
+public void test0102() throws IOException {
+	String source =
+		"class X<E> {\n" +
+		"    X<@Readonly String> bar() {\n" +
+		"    	return (@Marker AX<@Readonly String>) new X<@Readonly String>();\n" +
+		"    }\n" +
+		"    X<@Readonly String> bar(Object o) {\n" +
+		"    	return (@Marker AX<@Readonly String>) o;\n" +
+		"    }\n" +
+		"    X<@Negative E> foo(Object o) {\n" +
+		"    	return (@Marker @Normal(value = 10) AX<@Negative E>) o;\n" +
+		"    }    \n" +
+		"    X<E> baz(Object o) {\n" +
+		"    	return (@Marker AX<E>) null;\n" +
+		"    }\n" +
+		"    X<String> baz2(BX bx) {\n" +
+		"    	return (@Marker @SingleMember(10) X<String>) bx;\n" +
+		"    }\n" +
+		"}\n" +
+		"@Normal(value = 1) class AX<@Marker F> extends @Marker X<@SingleMember(10)F> {}\n" +
+		"@Normal(value = 2) class BX extends @Marker @SingleMember(1) AX<@Readonly String> {}\n";
+	String expectedUnitToString =
+		"class X<E> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  X<@Readonly String> bar() {\n" +
+		"    return (@Marker AX<@Readonly String>) new X<@Readonly String>();\n" +
+		"  }\n" +
+		"  X<@Readonly String> bar(Object o) {\n" +
+		"    return (@Marker AX<@Readonly String>) o;\n" +
+		"  }\n" +
+		"  X<@Negative E> foo(Object o) {\n" +
+		"    return (@Marker @Normal(value = 10) AX<@Negative E>) o;\n" +
+		"  }\n" +
+		"  X<E> baz(Object o) {\n" +
+		"    return (@Marker AX<E>) null;\n" +
+		"  }\n" +
+		"  X<String> baz2(BX bx) {\n" +
+		"    return (@Marker @SingleMember(10) X<String>) bx;\n" +
+		"  }\n" +
+		"}\n" +
+		"@Normal(value = 1) class AX<@Marker F> extends @Marker X<@SingleMember(10) F> {\n" +
+		"  AX() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Normal(value = 2) class BX extends @Marker @SingleMember(1) AX<@Readonly String> {\n" +
+		"  BX() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0102", expectedUnitToString );
+}
+
+// To test Parser.consumeCastExpressionWithGenericsArray() with Type Annotations
+public void test0103() throws IOException {
+	String source =
+		"import java.lang.reflect.Array;\n" +
+		"@Marker class X<@Readonly T> {\n" +
+		"	T @SingleMember(0) [] theArray;\n" +
+		"	public X(Class<T> clazz) {\n" +
+		"		theArray = (@Marker @SingleMember(0) T @Normal(value = 10) []) Array.newInstance(clazz, 10); // Compiler warning\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"import java.lang.reflect.Array;\n" +
+		"@Marker class X<@Readonly T> {\n" +
+		"  T @SingleMember(0) [] theArray;\n" +
+		"  public X(Class<T> clazz) {\n" +
+		"    super();\n" +
+		"    theArray = (@Marker @SingleMember(0) T @Normal(value = 10) []) Array.newInstance(clazz, 10);\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0103", expectedUnitToString );
+}
+
+// To test Parser.consumeCastExpressionWithGenericsArray() with Type Annotations
+public void test0104() throws IOException {
+	String source =
+		"import java.util.*;\n" +
+		"class X {\n" +
+		"    void method(Object o) {\n" +
+		"		 if (o instanceof String[]){\n" +
+		"			 String[] s;\n" +
+		"			 s = (@Marker @Readonly String @Marker []) o;\n" +
+		"		 }\n" +
+		"        if (o instanceof @Readonly List<?>[]) {\n" +
+		"            List<?>[] es;\n" +
+		"			 es = (@Marker List<?> @SingleMember(0) []) o;\n" +
+		"        }\n" +
+		"    }\n" +
+		"}";
+	String expectedUnitToString =
+		"import java.util.*;\n" +
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  void method(Object o) {\n" +
+		"    if ((o instanceof String[]))\n" +
+		"        {\n" +
+		"          String[] s;\n" +
+		"          s = (@Marker @Readonly String @Marker []) o;\n" +
+		"        }\n" +
+		"    if ((o instanceof @Readonly List<?>[]))\n" +
+		"        {\n" +
+		"          List<?>[] es;\n" +
+		"          es = (@Marker List<?> @SingleMember(0) []) o;\n" +
+		"        }\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0104", expectedUnitToString );
+}
+
+
+// To test Parser.consumeCastExpressionWithPrimitiveType() with Type Annotations
+public void test0105() throws IOException {
+	String source =
+		"import java.util.HashMap;\n" +
+		"class X {\n" +
+		"	public static void main(String[] args) {\n" +
+		"		HashMap<Byte, Byte> subst;\n" +
+		"		subst = new HashMap<Byte, Byte>();\n" +
+		"		subst.put((@Marker byte)1, (@Positive byte)1);\n" +
+		"		if (1 + subst.get((@Positive @Normal(value = 10) byte)1) > 0.f) {\n" +
+		"			System.out.println(\"SUCCESS\");\n" +
+		"		}		\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"import java.util.HashMap;\n" +
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    HashMap<Byte, Byte> subst;\n" +
+		"    subst = new HashMap<Byte, Byte>();\n" +
+		"    subst.put((@Marker byte) 1, (@Positive byte) 1);\n" +
+		"    if (((1 + subst.get((@Positive @Normal(value = 10) byte) 1)) > 0.f))\n" +
+		"        {\n" +
+		"          System.out.println(\"SUCCESS\");\n" +
+		"        }\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0105", expectedUnitToString );
+}
+
+// To test Parser.consumeCastExpressionWithPrimitiveType() with Type Annotations
+public void test0106() throws IOException {
+	String source =
+		"class X{\n" +
+		"	private float x, y, z;\n" +
+		"	float magnitude () {\n" +
+		"		return (@Marker @Positive float) Math.sqrt((x*x) + (y*y) + (z*z));\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  private float x;\n" +
+		"  private float y;\n" +
+		"  private float z;\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  float magnitude() {\n" +
+		"    return (@Marker @Positive float) Math.sqrt((((x * x) + (y * y)) + (z * z)));\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0106", expectedUnitToString );
+}
+
+// To test Parser.consumeCastExpressionWithQualifiedGenericsArray() with Type Annotations
+// Javac version b76 crashes on type annotations on type arguments to parameterized classes
+// in a qualified generic reference
+public void test0107() throws IOException {
+	String source =
+		"class C1<T> {\n" +
+		"	class C11 {	}\n" +
+		"	@Marker class C12 {\n" +
+		"		T t;\n" +
+		"		C1<@Readonly T>.C11 m() {\n" +
+		"			C1<@Readonly T>.C11[] ts;\n" +
+		"			ts = (@Marker C1<@Readonly T>.C11[]) new @Marker C1<?>.C11 @Normal(value = 5) [5];\n" +
+		"			return ts;\n" +
+		"		}\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class C1<T> {\n" +
+		"  class C11 {\n" +
+		"    C11() {\n" +
+		"      super();\n" +
+		"    }\n" +
+		"  }\n" +
+		"  @Marker class C12 {\n" +
+		"    T t;\n" +
+		"    C12() {\n" +
+		"      super();\n" +
+		"    }\n" +
+		"    C1<@Readonly T>.C11 m() {\n" +
+		"      C1<@Readonly T>.C11[] ts;\n" +
+		"      ts = (@Marker C1<@Readonly T>.C11[]) new @Marker C1<?>.C11 @Normal(value = 5) [5];\n" +
+		"      return ts;\n" +
+		"    }\n" +
+		"  }\n" +
+		"  C1() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0107", expectedUnitToString );
+}
+
+// To test Parser.consumeFormalParameter() with Type Annotations
+public void test0108() throws IOException {
+	String source =
+		"class X {\n" +
+		"	int field;" +
+		"	public void test(@Marker X x,@Positive int i){\n" +
+		"		x.field = i;\n" +
+		"	}\n" +
+		"	public static void main(@Readonly String args @Normal(10) []){" +
+		"		System.exit(0);\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  int field;\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void test(@Marker X x, @Positive int i) {\n" +
+		"    x.field = i;\n" +
+		"  }\n" +
+		"  public static void main(@Readonly String @Normal(10) [] args) {\n" +
+		"    System.exit(0);\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0108", expectedUnitToString );
+}
+
+// To test Parser.consumeFormalParameter() with Type Annotations
+public void test0109() throws IOException {
+	String source =
+		"class X<@Marker T> {\n" +
+		"	T field;" +
+		"	public void test(@Marker @SingleMember(1) X<? extends @Marker Object> x,@Positive T i){\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X<@Marker T> {\n" +
+		"  T field;\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void test(@Marker @SingleMember(1) X<? extends @Marker Object> x, @Positive T i) {\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0109", expectedUnitToString );
+}
+
+// To test Parser.consumeClassInstanceCreationExpressionQualifiedWithTypeArguments()
+// with Type Annotations
+// Javac b76 crashes with type annotations in qualified class instance creation expression
+public void test0110() throws IOException {
+	String source =
+		"class X {\n" +
+		"	class MX {\n" +
+		"		@Marker <T> MX(T t){\n" +
+		"			System.out.println(t);\n" +
+		"		}\n" +
+		"	}\n" +
+		"	public static void main(String[] args) {\n" +
+		"		new @Marker @SingleMember(10) X().new <@Readonly String> @Marker MX(\"SUCCESS\");\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+			"class X {\n" +
+			"  class MX {\n" +
+			"    @Marker <T>MX(T t) {\n" +
+			"      super();\n" +
+			"      System.out.println(t);\n" +
+			"    }\n" +
+			"  }\n" +
+			"  X() {\n" +
+			"    super();\n" +
+			"  }\n" +
+			"  public static void main(String[] args) {\n" +
+			"    new @Marker @SingleMember(10) X().new <@Readonly String>@Marker MX(\"SUCCESS\");\n" +
+			"  }\n" +
+			"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0110", expectedUnitToString);
+}
+
+// To test Parser.consumeClassInstanceCreationExpressionWithTypeArguments()
+// with Type Annotations
+public void test0111() throws IOException {
+	String source =
+		"class X {\n" +
+		"	public <T> X(T t){\n" +
+		"		System.out.println(t);\n" +
+		"	}\n" +
+		"	public static void main(String[] args) {\n" +
+		"		new <@Readonly String> @Marker @SingleMember(0) X(\"SUCCESS\");\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString =
+			"class X {\n" +
+			"  public <T>X(T t) {\n" +
+			"    super();\n" +
+			"    System.out.println(t);\n" +
+			"  }\n" +
+			"  public static void main(String[] args) {\n" +
+			"    new <@Readonly String>@Marker @SingleMember(0) X(\"SUCCESS\");\n" +
+			"  }\n" +
+			"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0111", expectedUnitToString);
+}
+
+// To test Parser.consumeEnhancedForStatementHeaderInit() with Type Annotations
+public void test0112() throws IOException {
+	String source =
+		"import java.util.*;\n" +
+		"class X {\n" +
+		"   List list() { return null; }\n" +
+		"   void m2() { for (@SingleMember(10) Iterator<@Marker X> i = list().iterator(); i.hasNext();); }\n" +
+		"	void m3() {\n" +
+		"		Integer [] array;\n" +
+		"		array = new Integer [] {1, 2, 3};\n" +
+		"		List<List<X>> xList;\n" +
+		"		xList = null;\n" +
+		"		for(@Positive @SingleMember(10) Integer i: array) {}\n" +
+		"		for(@Marker @Normal(value = 5) List<@Readonly X> x: xList) {}\n" +
+		"	}" +
+		"}\n";
+	String expectedUnitToString =
+		"import java.util.*;\n" +
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  List list() {\n" +
+		"    return null;\n" +
+		"  }\n" +
+		"  void m2() {\n" +
+		"    for (@SingleMember(10) Iterator<@Marker X> i = list().iterator();; i.hasNext(); ) \n" +
+		"      ;\n" +
+		"  }\n" +
+		"  void m3() {\n" +
+		"    Integer[] array;\n" +
+		"    array = new Integer[]{1, 2, 3};\n" +
+		"    List<List<X>> xList;\n" +
+		"    xList = null;\n" +
+		"    for (@Positive @SingleMember(10) Integer i : array) \n" +
+		"      {\n" +
+		"      }\n" +
+		"    for (@Marker @Normal(value = 5) List<@Readonly X> x : xList) \n" +
+		"      {\n" +
+		"      }\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_COMPLETION_PARSER & ~CHECK_SELECTION_PARSER & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0112", expectedUnitToString );
+	expectedUnitToString =
+		"import java.util.*;\n" +
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  List list() {\n" +
+		"    return null;\n" +
+		"  }\n" +
+		"  void m2() {\n" +
+		"    for (@SingleMember(10) Iterator<@Marker X> i;; i.hasNext(); ) \n" +
+		"      ;\n" +
+		"  }\n" +
+		"  void m3() {\n" +
+		"    Integer[] array;\n" +
+		"    array = new Integer[]{1, 2, 3};\n" +
+		"    List<List<X>> xList;\n" +
+		"    xList = null;\n" +
+		"    for (@Positive @SingleMember(10) Integer i : array) \n" +
+		"      {\n" +
+		"      }\n" +
+		"    for (@Marker @Normal(value = 5) List<@Readonly X> x : xList) \n" +
+		"      {\n" +
+		"      }\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_COMPLETION_PARSER & CHECK_SELECTION_PARSER, source.toCharArray(), null, "test0112", expectedUnitToString );
+}
+
+// To test Parser.consumeEnterAnonymousClassBody() with Type Annotations
+public void test0113() throws IOException {
+	String source =
+		"@Marker class X {\n" +
+		"  void f(@Normal(value = 5) X this) {\n" +
+		"    new @Marker @SingleMember(10) Object() {\n" +
+		"      void foo(){\n" +
+		"        System.out.println(\"test\");\n" +
+		"      }\n" +
+		"    }.foo();\n" +
+		"  }\n" +
+		"}";
+	String expectedUnitToString =
+		"@Marker class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  void f(@Normal(value = 5) X this) {\n" +
+		"    new @Marker @SingleMember(10) Object() {\n" +
+		"  void foo() {\n" +
+		"    System.out.println(\"test\");\n" +
+		"  }\n" +
+		"}.foo();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_DOCUMENT_ELEMENT_PARSER, source.toCharArray(), null, "test0113", expectedUnitToString );
+}
+
+// To test Parser.consumeEnterAnonymousClassBody() with Type Annotations
+public void test0114() throws IOException {
+	String source =
+		"class Toplevel2{\n" +
+		"    public boolean foo(){\n" +
+		"    Toplevel2 o;\n" +
+		"	 o = new @Marker @Normal(value = 5) Toplevel2() { \n" +
+		"              public boolean foo() {  return false; }  // no copy in fact\n" +
+		"              };\n" +
+		"    return o.foo();\n" +
+		"  }\n" +
+		"}";
+	String expectedUnitToString =
+		"class Toplevel2 {\n" +
+		"  Toplevel2() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public boolean foo() {\n" +
+		"    Toplevel2 o;\n" +
+		"    o = new @Marker @Normal(value = 5) Toplevel2() {\n" +
+		"  public boolean foo() {\n" +
+		"    return false;\n" +
+		"  }\n" +
+		"};\n" +
+		"    return o.foo();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_DOCUMENT_ELEMENT_PARSER, source.toCharArray(), null, "test0114", expectedUnitToString );
+}
+
+// To test Parser.consumeEnterAnonymousClassBody() with Type Annotations
+public void test0115() throws IOException {
+	String source =
+		"class X <T> {\n" +
+		"    T foo(T t) {\n" +
+		"        System.out.println(t);\n" +
+		"        return t;\n" +
+		"    }\n" +
+		"    public static void main(String @Normal(value =  5) [] args) {\n" +
+		"        new @Marker X<@SingleMember(10) @Normal(value = 5) XY>() {\n" +
+		"            void run() {\n" +
+		"                foo(new @Marker XY());\n" +
+		"            }\n" +
+		"        }.run();\n" +
+		"    }\n" +
+		"}\n" +
+		"@Marker class XY {\n" +
+		"    public String toString() {\n" +
+		"        return \"SUCCESS\";\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X<T> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  T foo(T t) {\n" +
+		"    System.out.println(t);\n" +
+		"    return t;\n" +
+		"  }\n" +
+		"  public static void main(String @Normal(value = 5) [] args) {\n" +
+		"    new @Marker X<@SingleMember(10) @Normal(value = 5) XY>() {\n" +
+		"  void run() {\n" +
+		"    foo(new @Marker XY());\n" +
+		"  }\n" +
+		"}.run();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class XY {\n" +
+		"  XY() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public String toString() {\n" +
+		"    return \"SUCCESS\";\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_DOCUMENT_ELEMENT_PARSER, source.toCharArray(), null, "test0115", expectedUnitToString );
+}
+
+// To test Parser.consumeInsideCastExpressionLL1() with Type Annotations
+public void test0116() throws IOException {
+	String source =
+		"class X{\n" +
+		"  public void test1(){\n" +
+		"    throw (@Marker Error) null; \n" +
+		"  }  \n" +
+		"  public void test2(){\n" +
+		"    String s;\n" +
+		"	 s = (@Marker @SingleMember(10) String) null;\n" +
+		"	 byte b;\n" +
+		"	 b = 0;\n" +
+		"	 Byte i;\n" +
+		"	 i = (@Positive Byte) b;\n" +
+		"  }  \n" +
+		"  public void test3(java.io.Serializable name) {\n" +
+		"     Object temp;\n" +
+		"	  temp = (Object)name;\n" +
+		"     System.out.println( (String)temp );\n" +
+		"  }\n" +
+		"}";
+	String expectedUnitToString =
+		"class X {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void test1() {\n" +
+		"    throw (@Marker Error) null;\n" +
+		"  }\n" +
+		"  public void test2() {\n" +
+		"    String s;\n" +
+		"    s = (@Marker @SingleMember(10) String) null;\n" +
+		"    byte b;\n" +
+		"    b = 0;\n" +
+		"    Byte i;\n" +
+		"    i = (@Positive Byte) b;\n" +
+		"  }\n" +
+		"  public void test3(java.io.Serializable name) {\n" +
+		"    Object temp;\n" +
+		"    temp = (Object) name;\n" +
+		"    System.out.println((String) temp);\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0116", expectedUnitToString );
+}
+
+// To test Parser.consumeInstanceOfExpression() with Type Annotations
+public void test0117() throws IOException {
+	String source =
+		"import java.util.*;\n" +
+		"class X <@NonNull T>{\n" +
+		" 	public void test1(Object obj) {\n" +
+		"   	if(obj instanceof @Marker @NonNull X) {\n" +
+		"		 	X newX;\n" +
+		"		 	newX = (@NonNull X) obj;\n" +
+		"	 }\n" +
+		"   }\n" +
+		"	@NonNull T foo(@NonNull T t) {\n" +
+		"       if (t instanceof @NonNull @Marker List<?> @Normal(value = 10) []) {\n" +
+		"           List<?> @SingleMember (10) [] es;\n" +
+		"			es = (@Marker List<?> @SingleMember(10) []) t;\n" +
+		"       }\n" +
+		"		if (t instanceof @Marker @Normal(value = 5) X<?>) {\n" +
+		"			return t;\n" +
+		"		}\n" +
+		"		return t;\n" +
+		"	}\n" +
+		"}";
+	String expectedUnitToString =
+		"import java.util.*;\n" +
+		"class X<@NonNull T> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public void test1(Object obj) {\n" +
+		"    if ((obj instanceof @Marker @NonNull X))\n" +
+		"        {\n" +
+		"          X newX;\n" +
+		"          newX = (@NonNull X) obj;\n" +
+		"        }\n" +
+		"  }\n" +
+		"  @NonNull T foo(@NonNull T t) {\n" +
+		"    if ((t instanceof @NonNull @Marker List<?> @Normal(value = 10) []))\n" +
+		"        {\n" +
+		"          List<?> @SingleMember(10) [] es;\n" +
+		"          es = (@Marker List<?> @SingleMember(10) []) t;\n" +
+		"        }\n" +
+		"    if ((t instanceof @Marker @Normal(value = 5) X<?>))\n" +
+		"        {\n" +
+		"          return t;\n" +
+		"        }\n" +
+		"    return t;\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER , source.toCharArray(), null, "test0117", expectedUnitToString );
+}
+
+// To test Parser.consumeInstanceOfExpressionWithName() with Type Annotations
+public void test0118() throws IOException {
+	String source =
+		"class Outer<E> {\n" +
+		"  Inner inner;\n" +
+		"  class Inner {\n" +
+		"    E e;\n" +
+		"    @NonNull E getOtherElement(Object other) {\n" +
+		"      if (!(other instanceof @Marker @SingleMember(10) Outer<?>.Inner))\n" +
+		"       throw new @Marker IllegalArgumentException(String.valueOf(other));\n" +
+		"      Inner that;\n" +
+		"	   that = (@Marker Inner) other;\n" +
+		"      return that.e;\n" +
+		"    }\n" +
+		"  }\n" +
+		"}";
+	String expectedUnitToString =
+		"class Outer<E> {\n" +
+		"  class Inner {\n" +
+		"    E e;\n" +
+		"    Inner() {\n" +
+		"      super();\n" +
+		"    }\n" +
+		"    @NonNull E getOtherElement(Object other) {\n" +
+		"      if ((! (other instanceof @Marker @SingleMember(10) Outer<?>.Inner)))\n" +
+		"          throw new @Marker IllegalArgumentException(String.valueOf(other));\n" +
+		"      Inner that;\n" +
+		"      that = (@Marker Inner) other;\n" +
+		"      return that.e;\n" +
+		"    }\n" +
+		"  }\n" +
+		"  Inner inner;\n" +
+		"  Outer() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER , source.toCharArray(), null, "test0118", expectedUnitToString );
+}
+
+// To test Parser.consumeTypeArgument() with Type Annotations
+public void test0119() throws IOException {
+	String source =
+		"class X<@SingleMember(1) Xp1 extends @Readonly String, @NonNull Xp2 extends @NonNull Comparable>  extends @Marker XS<@SingleMember(10) Xp2> {\n" +
+		"\n" +
+		"    public static void main(String @Marker [] args) {\n" +
+		"        Integer w;\n" +
+		"        w = new @Marker X<@Readonly @SingleMember(10) String,@Positive Integer>().get(new @Positive Integer(12));\n" +
+		"        System.out.println(\"SUCCESS\");\n" +
+		"	 }\n" +
+		"    Xp2 get(@Marker X this, Xp2 t) {\n" +
+		"        System.out.print(\"{X::get}\");\n" +
+		"        return super.get(t);\n" +
+		"    }\n" +
+		"}\n" +
+		"@Marker class XS <@NonNull XSp1> {\n" +
+		"    XSp1 get(XSp1 t) {\n" +
+		"		 @NonNull @SingleMember(10) Y.M mObject;\n" +
+		"		 mObject = new @SingleMember(10) @NonNull Y.M();\n" +
+		"        System.out.print(\"{XS::get}\");\n" +
+		"        return t;\n" +
+		"    }\n" +
+		"}\n" +
+		"class X2<T,E>{}\n" +
+		"@Marker class Y extends @Marker X2<@NonNull Y.M, @NonNull @SingleMember(1) Y.N> {\n" +
+		"	static class M{}\n" +
+		"	static class N extends M{}\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X<@SingleMember(1) Xp1 extends @Readonly String, @NonNull Xp2 extends @NonNull Comparable> extends @Marker XS<@SingleMember(10) Xp2> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String @Marker [] args) {\n" +
+		"    Integer w;\n" +
+		"    w = new @Marker X<@Readonly @SingleMember(10) String, @Positive Integer>().get(new @Positive Integer(12));\n" +
+		"    System.out.println(\"SUCCESS\");\n" +
+		"  }\n" +
+		"  Xp2 get(@Marker X this, Xp2 t) {\n" +
+		"    System.out.print(\"{X::get}\");\n" +
+		"    return super.get(t);\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class XS<@NonNull XSp1> {\n" +
+		"  XS() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  XSp1 get(XSp1 t) {\n" +
+		"    @NonNull @SingleMember(10) Y.M mObject;\n" +
+		"    mObject = new @SingleMember(10) @NonNull Y.M();\n" +
+		"    System.out.print(\"{XS::get}\");\n" +
+		"    return t;\n" +
+		"  }\n" +
+		"}\n" +
+		"class X2<T, E> {\n" +
+		"  X2() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class Y extends @Marker X2<@NonNull Y.M, @NonNull @SingleMember(1) Y.N> {\n" +
+		"  static class M {\n" +
+		"    M() {\n" +
+		"      super();\n" +
+		"    }\n" +
+		"  }\n" +
+		"  static class N extends M {\n" +
+		"    N() {\n" +
+		"      super();\n" +
+		"    }\n" +
+		"  }\n" +
+		"  Y() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0119", expectedUnitToString );
+}
+
+// To test Parser.consumeTypeArgument() with Type Annotations
+public void test0120() throws IOException {
+	String source =
+		"class X<A1, A2, A3, A4, A5, A6, A7, A8> {\n" +
+		"}\n" +
+		"class Y {\n" +
+		"	@Marker X<int @Marker [], short @SingleMember(1) [] @Marker [], long[] @NonNull [][], float[] @Marker [] @Normal(value = 5) [][], double[][]@Marker [] @SingleMember(10) [][], boolean[][][][][][], char[] @Marker [][][][][][], Object[][]@Marker [] @SingleMember(10) [] @Normal(value = 5) [][][][][]> x;\n" +
+		"}\n";
+	String expectedUnitToString =
+		"class X<A1, A2, A3, A4, A5, A6, A7, A8> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"class Y {\n" +
+		"  @Marker X<int @Marker [], short @SingleMember(1) [] @Marker [], long[] @NonNull [][], float[] @Marker [] @Normal(value = 5) [][], double[][] @Marker [] @SingleMember(10) [][], boolean[][][][][][], char[] @Marker [][][][][][], Object[][] @Marker [] @SingleMember(10) [] @Normal(value = 5) [][][][][]> x;\n" +
+		"  Y() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0120", expectedUnitToString );
+}
+
+// To test Parser.consumeTypeArgumentReferenceType1() with Type Annotations
+public void test0121() throws IOException {
+	String source =
+		"@Marker class X <@NonNull T> {\n" +
+		"    protected T t;\n" +
+		"    @Marker X(@NonNull T t) {\n" +
+		"        this.t = t;\n" +
+		"    }\n" +
+		"    public static void main(String[] args) {\n" +
+		"	  X<@Marker X<@Readonly @NonNull String>> xs;\n" +
+		"	  xs = new @Marker X<@Marker X<@Readonly @NonNull String>>(new @Marker X<@Readonly @NonNull @SingleMember(10) String>(\"SUCCESS\"));\n" +
+		"	  System.out.println(xs.t.t);\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"@Marker class X<@NonNull T> {\n" +
+		"  protected T t;\n" +
+		"  @Marker X(@NonNull T t) {\n" +
+		"    super();\n" +
+		"    this.t = t;\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    X<@Marker X<@Readonly @NonNull String>> xs;\n" +
+		"    xs = new @Marker X<@Marker X<@Readonly @NonNull String>>(new @Marker X<@Readonly @NonNull @SingleMember(10) String>(\"SUCCESS\"));\n" +
+		"    System.out.println(xs.t.t);\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_INDEXING_PARSER, source.toCharArray(), null, "test0121", expectedUnitToString );
+}
+
+// To test Parser.consumeTypeParameter1WithExtendsAndBounds() and Parser.consumeWildcardBoundsSuper() with
+// Type Annotations
+public void test0122() throws IOException {
+	String source =
+		"@Marker class Foo extends @Marker Foo1 implements @Marker @SingleMember(10) Comparable<@Marker Foo1> {\n" +
+		"	public int compareTo(Foo1 arg0) {\n" +
+		"		return 0;\n" +
+		"	}\n" +
+		"}\n" +
+		"class Foo1 {}\n" +
+		"@Marker class X<@NonNull T extends @NonNull @Normal (value = 5) Object & @Marker Comparable<? super @NonNull T>> {\n" +
+		"    public static void main(String[] args) {\n" +
+		"        new @Marker @SingleMember(10) X<@Marker Foo>();\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"@Marker class Foo extends @Marker Foo1 implements @Marker @SingleMember(10) Comparable<@Marker Foo1> {\n" +
+		"  Foo() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public int compareTo(Foo1 arg0) {\n" +
+		"    return 0;\n" +
+		"  }\n" +
+		"}\n" +
+		"class Foo1 {\n" +
+		"  Foo1() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class X<@NonNull T extends @NonNull @Normal(value = 5) Object & @Marker Comparable<? super @NonNull T>> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    new @Marker @SingleMember(10) X<@Marker Foo>();\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0122", expectedUnitToString );
+}
+
+// To test Parser.consumeTypeParameter1WithExtendsAndBounds() with Type Annotations
+public void test0123() throws IOException {
+	String source =
+		"@Marker class Foo extends @Marker Foo1 implements @Marker @SingleMember(10) Comparable {\n" +
+		"	public int compareTo(Object arg0) {\n" +
+		"		return 0;\n" +
+		"	}\n" +
+		"}\n" +
+		"class Foo1 {}\n" +
+		"@Marker class X<@NonNull T extends @NonNull @Normal (value = 5) Object & @Marker Comparable, @NonNull V extends @Readonly Object> {\n" +
+		"    public static void main(String[] args) {\n" +
+		"        new @Marker @SingleMember(10) X<@Marker Foo, @SingleMember(0) Foo1>();\n" +
+		"		 Class <@NonNull Foo> c;\n" +
+		"    }\n" +
+		"}\n";
+	String expectedUnitToString =
+		"@Marker class Foo extends @Marker Foo1 implements @Marker @SingleMember(10) Comparable {\n" +
+		"  Foo() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public int compareTo(Object arg0) {\n" +
+		"    return 0;\n" +
+		"  }\n" +
+		"}\n" +
+		"class Foo1 {\n" +
+		"  Foo1() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"}\n" +
+		"@Marker class X<@NonNull T extends @NonNull @Normal(value = 5) Object & @Marker Comparable, @NonNull V extends @Readonly Object> {\n" +
+		"  X() {\n" +
+		"    super();\n" +
+		"  }\n" +
+		"  public static void main(String[] args) {\n" +
+		"    new @Marker @SingleMember(10) X<@Marker Foo, @SingleMember(0) Foo1>();\n" +
+		"    Class<@NonNull Foo> c;\n" +
+		"  }\n" +
+		"}\n";
+	checkParse(source.toCharArray(), null, "test0123", expectedUnitToString );
+}
+//To test type annotations on static class member access in a declaration
+public void test0125() throws IOException {
+	String source =
+		"public class X extends @A(\"Hello, World!\") Y<@B @C('(') String[] @D[]> {}";
+	String expectedUnitToString =
+		"public class X extends @A(\"Hello, World!\") Y<@B @C(\'(\') String[] @D []> {\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0125", expectedUnitToString );
+}
+//To test type annotations on static class member access in a declaration
+public void test0126() throws IOException {
+	String source =
+		"public class X {\n" +
+		"	@A(\"Hello, World!\") @B @C('(') String@E[] @D[] f;\n" +
+		"}";
+	String expectedUnitToString =
+		"public class X {\n" + 
+		"  @A(\"Hello, World!\") @B @C(\'(\') String @E [] @D [] f;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0126", expectedUnitToString );
+}
+//To test type annotations on static class member access in a declaration
+public void test0127() throws IOException {
+	String source =
+		"public class X {\n" +
+		"	@A(\"Hello, World!\") Y<@B @C('(') String[] @D[]> f;\n" +
+		"}";
+	String expectedUnitToString =
+		"public class X {\n" + 
+		"  @A(\"Hello, World!\") Y<@B @C(\'(\') String[] @D []> f;\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0127", expectedUnitToString );
+}
+//type class literal expression
+public void test0128() throws IOException {
+	String source = 
+	"public class X {\n" + 
+	"	public boolean foo(String s) {\n" + 
+	"		return (s instanceof @C('_') Object[]);\n" + 
+	"	}\n" + 
+	"	public Object foo1(String s) {\n" + 
+	"		return new @B(3) @A(\"new Object\") Object[] {};\n" + 
+	"	}\n" + 
+	"	public Class foo2(String s) {\n" + 
+	"		return null;\n" + 
+	"	}\n" + 
+	"	public Class foo3(String s) {\n" + 
+	"		return null;\n" + 
+	"	}\n" + 
+	"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public boolean foo(String s) {\n" + 
+		"    return (s instanceof @C(\'_\') Object[]);\n" + 
+		"  }\n" + 
+		"  public Object foo1(String s) {\n" + 
+		"    return new @B(3) @A(\"new Object\") Object[]{};\n" + 
+		"  }\n" + 
+		"  public Class foo2(String s) {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"  public Class foo3(String s) {\n" + 
+		"    return null;\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0128", expectedUnitToString );
+}
+//instanceof checks 
+public void test0129() throws IOException {
+	String source = "public class Clazz {\n" +
+					"public static void main(Object o) {\n" +
+					"if (o instanceof @Readonly String) {\n" +
+					"}\n" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class Clazz {\n" + 
+		"  public Clazz() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(Object o) {\n" + 
+		"    if ((o instanceof @Readonly String))\n" + 
+		"        {\n" + 
+		"        }\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0129", expectedUnitToString);
+}
+//instanceof checks 
+public void test0130() throws IOException {
+	String source = "public class Clazz {\n" +
+					"public static void foo() {\n" +
+					"	if (o instanceof @Readonly String[]) {}" +
+					"}\n" +
+					"}";
+	String expectedUnitToString = 
+		"public class Clazz {\n" + 
+		"  public Clazz() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void foo() {\n" + 
+		"    if ((o instanceof @Readonly String[]))\n" + 
+		"        {\n" + 
+		"        }\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_ALL & ~CHECK_JAVAC_PARSER, source.toCharArray(), null, "test0130", expectedUnitToString);
+}
+//cast
+public void test0131() throws IOException {
+	String source =
+		"public class X {\n" + 
+		"	public void foo(Object o) {\n" + 
+		"		if (o instanceof String[][]) {\n" +
+		"			String[][] tab = (@C('_') @B(3) String[] @A[]) o;\n" +
+		"			System.out.println(tab.length);\n" +
+		"		}\n" + 
+		"		System.out.println(o);\n" +
+		"	}\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo(Object o) {\n" + 
+		"    if ((o instanceof String[][]))\n" + 
+		"        {\n" + 
+		"          String[][] tab = (@C(\'_\') @B(3) String[] @A []) o;\n" + 
+		"          System.out.println(tab.length);\n" + 
+		"        }\n" + 
+		"    System.out.println(o);\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0130", expectedUnitToString);
+}
+//cast
+public void test0132() throws IOException {
+	String source =
+		"public class X {\n" + 
+		"	public void foo(Object o) {\n" + 
+		"		if (o instanceof String[][]) {\n" +
+		"			String[][] tab = (@C('_') @B(3) String@D[] @A[]) o;\n" +
+		"			System.out.println(tab.length);\n" +
+		"		}\n" + 
+		"		System.out.println(o);\n" +
+		"	}\n" + 
+		"}";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public void foo(Object o) {\n" + 
+		"    if ((o instanceof String[][]))\n" + 
+		"        {\n" + 
+		"          String[][] tab = (@C(\'_\') @B(3) String @D [] @A []) o;\n" + 
+		"          System.out.println(tab.length);\n" + 
+		"        }\n" + 
+		"    System.out.println(o);\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0130", expectedUnitToString);
+}
+//generic type arguments in a generic method invocation
+public void test0133() throws IOException {
+	String source =
+		"public class X {\n" +
+		"	static <T, U> T foo(T t, U u) {\n" +
+		"		return t;\n" +
+		"	}\n" +
+		"	public static void main(String[] args) {\n" +
+		"		System.out.println(X.<@D() @A(value = \"hello\") String, @B X>foo(\"SUCCESS\", null));\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  static <T, U>T foo(T t, U u) {\n" + 
+		"    return t;\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" + 
+		"    System.out.println(X.<@D() @A(value = \"hello\") String, @B X>foo(\"SUCCESS\", null));\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0130", expectedUnitToString);
+}
+//generic type arguments in a generic method invocation
+public void test0134() throws IOException {
+	String source =
+		"public class X {\n" +
+		"\n" +
+		"	<T, U> T foo(T t, U u) {\n" +
+		"		return t;\n" +
+		"	}\n" +
+		"	public static void main(String[] args) {\n" +
+		"		X x = new X();\n" +
+		"		System.out.println(x.<@D() @A(value = \"hello\") String, @B X>foo(\"SUCCESS\", null));\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  public X() {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  <T, U>T foo(T t, U u) {\n" + 
+		"    return t;\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" +
+		"    X x = new X();\n" +
+		"    System.out.println(x.<@D() @A(value = \"hello\") String, @B X>foo(\"SUCCESS\", null));\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0130", expectedUnitToString);
+}
+//generic type arguments in a generic constructor invocation
+public void test0135() throws IOException {
+	String source =
+		"public class X {\n" +
+		"	<T, U> X(T t, U u) {\n" +
+		"	}\n" +
+		"	public static void main(String[] args) {\n" +
+		"		X x = new <@D() @A(value = \"hello\") String, @B X> X();\n" +
+		"		System.out.println(x);\n" +
+		"	}\n" +
+		"}\n";
+	String expectedUnitToString = 
+		"public class X {\n" + 
+		"  <T, U>X(T t, U u) {\n" + 
+		"    super();\n" + 
+		"  }\n" + 
+		"  public static void main(String[] args) {\n" + 
+		"    X x = new <@D() @A(value = \"hello\") String, @B X>X();\n" + 
+		"    System.out.println(x);\n" + 
+		"  }\n" + 
+		"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0130", expectedUnitToString);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383600 -- Receiver annotation - new syntax.
+public void test0136() throws IOException {
+	String source =
+			"public class X<T> {\n" +
+			"  public class Y<K> {\n" +
+			"    void foo(@Marker X<T> this) {\n" +
+			"    }\n" +
+			"    public class Z {\n" +
+			"      Z(@D() @A(value = \"hello\") X<T>.Y<K> X.Y.this) {\n" +
+			"      }\n" +
+			"    }\n" +
+			"  }\n" +
+			"  public static void main(String[] args) {\n" +
+			"    new X<String>().new Y<Integer>().new Z();\n" +
+			"  }\n" +
+			"}\n";
+	String expectedUnitToString = 
+			"public class X<T> {\n" + 
+			"  public class Y<K> {\n" + 
+			"    public class Z {\n" + 
+			"      Z(@D() @A(value = \"hello\") X<T>.Y<K> X.Y.this) {\n" + 
+			"        super();\n" + 
+			"      }\n" + 
+			"    }\n" + 
+			"    public Y() {\n" + 
+			"      super();\n" + 
+			"    }\n" + 
+			"    void foo(@Marker X<T> this) {\n" + 
+			"    }\n" + 
+			"  }\n" + 
+			"  public X() {\n" + 
+			"    super();\n" + 
+			"  }\n" + 
+			"  public static void main(String[] args) {\n" + 
+			"    new X<String>().new Y<Integer>().new Z();\n" + 
+			"  }\n" + 
+			"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0130", expectedUnitToString);
+}
+// Support type annotations for wildcard
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=388085
+public void test0137() throws IOException {
+	String source = 
+			"class X {\n" +
+			"	public void main(Four<@Marker ? super String, @Marker ? extends Object> param) {\n" +
+			"		One<@Marker ? extends Two<@Marker ? extends Three<@Marker ? extends Four<@Marker ? super String,@Marker ? extends Object>>>> one = null;\n" +
+			"		Two<@Marker ? extends Three<@Marker ? extends Four<@Marker ? super String,@Marker ? extends Object>>> two = null;\n" +
+			"		Three<@Marker ? extends Four<@Marker ? super String,@Marker ? extends Object>> three = null;\n" +
+			"		Four<@Marker ? super String,@Marker ? extends Object> four = param;\n" +
+			"	}\n" +
+			"}\n" +
+			"class One<R> {}\n" +
+			"class Two<S> {}\n" +
+			"class Three<T> {}\n" +
+			"class Four<U, V> {}\n" +
+			"@interface Marker {}";
+	String expectedUnitToString = 
+			"class X {\n" + 
+			"  X() {\n" + 
+			"    super();\n" + 
+			"  }\n" + 
+			"  public void main(Four<@Marker ? super String, @Marker ? extends Object> param) {\n" + 
+			"    One<@Marker ? extends Two<@Marker ? extends Three<@Marker ? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;\n" + 
+			"    Two<@Marker ? extends Three<@Marker ? extends Four<@Marker ? super String, @Marker ? extends Object>>> two = null;\n" + 
+			"    Three<@Marker ? extends Four<@Marker ? super String, @Marker ? extends Object>> three = null;\n" + 
+			"    Four<@Marker ? super String, @Marker ? extends Object> four = param;\n" + 
+			"  }\n" + 
+			"}\n" + 
+			"class One<R> {\n" + 
+			"  One() {\n" + 
+			"    super();\n" + 
+			"  }\n" + 
+			"}\n" + 
+			"class Two<S> {\n" + 
+			"  Two() {\n" + 
+			"    super();\n" + 
+			"  }\n" + 
+			"}\n" + 
+			"class Three<T> {\n" + 
+			"  Three() {\n" + 
+			"    super();\n" + 
+			"  }\n" + 
+			"}\n" + 
+			"class Four<U, V> {\n" + 
+			"  Four() {\n" + 
+			"    super();\n" + 
+			"  }\n" + 
+			"}\n" + 
+			"@interface Marker {\n" + 
+			"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0137", expectedUnitToString);
+}
+public void test0138() throws IOException {
+	String source = 
+			"import java.lang.annotation.Target;\n" +
+			"import static java.lang.annotation.ElementType.*;\n" +
+			"public class X {\n" +
+			"	public void foo() {\n" +
+			"		int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [bar()] @Marker @Marker2 [];\n" +
+			"		int @Marker [][][] j = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [X.bar2(2)] @Marker @Marker2 [];\n" +
+			"	}\n" +
+			"	public int bar() {\n" +
+			"		return 2;\n" +
+			"	}\n" +
+			"	public static int bar2(int k) {\n" +
+			"		return k;\n" + 
+			"	}\n" +
+			"}\n" +
+			"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"@interface Marker {}\n" +
+			"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"@interface Marker2 {}\n";
+	String expectedUnitToString = 
+			"import java.lang.annotation.Target;\n" + 
+			"import static java.lang.annotation.ElementType.*;\n" + 
+			"public class X {\n" + 
+			"  public X() {\n" + 
+			"    super();\n" + 
+			"  }\n" + 
+			"  public void foo() {\n" + 
+			"    int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [bar()] @Marker @Marker2 [];\n" + 
+			"    int @Marker [][][] j = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [X.bar2(2)] @Marker @Marker2 [];\n" + 
+			"  }\n" + 
+			"  public int bar() {\n" + 
+			"    return 2;\n" + 
+			"  }\n" + 
+			"  public static int bar2(int k) {\n" + 
+			"    return k;\n" + 
+			"  }\n" + 
+			"}\n" + 
+			"@Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {\n" + 
+			"}\n" + 
+			"@Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker2 {\n" + 
+			"}\n";
+	checkParse(CHECK_PARSER, source.toCharArray(), null, "test0137", expectedUnitToString);
+}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractNullAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractNullAnnotationTest.java
new file mode 100644
index 0000000..0589d04
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractNullAnnotationTest.java
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2012 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.File;
+import java.util.Map;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.osgi.framework.Bundle;
+
+public abstract class AbstractNullAnnotationTest extends AbstractComparableTest {
+
+	// class libraries including our default null annotation types:
+	String[] LIBS;
+
+	// names and content of custom annotations used in a few tests:
+	static final String CUSTOM_NONNULL_NAME = "org/foo/NonNull.java";
+	static final String CUSTOM_NONNULL_CONTENT =
+			"package org.foo;\n" +
+			"import static java.lang.annotation.ElementType.*;\n" +
+			"import java.lang.annotation.*;\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target({METHOD,PARAMETER,LOCAL_VARIABLE})\n" +
+			"public @interface NonNull {\n" +
+			"}\n";
+	static final String CUSTOM_NONNULL_CONTENT_JSR308 =
+			"package org.foo;\n" +
+			"import static java.lang.annotation.ElementType.*;\n" +
+			"import java.lang.annotation.*;\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target({METHOD,PARAMETER,LOCAL_VARIABLE,TYPE_USE})\n" +
+			"public @interface NonNull {\n" +
+			"}\n";
+	static final String CUSTOM_NULLABLE_NAME = "org/foo/Nullable.java";
+	static final String CUSTOM_NULLABLE_CONTENT = "package org.foo;\n" +
+			"import static java.lang.annotation.ElementType.*;\n" +
+			"import java.lang.annotation.*;\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target({METHOD,PARAMETER,LOCAL_VARIABLE})\n" +
+			"public @interface Nullable {\n" +
+			"}\n";
+	static final String CUSTOM_NULLABLE_CONTENT_JSR308 = "package org.foo;\n" +
+			"import static java.lang.annotation.ElementType.*;\n" +
+			"import java.lang.annotation.*;\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target({METHOD,PARAMETER,LOCAL_VARIABLE,TYPE_USE})\n" +
+			"public @interface Nullable {\n" +
+			"}\n";
+
+	public AbstractNullAnnotationTest(String name) {
+		super(name);
+	}
+
+	/**
+	 * @deprecated indirectly uses deprecated class PackageAdmin
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+		if (this.LIBS == null) {
+			String[] defaultLibs = getDefaultClassPaths();
+			int len = defaultLibs.length;
+			this.LIBS = new String[len+1];
+			System.arraycopy(defaultLibs, 0, this.LIBS, 0, len);
+			String version = this.complianceLevel >= ClassFileConstants.JDK1_8 ? "[2.0.0,3.0.0)" : "[1.1.0,2.0.0)";
+			Bundle[] bundles = org.eclipse.jdt.core.tests.compiler.Activator.getPackageAdmin().getBundles("org.eclipse.jdt.annotation", version);
+			File bundleFile = FileLocator.getBundleFile(bundles[0]);
+			if (bundleFile.isDirectory())
+				this.LIBS[len] = bundleFile.getPath()+"/bin";
+			else
+				this.LIBS[len] = bundleFile.getPath();
+		}
+	}
+	
+	// Conditionally augment problem detection settings
+	static boolean setNullRelatedOptions = true;
+	
+	protected Map getCompilerOptions() {
+	    Map defaultOptions = super.getCompilerOptions();
+	    if (setNullRelatedOptions) {
+	    	defaultOptions.put(JavaCore.COMPILER_PB_NULL_REFERENCE, JavaCore.ERROR);
+		    defaultOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		    defaultOptions.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.ERROR);
+			defaultOptions.put(JavaCore.COMPILER_PB_INCLUDE_ASSERTS_IN_NULL_ANALYSIS, JavaCore.ENABLED);
+
+			defaultOptions.put(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION, JavaCore.DISABLED);
+
+			// enable null annotations:
+			defaultOptions.put(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
+			// leave other new options at these defaults:
+//			defaultOptions.put(CompilerOptions.OPTION_ReportNullContractViolation, JavaCore.ERROR);
+//			defaultOptions.put(CompilerOptions.OPTION_ReportPotentialNullContractViolation, JavaCore.ERROR);
+//			defaultOptions.put(CompilerOptions.OPTION_ReportNullContractInsufficientInfo, CompilerOptions.WARNING);
+
+//			defaultOptions.put(CompilerOptions.OPTION_NullableAnnotationName, "org.eclipse.jdt.annotation.Nullable");
+//			defaultOptions.put(CompilerOptions.OPTION_NonNullAnnotationName, "org.eclipse.jdt.annotation.NonNull");
+	    }
+	    return defaultOptions;
+	}
+	void runNegativeTestWithLibs(String[] testFiles, String expectedErrorLog) {
+		runNegativeTest(
+				testFiles,
+				expectedErrorLog,
+				this.LIBS,
+				false /*shouldFlush*/);
+	}
+	void runNegativeTestWithLibs(boolean shouldFlushOutputDirectory, String[] testFiles, Map customOptions, String expectedErrorLog) {
+		runNegativeTest(
+				shouldFlushOutputDirectory,
+				testFiles,
+				this.LIBS,
+				customOptions,
+				expectedErrorLog,
+				// runtime options
+			    JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
+	}
+	void runNegativeTestWithLibs(String[] testFiles, Map customOptions, String expectedErrorLog) {
+		runNegativeTestWithLibs(false /* flush output directory */,	testFiles, customOptions, expectedErrorLog);
+	}
+	void runConformTestWithLibs(String[] testFiles, Map customOptions, String expectedCompilerLog) {
+		runConformTestWithLibs(false /* flush output directory */, testFiles, customOptions, expectedCompilerLog);
+	}
+	void runConformTestWithLibs(String[] testFiles, Map customOptions, String expectedCompilerLog, String expectedOutput) {
+		runConformTest(
+				false, /* flush output directory */
+				testFiles,
+				this.LIBS,
+				customOptions,
+				expectedCompilerLog,
+				expectedOutput,
+				"",/* expected error */
+			    JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
+	}
+	void runConformTestWithLibs(boolean shouldFlushOutputDirectory, String[] testFiles, Map customOptions, String expectedCompilerLog) {
+		runConformTest(
+				shouldFlushOutputDirectory,
+				testFiles,
+				this.LIBS,
+				customOptions,
+				expectedCompilerLog,
+				"",/* expected output */
+				"",/* expected error */
+			    JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
+	}
+	void runConformTest(String[] testFiles, Map customOptions, String expectedOutputString) {
+		runConformTest(
+				testFiles,
+				expectedOutputString,
+				null /*classLibraries*/,
+				true /*shouldFlushOutputDirectory*/,
+				null /*vmArguments*/,
+				customOptions,
+				null /*customRequestor*/);
+
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
index d8a6c4f..b7f17d9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java
@@ -4,12 +4,19 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
- *     Stephan Herrmann - Contributions for
+ *     Stephan Herrmann - Contribution for
  *								bug 335093 - [compiler][null] minimal hook for future null annotation support
+ *								bug 388800 - [1.8] adjust tests to 1.8 JRE
+ *								bug 402237 - [1.8][compiler] investigate differences between compilers re MethodVerifyTest
+ *								bug 391376 - [1.8] check interaction of default methods with bridge methods and generics
  *								Bug 412203 - [compiler] Internal compiler error: java.lang.IllegalArgumentException: info cannot be null
  *     Jesper S Moller - Contributions for bug 378674 - "The method can be declared as static" is wrong
  *******************************************************************************/
@@ -66,8 +73,159 @@
 import org.eclipse.jdt.internal.compiler.problem.DefaultProblemFactory;
 import org.eclipse.jdt.internal.core.search.JavaSearchParticipant;
 import org.eclipse.jdt.internal.core.search.indexing.BinaryIndexer;
+import org.osgi.framework.Bundle;
 
 public abstract class AbstractRegressionTest extends AbstractCompilerTest implements StopableTestCase {
+
+	// for compiling against JRE 8:
+	static final boolean IS_JRE_8;
+	static final String COMPARATOR_IMPL_JRE8;
+	static final String COMPARATOR_RAW_IMPL_JRE8;
+	static final String COLLECTION_IMPL_JRE8;
+	static final String COLLECTION_RAW_IMPL_JRE8;
+	static final String LIST_IMPL_JRE8;
+	static final String COLLECTION_AND_LIST_IMPL_JRE8;
+	static final String COLLECTION_AND_LIST_RAW_IMPL_JRE8;
+	static final String LIST_RAW_IMPL_JRE8;
+	static final String ITERABLE_IMPL_JRE8;
+	static final String ITERABLE_RAW_IMPL_JRE8;
+	static final String ITERATOR_IMPL_JRE8;
+	static final String ITERATOR_RAW_IMPL_JRE8;
+	static final String MAP_IMPL_JRE8;
+	static final String MAP_RAW_IMPL_JRE8;
+			
+	static {
+		String javaVersion = System.getProperty("java.specification.version");
+		IS_JRE_8 = "1.8".equals(javaVersion);
+		if (IS_JRE_8) { // TODO(stephan) accommodate future versions ...
+			COMPARATOR_IMPL_JRE8 = // replace '*' with T, '%' with U, $ with S
+				"	public java.util.Comparator<*> reverseOrder() { return null;}\n" +
+				"	public java.util.Comparator<*> reversed() { return null;}\n" +
+				"	public java.util.Comparator<*> thenComparing(java.util.Comparator<? super *> other) { return null;}\n" +
+				"	public <% extends java.lang.Comparable<? super %>> java.util.Comparator<*> thenComparing(java.util.function.Function<? super *, ? extends %> keyExtractor, java.util.Comparator<? super %> keyComparator) { return null;}\n" +
+				"	public <% extends java.lang.Comparable<? super %>> java.util.Comparator<*> thenComparing(java.util.function.Function<? super *, ? extends %> keyExtractor) { return null;}\n" +
+				"	public java.util.Comparator<*> thenComparingInt(java.util.function.ToIntFunction<? super *> keyExtractor) { return null;}\n" +
+				"	public java.util.Comparator<*> thenComparingLong(java.util.function.ToLongFunction<? super *> keyExtractor) { return null;}\n" +
+				"	public java.util.Comparator<*> thenComparingDouble(java.util.function.ToDoubleFunction<? super *> keyExtractor) { return null;}\n";
+			COMPARATOR_RAW_IMPL_JRE8 =
+				"	public java.util.Comparator reverseOrder() { return null;}\n" +
+				"	public java.util.Comparator reversed() { return null;}\n" +
+				"	public java.util.Comparator thenComparing(java.util.Comparator other) { return null;}\n" +
+				"	public java.util.Comparator thenComparing(java.util.function.Function keyExtractor, java.util.Comparator keyComparator) { return null;}\n" +
+				"	public java.util.Comparator thenComparing(java.util.function.Function keyExtractor) { return null;}\n" +
+				"	public java.util.Comparator thenComparingInt(java.util.function.ToIntFunction keyExtractor) { return null;}\n" +
+				"	public java.util.Comparator thenComparingLong(java.util.function.ToLongFunction keyExtractor) { return null;}\n" +
+				"	public java.util.Comparator thenComparingDouble(java.util.function.ToDoubleFunction keyExtractor) { return null;}\n";
+			COLLECTION_IMPL_JRE8 =
+				"	public boolean removeAll(java.util.function.Predicate<? super *> filter) { return false;}\n" +
+				"	public boolean removeIf(java.util.function.Predicate<? super *> filter) { return false;}\n" +
+				"	public java.util.stream.Stream<*> stream() { return null;}\n" +
+				"	public java.util.stream.Stream<*> parallelStream() { return null;}\n";
+			COLLECTION_AND_LIST_IMPL_JRE8 =
+				"	public boolean removeAll(java.util.function.Predicate<? super *> filter) { return false;}\n" +
+				"	public boolean removeIf(java.util.function.Predicate<? super *> filter) { return false;}\n" +
+				"	public java.util.stream.Stream<*> stream() { return null;}\n" +
+				"	public java.util.stream.Stream<*> parallelStream() { return null;}\n" +
+				"	public void sort(java.util.Comparator<? super *> comparator) {}\n" +
+				"	public void parallelSort(java.util.Comparator<? super *> comparator) {}\n" +
+				"	public void replaceAll(java.util.function.UnaryOperator<*> operator) {}\n";
+			COLLECTION_RAW_IMPL_JRE8 =
+				"	public @SuppressWarnings(\"rawtypes\") boolean removeAll(java.util.function.Predicate filter) { return false;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") boolean removeIf(java.util.function.Predicate filter) { return false;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream stream() { return null;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream parallelStream() { return null;}\n";
+			LIST_IMPL_JRE8 = // replace '*' with your concrete type argument
+				"	public void sort(java.util.Comparator<? super *> comparator) {}\n" +
+				"	public void parallelSort(java.util.Comparator<? super *> comparator) {}\n" +
+				"	public void replaceAll(java.util.function.UnaryOperator<*> operator) {}\n";
+			LIST_RAW_IMPL_JRE8 =
+				"	public @SuppressWarnings(\"rawtypes\") void sort(java.util.Comparator comparator) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void parallelSort(java.util.Comparator comparator) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void replaceAll(java.util.function.UnaryOperator operator) {}\n";
+			COLLECTION_AND_LIST_RAW_IMPL_JRE8 =
+				"	public @SuppressWarnings(\"rawtypes\") boolean removeAll(java.util.function.Predicate filter) { return false;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") boolean removeIf(java.util.function.Predicate filter) { return false;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream stream() { return null;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") java.util.stream.Stream parallelStream() { return null;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void sort(java.util.Comparator comparator) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void parallelSort(java.util.Comparator comparator) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void replaceAll(java.util.function.UnaryOperator operator) {}\n";
+			ITERABLE_IMPL_JRE8 = // replace '*' with your concrete type argument
+				"	public void forEach(java.util.function.Consumer<? super *> block){}\n" +
+				"	public void forEachRemaining(java.util.function.Consumer<? super *> action) {}\n" +
+				"	public java.util.Spliterator<*> spliterator() {return null;}\n";
+			ITERABLE_RAW_IMPL_JRE8 =
+				"	public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.Consumer action) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void forEachRemaining(java.util.function.Consumer action) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") java.util.Spliterator spliterator() {return null;}\n";
+			ITERATOR_IMPL_JRE8 = // replace '*' with your concrete type argument
+					"public void forEach(java.util.function.Consumer<? super *> action) {}\n" +
+					"public void forEachRemaining(java.util.function.Consumer<? super *> action) {}\n";
+			ITERATOR_RAW_IMPL_JRE8 =
+				"	public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.Consumer block) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void forEachRemaining(java.util.function.Consumer action) {}\n";
+			MAP_IMPL_JRE8 = // '*' for 'K', '%' for 'V'
+				"	public boolean remove(Object key, Object value) { return false;}\n" +
+				"	public % getOrDefault(Object key, % defaultValue) {return defaultValue;}\n" +
+				"	public void forEach(java.util.function.BiConsumer<? super *, ? super %> block) {}\n" +
+				"	public void replaceAll(java.util.function.BiFunction<? super *, ? super %, ? extends %> function) {}\n" +
+				"	public % putIfAbsent(* key, % value) { return null;}\n" +
+				"	public boolean replace(* key, % oldValue, % newValue) { return false;}\n" +
+				"	public % replace(* key, % value) { return null;}\n" +
+				"	public % computeIfAbsent(* key, java.util.function.Function<? super *, ? extends %> mappingFunction) { return null;}\n" +
+				"	public % computeIfPresent(* key, java.util.function.BiFunction<? super *, ? super %, ? extends %> remappingFunction) { return null;}\n" +
+				"	public % compute(* key, java.util.function.BiFunction<? super *, ? super %, ? extends %> remappingFunction) { return null;}\n" +
+				"	public % merge(* key, % value, java.util.function.BiFunction<? super %, ? super %, ? extends %> remappingFunction) { return null;}\n";
+			MAP_RAW_IMPL_JRE8 =
+				"	public boolean remove(Object key, Object value) { return false;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") Object getOrDefault(Object key, Object defaultValue) { return defaultValue;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void forEach(java.util.function.BiConsumer block) {}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") void replaceAll(java.util.function.BiFunction function) {}\n" +
+				"	public Object putIfAbsent(Object key, Object value) { return null;}\n" +
+				"	public boolean replace(Object key, Object oldValue, Object newValue) { return false;}\n" +
+				"	public Object replace(Object key, Object value) { return null;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") Object computeIfAbsent(Object key, java.util.function.Function mappingFunction) { return null;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") Object computeIfPresent(Object key, java.util.function.BiFunction remappingFunction) { return null;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") Object compute(Object key, java.util.function.BiFunction remappingFunction) { return null;}\n" +
+				"	public @SuppressWarnings(\"rawtypes\") Object merge(Object key, Object value, java.util.function.BiFunction remappingFunction) { return null;}\n";
+		} else {
+			COMPARATOR_IMPL_JRE8 = "";			
+			COMPARATOR_RAW_IMPL_JRE8 = "";
+			COLLECTION_IMPL_JRE8 = "";
+			COLLECTION_RAW_IMPL_JRE8 = "";
+			LIST_IMPL_JRE8 = "";
+			COLLECTION_AND_LIST_IMPL_JRE8 = "";
+			COLLECTION_AND_LIST_RAW_IMPL_JRE8 = "";
+			LIST_RAW_IMPL_JRE8 = "";
+			ITERABLE_IMPL_JRE8 = "";
+			ITERABLE_RAW_IMPL_JRE8 = "";
+			ITERATOR_IMPL_JRE8 = "\n\n";
+			ITERATOR_RAW_IMPL_JRE8 = "\n\n";
+			MAP_IMPL_JRE8 = "";
+			MAP_RAW_IMPL_JRE8 = "";
+		}
+	}
+	String getCollectionAndListRawImplJRE8() {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5)
+			return COLLECTION_AND_LIST_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", "");
+		return COLLECTION_AND_LIST_RAW_IMPL_JRE8;
+	} 
+	String getListRawImplJRE8() {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5)
+			return LIST_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", "");
+		return LIST_RAW_IMPL_JRE8;
+	}
+	String getIterableRawImplJRE8() {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5)
+			return ITERABLE_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", "");
+		return ITERABLE_RAW_IMPL_JRE8;
+	}
+	String getCollectionRawImplJRE8() {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5)
+			return COLLECTION_RAW_IMPL_JRE8.replaceAll("@SuppressWarnings\\(\"rawtypes\"\\)", "");
+		return COLLECTION_RAW_IMPL_JRE8;
+	}
+
 	// javac comparison related types, fields and methods - see runJavac for
 	// details
 static class JavacCompiler {
@@ -130,6 +288,8 @@
 			this.version = JavaCore.VERSION_1_6;
 		} else if (rawVersion.indexOf("1.7") != -1) {
 			this.version = JavaCore.VERSION_1_7;
+		} else if (rawVersion.indexOf("1.8") != -1) {
+			this.version = JavaCore.VERSION_1_8;
 		} else {
 			throw new RuntimeException("unknown javac version: " + rawVersion);
 		}
@@ -169,6 +329,14 @@
 			if ("1.7.0-ea".equals(rawVersion)) {
 				return 0000;
 			}
+			if ("1.7.0_10".equals(rawVersion)) {
+				return 1000;
+			}
+		}
+		if (version == JavaCore.VERSION_1_8) {
+			if ("1.8.0-ea".equals(rawVersion)) {
+				return 0000;
+			}
 		}
 		throw new RuntimeException("unknown raw javac version: " + rawVersion);
 	}
@@ -493,7 +661,10 @@
 		}
 		Excuse excuseFor(JavacCompiler compiler) {
 			if (this.minorsFixed != null) {
-				if (compiler.compliance == ClassFileConstants.JDK1_7) {
+				if (compiler.compliance == ClassFileConstants.JDK1_8) {
+					return this.minorsFixed[5] > compiler.minor || this.minorsFixed[5] < 0 ?
+							this : null;
+				} else if (compiler.compliance == ClassFileConstants.JDK1_7) {
 					return this.minorsFixed[4] > compiler.minor || this.minorsFixed[4] < 0 ?
 							this : null;
 				} else if (compiler.compliance == ClassFileConstants.JDK1_6) {
@@ -603,7 +774,15 @@
 								return compiler.compliance != ClassFileConstants.JDK1_5 ||
 										compiler.minor != 1600 ? null : this;
 							}
-					}: null;
+					}: null,
+			Javac8AcceptsDefaultMethodInAnnotationType = RUN_JAVAC ?
+				new JavacHasABug(
+					MismatchType.EclipseErrorsJavacNone,
+					ClassFileConstants.JDK1_8, 23 /* TODO: insert minor when fixed */) : null,
+			Javac8ProducesIllegalAccessError = RUN_JAVAC ? 
+				new JavacHasABug(
+					MismatchType.StandardOutputMismatch,
+					ClassFileConstants.JDK1_8, 23 /* TODO: insert minor when fixed */) : null;
 	}
 }
 
@@ -845,6 +1024,8 @@
 			buffer.append("\" -1.6 -proc:none");
 		} else if (this.complianceLevel == ClassFileConstants.JDK1_7) {
 			buffer.append("\" -1.7 -proc:none");
+		} else if (this.complianceLevel == ClassFileConstants.JDK1_8) {
+			buffer.append("\" -1.8 -proc:none");
 		}
 		buffer
 			.append(" -preserveAllLocals -nowarn -g -classpath \"")
@@ -1024,12 +1205,14 @@
 		return DefaultJavaRuntimeEnvironment.getDefaultClassPaths();
 	}
 	/** Get class library paths built from default class paths plus the JDT null annotations. */
-	protected String[] getLibsWithNullAnnotations() throws IOException {
+	protected String[] getLibsWithNullAnnotations(long sourceLevel) throws IOException {
 		String[] defaultLibs = getDefaultClassPaths();
 		int len = defaultLibs.length;
 		String[] libs = new String[len+1];
 		System.arraycopy(defaultLibs, 0, libs, 0, len);
-		File bundleFile = FileLocator.getBundleFile(Platform.getBundle("org.eclipse.jdt.annotation"));
+		String version = sourceLevel < ClassFileConstants.JDK1_8 ? "[1.1.0,2.0.0)" : "[2.0.0,3.0.0)";
+		Bundle[] bundles = Platform.getBundles("org.eclipse.jdt.annotation", version);
+		File bundleFile = FileLocator.getBundleFile(bundles[0]);
 		if (bundleFile.isDirectory())
 			libs[len] = bundleFile.getPath()+"/bin";
 		else
@@ -1044,6 +1227,9 @@
 			public boolean proceedOnErrors() {
 				return true;
 			}
+			public boolean ignoreAllErrors() {
+				return false;
+			}
 		};
 	}
 	/*
@@ -1235,6 +1421,28 @@
 			// javac options
 			JavacTestOptions.DEFAULT /* default javac test options */);
 	}
+	protected void runConformTest(String[] testFiles, String expectedOutput, Map customOptions) {
+		runTest(
+			// test directory preparation
+			true /* flush output directory */,
+			testFiles /* test files */,
+			// compiler options
+			null /* no class libraries */,
+			customOptions /* no custom options */,
+			false /* do not perform statements recovery */,
+			null /* no custom requestor */,
+			// compiler results
+			false /* expecting no compiler errors */,
+			null /* do not check compiler log */,
+			// runtime options
+			false /* do not force execution */,
+			null /* no vm arguments */,
+			// runtime results
+			expectedOutput /* expected output string */,
+			null /* do not check error string */,
+			// javac options
+			JavacTestOptions.DEFAULT /* default javac test options */);
+	}
 	protected void runConformTest(
 			String[] testFiles,
 			String[] dependantFiles,
@@ -1852,6 +2060,33 @@
 			// javac options
 			JavacTestOptions.DEFAULT /* default javac test options */);
 	}
+protected void runNegativeTest(String[] testFiles, String expectedCompilerLog, boolean performStatementRecovery) {
+	runTest(
+ 		// test directory preparation
+		true /* flush output directory */,
+		testFiles /* test files */,
+		// compiler options
+		null /* no class libraries */,
+		null /* no custom options */,
+		performStatementRecovery,
+		new Requestor( /* custom requestor */
+				false,
+				null /* no custom requestor */,
+				false,
+				false),
+		// compiler results
+		expectedCompilerLog == null || /* expecting compiler errors */
+			expectedCompilerLog.indexOf("ERROR") != -1,
+		expectedCompilerLog /* expected compiler log */,
+		// runtime options
+		false /* do not force execution */,
+		null /* no vm arguments */,
+		// runtime results
+		null /* do not check output string */,
+		null /* do not check error string */,
+		// javac options
+		JavacTestOptions.DEFAULT /* default javac test options */);
+}
 	// WORK potential elimination candidate (24 calls) - else clean up inline
 	protected void runNegativeTest(
 		String[] testFiles,
@@ -2101,7 +2336,9 @@
 			// javac options
 			javacTestOptions /* javac test options */);
 	}
-	private void runTest(
+//{ObjectTeams: made accessible to sub-classes:
+	protected void runTest(
+// SH}
 			// test directory preparation
 			boolean shouldFlushOutputDirectory,
 			String[] testFiles,
@@ -2638,7 +2875,8 @@
 		false /* do not perform statements recovery */,
 		null /* no custom requestor */,
 		// compiler results
-		true /* expecting compiler errors */,
+		expectedCompilerLog == null || /* expecting compiler errors */
+		expectedCompilerLog.indexOf("ERROR") != -1,
 		expectedCompilerLog /* expected compiler log */,
 		// runtime options
 		false /* do not force execution */,
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java
index a44a371..73dfe0d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java
@@ -5,9 +5,16 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
+ *								bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract
+ *								bug 399567 - [1.8] Different error message from the reference compiler
+ *								bug 401796 - [1.8][compiler] don't treat default methods as overriding an independent inherited abstract method
  *								bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
@@ -493,8 +500,49 @@
 			"----------\n"
 		);
 	}
-	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=123943 - case 2
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=123943 - case 2
+	// see also Bug 399567 - [1.8] Different error message from the reference compiler
 	public void test009() {
+		String[] testFiles = 
+				new String[] {
+				"T.java",
+				"import java.util.*;\n" +
+						"public class T {\n" +
+						"   void test() {\n" +
+						"   	OrderedSet<String> os = null;\n" +
+						"   	os.add(\"hello\");\n" +
+						"   	OrderedSet<Integer> os2 = null;\n" +
+						"   	os2.add(1);\n" +
+						"   }\n" +
+						"}\n" +
+						"interface OrderedSet<E> extends List<E>, Set<E> { boolean add(E o); }\n"
+		};
+		if (!IS_JRE_8 || this.complianceLevel < ClassFileConstants.JDK1_8)
+			this.runConformTest(testFiles, "");
+		else
+			this.runNegativeTest(
+				testFiles,
+				"----------\n" + 
+				"1. WARNING in T.java (at line 5)\n" + 
+				"	os.add(\"hello\");\n" + 
+				"	^^\n" + 
+				"Null pointer access: The variable os can only be null at this location\n" + 
+				"----------\n" + 
+				"2. WARNING in T.java (at line 7)\n" + 
+				"	os2.add(1);\n" + 
+				"	^^^\n" + 
+				"Null pointer access: The variable os2 can only be null at this location\n" + 
+				"----------\n" + 
+				"3. ERROR in T.java (at line 10)\n" + 
+				"	interface OrderedSet<E> extends List<E>, Set<E> { boolean add(E o); }\n" + 
+				"	          ^^^^^^^^^^\n" + 
+				"Duplicate default methods named spliterator with the parameters () and () are inherited from the types Set<E> and List<E>\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=123943 variant to make it pass on JRE8
+	public void test009a() {
+		if (!IS_JRE_8 || this.complianceLevel < ClassFileConstants.JDK1_8)
+			return;
 		this.runConformTest(
 			new String[] {
 				"T.java",
@@ -506,8 +554,11 @@
 				"   	OrderedSet<Integer> os2 = null;\n" +
 				"   	os2.add(1);\n" +
 				"   }\n" +
-				"}" +
-				"interface OrderedSet<E> extends List<E>, Set<E> { boolean add(E o); }\n"
+				"}\n" +
+				"interface OrderedSet<E> extends List<E>, Set<E> {\n" +
+				"	boolean add(E o);\n" +
+				"   default Spliterator<E> spliterator() { return null; }\n" +
+    			"}\n"
 			},
 			""
 		);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
index e68d505..04eb986 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -15,6 +19,10 @@
  *								bug 386356 - Type mismatch error with annotations and generics
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 376590 - Private fields with @Inject are ignored by unused field validation
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis 
+ *     Jesper S Moller  - Contributions for
+ *								bug 384567 - [1.5][compiler] Compiler accepts illegal modifiers on package declaration
+ *								bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -57,6 +65,8 @@
 	}
 
 	String reportMissingJavadocComments = null;
+	private String repeatableIntroText;
+	private String repeatableTrailerText;
 
 	public AnnotationTest(String name) {
 		super(name);
@@ -87,6 +97,14 @@
 	protected void setUp() throws Exception {
 		super.setUp();
 		this.reportMissingJavadocComments = null;
+		this.repeatableIntroText = this.complianceLevel >= ClassFileConstants.JDK1_8 ?
+		"Duplicate annotation of non-repeatable type "
+		:
+		"Duplicate annotation ";
+		this.repeatableTrailerText = this.complianceLevel >= ClassFileConstants.JDK1_8 ?
+		". Only annotation types marked @Repeatable can be used multiple times at one target.\n"
+		:
+		". Repeated annotations are allowed only at source level 1.8 or above\n";
 	}
 
 	public void test001() {
@@ -326,12 +344,12 @@
 			"1. ERROR in X.java (at line 1)\n" +
 			"	@Foo @Foo\n" +
 			"	^^^^\n" +
-			"Duplicate annotation @Foo\n" +
+			this.repeatableIntroText + "@Foo"+ this.repeatableTrailerText + 
 			"----------\n" +
 			"2. ERROR in X.java (at line 1)\n" +
 			"	@Foo @Foo\n" +
 			"	     ^^^^\n" +
-			"Duplicate annotation @Foo\n" +
+			this.repeatableIntroText + "@Foo"+ this.repeatableTrailerText + 
 			"----------\n");
 	}
 
@@ -1031,6 +1049,30 @@
 		"----------\n");
 	}
 
+	// check annotation member modifiers (validity unchanged despite grammar change from JSR 335 - default methods)
+	// and https://bugs.eclipse.org/bugs/show_bug.cgi?id=3383968
+	public void test039a() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public @interface X {\n" +
+				"	strictfp double val() default 0.1;\n" +
+				"	synchronized String id() default \"zero\";\n" +
+				"}"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	strictfp double val() default 0.1;\n" + 
+			"	                ^^^^^\n" + 
+			"Illegal modifier for the annotation attribute X.val; only public & abstract are permitted\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	synchronized String id() default \"zero\";\n" + 
+			"	                    ^^^^\n" + 
+			"Illegal modifier for the annotation attribute X.id; only public & abstract are permitted\n" + 
+			"----------\n");
+	}
+
 	// check annotation array field initializer
 	public void test040() {
 		this.runNegativeTest(
@@ -8765,6 +8807,7 @@
 	IErrorHandlingPolicy errorHandlingPolicy = new IErrorHandlingPolicy() {
 		public boolean proceedOnErrors() { return true; }
 		public boolean stopOnFirstError() { return false; }
+		public boolean ignoreAllErrors() { return false; }
 	};
 	Map options = getCompilerOptions();
 	options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
@@ -8816,12 +8859,12 @@
 		"1. ERROR in p\\package-info.java (at line 1)\n" + 
 		"	@Deprecated\n" + 
 		"	^^^^^^^^^^^\n" + 
-		"Duplicate annotation @Deprecated\n" + 
+		this.repeatableIntroText + "@Deprecated"+ this.repeatableTrailerText + 
 		"----------\n" + 
 		"2. ERROR in p\\package-info.java (at line 2)\n" + 
 		"	@Deprecated\n" + 
 		"	^^^^^^^^^^^\n" + 
-		"Duplicate annotation @Deprecated\n" + 
+		this.repeatableIntroText + "@Deprecated"+ this.repeatableTrailerText + 
 		"----------\n"
 	);
 }
@@ -9908,40 +9951,51 @@
 		"----------\n" + 
 		"7. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
-		"	^^^^^^^^^^^^^^^^\n" + 
-		"Syntax error on tokens, delete these tokens\n" + 
+		"	            ^^^^\n" + 
+		"Syntax error, insert \"Identifier (\" to complete MethodHeaderName\n" + 
 		"----------\n" + 
 		"8. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
-		"	            ^^^^\n" + 
-		"Syntax error, insert \"enum Identifier\" to complete EnumHeaderName\n" + 
+		"	            ^^^^\n" +
+//{ObjectTeams: starting from here the OT/J grammar produces different errors:
+// different:
+		"Syntax error, insert \")\" to complete MethodSpecLong\n" +
 		"----------\n" + 
 		"9. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	            ^^^^\n" + 
-		"Syntax error, insert \"EnumBody\" to complete EnumDeclaration\n" + 
+		"Syntax error, insert \"<-\" to complete CallinBindingLeft\n" + 
+//
 		"----------\n" + 
 		"10. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	            ^^^^\n" + 
+// new
+		"Syntax error, insert \"MethodSpecsLong EmptyParameterMappings\" to complete InvalidCallinBinding\n" + 
+		"----------\n" +
+// number changes beyond this point
+		"11. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
+		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
+		"	            ^^^^\n" + 
 		"Syntax error, insert \"}\" to complete ClassBody\n" + 
 		"----------\n" + 
-		"11. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
+		"12. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
 		"Return type for the method is missing\n" + 
 		"----------\n" + 
-		"12. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
+		"13. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                       ^^^^^^^\n" + 
 		"NonNull cannot be resolved to a type\n" + 
 		"----------\n" + 
-		"13. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
+		"14. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                                                      ^^^^^^^^\n" + 
 		"Nullable cannot be resolved to a type\n" + 
 		"----------\n" + 
-		"14. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
+		"15. ERROR in snippet\\Bug366003.java (at line 13)\n" + 
+// SH}
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                                                                           ^\n" + 
 		"Syntax error, insert \";\" to complete ConstructorDeclaration\n" + 
@@ -9994,40 +10048,51 @@
 		"----------\n" + 
 		"6. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
-		"	^^^^^^^^^^^^^^^^\n" + 
-		"Syntax error on tokens, delete these tokens\n" + 
+		"	            ^^^^\n" + 
+		"Syntax error, insert \"Identifier (\" to complete MethodHeaderName\n" + 
 		"----------\n" + 
 		"7. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	            ^^^^\n" + 
-		"Syntax error, insert \"enum Identifier\" to complete EnumHeaderName\n" + 
+//{ObjectTeams: starting from here the OT/J grammar produces different errors:
+// different:
+		"Syntax error, insert \")\" to complete MethodSpecLong\n" +
 		"----------\n" + 
 		"8. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	            ^^^^\n" + 
-		"Syntax error, insert \"EnumBody\" to complete EnumDeclaration\n" + 
+		"Syntax error, insert \"<-\" to complete CallinBindingLeft\n" + 
+//
 		"----------\n" + 
+// new
 		"9. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	            ^^^^\n" + 
+		"Syntax error, insert \"MethodSpecsLong EmptyParameterMappings\" to complete InvalidCallinBinding\n" + 
+// number changes beyond this point
+		"----------\n" + 
+		"10. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
+		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
+		"	            ^^^^\n" + 
 		"Syntax error, insert \"}\" to complete ClassBody\n" + 
 		"----------\n" + 
-		"10. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
+		"11. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
 		"Return type for the method is missing\n" + 
 		"----------\n" + 
-		"11. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
+		"12. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                       ^^^^^^^\n" + 
 		"NonNull cannot be resolved to a type\n" + 
 		"----------\n" + 
-		"12. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
+		"13. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                                                      ^^^^^^^^\n" + 
 		"Nullable cannot be resolved to a type\n" + 
 		"----------\n" + 
-		"13. ERROR in snippet\\Bug366003.java (at line 11)\n" + 
+		"14. ERROR in snippet\\Bug366003.java (at line 11)\n" +
+// SH}
 		"	org.eclipse.User.User(@NonNull String name, int uid, @Nullable String email)\n" + 
 		"	                                                                           ^\n" + 
 		"Syntax error, insert \";\" to complete ConstructorDeclaration\n" + 
@@ -10049,34 +10114,45 @@
 		"1. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
 		"	org.User(@Bla String a)\n" + 
 		"	^^^\n" + 
-		"Syntax error on token \"org\", delete this token\n" + 
+		"Syntax error, insert \"Identifier (\" to complete MethodHeaderName\n" + 
 		"----------\n" + 
 		"2. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
 		"	org.User(@Bla String a)\n" + 
-		"	^^^\n" + 
-		"Syntax error, insert \"enum Identifier\" to complete EnumHeaderName\n" + 
+		"	^^^\n" +
+//{ObjectTeams: starting from here the OT/J grammar produces different errors:
+// different:
+		"Syntax error, insert \")\" to complete MethodSpecLong\n" +
 		"----------\n" + 
 		"3. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
 		"	org.User(@Bla String a)\n" + 
 		"	^^^\n" + 
-		"Syntax error, insert \"EnumBody\" to complete EnumDeclaration\n" + 
-		"----------\n" + 
+		"Syntax error, insert \"<-\" to complete CallinBindingLeft\n" + 
+//
+		"----------\n" +
+// new
 		"4. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
 		"	org.User(@Bla String a)\n" + 
 		"	^^^\n" + 
+		"Syntax error, insert \"MethodSpecsLong EmptyParameterMappings\" to complete InvalidCallinBinding\n" +
+// number changes beyond this point
+		"----------\n" + 
+		"5. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
+		"	org.User(@Bla String a)\n" + 
+		"	^^^\n" + 
 		"Syntax error, insert \"}\" to complete ClassBody\n" + 
 		"----------\n" + 
-		"5. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
+		"6. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
 		"	org.User(@Bla String a)\n" + 
 		"	    ^^^^^^^^^^^^^^^^^^^\n" + 
 		"Return type for the method is missing\n" + 
 		"----------\n" + 
-		"6. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
+		"7. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
 		"	org.User(@Bla String a)\n" + 
 		"	          ^^^\n" + 
 		"Bla cannot be resolved to a type\n" + 
-		"----------\n" + 
-		"7. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
+		"----------\n" +
+// SH}
+		"8. ERROR in snippet\\Bug366003.java (at line 5)\n" + 
 		"	org.User(@Bla String a)\n" + 
 		"	                      ^\n" + 
 		"Syntax error, insert \";\" to complete ConstructorDeclaration\n" + 
@@ -10098,26 +10174,26 @@
 			"	}\n" +
 			"}\n"
 		},
-		"----------\n" +
-		"1. ERROR in snippet\\Bug366003.java (at line 7)\n" +
-		"	e } catch (@Blah Exception eSecond) {\n" +
-		"	^\n" +
-		"Syntax error, insert \"AssignmentOperator Expression\" to complete Assignment\n" +
-		"----------\n" +
-		"2. ERROR in snippet\\Bug366003.java (at line 7)\n" +
-		"	e } catch (@Blah Exception eSecond) {\n" +
-		"	^\n" +
-		"Syntax error, insert \";\" to complete BlockStatements\n" +
-		"----------\n" +
-		"3. ERROR in snippet\\Bug366003.java (at line 8)\n" +
-		"	e }\n" +
-		"	^\n" +
-		"Syntax error, insert \"AssignmentOperator Expression\" to complete Expression\n" +
-		"----------\n" +
-		"4. ERROR in snippet\\Bug366003.java (at line 8)\n" +
-		"	e }\n" +
-		"	^\n" +
-		"Syntax error, insert \";\" to complete BlockStatements\n" +
+		"----------\n" + 
+		"1. ERROR in snippet\\Bug366003.java (at line 7)\n" + 
+		"	e } catch (@Blah Exception eSecond) {\n" + 
+		"	^\n" + 
+		"Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration\n" + 
+		"----------\n" + 
+		"2. ERROR in snippet\\Bug366003.java (at line 7)\n" + 
+		"	e } catch (@Blah Exception eSecond) {\n" + 
+		"	^\n" + 
+		"Syntax error, insert \";\" to complete BlockStatements\n" + 
+		"----------\n" + 
+		"3. ERROR in snippet\\Bug366003.java (at line 8)\n" + 
+		"	e }\n" + 
+		"	^\n" + 
+		"Syntax error, insert \"VariableDeclarators\" to complete LocalVariableDeclaration\n" + 
+		"----------\n" + 
+		"4. ERROR in snippet\\Bug366003.java (at line 8)\n" + 
+		"	e }\n" + 
+		"	^\n" + 
+		"Syntax error, insert \";\" to complete BlockStatements\n" + 
 		"----------\n");
 }
 public void testBug366003e() {
@@ -10305,7 +10381,7 @@
 	customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.ERROR);
 	customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.ERROR);
 	customOptions.put(CompilerOptions.OPTION_AnnotationBasedNullAnalysis, CompilerOptions.ENABLED);
-	customOptions.put(CompilerOptions.OPTION_NonNullAnnotationName, "p.NonNull");
+	customOptions.put(CompilerOptions.OPTION_NonNullByDefaultAnnotationName, "p.NonNullByDefault");
 	this.runNegativeTest(
 		true,
 		new String[] {
@@ -10328,7 +10404,7 @@
 			"    public E2(long l) {}\n" +
 			"}\n" +
 			"class E3 {\n" +
-			"	 @p.NonNull\n" +
+			"	 @p.NonNullByDefault\n" +
 			"    private E3() {}\n" +
 			"    public E3(long l) {}\n" +
 			"}\n" +
@@ -10338,12 +10414,12 @@
 			"    private E4() {}\n" +
 			"    public E4(long l) {}\n" +
 			"}\n",
-			"p/NonNull.java",
+			"p/NonNullByDefault.java",
 			"package p;\n" +
 			"import static java.lang.annotation.ElementType.*;\n" +
 			"import java.lang.annotation.*;\n" +
-			"@Target({TYPE, METHOD,PARAMETER,CONSTRUCTOR})\n" +
-			"public @interface NonNull {\n" +
+			"@Target({TYPE, METHOD,CONSTRUCTOR})\n" +
+			"public @interface NonNullByDefault {\n" +
 			"}",
 			"p/Annot.java",
 			"package p;\n" +
@@ -10456,7 +10532,7 @@
 	customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.ERROR);
 	customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.ERROR);
 	customOptions.put(CompilerOptions.OPTION_AnnotationBasedNullAnalysis, CompilerOptions.ENABLED);
-	customOptions.put(CompilerOptions.OPTION_NonNullAnnotationName, "p.NonNull");
+	customOptions.put(CompilerOptions.OPTION_NonNullByDefaultAnnotationName, "p.NonNullByDefault");
 	this.runNegativeTest(
 		true,
 		new String[] {
@@ -10474,7 +10550,7 @@
 			"    private class E22{}\n" +
 			"}\n" +
 			"class E3 {\n" +
-			"	 @p.NonNull\n" +
+			"	 @p.NonNullByDefault\n" +
 			"    private class E33{}\n" +
 			"}\n" +
 			"class E4 {\n" +
@@ -10482,12 +10558,12 @@
 			"	 @p.Annot\n" +
 			"    private class E44{}\n" +
 			"}\n",
-			"p/NonNull.java",
+			"p/NonNullByDefault.java",
 			"package p;\n" +
 			"import static java.lang.annotation.ElementType.*;\n" +
 			"import java.lang.annotation.*;\n" +
-			"@Target({TYPE, METHOD,PARAMETER,LOCAL_VARIABLE})\n" +
-			"public @interface NonNull {\n" +
+			"@Target({TYPE, METHOD,PARAMETER})\n" +
+			"public @interface NonNullByDefault {\n" +
 			"}",
 			"p/Annot.java",
 			"package p;\n" +
@@ -10889,6 +10965,47 @@
 
 	checkDisassembledClassFile(OUTPUT_DIR + File.separator  +"X.class", "X", expectedOutput, ClassFileBytesDisassembler.DETAILED);
 }
+// check invalid and annotations on package
+public void test384567() {
+	this.runNegativeTest(
+		new String[] {
+			"xy/X.java",
+			"public final synchronized @Foo private package xy;\n" +
+			"class X {\n" +
+			"}\n" +
+			"\n" +
+			"@interface Foo {\n" +
+			"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in xy\\X.java (at line 1)\n" + 
+		"	public final synchronized @Foo private package xy;\n" + 
+		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+		"Syntax error, modifiers are not allowed here\n" + 
+		"----------\n" + 
+		"2. ERROR in xy\\X.java (at line 1)\n" + 
+		"	public final synchronized @Foo private package xy;\n" + 
+		"	                          ^^^^\n" + 
+		"Package annotations must be in file package-info.java\n" + 
+		"----------\n");
+}
+//check invalid modifiers on package
+public void test384567_2() {
+	this.runNegativeTest(
+		new String[] {
+			"xy/X.java",
+			"public final synchronized private package xy;\n" +
+			"class X {\n" +
+			"}\n" +
+			"\n"
+		},
+		"----------\n" +
+		"1. ERROR in xy\\X.java (at line 1)\n" + 
+		"	public final synchronized private package xy;\n" + 
+		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+		"Syntax error, modifiers are not allowed here\n" + 
+		"----------\n");
+}
 // Bug 416107 - Incomplete error message for member interface and annotation
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=416107
 public void test416107a() {
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java
index 1205491..c8a3131 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ArrayTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -8,6 +8,8 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for Bug 331872 - [compiler] NPE in Scope.createArrayType when attempting qualified access from type parameter
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 import java.io.File;
@@ -575,4 +577,19 @@
 		"The method foo(Object[]) is undefined for the type X<p>\n" + 
 		"----------\n");
 }
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=409247 - [1.8][compiler] Verify error with code allocating multidimensional array
+public void test019() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"X.java",
+			"public class X {\n" + 
+			"	public static void main(String[] args) {\n" +
+			"		X [][][] x = new X[10][10][];\n" +
+			"		System.out.println(\"SUCCESS\");\n" +
+			"	}\n" +
+			"}\n",
+		},
+		"SUCCESS");
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
index fa1fba2..eda35e6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AssignmentTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
@@ -902,7 +906,7 @@
 		"1. WARNING in X.java (at line 19)\n" +
 		"	public void valueChanged(TreeSelectionEvent e) {\n" +
 		"	                                            ^\n" +
-		"The parameter e is hiding another local variable defined in an enclosing type scope\n" +
+		"The parameter e is hiding another local variable defined in an enclosing scope\n" +
 		"----------\n" +
 		"2. ERROR in X.java (at line 23)\n" +
 		"	static {\n" +
@@ -917,7 +921,7 @@
 		"4. WARNING in X.java (at line 26)\n" +
 		"	public void actionPerformed(ActionEvent e) {\n" +
 		"	                                        ^\n" +
-		"The parameter e is hiding another local variable defined in an enclosing type scope\n" +
+		"The parameter e is hiding another local variable defined in an enclosing scope\n" +
 		"----------\n");
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=111898
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
index 4cd8f23..6424775 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -24,8 +28,10 @@
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 381443 - [compiler][null] Allow parameter widening from @NonNull to unannotated
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis 
  *     Jesper Steen Moller - Contributions for
  *								bug 404146 - [1.7][compiler] nested try-catch-finally-blocks leads to unrunnable Java byte code
+ *								bug 407297 - [1.8][compiler] Control generation of parameter names by option
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -1581,8 +1587,9 @@
         "    -1.5 -5 -5.0       use 1.5 compliance (-source 1.5 -target 1.5)\n" +
         "    -1.6 -6 -6.0       use 1.6 compliance (-source 1.6 -target 1.6)\n" +
         "    -1.7 -7 -7.0       use 1.7 compliance (-source 1.7 -target 1.7)\n" +
-        "    -source <version>  set source level: 1.3 to 1.7 (or 5, 5.0, etc)\n" +
-        "    -target <version>  set classfile target: 1.1 to 1.7 (or 5, 5.0, etc)\n" +
+        "    -1.8 -8 -8.0       use 1.8 compliance (-source 1.8 -target 1.8)\n" +
+        "    -source <version>  set source level: 1.3 to 1.8 (or 5, 5.0, etc)\n" +
+        "    -target <version>  set classfile target: 1.1 to 1.8 (or 5, 5.0, etc)\n" +
         "                       cldc1.1 can also be used to generate the StackMap\n" +
         "                       attribute\n" +
         " \n" +
@@ -1655,6 +1662,7 @@
         "    -repeat <n>        repeat compilation process <n> times for perf analysis\n" +
         "    -inlineJSR         inline JSR bytecode (implicit if target >= 1.5)\n" +
         "    -enableJavadoc     consider references in javadoc\n" +
+        "    -parameters        generate method parameters attribute (for target >= 1.8)\n" +
         "    -Xemacs            used to enable emacs-style output in the console.\n" +
         "                       It does not affect the xml log output\n" +
         "    -missingNullDefault  report missing default nullness annotation\n" + 
@@ -1937,7 +1945,8 @@
 			"		<option key=\"org.eclipse.jdt.core.compiler.annotation.nonnullbydefault\" value=\"org.eclipse.jdt.annotation.NonNullByDefault\"/>\n" +
 			"		<option key=\"org.eclipse.jdt.core.compiler.annotation.nullable\" value=\"org.eclipse.jdt.annotation.Nullable\"/>\n" +
 			"		<option key=\"org.eclipse.jdt.core.compiler.annotation.nullanalysis\" value=\"disabled\"/>\n" +
-			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode\" value=\"disabled\"/>\n" +
+			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode\" value=\"disabled\"/>\n" + 
+			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.methodParameters\" value=\"do not generate\"/>\n" + 
 			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks\" value=\"disabled\"/>\n" +
 			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.targetPlatform\" value=\"1.5\"/>\n" +
 			"		<option key=\"org.eclipse.jdt.core.compiler.codegen.unusedLocal\" value=\"optimize out\"/>\n" +
@@ -2051,7 +2060,8 @@
 			"		<option key=\"org.eclipse.jdt.core.compiler.problem.unusedWarningToken\" value=\"warning\"/>\n" + 
 			"		<option key=\"org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast\" value=\"warning\"/>\n" + 
 			"		<option key=\"org.eclipse.jdt.core.compiler.processAnnotations\" value=\"disabled\"/>\n" +
-			"		<option key=\"org.eclipse.jdt.core.compiler.source\" value=\"1.5\"/>\n" +
+			"		<option key=\"org.eclipse.jdt.core.compiler.source\" value=\"1.5\"/>\n" + 
+			"		<option key=\"org.eclipse.jdt.core.compiler.storeAnnotations\" value=\"disabled\"/>\n" +
 			"		<option key=\"org.eclipse.jdt.core.compiler.taskCaseSensitive\" value=\"enabled\"/>\n" +
 			"		<option key=\"org.eclipse.jdt.core.compiler.taskPriorities\" value=\"\"/>\n" +
 			"		<option key=\"org.eclipse.jdt.core.compiler.taskTags\" value=\"\"/>\n" +
@@ -12703,12 +12713,12 @@
 		"2. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 9)\n" + 
 		"	@Nullable Object foo(Object o, Object o2) { return null; }\n" + 
 		"	                     ^^^^^^\n" + 
-		"Missing nullable annotation: inherited method from X declares this parameter as @Nullable\n" + 
+		"Missing nullable annotation: inherited method from X specifies this parameter as @Nullable\n" + 
 		"----------\n" + 
 		"3. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 9)\n" +
 		"	@Nullable Object foo(Object o, Object o2) { return null; }\n" +
 		"	                               ^^^^^^\n" +
-		"Missing non-null annotation: inherited method from X declares this parameter as @NonNull\n" +
+		"Missing non-null annotation: inherited method from X specifies this parameter as @NonNull\n" +
 		"----------\n" +
 		"3 problems (3 warnings)\n",
 		true);
@@ -12752,12 +12762,12 @@
 		"2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 9)\n" + 
 		"	@Nullable Object foo(Object o, Object o2) { return null; }\n" + 
 		"	                     ^^^^^^\n" + 
-		"Missing nullable annotation: inherited method from X declares this parameter as @Nullable\n" + 
+		"Missing nullable annotation: inherited method from X specifies this parameter as @Nullable\n" + 
 		"----------\n" + 
 		"3. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 9)\n" +
 		"	@Nullable Object foo(Object o, Object o2) { return null; }\n" +
 		"	                               ^^^^^^\n" +
-		"Missing non-null annotation: inherited method from X declares this parameter as @NonNull\n" +
+		"Missing non-null annotation: inherited method from X specifies this parameter as @NonNull\n" +
 		"----------\n" +
 		"3 problems (3 errors)\n",
 		true);
@@ -12841,7 +12851,7 @@
 		new String[] {
 				"X1.java",
 				"public class X1 {\n" +
-				"	Zork;\n" +
+				"	Zork z;\n" +
 				"}\n",
 				"org/eclipse/jdt/annotation/NonNull.java",
 				NONNULL_ANNOTATION_CONTENT,
@@ -12862,9 +12872,9 @@
 		"A default nullness annotation has not been specified for the type X1\n" + 
 		"----------\n" + 
 		"2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X1.java (at line 2)\n" + 
-		"	Zork;\n" + 
+		"	Zork z;\n" + 
 		"	^^^^\n" + 
-		"Syntax error on token \"Zork\", VariableDeclarator expected after this token\n" + 
+		"Zork cannot be resolved to a type\n" + 
 		"----------\n" + 
 		"2 problems (1 error, 1 warning)\n",
 		true);
@@ -13515,7 +13525,8 @@
 				"import java.lang.annotation.*;\n" +
 				"public class X {\n" +
 				"  @NonNull Object foo(@Nullable Object o, @NonNull Object o2) {\n" +
-				"	 return new X().bar();\n" +
+				"	 Object o3 = new X().bar();\n" + // need a local to involve flow analysis
+				"	 return o3;\n" +
 				"  }\n" +
 				"  @Nullable Object bar() {\n" +
 				"	 return null;\n" +
@@ -13743,12 +13754,12 @@
 			"2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 9)\n" + 
 			"	@Nullable Object foo(Object o, Object o2) { return null; }\n" + 
 			"	                     ^^^^^^\n" + 
-			"Missing nullable annotation: inherited method from X declares this parameter as @Nullable\n" + 
+			"Missing nullable annotation: inherited method from X specifies this parameter as @Nullable\n" + 
 			"----------\n" + 
 			"3. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 9)\n" +
 			"	@Nullable Object foo(Object o, Object o2) { return null; }\n" +
 			"	                               ^^^^^^\n" +
-			"Missing non-null annotation: inherited method from X declares this parameter as @NonNull\n" +
+			"Missing non-null annotation: inherited method from X specifies this parameter as @NonNull\n" +
 			"----------\n" +
 			"3 problems (2 errors, 1 warning)\n",
 			false/*don't flush*/);
@@ -13797,7 +13808,7 @@
 			"2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 9)\n" +
 			"	@Nullable Object foo(Object o, Object o2) { return null; }\n" +
 			"	                     ^^^^^^\n" +
-			"Missing nullable annotation: inherited method from X declares this parameter as @Nullable\n" +
+			"Missing nullable annotation: inherited method from X specifies this parameter as @Nullable\n" +
 			"----------\n" +
 			"2 problems (2 errors)\n",
 			false/*don't flush*/);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java
index c7c9427..0c3c554 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CastTest.java
@@ -2422,6 +2422,55 @@
 		assertEquals("Wrong contents", expectedOutput, result);
 	}
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420283, [1.8] Wrong error "Type is not visible" for cast to intersection type
+public void test420283() {
+	if (this.complianceLevel < ClassFileConstants.JDK1_5)
+		return;
+	if (this.complianceLevel < ClassFileConstants.JDK1_8) {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.io.Serializable;\n" +
+					"import java.util.List;\n" +
+					"public class X {\n" +
+					"    void foo(List<Integer> l) {\n" +
+					"        Integer i = (Integer & Serializable) l.get(0);\n" +
+					"    }\n" +
+					"    public static void main(String [] args) {\n" +
+					"        System.out.println(\"SUCCESS\");\n" +
+					"    }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 5)\n" + 
+				"	Integer i = (Integer & Serializable) l.get(0);\n" + 
+				"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Unnecessary cast from Integer to Integer & Serializable\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	Integer i = (Integer & Serializable) l.get(0);\n" + 
+				"	             ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Additional bounds are not allowed in cast operator at source levels below 1.8\n" + 
+				"----------\n");
+		return;
+	}
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.io.Serializable;\n" +
+				"import java.util.List;\n" +
+				"public class X {\n" +
+				"    void foo(List<Integer> l) {\n" +
+				"        Integer i = (Integer & Serializable) l.get(0);\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        System.out.println(\"SUCCESS\");\n" +
+				"    }\n" +
+				"}\n"
+			},
+			"SUCCESS"
+		);
+}
 public static Class testClass() {
 	return CastTest.class;
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_8.java
new file mode 100644
index 0000000..7aca6c9
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_8.java
@@ -0,0 +1,513 @@
+/*******************************************************************************
+ * Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved.
+ * 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *		Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *			Bug 407191 - [1.8] Binary access support for type annotations
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
+import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
+import org.eclipse.jdt.internal.compiler.env.IBinaryElementValuePair;
+import org.eclipse.jdt.internal.compiler.env.IBinaryField;
+import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
+
+public class ClassFileReaderTest_1_8 extends AbstractRegressionTest {
+	static {
+	}
+
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+	public static Class testClass() {
+		return ClassFileReaderTest_1_8.class;
+	}
+
+	public ClassFileReaderTest_1_8(String name) {
+		super(name);
+	}
+	
+	// Needed to run tests individually from JUnit
+	protected void setUp() throws Exception {
+		super.setUp();
+		this.complianceLevel = ClassFileConstants.JDK1_8;
+	}
+	
+	public void test001_classTypeParameter() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"public class X<@Foo T1,@Bar(iii=99) T2> {}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int iii() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+		
+		IBinaryTypeAnnotation[] typeAnnotations = classFileReader.getTypeAnnotations();
+		assertEquals(2,typeAnnotations.length);
+		
+		assertEquals("@LFoo; CLASS_TYPE_PARAMETER(type_parameter_index=0)", printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar;(iii=(int)99) CLASS_TYPE_PARAMETER(type_parameter_index=1)", printTypeAnnotation(typeAnnotations[1]));
+	}
+	
+	public void test001a_classTypeParameterDifferingRetentions() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"public class X<@Foo T1,@Bar(iii=99) T2> {}\n" +
+			"@Retention(RetentionPolicy.RUNTIME)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int iii() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+		
+		IBinaryTypeAnnotation[] typeAnnotations = classFileReader.getTypeAnnotations();
+		assertEquals(2,typeAnnotations.length);
+		
+		assertEquals("@LBar;(iii=(int)99) CLASS_TYPE_PARAMETER(type_parameter_index=1)", printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LFoo; CLASS_TYPE_PARAMETER(type_parameter_index=0)", printTypeAnnotation(typeAnnotations[1]));
+	}
+	
+	public void test002_methodTypeParameter() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"public class X {\n" +
+			"	<@Foo T1, @Bar(3) T2> void foo(T1 t1,T2 t2) {}\n" + 
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfr = getInternalClassFile("", "X", "X", source);
+		
+		IBinaryMethod method = getMethod(cfr,"foo");
+		assertNotNull(method);
+		IBinaryTypeAnnotation[] typeAnnotations = method.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(2,typeAnnotations.length);
+		assertEquals("@LFoo; METHOD_TYPE_PARAMETER(type_parameter_index=0)",printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar;(value=(int)3) METHOD_TYPE_PARAMETER(type_parameter_index=1)",printTypeAnnotation(typeAnnotations[1]));
+	}
+	
+	public void test003_classExtends() throws Exception {
+		this.complianceLevel = ClassFileConstants.JDK1_8;
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"public class X extends @Foo @Bar(iii=34) Object implements java.io.@Bar(iii=1) Serializable {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int iii() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+		
+		IBinaryTypeAnnotation[] typeAnnotations = classFileReader.getTypeAnnotations();
+		assertEquals(3,typeAnnotations.length);
+		assertEquals("@LFoo; CLASS_EXTENDS(type_index=-1)", printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar;(iii=(int)34) CLASS_EXTENDS(type_index=-1)", printTypeAnnotation(typeAnnotations[1]));
+		assertEquals("@LBar;(iii=(int)1) CLASS_EXTENDS(type_index=0)", printTypeAnnotation(typeAnnotations[2]));
+	}
+
+	public void test004_classExtends() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"public class X extends Y<@Foo String,@Bar Integer> implements I<@Foo String> {\n" +
+			"}\n" +
+			"class Y<T1, T2> {}\n" +
+			"interface I<T1> {}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int iii() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+		
+		IBinaryTypeAnnotation[] typeAnnotations = classFileReader.getTypeAnnotations();
+		assertEquals(3,typeAnnotations.length);
+		assertEquals("@LFoo; CLASS_EXTENDS(type_index=-1), location=[TYPE_ARGUMENT(0)]", printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar; CLASS_EXTENDS(type_index=-1), location=[TYPE_ARGUMENT(1)]", printTypeAnnotation(typeAnnotations[1]));
+		assertEquals("@LFoo; CLASS_EXTENDS(type_index=0), location=[TYPE_ARGUMENT(0)]", printTypeAnnotation(typeAnnotations[2]));
+	}
+	
+	public void test005_classTypeParameterBound() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"public class X<U, T extends Y<@Foo String @Bar(1)[][]@Bar(2)[]> & @Bar(3) Cloneable> {}\n" +
+			"class Y<T> {}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = getInternalClassFile("", "X", "X", source);
+		
+		IBinaryTypeAnnotation[] typeAnnotations = classFileReader.getTypeAnnotations();
+		assertEquals(4,typeAnnotations.length);
+		assertEquals("@LFoo; CLASS_TYPE_PARAMETER_BOUND(type_parameter_index=1, bound_index=0), location=[TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]", printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar;(value=(int)1) CLASS_TYPE_PARAMETER_BOUND(type_parameter_index=1, bound_index=0), location=[TYPE_ARGUMENT(0)]", printTypeAnnotation(typeAnnotations[1]));
+		assertEquals("@LBar;(value=(int)2) CLASS_TYPE_PARAMETER_BOUND(type_parameter_index=1, bound_index=0), location=[TYPE_ARGUMENT(0), ARRAY, ARRAY]", printTypeAnnotation(typeAnnotations[2]));
+		assertEquals("@LBar;(value=(int)3) CLASS_TYPE_PARAMETER_BOUND(type_parameter_index=1, bound_index=1)", printTypeAnnotation(typeAnnotations[3]));
+	}
+	
+	public void test006_methodTypeParameterBound() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"public class X{\n" +
+			"	<T extends Y<@Foo Z @Bar(1)[][]@Bar(2)[]> & @Bar(3) Cloneable> void foo(T t) {}\n" +
+			"}\n" +
+			"class Y<T> {}\n" +
+			"class Z {}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfr = getInternalClassFile("", "X", "X", source);
+
+		IBinaryMethod method = getMethod(cfr,"foo");
+		assertNotNull(method);
+		IBinaryTypeAnnotation[] typeAnnotations = method.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(4,typeAnnotations.length);
+		assertEquals("@LFoo; METHOD_TYPE_PARAMETER_BOUND(type_parameter_index=0, bound_index=0), location=[TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]",printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar;(value=(int)1) METHOD_TYPE_PARAMETER_BOUND(type_parameter_index=0, bound_index=0), location=[TYPE_ARGUMENT(0)]", printTypeAnnotation(typeAnnotations[1]));
+		assertEquals("@LBar;(value=(int)2) METHOD_TYPE_PARAMETER_BOUND(type_parameter_index=0, bound_index=0), location=[TYPE_ARGUMENT(0), ARRAY, ARRAY]", printTypeAnnotation(typeAnnotations[2]));
+		assertEquals("@LBar;(value=(int)3) METHOD_TYPE_PARAMETER_BOUND(type_parameter_index=0, bound_index=1)", printTypeAnnotation(typeAnnotations[3]));
+	}
+	
+	public void test007_field() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"import java.util.Map;\n" +
+			"public class X{\n" +
+			"	@Foo Map<@Bar(1) String, @Bar(2) String @Bar(3)[] @Bar(4)[] @Bar(5)[]> field3;\n" +
+			"}\n" +
+			"class Y<T> {}\n" +
+			"class Z {}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfr = getInternalClassFile("", "X", "X", source);
+
+		IBinaryField field = getField(cfr,"field3");
+		assertNotNull(field);
+		IBinaryTypeAnnotation[] typeAnnotations = field.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(6,typeAnnotations.length);
+		assertEquals("@LFoo; FIELD",printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar;(value=(int)1) FIELD, location=[TYPE_ARGUMENT(0)]", printTypeAnnotation(typeAnnotations[1]));
+		assertEquals("@LBar;(value=(int)2) FIELD, location=[TYPE_ARGUMENT(1), ARRAY, ARRAY, ARRAY]", printTypeAnnotation(typeAnnotations[2]));
+		assertEquals("@LBar;(value=(int)3) FIELD, location=[TYPE_ARGUMENT(1)]", printTypeAnnotation(typeAnnotations[3]));
+		assertEquals("@LBar;(value=(int)4) FIELD, location=[TYPE_ARGUMENT(1), ARRAY]", printTypeAnnotation(typeAnnotations[4]));
+		assertEquals("@LBar;(value=(int)5) FIELD, location=[TYPE_ARGUMENT(1), ARRAY, ARRAY]", printTypeAnnotation(typeAnnotations[5]));
+	}
+	
+	public void test008_methodReturn() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"import java.util.Map;\n" +
+			"public class X{\n" +
+			"	@Bar(3) @Foo int foo() {\n" +
+			"		return 1;\n" +
+			"	}\n" + 
+			"	@Bar(3) int @Foo [] foo2() {\n" +
+			"		return null;\n" +
+			"	}\n" + 
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfr = getInternalClassFile("", "X", "X", source);
+
+		IBinaryMethod method = getMethod(cfr,"foo");
+		assertNotNull(method);
+		IBinaryTypeAnnotation[] typeAnnotations = method.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(2,typeAnnotations.length);
+		assertEquals("@LBar;(value=(int)3) METHOD_RETURN",printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LFoo; METHOD_RETURN", printTypeAnnotation(typeAnnotations[1]));
+		
+		method = getMethod(cfr,"foo2");
+		assertNotNull(method);
+		typeAnnotations = method.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(2,typeAnnotations.length);
+		assertEquals("@LBar;(value=(int)3) METHOD_RETURN, location=[ARRAY]",printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LFoo; METHOD_RETURN", printTypeAnnotation(typeAnnotations[1]));
+	}
+	
+	public void test009_methodReceiver() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"import java.util.Map;\n" +
+			"public class X{\n" +
+			"	void foo(@Bar(3) X this) {}\n" + 
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfr = getInternalClassFile("", "X", "X", source);
+
+		IBinaryMethod method = getMethod(cfr,"foo");
+		assertNotNull(method);
+		IBinaryTypeAnnotation[] typeAnnotations = method.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(1,typeAnnotations.length);
+		assertEquals("@LBar;(value=(int)3) METHOD_RECEIVER", printTypeAnnotation(typeAnnotations[0]));
+	}
+	
+	public void test010_methodFormalParameter() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"import java.util.Map;\n" +
+			"public class X{\n" +
+			"	void foo(@Bar(3) String s, @Foo int i) {}\n" + 
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfr = getInternalClassFile("", "X", "X", source);
+
+		IBinaryMethod method = getMethod(cfr,"foo");
+		assertNotNull(method);
+		IBinaryTypeAnnotation[] typeAnnotations = method.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(2,typeAnnotations.length);
+		assertEquals("@LBar;(value=(int)3) METHOD_FORMAL_PARAMETER(method_formal_parameter_index=0)",printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LFoo; METHOD_FORMAL_PARAMETER(method_formal_parameter_index=1)",printTypeAnnotation(typeAnnotations[1]));
+	}
+	
+	public void test011_throws() throws Exception {
+		String source =
+			"import java.lang.annotation.*;\n" +
+			"import java.util.Map;\n" +
+			"public class X{\n" +
+			"	void foo() throws @Foo Exception, @Bar(1) Throwable {}\n" + 
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Foo {\n" +
+			"}\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Bar {\n" +
+			"        int value() default -1;\n" +
+			"}";
+
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader cfr = getInternalClassFile("", "X", "X", source);
+
+		IBinaryMethod method = getMethod(cfr,"foo");
+		assertNotNull(method);
+		IBinaryTypeAnnotation[] typeAnnotations = method.getTypeAnnotations();
+		assertNotNull(typeAnnotations);
+		assertEquals(2,typeAnnotations.length);
+		assertEquals("@LFoo; THROWS(throws_type_index=0)",printTypeAnnotation(typeAnnotations[0]));
+		assertEquals("@LBar;(value=(int)1) THROWS(throws_type_index=1)",printTypeAnnotation(typeAnnotations[1]));
+	}
+
+	/**
+	 * Produce a nicely formatted type annotation for testing. Exercises the API for type annotations.
+	 * Output examples:<br>
+	 * <tt>@Foo(id=34) CLASS_EXTENDS, type_index=-1, location=[ARRAY, INNER_TYPE, TYPE_ARGUMENT(0)]</tt><br>
+	 */
+	private String printTypeAnnotation(IBinaryTypeAnnotation typeAnnotation) {
+		StringBuffer sb = new StringBuffer();
+		// The annotation:
+		IBinaryAnnotation annotation = typeAnnotation.getAnnotation();
+		sb.append('@').append(annotation.getTypeName());
+		IBinaryElementValuePair[] pairs = annotation.getElementValuePairs();
+		if (pairs.length != 0) {
+			sb.append('(');
+			for (int i = 0; i < pairs.length; i++) {
+				if (i > 0) {
+					sb.append(',');
+				}
+				sb.append(pairs[i].getName()).append('=').append(pairs[i].getValue());
+			}
+			sb.append(')');
+		}
+		sb.append(' ');
+		
+		// target type
+		int targetType = typeAnnotation.getTargetType();
+		switch (targetType) {
+			case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER:
+				sb.append("CLASS_TYPE_PARAMETER(type_parameter_index=").append(typeAnnotation.getTypeParameterIndex()).append(')');
+				break;
+			case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER:
+				sb.append("METHOD_TYPE_PARAMETER(type_parameter_index=").append(typeAnnotation.getTypeParameterIndex()).append(')');
+				break;
+			case AnnotationTargetTypeConstants.CLASS_EXTENDS:
+				sb.append("CLASS_EXTENDS(type_index=").append((short)typeAnnotation.getSupertypeIndex()).append(')');
+				break;
+			case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND:
+				sb.append("CLASS_TYPE_PARAMETER_BOUND(type_parameter_index=").
+					append(typeAnnotation.getTypeParameterIndex()).
+					append(", bound_index=").append(typeAnnotation.getBoundIndex()).
+					append(')');
+				break;
+			case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND:
+				sb.append("METHOD_TYPE_PARAMETER_BOUND(type_parameter_index=").
+					append(typeAnnotation.getTypeParameterIndex()).
+					append(", bound_index=").append(typeAnnotation.getBoundIndex()).
+					append(')');
+				break;
+			case AnnotationTargetTypeConstants.FIELD:
+				sb.append("FIELD");
+				break;
+			case AnnotationTargetTypeConstants.METHOD_RETURN:
+				sb.append("METHOD_RETURN");
+				break;
+			case AnnotationTargetTypeConstants.METHOD_RECEIVER:
+				sb.append("METHOD_RECEIVER");
+				break;
+			case AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER :
+				sb.append("METHOD_FORMAL_PARAMETER(method_formal_parameter_index=").
+					append(typeAnnotation.getMethodFormalParameterIndex()).append(')');
+				break;
+			case AnnotationTargetTypeConstants.THROWS :
+				sb.append("THROWS(throws_type_index=").
+					append(typeAnnotation.getThrowsTypeIndex()).append(')');
+				break;
+			default: throw new IllegalStateException("nyi "+targetType);
+		}
+		
+		// location
+		int[] typepath = typeAnnotation.getTypePath();
+		
+		if (typepath != IBinaryTypeAnnotation.NO_TYPE_PATH) {
+			sb.append(", location=["); //$NON-NLS-1$
+			for (int i = 0, max = typepath.length; i < max; i += 2) {
+				if (i > 0) {
+					sb.append(", "); //$NON-NLS-1$
+				}
+				switch (typepath[i]) {
+					case 0:
+						sb.append("ARRAY"); //$NON-NLS-1$
+						break;
+					case 1:
+						sb.append("INNER_TYPE"); //$NON-NLS-1$
+						break;
+					case 2:
+						sb.append("WILDCARD"); //$NON-NLS-1$
+						break;
+					case 3:
+						sb.append("TYPE_ARGUMENT(").append(typepath[i+1]).append(')'); //$NON-NLS-1$
+						break;
+				}
+			}
+			sb.append(']');
+		}
+		return sb.toString();
+	}
+
+	private IBinaryMethod getMethod(ClassFileReader cfr,String methodname) {
+		IBinaryMethod[] methods = cfr.getMethods();
+		if (methods == null) {
+			return null;
+		}
+		char[] methodnameAsCharArray = methodname.toCharArray();
+		for (int i = 0, max = methods.length; i < max; i++) {
+			if (CharOperation.equals(methods[i].getSelector(),methodnameAsCharArray)) {
+				return methods[i];
+			}
+		}
+		return null;
+	}
+
+	private IBinaryField getField(ClassFileReader cfr,String fieldname) {
+		IBinaryField[] fields = cfr.getFields();
+		if (fields == null) {
+			return null;
+		}
+		char[] fieldnameAsCharArray = fieldname.toCharArray();
+		for (int i = 0, max = fields.length; i < max; i++) {
+			if (CharOperation.equals(fields[i].getName(),fieldnameAsCharArray)) {
+				return fields[i];
+			}
+		}
+		return null;
+	}
+	
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
index 2699840..86d3359 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
@@ -16,11 +20,27 @@
  *								bug 365662 - [compiler][null] warn on contradictory and redundant null annotations
  *								bug 365859 - [compiler][null] distinguish warnings based on flow analysis vs. null annotations
  *								bug 374605 - Unreasonable warning for enum-based switch statements
+ *								bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
+ *								bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 381443 - [compiler][null] Allow parameter widening from @NonNull to unannotated
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 382789 - [compiler][null] warn when syntactically-nonnull expression is compared against null
+ *								bug 402028 - [1.8][compiler] null analysis for reference expressions 
+ *								bug 401796 - [1.8][compiler] don't treat default methods as overriding an independent inherited abstract method
+ *								bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
  *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+ *     Jesper S Moller - Contributions for
+ *								bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
+ *								bug 384567 - [1.5][compiler] Compiler accepts illegal modifiers on package declaration
+ *								bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
+ *								bug 419209 - [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -369,6 +389,7 @@
 		expectedProblemAttributes.put("ArgumentTypeNotFound", DEPRECATED);
 		expectedProblemAttributes.put("ArgumentTypeNotVisible", DEPRECATED);
 		expectedProblemAttributes.put("ArrayConstantsOnlyInArrayInitializers", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("ArrayReferencePotentialNullReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("ArrayReferenceRequired", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("AssignmentHasNoEffect", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("AssignmentToMultiCatchParameter", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
@@ -409,28 +430,45 @@
 		expectedProblemAttributes.put("CodeCannotBeReached", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("CodeSnippetMissingClass", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("CodeSnippetMissingMethod", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("ContainerAnnotationTypeHasNonDefaultMembers", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("ContainerAnnotationTypeHasShorterRetention", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("ContainerAnnotationTypeHasWrongValueType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("ContainerAnnotationTypeMustHaveValue", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("ContradictoryNullAnnotations", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("ContradictoryNullAnnotationsOnBound", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("ComparingIdentical", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("ConflictingImport", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
 		expectedProblemAttributes.put("ConflictingNullAnnotations", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("ConstructedArrayIncompatible", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("ConstructionTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("ConflictingInheritedNullAnnotations", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("ConstructorReferenceNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("CorruptedSignature", new ProblemAttributes(CategorizedProblem.CAT_BUILDPATH));
+		expectedProblemAttributes.put("DanglingReference", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("DeadCode", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("DefaultMethodNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("DefaultMethodOverridesObjectMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("DereferencingNullableExpression", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("DiamondNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("DirectInvocationOfAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("DisallowedTargetForContainerAnnotationType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("DisallowedTargetForAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("DisallowedExplicitThisParameter", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("DiscouragedReference", new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
 		expectedProblemAttributes.put("DuplicateAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("DuplicateAnnotationNotMarkedRepeatable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("DuplicateAnnotationMember", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("DuplicateBounds", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("DuplicateBoundInIntersectionCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("DuplicateCase", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("DuplicateDefaultCase", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("DuplicateField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("DuplicateFinalLocalInitialization", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("DuplicateImport", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
 		expectedProblemAttributes.put("DuplicateInheritedMethods", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("DuplicateInheritedDefaultMethods", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("DuplicateLabel", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("DuplicateMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("DuplicateMethodErasure", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -459,11 +497,15 @@
 		expectedProblemAttributes.put("ExceptionTypeInternalNameProvided", DEPRECATED);
 		expectedProblemAttributes.put("ExceptionTypeNotFound", DEPRECATED);
 		expectedProblemAttributes.put("ExceptionTypeNotVisible", DEPRECATED);
+		expectedProblemAttributes.put("ExplicitThisParameterNotInLambda", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("ExplicitThisParameterNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("ExplicitlyClosedAutoCloseable", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
 		expectedProblemAttributes.put("ExpressionShouldBeAVariable", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("ExternalProblemFixable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("ExternalProblemNotFixable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("ExplicitAnnotationTargetRequired", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("FallthroughCase", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("FieldComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("FieldHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
 		expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
 		expectedProblemAttributes.put("FieldMissingDeprecatedAnnotation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
@@ -486,10 +528,13 @@
 		expectedProblemAttributes.put("HierarchyCircularitySelfReference", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("HierarchyHasProblems", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalAccessFromTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalAnnotationForBaseType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalClassLiteralForTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IllegalDeclarationOfThisParameter", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("IllegalDefaultModifierSpecification", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalDefinitionToNonNullParameter", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("IllegalDimension", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("IllegalEnclosingInstanceSpecification", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -499,8 +544,10 @@
 		expectedProblemAttributes.put("IllegalHexaLiteral", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalInstanceofParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("IllegalInstanceofTypeParameter", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("IllegalBasetypeInIntersectionCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierCombinationFinalAbstractForClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierCombinationFinalVolatileForField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("IllegalModifierCombinationForInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalModifierForAnnotationField", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("IllegalModifierForAnnotationMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierForAnnotationMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
@@ -515,6 +562,7 @@
 		expectedProblemAttributes.put("IllegalModifierForInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierForInterfaceField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalModifierForInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("IllegalModifierForInterfaceMethod18", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalModifierForLocalClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierForLocalEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierForMemberClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -522,16 +570,24 @@
 		expectedProblemAttributes.put("IllegalModifierForMemberInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalModifierForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalModifierForVariable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("IllegalModifiersForElidedType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("IllegalModifiers", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IllegalQualifierForExplicitThis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("IllegalQualifierForExplicitThis2", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("IllegalStaticModifierForMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("IllegalTypeForExplicitThis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalTypeVariableSuperReference", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("IllegalUnderscorePosition", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("IllegalUsageOfTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("IllegalVararg", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("IllegalVarargInLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
@@ -544,11 +600,14 @@
 		expectedProblemAttributes.put("IncompatibleExceptionInInheritedMethodThrowsClause", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IncompatibleExceptionInThrowsClause", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+		expectedProblemAttributes.put("IncompatibleLambdaParameterType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IncompatibleMethodReference", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IncompatibleReturnType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("IncompatibleReturnTypeForNonInheritedInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
 		expectedProblemAttributes.put("IncompatibleTypesInConditionalOperator", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IncompatibleTypesInEqualityOperator", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IncompatibleTypesInForeach", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		
 		expectedProblemAttributes.put("IncorrectArityForParameterizedConstructor", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IncorrectArityForParameterizedMethod", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IncorrectArityForParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -558,6 +617,7 @@
 		expectedProblemAttributes.put("IndirectAccessToStaticField", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
 		expectedProblemAttributes.put("IndirectAccessToStaticMethod", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
 		expectedProblemAttributes.put("IndirectAccessToStaticType", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+		expectedProblemAttributes.put("InheritedDefaultMethodConflictsWithOtherInherited", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("InheritedFieldHidesEnclosingName", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("InheritedIncompatibleReturnType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("InheritedMethodHidesEnclosingName", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
@@ -572,9 +632,12 @@
 		expectedProblemAttributes.put("InterfaceInheritedNameHidesEnclosingName", DEPRECATED);
 		expectedProblemAttributes.put("InterfaceInternalNameProvided", DEPRECATED);
 		expectedProblemAttributes.put("InterfaceNotFound", DEPRECATED);
+		expectedProblemAttributes.put("InterfaceNotFunctionalInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("InterfaceNotVisible", DEPRECATED);
 		expectedProblemAttributes.put("InternalTypeNameProvided", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IntersectionCastNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("InvalidAnnotationMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("InvalidArrayConstructorReference", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("InvalidBinary", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidBreak", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("InvalidCatchBlockSequence", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -592,6 +655,7 @@
 		expectedProblemAttributes.put("InvalidHighSurrogate", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidInput", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidLowSurrogate", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("InvalidLocationForModifiers", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidNullToSynchronized", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("InvalidOctal", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidOperator", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
@@ -611,6 +675,7 @@
 		expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfForeachStatements", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfStaticImports", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfTypeParameters", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
@@ -687,6 +752,10 @@
 		expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
 		expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
 		expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+		expectedProblemAttributes.put("LambdaDescriptorMentionsUnmentionable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("LambdaExpressionNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("LambdaRedeclaresArgument", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("LambdaRedeclaresLocal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", DEPRECATED);
 		expectedProblemAttributes.put("LocalVariableCannotBeNull", DEPRECATED);
 		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
@@ -703,9 +772,12 @@
 		expectedProblemAttributes.put("MethodNameClash", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("MethodNameClashHidden", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("MethodReducesVisibility", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("MethodReferenceNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("MethodReferenceSwingsBothWays", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("MethodRequiresBody", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("MethodReturnsVoid", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("MisplacedTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("MissingDefaultCase", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("MissingEnclosingInstance", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -725,6 +797,8 @@
 		expectedProblemAttributes.put("MissingTypeInMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("MissingValueForAnnotationMember", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("MultiCatchNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+		expectedProblemAttributes.put("MultipleFunctionalInterfaces", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("StaticInterfaceMethodNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("MustDefineEitherDimensionExpressionsOrInitializer", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("MustSpecifyPackage", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("NativeMethodsCannotBeStrictfp", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
@@ -734,6 +808,7 @@
 		expectedProblemAttributes.put("NeedToEmulateMethodAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
 		expectedProblemAttributes.put("NoAdditionalBoundAfterTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("NoFieldOnBaseType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("NoGenericLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("NoImplicitStringConversionForCharArrayExpression", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("NoMessageSendOnArrayType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("NoMessageSendOnBaseType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
@@ -751,6 +826,7 @@
 		expectedProblemAttributes.put("NonStaticAccessToStaticMethod", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
 		expectedProblemAttributes.put("NonStaticContextForEnumMemberType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("NonStaticFieldFromStaticInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("NonStaticOrAlienTypeReceiver", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("NonStaticTypeFromStaticInvocation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("NotVisibleConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("NotVisibleConstructorInDefaultConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
@@ -759,10 +835,17 @@
 		expectedProblemAttributes.put("NotVisibleMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("NotVisibleType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("NullableFieldReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("NullAnnotationUnsupportedLocation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("NullAnnotationUnsupportedLocationAtType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("NullExpressionReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("NullLocalVariableComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("NullLocalVariableInstanceofYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("NullLocalVariableReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("NullityMismatchingTypeAnnotation", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("NullityMismatchingTypeAnnotationSuperHint", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("NullityMismatchTypeArgument", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetail", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetailSuperHint", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("NullSourceString", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("NullUnboxing", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("NumericValueOutOfRange", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
@@ -770,6 +853,7 @@
 		expectedProblemAttributes.put("ObjectCannotHaveSuperTypes", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("ObjectHasNoSuperclass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("ObjectMustBeClass", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("OuterLocalMustBeEffectivelyFinal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("OuterLocalMustBeFinal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("OverridingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
 		expectedProblemAttributes.put("OverridingMethodWithoutSuperInvocation", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
@@ -817,6 +901,8 @@
 		expectedProblemAttributes.put("RedundantSpecificationOfTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
 		expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("RedundantNullAnnotation", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+		expectedProblemAttributes.put("RedundantNullCheckAgainstNonNullType", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("RedundantNullCheckOnField", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("RedundantNullCheckOnNonNullExpression", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("RedundantNullCheckOnNonNullSpecdField", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
@@ -828,12 +914,21 @@
 		expectedProblemAttributes.put("RedundantNullDefaultAnnotationType", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
 		expectedProblemAttributes.put("RedundantNullDefaultAnnotationMethod", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
 		expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+		expectedProblemAttributes.put("ReferenceExpressionParameterMismatchPromisedNullable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("ReferenceExpressionParameterRequiredNonnullUnchecked", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("ReferenceExpressionReturnNullRedef", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+		expectedProblemAttributes.put("ReferenceExpressionReturnNullRedefUnchecked", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("ReferenceToForwardField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("RequiredNonNullButProvidedNull", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("RequiredNonNullButProvidedPotentialNull", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("RequiredNonNullButProvidedSpecdNullable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("RequiredNonNullButProvidedUnknown", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("ReferenceToForwardTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("RepeatableAnnotationTypeIsDocumented", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("RepeatableAnnotationTypeIsInherited", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("RepeatableAnnotationTypeTargetMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("RepeatableAnnotationWithRepeatingContainerAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("RepeatedAnnotationWithContainerAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("ResourceHasToImplementAutoCloseable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("ReturnTypeAmbiguous", DEPRECATED);
 		expectedProblemAttributes.put("ReturnTypeCannotBeVoidArray", DEPRECATED);
@@ -850,7 +945,10 @@
 		expectedProblemAttributes.put("StaticInheritedMethodConflicts", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("StaticMemberOfParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("StaticMethodRequested", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("StaticMethodShouldBeAccessedStatically", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+		expectedProblemAttributes.put("SuperAccessCannotBypassDirectSuper", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("SuperCallCannotBypassOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
 		expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("SuperInterfacesCollide", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("SuperTypeUsingWildcard", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
@@ -863,9 +961,11 @@
 		expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("SwitchOnEnumNotBelow15", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("SwitchOnStringsNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("TargetTypeNotAFunctionalInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("Task", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("ThisInStaticContext", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+		expectedProblemAttributes.put("ToleratedMisplacedTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("TooManyArgumentSlots", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("TooManyArrayDimensions", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
 		expectedProblemAttributes.put("TooManyBytesForStringConstant", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
@@ -926,6 +1026,7 @@
 		expectedProblemAttributes.put("UnsafeElementTypeConversion", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
 		expectedProblemAttributes.put("UnsafeGenericArrayForVarargs", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
 		expectedProblemAttributes.put("UnsafeGenericCast", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+		expectedProblemAttributes.put("UnsafeNullnessCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
 		expectedProblemAttributes.put("UnsafeRawConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
 		expectedProblemAttributes.put("UnsafeRawFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
 		expectedProblemAttributes.put("UnsafeRawGenericConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
@@ -950,6 +1051,7 @@
 		expectedProblemAttributes.put("UnusedWarningToken", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
 		expectedProblemAttributes.put("UseAssertAsAnIdentifier", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
 		expectedProblemAttributes.put("UseEnumAsAnIdentifier", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+		expectedProblemAttributes.put("IllegalUseOfUnderscoreAsAnIdentifier", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
 		expectedProblemAttributes.put("UsingDeprecatedConstructor", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
 		expectedProblemAttributes.put("UsingDeprecatedField", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
 		expectedProblemAttributes.put("UsingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
@@ -963,7 +1065,11 @@
 		expectedProblemAttributes.put("WildcardConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("WildcardFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("WildcardMethodInvocation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("illFormedParameterizationOfFunctionalInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("lambdaParameterTypeMismatched", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("lambdaSignatureMismatched", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 		expectedProblemAttributes.put("IllegalArrayOfUnionType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+		expectedProblemAttributes.put("IllegalArrayTypeInIntersectionCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
 //{ObjectTeams: new problems (incomplete list):
         //expectedProblemAttributes.put("", new ProblemAttributes(CategorizedProblem.CAT_UNSPECIFIED));
         expectedProblemAttributes.put("OTJ_RELATED", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
@@ -1176,6 +1282,7 @@
 		expectedProblemAttributes.put("ArgumentTypeNotFound", SKIP);
 		expectedProblemAttributes.put("ArgumentTypeNotVisible", SKIP);
 		expectedProblemAttributes.put("ArrayConstantsOnlyInArrayInitializers", SKIP);
+		expectedProblemAttributes.put("ArrayReferencePotentialNullReference", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
 		expectedProblemAttributes.put("ArrayReferenceRequired", SKIP);
 		expectedProblemAttributes.put("AssignmentHasNoEffect", new ProblemAttributes(JavaCore.COMPILER_PB_NO_EFFECT_ASSIGNMENT));
 		expectedProblemAttributes.put("AssignmentToMultiCatchParameter", SKIP);
@@ -1219,25 +1326,41 @@
 		expectedProblemAttributes.put("ComparingIdentical", new ProblemAttributes(JavaCore.COMPILER_PB_COMPARING_IDENTICAL));
 		expectedProblemAttributes.put("ConflictingImport", SKIP);
 		expectedProblemAttributes.put("ConflictingNullAnnotations", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+		expectedProblemAttributes.put("ConstructedArrayIncompatible", SKIP);
+		expectedProblemAttributes.put("ConstructionTypeMismatch", SKIP);
 		expectedProblemAttributes.put("ConflictingInheritedNullAnnotations", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+		expectedProblemAttributes.put("ConstructorReferenceNotBelow18", SKIP);
+		expectedProblemAttributes.put("ContainerAnnotationTypeHasNonDefaultMembers", SKIP);
+		expectedProblemAttributes.put("ContainerAnnotationTypeHasShorterRetention", SKIP);
+		expectedProblemAttributes.put("ContainerAnnotationTypeHasWrongValueType", SKIP);
+		expectedProblemAttributes.put("ContainerAnnotationTypeMustHaveValue", SKIP);
 		expectedProblemAttributes.put("ContradictoryNullAnnotations", SKIP);
+		expectedProblemAttributes.put("ContradictoryNullAnnotationsOnBound", SKIP);
 		expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
 		expectedProblemAttributes.put("CorruptedSignature", SKIP);
+		expectedProblemAttributes.put("DanglingReference", SKIP);
 		expectedProblemAttributes.put("DeadCode", new ProblemAttributes(JavaCore.COMPILER_PB_DEAD_CODE));
+		expectedProblemAttributes.put("DefaultMethodNotBelow18", SKIP);
+		expectedProblemAttributes.put("DefaultMethodOverridesObjectMethod", SKIP);
+		expectedProblemAttributes.put("DereferencingNullableExpression", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
 		expectedProblemAttributes.put("DiamondNotBelow17", SKIP);
 		expectedProblemAttributes.put("DirectInvocationOfAbstractMethod", SKIP);
 		expectedProblemAttributes.put("DisallowedTargetForAnnotation", SKIP);
+		expectedProblemAttributes.put("DisallowedTargetForContainerAnnotationType", SKIP);
 		expectedProblemAttributes.put("DiscouragedReference", new ProblemAttributes(JavaCore.COMPILER_PB_DISCOURAGED_REFERENCE));
 		expectedProblemAttributes.put("DuplicateAnnotation", SKIP);
+		expectedProblemAttributes.put("DuplicateAnnotationNotMarkedRepeatable", SKIP);
 		expectedProblemAttributes.put("DuplicateAnnotationMember", SKIP);
 		expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", SKIP);
 		expectedProblemAttributes.put("DuplicateBounds", SKIP);
+		expectedProblemAttributes.put("DuplicateBoundInIntersectionCast", SKIP);
 		expectedProblemAttributes.put("DuplicateCase", SKIP);
 		expectedProblemAttributes.put("DuplicateDefaultCase", SKIP);
 		expectedProblemAttributes.put("DuplicateField", SKIP);
 		expectedProblemAttributes.put("DuplicateFinalLocalInitialization", SKIP);
 		expectedProblemAttributes.put("DuplicateImport", SKIP);
 		expectedProblemAttributes.put("DuplicateInheritedMethods", SKIP);
+		expectedProblemAttributes.put("DuplicateInheritedDefaultMethods", SKIP);
 		expectedProblemAttributes.put("DuplicateLabel", SKIP);
 		expectedProblemAttributes.put("DuplicateMethod", SKIP);
 		expectedProblemAttributes.put("DuplicateMethodErasure", SKIP);
@@ -1266,11 +1389,15 @@
 		expectedProblemAttributes.put("ExceptionTypeInternalNameProvided", SKIP);
 		expectedProblemAttributes.put("ExceptionTypeNotFound", SKIP);
 		expectedProblemAttributes.put("ExceptionTypeNotVisible", SKIP);
+		expectedProblemAttributes.put("ExplicitThisParameterNotInLambda", SKIP);
+		expectedProblemAttributes.put("ExplicitThisParameterNotBelow18", SKIP);
 		expectedProblemAttributes.put("ExplicitlyClosedAutoCloseable", new ProblemAttributes(JavaCore.COMPILER_PB_EXPLICITLY_CLOSED_AUTOCLOSEABLE));
 		expectedProblemAttributes.put("ExpressionShouldBeAVariable", SKIP);
 		expectedProblemAttributes.put("ExternalProblemFixable", SKIP);
 		expectedProblemAttributes.put("ExternalProblemNotFixable", SKIP);
+		expectedProblemAttributes.put("ExplicitAnnotationTargetRequired", SKIP);
 		expectedProblemAttributes.put("FallthroughCase", new ProblemAttributes(JavaCore.COMPILER_PB_FALLTHROUGH_CASE));
+		expectedProblemAttributes.put("FieldComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
 		expectedProblemAttributes.put("FieldHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
 		expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
 		expectedProblemAttributes.put("FieldMissingDeprecatedAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
@@ -1293,10 +1420,13 @@
 		expectedProblemAttributes.put("HierarchyCircularitySelfReference", SKIP);
 		expectedProblemAttributes.put("HierarchyHasProblems", SKIP);
 		expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod", SKIP);
+		expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod", SKIP);
 		expectedProblemAttributes.put("IllegalAccessFromTypeVariable", SKIP);
 		expectedProblemAttributes.put("IllegalAnnotationForBaseType", SKIP);
 		expectedProblemAttributes.put("IllegalCast", SKIP);
 		expectedProblemAttributes.put("IllegalClassLiteralForTypeVariable", SKIP);
+		expectedProblemAttributes.put("IllegalDeclarationOfThisParameter", SKIP);
+		expectedProblemAttributes.put("IllegalDefaultModifierSpecification", SKIP);
 		expectedProblemAttributes.put("IllegalDefinitionToNonNullParameter", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
 		expectedProblemAttributes.put("IllegalDimension", SKIP);
 		expectedProblemAttributes.put("IllegalEnclosingInstanceSpecification", SKIP);
@@ -1306,8 +1436,10 @@
 		expectedProblemAttributes.put("IllegalHexaLiteral", SKIP);
 		expectedProblemAttributes.put("IllegalInstanceofParameterizedType", SKIP);
 		expectedProblemAttributes.put("IllegalInstanceofTypeParameter", SKIP);
+		expectedProblemAttributes.put("IllegalBasetypeInIntersectionCast", SKIP);
 		expectedProblemAttributes.put("IllegalModifierCombinationFinalAbstractForClass", SKIP);
 		expectedProblemAttributes.put("IllegalModifierCombinationFinalVolatileForField", SKIP);
+		expectedProblemAttributes.put("IllegalModifierCombinationForInterfaceMethod", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForAnnotationField", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForAnnotationMemberType", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForAnnotationMethod", SKIP);
@@ -1322,6 +1454,7 @@
 		expectedProblemAttributes.put("IllegalModifierForInterface", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForInterfaceField", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForInterfaceMethod", SKIP);
+		expectedProblemAttributes.put("IllegalModifierForInterfaceMethod18", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForLocalClass", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForLocalEnum", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForMemberClass", SKIP);
@@ -1329,16 +1462,24 @@
 		expectedProblemAttributes.put("IllegalModifierForMemberInterface", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForMethod", SKIP);
 		expectedProblemAttributes.put("IllegalModifierForVariable", SKIP);
+		expectedProblemAttributes.put("IllegalModifiersForElidedType", SKIP);
+		expectedProblemAttributes.put("IllegalModifiers", SKIP);
 		expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", SKIP);
 		expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel", SKIP);
 		expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation", SKIP);
+		expectedProblemAttributes.put("IllegalQualifierForExplicitThis", SKIP);
+		expectedProblemAttributes.put("IllegalQualifierForExplicitThis2", SKIP);
 		expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
 		expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
 		expectedProblemAttributes.put("IllegalStaticModifierForMemberType", SKIP);
+		expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess", SKIP);
+		expectedProblemAttributes.put("IllegalTypeForExplicitThis", SKIP);
 		expectedProblemAttributes.put("IllegalTypeVariableSuperReference", SKIP);
 		expectedProblemAttributes.put("IllegalUnderscorePosition", SKIP);
 		expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference", SKIP);
+		expectedProblemAttributes.put("IllegalUsageOfTypeAnnotations", SKIP);
 		expectedProblemAttributes.put("IllegalVararg", SKIP);
+		expectedProblemAttributes.put("IllegalVarargInLambda", SKIP);
 		expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForField", SKIP);
 		expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMemberType", SKIP);
 		expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMethod", SKIP);
@@ -1356,6 +1497,8 @@
 		expectedProblemAttributes.put("IncompatibleTypesInConditionalOperator", SKIP);
 		expectedProblemAttributes.put("IncompatibleTypesInEqualityOperator", SKIP);
 		expectedProblemAttributes.put("IncompatibleTypesInForeach", SKIP);
+		expectedProblemAttributes.put("IncompatibleLambdaParameterType", SKIP);
+		expectedProblemAttributes.put("IncompatibleMethodReference", SKIP);
 		expectedProblemAttributes.put("IncorrectArityForParameterizedConstructor", SKIP);
 		expectedProblemAttributes.put("IncorrectArityForParameterizedMethod", SKIP);
 		expectedProblemAttributes.put("IncorrectArityForParameterizedType", SKIP);
@@ -1365,6 +1508,7 @@
 		expectedProblemAttributes.put("IndirectAccessToStaticField", new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
 		expectedProblemAttributes.put("IndirectAccessToStaticMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
 		expectedProblemAttributes.put("IndirectAccessToStaticType", new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
+		expectedProblemAttributes.put("InheritedDefaultMethodConflictsWithOtherInherited", SKIP);
 		expectedProblemAttributes.put("InheritedFieldHidesEnclosingName", SKIP);
 		expectedProblemAttributes.put("InheritedIncompatibleReturnType", SKIP);
 		expectedProblemAttributes.put("InheritedMethodHidesEnclosingName", SKIP);
@@ -1379,9 +1523,12 @@
 		expectedProblemAttributes.put("InterfaceInheritedNameHidesEnclosingName", SKIP);
 		expectedProblemAttributes.put("InterfaceInternalNameProvided", SKIP);
 		expectedProblemAttributes.put("InterfaceNotFound", SKIP);
+		expectedProblemAttributes.put("InterfaceNotFunctionalInterface", SKIP);
 		expectedProblemAttributes.put("InterfaceNotVisible", SKIP);
 		expectedProblemAttributes.put("InternalTypeNameProvided", SKIP);
+		expectedProblemAttributes.put("IntersectionCastNotBelow18", SKIP);
 		expectedProblemAttributes.put("InvalidAnnotationMemberType", SKIP);
+		expectedProblemAttributes.put("InvalidArrayConstructorReference", SKIP);
 		expectedProblemAttributes.put("InvalidBinary", SKIP);
 		expectedProblemAttributes.put("InvalidBreak", SKIP);
 		expectedProblemAttributes.put("InvalidCatchBlockSequence", SKIP);
@@ -1399,6 +1546,7 @@
 		expectedProblemAttributes.put("InvalidHighSurrogate", SKIP);
 		expectedProblemAttributes.put("InvalidInput", SKIP);
 		expectedProblemAttributes.put("InvalidLowSurrogate", SKIP);
+		expectedProblemAttributes.put("InvalidLocationForModifiers", SKIP);
 		expectedProblemAttributes.put("InvalidNullToSynchronized", SKIP);
 		expectedProblemAttributes.put("InvalidOctal", SKIP);
 		expectedProblemAttributes.put("InvalidOperator", SKIP);
@@ -1417,7 +1565,9 @@
 		expectedProblemAttributes.put("InvalidUsageOfAnnotations", SKIP);
 		expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", SKIP);
 		expectedProblemAttributes.put("InvalidUsageOfForeachStatements", SKIP);
+		expectedProblemAttributes.put("InvalidUsageOfReceiverAnnotations", SKIP);
 		expectedProblemAttributes.put("InvalidUsageOfStaticImports", SKIP);
+		expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", SKIP);
 		expectedProblemAttributes.put("InvalidUsageOfTypeArguments", SKIP);
 		expectedProblemAttributes.put("InvalidUsageOfTypeParameters", SKIP);
 		expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration", SKIP);
@@ -1494,6 +1644,10 @@
 		expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
 		expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
 		expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+		expectedProblemAttributes.put("LambdaDescriptorMentionsUnmentionable", SKIP);
+		expectedProblemAttributes.put("LambdaExpressionNotBelow18", SKIP);
+		expectedProblemAttributes.put("LambdaRedeclaresArgument", SKIP);
+		expectedProblemAttributes.put("LambdaRedeclaresLocal", SKIP);
 		expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", SKIP);
 		expectedProblemAttributes.put("LocalVariableCannotBeNull", SKIP);
 		expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
@@ -1510,9 +1664,12 @@
 		expectedProblemAttributes.put("MethodNameClash", SKIP);
 		expectedProblemAttributes.put("MethodNameClashHidden", SKIP);
 		expectedProblemAttributes.put("MethodReducesVisibility", SKIP);
+		expectedProblemAttributes.put("MethodReferenceNotBelow18", SKIP);
+		expectedProblemAttributes.put("MethodReferenceSwingsBothWays", SKIP);
 		expectedProblemAttributes.put("MethodRequiresBody", SKIP);
 		expectedProblemAttributes.put("MethodReturnsVoid", SKIP);
 		expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
+		expectedProblemAttributes.put("MisplacedTypeAnnotations", SKIP);
 		expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType", SKIP);
 		expectedProblemAttributes.put("MissingDefaultCase", new ProblemAttributes(JavaCore.COMPILER_PB_SWITCH_MISSING_DEFAULT_CASE));
 		expectedProblemAttributes.put("MissingEnclosingInstance", SKIP);
@@ -1532,6 +1689,8 @@
 		expectedProblemAttributes.put("MissingTypeInMethod", SKIP);
 		expectedProblemAttributes.put("MissingValueForAnnotationMember", SKIP);
 		expectedProblemAttributes.put("MultiCatchNotBelow17", SKIP);
+		expectedProblemAttributes.put("MultipleFunctionalInterfaces", SKIP);
+		expectedProblemAttributes.put("StaticInterfaceMethodNotBelow18", SKIP);
 		expectedProblemAttributes.put("MustDefineEitherDimensionExpressionsOrInitializer", SKIP);
 		expectedProblemAttributes.put("MustSpecifyPackage", SKIP);
 		expectedProblemAttributes.put("NativeMethodsCannotBeStrictfp", SKIP);
@@ -1541,6 +1700,7 @@
 		expectedProblemAttributes.put("NeedToEmulateMethodAccess", new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
 		expectedProblemAttributes.put("NoAdditionalBoundAfterTypeVariable", SKIP);
 		expectedProblemAttributes.put("NoFieldOnBaseType", SKIP);
+		expectedProblemAttributes.put("NoGenericLambda", SKIP);
 		expectedProblemAttributes.put("NoImplicitStringConversionForCharArrayExpression", new ProblemAttributes(JavaCore.COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION));
 		expectedProblemAttributes.put("NoMessageSendOnArrayType", SKIP);
 		expectedProblemAttributes.put("NoMessageSendOnBaseType", SKIP);
@@ -1558,6 +1718,7 @@
 		expectedProblemAttributes.put("NonStaticAccessToStaticMethod", new ProblemAttributes(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER));
 		expectedProblemAttributes.put("NonStaticContextForEnumMemberType", SKIP);
 		expectedProblemAttributes.put("NonStaticFieldFromStaticInvocation", SKIP);
+		expectedProblemAttributes.put("NonStaticOrAlienTypeReceiver", SKIP);
 		expectedProblemAttributes.put("NonStaticTypeFromStaticInvocation", SKIP);
 		expectedProblemAttributes.put("NotVisibleConstructor", SKIP);
 		expectedProblemAttributes.put("NotVisibleConstructorInDefaultConstructor", SKIP);
@@ -1566,6 +1727,13 @@
 		expectedProblemAttributes.put("NotVisibleMethod", SKIP);
 		expectedProblemAttributes.put("NotVisibleType", SKIP);
 		expectedProblemAttributes.put("NullableFieldReference", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
+		expectedProblemAttributes.put("NullAnnotationUnsupportedLocation", SKIP);
+		expectedProblemAttributes.put("NullAnnotationUnsupportedLocationAtType", SKIP);
+		expectedProblemAttributes.put("NullityMismatchingTypeAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+		expectedProblemAttributes.put("NullityMismatchingTypeAnnotationSuperHint", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+		expectedProblemAttributes.put("NullityMismatchTypeArgument", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+		expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetail", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+		expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetailSuperHint", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
 		expectedProblemAttributes.put("NullExpressionReference", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
 		expectedProblemAttributes.put("NullLocalVariableComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
 		expectedProblemAttributes.put("NullLocalVariableInstanceofYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
@@ -1577,6 +1745,7 @@
 		expectedProblemAttributes.put("ObjectCannotHaveSuperTypes", SKIP);
 		expectedProblemAttributes.put("ObjectHasNoSuperclass", SKIP);
 		expectedProblemAttributes.put("ObjectMustBeClass", SKIP);
+		expectedProblemAttributes.put("OuterLocalMustBeEffectivelyFinal", SKIP);
 		expectedProblemAttributes.put("OuterLocalMustBeFinal", SKIP);
 		expectedProblemAttributes.put("OverridingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
 		expectedProblemAttributes.put("OverridingMethodWithoutSuperInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_OVERRIDING_METHOD_WITHOUT_SUPER_INVOCATION));
@@ -1624,6 +1793,8 @@
 		expectedProblemAttributes.put("RedundantSpecificationOfTypeArguments", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS));
 		expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
 		expectedProblemAttributes.put("RedundantNullAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+		expectedProblemAttributes.put("RedundantNullCheckAgainstNonNullType", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+		expectedProblemAttributes.put("RedundantNullCheckOnField", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
 		expectedProblemAttributes.put("RedundantNullCheckOnNonNullExpression", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
 		expectedProblemAttributes.put("RedundantNullCheckOnNonNullSpecdField", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
 		expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
@@ -1635,8 +1806,17 @@
 		expectedProblemAttributes.put("RedundantNullDefaultAnnotationType", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
 		expectedProblemAttributes.put("RedundantNullDefaultAnnotationMethod", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
 		expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
+		expectedProblemAttributes.put("ReferenceExpressionParameterMismatchPromisedNullable", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+		expectedProblemAttributes.put("ReferenceExpressionParameterRequiredNonnullUnchecked", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+		expectedProblemAttributes.put("ReferenceExpressionReturnNullRedef", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+		expectedProblemAttributes.put("ReferenceExpressionReturnNullRedefUnchecked", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
 		expectedProblemAttributes.put("ReferenceToForwardField", SKIP);
 		expectedProblemAttributes.put("ReferenceToForwardTypeVariable", SKIP);
+		expectedProblemAttributes.put("RepeatableAnnotationTypeIsDocumented", SKIP);
+		expectedProblemAttributes.put("RepeatableAnnotationTypeIsInherited", SKIP);
+		expectedProblemAttributes.put("RepeatableAnnotationTypeTargetMismatch", SKIP);
+		expectedProblemAttributes.put("RepeatableAnnotationWithRepeatingContainerAnnotation", SKIP);
+		expectedProblemAttributes.put("RepeatedAnnotationWithContainerAnnotation", SKIP);
 		expectedProblemAttributes.put("RequiredNonNullButProvidedNull", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
 		expectedProblemAttributes.put("RequiredNonNullButProvidedPotentialNull", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_ANNOTATION_INFERENCE_CONFLICT));
 		expectedProblemAttributes.put("RequiredNonNullButProvidedUnknown", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
@@ -1657,7 +1837,10 @@
 		expectedProblemAttributes.put("StaticInheritedMethodConflicts", SKIP);
 		expectedProblemAttributes.put("StaticMemberOfParameterizedType", SKIP);
 		expectedProblemAttributes.put("StaticMethodRequested", SKIP);
+		expectedProblemAttributes.put("StaticMethodShouldBeAccessedStatically", SKIP);
 		expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", SKIP);
+		expectedProblemAttributes.put("SuperAccessCannotBypassDirectSuper", SKIP);
+		expectedProblemAttributes.put("SuperCallCannotBypassOverride", SKIP);
 		expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", SKIP);
 		expectedProblemAttributes.put("SuperInterfacesCollide", SKIP);
 		expectedProblemAttributes.put("SuperTypeUsingWildcard", SKIP);
@@ -1670,9 +1853,11 @@
 		expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
 		expectedProblemAttributes.put("SwitchOnEnumNotBelow15", SKIP);
 		expectedProblemAttributes.put("SwitchOnStringsNotBelow17", SKIP);
+		expectedProblemAttributes.put("TargetTypeNotAFunctionalInterface", SKIP);
 		expectedProblemAttributes.put("Task", SKIP);
 		expectedProblemAttributes.put("ThisInStaticContext", SKIP);
 		expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", SKIP);
+		expectedProblemAttributes.put("ToleratedMisplacedTypeAnnotations", SKIP);
 		expectedProblemAttributes.put("TooManyArgumentSlots", SKIP);
 		expectedProblemAttributes.put("TooManyArrayDimensions", SKIP);
 		expectedProblemAttributes.put("TooManyBytesForStringConstant", SKIP);
@@ -1733,6 +1918,7 @@
 		expectedProblemAttributes.put("UnsafeElementTypeConversion", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
 		expectedProblemAttributes.put("UnsafeGenericArrayForVarargs", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
 		expectedProblemAttributes.put("UnsafeGenericCast", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+		expectedProblemAttributes.put("UnsafeNullnessCast", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
 		expectedProblemAttributes.put("UnsafeRawConstructorInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
 		expectedProblemAttributes.put("UnsafeRawFieldAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
 		expectedProblemAttributes.put("UnsafeRawGenericConstructorInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
@@ -1757,6 +1943,7 @@
 		expectedProblemAttributes.put("UnusedWarningToken", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN));
 		expectedProblemAttributes.put("UseAssertAsAnIdentifier", new ProblemAttributes(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER));
 		expectedProblemAttributes.put("UseEnumAsAnIdentifier", new ProblemAttributes(JavaCore.COMPILER_PB_ENUM_IDENTIFIER));
+		expectedProblemAttributes.put("IllegalUseOfUnderscoreAsAnIdentifier", SKIP);
 		expectedProblemAttributes.put("UsingDeprecatedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
 		expectedProblemAttributes.put("UsingDeprecatedField", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
 		expectedProblemAttributes.put("UsingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
@@ -1770,7 +1957,12 @@
 		expectedProblemAttributes.put("WildcardConstructorInvocation", SKIP);
 		expectedProblemAttributes.put("WildcardFieldAssignment", SKIP);
 		expectedProblemAttributes.put("WildcardMethodInvocation", SKIP);
+		expectedProblemAttributes.put("illFormedParameterizationOfFunctionalInterface", SKIP);
+		expectedProblemAttributes.put("lambdaParameterTypeMismatched", SKIP);
+		expectedProblemAttributes.put("lambdaSignatureMismatched", SKIP);
+		expectedProblemAttributes.put("DisallowedExplicitThisParameter", SKIP);
 		expectedProblemAttributes.put("IllegalArrayOfUnionType", SKIP);
+		expectedProblemAttributes.put("IllegalArrayTypeInIntersectionCast", SKIP);
 //{ObjectTeams: new constants:
         expectedProblemAttributes.put("OTJ_RELATED", SKIP);
         expectedProblemAttributes.put("OTCHAP", SKIP);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java
index 4a2bab6..38436e0 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Compliance_1_5.java
@@ -2966,7 +2966,7 @@
 		"The argument of type null should explicitly be cast to Class[] for the invocation of the varargs method getMethod(String, Class...) from type Class. It could alternatively be cast to Class for a varargs invocation\n" +
 		"----------\n";
 	String javaVersion = System.getProperty("java.version");
-	if (isJRELevel(AbstractCompilerTest.F_1_6|AbstractCompilerTest.F_1_7)
+	if (isJRELevel(AbstractCompilerTest.F_1_6|AbstractCompilerTest.F_1_7|AbstractCompilerTest.F_1_8)
 			|| (AbstractCompilerTest.getPossibleComplianceLevels() == AbstractCompilerTest.F_1_5
 				&& javaVersion.indexOf("1.5") == -1)) {
 		errorMessage =
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated18Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated18Test.java
new file mode 100644
index 0000000..40d4cc7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated18Test.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+public class Deprecated18Test extends AbstractRegressionTest {
+public Deprecated18Test(String name) {
+	super(name);
+}
+public static Test suite() {
+	return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+}
+public void test412555() {
+	Map options = getCompilerOptions();
+	options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
+	this.runNegativeTest(
+		new String[] {
+			"X.java",
+			"public class X {\n" +
+			"	public static void main(String[] args) {\n" +
+			"		Runnable r = () -> {\n" + 
+			"			Y.callMe();\n" +
+			"		};\n" +
+			"	}\n" +
+			"}\n",
+			"Y.java",
+			"public class Y {\n" +
+			"	@Deprecated\n" +
+			 "	public static void callMe() {}\n" +
+			"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	Y.callMe();\n" + 
+		"	  ^^^^^^^^\n" + 
+		"The method callMe() from the type Y is deprecated\n" + 
+		"----------\n",
+		null,
+		true,
+		options);
+}
+public static Class testClass() {
+	return Deprecated18Test.class;
+}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
index 320d5bd..6181a8f 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/EnumTest.java
@@ -5,12 +5,17 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *		IBM Corporation - initial API and implementation
  *		Stephan Herrmann - Contributions for
  *								Bug 365519 - editorial cleanup after bug 186342 and bug 365387
  *								Bug 265744 - Enum switch should warn about missing default
  *								Bug 374605 - Unreasonable warning for enum-based switch statements
+ *								bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract
  *								Bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExpressionContextTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExpressionContextTests.java
new file mode 100644
index 0000000..fc8d1bb
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ExpressionContextTests.java
@@ -0,0 +1,663 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - realigned with bug 399695
+ *******************************************************************************/
+
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.util.Map;
+
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import junit.framework.Test;
+
+public class ExpressionContextTests extends AbstractRegressionTest {
+
+static {
+	//	TESTS_NAMES = new String[] { "test380112e"};
+	//	TESTS_NUMBERS = new int[] { 50 };
+	//	TESTS_RANGE = new int[] { 11, -1 };
+}
+
+public ExpressionContextTests(String name) {
+	super(name);
+}
+
+public static Test suite() {
+	return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+}
+
+protected Map getCompilerOptions() {
+	Map defaultOptions = super.getCompilerOptions();
+	defaultOptions.put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, CompilerOptions.WARNING);
+	defaultOptions.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE);
+	defaultOptions.put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, CompilerOptions.WARNING);
+	return defaultOptions;
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test001() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	Object o = () -> {};\n" +
+				"	Object p = (I) () -> {};\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	Object o = () -> {};\n" + 
+			"	           ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test002() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	Object p = (I & J) () -> {};\n" +
+				"}\n" ,
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & J) () -> {};\n" + 
+			"	                   ^^^^^^^^\n" + 
+			"The target type of this expression is not a functional interface: more than one of the intersecting interfaces are functional\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test003() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	Object p = (int & I & J) () -> {};\n" +
+				"}\n" ,
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (int & I & J) () -> {};\n" + 
+			"	            ^^^\n" + 
+			"Base types are not allowed in intersection cast operator\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (int & I & J) () -> {};\n" + 
+			"	                         ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test004() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	Object p = (X[] & Serializable & Cloneable) new X[0];\n" +
+				"}\n" ,
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (X[] & Serializable & Cloneable) new X[0];\n" + 
+			"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Arrays are not allowed in intersection cast operator\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (X[] & Serializable & Cloneable) new X[0];\n" + 
+			"	                  ^^^^^^^^^^^^\n" + 
+			"Serializable cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test005() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	Object p = (I & X) () -> {};\n" +
+				"}\n" ,
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & X) () -> {};\n" + 
+			"	                ^\n" + 
+			"The type X is not an interface; it cannot be specified as a bounded parameter\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & X) () -> {};\n" + 
+			"	                   ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test006() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	Object p = (I & J & I) () -> {};\n" +
+				"}\n" ,
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & J & I) () -> {};\n" + 
+			"	                    ^\n" + 
+			"Duplicate type in intersection cast operator\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (I & J & I) () -> {};\n" + 
+			"	                       ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test007() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.List;\n" +
+				"interface I<T> {\n" +
+				"	void doit(List<T> x);\n" +
+				"	default void doitalso () {}\n" +
+				"	boolean equals(Object o);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	I<String> i = (List<String> p) -> {};\n" +
+				"	I<X> i2 = (List<String> p) -> {};\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	I<X> i2 = (List<String> p) -> {};\n" + 
+			"	           ^^^^\n" + 
+			"Lambda expression\'s parameter p is expected to be of type List<X>\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test008() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void doit();\n" +
+				"	default void doitalso () {}\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	Object p = (@Marker java.lang. @Readonly String & I & J) () -> {};\n" +
+				"}\n" ,
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (@Marker java.lang. @Readonly String & I & J) () -> {};\n" + 
+			"	            ^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (@Marker java.lang. @Readonly String & I & J) () -> {};\n" + 
+			"	                                ^^^^^^^^\n" + 
+			"Readonly cannot be resolved to a type\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 10)\n" + 
+			"	Object p = (@Marker java.lang. @Readonly String & I & J) () -> {};\n" + 
+			"	                                                         ^^^^^^^^\n" + 
+			"The target type of this expression is not a functional interface: more than one of the intersecting interfaces are functional\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test009() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.List;\n" +
+				"import java.util.Map;\n" +
+				"interface I<T> {\n" +
+				"	void doit(List<T> x);\n" +
+				"	boolean equals(Object o);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	I<String> i = (List<String> p) -> {};\n" +
+				"	I<X> i2 = (Map<String, String> & I<X>) null;\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 9)\n" + 
+			"	I<X> i2 = (Map<String, String> & I<X>) null;\n" + 
+			"	          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unnecessary cast from null to Map<String,String> & I<X>\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test010() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.List;\n" +
+				"import java.util.Map;\n" +
+				"interface I<T> {\n" +
+				"	void doit(List<T> x);\n" +
+				"	boolean equals(Object o);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	I<String> i = (List<String> p) -> {};\n" +
+				"	I<X> i2 = (Map<String, String>.Entry & I<X> & Serializable) null;\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	I<X> i2 = (Map<String, String>.Entry & I<X> & Serializable) null;\n" + 
+			"	           ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The member type Map<String,String>.Entry cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type Map<String,String>\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	I<X> i2 = (Map<String, String>.Entry & I<X> & Serializable) null;\n" + 
+			"	                                              ^^^^^^^^^^^^\n" + 
+			"Serializable cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test011() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"}\n" +
+				"interface J {\n" +
+				"}\n" +
+				"interface K {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	X X = (X & J & K) new Y();\n" +
+				"}\n" +
+				"class Y {\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	X X = (X & J & K) new Y();\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Cannot cast from Y to X & J & K\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test012() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"}\n" +
+				"interface J {\n" +
+				"}\n" +
+				"interface K {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	X X = (X & J & K) new Y();\n" +
+				"}\n" +
+				"class Y extends X implements Zork {\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 8)\n" + 
+			"	X X = (X & J & K) new Y();\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unnecessary cast from Y to X & J & K\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	class Y extends X implements Zork {\n" + 
+			"	                             ^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test013() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"}\n" +
+				"interface J {\n" +
+				"}\n" +
+				"interface K {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	X X = (X & J & K) new Y();\n" +
+				"}\n" +
+				"final class Y extends X {\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	X X = (X & J & K) new Y();\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Cannot cast from Y to X & J & K\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 8)\n" + 
+			"	X X = (X & J & K) new Y();\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unnecessary cast from Y to X & J & K\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test014() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"}\n" +
+				"interface J {\n" +
+				"}\n" +
+				"interface K {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"   I i = null;\n" +
+				"	X X = (X & J & K) i;\n" +
+				"}\n" +
+				"final class Y extends P {\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 11)\n" + 
+			"	final class Y extends P {\n" + 
+			"	                      ^\n" + 
+			"P cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test015() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"}\n" +
+				"interface J {\n" +
+				"}\n" +
+				"interface K {\n" +
+				"}\n" +
+				"final public class X {\n" +
+				"   I i = null;\n" +
+				"	X X = (X & J & K) i;\n" +
+				"   Zork z;\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	X X = (X & J & K) i;\n" + 
+			"	      ^^^^^^^^^^^^^\n" + 
+			"Cannot cast from I to X & J & K\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test016() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"}\n" +
+				"interface J {\n" +
+				"}\n" +
+				"interface K {\n" +
+				"}\n" +
+				"final public class X implements I {\n" +
+				"   I i = null;\n" +
+				"	X X = (X & J & K) i;\n" +
+				"   Zork z;\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399773, [1.8][compiler] Cast expression should allow for additional bounds to form intersection types
+public void test017() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"}\n" +
+				"interface J {\n" +
+				"}\n" +
+				"interface K {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"   I i = null;\n" +
+				"	X X = (X & J & K) (X & K & J) i;\n" +
+				"   Zork z;\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 9)\n" + 
+			"	X X = (X & J & K) (X & K & J) i;\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unnecessary cast from X & K & J to X & J & K\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399778, [1.8][compiler] Conditional operator expressions should propagate target types
+public void test018() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	Object o = (I) () -> {};\n" +
+				"	I k = (()->{});\n" +
+				"	I i = 1 == 2 ? () -> {} : () -> {};\n" +
+				"	I j = () -> {};\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 7)\n" + 
+			"	I i = 1 == 2 ? () -> {} : () -> {};\n" + 
+			"	               ^^^^^^^^\n" + 
+			"Dead code\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399778, [1.8][compiler] Conditional operator expressions should propagate target types
+public void test019() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	I [] k = {(()->{}), ()->{}, 1 == 2 ? () -> {} : ()->{}};\n" +
+				"	I [][] i = {{()->{}}};\n" +
+				"	void foo() {\n" +
+				"       I i = () -> {};\n" +
+			    "   }\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 5)\n" + 
+			"	I [] k = {(()->{}), ()->{}, 1 == 2 ? () -> {} : ()->{}};\n" + 
+			"	                                     ^^^^^^^^\n" + 
+			"Dead code\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 8)\n" + 
+			"	I i = () -> {};\n" + 
+			"	  ^\n" + 
+			"The local variable i is hiding a field from type X\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399778, [1.8][compiler] Conditional operator expressions should propagate target types
+public void test020() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	J doit(int x);\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	K doit();\n" +
+				"}\n" +
+				"interface K {\n" +
+				"   I doit();\n" +
+				"}" +
+				"class X {\n" +
+				"	I foo() {\n" +
+				"       return x -> { return () -> () -> \"Hello\"; };\n" +
+			    "   }\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 11)\n" + 
+			"	return x -> { return () -> () -> \"Hello\"; };\n" + 
+			"	                                 ^^^^^^^\n" + 
+			"Type mismatch: cannot convert from String to I\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399778, [1.8][compiler] Conditional operator expressions should propagate target types
+public void test021() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	I foo() {\n" +
+				"       return \"Hello\" + () -> {};\n" +
+			    "   }\n" +
+			    "	I goo() {\n" +
+				"       return \"Hello\" + (I)(() -> {});\n" +
+			    "   }\n" +
+			    "	I zoo() {\n" +
+				"       return 10 + (() -> {});\n" +
+			    "   }\n" +
+			    "	I boo() {\n" +
+				"       return 10 + (I) (() -> {});\n" +
+			    "   }\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	return \"Hello\" + () -> {};\n" + 
+			"	                 ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	return \"Hello\" + (I)(() -> {});\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Type mismatch: cannot convert from String to I\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 9)\n" + 
+			"	return \"Hello\" + (I)(() -> {});\n" + 
+			"	                 ^^^^^^^^^^^^^\n" + 
+			"Unnecessary cast from I to I\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 12)\n" + 
+			"	return 10 + (() -> {});\n" + 
+			"	            ^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 15)\n" + 
+			"	return 10 + (I) (() -> {});\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
+			"The operator + is undefined for the argument type(s) int, I\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401222, [1.8][compiler] Conditional operator expressions results differ from 8b76
+public void test022() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.Arrays;\n" +
+				"import java.util.List;\n" +
+				"class X {\n" +
+				"	int foo(int x) {\n" +
+				"		List<String> l = x == 2 ? (List<String>)(null) : 1;\n" +
+				"		List<String> m = x == 2 ? 1 : (List<String>)(null);\n" +
+				"		return 1;\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	List<String> l = x == 2 ? (List<String>)(null) : 1;\n" + 
+			"	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Type mismatch: cannot convert from Object to List<String>\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	List<String> m = x == 2 ? 1 : (List<String>)(null);\n" + 
+			"	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Type mismatch: cannot convert from Object to List<String>\n" + 
+			"----------\n");
+}
+public static Class testClass() {
+	return ExpressionContextTests.class;
+}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest8.java
new file mode 100644
index 0000000..f50670f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest8.java
@@ -0,0 +1,410 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.JavaCore;
+
+public class FlowAnalysisTest8 extends AbstractNullAnnotationTest {
+
+//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[] { "testReferenceExpression" };
+//	TESTS_NUMBERS = new int[] { 561 };
+//	TESTS_RANGE = new int[] { 1, 2049 };
+}
+
+public FlowAnalysisTest8(String name) {
+	super(name);
+}
+
+public static Test suite() {
+	return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+}
+
+public static Class testClass() {
+	return FlowAnalysisTest8.class;
+}
+
+// Lambda with elided args inherits null contract from the super method
+public void testLambda_01() {
+	Map customOptions = getCompilerOptions();
+	runNegativeTestWithLibs(
+		new String[] {
+			"ISAM.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public interface ISAM {\n" +
+			"	@NonNull String toString(@NonNull String prefix, @Nullable Object o);\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"	void test() {\n" +
+			"		ISAM printer = (p,o) -> p.concat(o.toString());\n" +
+			"	}\n" +
+			"}\n"
+		}, 
+		customOptions,
+		"----------\n" + 
+		"1. WARNING in X.java (at line 3)\n" + 
+		"	ISAM printer = (p,o) -> p.concat(o.toString());\n" + 
+		"	                        ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+		"Null type safety (type annotations): The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 3)\n" + 
+		"	ISAM printer = (p,o) -> p.concat(o.toString());\n" + 
+		"	                                 ^\n" + 
+		"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+		"----------\n");
+}
+
+// Lambda with declared args violates null contract of super
+public void testLambda_02() {
+	Map customOptions = getCompilerOptions();
+	runNegativeTestWithLibs(
+		new String[] {
+			"ISAM.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public interface ISAM {\n" +
+			"	void process(@NonNull Object nn, @Nullable Object n, Object u);\n" +
+			"}\n",
+			"X.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public class X {\n" +
+			"	void test() {\n" +
+					// try to override, illegal except for unchanged o1:
+			"		ISAM printer = (@NonNull  Object o1, @NonNull 	Object o2, @NonNull	 Object o3) -> System.out.println(2);\n" +
+			"	}\n" +
+			"}\n"
+		}, 
+		customOptions,
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	ISAM printer = (@NonNull  Object o1, @NonNull 	Object o2, @NonNull	 Object o3) -> System.out.println(2);\n" + 
+		"	                                     ^^^^^^^^^^^^^^^^\n" + 
+		"Illegal redefinition of parameter o2, inherited method from ISAM declares this parameter as @Nullable\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 4)\n" + 
+		"	ISAM printer = (@NonNull  Object o1, @NonNull 	Object o2, @NonNull	 Object o3) -> System.out.println(2);\n" + 
+		"	                                              	           ^^^^^^^^^^^^^^^^\n" + 
+		"Illegal redefinition of parameter o3, inherited method from ISAM does not constrain this parameter\n" + 
+		"----------\n");
+}
+
+// Lambda with declared args inherits / modifies contract of super
+public void testLambda_03() {
+	Map customOptions = getCompilerOptions();
+	runNegativeTestWithLibs(
+		new String[] {
+			"ISAM.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public interface ISAM {\n" +
+			"	void process(@NonNull Object nn, @Nullable Object n, Object u);\n" +
+			"}\n",
+			"X.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public class X {\n" +
+			"	void test() {\n" +
+					// fill-in all from super:
+			"		ISAM printer1 = (Object 		  o1, 			Object o2, 			 Object o3) \n" +
+			"							-> System.out.println(o1.toString()+o2.toString()+o3.toString());\n" +
+					// legal overrides: (however, @NonNull -> @Nullable is probably nonsense)
+			"		ISAM printer3 = (@Nullable Object o1, @Nullable Object o2, @Nullable Object o3) \n" +
+			"							-> System.out.println(o1.toString()+o2.toString()+o3.toString());\n" +
+			"	}\n" +
+			"}\n"
+		}, 
+		customOptions,
+		"----------\n" + 
+		"1. ERROR in X.java (at line 5)\n" + 
+		"	-> System.out.println(o1.toString()+o2.toString()+o3.toString());\n" + 
+		"	                                    ^^\n" + 
+		"Potential null pointer access: The variable o2 may be null at this location\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 7)\n" + 
+		"	-> System.out.println(o1.toString()+o2.toString()+o3.toString());\n" + 
+		"	                      ^^\n" + 
+		"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 7)\n" + 
+		"	-> System.out.println(o1.toString()+o2.toString()+o3.toString());\n" + 
+		"	                                    ^^\n" + 
+		"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 7)\n" + 
+		"	-> System.out.println(o1.toString()+o2.toString()+o3.toString());\n" + 
+		"	                                                  ^^\n" + 
+		"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+		"----------\n");
+}
+
+// Lambda with declared args has illegal @NonNull an primitive argument
+public void testLambda_04() {
+	Map customOptions = getCompilerOptions();
+	runNegativeTestWithLibs(
+		new String[] {
+			"ISAM.java",
+			"public interface ISAM {\n" +
+			"	void process(int i);\n" +
+			"}\n",
+			"X.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public class X {\n" +
+			"	void test() {\n" +
+			"		ISAM printer1 = (@NonNull int i) \n" +
+			"							-> System.out.println(i);\n" +
+			"	}\n" +
+			"}\n"
+		}, 
+		customOptions,
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	ISAM printer1 = (@NonNull int i) \n" + 
+		"	                 ^^^^^^^^\n" + 
+		"The nullness annotation @NonNull is not applicable for the primitive type int\n" + 
+		"----------\n");
+}
+
+// Lambda inherits null contract and has block with return statement 
+public void testLambda_05() {
+	Map customOptions = getCompilerOptions();
+	runNegativeTestWithLibs(
+		new String[] {
+			"ISAM.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public interface ISAM {\n" +
+			"	@NonNull String toString(Object o);\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"	void test() {\n" +
+			"		ISAM printer = (o) -> {\n" +
+			"			System.out.print(13);\n" +
+			"			return null; // error\n" +
+			"		};\n" +
+			"	}\n" +
+			"}\n"
+		}, 
+		customOptions,
+		"----------\n" + 
+		"1. ERROR in X.java (at line 5)\n" + 
+		"	return null; // error\n" + 
+		"	       ^^^^\n" + 
+		"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+		"----------\n");
+}
+// Lambda has no descriptor (overriding method from Object), don't bail out with NPE during analysis
+public void testLambda_05a() {
+	Map customOptions = getCompilerOptions();
+	runNegativeTestWithLibs(
+		new String[] {
+			"ISAM.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public interface ISAM {\n" +
+			"	@NonNull String toString();\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"	void test() {\n" +
+			"		ISAM printer = () -> {\n" +
+			"			System.out.print(13);\n" +
+			"			return null;\n" +
+			"		};\n" +
+			"	}\n" +
+			"}\n"
+		}, 
+		customOptions,
+		"----------\n" +
+		"1. ERROR in X.java (at line 3)\n" +
+		"	ISAM printer = () -> {\n" +
+		"			System.out.print(13);\n" +
+		"			return null;\n" +
+		"		};\n" +
+		"	               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+		"The target type of this expression must be a functional interface\n" +
+		"----------\n");
+}
+// Test flows with ReferenceExpression regarding: 
+// - definite assignment
+// - unused local
+public void testReferenceExpression1() {
+	Map options = getCompilerOptions();
+	options.put(JavaCore.COMPILER_PB_UNUSED_LOCAL, JavaCore.ERROR);
+	runNegativeTest(
+		new String[] {
+			 "I.java",
+			 "public interface I {\n" +
+			 "	public void bar();\n" +
+			 "}\n",
+			 "X.java",
+			 "public class X {\n" +
+			 "	public void moo() {}\n" +
+			 "	public static void soo() {}\n" +
+			 "	void testAssignment() {\n" +
+			 "		X x;\n" +
+			 "		I i = x::moo; // x is unassigned\n" +
+			 "		i.bar();\n" +
+			 "		I i2 = X::soo;\n" + // OK
+			 "	}\n" +
+			 "	void testStatic() {\n" +
+			 "		X xs;\n" +
+			 "		I is = xs::soo;\n" +
+			 "	}\n" +
+			 "	void testUse() {\n" +
+			 "		X x1 = this, x2 = this; // x2 is not used, only x is\n" +
+			 "		I i = x1::moo;\n" +
+			 "		i.bar();\n" +
+			 "	}\n" +
+			 "}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 6)\n" + 
+		"	I i = x::moo; // x is unassigned\n" + 
+		"	      ^\n" + 
+		"The local variable x may not have been initialized\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 12)\n" + 
+		"	I is = xs::soo;\n" + 
+		"	       ^^^^^^^\n" + 
+		"The method soo() from the type X should be accessed in a static way \n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 15)\n" + 
+		"	X x1 = this, x2 = this; // x2 is not used, only x is\n" + 
+		"	             ^^\n" + 
+		"The value of the local variable x2 is not used\n" + 
+		"----------\n",
+		null/*libs*/, true/*flush*/, options);
+}
+public void testReferenceExpression_null_1() {
+	Map options = getCompilerOptions();
+	options.put(JavaCore.COMPILER_PB_NULL_REFERENCE, JavaCore.ERROR);
+	runNegativeTest(
+		new String[] {
+			 "I.java",
+			 "public interface I {\n" +
+			 "	public void foo();\n" +
+			 "}\n",
+			 "X.java",
+			 "public class X {\n" +
+			 "	public void bar() {}\n" +
+			 "	void test() {\n" +
+			 "		X x = null;\n" +
+			 "		I i = x::bar;\n" +
+			 "		i.foo();\n" +
+			 "	}\n" +
+			 "}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 5)\n" + 
+		"	I i = x::bar;\n" + 
+		"	      ^\n" + 
+		"Null pointer access: The variable x can only be null at this location\n" + 
+		"----------\n",
+		null/*libs*/, true/*flush*/, options);
+}
+public void testReferenceExpression_nullAnnotation_1() {
+	runNegativeTestWithLibs(
+		new String[] {
+			 "I.java",
+			 "import org.eclipse.jdt.annotation.*;\n" +
+			 "public interface I {\n" +
+			 "	public @NonNull String foo(@Nullable Object s);\n" +
+			 "}\n",
+			 "X.java",
+			 "import org.eclipse.jdt.annotation.*;\n" +
+			 "public class X {\n" +
+			 "	public @Nullable String bar(@NonNull Object s) { return s.toString(); }\n" +
+			 "	void test() {\n" +
+			 "		I i = this::bar;\n" +
+			 "		System.out.print(i.foo(null));\n" +
+			 "	}\n" +
+			 "}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 5)\n" + 
+		"	I i = this::bar;\n" + 
+		"	      ^^^^^^^^^\n" + 
+		"Null type mismatch at parameter 1: required '@NonNull Object' but provided '@Nullable Object' via method descriptor I.foo(Object)\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 5)\n" + 
+		"	I i = this::bar;\n" + 
+		"	      ^^^^^^^^^\n" + 
+		"Null type mismatch at method return type: Method descriptor I.foo(Object) promises '@NonNull String' but referenced method provides '@Nullable String'\n" + 
+		"----------\n");
+}
+public void testReferenceExpression_nullAnnotation_2() {
+	runNegativeTestWithLibs(
+		new String[] {
+			 "I.java",
+			 "import org.eclipse.jdt.annotation.*;\n" +
+			 "public interface I {\n" +
+			 "	public @NonNull String foo(@Nullable Object s);\n" +
+			 "}\n",
+			 "X.java",
+			 "public class X {\n" +
+			 "	public String bar(Object s) { return s.toString(); }\n" +
+			 "	void test() {\n" +
+			 "		I i = this::bar;\n" +
+			 "		System.out.print(i.foo(null));\n" +
+			 "	}\n" +
+			 "}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	I i = this::bar;\n" + 
+		"	      ^^^^^^^^^\n" + 
+		"Null type mismatch at parameter 1: required \'Object\' but provided \'@Nullable Object\' via method descriptor I.foo(Object)\n" + 
+		"----------\n" + 
+		"2. WARNING in X.java (at line 4)\n" + 
+		"	I i = this::bar;\n" + 
+		"	      ^^^^^^^^^\n" + 
+		"Null type safety at method return type: Method descriptor I.foo(Object) promises \'@NonNull String\' but referenced method provides \'String\'\n" + 
+		"----------\n");
+}
+public void testReferenceExpression_nullAnnotation_3() {
+	runNegativeTestWithLibs(
+		new String[] {
+			 "I.java",
+			 "import org.eclipse.jdt.annotation.*;\n" +
+			 "public interface I {\n" +
+			 "	public @NonNull String foo(Object s);\n" +
+			 "}\n",
+			 "X.java",
+			 "import org.eclipse.jdt.annotation.*;\n" +
+			 "public class X {\n" +
+			 "	public @NonNull String bar(@NonNull Object s) { return \"\"; }\n" +
+			 "	void test() {\n" +
+			 "		I i = this::bar;\n" +
+			 "		System.out.print(i.foo(null));\n" +
+			 "	}\n" +
+			 "	Zork zork;\n" + // make warning visible by forcing an error
+			 "}\n"
+		},
+		"----------\n" + 
+		"1. WARNING in X.java (at line 5)\n" + 
+		"	I i = this::bar;\n" + 
+		"	      ^^^^^^^^^\n" + 
+		"Null type safety: parameter 1 provided via method descriptor I.foo(Object) needs unchecked conversion to conform to '@NonNull Object'\n" + 
+		"----------\n" +
+		"2. ERROR in X.java (at line 8)\n" + 
+		"	Zork zork;\n" + 
+		"	^^^^\n" + 
+		"Zork cannot be resolved to a type\n" + 
+		"----------\n");
+}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java
index 78c5e7e..f78b826 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ForeachStatementTest.java
@@ -4,11 +4,16 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 393719 - [compiler] inconsistent warnings on iteration variables
+ *								Bug 388800 - [1.8] adjust tests to 1.8 JRE
  *     Jesper S Moller -  Contribution for
  *								bug 401853 - Eclipse Java compiler creates invalid bytecode (java.lang.VerifyError)
  *******************************************************************************/
@@ -1105,6 +1110,7 @@
 				"   public Iterator<String> iterator() {\n" +
 				"        return null;\n" +
 				"    }\n" +
+				ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") +
 				"}\n",
 			},
 			"----------\n" +
@@ -1627,11 +1633,13 @@
 			"	}\n" +
 			"	public void remove() {\n" +
 			"	}\n" +
+			ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") +
 			"}\n" +
 			"class Bar implements Iterable<String> {\n" +
 			"	public Iterator<String> iterator() {\n" +
 			"		return new ArrayIterator<String>(new String[]{\"a\",\"b\"});\n" +
 			"	}\n" +
+			ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") +
 			"}\n",
 		},
 		"ab");
@@ -1720,6 +1728,7 @@
 			"	}\n" +
 			"	public void remove() {\n" +
 			"	}\n" +
+			ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") +
 			"}\n" +
 			"interface IFoo extends Iterable<String> {\n" +
 			"}\n" +
@@ -1727,6 +1736,7 @@
 			"	public Iterator<String> iterator() {\n" +
 			"		return new ArrayIterator<String>(new String[]{\"a\",\"b\"});\n" +
 			"	}\n" +
+			ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") +
 			"}\n",
 		},
 		"ab");
@@ -1802,6 +1812,7 @@
 			"		X x = new X();\n" +
 			"		x.foo(x);\n" +
 			"	}\n" +
+			ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") +
 			"}",
 		},
 		"ab");
@@ -2015,6 +2026,7 @@
 			"				System.out.println(\"remove\");\n" +
 			"				this.iterator.remove();\n" +
 			"			}\n" +
+			ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") +
 			"		}\n" +
 			"		\n" +
 			"        static Set<Object> initForEach()        {\n" +
@@ -2111,6 +2123,7 @@
 			"				System.out.println(\"remove\");\n" +
 			"				this.iterator.remove();\n" +
 			"			}\n" +
+			ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") +
 			"		}\n" +
 			"		\n" +
 			"        static Set<Object> initForEach()        {\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
index 0e046cc..333daf1 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java
@@ -5,12 +5,19 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
  *     Stephan Herrmann - Contributions for
  *								bug 383690 - [compiler] location of error re uninitialized final field should be aligned
+ *								bug 388800 - [1.8] adjust tests to 1.8 JRE
  *								bug 388795 - [compiler] detection of name clash depends on order of super interfaces
+ *								bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract
  *								bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795
  *								bug 406928 - computation of inherited methods seems damaged (affecting @Overrides)
  *******************************************************************************/
@@ -1626,42 +1633,41 @@
 					"}\n"
 			},
 			"----------\n" +
-				"1. ERROR in test\\X.java (at line 7)\n" +
-				"	X<int, short, long, float, double, boolean, char> x;\n" +
-				"	  ^^^\n" +
-				"Syntax error on token \"int\", Dimensions expected after this token\n" +
-				"----------\n" +
-				"2. ERROR in test\\X.java (at line 7)\n" +
-				"	X<int, short, long, float, double, boolean, char> x;\n" +
-				"	       ^^^^^\n" +
-				"Syntax error on token \"short\", Dimensions expected after this token\n" +
-				"----------\n" +
-				"3. ERROR in test\\X.java (at line 7)\n" +
-				"	X<int, short, long, float, double, boolean, char> x;\n" +
-				"	              ^^^^\n" +
-				"Syntax error on token \"long\", Dimensions expected after this token\n" +
-				"----------\n" +
-				"4. ERROR in test\\X.java (at line 7)\n" +
-				"	X<int, short, long, float, double, boolean, char> x;\n" +
-				"	                    ^^^^^\n" +
-				"Syntax error on token \"float\", Dimensions expected after this token\n" +
-				"----------\n" +
-				"5. ERROR in test\\X.java (at line 7)\n" +
-				"	X<int, short, long, float, double, boolean, char> x;\n" +
-				"	                           ^^^^^^\n" +
-				"Syntax error on token \"double\", Dimensions expected after this token\n" +
-				"----------\n" +
-				"6. ERROR in test\\X.java (at line 7)\n" +
-				"	X<int, short, long, float, double, boolean, char> x;\n" +
-				"	                                   ^^^^^^^\n" +
-				"Syntax error on token \"boolean\", Dimensions expected after this token\n" +
-				"----------\n" +
-				"7. ERROR in test\\X.java (at line 7)\n" +
-				"	X<int, short, long, float, double, boolean, char> x;\n" +
-				"	                                            ^^^^\n" +
-				"Syntax error on token \"char\", Dimensions expected after this token\n" +
-				"----------\n"
-		);
+			"1. ERROR in test\\X.java (at line 7)\n" +
+			"	X<int, short, long, float, double, boolean, char> x;\n" +
+			"	  ^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete TypeArgument\n" +
+			"----------\n" +
+			"2. ERROR in test\\X.java (at line 7)\n" +
+			"	X<int, short, long, float, double, boolean, char> x;\n" +
+			"	       ^^^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete TypeArgument\n" +
+			"----------\n" +
+			"3. ERROR in test\\X.java (at line 7)\n" +
+			"	X<int, short, long, float, double, boolean, char> x;\n" +
+			"	              ^^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete TypeArgument\n" +
+			"----------\n" +
+			"4. ERROR in test\\X.java (at line 7)\n" +
+			"	X<int, short, long, float, double, boolean, char> x;\n" +
+			"	                    ^^^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete TypeArgument\n" +
+			"----------\n" +
+			"5. ERROR in test\\X.java (at line 7)\n" +
+			"	X<int, short, long, float, double, boolean, char> x;\n" +
+			"	                           ^^^^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete TypeArgument\n" +
+			"----------\n" +
+			"6. ERROR in test\\X.java (at line 7)\n" +
+			"	X<int, short, long, float, double, boolean, char> x;\n" +
+			"	                                   ^^^^^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete TypeArgument\n" +
+			"----------\n" +
+			"7. ERROR in test\\X.java (at line 7)\n" +
+			"	X<int, short, long, float, double, boolean, char> x;\n" +
+			"	                                            ^^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete ReferenceType\n" +
+			"----------\n");
 	}
 	// JSR14-v10[2.1,2.2]: Valid multiple parameter types: primitive type arrays
 	public void test0062() {
@@ -1873,7 +1879,7 @@
 
 	// JSR14-V10[2.4]: Not terminated consecutive declaration
 	// TODO (david) diagnosis message on error 3 sounds strange, doesn't it?
-	public void test0068() {
+	public void _test0068() {
 		this.runNegativeTest(
 			new String[] {
 				"test/X1.java",
@@ -1945,8 +1951,14 @@
 			"----------\n" +
 			"1. ERROR in test\\X1.java (at line 3)\n" +
 			"	public class X1<A1>> {\n" +
+//{ObjectTeams: our diagnose parser suggests a different correction:
+/* orig:			
 			"	                  ^^\n" +
 			"Syntax error on token \">>\", > expected\n" +
+  :giro */
+			"	                ^^\n" + 
+			"Syntax error, insert \"< typeAnchor\" to complete AnchoredTypeParameter\n" + 
+// SH}
 			"----------\n"
 		);
 	}
@@ -2318,7 +2330,7 @@
 		);
 	}
 	// TODO (david) remove errors: insert dimension to complete array type
-	public void test0080() {
+	public void _test0080() {
 		this.runNegativeTest(
 			new String[] {
 				"test/X.java",
@@ -2405,7 +2417,7 @@
 		);
 	}
 	// TODO (david) remove error: insert dimension to complete array type
-	public void test0083() {
+	public void _test0083() {
 		this.runNegativeTest(
 			new String[] {
 				"test/X.java",
@@ -2947,12 +2959,13 @@
 				"class AX<P> {\n" +
 				"}\n",
 			},
-		"----------\n" +
-		"1. ERROR in X.java (at line 1)\n" +
-		"	public class X  <T extends AX<? super int>> {\n" +
-		"	                                      ^^^\n" +
-		"Syntax error on token \"int\", Dimensions expected after this token\n" +
-		"----------\n");
+			"----------\n" +
+			"1. ERROR in X.java (at line 1)\n" +
+			"	public class X  <T extends AX<? super int>> {\n" +
+			"	                                      ^^^\n" +
+			"Syntax error, insert \"Dimensions\" to complete ArrayType\n" +
+			"----------\n"
+);
 	}
 
 	// type parameterized with wildcard cannot appear in allocation
@@ -4432,6 +4445,8 @@
 				"    }\n" +
 				"    public int size() { return 0; }\n" +
 				"    public Object get(int index) { return null; }\n" +
+				ITERABLE_RAW_IMPL_JRE8 +
+				COLLECTION_AND_LIST_RAW_IMPL_JRE8 +
 				"}\n"
 			},
 			"SUCCESS");
@@ -6141,6 +6156,7 @@
 				"    public int compare(X x1, X x2) {\n" +
 				"        return comparator.compare(function.eval(x1),function.eval(x2));\n" +
 				"    }\n" +
+				COMPARATOR_RAW_IMPL_JRE8 +
 				"}\n",
 			},
 			"");
@@ -6717,7 +6733,7 @@
 			"2. WARNING in X.java (at line 13)\n" +
 			"	} catch (T t) {\n" +
 			"	           ^\n" +
-			"The parameter t is hiding another local variable defined in an enclosing type scope\n" +
+			"The parameter t is hiding another local variable defined in an enclosing scope\n" +
 			"----------\n" +
 			"3. WARNING in X.java (at line 19)\n" +
 			"	class EX extends Exception {\n" +
@@ -8841,6 +8857,7 @@
 				"   public Set<Map.Entry<String, V>> entrySet() {\n" +
 				"      return this.backingMap.entrySet();\n" +
 				"   }\n" +
+				MAP_IMPL_JRE8.replaceAll("\\*", "String").replaceAll("\\%", "V")+
 				"}\n",
 			},
 			"----------\n" +
@@ -10800,9 +10817,12 @@
 					"			public boolean hasNext() {return false;}\n" +
 					"			public Entry<String, Integer> next() {return null;}\n" +
 					"			public void remove() {}	\n" +
+					ITERATOR_IMPL_JRE8.replaceAll("\\*", "Entry<String,Integer>") +
 					"		};\n" +
 					"	}\n" +
 					"	public int size() {return 0;}\n" +
+					COLLECTION_RAW_IMPL_JRE8 +
+					ITERABLE_IMPL_JRE8.replaceAll("\\*", "Entry<String,Integer>") +
 					"}"
 			}
 		);
@@ -11374,6 +11394,8 @@
 				"    }\n" +
 				"    public Iterator<Runnable> iterator() {return null;}\n" +
 				"    public int size() {return 0;}\n" +
+				COLLECTION_RAW_IMPL_JRE8 +
+				ITERABLE_IMPL_JRE8.replaceAll("\\*", "Runnable") +
 				"}"
 				}
 		);
@@ -13553,6 +13575,7 @@
 				"    public boolean hasNext() { return false; }\n" +
 				"    public String next() { return null; }\n" +
 				"    public void remove() {}\n" +
+				ITERATOR_IMPL_JRE8.replaceAll("\\*", "String") +
 				"}\n",
 			},
 			"");
@@ -19890,6 +19913,7 @@
 				"			}\n" +
 				"			public void remove() {\n" +
 				"			}\n" +
+				ITERATOR_IMPL_JRE8.replaceAll("\\*", "U") +
 				"		}\n" +
 				"	}\n" +
 				"}\n",
@@ -24900,6 +24924,8 @@
 			"			List<String> list = new AbstractList<String>() {\n" +
 			"				@Override public int size() { return 0; }\n" +
 			"				@Override public String get(int i) { return args.get(i); }\n" +
+			COLLECTION_AND_LIST_IMPL_JRE8.replaceAll("\\*", "String") +
+			ITERABLE_IMPL_JRE8.replaceAll("\\*", "String") +
 			"			};\n" +
 			"		}\n" +
 			"	}\n" +
@@ -24911,13 +24937,14 @@
 		},
 		"SUCCESS");
 
+	String constantPoolIdx = IS_JRE_8 ? "73" : "36"; // depends on whether or not stubs for JRE8 default methods are included
 	String expectedOutput =
 		"  // Method descriptor #31 (I)Ljava/lang/Object;\n" +
 		"  // Stack: 2, Locals: 2\n" +
 		"  public bridge synthetic java.lang.Object get(int arg0);\n" +
 		"    0  aload_0 [this]\n" +
 		"    1  iload_1 [arg0]\n" +
-		"    2  invokevirtual X$Entry$1.get(int) : java.lang.String [36]\n" +
+		"    2  invokevirtual X$Entry$1.get(int) : java.lang.String ["+constantPoolIdx+"]\n" +
 		"    5  areturn\n" +
 		"      Line numbers:\n" +
 		"        [pc: 0, line: 1]\n";
@@ -25864,6 +25891,7 @@
 			"	}\n" +
 			"	public void remove() {\n" +
 			"	}\n" +
+			ITERATOR_IMPL_JRE8.replaceAll("\\*", "N") +
 			"}\n" +
 			"interface Set3<N extends Node> extends Iterable<N> {\n" +
 			"	SetIterator<N> iterator();\n" +
@@ -25895,27 +25923,27 @@
 			"}\n",
 		},
 		"----------\n" +
-		"1. WARNING in X.java (at line 21)\n" +
+		"1. WARNING in X.java (at line 23)\n" +
 		"	void f1(Set1 s) {\n" +
 		"	        ^^^^\n" +
 		"Set1 is a raw type. References to generic type Set1<N> should be parameterized\n" +
 		"----------\n" +
-		"2. ERROR in X.java (at line 22)\n" +
+		"2. ERROR in X.java (at line 24)\n" +
 		"	Node n_ = s.iterator().next();\n" +
 		"	          ^^^^^^^^^^^^^^^^^^^\n" +
 		"Type mismatch: cannot convert from Object to Node\n" +
 		"----------\n" +
-		"3. ERROR in X.java (at line 25)\n" +
+		"3. ERROR in X.java (at line 27)\n" +
 		"	for (Node n : s) {\n" +
 		"	              ^\n" +
 		"Type mismatch: cannot convert from element type Object to Node\n" +
 		"----------\n" +
-		"4. WARNING in X.java (at line 35)\n" +
+		"4. WARNING in X.java (at line 37)\n" +
 		"	void f3(Set3 s) {\n" +
 		"	        ^^^^\n" +
 		"Set3 is a raw type. References to generic type Set3<N> should be parameterized\n" +
 		"----------\n" +
-		"5. ERROR in X.java (at line 38)\n" +
+		"5. ERROR in X.java (at line 40)\n" +
 		"	for (Node n : s) {\n" +
 		"	              ^\n" +
 		"Type mismatch: cannot convert from element type Object to Node\n" +
@@ -28019,6 +28047,8 @@
 			"		// TODO Auto-generated method stub\n" +
 			"		\n" +
 			"	}" +
+			COLLECTION_RAW_IMPL_JRE8 +
+			ITERABLE_RAW_IMPL_JRE8 +
 			"}",
 		},
 		"",
@@ -30421,7 +30451,7 @@
 		"----------\n");
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=119238 - variation
-public void test0932() {
+public void _test0932() {
 	this.runNegativeTest(
 		new String[] {
 		"X.java",
@@ -32459,28 +32489,18 @@
 public void test0987() {
 	String expectedOutput = new CompilerOptions(getCompilerOptions()).sourceLevel < ClassFileConstants.JDK1_6
     ?	"----------\n" + 
-		"1. ERROR in X.java (at line 7)\n" + 
-		"	abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + 
-		"	               ^^^^^^^^^^^^^^^^\n" + 
-		"The return types are incompatible for the inherited methods EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + 
-		"----------\n" + 
-		"2. ERROR in X.java (at line 11)\n" + 
+		"1. ERROR in X.java (at line 11)\n" + 
 		"	public ISheetViewer getViewer() { return null; }	\n" + 
 		"	       ^^^^^^^^^^^^\n" + 
 		"The return type is incompatible with EditPart.getViewer()\n" + 
 		"----------\n" + 
-		"3. ERROR in X.java (at line 11)\n" + 
+		"2. ERROR in X.java (at line 11)\n" + 
 		"	public ISheetViewer getViewer() { return null; }	\n" + 
 		"	                    ^^^^^^^^^^^\n" + 
 		"The method getViewer() of type AbstractLinkView<M> must override a superclass method\n" + 
 		"----------\n"
     :		"----------\n" + 
-		"1. ERROR in X.java (at line 7)\n" + 
-		"	abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + 
-		"	               ^^^^^^^^^^^^^^^^\n" + 
-		"The return types are incompatible for the inherited methods EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + 
-		"----------\n" + 
-		"2. ERROR in X.java (at line 11)\n" + 
+		"1. ERROR in X.java (at line 11)\n" + 
 		"	public ISheetViewer getViewer() { return null; }	\n" + 
 		"	       ^^^^^^^^^^^^\n" + 
 		"The return type is incompatible with EditPart.getViewer()\n" + 
@@ -32568,13 +32588,8 @@
 				"	public ISheetViewer getViewer();\n" +
 				"}", // =================
 			},
-			"----------\n" + 
-			"1. ERROR in X.java (at line 7)\n" + 
-			"	abstract class GLinkElementView<M,CM> extends AbstractLinkView<M> {}\n" + 
-			"	               ^^^^^^^^^^^^^^^^\n" + 
-			"The return types are incompatible for the inherited methods ILinkViewElement.getViewer(), EditPart.getViewer(), AbstractLinkView<M>.getViewer()\n" + 
-			"----------\n" + 
-			"2. ERROR in X.java (at line 11)\n" + 
+			"----------\n" +
+			"1. ERROR in X.java (at line 11)\n" + 
 			"	public SheetViewer getViewer() { return null; }	\n" + 
 			"	       ^^^^^^^^^^^\n" + 
 			"The return type is incompatible with AbstractEditPart.getViewer()\n" + 
@@ -34171,6 +34186,7 @@
 			"		public Iterator<W> iterator() {\n" +
 			"			return theList.iterator();\n" +
 			"		}\n" +
+			ITERABLE_IMPL_JRE8.replace('*', 'W') +
 			"	}\n" +
 			"\n" +
 			"	private PointList<Waypoint> waypoints = new PointList<Waypoint>();\n" +
@@ -34415,6 +34431,7 @@
 			"public int compare(T obj1, T obj2) {\n" +
 			"	return obj1.compareTo(obj2);\n" +
 			"}\n" +
+			COMPARATOR_IMPL_JRE8.replace('*', 'T').replace('%', 'U').replace('$', 'S') +
 			"}\n" +
 			"\n" +
 			"@SuppressWarnings({\"unchecked\", \"rawtypes\"})\n" +
@@ -34465,6 +34482,7 @@
 			"public int compare(V obj1, V obj2) {\n" +
 			"	return 0;\n" +
 			"}\n" +
+			COMPARATOR_IMPL_JRE8.replace('*', 'V').replace('%', 'U').replace('$', 'S') +
 			"}", // =================
 
 		},
@@ -37135,7 +37153,7 @@
 		"2. WARNING in X.java (at line 5)\n" +
 		"	T t = t;\n" +
 		"	  ^\n" +
-		"The field T.t is hiding another local variable defined in an enclosing type scope\n" +
+		"The field T.t is hiding another local variable defined in an enclosing scope\n" +
 		"----------\n" +
 		"3. ERROR in X.java (at line 5)\n" +
 		"	T t = t;\n" +
@@ -37459,7 +37477,7 @@
 		null/* do not perform statements recovery */);
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=168232
-public void test1097() {
+public void _test1097() {
 	runNegativeTest(
 		// test directory preparation
 		new String[] { /* test files */
@@ -37845,12 +37863,19 @@
 			"  }\n" +
 			"}\n",
 		},
+		this.complianceLevel < ClassFileConstants.JDK1_8 ? 
 		"----------\n" +
 		"1. ERROR in X.java (at line 4)\n" +
 		"	return true ? Z.bar() : null;\n" +
 		"	       ^^^^^^^^^^^^^^^^^^^^^\n" +
 		"Type mismatch: cannot convert from Y<Object> to Y<String>\n" +
-		"----------\n");
+		"----------\n" :
+			"----------\n" + 
+			"1. WARNING in X.java (at line 4)\n" + 
+			"	return true ? Z.bar() : null;\n" + 
+			"	                        ^^^^\n" + 
+			"Dead code\n" + 
+			"----------\n");
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=176591
 //variant
@@ -48351,12 +48376,6 @@
 		"2. ERROR in A.java (at line 3)\n" + 
 		"	Class<?> c = A<?>.class; \n" + 
 		"	              ^^^\n" + 
-		"Syntax error on token(s), misplaced construct(s)\n" + 
-		"----------\n" + 
-		"3. ERROR in A.java (at line 3)\n" + 
-		"	Class<?> c = A<?>.class; \n" + 
-		"	                  ^^^^^\n" + 
-		"Syntax error, insert \")\" to complete Expression\n" + 
   :giro */
 		"	               ^\n" + 
 		"Syntax error on token \"?\", invalid typeAnchor\n" + 
@@ -49727,6 +49746,7 @@
 				"			public boolean hasNext() {\n" + 
 				"				return false;\n" + 
 				"			}\n" + 
+				ITERATOR_RAW_IMPL_JRE8 +
 				"		};\n" + 
 				"	}\n" + 
 				"	Zork z;\n" +
@@ -49758,7 +49778,7 @@
 			"	                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
 			"Unnecessary cast from Iterator to Iterator<String>\n" + 
 			"----------\n" + 
-			"6. ERROR in X.java (at line 36)\n" + 
+			"6. ERROR in X.java (at line 38)\n" + 
 			"	Zork z;\n" + 
 			"	^^^^\n" + 
 			"Zork cannot be resolved to a type\n" + 
@@ -51043,4 +51063,4 @@
 		"The constructor X.Base<X<T>.Arr>(Class<X.Arr>) is undefined\n" + 
 		"----------\n");
 }
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GrammarCoverageTests308.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GrammarCoverageTests308.java
new file mode 100644
index 0000000..d35923c
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GrammarCoverageTests308.java
@@ -0,0 +1,1619 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import junit.framework.Test;
+
+public class GrammarCoverageTests308 extends AbstractRegressionTest {
+
+	static { 
+//		TESTS_NUMBERS = new int [] { 35 };
+//		TESTS_NAMES = new String [] { "testnew" };
+	}
+	public static Class testClass() {
+		return GrammarCoverageTests308.class;
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+	public GrammarCoverageTests308(String testName){
+		super(testName);
+	}
+	// Lone test to verify that multiple annotations of all three kinds are accepted. All other tests will use only marker annotations
+	public void test000() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X extends @Marker @SingleMember(0) @Normal(Value = 0) Object {\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker @SingleMember(0) @Normal(Value = 0) Object {\n" + 
+				"	                        ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker @SingleMember(0) @Normal(Value = 0) Object {\n" + 
+				"	                                ^^^^^^^^^^^^\n" + 
+				"SingleMember cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker @SingleMember(0) @Normal(Value = 0) Object {\n" + 
+				"	                                                 ^^^^^^\n" + 
+				"Normal cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// FieldDeclaration ::= Modifiersopt Type VariableDeclarators ';'
+	public void test001() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    @Marker int x;\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	@Marker int x;\n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// TYPE:   MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
+	public void test002() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    @Marker <T> @Marker int x() { return 10; };\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	@Marker <T> @Marker int x() { return 10; };\n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	@Marker <T> @Marker int x() { return 10; };\n" + 
+				"	            ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// TYPE:   MethodHeaderName ::= Modifiersopt Type 'Identifier' '('
+	public void test003() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    @Marker int x() { return 10; };\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	@Marker int x() { return 10; };\n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// FormalParameter ::= Modifiersopt Type VariableDeclaratorIdOrThis
+	public void test004() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    int x(@Marker int p) { return 10; };\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	int x(@Marker int p) { return 10; };\n" + 
+				"	      ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// FormalParameter ::= Modifiersopt Type PushZeroTypeAnnotations '...' VariableDeclaratorIdOrThis
+	public void test005() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    int x(@Marker int ... p) { return 10; };\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	int x(@Marker int ... p) { return 10; };\n" + 
+				"	      ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// FormalParameter ::= Modifiersopt Type @308... TypeAnnotations '...' VariableDeclaratorIdOrThis
+	public void test006() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    int x(@Marker int [] @Marker ... p) { return 10; };\n" +
+					"    Zork z;\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	int x(@Marker int [] @Marker ... p) { return 10; };\n" + 
+				"	       ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	int x(@Marker int [] @Marker ... p) { return 10; };\n" + 
+				"	                      ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// UnionType ::= Type
+	// UnionType ::= UnionType '|' Type
+	public void test007() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    int x() {\n" +
+					"        try {\n" +
+					"        } catch (@Marker NullPointerException | @Marker ArrayIndexOutOfBoundsException e) {\n" +
+					"        }\n" +
+					"        return 10;\n" +
+					"    }\n" +
+					"    Zork z;\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	} catch (@Marker NullPointerException | @Marker ArrayIndexOutOfBoundsException e) {\n" + 
+				"	          ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	} catch (@Marker NullPointerException | @Marker ArrayIndexOutOfBoundsException e) {\n" + 
+				"	                                         ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 8)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}	
+	// LocalVariableDeclaration ::= Type PushModifiers VariableDeclarators
+    // LocalVariableDeclaration ::= Modifiers Type PushRealModifiers VariableDeclarators
+	public void test008() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    int x() {\n" +
+					"        @Marker int p;\n" +
+					"        final @Marker int q;\n" +
+					"        @Marker final int r;\n" +
+					"        return 10;\n" +
+					"    }\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	@Marker int p;\n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	final @Marker int q;\n" + 
+				"	      ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	@Marker final int r;\n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 8)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// Resource ::= Type PushModifiers VariableDeclaratorId EnterVariable '=' ForceNoDiet VariableInitializer RestoreDiet ExitVariableWithInitialization
+	// Resource ::= Modifiers Type PushRealModifiers VariableDeclaratorId EnterVariable '=' ForceNoDiet VariableInitializer RestoreDiet ExitVariableWithInitialization
+	public void test009() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    int x() {\n" +
+					"        try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" +
+					"        }\n" +
+					"        return 10;\n" +
+					"    }\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" + 
+				"	     ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" + 
+				"	             ^^^^^^^\n" + 
+				"The resource type Integer does not implement java.lang.AutoCloseable\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 3)\n" + 
+				"	try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" + 
+				"	                                     ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 3)\n" + 
+				"	try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" + 
+				"	                                             ^^^^^^^\n" + 
+				"The resource type Integer does not implement java.lang.AutoCloseable\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 3)\n" + 
+				"	try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" + 
+				"	                                                               ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 3)\n" + 
+				"	try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" + 
+				"	                                                                             ^^^^^^^\n" + 
+				"The resource type Integer does not implement java.lang.AutoCloseable\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 7)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// EnhancedForStatementHeaderInit ::= 'for' '(' Type PushModifiers Identifier Dimsopt
+	// EnhancedForStatementHeaderInit ::= 'for' '(' Modifiers Type PushRealModifiers Identifier Dimsopt
+	public void test010() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    int x() {\n" +
+					"        for (@Marker int i: new int[3]) {}\n" +
+					"        for (final @Marker int i: new int[3]) {}\n" +
+					"        for (@Marker final int i: new int[3]) {}\n" +
+					"        return 10;\n" +
+					"    }\n" +
+					"    Zork z;\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	for (@Marker int i: new int[3]) {}\n" + 
+				"	     ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	for (final @Marker int i: new int[3]) {}\n" + 
+				"	           ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	for (@Marker final int i: new int[3]) {}\n" + 
+				"	     ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 8)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}	
+	// AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
+	// AnnotationMethodHeaderName ::= Modifiersopt Type 'Identifier' '('
+	public void test011() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public @interface X { \n" +
+					"	public @Marker String value(); \n" +
+					"	@Marker String value2(); \n" +
+					"	@Marker public String value3(); \n" +
+					"	public @Marker <T> @Marker String value4(); \n" +
+					"	@Marker <T> @Marker String value5(); \n" +
+					"	@Marker public <T> @Marker String value6(); \n" +
+					"}\n" +
+					
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+					"@interface Marker {}\n",
+					
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n"+
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	public @Marker String value(); \n" + 
+				"	       ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	@Marker String value2(); \n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 4)\n" + 
+				"	@Marker public String value3(); \n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 5)\n" + 
+				"	public @Marker <T> @Marker String value4(); \n" + 
+				"	       ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 5)\n" + 
+				"	public @Marker <T> @Marker String value4(); \n" + 
+				"	                   ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 5)\n" + 
+				"	public @Marker <T> @Marker String value4(); \n" + 
+				"	                                  ^^^^^^^^\n" + 
+				"Annotation attributes cannot be generic\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 6)\n" + 
+				"	@Marker <T> @Marker String value5(); \n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 6)\n" + 
+				"	@Marker <T> @Marker String value5(); \n" + 
+				"	            ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 6)\n" + 
+				"	@Marker <T> @Marker String value5(); \n" + 
+				"	                           ^^^^^^^^\n" + 
+				"Annotation attributes cannot be generic\n" + 
+				"----------\n" + 
+				"10. ERROR in X.java (at line 7)\n" + 
+				"	@Marker public <T> @Marker String value6(); \n" + 
+				"	^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"11. ERROR in X.java (at line 7)\n" + 
+				"	@Marker public <T> @Marker String value6(); \n" + 
+				"	                   ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"12. ERROR in X.java (at line 7)\n" + 
+				"	@Marker public <T> @Marker String value6(); \n" + 
+				"	                                  ^^^^^^^^\n" + 
+				"Annotation attributes cannot be generic\n" + 
+				"----------\n");
+	}
+	// PrimaryNoNewArray ::= PrimitiveType Dims '.' 'class'
+	// PrimaryNoNewArray ::= PrimitiveType '.' 'class'
+	public void test012() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X { \n" +
+					"	public void value() {\n" +
+					"		Object o = @Marker int.class;\n" +
+					"		Object o2 = @Marker int @Marker[] [] @Marker[].class;\n" +
+					"   }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	Object o = @Marker int.class;\n" + 
+				"	           ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	Object o2 = @Marker int @Marker[] [] @Marker[].class;\n" + 
+				"	            ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 4)\n" + 
+				"	Object o2 = @Marker int @Marker[] [] @Marker[].class;\n" + 
+				"	                        ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"4. WARNING in X.java (at line 4)\n" + 
+				"	Object o2 = @Marker int @Marker[] [] @Marker[].class;\n" + 
+				"	                                     ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// ReferenceExpression ::= PrimitiveType Dims '::' NonWildTypeArgumentsopt IdentifierOrNew
+	public void test013() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    Object copy(int [] ia);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = @Marker int @Marker []::<String>clone;\n" +
+					"        Zork z;\n" +
+					"    }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker int @Marker []::<String>clone;\n" + 
+				"	       ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker int @Marker []::<String>clone;\n" + 
+				"	                   ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 6)\n" + 
+				"	I i = @Marker int @Marker []::<String>clone;\n" + 
+				"	                               ^^^^^^\n" + 
+				"Unused type arguments for the non generic method clone() of type Object; it should not be parameterized with arguments <String>\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 7)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs
+	// ArrayCreationWithArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs ArrayInitializer
+	public void test014() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        int i [] = new @Marker int @Marker [4];\n" +
+					"        int j [] = new @Marker int @Marker [] { 10 };\n" +
+					"        Zork z;\n" +
+					"    }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	int i [] = new @Marker int @Marker [4];\n" + 
+				"	                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	int i [] = new @Marker int @Marker [4];\n" + 
+				"	                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 4)\n" + 
+				"	int j [] = new @Marker int @Marker [] { 10 };\n" + 
+				"	                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 4)\n" + 
+				"	int j [] = new @Marker int @Marker [] { 10 };\n" + 
+				"	                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 5)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression
+	public void test015() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        int i = (@Marker int) 0;\n" +
+					"        int j [] = (@Marker int @Marker []) null;\n" +
+					"        Zork z;\n" +
+					"    }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	int i = (@Marker int) 0;\n" + 
+				"	          ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	int j [] = (@Marker int @Marker []) null;\n" + 
+				"	             ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 4)\n" + 
+				"	int j [] = (@Marker int @Marker []) null;\n" + 
+				"	                         ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 5)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// InstanceofExpression ::= InstanceofExpression 'instanceof' ReferenceType
+	public void test016() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        if (args instanceof @Readonly String) {\n" +
+					"        }\n" +
+					"    }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	if (args instanceof @Readonly String) {\n" + 
+				"	    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Incompatible conditional operand types String[] and String\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	if (args instanceof @Readonly String) {\n" + 
+				"	                     ^^^^^^^^\n" + 
+				"Readonly cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// TypeArgument ::= ReferenceType
+	public void test017() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X extends Y<@Marker Integer, String> {}\n" +
+					"class Y<T, V> {\n" +
+				    "    Zork z;\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends Y<@Marker Integer, String> {}\n" + 
+				"	                          ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ReferenceType1 ::= ReferenceType '>'
+	public void test018() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X extends Y<@Marker Integer> {}\n" +
+					"class Y<T> {\n" +
+				    "    Zork z;\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends Y<@Marker Integer> {}\n" + 
+				"	                          ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	
+	// ReferenceType2 ::= ReferenceType '>>'
+	public void test019() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X<T extends Object & Comparable<? super @Marker String>> {}\n" +
+					"class Y<T> {\n" +
+				    "    Zork z;\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X<T extends Object & Comparable<? super @Marker String>> {}\n" + 
+				"	                                                      ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ReferenceType3 ::= ReferenceType '>>>'
+	public void test020() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X<A extends X<X<X<@Marker String>>>> {}\n" +
+					"class Y<T> {\n" +
+				    "    Zork z;\n" +
+					"}\n"
+ 				},
+ 				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X<A extends X<X<X<@Marker String>>>> {}\n" + 
+				"	                           ^\n" + 
+				"Bound mismatch: The type X<X<String>> is not a valid substitute for the bounded parameter <A extends X<X<X<String>>>> of the type X<A>\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 1)\n" + 
+				"	public class X<A extends X<X<X<@Marker String>>>> {}\n" + 
+				"	                             ^\n" + 
+				"Bound mismatch: The type X<String> is not a valid substitute for the bounded parameter <A extends X<X<X<String>>>> of the type X<A>\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 1)\n" + 
+				"	public class X<A extends X<X<X<@Marker String>>>> {}\n" + 
+				"	                               ^^^^^^^^^^^^^^\n" + 
+				"Bound mismatch: The type String is not a valid substitute for the bounded parameter <A extends X<X<X<String>>>> of the type X<A>\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 1)\n" + 
+				"	public class X<A extends X<X<X<@Marker String>>>> {}\n" + 
+				"	                                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 3)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// WildcardBounds ::= 'extends' ReferenceType
+	// WildcardBounds ::= 'super' ReferenceType
+	public void test021() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" +
+					"   void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" + 
+				"	         ^^^\n" + 
+				"Map cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" + 
+				"	              ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 2)\n" + 
+				"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" + 
+				"	                              ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 2)\n" + 
+				"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" + 
+				"	                                              ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 2)\n" + 
+				"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" + 
+				"	                                                                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 3)\n" + 
+				"	void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" + 
+				"	         ^^^\n" + 
+				"Map cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 3)\n" + 
+				"	void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" + 
+				"	              ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 3)\n" + 
+				"	void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" + 
+				"	                                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 3)\n" + 
+				"	void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" + 
+				"	                                                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"10. ERROR in X.java (at line 3)\n" + 
+				"	void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" + 
+				"	                                                                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// TypeParameter ::= TypeParameterHeader 'extends' ReferenceType
+	public void test022() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" +
+					"}\n" +
+					"class Y<T> {}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                 ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                                   ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                                             ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                                                         ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. WARNING in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                                                                          ^^^^^^^^^^^^^^^\n" + 
+				"The type parameter Q should not be bounded by the final type Integer. Final types cannot be further extended\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                                                                           ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// TypeParameter ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList
+	// AdditionalBound ::= '&' ReferenceType
+	// TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList1
+	public void test023() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"I.java",
+					"public interface I<U extends J<? extends I<U>>> {\n" +
+					"}\n" +
+					"interface J<T extends I<? extends J<T>>> {\n" +
+					"}\n" +
+					"class CI<U extends CJ<T, U> & @Marker J<@Marker T>,\n" +
+					"			T extends CI<U, T> & @Marker I<U>>\n" +
+					"	implements I<U> {\n" +
+					"}\n" +
+					"class CJ<T extends CI<U, T> & @Marker I<@Marker U>,\n" +
+					"			U extends CJ<T, U> & J<T>>\n" +
+					"	implements J<T> {\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in I.java (at line 5)\n" + 
+				"	class CI<U extends CJ<T, U> & @Marker J<@Marker T>,\n" + 
+				"	                               ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in I.java (at line 5)\n" + 
+				"	class CI<U extends CJ<T, U> & @Marker J<@Marker T>,\n" + 
+				"	                                         ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in I.java (at line 6)\n" + 
+				"	T extends CI<U, T> & @Marker I<U>>\n" + 
+				"	                      ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in I.java (at line 9)\n" + 
+				"	class CJ<T extends CI<U, T> & @Marker I<@Marker U>,\n" + 
+				"	                               ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. ERROR in I.java (at line 9)\n" + 
+				"	class CJ<T extends CI<U, T> & @Marker I<@Marker U>,\n" + 
+				"	                                         ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// InstanceofExpression_NotName ::= Name 'instanceof' ReferenceType
+	public void test024() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X<E> {\n" +
+					"  class Y {\n" +
+					"    E e;\n" +
+					"    E getOtherElement(Object other) {\n" +
+					"      if (!(other instanceof @Marker X<?>.Y)) {};\n" +
+					"      return null;\n" +
+					"    }\n" +
+					"  }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	if (!(other instanceof @Marker X<?>.Y)) {};\n" + 
+				"	                        ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// InstanceofExpression_NotName ::= InstanceofExpression_NotName 'instanceof' ReferenceType
+	public void test025() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X<P, C> {\n" +
+					"  public X() {\n" +
+					"    if (!(this instanceof @Marker X)) {}\n" +
+					"  }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	if (!(this instanceof @Marker X)) {}\n" + 
+				"	                       ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ReferenceExpressionTypeArgumentsAndTrunk ::= OnlyTypeArguments '.' ClassOrInterfaceType Dimsopt
+	public void test026() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    void foo(Y<String>.Z z, int x);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = Y<String>.@Marker Z::foo;\n" +
+					"        i.foo(new Y<String>().new Z(), 10); \n" +
+					"        Zork z;\n" +
+					"    }\n" +
+					"}\n" +
+					"class Y<T> {\n" +
+					"    class Z {\n" +
+					"        void foo(int x) {\n" +
+					"	    System.out.println(x);\n" +
+					"        }\n" +
+					"    }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	I i = Y<String>.@Marker Z::foo;\n" + 
+				"	                 ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 8)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs
+	// ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer
+	public void test027() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        X [] x = new @Marker X @Marker [5];\n" +
+					"        X [] x2 = new @Marker X @Marker [] { null };\n" +
+					"        Zork z;\n" +
+					"    }\n" +
+					"}\n"				},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 3)\n" + 
+					"	X [] x = new @Marker X @Marker [5];\n" + 
+					"	              ^^^^^^\n" + 
+					"Marker cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 3)\n" + 
+					"	X [] x = new @Marker X @Marker [5];\n" + 
+					"	                        ^^^^^^\n" + 
+					"Marker cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 4)\n" + 
+					"	X [] x2 = new @Marker X @Marker [] { null };\n" + 
+					"	               ^^^^^^\n" + 
+					"Marker cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"4. ERROR in X.java (at line 4)\n" + 
+					"	X [] x2 = new @Marker X @Marker [] { null };\n" + 
+					"	                         ^^^^^^\n" + 
+					"Marker cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"5. ERROR in X.java (at line 5)\n" + 
+					"	Zork z;\n" + 
+					"	^^^^\n" + 
+					"Zork cannot be resolved to a type\n" + 
+					"----------\n");
+	}
+	// CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus
+	public void test028() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        java.util.Map.Entry [] e = (java.util.Map<String, String>.@Marker Entry []) null;\n" +
+					"    }\n" +
+					"}\n"				},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 3)\n" + 
+					"	java.util.Map.Entry [] e = (java.util.Map<String, String>.@Marker Entry []) null;\n" + 
+					"	^^^^^^^^^^^^^^^^^^^\n" + 
+					"Map.Entry is a raw type. References to generic type Map<K,V>.Entry<K,V> should be parameterized\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 3)\n" + 
+					"	java.util.Map.Entry [] e = (java.util.Map<String, String>.@Marker Entry []) null;\n" + 
+					"	                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+					"The member type Map<String,String>.Entry cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type Map<String,String>\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 3)\n" + 
+					"	java.util.Map.Entry [] e = (java.util.Map<String, String>.@Marker Entry []) null;\n" + 
+					"	                                                           ^^^^^^\n" + 
+					"Marker cannot be resolved to a type\n" + 
+					"----------\n");
+	}
+	// ReferenceType1 ::= ClassOrInterface '<' TypeArgumentList2
+	public void test029() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.io.Serializable;\n" +
+					"import java.util.List;\n" +
+					"public class X<T extends Comparable<T> & Serializable> {\n" +
+					"	void foo(List<? extends @Marker Comparable<T>> p) {} \n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	void foo(List<? extends @Marker Comparable<T>> p) {} \n" + 
+				"	                         ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ReferenceType2 ::= ClassOrInterface '<' TypeArgumentList3
+	public void test030() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"class Base {\n" +
+					"}\n" +
+					"class Foo<U extends Base, V extends Bar<U, @Marker Foo<U, V>>> {\n" +
+					"}\n" +
+					"class Bar<E extends Base, F extends Foo<E, @Marker Bar<E, F>>> {\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	class Foo<U extends Base, V extends Bar<U, @Marker Foo<U, V>>> {\n" + 
+				"	                                           ^^^^^^^^^^^\n" + 
+				"Bound mismatch: The type Foo<U,V> is not a valid substitute for the bounded parameter <F extends Foo<E,Bar<E,F>>> of the type Bar<E,F>\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	class Foo<U extends Base, V extends Bar<U, @Marker Foo<U, V>>> {\n" + 
+				"	                                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	class Bar<E extends Base, F extends Foo<E, @Marker Bar<E, F>>> {\n" + 
+				"	                                           ^^^^^^^^^^^\n" + 
+				"Bound mismatch: The type Bar<E,F> is not a valid substitute for the bounded parameter <V extends Bar<U,Foo<U,V>>> of the type Foo<U,V>\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 5)\n" + 
+				"	class Bar<E extends Base, F extends Foo<E, @Marker Bar<E, F>>> {\n" + 
+				"	                                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ClassHeaderExtends ::= 'extends' ClassType
+	public void test031() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X extends @Marker Object {\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker Object {\n" + 
+				"	                        ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ClassInstanceCreationExpression ::= 'new' OnlyTypeArguments ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' UnqualifiedClassBodyopt
+	// ClassInstanceCreationExpression ::= 'new' ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' UnqualifiedClassBodyopt
+	public void test032() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    X x = new @Marker X();\n" +
+					"    X y = new <String> @Marker X();\n" +		
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	X x = new @Marker X();\n" + 
+				"	           ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 3)\n" + 
+				"	X y = new <String> @Marker X();\n" + 
+				"	           ^^^^^^\n" + 
+				"Unused type arguments for the non generic constructor X() of type X; it should not be parameterized with arguments <String>\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 3)\n" + 
+				"	X y = new <String> @Marker X();\n" + 
+				"	                    ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ClassInstanceCreationExpression ::= Primary '.' 'new' OnlyTypeArguments ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+	// ClassInstanceCreationExpression ::= Primary '.' 'new' ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+	public void test033() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    class Y {\n" +
+					"    }\n" +
+					"    Y y1 = new @Marker X().new @Marker Y();\n" +
+					"    Y y2 = new @Marker X().new <String> @Marker Y();\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	Y y1 = new @Marker X().new @Marker Y();\n" + 
+				"	            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	Y y1 = new @Marker X().new @Marker Y();\n" + 
+				"	                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	Y y2 = new @Marker X().new <String> @Marker Y();\n" + 
+				"	            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. WARNING in X.java (at line 5)\n" + 
+				"	Y y2 = new @Marker X().new <String> @Marker Y();\n" + 
+				"	                            ^^^^^^\n" + 
+				"Unused type arguments for the non generic constructor X.Y() of type X.Y; it should not be parameterized with arguments <String>\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 5)\n" + 
+				"	Y y2 = new @Marker X().new <String> @Marker Y();\n" + 
+				"	                                     ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+	// ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' OnlyTypeArguments ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+	public void test034() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    X x;\n" +
+					"    class Y {\n" +
+					"    }\n" +
+					"    Y y1 = @Marker x.new @Marker Y();\n" +
+					"    Y y2 = @Marker x.new <String> @Marker Y();\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	Y y1 = @Marker x.new @Marker Y();\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	Y y1 = @Marker x.new @Marker Y();\n" + 
+				"	                      ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 6)\n" + 
+				"	Y y2 = @Marker x.new <String> @Marker Y();\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"4. WARNING in X.java (at line 6)\n" + 
+				"	Y y2 = @Marker x.new <String> @Marker Y();\n" + 
+				"	                      ^^^^^^\n" + 
+				"Unused type arguments for the non generic constructor X.Y() of type X.Y; it should not be parameterized with arguments <String>\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 6)\n" + 
+				"	Y y2 = @Marker x.new <String> @Marker Y();\n" + 
+				"	                               ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// MethodHeaderThrowsClause ::= 'throws' ClassTypeList
+	// ClassTypeList -> ClassTypeElt
+	// ClassTypeList ::= ClassTypeList ',' ClassTypeElt
+	// ClassTypeElt ::= ClassType
+	public void test035() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    void foo() throws @Marker NullPointerException, @Marker ArrayIndexOutOfBoundsException {}\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	void foo() throws @Marker NullPointerException, @Marker ArrayIndexOutOfBoundsException {}\n" + 
+				"	                   ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	void foo() throws @Marker NullPointerException, @Marker ArrayIndexOutOfBoundsException {}\n" + 
+				"	                                                 ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ClassHeaderImplements ::= 'implements' InterfaceTypeList
+	// InterfaceHeaderExtends ::= 'extends' InterfaceTypeList
+	// InterfaceTypeList -> InterfaceType
+	// InterfaceTypeList ::= InterfaceTypeList ',' InterfaceType
+	// InterfaceType ::= ClassOrInterfaceType
+	public void test036() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"interface I {}\n" +
+					"interface J {}\n" +
+					"interface K extends @Marker I, @Marker J {}\n" +
+					"interface L {}\n" +
+					"public class X implements @Marker K, @Marker L {\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	interface K extends @Marker I, @Marker J {}\n" + 
+				"	                     ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	interface K extends @Marker I, @Marker J {}\n" + 
+				"	                                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	public class X implements @Marker K, @Marker L {\n" + 
+				"	                           ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 5)\n" + 
+				"	public class X implements @Marker K, @Marker L {\n" + 
+				"	                                      ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ReferenceExpression ::= Name Dimsopt '::' NonWildTypeArgumentsopt IdentifierOrNew
+	public void test037() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    void foo(int x);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" +
+					"        i.foo(10); \n" +
+					"        Zork z;\n" +
+					"    }\n" +
+					"}\n" +
+					"class Y {\n" +
+					"    static class Z {\n" +
+					"        public static void foo(int x) {\n" +
+					"	    System.out.println(x);\n" +
+					"        }\n" +
+					"    }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" + 
+				"	      ^^^^^^^\n" + 
+				"Type annotations are not allowed on type names used to access static members\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" + 
+				"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"The type Y.Z[][][] does not define foo(int) that is applicable here\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" + 
+				"	       ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" + 
+				"	                  ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" + 
+				"	                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 6)\n" + 
+				"	I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" + 
+				"	                                          ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 8)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// ReferenceExpression ::= Name BeginTypeArguments ReferenceExpressionTypeArgumentsAndTrunk '::' NonWildTypeArgumentsopt IdentifierOrNew
+	public void test038() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    Y foo(int x);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    class Z extends Y {\n" +
+					"        public Z(int x) {\n" +
+					"            super(x);\n" +
+					"            System.out.println();\n" +
+					"        }\n" +
+					"    }\n" +
+					"    public static void main(String [] args) {\n" +
+					"        i = @Marker W<@Marker Integer>::<@Marker String> new;\n" +
+					"    }\n" +
+					"}\n" +
+					"class W<T> extends Y {\n" +
+					"    public W(T x) {\n" +
+					"        super(0);\n" +
+					"        System.out.println(x);\n" +
+					"    }\n" +
+					"}\n" +
+					"class Y {\n" +
+					"    public Y(int x) {\n" +
+					"        System.out.println(x);\n" +
+					"    }\n" +
+					"}\n"
+
+
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 12)\n" + 
+				"	i = @Marker W<@Marker Integer>::<@Marker String> new;\n" + 
+				"	^\n" + 
+				"i cannot be resolved to a variable\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 12)\n" + 
+				"	i = @Marker W<@Marker Integer>::<@Marker String> new;\n" + 
+				"	    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"The target type of this expression must be a functional interface\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 12)\n" + 
+				"	i = @Marker W<@Marker Integer>::<@Marker String> new;\n" + 
+				"	     ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 12)\n" + 
+				"	i = @Marker W<@Marker Integer>::<@Marker String> new;\n" + 
+				"	               ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 12)\n" + 
+				"	i = @Marker W<@Marker Integer>::<@Marker String> new;\n" + 
+				"	                                  ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// CastExpression ::= PushLPAREN Name PushRPAREN InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
+	// CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+	// CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression Dimsopt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+	// CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus
+	public void test039() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X  {\n" +
+					"    Object o = (@Marker X) null;\n" +
+					"    Object p = (@Marker X @Marker []) null;\n" +
+					"    Object q = (@Marker java. @Marker util. @Marker List<@Marker String> []) null;\n" +
+					"    Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	Object o = (@Marker X) null;\n" + 
+				"	             ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	Object p = (@Marker X @Marker []) null;\n" + 
+				"	             ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 3)\n" + 
+				"	Object p = (@Marker X @Marker []) null;\n" + 
+				"	                       ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 4)\n" + 
+				"	Object q = (@Marker java. @Marker util. @Marker List<@Marker String> []) null;\n" + 
+				"	            ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 4)\n" + 
+				"	Object q = (@Marker java. @Marker util. @Marker List<@Marker String> []) null;\n" + 
+				"	                          ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 4)\n" + 
+				"	Object q = (@Marker java. @Marker util. @Marker List<@Marker String> []) null;\n" + 
+				"	                                         ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 4)\n" + 
+				"	Object q = (@Marker java. @Marker util. @Marker List<@Marker String> []) null;\n" + 
+				"	                                                      ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	            ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"The member type Map<String,String>.Entry cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type Map<String,String>\n" + 
+				"----------\n" + 
+				"10. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	                          ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"11. ERROR in X.java (at line 5)\n" +
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" +
+				"	                                       ^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n" + 
+				"12. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	                                        ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"13. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	                                                    ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"14. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	                                                                    ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"15. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	                                                                                    ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"16. ERROR in X.java (at line 5)\n" + 
+				"	Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" + 
+				"	                                                                                                  ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java
index d486651..d6a72b3 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java
@@ -4,9 +4,15 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 388800 - [1.8] adjust tests to 1.8 JRE
  *     Keigo Imai - Contribution for  bug 388903 - Cannot extend inner class as an anonymous class when it extends the outer class
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
@@ -6855,6 +6861,7 @@
 			"				compare(yourList != null ? yourList : myList, yourList);\n" + 
 			"				return 0;\n" + 
 			"			}\n" + 
+			COMPARATOR_RAW_IMPL_JRE8 +
 			"		};\n" + 
 			"		System.out.println(\"SUCCESS\");\n" + 
 			"	}\n" + 
@@ -6885,6 +6892,7 @@
 			"			private int foo(int i, int j) {\n" + 
 			"				return i - j;\n" + 
 			"			}\n" + 
+			COMPARATOR_RAW_IMPL_JRE8 +
 			"		};\n" + 
 			"		System.out.println(\"SUCCESS\");\n" + 
 			"	}\n" + 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
new file mode 100644
index 0000000..a5d2a19
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InterfaceMethodsTest.java
@@ -0,0 +1,2133 @@
+/*******************************************************************************
+ * Copyright (c) 2013 GK Software AG, 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *     Jesper S Moller - realigned with bug 399695
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.util.Map;
+
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+import junit.framework.Test;
+
+// See https://bugs.eclipse.org/380501
+// Bug 380501 - [1.8][compiler] Add support for default methods (JSR 335)
+public class InterfaceMethodsTest extends AbstractComparableTest {
+
+// 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[] { "testSuperCall6" };
+//			TESTS_NUMBERS = new int[] { 561 };
+//			TESTS_RANGE = new int[] { 1, 2049 };
+	}
+
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+
+	public static Class testClass() {
+		return InterfaceMethodsTest.class;
+	}
+
+	public InterfaceMethodsTest(String name) {
+		super(name);
+	}
+
+	// default methods with various modifiers, positive cases
+	public void testModifiers1() {
+		runConformTest(
+		new String[] {
+			"I.java",
+			"import java.lang.annotation.*;\n" +
+			"@Target(ElementType.METHOD) @interface Annot{}\n" +
+			"public interface I {\n" +
+			"    default void foo1()  {}\n" +
+			"    public default void foo2() { System.exit(0); }\n" +
+			"    strictfp default void foo3() {}\n" +
+			"    public default strictfp void foo4() {}\n" +
+			"    public default strictfp @Annot void foo5() {}\n" +
+			"}\n",
+		}, 
+		"");
+	}
+		
+
+	// default methods with various modifiers, negative cases
+	public void testModifiers1a() {
+		runNegativeTest(
+		new String[] {
+			"I.java",
+			"import java.lang.annotation.*;\n" +
+			"@Target(ElementType.METHOD) @interface Annot{}\n" +
+			"public interface I {\n" +
+			"    default void foo1()  {}\n" +
+			"    public default synchronized void foo2() { System.exit(0); }\n" +
+			"    strictfp default void foo3() {}\n" +
+			"    public default strictfp synchronized void foo4() {}\n" +
+			"    public default strictfp synchronized @Annot void foo5() {}\n" +
+			"}\n"}, 
+			"----------\n" + 
+			"1. ERROR in I.java (at line 5)\n" + 
+			"	public default synchronized void foo2() { System.exit(0); }\n" + 
+			"	                                 ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo2; only public, abstract, default, static and strictfp are permitted\n" + 
+			"----------\n" + 
+			"2. ERROR in I.java (at line 7)\n" + 
+			"	public default strictfp synchronized void foo4() {}\n" + 
+			"	                                          ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo4; only public, abstract, default, static and strictfp are permitted\n" + 
+			"----------\n" + 
+			"3. ERROR in I.java (at line 8)\n" + 
+			"	public default strictfp synchronized @Annot void foo5() {}\n" + 
+			"	                                                 ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo5; only public, abstract, default, static and strictfp are permitted\n" + 
+			"----------\n");
+	}
+
+	// default methods with various modifiers, simple syntax error blows the parser
+	public void testModifiers1b() {
+		runNegativeTest(
+		new String[] {
+			"I.java",
+			"import java.lang.annotation.*;\n" +
+			"@Target(ElementType.METHOD) @interface Annot{}\n" +
+			"public interface I {\n" +
+			"    default void foo1() { System.out.println(3); }\n" +
+			"    public default void foo2() {}\n" +
+			"    stritfp default void foo3() {}\n" + // typo in strictfp
+			"    default public strictfp void foo4() {}\n" +
+			"    public strictfp  default @Annot void foo5() {}\n" +
+			"    public default <T> T foo6(T t) { return t; }\n" +
+			"}\n"},
+			"----------\n" +
+			"1. ERROR in I.java (at line 6)\n" +
+			"	stritfp default void foo3() {}\n" +
+			"	^^^^^^^\n" +
+			"Syntax error, insert \"Identifier (\" to complete MethodHeaderName\n" +
+			"----------\n" +
+//{ObjectTeams: funny syntax errors, but so what ...
+			"2. ERROR in I.java (at line 6)\n" + 
+			"	stritfp default void foo3() {}\n" + 
+			"	^^^^^^^\n" + 
+			"Syntax error, insert \")\" to complete MethodSpecLong\n" + 
+			"----------\n" + 
+			"3. ERROR in I.java (at line 6)\n" + 
+			"	stritfp default void foo3() {}\n" + 
+			"	^^^^^^^\n" + 
+			"Syntax error, insert \"<-\" to complete CallinBindingLeft\n" + 
+			"----------\n" + 
+			"4. ERROR in I.java (at line 6)\n" + 
+			"	stritfp default void foo3() {}\n" + 
+			"	^^^^^^^\n" + 
+			"Syntax error, insert \"MethodSpecsLong EmptyParameterMappings\" to complete InvalidCallinBinding\n" +
+// SH}
+			"----------\n");
+	}
+
+	// regular interface with illegal modifiers
+	public void testModifiers2() {
+		runNegativeTest(
+		new String[] {
+			"I.java",
+			"import java.lang.annotation.*;\n" +
+			"@Target(ElementType.METHOD) @interface Annot{}\n" +
+			"public interface I {\n" +
+			"    void foo1();\n" +
+			"    public synchronized void foo2();\n" +
+			"    strictfp void foo3();\n" +
+			"    public strictfp synchronized void foo4();\n" +
+			"    public strictfp synchronized @Annot void foo5();\n" +
+			"}\n"},
+			"----------\n" +
+			"1. ERROR in I.java (at line 5)\n" +
+			"	public synchronized void foo2();\n" +
+			"	                         ^^^^^^\n" +
+			"Illegal modifier for the interface method foo2; only public, abstract, default, static and strictfp are permitted\n" +
+			"----------\n" +
+			"2. ERROR in I.java (at line 6)\n" +
+			"	strictfp void foo3();\n" +
+			"	              ^^^^^^\n" +
+			"strictfp is not permitted for abstract interface method foo3\n" +
+			"----------\n" +
+			"3. ERROR in I.java (at line 7)\n" +
+			"	public strictfp synchronized void foo4();\n" +
+			"	                                  ^^^^^^\n" +
+			"strictfp is not permitted for abstract interface method foo4\n" +
+			"----------\n" +
+			"4. ERROR in I.java (at line 7)\n" +
+			"	public strictfp synchronized void foo4();\n" +
+			"	                                  ^^^^^^\n" +
+			"Illegal modifier for the interface method foo4; only public, abstract, default, static and strictfp are permitted\n" +
+			"----------\n" +
+			"5. ERROR in I.java (at line 8)\n" +
+			"	public strictfp synchronized @Annot void foo5();\n" +
+			"	                                         ^^^^^^\n" +
+			"strictfp is not permitted for abstract interface method foo5\n" +
+			"----------\n" +
+			"6. ERROR in I.java (at line 8)\n" +
+			"	public strictfp synchronized @Annot void foo5();\n" +
+			"	                                         ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo5; only public, abstract, default, static and strictfp are permitted\n" +
+			"----------\n");
+	}
+
+	// default & regular methods with modifiers that are illegal even for default methods
+	public void testModifiers3() {
+		runNegativeTest(
+		new String[] {
+			"I.java",
+			"public interface I {\n" +
+			"    native void foo1();\n" +
+			"    static void foo2();\n" +
+			"    native default void foo3() {}\n" +
+			"    default native void foo4() {}\n" +
+			"    static default void foo5() {}\n" +
+			"    default static void foo6() {}\n" +
+			"}\n"},
+			"----------\n" + 
+			"1. ERROR in I.java (at line 2)\n" + 
+			"	native void foo1();\n" + 
+			"	            ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo1; only public, abstract, default, static and strictfp are permitted\n" + 
+			"----------\n" + 
+			"2. ERROR in I.java (at line 3)\n" + 
+			"	static void foo2();\n" + 
+			"	            ^^^^^^\n" + 
+			"This method requires a body instead of a semicolon\n" + 
+			"----------\n" + 
+			"3. ERROR in I.java (at line 4)\n" + 
+			"	native default void foo3() {}\n" + 
+			"	                    ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo3; only public, abstract, default, static and strictfp are permitted\n" + 
+			"----------\n" + 
+			"4. ERROR in I.java (at line 5)\n" + 
+			"	default native void foo4() {}\n" + 
+			"	                    ^^^^^^\n" + 
+			"Illegal modifier for the interface method foo4; only public, abstract, default, static and strictfp are permitted\n" + 
+			"----------\n" + 
+			"5. ERROR in I.java (at line 6)\n" + 
+			"	static default void foo5() {}\n" + 
+			"	                    ^^^^^^\n" + 
+			"Illegal combination of modifiers for the interface method foo5; only one of abstract, default, or static permitted\n" + 
+			"----------\n" + 
+			"6. ERROR in I.java (at line 7)\n" + 
+			"	default static void foo6() {}\n" + 
+			"	                    ^^^^^^\n" + 
+			"Illegal combination of modifiers for the interface method foo6; only one of abstract, default, or static permitted\n" + 
+			"----------\n");
+	}
+
+	// if an interface methods is explicitly "abstract" it cannot have a (default) body
+	public void testModifiers4() {
+		runNegativeTest(
+		new String[] {
+			"I.java",
+			"import java.lang.annotation.*;\n" +
+			"public interface I {\n" +
+			"    abstract void foo1();\n" + // OK
+			"    public abstract default void foo2() {}\n" +
+			"    default abstract void foo3() {}\n" +
+			"    void foo4() { }\n" + // implicit "abstract" without "default" doesn't allow a body, either
+			"    abstract static default void foo5() {}\n" + // double fault
+			"}\n"},
+			"----------\n" + 
+			"1. ERROR in I.java (at line 4)\n" + 
+			"	public abstract default void foo2() {}\n" + 
+			"	                             ^^^^^^\n" + 
+			"Illegal combination of modifiers for the interface method foo2; only one of abstract, default, or static permitted\n" + 
+			"----------\n" + 
+			"2. ERROR in I.java (at line 5)\n" + 
+			"	default abstract void foo3() {}\n" + 
+			"	                      ^^^^^^\n" + 
+			"Illegal combination of modifiers for the interface method foo3; only one of abstract, default, or static permitted\n" + 
+			"----------\n" + 
+			"3. ERROR in I.java (at line 6)\n" + 
+			"	void foo4() { }\n" + 
+			"	     ^^^^^^\n" + 
+			"Abstract methods do not specify a body\n" + 
+			"----------\n" + 
+			"4. ERROR in I.java (at line 7)\n" + 
+			"	abstract static default void foo5() {}\n" + 
+			"	                             ^^^^^^\n" + 
+			"Illegal combination of modifiers for the interface method foo5; only one of abstract, default, or static permitted\n" + 
+			"----------\n");
+	}
+
+	// class implements interface with default method. 
+	// - no need to implement this interface method as it is not abstract
+	public void testModifiers5() {
+		runConformTest(
+			new String[] {
+				"C.java",
+				"public class C implements I {\n" +
+				"    public static void main(String[] args) {\n" +
+				"        new C().foo();\n" +
+				"    }\n" +
+				"}\n",
+				"I.java",
+				"public interface I {\n" +
+				"    default void foo() {\n" +
+				"        System.out.println(\"default\");\n" +
+				"    }\n" +
+				"}\n"
+			},
+			"default"
+			);
+	}
+
+	// class implements interface with default method. 
+	// - no need to implement this interface method as it is not abstract, but other abstract method exists
+	public void testModifiers6() {
+		runNegativeTest(
+			new String[] {
+				"I.java",
+				"public interface I {\n" +
+				"    default void foo() {}\n" +
+				"    void bar();\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I {}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C.java (at line 1)\n" + 
+			"	public class C implements I {}\n" + 
+			"	             ^\n" + 
+			"The type C must implement the inherited abstract method I.bar()\n" + 
+			"----------\n");
+	}
+
+	// a default method has a semicolon body / an undocumented empty body
+	public void testModifiers7() {
+		Map options = getCompilerOptions();
+		options.put(JavaCore.COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK, JavaCore.ERROR);
+		runNegativeTest(
+			new String[] {
+				"I.java",
+				"public interface I {\n" +
+				"    default void foo();\n" +
+				"    default void bar() {}\n" +
+				"    default void zork() { /* nop */ }\n" +
+				"}\n"
+			},
+			"----------\n" +
+			"1. ERROR in I.java (at line 2)\n" +
+			"	default void foo();\n" +
+			"	             ^^^^^\n" +
+			"This method requires a body instead of a semicolon\n" +
+			"----------\n" +
+			"2. ERROR in I.java (at line 3)\n" +
+			"	default void bar() {}\n" +
+			"	                   ^^\n" +
+			"Empty block should be documented\n" +
+			"----------\n",
+			null/*classLibs*/,
+			true/*shouldFlush*/,
+			options);
+	}
+
+	// JLS 9.4.2  - default method cannot override method from Object
+	// Bug 382355 - [1.8][compiler] Compiler accepts erroneous default method
+	// new error message
+	public void testObjectMethod1() {
+		runNegativeTest(
+			new String[] {
+				"I.java",
+				"public interface I {\n" +
+				"    public default String toString () { return \"\";}\n" + 
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in I.java (at line 2)\n" + 
+			"	public default String toString () { return \"\";}\n" + 
+			"	                      ^^^^^^^^^^^\n" + 
+			"A default method cannot override a method from java.lang.Object \n" + 
+			"----------\n");
+	}
+	
+	// JLS 9.4.2  - default method cannot override method from Object
+	// Bug 382355 - [1.8][compiler] Compiler accepts erroneous default method
+	// when using a type variable this is already reported as a name clash
+	public void testObjectMethod2() {
+		runNegativeTest(
+			new String[] {
+				"I.java",
+				"public interface I<T> {\n" +
+				"    public default boolean equals (T other) { return false;}\n" + 
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in I.java (at line 2)\n" + 
+			"	public default boolean equals (T other) { return false;}\n" + 
+			"	                       ^^^^^^^^^^^^^^^^\n" + 
+			"Name clash: The method equals(T) of type I<T> has the same erasure as equals(Object) of type Object but does not override it\n" + 
+			"----------\n");
+	}
+	
+	// JLS 9.4.2  - default method cannot override method from Object
+	// Bug 382355 - [1.8][compiler] Compiler accepts erroneous default method
+	// one error for final method is enough
+	public void testObjectMethod3() {
+		runNegativeTest(
+			new String[] {
+				"I.java",
+				"public interface I<T> {\n" +
+				"    @Override\n" +
+				"    default public Class<?> getClass() { return null;}\n" + 
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in I.java (at line 3)\n" + 
+			"	default public Class<?> getClass() { return null;}\n" + 
+			"	                        ^^^^^^^^^^\n" + 
+			"Cannot override the final method from Object\n" + 
+			"----------\n");
+	}
+
+	// JLS 9.4.1
+	// Bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
+	// an inherited default methods clashes with another inherited method
+	// simple case
+	public void testInheritedDefaultOverrides01() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	String foo();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"	default String foo() { return \"\"; }\n" +
+				"}\n",
+				"I3.java",
+				"public interface I3 extends I1, I2 {\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in I3.java (at line 1)\n" + 
+			"	public interface I3 extends I1, I2 {\n" + 
+			"	                 ^^\n" + 
+			"The default method foo() inherited from I2 conflicts with another method inherited from I1\n" +
+			"----------\n");
+	}
+	
+	// JLS 9.4.1
+	// Bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
+	// an inherited default methods clashes with another inherited method
+	// indirect inheritance
+	public void testInheritedDefaultOverrides02() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	String foo();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"	default String foo() { return \"\"; }\n" +
+				"}\n",
+				"I1A.java",
+				"public interface I1A extends I1 {\n" +
+				"}\n",
+				"I2A.java",
+				"public interface I2A extends I2 {\n" +
+				"}\n",
+				"I3.java",
+				"public interface I3 extends I1A, I2A {\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in I3.java (at line 1)\n" + 
+			"	public interface I3 extends I1A, I2A {\n" + 
+			"	                 ^^\n" + 
+			"The default method foo() inherited from I2 conflicts with another method inherited from I1\n" +
+			"----------\n");
+	}
+
+	// JLS 9.4.1
+	// Bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
+	// Parameterized case is already reported as a clash
+	public void testInheritedDefaultOverrides03() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"import java.util.List;\n" +
+				"public interface I1 {\n" +
+				"	String foo(List<String> l);\n" +
+				"}\n",
+				"I2.java",
+				"import java.util.List;\n" +
+				"public interface I2 {\n" +
+				"   @SuppressWarnings(\"rawtypes\")\n" +
+				"	default String foo(List l) { return \"\"; }\n" +
+				"}\n",
+				"I3.java",
+				"import java.util.List;\n" +
+				"public interface I3 extends I1, I2 {\n" +
+				"   @Override\n" +
+				"   String foo(List<String> l);\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in I3.java (at line 4)\n" + 
+			"	String foo(List<String> l);\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Name clash: The method foo(List<String>) of type I3 has the same erasure as foo(List) of type I2 but does not override it\n" + 
+			"----------\n");
+	}
+
+	// JLS 9.4.1
+	// Bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
+	// Parameterized case is already reported as a clash - inverse case of previous
+	public void testInheritedDefaultOverrides04() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"import java.util.List;\n" +
+				"public interface I1 {\n" +
+				"	default String foo(List<String> l) { return \"\"; }\n" +
+				"}\n",
+				"I2.java",
+				"import java.util.List;\n" +
+				"public interface I2 {\n" +
+				"   @SuppressWarnings(\"rawtypes\")\n" +
+				"	String foo(List l);\n" +
+				"}\n",
+				"I3.java",
+				"import java.util.List;\n" +
+				"public interface I3 extends I1, I2 {\n" +
+				"   @Override\n" +
+				"   String foo(List<String> l);\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in I3.java (at line 4)\n" + 
+			"	String foo(List<String> l);\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Name clash: The method foo(List<String>) of type I3 has the same erasure as foo(List) of type I2 but does not override it\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=390761
+	public void testDefaultNonclash() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public interface X extends Map<String, Object> {\n" +
+				"   Zork z;\n" +
+				"}\n" +
+				"\n" +
+				"interface Map<K,V> extends MapStream<K, V>  {\n" +
+				"   @Override\n" +
+				"	default Iterable<BiValue<K, V>> asIterable() {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}\n" +
+				"interface MapStream<K, V> {\n" +
+				"	Iterable<BiValue<K, V>> asIterable();\n" +
+				"}\n" +
+				"\n" +
+				"interface BiValue<T, U> {\n" +
+				"    T getKey();\n" +
+				"    U getValue();\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=390761
+	public void testDefaultNonclash2() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public interface X extends Map<String, Object> {\n" +
+				"   Zork z;\n" +
+				"}\n" +
+				"\n" +
+				"interface Map<K,V> extends MapStream<K, V>  {\n" +
+				"   @Override\n" +
+				"	Iterable<BiValue<K, V>> asIterable();\n" +
+				"}\n" +
+				"interface MapStream<K, V> {\n" +
+				"	default Iterable<BiValue<K, V>> asIterable() {\n" +
+				"       return null;\n" +
+				"   }\n" +
+				"}\n" +
+				"\n" +
+				"interface BiValue<T, U> {\n" +
+				"    T getKey();\n" +
+				"    U getValue();\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+	
+	public void testDefaultNonclash3() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public interface X extends Map<String, Object> {\n" +
+				"   Zork z;\n" +
+				"}\n" +
+				"\n" +
+				"interface Map<K,V> extends MapStream<K, V>  {\n" +
+				"   @Override\n" +
+				"	default Iterable<BiValue<K, V>> asIterable() {\n" +
+				"       return null;\n" +
+				"   }\n" +
+				"}\n" +
+				"interface MapStream<K, V> {\n" +
+				"	default Iterable<BiValue<K, V>> asIterable() {\n" +
+				"       return null;\n" +
+				"   }\n" +
+				"}\n" +
+				"\n" +
+				"interface BiValue<T, U> {\n" +
+				"    T getKey();\n" +
+				"    U getValue();\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=390761
+	public void testDefaultNonclash4() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public interface X extends Map<String, Object> {\n" +
+				"   Zork z;\n" +
+				"}\n" +
+				"\n" +
+				"interface Map<K,V> extends MapStream<K, V>  {\n" +
+				"   @Override\n" +
+				"	Iterable<BiValue<K, V>> asIterable();\n" +
+				"}\n" +
+				"interface MapStream<K, V> {\n" +
+				"	Iterable<BiValue<K, V>> asIterable();\n" +
+				"}\n" +
+				"\n" +
+				"interface BiValue<T, U> {\n" +
+				"    T getKey();\n" +
+				"    U getValue();\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420080
+	public void testDefaultNonclash5() {
+		runConformTest(
+			new String[] {
+				"X.java",
+				"public class X extends G implements I {\n" + 
+				"}\n" + 
+				"\n" + 
+				"interface I {\n" + 
+				"	default int foo (){\n" + 
+				"		return 0;\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"\n" + 
+				"class G {\n" + 
+				"	public int foo() {\n" + 
+				"		return 0;\n" + 
+				"	}\n" + 
+				"}\n"
+			});
+	}
+
+	// JLS 9.4.1
+	// Bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
+	// Don't report conflict between the same method inherited on two paths.
+	public void testInheritedDefaultOverrides05() {
+		runConformTest(
+			new String[] {
+				"StringList.java",
+				"import java.util.Collection;\n" +
+				"public abstract class StringList implements Collection<String> {\n" +
+				"}\n"
+			},
+			"");
+	}
+
+	// JLS 9.4.1
+	// Bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
+	// extract from SuperTypeTest.test013():
+	public void testInheritedDefaultOverrides06() {
+		runConformTest(
+			new String[] {
+				"IterableList.java",
+				"import java.util.*;\n" +
+				"public interface IterableList<E> extends Iterable<E>, List<E> {}\n" +
+				"interface ListIterable<E> extends Iterable<E>, List<E> {}\n" +
+				"\n"
+			},
+			"");
+	}
+
+	// JLS 8.1.1.1 abstract Classes
+	// Default method overrides an abstract method from its super interface
+	public void testAbstract01() {
+		runConformTest(
+			new String[] {
+				"I2.java",
+				"public interface I2 {\n" +
+				"    void test();\n" +
+				"}\n",
+				"I1.java",
+				"public interface I1 extends I2 {\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I1 {\n" +
+				"}\n"
+			});
+	}
+
+	// JLS 8.1.1.1 abstract Classes
+	// Default method conflicts with independent interface method
+	public void testAbstract02() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    void test();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I1, I2 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C.java (at line 1)\n" + 
+			"	public class C implements I1, I2 {\n" + 
+			"	             ^\n" + 
+			"The default method test() inherited from I2 conflicts with another method inherited from I1\n" + 
+			"----------\n");
+			// Note: javac first complains: C is not abstract and does not override abstract method test() in I1
+			//       only when C is marked abstract does the conflict between abstract and default method surface
+	}
+
+	// JLS 8.1.1.1 abstract Classes
+	// Default method conflicts independent interface method
+	// same as above except for order of implements list
+	public void testAbstract02a() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    void test();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I2, I1 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C.java (at line 1)\n" + 
+			"	public class C implements I2, I1 {\n" + 
+			"	             ^\n" + 
+			"The default method test() inherited from I2 conflicts with another method inherited from I1\n" + 
+			"----------\n");
+			// Note: javac first complains: C is not abstract and does not override abstract method test() in I1
+			//       only when C is marked abstract does the conflict between abstract and default method surface
+	}
+
+	// JLS 8.1.1.1 abstract Classes
+	// Default method does not override independent abstract method
+	// class is abstract
+	public void testAbstract02b() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    void test();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"C.java",
+				"public abstract class C implements I2, I1 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C.java (at line 1)\n" + 
+			"	public abstract class C implements I2, I1 {\n" + 
+			"	                      ^\n" + 
+			"The default method test() inherited from I2 conflicts with another method inherited from I1\n" + 
+			"----------\n");
+	}
+
+	// same as above but only interfaces
+	public void testAbstract02c() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    void test();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"I3.java",
+				"public interface I3 extends I1, I2 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in I3.java (at line 1)\n" + 
+			"	public interface I3 extends I1, I2 {\n" + 
+			"	                 ^^\n" + 
+			"The default method test() inherited from I2 conflicts with another method inherited from I1\n" + 
+			"----------\n");
+	}
+
+	// JLS 8.1.1.1 abstract Classes
+	// Default method overrides an abstract method from its super interface - class implements both
+	public void testAbstract03() {
+		runConformTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    void test();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 extends I1 {\n" +
+				"    @Override\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I1, I2 {\n" +
+				"}\n"
+			});
+	}
+	
+	// JLS 8.1.1.1 abstract Classes
+	// Default method overrides an abstract method from its super interface - class implements both
+	// same as above except for order of implements list
+	public void testAbstract03a() {
+		runConformTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    void test();\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 extends I1 {\n" +
+				"    @Override\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I2, I1 {\n" +
+				"}\n"
+			});
+	}
+
+	// JLS 8.1.1.1 abstract Classes
+	// default method is not inherited because a more specific abstract method is.
+	public void testAbstract04() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 extends I1 {\n" +
+				"    @Override\n" +
+				"    void test();\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I2, I1 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C.java (at line 1)\n" + 
+			"	public class C implements I2, I1 {\n" + 
+			"	             ^\n" + 
+			"The type C must implement the inherited abstract method I2.test()\n" + 
+			"----------\n");
+	}
+
+	// JLS 8.1.1.1 abstract Classes
+	// default method is not inherited because a more specific abstract method is.
+	// same as above except for order of implements list
+	public void testAbstract04a() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"    default void test() {}\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 extends I1 {\n" +
+				"    @Override\n" +
+				"    void test();\n" +
+				"}\n",
+				"C.java",
+				"public class C implements I2, I1 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C.java (at line 1)\n" + 
+			"	public class C implements I2, I1 {\n" + 
+			"	             ^\n" + 
+			"The type C must implement the inherited abstract method I2.test()\n" + 
+			"----------\n");
+	}
+
+	// abstract class method trumps otherwise conflicting default methods: the conflict scenario
+	public void testAbstract05() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	default String value1() { return null; }\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"	default String value1() { return \"\"; }\n" + // conflicts with other default method
+				"}\n",
+				"C2.java",
+				"public abstract class C2 implements I1, I2 {\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in C2.java (at line 1)\n" + 
+			"	public abstract class C2 implements I1, I2 {\n" + 
+			"	                      ^^\n" + 
+			"Duplicate default methods named value1 with the parameters () and () are inherited from the types I2 and I1\n" + 
+			"----------\n");
+	}
+
+	// abstract class method trumps otherwise conflicting default methods: conflict resolved
+	public void testAbstract06() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	default String value1() { return null; }\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"	default String value1() { return \"\"; }\n" + // conflicts with other default method
+				"}\n",
+				"C1.java",
+				"public abstract class C1 {\n" +
+				"	abstract Object value1();\n" + // trumps the conflicting methods (without overriding)
+				"}\n",
+				"C2.java",
+				"public abstract class C2 extends C1 implements I1, I2 {\n" +
+				"}\n",
+				"C3.java",
+				"public class C3 extends C2 {\n" +
+				"	@Override\n" +
+				"	public Object value1() { return this; } // too week, need a method returning String\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C3.java (at line 3)\n" + 
+			"	public Object value1() { return this; } // too week, need a method returning String\n" + 
+			"	       ^^^^^^\n" + 
+			"The return type is incompatible with I1.value1()\n" + 
+			"----------\n" + 
+			"2. ERROR in C3.java (at line 3)\n" + 
+			"	public Object value1() { return this; } // too week, need a method returning String\n" + 
+			"	       ^^^^^^\n" + 
+			"The return type is incompatible with I2.value1()\n" + 
+			"----------\n");
+	}
+
+	// abstract class method trumps otherwise conflicting default methods: conflict resolved
+	// variant: second method is not a default method
+	public void testAbstract06a() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	default String value1() { return null; }\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"	String value1();\n" + // conflicts with other default method
+				"}\n",
+				"C1.java",
+				"public abstract class C1 {\n" +
+				"	abstract Object value1();\n" + // trumps the conflicting methods (without overriding)
+				"}\n",
+				"C2.java",
+				"public abstract class C2 extends C1 implements I1, I2 {\n" +
+				"}\n",
+				"C3.java",
+				"public class C3 extends C2 {\n" +
+				"	@Override\n" +
+				"	public Object value1() { return this; } // too week, need a method returning String\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C3.java (at line 3)\n" + 
+			"	public Object value1() { return this; } // too week, need a method returning String\n" + 
+			"	       ^^^^^^\n" + 
+			"The return type is incompatible with I2.value1()\n" + 
+			"----------\n" + 
+			"2. ERROR in C3.java (at line 3)\n" + 
+			"	public Object value1() { return this; } // too week, need a method returning String\n" + 
+			"	       ^^^^^^\n" + 
+			"The return type is incompatible with I1.value1()\n" + 
+			"----------\n");
+	}
+	
+	// abstract class method trumps otherwise conflicting default methods: conflict not resolved due to insufficient visibility
+	public void testAbstract6b() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	default String value1() { return null; }\n" +
+				"}\n",
+				"I2.java",
+				"public interface I2 {\n" +
+				"	default String value1() { return \"\"; }\n" + // conflicts with other default method
+				"}\n",
+				"p1/C1.java",
+				"package p1;\n" +
+				"public abstract class C1 {\n" +
+				"	abstract Object value1();\n" + // trump with package visibility doesn't work
+				"}\n",
+				"C2.java",
+				"public abstract class C2 extends p1.C1 implements I1, I2 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C2.java (at line 1)\n" + 
+			"	public abstract class C2 extends p1.C1 implements I1, I2 {\n" + 
+			"	                      ^^\n" + 
+			"Duplicate default methods named value1 with the parameters () and () are inherited from the types I2 and I1\n" + 
+			"----------\n");
+	}
+
+	// abstract class method trumps otherwise conflicting default method: only one default method
+	public void testAbstract07() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	default String value1() { return null; }\n" +
+				"}\n",
+				"C1.java",
+				"public abstract class C1 {\n" +
+				"	abstract Object value1();\n" + // trumps the conflicting method (without overriding)
+				"}\n",
+				"C2.java",
+				"public abstract class C2 extends C1 implements I1 {\n" +
+				"}\n",
+				"C3.java",
+				"public class C3 extends C2 {\n" +
+				"	@Override\n" +
+				"	public Object value1() { return this; } // too week, need a method returning String\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C3.java (at line 3)\n" + 
+			"	public Object value1() { return this; } // too week, need a method returning String\n" + 
+			"	       ^^^^^^\n" + 
+			"The return type is incompatible with I1.value1()\n" + 
+			"----------\n");
+	}
+
+	// class inherits two override equivalent methods,
+	// must be declared abstract, although one of the methods is a default method.
+	public void testAbstract08() {
+		runNegativeTest(
+			new String[] {
+				"I1.java",
+				"public interface I1 {\n" +
+				"	default String value() { return null; }\n" +
+				"}\n",
+				"C1.java",
+				"public abstract class C1 {\n" +
+				"	public abstract String value();" +
+				"}\n",
+				"C2.java",
+				"public class C2 extends C1 implements I1 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in C2.java (at line 1)\n" + 
+			"	public class C2 extends C1 implements I1 {\n" + 
+			"	             ^^\n" + 
+			"The type C2 must implement the inherited abstract method C1.value()\n" + 
+			"----------\n");
+	}
+
+	// an annotation type cannot have default methods
+	public void testAnnotation1() {
+		runNegativeTest(
+			false,
+			new String[] {
+				"I.java",
+				"public @interface I {\n" +
+				"    default String id() { return \"1\"; }\n" +
+				"}\n"
+			},
+			null,
+			null,
+			"----------\n" + 
+			"1. ERROR in I.java (at line 2)\n" + 
+			"	default String id() { return \"1\"; }\n" + 
+			"	^^^^^^^\n" + 
+			"Syntax error on token \"default\", @ expected\n" + 
+			"----------\n",
+			JavacTestOptions.JavacHasABug.Javac8AcceptsDefaultMethodInAnnotationType);
+	}
+	
+	// basic situation similar to AmbiguousMethodTest.test009()
+	public void testSuperCall1() {
+		this.runConformTest(
+			new String[] {
+				"OrderedSet.java",
+				"import java.util.*;\n" +
+				"import java.util.stream.Stream;\n" +
+				"public interface OrderedSet<E> extends List<E>, Set<E> {\n" +
+				"	@Override\n" +
+				"	boolean add(E o);\n" +
+				"	@Override\n" +
+				"	default Spliterator<E> spliterator() { if (true) return List.super.spliterator(); else return Set.super.spliterator(); }\n" +
+				"}\n"
+			},
+			""
+		);
+	}
+
+	// some illegal cases
+	// - call to indirect super
+	// - call to super of outer
+	// - target method is not a default method
+	// - attempt to use this syntax for a super-ctor call
+	public void testSuperCall2() {
+		this.runNegativeTest(
+			new String[] {
+				"T.java",
+				"import java.util.*;\n" +
+				"import java.util.stream.Stream;\n" +
+				"public abstract class T<E> implements OrderedSet<E> {\n" +
+				"	@Override\n" +
+				"	public Stream<E> stream() {\n" +
+				"		return List.super.stream(); // List is not a direct super interface\n" +
+				"	}\n" +
+				"	@Override\n" +
+				"	public Stream<E> parallelStream() { return OrderedSet.super.parallelStream();}\n" + // OK
+				"   class Inner {\n" +
+				"		public Stream<E> stream() {\n" +
+				"			return OrderedSet.super.stream(); // not a super interface of the direct enclosing class\n" +
+				"		}\n" +
+				"	}\n" +
+				"	@Override\n" +
+				"	public boolean add(E o) {\n" +
+				"		OrderedSet.super.add(o); // target not a default method\n" +
+				"	}\n" +
+				"	T() {\n" +
+				"		OrderedSet.super(); // not applicable for super ctor call\n" +
+				"	}\n" +
+				"}\n" +
+				"interface OrderedSet<E> extends List<E>, Set<E> {\n" +
+				"	@Override\n" +
+				"	boolean add(E o);\n" +
+				"	@Override\n" +
+				"   default Spliterator<E> spliterator() { return List.super.spliterator(); }\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in T.java (at line 6)\n" + 
+			"	return List.super.stream(); // List is not a direct super interface\n" + 
+			"	       ^^^^^^^^^^\n" + 
+			"Illegal reference to super type List, cannot bypass the more specific direct super type OrderedSet\n" + 
+			"----------\n" + 
+			"2. ERROR in T.java (at line 12)\n" + 
+			"	return OrderedSet.super.stream(); // not a super interface of the direct enclosing class\n" + 
+			"	       ^^^^^^^^^^^^^^^^\n" + 
+			"No enclosing instance of the type OrderedSet<E> is accessible in scope\n" + 
+			"----------\n" + 
+			"3. ERROR in T.java (at line 17)\n" + 
+			"	OrderedSet.super.add(o); // target not a default method\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Cannot directly invoke the abstract method add(E) for the type OrderedSet<E>\n" + 
+			"----------\n" + 
+			"4. ERROR in T.java (at line 20)\n" + 
+			"	OrderedSet.super(); // not applicable for super ctor call\n" + 
+			"	^^^^^^^^^^\n" + 
+			"Illegal enclosing instance specification for type Object\n" + 
+			"----------\n"
+		);
+	}
+
+	// with execution
+	public void testSuperCall3() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X implements I2 {\n" +
+				"	@Override\n" +
+				"	public void print() {\n" +
+				"		I2.super.print();\n" +
+				"		System.out.print(\"!\");" +
+				"	}\n" +
+				"	public static void main(String... args) {\n" +
+				"		new X().print();\n" +
+				"	}\n" +
+				"}\n" +
+				"interface I1 {\n" +
+				"	default void print() {\n" +
+				"		System.out.print(\"O\");\n" +
+				"	}\n" +
+				"}\n" +
+				"interface I2 extends I1 {\n" +
+				"	default void print() {\n" +
+				"		I1.super.print();\n" +
+				"		System.out.print(\"K\");\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"OK!"
+		);
+	}
+
+	// 15.12.1
+	// https://bugs.eclipse.org/404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
+	public void testSuperCall4() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X implements I2, I1 {\n" +
+				"	@Override\n" +
+				"	public void print() {\n" +
+				"		I1.super.print(); // illegal attempt to skip I2.print()\n" +
+				"		System.out.print(\"!\");" +
+				"	}\n" +
+				"	public static void main(String... args) {\n" +
+				"		new X().print();\n" +
+				"	}\n" +
+				"}\n" +
+				"interface I1 {\n" +
+				"	default void print() {\n" +
+				"		System.out.print(\"O\");\n" +
+				"	}\n" +
+				"}\n" +
+				"interface I2 extends I1 {\n" +
+				"	@Override default void print() {\n" +
+				"		System.out.print(\"K\");\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	I1.super.print(); // illegal attempt to skip I2.print()\n" + 
+			"	^^^^^^^^\n" + 
+			"Illegal reference to super type I1, cannot bypass the more specific direct super type I2\n" + 
+			"----------\n"
+		);
+	}
+
+	// 15.12.1
+	// https://bugs.eclipse.org/404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
+	public void testSuperCall5() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X implements I2, I1 {\n" +
+				"	@Override\n" +
+				"	public void print() {\n" +
+				"		I1.super.print(); // illegal attempt to skip I2.print()\n" +
+				"		System.out.print(\"!\");" +
+				"	}\n" +
+				"	public static void main(String... args) {\n" +
+				"		new X().print();\n" +
+				"	}\n" +
+				"}\n" +
+				"interface I1 {\n" +
+				"	default void print() {\n" +
+				"		System.out.print(\"O\");\n" +
+				"	}\n" +
+				"}\n" +
+				"interface I2 extends I1 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	I1.super.print(); // illegal attempt to skip I2.print()\n" + 
+			"	^^^^^^^^\n" + 
+			"Illegal reference to super type I1, cannot bypass the more specific direct super type I2\n" + 
+			"----------\n"
+		);
+	}
+
+	// 15.12.3
+	// https://bugs.eclipse.org/404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
+	public void testSuperCall6() {
+		this.runNegativeTest(
+			new String[] {
+				"SuperOverride.java",
+				"interface I0 {\n" + 
+				"	default void foo() { System.out.println(\"I0\"); }\n" + 
+				"}\n" + 
+				"\n" + 
+				"interface IA extends I0 {}\n" + 
+				"\n" + 
+				"interface IB extends I0 {\n" + 
+				"	@Override default void foo() {\n" + 
+				"		System.out.println(\"IB\");\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"interface IX extends IA, IB {\n" + 
+				"	@Override default void foo() {\n" + 
+				"		IA.super.foo(); // illegal attempt to skip IB.foo()\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"public class SuperOverride implements IX {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		new SuperOverride().foo();\n" + 
+				"	}\n" + 
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in SuperOverride.java (at line 14)\n" + 
+			"	IA.super.foo(); // illegal attempt to skip IB.foo()\n" + 
+			"	^^^^^^^^^^^^^^\n" + 
+			"Illegal reference to super method foo() from type I0, cannot bypass the more specific override from type IB\n" + 
+			"----------\n"
+		);
+	}
+
+	// Bug 401235 - [1.8][compiler] 'this' reference must be allowed in default methods and local classes
+	public void testThisReference1() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X implements I1, I2 {\n" +
+				"	@Override\n" +
+				"	public String s1() { return \"O\"; }\n" +
+				"	@Override\n" +
+				"	public String s2() { return \"K\"; }\n" +
+				"	public static void main(String... args) {\n" +
+				"		X x = new X();\n" +
+				"		x.print1();\n" +
+				"		x.print2();\n" +
+				"	}\n" +
+				"}\n" +
+				"interface I1 {\n" +
+				"	String s1();" +
+				"	default void print1() {\n" +
+				"		System.out.print(this.s1());\n" + // 'this' as a receiver
+				"	}\n" +
+				"}\n" +
+				"interface I2 {\n" +
+				"	String s2();\n" +
+				"	default void print2() {\n" +
+				"		class Inner {\n" +
+				"			String value() { return I2.this.s2(); }\n" + // qualified 'this' refering to the enclosing interface type
+				"		}\n" +
+				"		System.out.print(new Inner().value());\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"OK"
+		);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	// Test for different legal and illegal keywords for static and default methods in interfaces
+	public void testStaticMethod01() {
+		runNegativeTest(
+				new String[] {
+					"I.java",
+					"public interface I {\n" +
+					"	static void foo() {}\n" +
+					"	static void foo1();\n" +
+					"	public static default void foo2 () {};\n" +
+					"	abstract static void foo3();\n" +
+					"	abstract static void foo4() {}\n" +
+					"}"
+				},
+				"----------\n" + 
+				"1. ERROR in I.java (at line 3)\n" + 
+				"	static void foo1();\n" + 
+				"	            ^^^^^^\n" + 
+				"This method requires a body instead of a semicolon\n" + 
+				"----------\n" + 
+				"2. ERROR in I.java (at line 4)\n" + 
+				"	public static default void foo2 () {};\n" + 
+				"	                           ^^^^^^^\n" + 
+				"Illegal combination of modifiers for the interface method foo2; only one of abstract, default, or static permitted\n" + 
+				"----------\n" + 
+				"3. ERROR in I.java (at line 5)\n" + 
+				"	abstract static void foo3();\n" + 
+				"	                     ^^^^^^\n" + 
+				"Illegal combination of modifiers for the interface method foo3; only one of abstract, default, or static permitted\n" + 
+				"----------\n" + 
+				"4. ERROR in I.java (at line 6)\n" + 
+				"	abstract static void foo4() {}\n" + 
+				"	                     ^^^^^^\n" + 
+				"Illegal combination of modifiers for the interface method foo4; only one of abstract, default, or static permitted\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	// Test invocation of static methods with different contexts - negative tests
+	public void testStaticMethod02() {
+		runNegativeTest(
+				new String[] {
+					"I.java",
+					"public interface I {\n" +
+					"	public static void foo() {\n" +
+					"		bar();\n" +
+					"		this.bar();\n" +
+					"   }\n" +
+					"	public default void bar () {\n" +
+					"		this.foo();\n" +
+					"	}\n" +
+					"}\n" +
+					"interface II extends I{\n" +
+					"	public static void foobar() {\n" +
+					"		super.bar();\n" +
+					"   }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in I.java (at line 3)\n" + 
+				"	bar();\n" + 
+				"	^^^\n" + 
+				"Cannot make a static reference to the non-static method bar() from the type I\n" + 
+				"----------\n" + 
+				"2. ERROR in I.java (at line 4)\n" + 
+				"	this.bar();\n" + 
+				"	^^^^\n" + 
+				"Cannot use this in a static context\n" + 
+				"----------\n" + 
+				"3. ERROR in I.java (at line 7)\n" + 
+				"	this.foo();\n" + 
+				"	     ^^^\n" + 
+				"This static method of interface I can only be accessed as I.foo\n" +
+				"----------\n" + 
+				"4. ERROR in I.java (at line 12)\n" + 
+				"	super.bar();\n" + 
+				"	^^^^^\n" + 
+				"Cannot use super in a static context\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	// Test invocation of static methods with different contexts - positive tests
+	public void testStaticMethod03() {
+		runConformTest(
+			new String[] {
+				"C.java",
+				"interface I {\n" +
+				"	public static void foo() {\n" +
+				"		System.out.println(\"I#foo() invoked\");\n" +
+				"   }\n" +
+				"}\n" +
+				"interface J extends I {\n" +
+				"	public static void foo() {\n" +
+				"		System.out.println(\"J#foo() invoked\");\n" +
+				"   }\n" +
+				"	public default void bar () {\n" +
+				"		foo();\n" +
+				"	}\n" +
+				"}\n" +
+				"public class C implements J {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		C c = new C();\n" +
+				"		c.bar();\n" +
+				"       J.foo();\n" +
+				"       I.foo();\n" +
+				"	}\n" +
+				"}"
+			},
+			"J#foo() invoked\n" +
+			"J#foo() invoked\n" + 
+			"I#foo() invoked");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	// Test invocation of static methods with different contexts - negative tests
+	public void testStaticMethod04() {
+		runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X implements II {\n"
+						+ "	@Override"
+						+ "	public void foo() {\n"
+						+ "		 bar();\n"
+						+ "		 bar2();\n"
+						+ "	}\n"
+						+ "	public static void main(String[] args) {\n"
+						+ "		bar();\n"
+						+ "		II.bar();\n"
+						+ "		(new X()).bar();\n"
+						+ "		II.bar();\n"
+						+ "		II ii = new X();\n"
+						+ "		ii.bar();\n"
+						+ "		ii.bar2();\n"
+						+ "		I i = new X();\n"
+						+ "		i.bar();\n"
+						+ "      new I() {}.foo();\n"
+						+ "	}\n"
+						+ "}\n"
+						+ "interface I {\n"
+						+ "	public static void bar() {\n"
+						+ "		bar2();\n"
+						+ "	}\n"
+						+ "	public default void bar2() {\n"
+						+ "		bar();\n"
+						+ "	}\n"
+						+ "}\n"
+						+ "interface II extends I {\n"
+						+ "	public default void foo() {\n"
+						+ "		bar();\n"
+						+ "	}\n"
+						+ "}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	bar();\n" + 
+				"	^^^\n" + 
+				"The method bar() is undefined for the type X\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 7)\n" + 
+				"	bar();\n" + 
+				"	^^^\n" + 
+				"The method bar() is undefined for the type X\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 8)\n" + 
+				"	II.bar();\n" + 
+				"	   ^^^\n" + 
+				"The method bar() is undefined for the type II\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 9)\n" + 
+				"	(new X()).bar();\n" + 
+				"	          ^^^\n" + 
+				"The method bar() is undefined for the type X\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 10)\n" + 
+				"	II.bar();\n" + 
+				"	   ^^^\n" + 
+				"The method bar() is undefined for the type II\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 12)\n" + 
+				"	ii.bar();\n" + 
+				"	   ^^^\n" + 
+				"The method bar() is undefined for the type II\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 15)\n" + 
+				"	i.bar();\n" + 
+				"	  ^^^\n" + 
+				"This static method of interface I can only be accessed as I.bar\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 16)\n" + 
+				"	new I() {}.foo();\n" + 
+				"	           ^^^\n" + 
+				"The method foo() is undefined for the type new I(){}\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 21)\n" + 
+				"	bar2();\n" + 
+				"	^^^^\n" + 
+				"Cannot make a static reference to the non-static method bar2() from the type I\n" + 
+				"----------\n" + 
+				"10. ERROR in X.java (at line 29)\n" + 
+				"	bar();\n" + 
+				"	^^^\n" + 
+				"The method bar() is undefined for the type II\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	public void testStaticMethod05() {
+		runNegativeTest(
+				new String[] {
+						"X.java",
+						"interface I {\n" +
+						"	static void foo(int x) { }\n" +
+						"}\n" +
+						"interface II extends I {\n" +
+						"	static void goo(int x) {}   		// No Error.\n" +
+						"}\n" +
+						"interface III extends II {\n" +
+						"	default void foo(int x, int y) {}   // No Error.\n" +
+						"	default void goo() {}   			// No Error.\n" +
+						"	default void foo(int x) {}   		// No Error.\n" +
+						"	default void goo(int x) {}   		// No Error.\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static void goo(int x) {}\n" +
+						"}\n" +
+						"class X extends Y {\n" +
+						"	void foo(int x) {}   // No error.\n" +
+						"	void goo() {}   	 // No Error.\n" +
+						"	void goo(int x) {}   // Error.\n" +
+						"}\n"
+						},
+						"----------\n" + 
+						"1. ERROR in X.java (at line 19)\n" + 
+						"	void goo(int x) {}   // Error.\n" + 
+						"	     ^^^^^^^^^^\n" + 
+						"This instance method cannot override the static method from Y\n" + 
+						"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	// Test that extending interfaces inherit visible fields and inner types.
+	public void testStaticMethod06() {
+		runConformTest(
+				new String[] {
+					"C.java",
+					"interface I {\n" +
+					"	public static String CONST = \"CONSTANT\";\n" +
+					"	public static void foo(String[] args) {\n" +
+					"		System.out.println(args[0]);\n" +
+					"   }\n" +
+					" 	public interface Inner {}\n" +
+					"}\n" +
+					"interface J extends I {\n" +
+					"	public static void foo() {\n" +
+					"		I.foo(new String[]{CONST});\n" +
+					"   }\n" +
+					" 	public interface InnerInner extends Inner {}\n" +
+					"}\n" +
+					"public class C implements J {\n" +
+					"	public static void main(String[] args) {\n" +
+					"       J.foo();\n" +
+					"       I.foo(new String[]{\"LITERAL\"});\n" +
+					"	}\n" +
+					"}"
+				},
+				"CONSTANT\n" + 
+				"LITERAL");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	// Test that type parameter from enclosing type is not allowed to be referred to in static interface methods
+	public void testStaticMethod07() {
+		runNegativeTest(
+				new String[] {
+					"C.java",
+					"interface I <T> {\n" +
+					"	public static T foo(T t) {\n" +
+					"		return t;" +
+					"   }\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in C.java (at line 2)\n" + 
+				"	public static T foo(T t) {\n" + 
+				"	              ^\n" + 
+				"Cannot make a static reference to the non-static type T\n" + 
+				"----------\n" + 
+				"2. ERROR in C.java (at line 2)\n" + 
+				"	public static T foo(T t) {\n" + 
+				"	                    ^\n" + 
+				"Cannot make a static reference to the non-static type T\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	public void testStaticMethod08() {
+		runNegativeTest(
+				new String[] {
+					"C.java",
+					"@interface A {\n" +
+					"	static String foo() default \"Blah\";\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in C.java (at line 2)\n" + 
+				"	static String foo() default \"Blah\";\n" + 
+				"	              ^^^^^\n" + 
+				"Illegal modifier for the annotation attribute A.foo; only public & abstract are permitted\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	public void testStaticMethod09() {
+		runNegativeTest(
+				new String[] {
+						"C.java",
+						"interface A {\n" +
+						"	static void foo() {}\n" +
+						"	default void goo(A a) {\n" +
+						"		a.foo();\n" +
+						"	}\n" +
+						"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in C.java (at line 4)\n" + 
+				"	a.foo();\n" + 
+				"	  ^^^\n" + 
+				"This static method of interface A can only be accessed as A.foo\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	public void testStaticMethod10() {
+		runNegativeTest(
+				new String[] {
+						"C.java",
+						"interface A {\n" +
+						"	static void foo(long x) {}\n" +
+						"	static void foo(int x) {}\n" +
+						"	default void goo(A a) {\n" +
+						"		a.foo(10);\n" +
+						"	}\n" +
+						"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in C.java (at line 5)\n" + 
+				"	a.foo(10);\n" + 
+				"	  ^^^\n" + 
+				"This static method of interface A can only be accessed as A.foo\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	public void testStaticMethod11() {
+		runNegativeTest(
+				new String[] {
+						"C.java",
+						"interface A<X> {\n" +
+						"	void foo(X x);\n" +
+						"}\n" +
+						"interface B extends A<String> {\n" +
+						"    static void foo(String s) {}\n" +
+						"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in C.java (at line 5)\n" + 
+				"	static void foo(String s) {}\n" + 
+				"	            ^^^^^^^^^^^^^\n" + 
+				"This static method cannot hide the instance method from A<String>\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	public void testStaticMethod12() {
+		runNegativeTest(
+				new String[] {
+						"C.java",
+						"interface A<X> {\n" +
+						"	static void foo(String x) {}\n" +
+						"}\n" +
+						"interface B extends A<String> {\n" +
+						"    static void foo(String s) {}\n" +
+						"}\n" +
+						"public class X {\n" +
+						"}\n"
+				},
+				"----------\n" + 
+				"1. WARNING in C.java (at line 1)\n" + 
+				"	interface A<X> {\n" + 
+				"	            ^\n" + 
+				"The type parameter X is hiding the type X\n" + 
+				"----------\n" + 
+				"2. ERROR in C.java (at line 7)\n" + 
+				"	public class X {\n" + 
+				"	             ^\n" + 
+				"The public type X must be defined in its own file\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399780
+	public void testStaticMethod13() {
+		runNegativeTest(
+				new String[] {
+						"C.java",
+						"interface A {\n" +
+						"	static void foo(String x) {\n" +
+						"       System.out.println(this);\n"+
+						"       System.out.println(super.hashCode());\n" +
+						"   }\n" +
+						"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in C.java (at line 3)\n" + 
+				"	System.out.println(this);\n" + 
+				"	                   ^^^^\n" + 
+				"Cannot use this in a static context\n" + 
+				"----------\n" + 
+				"2. ERROR in C.java (at line 4)\n" + 
+				"	System.out.println(super.hashCode());\n" + 
+				"	                   ^^^^^\n" + 
+				"Cannot use super in a static context\n" + 
+				"----------\n");
+	}
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=406619, [1.8][compiler] Incorrect suggestion that method can be made static.
+	public void test406619() {
+		Map compilerOptions = getCompilerOptions();
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+		this.runNegativeTest(
+			new String[] {
+				"X.java", 
+				"interface X {\n" +
+				"	default int foo() {\n" +
+				"		return 10;\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"",
+			null /* no extra class libraries */,
+			true /* flush output directory */,
+			compilerOptions /* custom options */
+		);
+	}
+
+	// class implements interface with default method. 
+	// - synth. access needed for visibility reasons
+	// - witness for NoSuchMethodError in synthetic method (SuperMethodAccess)
+	public void testSuperAccess01() {
+		runConformTest(
+			new String[] {
+				"C.java",
+				"interface I {\n" +
+				"    public default void foo() {\n" +
+				"        System.out.println(\"default\");\n" +
+				"    }\n" +
+				"}\n" +
+				"public class C implements I {\n" +
+				"    public static void main(String[] args) {\n" +
+				"        C c = new C();\n" +
+				"        c.foo();\n" +
+				"    }\n" +
+				"}\n"
+			},
+			"default"
+			);
+	}
+
+	// class implements interface with default method. 
+	// - synth. access needed for visibility reasons
+	// - intermediate public interface
+	public void testSuperAccess02() {
+		runConformTest(
+			false,
+			new String[] {
+				"p1/C.java",
+				"package p1;\n" +
+				"public class C implements p2.J {\n" +
+				"    public static void main(String[] args) {\n" +
+				"        C c = new C();\n" +
+				"        c.foo();\n" +
+				"    }\n" +
+				"}\n",
+				"p2/J.java",
+				"package p2;\n" +
+				"interface I {\n" +
+				"    public default void foo() {\n" +
+				"        System.out.println(\"default\");\n" +
+				"    }\n" +
+				"}\n" +
+				"public interface J extends I {}\n"
+			},
+			"",
+			"default",
+			"",
+			JavacTestOptions.JavacHasABug.Javac8ProducesIllegalAccessError);
+	}
+
+	// Variant of test MethodVerifyTest.test144() from https://bugs.eclipse.org/bugs/show_bug.cgi?id=194034
+	public void testBridge01() {
+		this.runNegativeTest(
+			new String[] {
+				"PurebredCatShopImpl.java",
+				"import java.util.List;\n" +
+				"interface Pet {}\n" +
+				"interface Cat extends Pet {}\n" +
+				"interface PetShop { default List<Pet> getPets() { return null; } }\n" +
+				"interface CatShop extends PetShop {\n" +
+				"	default <V extends Pet> List<? extends Cat> getPets() { return null; }\n" +
+				"}\n" +
+				"interface PurebredCatShop extends CatShop {}\n" +
+				"class CatShopImpl implements CatShop {\n" +
+				"	@Override public List<Pet> getPets() { return null; }\n" +
+				"}\n" +
+				"class PurebredCatShopImpl extends CatShopImpl implements PurebredCatShop {}"
+			},
+			"----------\n" + 
+			"1. ERROR in PurebredCatShopImpl.java (at line 6)\n" + 
+			"	default <V extends Pet> List<? extends Cat> getPets() { return null; }\n" + 
+			"	                                            ^^^^^^^^^\n" + 
+			"Name clash: The method getPets() of type CatShop has the same erasure as getPets() of type PetShop but does not override it\n" + 
+			"----------\n" + 
+			"2. WARNING in PurebredCatShopImpl.java (at line 10)\n" + 
+			"	@Override public List<Pet> getPets() { return null; }\n" + 
+			"	                 ^^^^\n" + 
+			"Type safety: The return type List<Pet> for getPets() from the type CatShopImpl needs unchecked conversion to conform to List<? extends Cat> from the type CatShop\n" + 
+			"----------\n"
+		);
+	}
+	// yet another variant, checking that exactly one bridge method is created, so that
+	// the most specific method is dynamically invoked via all declared types.
+	public void testBridge02() {
+		this.runConformTest(
+			new String[] {
+				"PurebredCatShopImpl.java",
+				"import java.util.List;\n" +
+				"import java.util.ArrayList;\n" +
+				"interface Pet {}\n" +
+				"interface Cat extends Pet {}\n" +
+				"interface PetShop { default List<Pet> getPets() { return null; } }\n" +
+				"interface CatShop extends PetShop {\n" +
+				"	@Override default ArrayList<Pet> getPets() { return null; }\n" +
+				"}\n" +
+				"interface PurebredCatShop extends CatShop {}\n" +
+				"class CatShopImpl implements CatShop {\n" +
+				"	@Override public ArrayList<Pet> getPets() { return new ArrayList<>(); }\n" +
+				"}\n" +
+				"public class PurebredCatShopImpl extends CatShopImpl implements PurebredCatShop {\n" +
+				"	public static void main(String... args) {\n" +
+				"		PurebredCatShopImpl pcsi = new PurebredCatShopImpl();\n" +
+				"		System.out.print(pcsi.getPets().size());\n" +
+				"		CatShopImpl csi = pcsi;\n" +
+				"		System.out.print(csi.getPets().size());\n" +
+				"		CatShop cs = csi;\n" +
+				"		System.out.print(cs.getPets().size());\n" +
+				"		PetShop ps = cs;\n" +
+				"		System.out.print(ps.getPets().size());\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"0000"
+		);
+	}
+	
+	// modeled after org.eclipse.jdt.core.tests.compiler.regression.AmbiguousMethodTest.test081()
+	// see https://bugs.eclipse.org/391376 - [1.8] check interaction of default methods with bridge methods and generics
+    // see https://bugs.eclipse.org/404648 - [1.8][compiler] investigate differences between compilers re AmbiguousMethodTest
+	public void _testBridge03() {
+		runConformTest(
+			new String[] {
+				"C.java",
+				"interface A<ModelType extends D, ValueType> extends\n" + 
+				"		I<ModelType, ValueType> {\n" + 
+				"\n" + 
+				"	@Override\n" + 
+				"	public default void doSet(ModelType valueGetter) {\n" + 
+				"		this.set((ValueType) valueGetter.getObject());\n" + 
+				"	}\n" + 
+				"\n" + 
+				"	@Override\n" + 
+				"	public default void set(Object object) {\n" + 
+				"		System.out.println(\"In A.set(Object)\");\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"\n" + 
+				"class B implements A<E, CharSequence> {\n" + 
+				"\n" + 
+				"	public void set(CharSequence string) {\n" + 
+				"		System.out.println(\"In B.set(CharSequence)\");\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"\n" + 
+				"public class C extends B {\n" + 
+				"\n" + 
+				"	static public void main(String[] args) {\n" + 
+				"		C c = new C();\n" + 
+				"		c.run();\n" + 
+				"	}\n" + 
+				"\n" + 
+				"	public void run() {\n" + 
+				"		E e = new E<String>(String.class);\n" + 
+				"		this.doSet(e);\n" + 
+				"	}\n" + 
+				"\n" + 
+				"}\n" + 
+				"\n" + 
+				"class D {\n" + 
+				"	public Object getObject() {\n" + 
+				"		return null;\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"\n" + 
+				"class E<Type extends CharSequence> extends D {\n" + 
+				"\n" + 
+				"	private Class<Type> typeClass;\n" + 
+				"\n" + 
+				"	public E(Class<Type> typeClass) {\n" + 
+				"		this.typeClass = typeClass;\n" + 
+				"	}\n" + 
+				"\n" + 
+				"	@Override\n" + 
+				"	public Type getObject() {\n" + 
+				"		try {\n" + 
+				"			return (Type) typeClass.newInstance();\n" + 
+				"		} catch (Exception e) {\n" + 
+				"			throw new RuntimeException(e);\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"\n" + 
+				"}\n" + 
+				"\n" + 
+				"interface I<ModelType, ValueType> {\n" + 
+				"\n" + 
+				"	public void doSet(ModelType model);\n" + 
+				"\n" + 
+				"	public void set(ValueType value);\n" + 
+				"\n" + 
+				"}\n"
+			},
+			"In B.set(CharSequence)");
+	}
+	
+    
+    // modeled after org.eclipse.jdt.core.tests.compiler.regression.AmbiguousMethodTest.test081()
+    // see https://bugs.eclipse.org/391376 - [1.8] check interaction of default methods with bridge methods and generics
+    // see https://bugs.eclipse.org/404648 - [1.8][compiler] investigate differences between compilers re AmbiguousMethodTest
+    public void _testBridge04() {
+        runConformTest(
+            new String[] {
+                "C.java",
+                "interface A<ModelType extends D, ValueType> extends\n" + 
+                "       I<ModelType, ValueType> {\n" + 
+                "\n" + 
+                "   @Override\n" + 
+                "   public default void doSet(ModelType valueGetter) {\n" + 
+                "       this.set((ValueType) valueGetter.getObject());\n" + 
+                "   }\n" + 
+                "\n" + 
+                "   @Override\n" + 
+                "   public default void set(Object object) {\n" + 
+                "       System.out.println(\"In A.set(Object)\");\n" + 
+                "   }\n" + 
+                "}\n" + 
+                "\n" + 
+                "interface B extends A<E, CharSequence> {\n" + 
+                "\n" + 
+                "   public default void set(CharSequence string) {\n" + 
+                "       System.out.println(\"In B.set(CharSequence)\");\n" + 
+                "   }\n" + 
+                "}\n" + 
+                "\n" + 
+                "public class C implements B {\n" + 
+                "\n" + 
+                "   static public void main(String[] args) {\n" + 
+                "       C c = new C();\n" + 
+                "       c.run();\n" + 
+                "   }\n" + 
+                "\n" + 
+                "   public void run() {\n" + 
+                "       E e = new E<String>(String.class);\n" + 
+                "       this.doSet(e);\n" + 
+                "   }\n" + 
+                "\n" + 
+                "}\n" + 
+                "\n" + 
+                "class D {\n" + 
+                "   public Object getObject() {\n" + 
+                "       return null;\n" + 
+                "   }\n" + 
+                "}\n" + 
+                "\n" + 
+                "class E<Type extends CharSequence> extends D {\n" + 
+                "\n" + 
+                "   private Class<Type> typeClass;\n" + 
+                "\n" + 
+                "   public E(Class<Type> typeClass) {\n" + 
+                "       this.typeClass = typeClass;\n" + 
+                "   }\n" + 
+                "\n" + 
+                "   @Override\n" + 
+                "   public Type getObject() {\n" + 
+                "       try {\n" + 
+                "           return (Type) typeClass.newInstance();\n" + 
+                "       } catch (Exception e) {\n" + 
+                "           throw new RuntimeException(e);\n" + 
+                "       }\n" + 
+                "   }\n" + 
+                "\n" + 
+                "}\n" + 
+                "\n" + 
+                "interface I<ModelType, ValueType> {\n" + 
+                "\n" + 
+                "   public void doSet(ModelType model);\n" + 
+                "\n" + 
+                "   public void set(ValueType value);\n" + 
+                "\n" + 
+                "}\n"
+            },
+            "In B.set(CharSequence)");
+    }
+    
+    // test for different error messages in modifiers.
+	public void test400977() {
+		runNegativeTest(
+		new String[] {
+			"I.java",
+			"public interface I {\n" +
+			"    default abstract void foo();\n" +
+			"    public abstract default strictfp final void bar();" +
+			"}\n"}, 
+			"----------\n" +
+			"1. ERROR in I.java (at line 2)\n" +
+			"	default abstract void foo();\n" +
+			"	                      ^^^^^\n" +
+			"Illegal combination of modifiers for the interface method foo; only one of abstract, default, or static permitted\n" +
+			"----------\n" +
+			"2. ERROR in I.java (at line 3)\n" +
+			"	public abstract default strictfp final void bar();}\n" +
+			"	                                            ^^^^^\n" +
+			"strictfp is not permitted for abstract interface method bar\n" +
+			"----------\n" +
+			"3. ERROR in I.java (at line 3)\n" +
+			"	public abstract default strictfp final void bar();}\n" +
+			"	                                            ^^^^^\n" +
+			"Illegal combination of modifiers for the interface method bar; only one of abstract, default, or static permitted\n" +
+			"----------\n" +
+			"4. ERROR in I.java (at line 3)\n" +
+			"	public abstract default strictfp final void bar();}\n" +
+			"	                                            ^^^^^\n" +
+			"Illegal modifier for the interface method bar; only public, abstract, default, static and strictfp are permitted\n" +
+			"----------\n");
+	}
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=420084,  [1.8] static interface method cannot be resolved without receiver when imported statically
+	public void testBug420084() {
+		runNegativeTest(
+			new String[] {
+				"p/J.java",
+				"package p;\n" +
+				"public interface J {\n" +
+				"	static int foo(){return 0;}\n" +
+				"}\n",
+				"I.java",
+				"import static p.J.foo;\n" +
+				"public interface I {\n" +
+				"	static int call() {\n" +
+				"		return foo();\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			"");
+	}	
+
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR308SpecSnippetTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR308SpecSnippetTests.java
new file mode 100644
index 0000000..fdb511d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JSR308SpecSnippetTests.java
@@ -0,0 +1,2920 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 415541 - [1.8][compiler] Type annotations in the body of static initializer get dropped
+ *                          Bug 415543 - [1.8][compiler] Incorrect bound index in RuntimeInvisibleTypeAnnotations attribute
+ *                          Bug 415397 - [1.8][compiler] Type Annotations on wildcard type argument dropped
+ *                          Bug 415399 - [1.8][compiler] Type annotations on constructor results dropped by the code generator
+ *                          Bug 415470 - [1.8][compiler] Type annotations on class declaration go vanishing
+ *                          Bug 414384 - [1.8] type annotation on abbreviated inner class is not marked as inner type
+ *     Jesper S Moller - Contributions for
+ *                          Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.File;
+import java.util.Map;
+
+import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+import junit.framework.Test;
+
+public class JSR308SpecSnippetTests extends AbstractRegressionTest {
+
+	static {
+//		TESTS_NUMBERS = new int [] { 19 };
+//		TESTS_NAMES = new String [] { "test033" };
+	}
+	public static Class testClass() {
+		return JSR308SpecSnippetTests.class;
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+	public JSR308SpecSnippetTests(String testName){
+		super(testName);
+	}
+
+	// Enables the tests to run individually
+	protected Map getCompilerOptions() {
+		Map defaultOptions = super.getCompilerOptions();
+		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+		return defaultOptions;
+	}
+	
+	public void test001() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.util.Map;\n" +
+				"import java.util.List;\n" +
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class Document {}\n" +
+				"public class X {\n" +
+				"	Map<@NonNull String, @NonEmpty List<@Readonly Document>> files;\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @NonNull(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #11 @NonEmpty(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1)]\n" + 
+				"      )\n" + 
+				"      #12 @Readonly(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// note, javac 8b100 emits offset incorrectly.
+	public void test002() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class Document {}\n" +
+				"public class X {\n" +
+				"	static void foo(X o) {\n" +
+				"		o.<@NonNull String>m(\"...\");\n" +
+				"	}\n" +
+				"	<T> void m(String s) {}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x49 METHOD_INVOCATION_TYPE_ARGUMENT\n" + 
+				"        offset = 3\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test003() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.Collection;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Existing {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class File {}\n" +
+				"class X<F extends @Existing File> { \n" +
+				"	Collection<? super @Existing File> c;\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @Existing(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), WILDCARD]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #12 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [14]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 11]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X<F>\n" + 
+				"\n" + 
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #10 @Existing(\n" + 
+				"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+				"      type parameter index = 0 type parameter bound index = 0\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test004() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.List;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Existing {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class File {}\n" +
+				"abstract class X<T> implements @Readonly List<@Readonly T> { }\n",
+		},
+		"");
+		String expectedOutput =
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #23 @Readonly(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"    )\n" + 
+				"    #23 @Readonly(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0)]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test005() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.List;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Critical {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class TemperatureException extends RuntimeException{}\n" +
+				"class X {\n" +
+				"	void monitorTemperature() throws @Critical TemperatureException {}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #19 @Critical(\n" + 
+				"        target type = 0x17 THROWS\n" + 
+				"        throws index = 0\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test006() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Interned {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Tainted {}\n" +
+				"class MyObject {\n" +
+				"	class NestedClass {}\n" +
+				"}\n" +
+				"class List<T> {}\n" +
+				"class X {\n" +
+				"	static void monitorTemperature(MyObject myVar) {\n" +
+				"		new <String> @Interned MyObject();\n" +
+				"		new @NonEmpty @Readonly List<String>();\n" +
+				"		myVar.new @Tainted NestedClass();\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #33 @Interned(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 0\n" + 
+				"      )\n" + 
+				"      #34 @NonEmpty(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 6\n" + 
+				"      )\n" + 
+				"      #35 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 6\n" + 
+				"      )\n" + 
+				"      #36 @Tainted(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 12\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test007() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.Map;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Tainted {}\n" +
+				"class MyObject {\n" +
+				"	class NestedClass {}\n" +
+				"}\n" +
+				"class List<T> {}\n" +
+				"class X {\n" +
+				"		Map.@NonNull Entry e;\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @NonNull(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test008() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface A {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface B {}\n" +
+				"class MyObject {\n" +
+				"	class NestedClass {}\n" +
+				"}\n" +
+				"class List<T> {}\n" +
+				"class Type1 {}\n" +
+				"interface Type2 {}\n" +
+				"class X {\n" +
+				"	static void monitorTemperature(Object myObject) {\n" +
+				"		String myString = (@NonNull String) myObject;\n" +
+				"		Type1 x = (@A Type1 & @B Type2) null;\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #29 @NonNull(\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 1\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n" + 
+				"      #30 @A(\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 6\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n" + 
+				"      #31 @B(\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 6\n" + 
+				"        type argument index = 1\n" + 
+				"      )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test009() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface A {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface B {}\n" +
+				"class MyObject {\n" +
+				"	class NestedClass {}\n" +
+				"}\n" +
+				"class List<T> {}\n" +
+				"class Type1 {}\n" +
+				"interface Type2 {}\n" +
+				"class X {\n" +
+				"	static void monitorTemperature(Object myObject) {\n" +
+				"		boolean isNonNull = myObject instanceof @NonNull String;\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #23 @NonNull(\n" + 
+				"        target type = 0x43 INSTANCEOF\n" + 
+				"        offset = 1\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test010() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.Arrays;\n" +
+				"import java.util.Date;\n" +
+				"import java.util.List;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface English {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Vernal {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNegative {}\n" +
+				"class MyObject {\n" +
+				"	class NestedClass {}\n" +
+				"}\n" +
+				"class Type1 {}\n" +
+				"interface I {\n" +
+				"	int f(Date d);\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	int f(List l);\n" +
+				"}\n" +
+				"interface K {\n" +
+				"	void s(int [] ia);\n" +
+				"}\n" +
+				"class X {\n" +
+				"	static void monitorTemperature(Object myObject) {\n" +
+				"		I i = @Vernal Date::getDay;\n" +
+				"		J j  = List<@English String>::size;\n" +
+				"		K k = Arrays::<@NonNegative Integer>sort;\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #36 @Vernal(\n" + 
+				"        target type = 0x46 METHOD_REFERENCE\n" + 
+				"        offset = 0\n" + 
+				"      )\n" + 
+				"      #37 @English(\n" + 
+				"        target type = 0x46 METHOD_REFERENCE\n" + 
+				"        offset = 6\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #38 @NonNegative(\n" + 
+				"        target type = 0x4b METHOD_REFERENCE_TYPE_ARGUMENT\n" + 
+				"        offset = 12\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test011() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.*;\n" +
+				"import java.io.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Immutable { int value() default 0; }\n" +
+				"class X {\n" +
+				"	List<@Immutable ? extends Comparable<X>> a;\n" +
+				"	List<? extends @Immutable Comparable<X>> b;\n" +
+				"	List<@Immutable(1) ? extends @Immutable(2) Comparable<X>> c;\n" +
+				"	Map<@Immutable(1) ? extends Comparable<X>,@Immutable(2) ? extends @Immutable(3) Serializable> d;\n" +
+				"}\n",
+		},
+		"");
+		// javac b100
+		// Field a:
+		//   RuntimeInvisibleTypeAnnotations:
+		//    0: #9(): FIELD, location=[TYPE_ARGUMENT(0)]
+		// Field b:
+		//   RuntimeInvisibleTypeAnnotations:
+		//    0: #9(): FIELD, location=[TYPE_ARGUMENT(0), WILDCARD]
+		// Field c:
+		//   RuntimeInvisibleTypeAnnotations:
+		//    0: #9(#12=I#13): FIELD, location=[TYPE_ARGUMENT(0)]
+		//    1: #9(#12=I#14): FIELD, location=[TYPE_ARGUMENT(0), WILDCARD]
+		// Field d:
+		//   RuntimeInvisibleTypeAnnotations:
+		//    0: #9(#12=I#13): FIELD, location=[TYPE_ARGUMENT(0)]
+		//    1: #9(#12=I#14): FIELD, location=[TYPE_ARGUMENT(1)]
+		//    2: #9(#12=I#18): FIELD, location=[TYPE_ARGUMENT(1), WILDCARD]
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"a\"\n" + 
+				"    constant #6 utf8: \"Ljava/util/List;\"\n" + 
+				"    constant #7 utf8: \"Signature\"\n" + 
+				"    constant #8 utf8: \"Ljava/util/List<+Ljava/lang/Comparable<LX;>;>;\"\n" + 
+				"    constant #9 utf8: \"RuntimeInvisibleTypeAnnotations\"\n" + 
+				"    constant #10 utf8: \"LImmutable;\"\n" + 
+				"    constant #11 utf8: \"b\"\n" + 
+				"    constant #12 utf8: \"c\"\n" + 
+				"    constant #13 utf8: \"value\"\n" + 
+				"    constant #14 integer: 1\n" + 
+				"    constant #15 integer: 2\n" + 
+				"    constant #16 utf8: \"d\"\n" + 
+				"    constant #17 utf8: \"Ljava/util/Map;\"\n" + 
+				"    constant #18 utf8: \"Ljava/util/Map<+Ljava/lang/Comparable<LX;>;+Ljava/io/Serializable;>;\"\n" + 
+				"    constant #19 integer: 3\n" + 
+				"    constant #20 utf8: \"<init>\"\n" + 
+				"    constant #21 utf8: \"()V\"\n" + 
+				"    constant #22 utf8: \"Code\"\n" + 
+				"    constant #23 method_ref: #3.#24 java/lang/Object.<init> ()V\n" + 
+				"    constant #24 name_and_type: #20.#21 <init> ()V\n" + 
+				"    constant #25 utf8: \"LineNumberTable\"\n" + 
+				"    constant #26 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #27 utf8: \"this\"\n" + 
+				"    constant #28 utf8: \"LX;\"\n" + 
+				"    constant #29 utf8: \"SourceFile\"\n" + 
+				"    constant #30 utf8: \"X.java\"\n" + 
+				"  \n" + 
+				"  // Field descriptor #6 Ljava/util/List;\n" + 
+				"  // Signature: Ljava/util/List<+Ljava/lang/Comparable<LX;>;>;\n" + 
+				"  java.util.List a;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @Immutable(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Field descriptor #6 Ljava/util/List;\n" + 
+				"  // Signature: Ljava/util/List<+Ljava/lang/Comparable<LX;>;>;\n" + 
+				"  java.util.List b;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @Immutable(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), WILDCARD]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Field descriptor #6 Ljava/util/List;\n" + 
+				"  // Signature: Ljava/util/List<+Ljava/lang/Comparable<LX;>;>;\n" + 
+				"  java.util.List c;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @Immutable(\n" + 
+				"        #13 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #10 @Immutable(\n" + 
+				"        #13 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), WILDCARD]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Field descriptor #17 Ljava/util/Map;\n" + 
+				"  // Signature: Ljava/util/Map<+Ljava/lang/Comparable<LX;>;+Ljava/io/Serializable;>;\n" + 
+				"  java.util.Map d;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @Immutable(\n" + 
+				"        #13 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #10 @Immutable(\n" + 
+				"        #13 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1)]\n" + 
+				"      )\n" + 
+				"      #10 @Immutable(\n" + 
+				"        #13 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1), WILDCARD]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #21 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [23]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test012() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class Document {}\n" +
+				"class X {\n" +
+				"	@Readonly Document [][] docs1 = new @Readonly Document [2][12]; // array of arrays of read-only documents\n" +
+				"	Document @Readonly [][] docs2 = new Document @Readonly [2][12]; // read-only array of arrays of documents\n" +
+				"	Document[] @Readonly [] docs3 = new Document[2] @Readonly [12]; // array of read-only arrays of documents\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  Document[][] docs1;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @Readonly(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Field descriptor #6 [[LDocument;\n" + 
+				"  Document[][] docs2;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @Readonly(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Field descriptor #6 [[LDocument;\n" + 
+				"  Document[][] docs3;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @Readonly(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #12 ()V\n" + 
+				"  // Stack: 3, Locals: 1\n" + 
+				"  X();\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  invokespecial java.lang.Object() [14]\n" + 
+				"     4  aload_0 [this]\n" + 
+				"     5  iconst_2\n" + 
+				"     6  bipush 12\n" + 
+				"     8  multianewarray Document[][] [16]\n" + 
+				"    12  putfield X.docs1 : Document[][] [17]\n" + 
+				"    15  aload_0 [this]\n" + 
+				"    16  iconst_2\n" + 
+				"    17  bipush 12\n" + 
+				"    19  multianewarray Document[][] [16]\n" + 
+				"    23  putfield X.docs2 : Document[][] [19]\n" + 
+				"    26  aload_0 [this]\n" + 
+				"    27  iconst_2\n" + 
+				"    28  bipush 12\n" + 
+				"    30  multianewarray Document[][] [16]\n" + 
+				"    34  putfield X.docs3 : Document[][] [21]\n" + 
+				"    37  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 6]\n" + 
+				"        [pc: 4, line: 7]\n" + 
+				"        [pc: 15, line: 8]\n" + 
+				"        [pc: 26, line: 9]\n" + 
+				"        [pc: 37, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 38] local: this index: 0 type: X\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 8\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #8 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 19\n" + 
+				"      )\n" + 
+				"      #8 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 30\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test013() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Immutable {}\n" +
+				"class Document {}\n" +
+				"class X {\n" +
+				"	@Immutable X() {\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		// javac b100 gives:
+		//		RuntimeInvisibleTypeAnnotations:
+		//		      0: #9(): METHOD_RETURN
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"<init>\"\n" + 
+				"    constant #6 utf8: \"()V\"\n" + 
+				"    constant #7 utf8: \"Code\"\n" + 
+				"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+				"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+				"    constant #10 utf8: \"LineNumberTable\"\n" + 
+				"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #12 utf8: \"this\"\n" + 
+				"    constant #13 utf8: \"LX;\"\n" + 
+				"    constant #14 utf8: \"RuntimeInvisibleTypeAnnotations\"\n" + 
+				"    constant #15 utf8: \"LImmutable;\"\n" + 
+				"    constant #16 utf8: \"SourceFile\"\n" + 
+				"    constant #17 utf8: \"X.java\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [8]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"        [pc: 4, line: 8]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #15 @Immutable(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"      )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test014() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Immutable {}\n" +
+				"class Document {}\n" +
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	void foo (X this, X this) {\n" +
+				"	}\n" +
+				"	static void foo (X this) {\n" +
+				"	}\n" +
+				"	I i = (X this) -> {};\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"	void foo(X this) {}\n" +
+				"	void foo(Y this, int x) {}\n" +
+				"	class Z {\n" +
+				"		void foo(Y<T>.Z this) {}\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 10)\n" + 
+		"	void foo (X this, X this) {\n" + 
+		"	                    ^^^^\n" + 
+		"Only the first formal parameter may be declared explicitly as \'this\'\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 12)\n" + 
+		"	static void foo (X this) {\n" + 
+		"	                   ^^^^\n" + 
+		"Explicit \'this\' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 14)\n" + 
+		"	I i = (X this) -> {};\n" + 
+		"	      ^^^^^^^^^^^^^^\n" + 
+		"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 14)\n" + 
+		"	I i = (X this) -> {};\n" + 
+		"	         ^^^^\n" + 
+		"Lambda expressions cannot declare a this parameter\n" + 
+		"----------\n" + 
+		"5. ERROR in X.java (at line 17)\n" + 
+		"	void foo(X this) {}\n" + 
+		"	         ^\n" + 
+		"The declared type of the explicit \'this\' parameter is expected to be Y<T>\n" + 
+		"----------\n" + 
+		"6. WARNING in X.java (at line 18)\n" + 
+		"	void foo(Y this, int x) {}\n" + 
+		"	         ^\n" + 
+		"Y is a raw type. References to generic type Y<T> should be parameterized\n" + 
+		"----------\n" + 
+		"7. ERROR in X.java (at line 18)\n" + 
+		"	void foo(Y this, int x) {}\n" + 
+		"	         ^\n" + 
+		"The declared type of the explicit \'this\' parameter is expected to be Y<T>\n" + 
+		"----------\n");
+	}
+	public void test015() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Immutable {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class Document {}\n" +
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	class Y {\n" +
+				"		void foo(@Immutable X.@Readonly Y this) {\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #21 @Immutable(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"      )\n" + 
+				"      #22 @Readonly(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X$Y.class", "Y", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test016() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface A {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface B {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface C {}\n" +
+				"public class X {}\n" +
+				"class Outer {\n" +
+				"    class Middle {\n" +
+				"        class Inner {\n" +
+				"            void innerMethod(@A Outer.@B Middle.@C Inner this) { }\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #21 @A(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"      )\n" + 
+				"      #22 @B(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #23 @C(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"        location = [INNER_TYPE, INNER_TYPE]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "Outer$Middle$Inner.class", "Inner", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test017() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Result {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Receiver {}\n" +
+				"class Document {}\n" +
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	class Y {\n" +
+				"		 Y(@Receiver X X.this, boolean b) { }\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #22 @Receiver(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X$Y.class", "Y", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test018() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*;  \n" +
+				"@interface Receiver {}\n" +
+				"class Document {}\n" +
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	void foo(@Receiver X this) {}\n" +
+				"	class Y {\n" +
+				"		 Y(@Receiver X X.this, boolean b) { }\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 9)\n" + 
+		"	void foo(@Receiver X this) {}\n" + 
+		"	         ^^^^^^^^^\n" + 
+		"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 11)\n" + 
+		"	Y(@Receiver X X.this, boolean b) { }\n" + 
+		"	  ^^^^^^^^^\n" + 
+		"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+		"----------\n");
+	}
+	public void test019() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class X<@Readonly T> {\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #21 @Readonly(\n" + 
+				"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+				"      type parameter index = 0\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test020() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.@NotAllowed Date; // illegal!\n" +
+				"import @IllegalSyntax java.util.Date; // illegal syntax\n" +
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Even {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NotAllowed {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface IllegalSyntax {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Legal {}\n" +
+				"class X {\n" +
+				"	static int staticField;\n" +
+				"	static class StaticNestedClass {}\n" +
+				"	void foo() {\n" +
+				"		Object o = @Even int.class; // illegal!\n" +
+				"		o = int @NonEmpty [].class; // illegal!\n" +
+				"		int x = @IllegalSyntax X.staticField;\n" +
+				"		StaticNestedClass snc = (@IllegalSyntax X.StaticNestedClass) null;\n" +
+				"		X.@Legal StaticNestedClass lsnc = (X.@Legal StaticNestedClass) null;\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	import java.util.@NotAllowed Date; // illegal!\n" + 
+		"	                 ^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 2)\n" + 
+		"	import @IllegalSyntax java.util.Date; // illegal syntax\n" + 
+		"	       ^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"3. WARNING in X.java (at line 2)\n" + 
+		"	import @IllegalSyntax java.util.Date; // illegal syntax\n" + 
+		"	                      ^^^^^^^^^^^^^^\n" + 
+		"The import java.util.Date is never used\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 19)\n" + 
+		"	Object o = @Even int.class; // illegal!\n" + 
+		"	           ^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"5. WARNING in X.java (at line 20)\n" + 
+		"	o = int @NonEmpty [].class; // illegal!\n" + 
+		"	        ^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"6. ERROR in X.java (at line 21)\n" + 
+		"	int x = @IllegalSyntax X.staticField;\n" + 
+		"	        ^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"7. ERROR in X.java (at line 22)\n" + 
+		"	StaticNestedClass snc = (@IllegalSyntax X.StaticNestedClass) null;\n" + 
+		"	                         ^^^^^^^^^^^^^^\n" + 
+		"Type annotations are not allowed on type names used to access static members\n" + 
+		"----------\n");
+	}
+	public void test021() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.@NotAllowed Date; // illegal!\n" +
+				"import @IllegalSyntax java.util.Date; // illegal syntax\n" +
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Even {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonEmpty {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NotAllowed {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface IllegalSyntax {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Legal {}\n" +
+				"interface I {\n" +
+				"	int f(Y y);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	int f;\n" +
+				"	int x(Y y) {}\n" +
+				"}\n" +
+				"class X extends Y {\n" +
+				"	static int staticField;\n" +
+				"	static class StaticNestedClass {}\n" +
+				"	void foo() {\n" +
+				"		Object o = @Even int.class; // illegal!\n" +
+				"		o = int @NonEmpty [].class; // illegal!\n" +
+				"		int x = @IllegalSyntax X.staticField;\n" +
+				"		StaticNestedClass snc = (@IllegalSyntax X.StaticNestedClass) null;\n" +
+				"		X.@Legal StaticNestedClass lsnc = (X.@Legal StaticNestedClass) null;\n" +
+				"		int x2 = @IllegalSyntax X.super.f;\n" +
+				"		I i = @IllegalSyntax X.super::x;\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	import java.util.@NotAllowed Date; // illegal!\n" + 
+		"	                 ^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 2)\n" + 
+		"	import @IllegalSyntax java.util.Date; // illegal syntax\n" + 
+		"	       ^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"3. WARNING in X.java (at line 2)\n" + 
+		"	import @IllegalSyntax java.util.Date; // illegal syntax\n" + 
+		"	                      ^^^^^^^^^^^^^^\n" + 
+		"The import java.util.Date is never used\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 26)\n" + 
+		"	Object o = @Even int.class; // illegal!\n" + 
+		"	           ^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"5. WARNING in X.java (at line 27)\n" + 
+		"	o = int @NonEmpty [].class; // illegal!\n" + 
+		"	        ^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"6. ERROR in X.java (at line 28)\n" + 
+		"	int x = @IllegalSyntax X.staticField;\n" + 
+		"	        ^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"7. ERROR in X.java (at line 29)\n" + 
+		"	StaticNestedClass snc = (@IllegalSyntax X.StaticNestedClass) null;\n" + 
+		"	                         ^^^^^^^^^^^^^^\n" + 
+		"Type annotations are not allowed on type names used to access static members\n" + 
+		"----------\n" + 
+		"8. ERROR in X.java (at line 31)\n" + 
+		"	int x2 = @IllegalSyntax X.super.f;\n" + 
+		"	         ^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"9. ERROR in X.java (at line 32)\n" + 
+		"	I i = @IllegalSyntax X.super::x;\n" + 
+		"	      ^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n");
+	}
+	public void test022() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"class X {\n" +
+				"	@Readonly int foo() @Readonly [] {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #17 @Readonly(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n" + 
+				"      #17 @Readonly(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test023() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"interface X {\n" +
+				"	default @Readonly int foo() @Readonly [] {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #13 @Readonly(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n" + 
+				"      #13 @Readonly(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test024() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Critical {}\n" +
+				"class X {\n" +
+				"	void foo() {\n" +
+				"		try {\n" +
+				"           System.out.println();\n" +
+				"		} catch (@Readonly NullPointerException | @Critical ArrayIndexOutOfBoundsException e) {\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #34 @Readonly(\n" + 
+				"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+				"        exception table index = 0\n" + 
+				"      )\n" + 
+				"      #35 @Critical(\n" + 
+				"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+				"        exception table index = 1\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test025() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Critical {}\n" +
+				"class X {\n" +
+				"	void foo(@Readonly int [] [] @Critical ... x) {\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #19 @Readonly(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [ARRAY, ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #20 @Critical(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test026() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Readonly {}\n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Critical {}\n" +
+				"class X {\n" +
+				"	void foo(@Readonly int [] [] @Critical ... x) {\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #19 @Readonly(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [ARRAY, ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #20 @Critical(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test027() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"class X {\n" +
+				"	@NonNull String var1, arr2[];\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @NonNull(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Field descriptor #10 [Ljava/lang/String;\n" + 
+				"  java.lang.String[] arr2;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @NonNull(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test028() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.List;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface NonNull {}\n" +
+				"class X<@NonNull T> {\n" +
+				"	<@NonNull K> void foo() {}\n" +
+				"	List<@NonNull ?> l;\n" +
+				"}\n",
+		},
+		"");
+		// javac b100
+		// On the type declaration:
+		//  RuntimeInvisibleTypeAnnotations:
+		//   0: #9(): CLASS_TYPE_PARAMETER, param_index=0
+		// On the method:
+	    //  RuntimeInvisibleTypeAnnotations:
+	    //   0: #9(): METHOD_TYPE_PARAMETER, param_index=0
+		// On the field:
+		//  RuntimeInvisibleTypeAnnotations:
+		//   0: #9(): FIELD, location=[TYPE_ARGUMENT(0)]
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"// Signature: <T:Ljava/lang/Object;>Ljava/lang/Object;\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"l\"\n" + 
+				"    constant #6 utf8: \"Ljava/util/List;\"\n" + 
+				"    constant #7 utf8: \"Signature\"\n" + 
+				"    constant #8 utf8: \"Ljava/util/List<*>;\"\n" + 
+				"    constant #9 utf8: \"RuntimeInvisibleTypeAnnotations\"\n" + 
+				"    constant #10 utf8: \"LNonNull;\"\n" + 
+				"    constant #11 utf8: \"<init>\"\n" + 
+				"    constant #12 utf8: \"()V\"\n" + 
+				"    constant #13 utf8: \"Code\"\n" + 
+				"    constant #14 method_ref: #3.#15 java/lang/Object.<init> ()V\n" + 
+				"    constant #15 name_and_type: #11.#12 <init> ()V\n" + 
+				"    constant #16 utf8: \"LineNumberTable\"\n" + 
+				"    constant #17 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #18 utf8: \"this\"\n" + 
+				"    constant #19 utf8: \"LX;\"\n" + 
+				"    constant #20 utf8: \"LocalVariableTypeTable\"\n" + 
+				"    constant #21 utf8: \"LX<TT;>;\"\n" + 
+				"    constant #22 utf8: \"foo\"\n" + 
+				"    constant #23 utf8: \"<K:Ljava/lang/Object;>()V\"\n" + 
+				"    constant #24 utf8: \"SourceFile\"\n" + 
+				"    constant #25 utf8: \"X.java\"\n" + 
+				"    constant #26 utf8: \"<T:Ljava/lang/Object;>Ljava/lang/Object;\"\n" + 
+				"  \n" + 
+				"  // Field descriptor #6 Ljava/util/List;\n" + 
+				"  // Signature: Ljava/util/List<*>;\n" + 
+				"  java.util.List l;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @NonNull(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #12 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [14]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X<T>\n" + 
+				"  \n" + 
+				"  // Method descriptor #12 ()V\n" + 
+				"  // Signature: <K:Ljava/lang/Object;>()V\n" + 
+				"  // Stack: 0, Locals: 1\n" + 
+				"  void foo();\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X<T>\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @NonNull(\n" + 
+				"        target type = 0x1 METHOD_TYPE_PARAMETER\n" + 
+				"        type parameter index = 0\n" + 
+				"      )\n" + 
+				"\n" + 
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #10 @NonNull(\n" + 
+				"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+				"      type parameter index = 0\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test029() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface TAnno { }\n" +
+				"@Target({METHOD}) @interface MAnno { }\n" +
+				"@Target({METHOD, TYPE_USE}) @interface MTAnno { }\n" +
+				"@Target({FIELD}) @interface FAnno { }\n" +
+				"@Target({FIELD, TYPE_USE}) @interface FTAnno { }\n" +
+				"class X {\n" +
+				"@FAnno Object field4; // legal, one field annotation\n" +
+				"@TAnno Object field5; // legal, one type annotation\n" +
+				"@FTAnno Object field6; // legal, one field annotation and one type annotation\n" +
+				"@FAnno java.lang.Object field7; // legal, one field annotation\n" +
+				"@TAnno java.lang.Object field8; // illegal\n" +
+				"@FTAnno java.lang.Object field9; // legal, one field annotation\n" +
+				"java.lang. @FAnno Object field10; // illegal\n" +
+				"java.lang. @TAnno Object field11; // legal, one type annotation\n" +
+				"java.lang. @FTAnno Object field12; // legal, one type annotation\n" +
+				"@MAnno void myMethod1() { } // legal, one method annotation\n" +
+				"@TAnno void myMethod2() { } // illegal\n" +
+				"@MTAnno void myMethod3() { } // legal, one method annotation\n" +
+				"@MAnno Object myMethod4() {  } // legal, one method annotation\n" +
+				"@TAnno Object myMethod5() { } // legal, one type annotation\n" +
+				"@MTAnno Object myMethod6() {  } // legal, one method annotation and one type annotation\n" +
+				"@MAnno java.lang.Object myMethod7() {  } // legal, one method annotation\n" +
+				"@TAnno java.lang.Object myMethod8() {  } // illegal\n" +
+				"@MTAnno java.lang.Object myMethod9() {  } // legal, one method annotation\n" +
+				"java.lang. @MAnno Object myMethod10() { } // illegal\n" +
+				"java.lang. @TAnno Object myMethod11() {  } // legal, one type annotation\n" +
+				"java.lang. @MTAnno Object myMethod12() {  } // legal, one type annotation\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 13)\n" + 
+		"	@TAnno java.lang.Object field8; // illegal\n" + 
+		"	^^^^^^\n" + 
+		"The annotation @TAnno is disallowed for this location\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 15)\n" + 
+		"	java.lang. @FAnno Object field10; // illegal\n" + 
+		"	           ^^^^^^\n" + 
+		"The annotation @FAnno is disallowed for this location\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 19)\n" + 
+		"	@TAnno void myMethod2() { } // illegal\n" + 
+		"	^^^^^^\n" + 
+		"Type annotation is illegal for a method that returns void\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 25)\n" + 
+		"	@TAnno java.lang.Object myMethod8() {  } // illegal\n" + 
+		"	^^^^^^\n" + 
+		"The annotation @TAnno is disallowed for this location\n" + 
+		"----------\n" + 
+		"5. ERROR in X.java (at line 27)\n" + 
+		"	java.lang. @MAnno Object myMethod10() { } // illegal\n" + 
+		"	           ^^^^^^\n" + 
+		"The annotation @MAnno is disallowed for this location\n" + 
+		"----------\n");
+	}
+	public void test030() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface TypeAnnotation { }\n" +
+				"@Target({TYPE}) @interface Annotation { }\n" +
+				"@Annotation @TypeAnnotation class X {\n" +
+				"}\n",
+		},
+		"");
+		// javac b100 produces:
+		//		  RuntimeInvisibleAnnotations:
+		//			    0: #11() LAnnotation;
+		//			    1: #12() LTypeAnnotation;
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"<init>\"\n" + 
+				"    constant #6 utf8: \"()V\"\n" + 
+				"    constant #7 utf8: \"Code\"\n" + 
+				"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+				"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+				"    constant #10 utf8: \"LineNumberTable\"\n" + 
+				"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #12 utf8: \"this\"\n" + 
+				"    constant #13 utf8: \"LX;\"\n" + 
+				"    constant #14 utf8: \"SourceFile\"\n" + 
+				"    constant #15 utf8: \"X.java\"\n" + 
+				"    constant #16 utf8: \"RuntimeInvisibleAnnotations\"\n" + 
+				"    constant #17 utf8: \"LAnnotation;\"\n" + 
+				"    constant #18 utf8: \"LTypeAnnotation;\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [8]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 5]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"\n" + 
+				"  RuntimeInvisibleAnnotations: \n" + 
+				"    #17 @Annotation(\n" + 
+				"    )\n" + 
+				"    #18 @TypeAnnotation(\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test030a() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@Target({TYPE_USE}) @interface TypeAnnotation { }\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@Target({TYPE}) @interface Annotation { }\n" +
+				"@Annotation @TypeAnnotation class X {\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"<init>\"\n" + 
+				"    constant #6 utf8: \"()V\"\n" + 
+				"    constant #7 utf8: \"Code\"\n" + 
+				"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+				"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+				"    constant #10 utf8: \"LineNumberTable\"\n" + 
+				"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #12 utf8: \"this\"\n" + 
+				"    constant #13 utf8: \"LX;\"\n" + 
+				"    constant #14 utf8: \"SourceFile\"\n" + 
+				"    constant #15 utf8: \"X.java\"\n" + 
+				"    constant #16 utf8: \"RuntimeVisibleAnnotations\"\n" + 
+				"    constant #17 utf8: \"LAnnotation;\"\n" + 
+				"    constant #18 utf8: \"LTypeAnnotation;\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [8]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"\n" + 
+				"  RuntimeVisibleAnnotations: \n" + 
+				"    #17 @Annotation(\n" + 
+				"    )\n" + 
+				"    #18 @TypeAnnotation(\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test030b() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				// Only TYPE_USE annotations get this special treatment
+				"@Target({TYPE_PARAMETER}) @interface TypeAnnotation { }\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@Target({TYPE}) @interface Annotation { }\n" +
+				"@Annotation @TypeAnnotation class X {\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 7)\n" + 
+		"	@Annotation @TypeAnnotation class X {\n" + 
+		"	            ^^^^^^^^^^^^^^^\n" + 
+		"The annotation @TypeAnnotation is disallowed for this location\n" + 
+		"----------\n");
+	}
+	public void test030c() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@Target({TYPE_USE,TYPE_PARAMETER}) @interface TypeAnnotation { }\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@Target({TYPE}) @interface Annotation { }\n" +
+				"@Annotation @TypeAnnotation class X {\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"<init>\"\n" + 
+				"    constant #6 utf8: \"()V\"\n" + 
+				"    constant #7 utf8: \"Code\"\n" + 
+				"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+				"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+				"    constant #10 utf8: \"LineNumberTable\"\n" + 
+				"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #12 utf8: \"this\"\n" + 
+				"    constant #13 utf8: \"LX;\"\n" + 
+				"    constant #14 utf8: \"SourceFile\"\n" + 
+				"    constant #15 utf8: \"X.java\"\n" + 
+				"    constant #16 utf8: \"RuntimeVisibleAnnotations\"\n" + 
+				"    constant #17 utf8: \"LAnnotation;\"\n" + 
+				"    constant #18 utf8: \"LTypeAnnotation;\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [8]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"\n" + 
+				"  RuntimeVisibleAnnotations: \n" + 
+				"    #17 @Annotation(\n" + 
+				"    )\n" + 
+				"    #18 @TypeAnnotation(\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// Test that annotations in initializer code are not attached to the field.
+	public void test031() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface NonNull { }\n" +
+				"class X {\n" +
+				"	X x = new @NonNull X();\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  X();\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  invokespecial java.lang.Object() [10]\n" + 
+				"     4  aload_0 [this]\n" + 
+				"     5  new X [1]\n" + 
+				"     8  dup\n" + 
+				"     9  invokespecial X() [12]\n" + 
+				"    12  putfield X.x : X [13]\n" + 
+				"    15  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 4]\n" + 
+				"        [pc: 4, line: 5]\n" + 
+				"        [pc: 15, line: 4]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 16] local: this index: 0 type: X\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #19 @NonNull(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 5\n" + 
+				"      )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// Test co-existence of parameter annotations and type annotations.
+	public void test032() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface NonNull { }\n" +
+				"@Target({PARAMETER}) @interface ParameterAnnot { }\n" +
+				"class X {\n" +
+				"	void foo(@NonNull X this, @ParameterAnnot @NonNull X x) {\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  void foo(X x);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: x index: 1 type: X\n" + 
+				"    RuntimeInvisibleParameterAnnotations: \n" + 
+				"      Number of annotations for parameter 0: 1\n" + 
+				"        #17 @ParameterAnnot(\n" + 
+				"        )\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #20 @NonNull(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #20 @NonNull(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// Test type annotations in initializer code.
+	public void test033() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface NonNull { }\n" +
+				"class X {\n" +
+				"	static {\n" +
+				"		Object o = (@NonNull Object) new @NonNull Object();\n" +
+				"	}\n" +
+				"	{\n" +
+				"		new @NonNull Object();\n" +
+				"	}\n" +
+				"	X() {\n" +
+				"	}\n" +
+				"	X (int x) {\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		// javac b100
+		// For the annotations in the static {...} the clinit has:
+		//		RuntimeInvisibleTypeAnnotations:
+		//	        0: #11(): CAST, offset=0, type_index=0
+		//	        1: #11(): NEW, offset=0
+		// javac is skipping production of the cast so offset is 0. JDT is currently always producing the
+		// checkcast for an annotated cast so the offset is 7.
+		
+		// For the annotations in the initializer {...} the constructors both have:
+		//	      RuntimeInvisibleTypeAnnotations:
+		//	          0: #11(): NEW, offset=4
+
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"<clinit>\"\n" + 
+				"    constant #6 utf8: \"()V\"\n" + 
+				"    constant #7 utf8: \"Code\"\n" + 
+				"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+				"    constant #9 name_and_type: #10.#6 <init> ()V\n" + 
+				"    constant #10 utf8: \"<init>\"\n" + 
+				"    constant #11 utf8: \"LineNumberTable\"\n" + 
+				"    constant #12 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #13 utf8: \"RuntimeInvisibleTypeAnnotations\"\n" + 
+				"    constant #14 utf8: \"LNonNull;\"\n" + 
+				"    constant #15 utf8: \"this\"\n" + 
+				"    constant #16 utf8: \"LX;\"\n" + 
+				"    constant #17 utf8: \"(I)V\"\n" + 
+				"    constant #18 utf8: \"x\"\n" + 
+				"    constant #19 utf8: \"I\"\n" + 
+				"    constant #20 utf8: \"SourceFile\"\n" + 
+				"    constant #21 utf8: \"X.java\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 2, Locals: 1\n" + 
+				"  static {};\n" + 
+				"     0  new java.lang.Object [3]\n" + 
+				"     3  dup\n" + 
+				"     4  invokespecial java.lang.Object() [8]\n" + 
+				"     7  checkcast java.lang.Object [3]\n" + 
+				"    10  astore_0\n" + 
+				"    11  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 6]\n" + 
+				"        [pc: 11, line: 7]\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #14 @NonNull(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 0\n" + 
+				"      )\n" + 
+				"      #14 @NonNull(\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 7\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  invokespecial java.lang.Object() [8]\n" + 
+				"     4  new java.lang.Object [3]\n" + 
+				"     7  invokespecial java.lang.Object() [8]\n" + 
+				"    10  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 11]\n" + 
+				"        [pc: 4, line: 9]\n" + 
+				"        [pc: 10, line: 12]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 11] local: this index: 0 type: X\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #14 @NonNull(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 4\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #17 (I)V\n" + 
+				"  // Stack: 1, Locals: 2\n" + 
+				"  X(int x);\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  invokespecial java.lang.Object() [8]\n" + 
+				"     4  new java.lang.Object [3]\n" + 
+				"     7  invokespecial java.lang.Object() [8]\n" + 
+				"    10  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 13]\n" + 
+				"        [pc: 4, line: 9]\n" + 
+				"        [pc: 10, line: 14]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 11] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 11] local: x index: 1 type: int\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #14 @NonNull(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 4\n" + 
+				"      )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test034() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface NonNull { }\n" +
+				"class X <T extends @NonNull Comparable> {\n" +
+				"}\n",
+		},
+		"");
+		// javac b100
+		//		  RuntimeInvisibleTypeAnnotations:
+		//			    0: #13(): CLASS_TYPE_PARAMETER_BOUND, param_index=0, bound_index=1		
+		// bound_index is 1 because the bound is an interface, not a class
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"// Signature: <T::Ljava/lang/Comparable;>Ljava/lang/Object;\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"<init>\"\n" + 
+				"    constant #6 utf8: \"()V\"\n" + 
+				"    constant #7 utf8: \"Code\"\n" + 
+				"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+				"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+				"    constant #10 utf8: \"LineNumberTable\"\n" + 
+				"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #12 utf8: \"this\"\n" + 
+				"    constant #13 utf8: \"LX;\"\n" + 
+				"    constant #14 utf8: \"LocalVariableTypeTable\"\n" + 
+				"    constant #15 utf8: \"LX<TT;>;\"\n" + 
+				"    constant #16 utf8: \"SourceFile\"\n" + 
+				"    constant #17 utf8: \"X.java\"\n" + 
+				"    constant #18 utf8: \"Signature\"\n" + 
+				"    constant #19 utf8: \"<T::Ljava/lang/Comparable;>Ljava/lang/Object;\"\n" + 
+				"    constant #20 utf8: \"RuntimeInvisibleTypeAnnotations\"\n" + 
+				"    constant #21 utf8: \"LNonNull;\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [8]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 4]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X<T>\n" + 
+				"\n" + 
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #21 @NonNull(\n" + 
+				"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+				"      type parameter index = 0 type parameter bound index = 1\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	// Bug 415543 - Incorrect bound index in RuntimeInvisibleTypeAnnotations attribute
+	public void test034b() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.io.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface NonNull { }\n" +
+				"\n" +
+				"class X <T extends Comparable & @NonNull Serializable> {\n" +
+				"  <T extends @NonNull Comparable> void one(T t) {}\n" +
+				"  <T extends Comparable & @NonNull Serializable> void two(T t) {}\n" +
+				"  <T extends @NonNull Comparable & @NonNull Serializable> void three(T t) {}\n" +
+				"  <T extends Object & @NonNull Serializable> void four(T t) {}\n" +
+				"  <T extends Object & @NonNull Serializable & @NonNull Runnable> void five(T t) {}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+				"// Signature: <T::Ljava/lang/Comparable;:Ljava/io/Serializable;>Ljava/lang/Object;\n" + 
+				"class X {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 utf8: \"<init>\"\n" + 
+				"    constant #6 utf8: \"()V\"\n" + 
+				"    constant #7 utf8: \"Code\"\n" + 
+				"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+				"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+				"    constant #10 utf8: \"LineNumberTable\"\n" + 
+				"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+				"    constant #12 utf8: \"this\"\n" + 
+				"    constant #13 utf8: \"LX;\"\n" + 
+				"    constant #14 utf8: \"LocalVariableTypeTable\"\n" + 
+				"    constant #15 utf8: \"LX<TT;>;\"\n" + 
+				"    constant #16 utf8: \"one\"\n" + 
+				"    constant #17 utf8: \"(Ljava/lang/Comparable;)V\"\n" + 
+				"    constant #18 utf8: \"Signature\"\n" + 
+				"    constant #19 utf8: \"<T::Ljava/lang/Comparable;>(TT;)V\"\n" + 
+				"    constant #20 utf8: \"t\"\n" + 
+				"    constant #21 utf8: \"Ljava/lang/Comparable;\"\n" + 
+				"    constant #22 utf8: \"TT;\"\n" + 
+				"    constant #23 utf8: \"RuntimeInvisibleTypeAnnotations\"\n" + 
+				"    constant #24 utf8: \"LNonNull;\"\n" + 
+				"    constant #25 utf8: \"two\"\n" + 
+				"    constant #26 utf8: \"<T::Ljava/lang/Comparable;:Ljava/io/Serializable;>(TT;)V\"\n" + 
+				"    constant #27 utf8: \"three\"\n" + 
+				"    constant #28 utf8: \"four\"\n" + 
+				"    constant #29 utf8: \"(Ljava/lang/Object;)V\"\n" + 
+				"    constant #30 utf8: \"<T:Ljava/lang/Object;:Ljava/io/Serializable;>(TT;)V\"\n" + 
+				"    constant #31 utf8: \"Ljava/lang/Object;\"\n" + 
+				"    constant #32 utf8: \"five\"\n" + 
+				"    constant #33 utf8: \"<T:Ljava/lang/Object;:Ljava/io/Serializable;:Ljava/lang/Runnable;>(TT;)V\"\n" + 
+				"    constant #34 utf8: \"SourceFile\"\n" + 
+				"    constant #35 utf8: \"X.java\"\n" + 
+				"    constant #36 utf8: \"<T::Ljava/lang/Comparable;:Ljava/io/Serializable;>Ljava/lang/Object;\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [8]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X<T>\n" + 
+				"  \n" + 
+				"  // Method descriptor #17 (Ljava/lang/Comparable;)V\n" + 
+				"  // Signature: <T::Ljava/lang/Comparable;>(TT;)V\n" + 
+				"  // Stack: 0, Locals: 2\n" + 
+				"  void one(java.lang.Comparable t);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: java.lang.Comparable\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X<T>\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: T\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+				"        type parameter index = 0 type parameter bound index = 1\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #17 (Ljava/lang/Comparable;)V\n" + 
+				"  // Signature: <T::Ljava/lang/Comparable;:Ljava/io/Serializable;>(TT;)V\n" + 
+				"  // Stack: 0, Locals: 2\n" + 
+				"  void two(java.lang.Comparable t);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 8]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: java.lang.Comparable\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X<T>\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: T\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+				"        type parameter index = 0 type parameter bound index = 2\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #17 (Ljava/lang/Comparable;)V\n" + 
+				"  // Signature: <T::Ljava/lang/Comparable;:Ljava/io/Serializable;>(TT;)V\n" + 
+				"  // Stack: 0, Locals: 2\n" + 
+				"  void three(java.lang.Comparable t);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 9]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: java.lang.Comparable\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X<T>\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: T\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+				"        type parameter index = 0 type parameter bound index = 1\n" + 
+				"      )\n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+				"        type parameter index = 0 type parameter bound index = 2\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #29 (Ljava/lang/Object;)V\n" + 
+				"  // Signature: <T:Ljava/lang/Object;:Ljava/io/Serializable;>(TT;)V\n" + 
+				"  // Stack: 0, Locals: 2\n" + 
+				"  void four(java.lang.Object t);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 10]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: java.lang.Object\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X<T>\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: T\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+				"        type parameter index = 0 type parameter bound index = 1\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #29 (Ljava/lang/Object;)V\n" + 
+				"  // Signature: <T:Ljava/lang/Object;:Ljava/io/Serializable;:Ljava/lang/Runnable;>(TT;)V\n" + 
+				"  // Stack: 0, Locals: 2\n" + 
+				"  void five(java.lang.Object t);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 11]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: java.lang.Object\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X<T>\n" + 
+				"        [pc: 0, pc: 1] local: t index: 1 type: T\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+				"        type parameter index = 0 type parameter bound index = 1\n" + 
+				"      )\n" + 
+				"      #24 @NonNull(\n" + 
+				"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+				"        type parameter index = 0 type parameter bound index = 2\n" + 
+				"      )\n" + 
+				"\n" + 
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #24 @NonNull(\n" + 
+				"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+				"      type parameter index = 0 type parameter bound index = 2\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test035() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface NonNull { }\n" +
+				"\n" +
+				"class X {\n" +
+				"	void foo() {\n" +
+				"		@NonNull X [] x = new X[10];\n" +
+				"		System.out.println(x);\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  void foo();\n" + 
+				"     0  bipush 10\n" + 
+				"     2  anewarray X [1]\n" + 
+				"     5  astore_1 [x]\n" + 
+				"     6  getstatic java.lang.System.out : java.io.PrintStream [15]\n" + 
+				"     9  aload_1 [x]\n" + 
+				"    10  invokevirtual java.io.PrintStream.println(java.lang.Object) : void [21]\n" + 
+				"    13  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"        [pc: 6, line: 8]\n" + 
+				"        [pc: 13, line: 9]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+				"        [pc: 6, pc: 14] local: x index: 1 type: X[]\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #30 @NonNull(\n" + 
+				"        target type = 0x40 LOCAL_VARIABLE\n" + 
+				"        local variable entries:\n" + 
+				"          [pc: 6, pc: 14] index: 1\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// test that parameter index does not include explicit this parameter.
+	public void test036() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target({TYPE_USE}) @interface NonNull { }\n" +
+				"class X  {\n" +
+				"	void foo(@NonNull X this, @NonNull X x) {\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  void foo(X x);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: x index: 1 type: X\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #18 @NonNull(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #18 @NonNull(\n" + 
+				"        target type = 0x15 METHOD_RECEIVER\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test037() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Readonly {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	X [] x = new @Readonly X @Readonly [10];\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  public X();\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  invokespecial java.lang.Object() [10]\n" + 
+				"     4  aload_0 [this]\n" + 
+				"     5  bipush 10\n" + 
+				"     7  anewarray X [1]\n" + 
+				"    10  putfield X.x : X[] [12]\n" + 
+				"    13  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"        [pc: 4, line: 8]\n" + 
+				"        [pc: 13, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #19 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 7\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n" + 
+				"      #19 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 7\n" + 
+				"      )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// test anonymous class, the class itself should have class_extends target ? 
+	public void test038() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Readonly {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	X x = new @Readonly X() {\n" +
+				"	};\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  public X();\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  invokespecial java.lang.Object() [10]\n" + 
+				"     4  aload_0 [this]\n" + 
+				"     5  new X$1 [12]\n" + 
+				"     8  dup\n" + 
+				"     9  aload_0 [this]\n" + 
+				"    10  invokespecial X$1(X) [14]\n" + 
+				"    13  putfield X.x : X [17]\n" + 
+				"    16  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"        [pc: 4, line: 8]\n" + 
+				"        [pc: 16, line: 7]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 17] local: this index: 0 type: X\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #23 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 5\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test039() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.List;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Readonly {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"public class X  { \n" +
+				"	void foo(List<@Readonly ?> l) {\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  void foo(java.util.List l);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 10]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: l index: 1 type: java.util.List\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 0, pc: 1] local: l index: 1 type: java.util.List<?>\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #23 @Readonly(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test040() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Readonly {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"class X {\n" +
+				"	class Y {}\n" +
+				"	void foo() {\n" +
+				"		@Readonly X x = new X();\n" +
+				"		x.new @Readonly Y();\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #27 @Readonly(\n" + 
+				"        target type = 0x44 NEW\n" + 
+				"        offset = 8\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #27 @Readonly(\n" + 
+				"        target type = 0x40 LOCAL_VARIABLE\n" + 
+				"        local variable entries:\n" + 
+				"          [pc: 8, pc: 21] index: 1\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test041() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface A {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface B {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface C {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"class X<T extends @A Object & @B Comparable, U extends @C Cloneable> {\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #21 @A(\n" + 
+				"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+				"      type parameter index = 0 type parameter bound index = 0\n" + 
+				"    )\n" + 
+				"    #22 @B(\n" + 
+				"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+				"      type parameter index = 0 type parameter bound index = 1\n" + 
+				"    )\n" + 
+				"    #23 @C(\n" + 
+				"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+				"      type parameter index = 1 type parameter bound index = 1\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// type path tests.
+	public void test042() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.Map;\n" +
+				"import java.util.List;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface A {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface B {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface C {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface D {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface E {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"class X {\n" +
+				"	@A Map <@B ? extends @C String, @D List<@E Object>> f;\n" +
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  java.util.Map f;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @A(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"      #11 @B(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #12 @C(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), WILDCARD]\n" + 
+				"      )\n" + 
+				"      #13 @D(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1)]\n" + 
+				"      )\n" + 
+				"      #14 @E(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"  \n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	// Bug 414384 - [1.8] type annotation on abbreviated inner class is not marked as inner type
+	public void test043() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"pkg/Clazz.java",
+				"package pkg;\n" +
+				"import java.lang.annotation.*;\n" +
+				"import static java.lang.annotation.ElementType.*;\n" +
+				"\n" +
+				"@Target({TYPE_USE}) @interface P { }\n" +
+				"@Target({TYPE_USE}) @interface O { }\n" +
+				"@Target({TYPE_USE}) @interface I { }\n" +
+				"\n" +
+				"public abstract class Clazz {\n" +
+				"  public class Inner {}\n" +
+				"  public abstract void n1(@I Inner i1);\n" +
+				"  public abstract void n2(@O Clazz.@I Inner i2);\n" +
+				"  public abstract void n3(pkg.@O Clazz.@I Inner i3);\n" +
+				"}\n",
+		},
+		"");
+		// javac b100 produces for the methods:
+		//		  public abstract void n1(pkg.Clazz$Inner);
+		//		    RuntimeInvisibleTypeAnnotations:
+		//		      0: #14(): METHOD_FORMAL_PARAMETER, param_index=0, location=[INNER_TYPE]
+		//
+		//		  public abstract void n2(pkg.Clazz$Inner);
+		//		    RuntimeInvisibleTypeAnnotations:
+		//		      0: #14(): METHOD_FORMAL_PARAMETER, param_index=0, location=[INNER_TYPE]
+		//		      1: #16(): METHOD_FORMAL_PARAMETER, param_index=0
+		//
+		//		  public abstract void n3(pkg.Clazz$Inner);
+		//		    RuntimeInvisibleTypeAnnotations:
+		//		      0: #14(): METHOD_FORMAL_PARAMETER, param_index=0, location=[INNER_TYPE]
+		//		      1: #16(): METHOD_FORMAL_PARAMETER, param_index=0
+		String expectedOutput =
+				"  // Method descriptor #15 (Lpkg/Clazz$Inner;)V\n" + 
+				"  public abstract void n1(pkg.Clazz.Inner arg0);\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #17 @pkg.I(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				
+				"  // Method descriptor #15 (Lpkg/Clazz$Inner;)V\n" + 
+				"  public abstract void n2(pkg.Clazz.Inner arg0);\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #19 @pkg.O(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #17 @pkg.I(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				
+				"  // Method descriptor #15 (Lpkg/Clazz$Inner;)V\n" + 
+				"  public abstract void n3(pkg.Clazz.Inner arg0);\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #19 @pkg.O(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #17 @pkg.I(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"\n" + 
+				"  Inner classes:\n" + 
+				"    [inner class info: #24 pkg/Clazz$Inner, outer class info: #1 pkg/Clazz\n" + 
+				"     inner name: #26 Inner, accessflags: 1 public]\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "pkg" + File.separator + "Clazz.class", "pkg.Clazz", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// More type path tests
+	public void test044() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface I {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface F {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface G {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface H {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"class X {\n" +
+				"	@I String @F [] @G [] @H [] f;\n" +
+				"}\n",
+		},
+		"");
+
+		String expectedOutput =
+				"  // Field descriptor #6 [[[Ljava/lang/String;\n" + 
+				"  java.lang.String[][][] f;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @I(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #9 @F(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"      #10 @G(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n" + 
+				"      #11 @H(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"  \n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "Z", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// More type path tests
+	public void test045() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface M {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface L {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface K {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface J {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"class O1 {\n" +
+				"	class O2 {\n" +
+				"		class O3 {\n" +
+				"			class Nested {}\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n" +
+				"class X {\n" +
+				"	@M O1.@L O2.@K O3.@J Nested f = null;\n" +
+				"}\n",
+		},
+		"");
+
+		String expectedOutput =
+				"  // Field descriptor #6 LO1$O2$O3$Nested;\n" + 
+				"  O1$O2$O3$Nested f;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @M(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"      #9 @L(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #10 @K(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE, INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #11 @J(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE, INNER_TYPE, INNER_TYPE]\n" + 
+				"      )\n" + 
+				"  \n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "Z", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// More type path tests
+	public void test046() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.Map;\n" +
+				"import java.util.List;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface A {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface B {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface C {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface D {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface E {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface F {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface G {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface H {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"class Document {}\n" +
+				"class X {\n" +
+				"	@A Map<@B Comparable<@F Object @C [] @D [] @E[]>, @G List<@H Document>> f;\n" +
+				"}\n",
+		},
+		"");
+
+		String expectedOutput =
+				"  java.util.Map f;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #10 @A(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"      #11 @B(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #12 @F(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #13 @C(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #14 @D(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY]\n" + 
+				"      )\n" + 
+				"      #15 @E(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), TYPE_ARGUMENT(0), ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #16 @G(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1)]\n" + 
+				"      )\n" + 
+				"      #17 @H(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"  \n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "Z", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// More type path tests
+	public void test047() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface A {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface B {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface C {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface D {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface E {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface F {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface G {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface H {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"class O1 {\n" +
+				"	class O2<S, T> {\n" +
+				"		class O3 {\n" +
+				"			class Nested<K, V> {\n" +
+				"			}\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n" +
+				"	class S {}\n" +
+				"	class T {}\n" +
+				"	class U {}\n" +
+				"	class V {}\n" +
+				"class X {\n" +
+				"	@H O1.@E O2<@F S, @G T>.@D O3.@A Nested<@B U, @C V> f;\n" +
+				"}\n",
+		},
+		"");
+
+		String expectedOutput =
+			"  // Field descriptor #6 LO1$O2$O3$Nested;\n" + 
+			"  // Signature: LO1$O2<LS;LT;>.O3.Nested<LU;LV;>;\n" + 
+			"  O1$O2$O3$Nested f;\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #10 @H(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n" + 
+			"      #11 @E(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [INNER_TYPE]\n" + 
+			"      )\n" + 
+			"      #12 @D(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [INNER_TYPE, INNER_TYPE]\n" + 
+			"      )\n" + 
+			"      #13 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [INNER_TYPE, INNER_TYPE, INNER_TYPE]\n" + 
+			"      )\n" + 
+			"      #14 @F(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+			"      )\n" + 
+			"      #15 @G(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [INNER_TYPE, TYPE_ARGUMENT(1)]\n" + 
+			"      )\n" + 
+			"      #16 @B(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [INNER_TYPE, INNER_TYPE, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+			"      )\n" + 
+			"      #17 @C(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [INNER_TYPE, INNER_TYPE, INNER_TYPE, TYPE_ARGUMENT(1)]\n" + 
+			"      )\n" + 
+			"  \n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "Z", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test048() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.List;\n" +
+				"import java.util.Map;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface Readonly {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface NonNull {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface NonEmpty {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface D {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface E {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface F {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface G {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface H {\n" +
+				"	String value() default \"default\";\n" +
+				"}\n" +
+				"\n" +
+				"abstract class X implements @Readonly Map<@NonNull String, @NonEmpty List<@NonNull @Readonly String>> {}\n",
+		},
+		"");
+
+		String expectedOutput =
+				"  RuntimeInvisibleTypeAnnotations: \n" + 
+				"    #21 @Readonly(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"    )\n" + 
+				"    #22 @NonNull(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0)]\n" + 
+				"    )\n" + 
+				"    #23 @NonEmpty(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(1)]\n" + 
+				"    )\n" + 
+				"    #22 @NonNull(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]\n" + 
+				"    )\n" + 
+				"    #21 @Readonly(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "Z", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test049() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface B { int value() default -1; }\n" +
+				"public class X {\n" +
+				"    class Y {\n" +
+				"    }\n" +
+				"    @B(1) X. @B(2) Y xy;\n" +
+				"    void foo(@B(3) X. @B(4) Y xy) {\n" +
+				"        @B(5) X. @B(6) Y local = null; \n" +
+				"    }\n" +
+				"}\n",
+		},
+		"");
+
+		String expectedOutput =
+				"  // Field descriptor #6 LX$Y;\n" + 
+				"  X$Y xy;\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @B(\n" + 
+				"        #9 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"      #8 @B(\n" + 
+				"        #9 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #13 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  public X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [15]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 5]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"  \n" + 
+				"  // Method descriptor #22 (LX$Y;)V\n" + 
+				"  // Stack: 1, Locals: 3\n" + 
+				"  void foo(X.Y xy);\n" + 
+				"    0  aconst_null\n" + 
+				"    1  astore_2 [local]\n" + 
+				"    2  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 10]\n" + 
+				"        [pc: 2, line: 11]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 3] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 3] local: xy index: 1 type: X.Y\n" + 
+				"        [pc: 2, pc: 3] local: local index: 2 type: X.Y\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @B(\n" + 
+				"        #9 value=(int) 5 (constant type)\n" + 
+				"        target type = 0x40 LOCAL_VARIABLE\n" + 
+				"        local variable entries:\n" + 
+				"          [pc: 2, pc: 3] index: 2\n" + 
+				"      )\n" + 
+				"      #8 @B(\n" + 
+				"        #9 value=(int) 6 (constant type)\n" + 
+				"        target type = 0x40 LOCAL_VARIABLE\n" + 
+				"        local variable entries:\n" + 
+				"          [pc: 2, pc: 3] index: 2\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @B(\n" + 
+				"        #9 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #8 @B(\n" + 
+				"        #9 value=(int) 4 (constant type)\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "Z", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
index e3004ba..5ca0df1 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestMixed.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -739,7 +743,7 @@
 				+ "----------\n");
 	}
 
-	public void test033() {
+	public void _test033() {
 		runNegativeTest(
 			new String[] {
 				"test/X.java",
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java
index f1c0480..5c667a6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -664,6 +664,8 @@
 				"----------\n" +
 				"4. ERROR in X.java (at line 7)\n" +
 				"	public class X<T, , V> {}\n" +
+//{ObjectTeams: different errors due to difference grammar:
+/* orig:
 				"	              ^^\n" +
 				"Syntax error on tokens, delete these tokens\n" +
 				"----------\n" +
@@ -671,6 +673,20 @@
 				"	public class X<T, , V> {}\n" +
 				"	               ^\n" +
 				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" +
+  :giro */
+				"	              ^^^^^^^^^^\n" + 
+				"Syntax error on tokens, delete these tokens\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 7)\n" + 
+				"	public class X<T, , V> {}\n" + 
+				"	               ^\n" + 
+				"Syntax error, insert \"Identifier\" to complete TypeParameter\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 7)\n" + 
+				"	public class X<T, , V> {}\n" + 
+				"	                       ^\n" + 
+				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" + 
+// SH}
 				"----------\n"
 		);
 	}
@@ -704,34 +720,39 @@
 				"----------\n" +
 				"4. ERROR in X.java (at line 7)\n" +
 				"	public class X<T, U, V extend Exception> {}\n" +
-//{ObjectTeams: changed position due to different grammar
+//{ObjectTeams: changed errors due to different grammar
 /* orig:
 				"	              ^^^^^^\n" +
-  :giro */				
-				"	              ^^^^^^^^\n" + 
-// SH}
 				"Syntax error on tokens, delete these tokens\n" +
 				"----------\n" +
 
 				"5. ERROR in X.java (at line 7)\n" +
 				"	public class X<T, U, V extend Exception> {}\n" +
-//{ObjectTeams: changed position due to different grammar
-/* orig:
-				"	                   ^\n" +
-  :giro */
-				"	                     ^\n" +
-// SH}
+			  	"	                   ^\n" +
 				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" +
 				"----------\n" +
 				"6. ERROR in X.java (at line 7)\n" +
 				"	public class X<T, U, V extend Exception> {}\n" +
-//{ObjectTeams: different interpretation (value param):
-/* orig:
 				"	                       ^^^^^^\n" +
 				"extend cannot be resolved to a type\n" +
-  :giro */
-				"	                     ^\n" +
-				"V cannot be resolved to a type\n" +
+  :giro */				
+				"	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Syntax error on tokens, delete these tokens\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 7)\n" + 
+				"	public class X<T, U, V extend Exception> {}\n" + 
+				"	                     ^\n" + 
+				"Syntax error, insert \"Identifier\" to complete TypeParameter\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 7)\n" + 
+				"	public class X<T, U, V extend Exception> {}\n" + 
+				"	                     ^\n" + 
+				"V cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 7)\n" + 
+				"	public class X<T, U, V extend Exception> {}\n" + 
+				"	                                         ^\n" + 
+				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" + 
 // SH}
 				"----------\n"
 		);
@@ -2169,194 +2190,13 @@
 	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=86769"
 	 */
 	public void testBug86769() {
-		this.reportMissingJavadocComments = CompilerOptions.ERROR;
-		runNegativeTest(
-			new String[] {
-				"E.java",
-				"public enum E {\n" +
-				"	A,\n" +
-				"	DC{\n" +
-				"		public void foo() {}\n" +
-				"	};\n" +
-				"	E() {}\n" +
-				"	public void foo() {}\n" +
-				"	private enum Epriv {\n" +
-				"		Apriv,\n" +
-				"		Cpriv {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Epriv() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"	enum Edef {\n" +
-				"		Adef,\n" +
-				"		Cdef {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Edef() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"	protected enum Epro {\n" +
-				"		Apro,\n" +
-				"		Cpro {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Epro() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"	public enum Epub {\n" +
-				"		Apub,\n" +
-				"		Cpub {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Epub() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"}\n"
-			},
-			"----------\n" +
-			"1. ERROR in E.java (at line 1)\n" +
-			"	public enum E {\n" +
-			"	       ^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"2. ERROR in E.java (at line 1)\n" +
-			"	public enum E {\n" +
-			"	              ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"3. ERROR in E.java (at line 5)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"4. ERROR in E.java (at line 5)\n" +
-			"	};\n" +
-			"	E() {}\n" +
-			"	public void foo() {}\n" +
-			"	private enum Epriv {\n" +
-			"		Apriv,\n" +
-			"		Cpriv {\n" +
-			"	 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
-			"Syntax error on token(s), misplaced construct(s)\n" +
-			"----------\n" +
-			"5. WARNING in E.java (at line 8)\n" +
-			"	private enum Epriv {\n" +
-			"	        ^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"6. ERROR in E.java (at line 8)\n" +
-			"	private enum Epriv {\n" +
-			"	             ^^^^^\n" +
-			"Syntax error on token \"Epriv\", = expected after this token\n" +
-			"----------\n" +
-			"7. ERROR in E.java (at line 12)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"8. WARNING in E.java (at line 16)\n" +
-			"	enum Edef {\n" +
-			"	^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"9. ERROR in E.java (at line 16)\n" +
-			"	enum Edef {\n" +
-			"	^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"10. ERROR in E.java (at line 16)\n" +
-			"	enum Edef {\n" +
-			"	          ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"11. ERROR in E.java (at line 20)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"12. WARNING in E.java (at line 24)\n" +
-			"	protected enum Epro {\n" +
-			"	          ^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"13. ERROR in E.java (at line 24)\n" +
-			"	protected enum Epro {\n" +
-			"	          ^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"14. ERROR in E.java (at line 24)\n" +
-			"	protected enum Epro {\n" +
-			"	                    ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"15. ERROR in E.java (at line 28)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"16. WARNING in E.java (at line 32)\n" +
-			"	public enum Epub {\n" +
-			"	       ^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"17. ERROR in E.java (at line 32)\n" +
-			"	public enum Epub {\n" +
-			"	       ^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"18. ERROR in E.java (at line 32)\n" +
-			"	public enum Epub {\n" +
-			"	                 ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"19. ERROR in E.java (at line 36)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"20. ERROR in E.java (at line 40)\n" +
-			"	}\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n"
-		);
+		
+		/* Deleted a completely meaningless test that could only serve as a torture test for the parser.
+		   The test is still run in 1.5+ modes where it makes sense to run it - The test here was a nuisance
+		   failing every time there is some serious grammar change that alters the semi-random behavior in
+		   Diagnose Parser. 
+		 */
+		return;
 	}
 
 	/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java
index f656e05..8d8eec6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -665,12 +665,25 @@
 				"----------\n" +
 				"4. ERROR in X.java (at line 7)\n" +
 				"	public class X<T, , V> {}\n" +
-				"	              ^^\n" +
+//{ObjectTeams: different position due to different grammar:
+/* orig:
+			  	"	              ^^\n" +
+ 
+  :giro */
+				"	              ^^^^^^^^^^\n" +
+// SH}
 				"Syntax error on tokens, delete these tokens\n" +
 				"----------\n" +
 				"5. ERROR in X.java (at line 7)\n" +
 				"	public class X<T, , V> {}\n" +
 				"	               ^\n" +
+//{ObjectTeams: one more message:
+				"Syntax error, insert \"Identifier\" to complete TypeParameter\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 7)\n" + 
+				"	public class X<T, , V> {}\n" + 
+				"	                       ^\n" + 
+// SH}
 				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" +
 				"----------\n"
 		);
@@ -709,7 +722,7 @@
 /* orig:
 				"	              ^^^^^^\n" +
   :giro */				
-				"	              ^^^^^^^^\n" + 
+				"	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
 // SH}
 				"Syntax error on tokens, delete these tokens\n" +
 				"----------\n" +
@@ -718,10 +731,11 @@
 //{ObjectTeams: changed position due to different grammar
 /* orig:
 				"	                   ^\n" +
+				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" +
   :giro */
 				"	                     ^\n" +
+				"Syntax error, insert \"Identifier\" to complete TypeParameter\n" +
 // SH}
-				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" +
 				"----------\n" +
 				"6. ERROR in X.java (at line 7)\n" +
 				"	public class X<T, U, V extend Exception> {}\n" +
@@ -734,6 +748,13 @@
 				"V cannot be resolved to a type\n" +
 // SH}
 				"----------\n"
+//{ObjectTeams: one more message:
+				+"7. ERROR in X.java (at line 7)\n" + 
+				"	public class X<T, U, V extend Exception> {}\n" + 
+				"	                                         ^\n" + 
+				"Syntax error, insert \"ClassBody\" to complete CompilationUnit\n" + 
+				"----------\n"
+// SH}
 		);
 	}
 
@@ -2203,194 +2224,13 @@
 	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=86769"
 	 */
 	public void testBug86769() {
-		this.reportMissingJavadocComments = CompilerOptions.ERROR;
-		runNegativeTest(
-			new String[] {
-				"E.java",
-				"public enum E {\n" +
-				"	A,\n" +
-				"	DC{\n" +
-				"		public void foo() {}\n" +
-				"	};\n" +
-				"	E() {}\n" +
-				"	public void foo() {}\n" +
-				"	private enum Epriv {\n" +
-				"		Apriv,\n" +
-				"		Cpriv {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Epriv() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"	enum Edef {\n" +
-				"		Adef,\n" +
-				"		Cdef {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Edef() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"	protected enum Epro {\n" +
-				"		Apro,\n" +
-				"		Cpro {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Epro() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"	public enum Epub {\n" +
-				"		Apub,\n" +
-				"		Cpub {\n" +
-				"			public void foo() {}\n" +
-				"		};\n" +
-				"		Epub() {}\n" +
-				"		public void foo() {}\n" +
-				"	}\n" +
-				"}\n"
-			},
-			"----------\n" +
-			"1. ERROR in E.java (at line 1)\n" +
-			"	public enum E {\n" +
-			"	       ^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"2. ERROR in E.java (at line 1)\n" +
-			"	public enum E {\n" +
-			"	              ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"3. ERROR in E.java (at line 5)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"4. ERROR in E.java (at line 5)\n" +
-			"	};\n" +
-			"	E() {}\n" +
-			"	public void foo() {}\n" +
-			"	private enum Epriv {\n" +
-			"		Apriv,\n" +
-			"		Cpriv {\n" +
-			"	 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
-			"Syntax error on token(s), misplaced construct(s)\n" +
-			"----------\n" +
-			"5. WARNING in E.java (at line 8)\n" +
-			"	private enum Epriv {\n" +
-			"	        ^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"6. ERROR in E.java (at line 8)\n" +
-			"	private enum Epriv {\n" +
-			"	             ^^^^^\n" +
-			"Syntax error on token \"Epriv\", = expected after this token\n" +
-			"----------\n" +
-			"7. ERROR in E.java (at line 12)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"8. WARNING in E.java (at line 16)\n" +
-			"	enum Edef {\n" +
-			"	^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"9. ERROR in E.java (at line 16)\n" +
-			"	enum Edef {\n" +
-			"	^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"10. ERROR in E.java (at line 16)\n" +
-			"	enum Edef {\n" +
-			"	          ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"11. ERROR in E.java (at line 20)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"12. WARNING in E.java (at line 24)\n" +
-			"	protected enum Epro {\n" +
-			"	          ^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"13. ERROR in E.java (at line 24)\n" +
-			"	protected enum Epro {\n" +
-			"	          ^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"14. ERROR in E.java (at line 24)\n" +
-			"	protected enum Epro {\n" +
-			"	                    ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"15. ERROR in E.java (at line 28)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"16. WARNING in E.java (at line 32)\n" +
-			"	public enum Epub {\n" +
-			"	       ^^^^\n" +
-			"\'enum\' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on\n" +
-			"----------\n" +
-			"17. ERROR in E.java (at line 32)\n" +
-			"	public enum Epub {\n" +
-			"	       ^^^^\n" +
-//{ObjectTeams: our grammar prefers class, so expect "class E implements ..."
-/* orig:
-			"Syntax error on token \"enum\", interface expected\n" +
-  :giro */
-			"Syntax error on token \"enum\", class expected\n" +
-// orig:
-			"----------\n" +
-			"18. ERROR in E.java (at line 32)\n" +
-			"	public enum Epub {\n" +
-			"	                 ^\n" +
-/*
-			"Syntax error on token \"{\", extends expected\n" +
-  :giro */ 
-			"Syntax error on token \"{\", implements expected\n" +
-// SH}
-			"----------\n" +
-			"19. ERROR in E.java (at line 36)\n" +
-			"	};\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n" +
-			"20. ERROR in E.java (at line 40)\n" +
-			"	}\n" +
-			"	^\n" +
-			"Syntax error on token \"}\", delete this token\n" +
-			"----------\n"
-		);
+		
+		/* Deleted a completely meaningless test that could only serve as a torture test for the parser.
+		   The test is still run in 1.5+ modes where it makes sense to run it - The test here was a nuisance
+		   failing every time there is some serious grammar change that alters the semi-random behavior in
+		   Diagnose Parser. 
+		 */
+		return;
 	}
 
 	/**
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Jsr335ClassFileTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Jsr335ClassFileTest.java
new file mode 100644
index 0000000..8aaf084
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Jsr335ClassFileTest.java
@@ -0,0 +1,2452 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper Steen Moller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Jesper Steen Moller - initial API and implementation
+ *            Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.File;
+import java.io.IOException;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.ToolFactory;
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+import org.eclipse.jdt.core.util.ClassFormatException;
+
+public class Jsr335ClassFileTest extends AbstractComparableTest {
+
+public Jsr335ClassFileTest(String name) {
+	super(name);
+}
+
+/*
+ * Toggle compiler in mode -1.8
+ */
+// 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[] { "test055" };
+//	TESTS_NUMBERS = new int[] { 50, 51, 52, 53 };
+//	TESTS_RANGE = new int[] { 34, 38 };
+}
+public static Test suite() {
+	return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+}
+private void verifyClassFile(String expectedOutput, String classFileName, int mode) throws IOException,
+	ClassFormatException {
+	File f = new File(OUTPUT_DIR + File.separator + classFileName);
+	byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f);
+	ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+	String result = disassembler.disassemble(classFileBytes, "\n", mode);
+	int index = result.indexOf(expectedOutput);
+	if (index == -1 || expectedOutput.length() == 0) {
+	System.out.println(Util.displayString(result, 3));
+	System.out.println("...");
+	}
+	if (index == -1) {
+	assertEquals("Wrong contents", expectedOutput, result);
+	}
+}
+public void test001() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        new X().referenceExpression.run();\n" +
+			"        System.out.println(\"SUCCESS\");\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public Runnable referenceExpression = Thread::yield;\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+		"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+		"public class X {\n" + 
+		"  Constant pool:\n" + 
+		"    constant #1 class: #2 X\n" + 
+		"    constant #2 utf8: \"X\"\n" + 
+		"    constant #3 class: #4 java/lang/Object\n" + 
+		"    constant #4 utf8: \"java/lang/Object\"\n" + 
+		"    constant #5 utf8: \"referenceExpression\"\n" + 
+		"    constant #6 utf8: \"Ljava/lang/Runnable;\"\n" + 
+		"    constant #7 utf8: \"<init>\"\n" + 
+		"    constant #8 utf8: \"()V\"\n" + 
+		"    constant #9 utf8: \"Code\"\n" + 
+		"    constant #10 method_ref: #3.#11 java/lang/Object.<init> ()V\n" + 
+		"    constant #11 name_and_type: #7.#8 <init> ()V\n" + 
+		"    constant #12 name_and_type: #13.#14 run ()Ljava/lang/Runnable;\n" + 
+		"    constant #13 utf8: \"run\"\n" + 
+		"    constant #14 utf8: \"()Ljava/lang/Runnable;\"\n" + 
+		"    constant #15 invoke dynamic: #0 #12 run ()Ljava/lang/Runnable;\n" + 
+		"    constant #16 field_ref: #1.#17 X.referenceExpression Ljava/lang/Runnable;\n" + 
+		"    constant #17 name_and_type: #5.#6 referenceExpression Ljava/lang/Runnable;\n" + 
+		"    constant #18 utf8: \"LineNumberTable\"\n" + 
+		"    constant #19 utf8: \"LocalVariableTable\"\n" + 
+		"    constant #20 utf8: \"this\"\n" + 
+		"    constant #21 utf8: \"LX;\"\n" + 
+		"    constant #22 utf8: \"SourceFile\"\n" + 
+		"    constant #23 utf8: \"X.java\"\n" + 
+		"    constant #24 method_ref: #25.#27 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+		"    constant #25 class: #26 java/lang/invoke/LambdaMetafactory\n" + 
+		"    constant #26 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+		"    constant #27 name_and_type: #28.#29 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+		"    constant #28 utf8: \"metafactory\"\n" + 
+		"    constant #29 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+		"    constant #30 method handle: invokestatic (6) #24 \n" + 
+		"    constant #31 utf8: \"BootstrapMethods\"\n" + 
+		"    constant #32 method type: #8 ()V\n" + 
+		"    constant #33 method_ref: #34.#36 java/lang/Thread.yield ()V\n" + 
+		"    constant #34 class: #35 java/lang/Thread\n" + 
+		"    constant #35 utf8: \"java/lang/Thread\"\n" + 
+		"    constant #36 name_and_type: #37.#8 yield ()V\n" + 
+		"    constant #37 utf8: \"yield\"\n" + 
+		"    constant #38 method handle: invokestatic (6) #33 \n" + 
+		"    constant #39 method type: #8 ()V\n" + 
+		"    constant #40 utf8: \"InnerClasses\"\n" + 
+		"    constant #41 class: #42 java/lang/invoke/MethodHandles$Lookup\n" + 
+		"    constant #42 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+		"    constant #43 class: #44 java/lang/invoke/MethodHandles\n" + 
+		"    constant #44 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+		"    constant #45 utf8: \"Lookup\"\n" + 
+		"  \n" + 
+		"  // Field descriptor #6 Ljava/lang/Runnable;\n" + 
+		"  public java.lang.Runnable referenceExpression;\n" + 
+		"  \n" + 
+		"  // Method descriptor #8 ()V\n" + 
+		"  // Stack: 2, Locals: 1\n" + 
+		"  public X();\n" + 
+		"     0  aload_0 [this]\n" + 
+		"     1  invokespecial java.lang.Object() [10]\n" + 
+		"     4  aload_0 [this]\n" + 
+		"     5  invokedynamic 0 run() : java.lang.Runnable [15]\n" + 
+		"    10  putfield X.referenceExpression : java.lang.Runnable [16]\n" + 
+		"    13  return\n" + 
+		"      Line numbers:\n" + 
+		"        [pc: 0, line: 1]\n" + 
+		"        [pc: 4, line: 2]\n" + 
+		"        [pc: 13, line: 1]\n" + 
+		"      Local variable table:\n" + 
+		"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+		"\n" + 
+		"  Inner classes:\n" + 
+		"    [inner class info: #41 java/lang/invoke/MethodHandles$Lookup, outer class info: #43 java/lang/invoke/MethodHandles\n" + 
+		"     inner name: #45 Lookup, accessflags: 25 public static final]\n" + 
+		"Bootstrap methods:\n" + 
+		"  0 : # 30 arguments: {#32,#38,#39}\n" + 
+		"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test002() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        new X().referenceExpression.consume(\"SUCCESS\");\n" +
+			"    }\n" +
+			"    public static void printIt(Object o) {\n" +
+			"        System.out.println(o.toString());\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public ObjectConsumer referenceExpression = Main::printIt;\n" +
+			"}\n",
+			"ObjectConsumer.java",
+			"public interface ObjectConsumer {\n" +
+			"    void consume(Object obj);\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"referenceExpression\"\n" + 
+			"    constant #6 utf8: \"LObjectConsumer;\"\n" + 
+			"    constant #7 utf8: \"<init>\"\n" + 
+			"    constant #8 utf8: \"()V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 method_ref: #3.#11 java/lang/Object.<init> ()V\n" + 
+			"    constant #11 name_and_type: #7.#8 <init> ()V\n" + 
+			"    constant #12 name_and_type: #13.#14 consume ()LObjectConsumer;\n" + 
+			"    constant #13 utf8: \"consume\"\n" + 
+			"    constant #14 utf8: \"()LObjectConsumer;\"\n" + 
+			"    constant #15 invoke dynamic: #0 #12 consume ()LObjectConsumer;\n" + 
+			"    constant #16 field_ref: #1.#17 X.referenceExpression LObjectConsumer;\n" + 
+			"    constant #17 name_and_type: #5.#6 referenceExpression LObjectConsumer;\n" + 
+			"    constant #18 utf8: \"LineNumberTable\"\n" + 
+			"    constant #19 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #20 utf8: \"this\"\n" + 
+			"    constant #21 utf8: \"LX;\"\n" + 
+			"    constant #22 utf8: \"SourceFile\"\n" + 
+			"    constant #23 utf8: \"X.java\"\n" + 
+			"    constant #24 method_ref: #25.#27 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #25 class: #26 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #26 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #27 name_and_type: #28.#29 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #28 utf8: \"metafactory\"\n" + 
+			"    constant #29 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #30 method handle: invokestatic (6) #24 \n" + 
+			"    constant #31 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #32 utf8: \"(Ljava/lang/Object;)V\"\n" + 
+			"    constant #33 method type: #32 (Ljava/lang/Object;)V\n" + 
+			"    constant #34 method_ref: #35.#37 Main.printIt (Ljava/lang/Object;)V\n" + 
+			"    constant #35 class: #36 Main\n" + 
+			"    constant #36 utf8: \"Main\"\n" + 
+			"    constant #37 name_and_type: #38.#32 printIt (Ljava/lang/Object;)V\n" + 
+			"    constant #38 utf8: \"printIt\"\n" + 
+			"    constant #39 method handle: invokestatic (6) #34 \n" + 
+			"    constant #40 method type: #32 (Ljava/lang/Object;)V\n" + 
+			"    constant #41 utf8: \"InnerClasses\"\n" + 
+			"    constant #42 class: #43 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #43 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #44 class: #45 java/lang/invoke/MethodHandles\n" + 
+			"    constant #45 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #46 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LObjectConsumer;\n" + 
+			"  public ObjectConsumer referenceExpression;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [10]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  invokedynamic 0 consume() : ObjectConsumer [15]\n" + 
+			"    10  putfield X.referenceExpression : ObjectConsumer [16]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 2]\n" + 
+			"        [pc: 13, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #42 java/lang/invoke/MethodHandles$Lookup, outer class info: #44 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #46 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 30 arguments: {#33,#39,#40}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test003() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        System.out.println(new X().referenceExpression.makeString(new Main()));\n" +
+			"    }\n" +
+			"    @Override\n" +
+			"    public String toString() {\n" +
+			"        return \"SUCCESS\";\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public ObjectToString referenceExpression = Object::toString;\n" +
+			"}\n",
+			"ObjectToString.java",
+			"public interface ObjectToString {\n" +
+			"    String makeString(Object obj);\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"referenceExpression\"\n" + 
+			"    constant #6 utf8: \"LObjectToString;\"\n" + 
+			"    constant #7 utf8: \"<init>\"\n" + 
+			"    constant #8 utf8: \"()V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 method_ref: #3.#11 java/lang/Object.<init> ()V\n" + 
+			"    constant #11 name_and_type: #7.#8 <init> ()V\n" + 
+			"    constant #12 name_and_type: #13.#14 makeString ()LObjectToString;\n" + 
+			"    constant #13 utf8: \"makeString\"\n" + 
+			"    constant #14 utf8: \"()LObjectToString;\"\n" + 
+			"    constant #15 invoke dynamic: #0 #12 makeString ()LObjectToString;\n" + 
+			"    constant #16 field_ref: #1.#17 X.referenceExpression LObjectToString;\n" + 
+			"    constant #17 name_and_type: #5.#6 referenceExpression LObjectToString;\n" + 
+			"    constant #18 utf8: \"LineNumberTable\"\n" + 
+			"    constant #19 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #20 utf8: \"this\"\n" + 
+			"    constant #21 utf8: \"LX;\"\n" + 
+			"    constant #22 utf8: \"SourceFile\"\n" + 
+			"    constant #23 utf8: \"X.java\"\n" + 
+			"    constant #24 method_ref: #25.#27 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #25 class: #26 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #26 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #27 name_and_type: #28.#29 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #28 utf8: \"metafactory\"\n" + 
+			"    constant #29 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #30 method handle: invokestatic (6) #24 \n" + 
+			"    constant #31 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #32 utf8: \"(Ljava/lang/Object;)Ljava/lang/String;\"\n" + 
+			"    constant #33 method type: #32 (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #34 method_ref: #3.#35 java/lang/Object.toString ()Ljava/lang/String;\n" + 
+			"    constant #35 name_and_type: #36.#37 toString ()Ljava/lang/String;\n" + 
+			"    constant #36 utf8: \"toString\"\n" + 
+			"    constant #37 utf8: \"()Ljava/lang/String;\"\n" + 
+			"    constant #38 method handle: invokevirtual (5) #34 \n" + 
+			"    constant #39 method type: #32 (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #40 utf8: \"InnerClasses\"\n" + 
+			"    constant #41 class: #42 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #42 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #43 class: #44 java/lang/invoke/MethodHandles\n" + 
+			"    constant #44 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #45 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LObjectToString;\n" + 
+			"  public ObjectToString referenceExpression;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [10]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  invokedynamic 0 makeString() : ObjectToString [15]\n" + 
+			"    10  putfield X.referenceExpression : ObjectToString [16]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 2]\n" + 
+			"        [pc: 13, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #41 java/lang/invoke/MethodHandles$Lookup, outer class info: #43 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #45 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 30 arguments: {#33,#38,#39}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test004() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        System.out.println(new X().referenceExpression.produce());\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    String s = \"SUCCESS\";\n"+
+			"    public StringProducer referenceExpression = s::toString;\n" +
+			"}\n",
+			"StringProducer.java",
+			"public interface StringProducer {\n" +
+			"    String produce();\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"s\"\n" + 
+			"    constant #6 utf8: \"Ljava/lang/String;\"\n" + 
+			"    constant #7 utf8: \"referenceExpression\"\n" + 
+			"    constant #8 utf8: \"LStringProducer;\"\n" + 
+			"    constant #9 utf8: \"<init>\"\n" + 
+			"    constant #10 utf8: \"()V\"\n" + 
+			"    constant #11 utf8: \"Code\"\n" + 
+			"    constant #12 method_ref: #3.#13 java/lang/Object.<init> ()V\n" + 
+			"    constant #13 name_and_type: #9.#10 <init> ()V\n" + 
+			"    constant #14 string: #15 \"SUCCESS\"\n" + 
+			"    constant #15 utf8: \"SUCCESS\"\n" + 
+			"    constant #16 field_ref: #1.#17 X.s Ljava/lang/String;\n" + 
+			"    constant #17 name_and_type: #5.#6 s Ljava/lang/String;\n" + 
+			"    constant #18 name_and_type: #19.#20 produce (Ljava/lang/String;)LStringProducer;\n" + 
+			"    constant #19 utf8: \"produce\"\n" + 
+			"    constant #20 utf8: \"(Ljava/lang/String;)LStringProducer;\"\n" + 
+			"    constant #21 invoke dynamic: #0 #18 produce (Ljava/lang/String;)LStringProducer;\n" + 
+			"    constant #22 field_ref: #1.#23 X.referenceExpression LStringProducer;\n" + 
+			"    constant #23 name_and_type: #7.#8 referenceExpression LStringProducer;\n" + 
+			"    constant #24 utf8: \"LineNumberTable\"\n" + 
+			"    constant #25 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #26 utf8: \"this\"\n" + 
+			"    constant #27 utf8: \"LX;\"\n" + 
+			"    constant #28 utf8: \"SourceFile\"\n" + 
+			"    constant #29 utf8: \"X.java\"\n" + 
+			"    constant #30 method_ref: #31.#33 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #31 class: #32 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #32 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #33 name_and_type: #34.#35 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #34 utf8: \"metafactory\"\n" + 
+			"    constant #35 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #36 method handle: invokestatic (6) #30 \n" + 
+			"    constant #37 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #38 utf8: \"()Ljava/lang/String;\"\n" + 
+			"    constant #39 method type: #38 ()Ljava/lang/String;\n" + 
+			"    constant #40 method_ref: #41.#43 java/lang/String.toString ()Ljava/lang/String;\n" + 
+			"    constant #41 class: #42 java/lang/String\n" + 
+			"    constant #42 utf8: \"java/lang/String\"\n" + 
+			"    constant #43 name_and_type: #44.#38 toString ()Ljava/lang/String;\n" + 
+			"    constant #44 utf8: \"toString\"\n" + 
+			"    constant #45 method handle: invokevirtual (5) #40 \n" + 
+			"    constant #46 method type: #38 ()Ljava/lang/String;\n" + 
+			"    constant #47 utf8: \"InnerClasses\"\n" + 
+			"    constant #48 class: #49 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #49 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #50 class: #51 java/lang/invoke/MethodHandles\n" + 
+			"    constant #51 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #52 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 Ljava/lang/String;\n" + 
+			"  java.lang.String s;\n" + 
+			"  \n" + 
+			"  // Field descriptor #8 LStringProducer;\n" + 
+			"  public StringProducer referenceExpression;\n" + 
+			"  \n" + 
+			"  // Method descriptor #10 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [12]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  ldc <String \"SUCCESS\"> [14]\n" + 
+			"     7  putfield X.s : java.lang.String [16]\n" + 
+			"    10  aload_0 [this]\n" + 
+			"    11  aload_0 [this]\n" + 
+			"    12  getfield X.s : java.lang.String [16]\n" + 
+			"    15  invokedynamic 0 produce(java.lang.String) : StringProducer [21]\n" + 
+			"    20  putfield X.referenceExpression : StringProducer [22]\n" + 
+			"    23  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 2]\n" + 
+			"        [pc: 10, line: 3]\n" + 
+			"        [pc: 23, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 24] local: this index: 0 type: X\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #48 java/lang/invoke/MethodHandles$Lookup, outer class info: #50 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #52 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 36 arguments: {#39,#45,#46}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test005() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        System.out.println(X.allocatorExpression.produce());\n" +
+			"    }\n" +
+			"    @Override\n" +
+			"    public String toString() {\n" +
+			"        return \"SUCCESS\";" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public static MainProducer allocatorExpression = Main::new;\n" +
+			"}\n",
+			"MainProducer.java",
+			"public interface MainProducer {\n" +
+			"    Main produce();\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+	verifyClassFile(			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"allocatorExpression\"\n" + 
+			"    constant #6 utf8: \"LMainProducer;\"\n" + 
+			"    constant #7 utf8: \"<clinit>\"\n" + 
+			"    constant #8 utf8: \"()V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 name_and_type: #11.#12 produce ()LMainProducer;\n" + 
+			"    constant #11 utf8: \"produce\"\n" + 
+			"    constant #12 utf8: \"()LMainProducer;\"\n" + 
+			"    constant #13 invoke dynamic: #0 #10 produce ()LMainProducer;\n" + 
+			"    constant #14 field_ref: #1.#15 X.allocatorExpression LMainProducer;\n" + 
+			"    constant #15 name_and_type: #5.#6 allocatorExpression LMainProducer;\n" + 
+			"    constant #16 utf8: \"LineNumberTable\"\n" + 
+			"    constant #17 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #18 utf8: \"<init>\"\n" + 
+			"    constant #19 method_ref: #3.#20 java/lang/Object.<init> ()V\n" + 
+			"    constant #20 name_and_type: #18.#8 <init> ()V\n" + 
+			"    constant #21 utf8: \"this\"\n" + 
+			"    constant #22 utf8: \"LX;\"\n" + 
+			"    constant #23 utf8: \"SourceFile\"\n" + 
+			"    constant #24 utf8: \"X.java\"\n" + 
+			"    constant #25 method_ref: #26.#28 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #26 class: #27 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #27 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #28 name_and_type: #29.#30 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #29 utf8: \"metafactory\"\n" + 
+			"    constant #30 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #31 method handle: invokestatic (6) #25 \n" + 
+			"    constant #32 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #33 utf8: \"()LMain;\"\n" + 
+			"    constant #34 method type: #33 ()LMain;\n" + 
+			"    constant #35 method_ref: #36.#20 Main.<init> ()V\n" + 
+			"    constant #36 class: #37 Main\n" + 
+			"    constant #37 utf8: \"Main\"\n" + 
+			"    constant #38 method handle: newinvokespecial (8) #35 \n" + 
+			"    constant #39 method type: #33 ()LMain;\n" + 
+			"    constant #40 utf8: \"InnerClasses\"\n" + 
+			"    constant #41 class: #42 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #42 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #43 class: #44 java/lang/invoke/MethodHandles\n" + 
+			"    constant #44 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #45 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LMainProducer;\n" + 
+			"  public static MainProducer allocatorExpression;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 1, Locals: 0\n" + 
+			"  static {};\n" + 
+			"    0  invokedynamic 0 produce() : MainProducer [13]\n" + 
+			"    5  putstatic X.allocatorExpression : MainProducer [14]\n" + 
+			"    8  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 2]\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public X();\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  invokespecial java.lang.Object() [19]\n" + 
+			"    4  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #41 java/lang/invoke/MethodHandles$Lookup, outer class info: #43 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #45 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 31 arguments: {#34,#38,#39}\n" + 
+			"}", "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test006() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    String s1, s2;\n" +
+			"    public Main(String val1, String val2) {" +
+			"        s1 = val1;\n" +
+			"        s2 = val2;\n" +
+			"    }\n" +
+			"    public static void main(String[] args) {\n" +
+			"        Main m = X.producer.apply(\"SUCC\", \"ESS\");\n" +
+			"        System.out.println(m);\n" +
+			"    }\n" +
+			"    public String toString() {\n" +
+			"        return s1 + s2;" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"        public static Function2<Main, String, String> producer = Main::new;\n" +
+			"}\n",
+			"Function2.java",
+			"public interface Function2<R, T1, T2> {\n" +
+			"    R apply(T1 a1, T2 a2);\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+	String expected =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"producer\"\n" + 
+			"    constant #6 utf8: \"LFunction2;\"\n" + 
+			"    constant #7 utf8: \"Signature\"\n" + 
+			"    constant #8 utf8: \"LFunction2<LMain;Ljava/lang/String;Ljava/lang/String;>;\"\n" + 
+			"    constant #9 utf8: \"<clinit>\"\n" + 
+			"    constant #10 utf8: \"()V\"\n" + 
+			"    constant #11 utf8: \"Code\"\n" + 
+			"    constant #12 name_and_type: #13.#14 apply ()LFunction2;\n" + 
+			"    constant #13 utf8: \"apply\"\n" + 
+			"    constant #14 utf8: \"()LFunction2;\"\n" + 
+			"    constant #15 invoke dynamic: #0 #12 apply ()LFunction2;\n" + 
+			"    constant #16 field_ref: #1.#17 X.producer LFunction2;\n" + 
+			"    constant #17 name_and_type: #5.#6 producer LFunction2;\n" + 
+			"    constant #18 utf8: \"LineNumberTable\"\n" + 
+			"    constant #19 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #20 utf8: \"<init>\"\n" + 
+			"    constant #21 method_ref: #3.#22 java/lang/Object.<init> ()V\n" + 
+			"    constant #22 name_and_type: #20.#10 <init> ()V\n" + 
+			"    constant #23 utf8: \"this\"\n" + 
+			"    constant #24 utf8: \"LX;\"\n" + 
+			"    constant #25 utf8: \"SourceFile\"\n" + 
+			"    constant #26 utf8: \"X.java\"\n" + 
+			"    constant #27 method_ref: #28.#30 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #28 class: #29 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #29 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #30 name_and_type: #31.#32 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #31 utf8: \"metafactory\"\n" + 
+			"    constant #32 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #33 method handle: invokestatic (6) #27 \n" + 
+			"    constant #34 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #35 utf8: \"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\"\n" + 
+			"    constant #36 method type: #35 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\n" + 
+			"    constant #37 method_ref: #38.#40 Main.<init> (Ljava/lang/String;Ljava/lang/String;)V\n" + 
+			"    constant #38 class: #39 Main\n" + 
+			"    constant #39 utf8: \"Main\"\n" + 
+			"    constant #40 name_and_type: #20.#41 <init> (Ljava/lang/String;Ljava/lang/String;)V\n" + 
+			"    constant #41 utf8: \"(Ljava/lang/String;Ljava/lang/String;)V\"\n" + 
+			"    constant #42 method handle: newinvokespecial (8) #37 \n" + 
+			"    constant #43 utf8: \"(Ljava/lang/String;Ljava/lang/String;)LMain;\"\n" + 
+			"    constant #44 method type: #43 (Ljava/lang/String;Ljava/lang/String;)LMain;\n" + 
+			"    constant #45 utf8: \"InnerClasses\"\n" + 
+			"    constant #46 class: #47 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #47 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #48 class: #49 java/lang/invoke/MethodHandles\n" + 
+			"    constant #49 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #50 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LFunction2;\n" + 
+			"  // Signature: LFunction2<LMain;Ljava/lang/String;Ljava/lang/String;>;\n" + 
+			"  public static Function2 producer;\n" + 
+			"  \n" + 
+			"  // Method descriptor #10 ()V\n" + 
+			"  // Stack: 1, Locals: 0\n" + 
+			"  static {};\n" + 
+			"    0  invokedynamic 0 apply() : Function2 [15]\n" + 
+			"    5  putstatic X.producer : Function2 [16]\n" + 
+			"    8  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 2]\n" + 
+			"  \n" + 
+			"  // Method descriptor #10 ()V\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public X();\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  invokespecial java.lang.Object() [21]\n" + 
+			"    4  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #46 java/lang/invoke/MethodHandles$Lookup, outer class info: #48 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #50 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 33 arguments: {#36,#42,#44}\n" + 
+			"}";
+	verifyClassFile(expected, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test007() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        new X().referenceExpression.run();\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public Runnable referenceExpression = () -> {" +
+			"        System.out.println(\"SUCCESS\");\n" +
+			"    };\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"referenceExpression\"\n" + 
+			"    constant #6 utf8: \"Ljava/lang/Runnable;\"\n" + 
+			"    constant #7 utf8: \"<init>\"\n" + 
+			"    constant #8 utf8: \"()V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 method_ref: #3.#11 java/lang/Object.<init> ()V\n" + 
+			"    constant #11 name_and_type: #7.#8 <init> ()V\n" + 
+			"    constant #12 name_and_type: #13.#14 run ()Ljava/lang/Runnable;\n" + 
+			"    constant #13 utf8: \"run\"\n" + 
+			"    constant #14 utf8: \"()Ljava/lang/Runnable;\"\n" + 
+			"    constant #15 invoke dynamic: #0 #12 run ()Ljava/lang/Runnable;\n" + 
+			"    constant #16 field_ref: #1.#17 X.referenceExpression Ljava/lang/Runnable;\n" + 
+			"    constant #17 name_and_type: #5.#6 referenceExpression Ljava/lang/Runnable;\n" + 
+			"    constant #18 utf8: \"LineNumberTable\"\n" + 
+			"    constant #19 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #20 utf8: \"this\"\n" + 
+			"    constant #21 utf8: \"LX;\"\n" + 
+			"    constant #22 utf8: \"lambda$0\"\n" + 
+			"    constant #23 field_ref: #24.#26 java/lang/System.out Ljava/io/PrintStream;\n" + 
+			"    constant #24 class: #25 java/lang/System\n" + 
+			"    constant #25 utf8: \"java/lang/System\"\n" + 
+			"    constant #26 name_and_type: #27.#28 out Ljava/io/PrintStream;\n" + 
+			"    constant #27 utf8: \"out\"\n" + 
+			"    constant #28 utf8: \"Ljava/io/PrintStream;\"\n" + 
+			"    constant #29 string: #30 \"SUCCESS\"\n" + 
+			"    constant #30 utf8: \"SUCCESS\"\n" + 
+			"    constant #31 method_ref: #32.#34 java/io/PrintStream.println (Ljava/lang/String;)V\n" + 
+			"    constant #32 class: #33 java/io/PrintStream\n" + 
+			"    constant #33 utf8: \"java/io/PrintStream\"\n" + 
+			"    constant #34 name_and_type: #35.#36 println (Ljava/lang/String;)V\n" + 
+			"    constant #35 utf8: \"println\"\n" + 
+			"    constant #36 utf8: \"(Ljava/lang/String;)V\"\n" + 
+			"    constant #37 utf8: \"SourceFile\"\n" + 
+			"    constant #38 utf8: \"X.java\"\n" + 
+			"    constant #39 method_ref: #40.#42 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #40 class: #41 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #41 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #42 name_and_type: #43.#44 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #43 utf8: \"metafactory\"\n" + 
+			"    constant #44 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #45 method handle: invokestatic (6) #39 \n" + 
+			"    constant #46 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #47 method type: #8 ()V\n" + 
+			"    constant #48 method_ref: #1.#49 X.lambda$0 ()V\n" + 
+			"    constant #49 name_and_type: #22.#8 lambda$0 ()V\n" + 
+			"    constant #50 method handle: invokestatic (6) #48 \n" + 
+			"    constant #51 method type: #8 ()V\n" + 
+			"    constant #52 utf8: \"InnerClasses\"\n" + 
+			"    constant #53 class: #54 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #54 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #55 class: #56 java/lang/invoke/MethodHandles\n" + 
+			"    constant #56 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #57 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 Ljava/lang/Runnable;\n" + 
+			"  public java.lang.Runnable referenceExpression;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [10]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  invokedynamic 0 run() : java.lang.Runnable [15]\n" + 
+			"    10  putfield X.referenceExpression : java.lang.Runnable [16]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 2]\n" + 
+			"        [pc: 13, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 2, Locals: 0\n" + 
+			"  private static synthetic void lambda$0();\n" + 
+			"    0  getstatic java.lang.System.out : java.io.PrintStream [23]\n" + 
+			"    3  ldc <String \"SUCCESS\"> [29]\n" + 
+			"    5  invokevirtual java.io.PrintStream.println(java.lang.String) : void [31]\n" + 
+			"    8  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 2]\n" + 
+			"        [pc: 8, line: 3]\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #53 java/lang/invoke/MethodHandles$Lookup, outer class info: #55 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #57 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 45 arguments: {#47,#50,#51}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test007a() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        new X().referenceExpression.run();\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public Runnable referenceExpression = () -> System.out.println(\"SUCCESS\");\n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"referenceExpression\"\n" + 
+			"    constant #6 utf8: \"Ljava/lang/Runnable;\"\n" + 
+			"    constant #7 utf8: \"<init>\"\n" + 
+			"    constant #8 utf8: \"()V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 method_ref: #3.#11 java/lang/Object.<init> ()V\n" + 
+			"    constant #11 name_and_type: #7.#8 <init> ()V\n" + 
+			"    constant #12 name_and_type: #13.#14 run ()Ljava/lang/Runnable;\n" + 
+			"    constant #13 utf8: \"run\"\n" + 
+			"    constant #14 utf8: \"()Ljava/lang/Runnable;\"\n" + 
+			"    constant #15 invoke dynamic: #0 #12 run ()Ljava/lang/Runnable;\n" + 
+			"    constant #16 field_ref: #1.#17 X.referenceExpression Ljava/lang/Runnable;\n" + 
+			"    constant #17 name_and_type: #5.#6 referenceExpression Ljava/lang/Runnable;\n" + 
+			"    constant #18 utf8: \"LineNumberTable\"\n" + 
+			"    constant #19 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #20 utf8: \"this\"\n" + 
+			"    constant #21 utf8: \"LX;\"\n" + 
+			"    constant #22 utf8: \"lambda$0\"\n" + 
+			"    constant #23 field_ref: #24.#26 java/lang/System.out Ljava/io/PrintStream;\n" + 
+			"    constant #24 class: #25 java/lang/System\n" + 
+			"    constant #25 utf8: \"java/lang/System\"\n" + 
+			"    constant #26 name_and_type: #27.#28 out Ljava/io/PrintStream;\n" + 
+			"    constant #27 utf8: \"out\"\n" + 
+			"    constant #28 utf8: \"Ljava/io/PrintStream;\"\n" + 
+			"    constant #29 string: #30 \"SUCCESS\"\n" + 
+			"    constant #30 utf8: \"SUCCESS\"\n" + 
+			"    constant #31 method_ref: #32.#34 java/io/PrintStream.println (Ljava/lang/String;)V\n" + 
+			"    constant #32 class: #33 java/io/PrintStream\n" + 
+			"    constant #33 utf8: \"java/io/PrintStream\"\n" + 
+			"    constant #34 name_and_type: #35.#36 println (Ljava/lang/String;)V\n" + 
+			"    constant #35 utf8: \"println\"\n" + 
+			"    constant #36 utf8: \"(Ljava/lang/String;)V\"\n" + 
+			"    constant #37 utf8: \"SourceFile\"\n" + 
+			"    constant #38 utf8: \"X.java\"\n" + 
+			"    constant #39 method_ref: #40.#42 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #40 class: #41 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #41 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #42 name_and_type: #43.#44 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #43 utf8: \"metafactory\"\n" + 
+			"    constant #44 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #45 method handle: invokestatic (6) #39 \n" + 
+			"    constant #46 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #47 method type: #8 ()V\n" + 
+			"    constant #48 method_ref: #1.#49 X.lambda$0 ()V\n" + 
+			"    constant #49 name_and_type: #22.#8 lambda$0 ()V\n" + 
+			"    constant #50 method handle: invokestatic (6) #48 \n" + 
+			"    constant #51 method type: #8 ()V\n" + 
+			"    constant #52 utf8: \"InnerClasses\"\n" + 
+			"    constant #53 class: #54 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #54 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #55 class: #56 java/lang/invoke/MethodHandles\n" + 
+			"    constant #56 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #57 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 Ljava/lang/Runnable;\n" + 
+			"  public java.lang.Runnable referenceExpression;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [10]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  invokedynamic 0 run() : java.lang.Runnable [15]\n" + 
+			"    10  putfield X.referenceExpression : java.lang.Runnable [16]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 2]\n" + 
+			"        [pc: 13, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 2, Locals: 0\n" + 
+			"  private static synthetic void lambda$0();\n" + 
+			"    0  getstatic java.lang.System.out : java.io.PrintStream [23]\n" + 
+			"    3  ldc <String \"SUCCESS\"> [29]\n" + 
+			"    5  invokevirtual java.io.PrintStream.println(java.lang.String) : void [31]\n" + 
+			"    8  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 2]\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #53 java/lang/invoke/MethodHandles$Lookup, outer class info: #55 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #57 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 45 arguments: {#47,#50,#51}\n" + 
+			"}";
+	
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test008() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        System.out.println(new X().lambda.get());\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public java.util.function.Supplier<String> lambda = () -> { return \"SUCCESS\"; }; \n" +
+			"}\n",
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"lambda\"\n" + 
+			"    constant #6 utf8: \"Ljava/util/function/Supplier;\"\n" + 
+			"    constant #7 utf8: \"Signature\"\n" + 
+			"    constant #8 utf8: \"Ljava/util/function/Supplier<Ljava/lang/String;>;\"\n" + 
+			"    constant #9 utf8: \"<init>\"\n" + 
+			"    constant #10 utf8: \"()V\"\n" + 
+			"    constant #11 utf8: \"Code\"\n" + 
+			"    constant #12 method_ref: #3.#13 java/lang/Object.<init> ()V\n" + 
+			"    constant #13 name_and_type: #9.#10 <init> ()V\n" + 
+			"    constant #14 name_and_type: #15.#16 get ()Ljava/util/function/Supplier;\n" + 
+			"    constant #15 utf8: \"get\"\n" + 
+			"    constant #16 utf8: \"()Ljava/util/function/Supplier;\"\n" + 
+			"    constant #17 invoke dynamic: #0 #14 get ()Ljava/util/function/Supplier;\n" + 
+			"    constant #18 field_ref: #1.#19 X.lambda Ljava/util/function/Supplier;\n" + 
+			"    constant #19 name_and_type: #5.#6 lambda Ljava/util/function/Supplier;\n" + 
+			"    constant #20 utf8: \"LineNumberTable\"\n" + 
+			"    constant #21 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #22 utf8: \"this\"\n" + 
+			"    constant #23 utf8: \"LX;\"\n" + 
+			"    constant #24 utf8: \"lambda$0\"\n" + 
+			"    constant #25 utf8: \"()Ljava/lang/String;\"\n" + 
+			"    constant #26 string: #27 \"SUCCESS\"\n" + 
+			"    constant #27 utf8: \"SUCCESS\"\n" + 
+			"    constant #28 utf8: \"SourceFile\"\n" + 
+			"    constant #29 utf8: \"X.java\"\n" + 
+			"    constant #30 method_ref: #31.#33 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #31 class: #32 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #32 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #33 name_and_type: #34.#35 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #34 utf8: \"metafactory\"\n" + 
+			"    constant #35 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #36 method handle: invokestatic (6) #30 \n" + 
+			"    constant #37 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #38 utf8: \"()Ljava/lang/Object;\"\n" + 
+			"    constant #39 method type: #38 ()Ljava/lang/Object;\n" + 
+			"    constant #40 method_ref: #1.#41 X.lambda$0 ()Ljava/lang/String;\n" + 
+			"    constant #41 name_and_type: #24.#25 lambda$0 ()Ljava/lang/String;\n" + 
+			"    constant #42 method handle: invokestatic (6) #40 \n" + 
+			"    constant #43 method type: #25 ()Ljava/lang/String;\n" + 
+			"    constant #44 utf8: \"InnerClasses\"\n" + 
+			"    constant #45 class: #46 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #46 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #47 class: #48 java/lang/invoke/MethodHandles\n" + 
+			"    constant #48 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #49 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 Ljava/util/function/Supplier;\n" + 
+			"  // Signature: Ljava/util/function/Supplier<Ljava/lang/String;>;\n" + 
+			"  public java.util.function.Supplier lambda;\n" + 
+			"  \n" + 
+			"  // Method descriptor #10 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [12]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  invokedynamic 0 get() : java.util.function.Supplier [17]\n" + 
+			"    10  putfield X.lambda : java.util.function.Supplier [18]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 2]\n" + 
+			"        [pc: 13, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #25 ()Ljava/lang/String;\n" + 
+			"  // Stack: 1, Locals: 0\n" + 
+			"  private static synthetic java.lang.String lambda$0();\n" + 
+			"    0  ldc <String \"SUCCESS\"> [26]\n" + 
+			"    2  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 2]\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #45 java/lang/invoke/MethodHandles$Lookup, outer class info: #47 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #49 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 36 arguments: {#39,#42,#43}\n" + 
+			"}"
+;
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test009() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        System.out.println(new X().concat.apply(\"SUCC\",\"ESS\"));\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public Function2<String, String, String> concat = (s1, s2) -> { return s1 + s2; }; \n" +
+			"}\n",
+			"Function2.java",
+			"public interface Function2<R, T1, T2> {\n" +
+			"    R apply(T1 a1, T2 a2);\n" +
+			"}\n",
+
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"concat\"\n" + 
+			"    constant #6 utf8: \"LFunction2;\"\n" + 
+			"    constant #7 utf8: \"Signature\"\n" + 
+			"    constant #8 utf8: \"LFunction2<Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;>;\"\n" + 
+			"    constant #9 utf8: \"<init>\"\n" + 
+			"    constant #10 utf8: \"()V\"\n" + 
+			"    constant #11 utf8: \"Code\"\n" + 
+			"    constant #12 method_ref: #3.#13 java/lang/Object.<init> ()V\n" + 
+			"    constant #13 name_and_type: #9.#10 <init> ()V\n" + 
+			"    constant #14 name_and_type: #15.#16 apply ()LFunction2;\n" + 
+			"    constant #15 utf8: \"apply\"\n" + 
+			"    constant #16 utf8: \"()LFunction2;\"\n" + 
+			"    constant #17 invoke dynamic: #0 #14 apply ()LFunction2;\n" + 
+			"    constant #18 field_ref: #1.#19 X.concat LFunction2;\n" + 
+			"    constant #19 name_and_type: #5.#6 concat LFunction2;\n" + 
+			"    constant #20 utf8: \"LineNumberTable\"\n" + 
+			"    constant #21 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #22 utf8: \"this\"\n" + 
+			"    constant #23 utf8: \"LX;\"\n" + 
+			"    constant #24 utf8: \"lambda$0\"\n" + 
+			"    constant #25 utf8: \"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\"\n" + 
+			"    constant #26 class: #27 java/lang/StringBuilder\n" + 
+			"    constant #27 utf8: \"java/lang/StringBuilder\"\n" + 
+			"    constant #28 method_ref: #29.#31 java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #29 class: #30 java/lang/String\n" + 
+			"    constant #30 utf8: \"java/lang/String\"\n" + 
+			"    constant #31 name_and_type: #32.#33 valueOf (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #32 utf8: \"valueOf\"\n" + 
+			"    constant #33 utf8: \"(Ljava/lang/Object;)Ljava/lang/String;\"\n" + 
+			"    constant #34 method_ref: #26.#35 java/lang/StringBuilder.<init> (Ljava/lang/String;)V\n" + 
+			"    constant #35 name_and_type: #9.#36 <init> (Ljava/lang/String;)V\n" + 
+			"    constant #36 utf8: \"(Ljava/lang/String;)V\"\n" + 
+			"    constant #37 method_ref: #26.#38 java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder;\n" + 
+			"    constant #38 name_and_type: #39.#40 append (Ljava/lang/String;)Ljava/lang/StringBuilder;\n" + 
+			"    constant #39 utf8: \"append\"\n" + 
+			"    constant #40 utf8: \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\"\n" + 
+			"    constant #41 method_ref: #26.#42 java/lang/StringBuilder.toString ()Ljava/lang/String;\n" + 
+			"    constant #42 name_and_type: #43.#44 toString ()Ljava/lang/String;\n" + 
+			"    constant #43 utf8: \"toString\"\n" + 
+			"    constant #44 utf8: \"()Ljava/lang/String;\"\n" + 
+			"    constant #45 utf8: \"s1\"\n" + 
+			"    constant #46 utf8: \"Ljava/lang/String;\"\n" + 
+			"    constant #47 utf8: \"s2\"\n" + 
+			"    constant #48 utf8: \"SourceFile\"\n" + 
+			"    constant #49 utf8: \"X.java\"\n" + 
+			"    constant #50 method_ref: #51.#53 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #51 class: #52 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #52 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #53 name_and_type: #54.#55 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #54 utf8: \"metafactory\"\n" + 
+			"    constant #55 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #56 method handle: invokestatic (6) #50 \n" + 
+			"    constant #57 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #58 utf8: \"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\"\n" + 
+			"    constant #59 method type: #58 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\n" + 
+			"    constant #60 method_ref: #1.#61 X.lambda$0 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #61 name_and_type: #24.#25 lambda$0 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #62 method handle: invokestatic (6) #60 \n" + 
+			"    constant #63 method type: #25 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #64 utf8: \"InnerClasses\"\n" + 
+			"    constant #65 class: #66 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #66 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #67 class: #68 java/lang/invoke/MethodHandles\n" + 
+			"    constant #68 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #69 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LFunction2;\n" + 
+			"  // Signature: LFunction2<Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;>;\n" + 
+			"  public Function2 concat;\n" + 
+			"  \n" + 
+			"  // Method descriptor #10 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [12]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  invokedynamic 0 apply() : Function2 [17]\n" + 
+			"    10  putfield X.concat : Function2 [18]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 2]\n" + 
+			"        [pc: 13, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #25 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"  // Stack: 3, Locals: 2\n" + 
+			"  private static synthetic java.lang.String lambda$0(java.lang.String s1, java.lang.String s2);\n" + 
+			"     0  new java.lang.StringBuilder [26]\n" + 
+			"     3  dup\n" + 
+			"     4  aload_0 [s1]\n" + 
+			"     5  invokestatic java.lang.String.valueOf(java.lang.Object) : java.lang.String [28]\n" + 
+			"     8  invokespecial java.lang.StringBuilder(java.lang.String) [34]\n" + 
+			"    11  aload_1 [s2]\n" + 
+			"    12  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [37]\n" + 
+			"    15  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [41]\n" + 
+			"    18  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 2]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 19] local: s1 index: 0 type: java.lang.String\n" + 
+			"        [pc: 0, pc: 19] local: s2 index: 1 type: java.lang.String\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #65 java/lang/invoke/MethodHandles$Lookup, outer class info: #67 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #69 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 56 arguments: {#59,#62,#63}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test010() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        System.out.println(new X().concat.apply(\"UCC\",\"ESS\"));\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public Function2<String, String, String> concat; \n" +
+			"    {\n" +
+			"        String s0 = new String(\"S\");\n" +
+			"        concat = (s1, s2) -> { return s0 + s1 + s2; }; \n" +
+			"    }\n" +
+			"}\n",
+			"Function2.java",
+			"public interface Function2<R, T1, T2> {\n" +
+			"    R apply(T1 a1, T2 a2);\n" +
+			"}\n",
+
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"concat\"\n" + 
+			"    constant #6 utf8: \"LFunction2;\"\n" + 
+			"    constant #7 utf8: \"Signature\"\n" + 
+			"    constant #8 utf8: \"LFunction2<Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;>;\"\n" + 
+			"    constant #9 utf8: \"<init>\"\n" + 
+			"    constant #10 utf8: \"()V\"\n" + 
+			"    constant #11 utf8: \"Code\"\n" + 
+			"    constant #12 method_ref: #3.#13 java/lang/Object.<init> ()V\n" + 
+			"    constant #13 name_and_type: #9.#10 <init> ()V\n" + 
+			"    constant #14 class: #15 java/lang/String\n" + 
+			"    constant #15 utf8: \"java/lang/String\"\n" + 
+			"    constant #16 string: #17 \"S\"\n" + 
+			"    constant #17 utf8: \"S\"\n" + 
+			"    constant #18 method_ref: #14.#19 java/lang/String.<init> (Ljava/lang/String;)V\n" + 
+			"    constant #19 name_and_type: #9.#20 <init> (Ljava/lang/String;)V\n" + 
+			"    constant #20 utf8: \"(Ljava/lang/String;)V\"\n" + 
+			"    constant #21 name_and_type: #22.#23 apply (Ljava/lang/String;)LFunction2;\n" + 
+			"    constant #22 utf8: \"apply\"\n" + 
+			"    constant #23 utf8: \"(Ljava/lang/String;)LFunction2;\"\n" + 
+			"    constant #24 invoke dynamic: #0 #21 apply (Ljava/lang/String;)LFunction2;\n" + 
+			"    constant #25 field_ref: #1.#26 X.concat LFunction2;\n" + 
+			"    constant #26 name_and_type: #5.#6 concat LFunction2;\n" + 
+			"    constant #27 utf8: \"LineNumberTable\"\n" + 
+			"    constant #28 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #29 utf8: \"this\"\n" + 
+			"    constant #30 utf8: \"LX;\"\n" + 
+			"    constant #31 utf8: \"s0\"\n" + 
+			"    constant #32 utf8: \"Ljava/lang/String;\"\n" + 
+			"    constant #33 utf8: \"lambda$0\"\n" + 
+			"    constant #34 utf8: \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\"\n" + 
+			"    constant #35 class: #36 java/lang/StringBuilder\n" + 
+			"    constant #36 utf8: \"java/lang/StringBuilder\"\n" + 
+			"    constant #37 method_ref: #14.#38 java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #38 name_and_type: #39.#40 valueOf (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #39 utf8: \"valueOf\"\n" + 
+			"    constant #40 utf8: \"(Ljava/lang/Object;)Ljava/lang/String;\"\n" + 
+			"    constant #41 method_ref: #35.#19 java/lang/StringBuilder.<init> (Ljava/lang/String;)V\n" + 
+			"    constant #42 method_ref: #35.#43 java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder;\n" + 
+			"    constant #43 name_and_type: #44.#45 append (Ljava/lang/String;)Ljava/lang/StringBuilder;\n" + 
+			"    constant #44 utf8: \"append\"\n" + 
+			"    constant #45 utf8: \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\"\n" + 
+			"    constant #46 method_ref: #35.#47 java/lang/StringBuilder.toString ()Ljava/lang/String;\n" + 
+			"    constant #47 name_and_type: #48.#49 toString ()Ljava/lang/String;\n" + 
+			"    constant #48 utf8: \"toString\"\n" + 
+			"    constant #49 utf8: \"()Ljava/lang/String;\"\n" + 
+			"    constant #50 utf8: \"s1\"\n" + 
+			"    constant #51 utf8: \"s2\"\n" + 
+			"    constant #52 utf8: \"SourceFile\"\n" + 
+			"    constant #53 utf8: \"X.java\"\n" + 
+			"    constant #54 method_ref: #55.#57 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #55 class: #56 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #56 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #57 name_and_type: #58.#59 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #58 utf8: \"metafactory\"\n" + 
+			"    constant #59 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #60 method handle: invokestatic (6) #54 \n" + 
+			"    constant #61 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #62 utf8: \"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\"\n" + 
+			"    constant #63 method type: #62 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\n" + 
+			"    constant #64 method_ref: #1.#65 X.lambda$0 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #65 name_and_type: #33.#34 lambda$0 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #66 method handle: invokestatic (6) #64 \n" + 
+			"    constant #67 utf8: \"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\"\n" + 
+			"    constant #68 method type: #67 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #69 utf8: \"InnerClasses\"\n" + 
+			"    constant #70 class: #71 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #71 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #72 class: #73 java/lang/invoke/MethodHandles\n" + 
+			"    constant #73 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #74 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LFunction2;\n" + 
+			"  // Signature: LFunction2<Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;>;\n" + 
+			"  public Function2 concat;\n" + 
+			"  \n" + 
+			"  // Method descriptor #10 ()V\n" + 
+			"  // Stack: 3, Locals: 2\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [12]\n" + 
+			"     4  new java.lang.String [14]\n" + 
+			"     7  dup\n" + 
+			"     8  ldc <String \"S\"> [16]\n" + 
+			"    10  invokespecial java.lang.String(java.lang.String) [18]\n" + 
+			"    13  astore_1 [s0]\n" + 
+			"    14  aload_0 [this]\n" + 
+			"    15  aload_1 [s0]\n" + 
+			"    16  invokedynamic 0 apply(java.lang.String) : Function2 [24]\n" + 
+			"    21  putfield X.concat : Function2 [25]\n" + 
+			"    24  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 4]\n" + 
+			"        [pc: 14, line: 5]\n" + 
+			"        [pc: 24, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 25] local: this index: 0 type: X\n" + 
+			"        [pc: 14, pc: 24] local: s0 index: 1 type: java.lang.String\n" + 
+			"  \n" + 
+			"  // Method descriptor #34 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"  // Stack: 3, Locals: 3\n" + 
+			"  private static synthetic java.lang.String lambda$0(java.lang.String arg0, java.lang.String s1, java.lang.String s2);\n" + 
+			"     0  new java.lang.StringBuilder [35]\n" + 
+			"     3  dup\n" + 
+			"     4  aload_0 [arg0]\n" + 
+			"     5  invokestatic java.lang.String.valueOf(java.lang.Object) : java.lang.String [37]\n" + 
+			"     8  invokespecial java.lang.StringBuilder(java.lang.String) [41]\n" + 
+			"    11  aload_1 [s1]\n" + 
+			"    12  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [42]\n" + 
+			"    15  aload_2 [s2]\n" + 
+			"    16  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [42]\n" + 
+			"    19  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [46]\n" + 
+			"    22  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 5]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 23] local: s1 index: 1 type: java.lang.String\n" + 
+			"        [pc: 0, pc: 23] local: s2 index: 2 type: java.lang.String\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #70 java/lang/invoke/MethodHandles$Lookup, outer class info: #72 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #74 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 60 arguments: {#63,#66,#68}\n" + 
+			"}"
+;
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test011() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"Main.java",
+			"public class Main {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        System.out.println(new X().concat.apply(\"UCC\",\"ESS\"));\n" +
+			"    }\n" +
+			"}\n",
+			"X.java",
+			"public class X {\n" +
+			"    public Function2<String, String, String> concat; \n" +
+			"    {\n" +
+			"        String s0 = new String(\"S\");\n" +
+			"        concat = (s1, s2) -> s0 + s1 + s2; \n" +
+			"    }\n" +
+			"}\n",
+			"Function2.java",
+			"public interface Function2<R, T1, T2> {\n" +
+			"    R apply(T1 a1, T2 a2);\n" +
+			"}\n",
+
+		},
+	"SUCCESS"
+	);
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"concat\"\n" + 
+			"    constant #6 utf8: \"LFunction2;\"\n" + 
+			"    constant #7 utf8: \"Signature\"\n" + 
+			"    constant #8 utf8: \"LFunction2<Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;>;\"\n" + 
+			"    constant #9 utf8: \"<init>\"\n" + 
+			"    constant #10 utf8: \"()V\"\n" + 
+			"    constant #11 utf8: \"Code\"\n" + 
+			"    constant #12 method_ref: #3.#13 java/lang/Object.<init> ()V\n" + 
+			"    constant #13 name_and_type: #9.#10 <init> ()V\n" + 
+			"    constant #14 class: #15 java/lang/String\n" + 
+			"    constant #15 utf8: \"java/lang/String\"\n" + 
+			"    constant #16 string: #17 \"S\"\n" + 
+			"    constant #17 utf8: \"S\"\n" + 
+			"    constant #18 method_ref: #14.#19 java/lang/String.<init> (Ljava/lang/String;)V\n" + 
+			"    constant #19 name_and_type: #9.#20 <init> (Ljava/lang/String;)V\n" + 
+			"    constant #20 utf8: \"(Ljava/lang/String;)V\"\n" + 
+			"    constant #21 name_and_type: #22.#23 apply (Ljava/lang/String;)LFunction2;\n" + 
+			"    constant #22 utf8: \"apply\"\n" + 
+			"    constant #23 utf8: \"(Ljava/lang/String;)LFunction2;\"\n" + 
+			"    constant #24 invoke dynamic: #0 #21 apply (Ljava/lang/String;)LFunction2;\n" + 
+			"    constant #25 field_ref: #1.#26 X.concat LFunction2;\n" + 
+			"    constant #26 name_and_type: #5.#6 concat LFunction2;\n" + 
+			"    constant #27 utf8: \"LineNumberTable\"\n" + 
+			"    constant #28 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #29 utf8: \"this\"\n" + 
+			"    constant #30 utf8: \"LX;\"\n" + 
+			"    constant #31 utf8: \"s0\"\n" + 
+			"    constant #32 utf8: \"Ljava/lang/String;\"\n" + 
+			"    constant #33 utf8: \"lambda$0\"\n" + 
+			"    constant #34 utf8: \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\"\n" + 
+			"    constant #35 class: #36 java/lang/StringBuilder\n" + 
+			"    constant #36 utf8: \"java/lang/StringBuilder\"\n" + 
+			"    constant #37 method_ref: #14.#38 java/lang/String.valueOf (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #38 name_and_type: #39.#40 valueOf (Ljava/lang/Object;)Ljava/lang/String;\n" + 
+			"    constant #39 utf8: \"valueOf\"\n" + 
+			"    constant #40 utf8: \"(Ljava/lang/Object;)Ljava/lang/String;\"\n" + 
+			"    constant #41 method_ref: #35.#19 java/lang/StringBuilder.<init> (Ljava/lang/String;)V\n" + 
+			"    constant #42 method_ref: #35.#43 java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder;\n" + 
+			"    constant #43 name_and_type: #44.#45 append (Ljava/lang/String;)Ljava/lang/StringBuilder;\n" + 
+			"    constant #44 utf8: \"append\"\n" + 
+			"    constant #45 utf8: \"(Ljava/lang/String;)Ljava/lang/StringBuilder;\"\n" + 
+			"    constant #46 method_ref: #35.#47 java/lang/StringBuilder.toString ()Ljava/lang/String;\n" + 
+			"    constant #47 name_and_type: #48.#49 toString ()Ljava/lang/String;\n" + 
+			"    constant #48 utf8: \"toString\"\n" + 
+			"    constant #49 utf8: \"()Ljava/lang/String;\"\n" + 
+			"    constant #50 utf8: \"s1\"\n" + 
+			"    constant #51 utf8: \"s2\"\n" + 
+			"    constant #52 utf8: \"SourceFile\"\n" + 
+			"    constant #53 utf8: \"X.java\"\n" + 
+			"    constant #54 method_ref: #55.#57 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #55 class: #56 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #56 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #57 name_and_type: #58.#59 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #58 utf8: \"metafactory\"\n" + 
+			"    constant #59 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #60 method handle: invokestatic (6) #54 \n" + 
+			"    constant #61 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #62 utf8: \"(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\"\n" + 
+			"    constant #63 method type: #62 (Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;\n" + 
+			"    constant #64 method_ref: #1.#65 X.lambda$0 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #65 name_and_type: #33.#34 lambda$0 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #66 method handle: invokestatic (6) #64 \n" + 
+			"    constant #67 utf8: \"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\"\n" + 
+			"    constant #68 method type: #67 (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"    constant #69 utf8: \"InnerClasses\"\n" + 
+			"    constant #70 class: #71 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #71 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #72 class: #73 java/lang/invoke/MethodHandles\n" + 
+			"    constant #73 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #74 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LFunction2;\n" + 
+			"  // Signature: LFunction2<Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;>;\n" + 
+			"  public Function2 concat;\n" + 
+			"  \n" + 
+			"  // Method descriptor #10 ()V\n" + 
+			"  // Stack: 3, Locals: 2\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [12]\n" + 
+			"     4  new java.lang.String [14]\n" + 
+			"     7  dup\n" + 
+			"     8  ldc <String \"S\"> [16]\n" + 
+			"    10  invokespecial java.lang.String(java.lang.String) [18]\n" + 
+			"    13  astore_1 [s0]\n" + 
+			"    14  aload_0 [this]\n" + 
+			"    15  aload_1 [s0]\n" + 
+			"    16  invokedynamic 0 apply(java.lang.String) : Function2 [24]\n" + 
+			"    21  putfield X.concat : Function2 [25]\n" + 
+			"    24  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 4, line: 4]\n" + 
+			"        [pc: 14, line: 5]\n" + 
+			"        [pc: 24, line: 1]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 25] local: this index: 0 type: X\n" + 
+			"        [pc: 14, pc: 24] local: s0 index: 1 type: java.lang.String\n" + 
+			"  \n" + 
+			"  // Method descriptor #34 (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;\n" + 
+			"  // Stack: 3, Locals: 3\n" + 
+			"  private static synthetic java.lang.String lambda$0(java.lang.String arg0, java.lang.String s1, java.lang.String s2);\n" + 
+			"     0  new java.lang.StringBuilder [35]\n" + 
+			"     3  dup\n" + 
+			"     4  aload_0 [arg0]\n" + 
+			"     5  invokestatic java.lang.String.valueOf(java.lang.Object) : java.lang.String [37]\n" + 
+			"     8  invokespecial java.lang.StringBuilder(java.lang.String) [41]\n" + 
+			"    11  aload_1 [s1]\n" + 
+			"    12  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [42]\n" + 
+			"    15  aload_2 [s2]\n" + 
+			"    16  invokevirtual java.lang.StringBuilder.append(java.lang.String) : java.lang.StringBuilder [42]\n" + 
+			"    19  invokevirtual java.lang.StringBuilder.toString() : java.lang.String [46]\n" + 
+			"    22  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 5]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 23] local: s1 index: 1 type: java.lang.String\n" + 
+			"        [pc: 0, pc: 23] local: s2 index: 2 type: java.lang.String\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #70 java/lang/invoke/MethodHandles$Lookup, outer class info: #72 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #74 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 60 arguments: {#63,#66,#68}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406627,  [1.8][compiler][codegen] Annotations on lambda parameters go the way of /dev/null
+public void test012() throws Exception {
+	this.runConformTest(
+		new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import java.lang.annotation.RetentionPolicy;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"interface I {\n" +
+				"	void doit (Object o, Object p);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"   public static void main(String [] args) {\n" +
+				"   int local1 = 0,  local2 = 1;\n" +
+				"	I i = (@Annotation Object o, @Annotation Object p) -> {\n" +
+				"       int j = args.length + local1 + local2;\n" +
+				"	};\n" +
+				"}\n" +
+				"}\n" +
+				"@Target(ElementType.PARAMETER)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Annotation {\n" +
+				"}\n",
+		},
+		"");
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"<init>\"\n" + 
+			"    constant #6 utf8: \"()V\"\n" + 
+			"    constant #7 utf8: \"Code\"\n" + 
+			"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+			"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+			"    constant #10 utf8: \"LineNumberTable\"\n" + 
+			"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #12 utf8: \"this\"\n" + 
+			"    constant #13 utf8: \"LX;\"\n" + 
+			"    constant #14 utf8: \"main\"\n" + 
+			"    constant #15 utf8: \"([Ljava/lang/String;)V\"\n" + 
+			"    constant #16 name_and_type: #17.#18 doit ([Ljava/lang/String;II)LI;\n" + 
+			"    constant #17 utf8: \"doit\"\n" + 
+			"    constant #18 utf8: \"([Ljava/lang/String;II)LI;\"\n" + 
+			"    constant #19 invoke dynamic: #0 #16 doit ([Ljava/lang/String;II)LI;\n" + 
+			"    constant #20 utf8: \"args\"\n" + 
+			"    constant #21 utf8: \"[Ljava/lang/String;\"\n" + 
+			"    constant #22 utf8: \"local1\"\n" + 
+			"    constant #23 utf8: \"I\"\n" + 
+			"    constant #24 utf8: \"local2\"\n" + 
+			"    constant #25 utf8: \"i\"\n" + 
+			"    constant #26 utf8: \"LI;\"\n" + 
+			"    constant #27 utf8: \"lambda$0\"\n" + 
+			"    constant #28 utf8: \"([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\"\n" + 
+			"    constant #29 utf8: \"RuntimeVisibleParameterAnnotations\"\n" + 
+			"    constant #30 utf8: \"LAnnotation;\"\n" + 
+			"    constant #31 utf8: \"o\"\n" + 
+			"    constant #32 utf8: \"Ljava/lang/Object;\"\n" + 
+			"    constant #33 utf8: \"p\"\n" + 
+			"    constant #34 utf8: \"SourceFile\"\n" + 
+			"    constant #35 utf8: \"X.java\"\n" + 
+			"    constant #36 method_ref: #37.#39 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #37 class: #38 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #38 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #39 name_and_type: #40.#41 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #40 utf8: \"metafactory\"\n" + 
+			"    constant #41 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #42 method handle: invokestatic (6) #36 \n" + 
+			"    constant #43 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #44 utf8: \"(Ljava/lang/Object;Ljava/lang/Object;)V\"\n" + 
+			"    constant #45 method type: #44 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #46 method_ref: #1.#47 X.lambda$0 ([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #47 name_and_type: #27.#28 lambda$0 ([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #48 method handle: invokestatic (6) #46 \n" + 
+			"    constant #49 method type: #44 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #50 utf8: \"InnerClasses\"\n" + 
+			"    constant #51 class: #52 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #52 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #53 class: #54 java/lang/invoke/MethodHandles\n" + 
+			"    constant #54 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #55 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Method descriptor #6 ()V\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public X();\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  invokespecial java.lang.Object() [8]\n" + 
+			"    4  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 8]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #15 ([Ljava/lang/String;)V\n" + 
+			"  // Stack: 3, Locals: 4\n" + 
+			"  public static void main(java.lang.String[] args);\n" + 
+			"     0  iconst_0\n" + 
+			"     1  istore_1 [local1]\n" + 
+			"     2  iconst_1\n" + 
+			"     3  istore_2 [local2]\n" + 
+			"     4  aload_0 [args]\n" + 
+			"     5  iload_1 [local1]\n" + 
+			"     6  iload_2 [local2]\n" + 
+			"     7  invokedynamic 0 doit(java.lang.String[], int, int) : I [19]\n" + 
+			"    12  astore_3 [i]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 10]\n" + 
+			"        [pc: 4, line: 11]\n" + 
+			"        [pc: 13, line: 14]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: args index: 0 type: java.lang.String[]\n" + 
+			"        [pc: 2, pc: 14] local: local1 index: 1 type: int\n" + 
+			"        [pc: 4, pc: 14] local: local2 index: 2 type: int\n" + 
+			"        [pc: 13, pc: 14] local: i index: 3 type: I\n" + 
+			"  \n" + 
+			"  // Method descriptor #28 ([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"  // Stack: 2, Locals: 6\n" + 
+			"  private static synthetic void lambda$0(java.lang.String[] arg0, int arg1, int arg2, java.lang.Object o, java.lang.Object p);\n" + 
+			"    0  aload_0 [arg0]\n" + 
+			"    1  arraylength\n" + 
+			"    2  iload_1 [arg1]\n" + 
+			"    3  iadd\n" + 
+			"    4  iload_2 [arg2]\n" + 
+			"    5  iadd\n" + 
+			"    6  istore 5\n" + 
+			"    8  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 12]\n" + 
+			"        [pc: 8, line: 13]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 9] local: o index: 3 type: java.lang.Object\n" + 
+			"        [pc: 0, pc: 9] local: p index: 4 type: java.lang.Object\n" + 
+			"    RuntimeVisibleParameterAnnotations: \n" + 
+			"      Number of annotations for parameter 0: 0\n" + 
+			"      Number of annotations for parameter 1: 0\n" + 
+			"      Number of annotations for parameter 2: 0\n" + 
+			"      Number of annotations for parameter 3: 1\n" + 
+			"        #30 @Annotation(\n" + 
+			"        )\n" + 
+			"      Number of annotations for parameter 4: 1\n" + 
+			"        #30 @Annotation(\n" + 
+			"        )\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #51 java/lang/invoke/MethodHandles$Lookup, outer class info: #53 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #55 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 42 arguments: {#45,#48,#49}\n" + 
+			"}"
+;
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406627,  [1.8][compiler][codegen] Annotations on lambda parameters go the way of /dev/null
+public void test013() throws Exception {
+	this.runConformTest(
+		new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import java.lang.annotation.RetentionPolicy;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"interface I {\n" +
+				"	void doit (Object o, Object p);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"   public static void main(String [] args) {\n" +
+				"	I i = (@Annotation Object o, @Annotation Object p) -> {\n" +
+				"	};\n" +
+				"}\n" +
+				"}\n" +
+				"@Target(ElementType.PARAMETER)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Annotation {\n" +
+				"}\n",
+		},
+		"");
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"<init>\"\n" + 
+			"    constant #6 utf8: \"()V\"\n" + 
+			"    constant #7 utf8: \"Code\"\n" + 
+			"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+			"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+			"    constant #10 utf8: \"LineNumberTable\"\n" + 
+			"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #12 utf8: \"this\"\n" + 
+			"    constant #13 utf8: \"LX;\"\n" + 
+			"    constant #14 utf8: \"main\"\n" + 
+			"    constant #15 utf8: \"([Ljava/lang/String;)V\"\n" + 
+			"    constant #16 name_and_type: #17.#18 doit ()LI;\n" + 
+			"    constant #17 utf8: \"doit\"\n" + 
+			"    constant #18 utf8: \"()LI;\"\n" + 
+			"    constant #19 invoke dynamic: #0 #16 doit ()LI;\n" + 
+			"    constant #20 utf8: \"args\"\n" + 
+			"    constant #21 utf8: \"[Ljava/lang/String;\"\n" + 
+			"    constant #22 utf8: \"i\"\n" + 
+			"    constant #23 utf8: \"LI;\"\n" + 
+			"    constant #24 utf8: \"lambda$0\"\n" + 
+			"    constant #25 utf8: \"(Ljava/lang/Object;Ljava/lang/Object;)V\"\n" + 
+			"    constant #26 utf8: \"RuntimeVisibleParameterAnnotations\"\n" + 
+			"    constant #27 utf8: \"LAnnotation;\"\n" + 
+			"    constant #28 utf8: \"o\"\n" + 
+			"    constant #29 utf8: \"Ljava/lang/Object;\"\n" + 
+			"    constant #30 utf8: \"p\"\n" + 
+			"    constant #31 utf8: \"SourceFile\"\n" + 
+			"    constant #32 utf8: \"X.java\"\n" + 
+			"    constant #33 method_ref: #34.#36 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #34 class: #35 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #35 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #36 name_and_type: #37.#38 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #37 utf8: \"metafactory\"\n" + 
+			"    constant #38 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #39 method handle: invokestatic (6) #33 \n" + 
+			"    constant #40 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #41 method type: #25 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #42 method_ref: #1.#43 X.lambda$0 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #43 name_and_type: #24.#25 lambda$0 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #44 method handle: invokestatic (6) #42 \n" + 
+			"    constant #45 method type: #25 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #46 utf8: \"InnerClasses\"\n" + 
+			"    constant #47 class: #48 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #48 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #49 class: #50 java/lang/invoke/MethodHandles\n" + 
+			"    constant #50 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #51 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Method descriptor #6 ()V\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public X();\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  invokespecial java.lang.Object() [8]\n" + 
+			"    4  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 8]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #15 ([Ljava/lang/String;)V\n" + 
+			"  // Stack: 1, Locals: 2\n" + 
+			"  public static void main(java.lang.String[] args);\n" + 
+			"    0  invokedynamic 0 doit() : I [19]\n" + 
+			"    5  astore_1 [i]\n" + 
+			"    6  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 10]\n" + 
+			"        [pc: 6, line: 12]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 7] local: args index: 0 type: java.lang.String[]\n" + 
+			"        [pc: 6, pc: 7] local: i index: 1 type: I\n" + 
+			"  \n" + 
+			"  // Method descriptor #25 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"  // Stack: 0, Locals: 2\n" + 
+			"  private static synthetic void lambda$0(java.lang.Object o, java.lang.Object p);\n" + 
+			"    0  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 11]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 1] local: o index: 0 type: java.lang.Object\n" + 
+			"        [pc: 0, pc: 1] local: p index: 1 type: java.lang.Object\n" + 
+			"    RuntimeVisibleParameterAnnotations: \n" + 
+			"      Number of annotations for parameter 0: 1\n" + 
+			"        #27 @Annotation(\n" + 
+			"        )\n" + 
+			"      Number of annotations for parameter 1: 1\n" + 
+			"        #27 @Annotation(\n" + 
+			"        )\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #47 java/lang/invoke/MethodHandles$Lookup, outer class info: #49 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #51 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 39 arguments: {#41,#44,#45}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public void test014() throws Exception {
+	this.runConformTest(
+		new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import java.lang.annotation.RetentionPolicy;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"interface I {\n" +
+				"	void doit (Object o, Object p);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	I i = (@Annotation Object o, @Annotation Object p) -> {\n" +
+				"	};\n" +
+				"   public static void main(String [] args) {\n" +
+				"   int local1 = 0,  local2 = 1;\n" +
+				"	I i = (@Annotation Object o, @Annotation Object p) -> {\n" +
+				"       int j = args.length + local1 + local2;\n" +
+				"	};\n" +
+				"}\n" +
+				"}\n" +
+				"@Target(ElementType.PARAMETER)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Annotation {\n" +
+				"}\n",
+		},
+		"");
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"i\"\n" + 
+			"    constant #6 utf8: \"LI;\"\n" + 
+			"    constant #7 utf8: \"<init>\"\n" + 
+			"    constant #8 utf8: \"()V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 method_ref: #3.#11 java/lang/Object.<init> ()V\n" + 
+			"    constant #11 name_and_type: #7.#8 <init> ()V\n" + 
+			"    constant #12 name_and_type: #13.#14 doit ()LI;\n" + 
+			"    constant #13 utf8: \"doit\"\n" + 
+			"    constant #14 utf8: \"()LI;\"\n" + 
+			"    constant #15 invoke dynamic: #0 #12 doit ()LI;\n" + 
+			"    constant #16 field_ref: #1.#17 X.i LI;\n" + 
+			"    constant #17 name_and_type: #5.#6 i LI;\n" + 
+			"    constant #18 utf8: \"LineNumberTable\"\n" + 
+			"    constant #19 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #20 utf8: \"this\"\n" + 
+			"    constant #21 utf8: \"LX;\"\n" + 
+			"    constant #22 utf8: \"main\"\n" + 
+			"    constant #23 utf8: \"([Ljava/lang/String;)V\"\n" + 
+			"    constant #24 name_and_type: #13.#25 doit ([Ljava/lang/String;II)LI;\n" + 
+			"    constant #25 utf8: \"([Ljava/lang/String;II)LI;\"\n" + 
+			"    constant #26 invoke dynamic: #1 #24 doit ([Ljava/lang/String;II)LI;\n" + 
+			"    constant #27 utf8: \"args\"\n" + 
+			"    constant #28 utf8: \"[Ljava/lang/String;\"\n" + 
+			"    constant #29 utf8: \"local1\"\n" + 
+			"    constant #30 utf8: \"I\"\n" + 
+			"    constant #31 utf8: \"local2\"\n" + 
+			"    constant #32 utf8: \"lambda$0\"\n" + 
+			"    constant #33 utf8: \"(Ljava/lang/Object;Ljava/lang/Object;)V\"\n" + 
+			"    constant #34 utf8: \"RuntimeVisibleParameterAnnotations\"\n" + 
+			"    constant #35 utf8: \"LAnnotation;\"\n" + 
+			"    constant #36 utf8: \"o\"\n" + 
+			"    constant #37 utf8: \"Ljava/lang/Object;\"\n" + 
+			"    constant #38 utf8: \"p\"\n" + 
+			"    constant #39 utf8: \"lambda$1\"\n" + 
+			"    constant #40 utf8: \"([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\"\n" + 
+			"    constant #41 utf8: \"SourceFile\"\n" + 
+			"    constant #42 utf8: \"X.java\"\n" + 
+			"    constant #43 method_ref: #44.#46 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #44 class: #45 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #45 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #46 name_and_type: #47.#48 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #47 utf8: \"metafactory\"\n" + 
+			"    constant #48 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #49 method handle: invokestatic (6) #43 \n" + 
+			"    constant #50 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #51 method type: #33 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #52 method_ref: #1.#53 X.lambda$0 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #53 name_and_type: #32.#33 lambda$0 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #54 method handle: invokestatic (6) #52 \n" + 
+			"    constant #55 method type: #33 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #56 method type: #33 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #57 method_ref: #1.#58 X.lambda$1 ([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #58 name_and_type: #39.#40 lambda$1 ([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #59 method handle: invokestatic (6) #57 \n" + 
+			"    constant #60 method type: #33 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"    constant #61 utf8: \"InnerClasses\"\n" + 
+			"    constant #62 class: #63 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #63 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #64 class: #65 java/lang/invoke/MethodHandles\n" + 
+			"    constant #65 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #66 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LI;\n" + 
+			"  I i;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public X();\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  invokespecial java.lang.Object() [10]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  invokedynamic 0 doit() : I [15]\n" + 
+			"    10  putfield X.i : I [16]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 8]\n" + 
+			"        [pc: 4, line: 9]\n" + 
+			"        [pc: 13, line: 8]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #23 ([Ljava/lang/String;)V\n" + 
+			"  // Stack: 3, Locals: 4\n" + 
+			"  public static void main(java.lang.String[] args);\n" + 
+			"     0  iconst_0\n" + 
+			"     1  istore_1 [local1]\n" + 
+			"     2  iconst_1\n" + 
+			"     3  istore_2 [local2]\n" + 
+			"     4  aload_0 [args]\n" + 
+			"     5  iload_1 [local1]\n" + 
+			"     6  iload_2 [local2]\n" + 
+			"     7  invokedynamic 1 doit(java.lang.String[], int, int) : I [26]\n" + 
+			"    12  astore_3 [i]\n" + 
+			"    13  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 12]\n" + 
+			"        [pc: 4, line: 13]\n" + 
+			"        [pc: 13, line: 16]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 14] local: args index: 0 type: java.lang.String[]\n" + 
+			"        [pc: 2, pc: 14] local: local1 index: 1 type: int\n" + 
+			"        [pc: 4, pc: 14] local: local2 index: 2 type: int\n" + 
+			"        [pc: 13, pc: 14] local: i index: 3 type: I\n" + 
+			"  \n" + 
+			"  // Method descriptor #33 (Ljava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"  // Stack: 0, Locals: 2\n" + 
+			"  private static synthetic void lambda$0(java.lang.Object o, java.lang.Object p);\n" + 
+			"    0  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 10]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 1] local: o index: 0 type: java.lang.Object\n" + 
+			"        [pc: 0, pc: 1] local: p index: 1 type: java.lang.Object\n" + 
+			"    RuntimeVisibleParameterAnnotations: \n" + 
+			"      Number of annotations for parameter 0: 1\n" + 
+			"        #35 @Annotation(\n" + 
+			"        )\n" + 
+			"      Number of annotations for parameter 1: 1\n" + 
+			"        #35 @Annotation(\n" + 
+			"        )\n" + 
+			"  \n" + 
+			"  // Method descriptor #40 ([Ljava/lang/String;IILjava/lang/Object;Ljava/lang/Object;)V\n" + 
+			"  // Stack: 2, Locals: 6\n" + 
+			"  private static synthetic void lambda$1(java.lang.String[] arg0, int arg1, int arg2, java.lang.Object o, java.lang.Object p);\n" + 
+			"    0  aload_0 [arg0]\n" + 
+			"    1  arraylength\n" + 
+			"    2  iload_1 [arg1]\n" + 
+			"    3  iadd\n" + 
+			"    4  iload_2 [arg2]\n" + 
+			"    5  iadd\n" + 
+			"    6  istore 5\n" + 
+			"    8  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 14]\n" + 
+			"        [pc: 8, line: 15]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 9] local: o index: 3 type: java.lang.Object\n" + 
+			"        [pc: 0, pc: 9] local: p index: 4 type: java.lang.Object\n" + 
+			"    RuntimeVisibleParameterAnnotations: \n" + 
+			"      Number of annotations for parameter 0: 0\n" + 
+			"      Number of annotations for parameter 1: 0\n" + 
+			"      Number of annotations for parameter 2: 0\n" + 
+			"      Number of annotations for parameter 3: 1\n" + 
+			"        #35 @Annotation(\n" + 
+			"        )\n" + 
+			"      Number of annotations for parameter 4: 1\n" + 
+			"        #35 @Annotation(\n" + 
+			"        )\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #62 java/lang/invoke/MethodHandles$Lookup, outer class info: #64 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #66 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 49 arguments: {#51,#54,#55},\n" + 
+			"  1 : # 49 arguments: {#56,#59,#60}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406641, [1.8][compiler][codegen] Code generation for intersection cast.
+public void test015() throws Exception {
+	this.runConformTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main( String [] args) { \n" +
+				"		I i = (I & java.io.Serializable) () -> {};\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"");
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"public class X {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X\n" + 
+			"    constant #2 utf8: \"X\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"<init>\"\n" + 
+			"    constant #6 utf8: \"()V\"\n" + 
+			"    constant #7 utf8: \"Code\"\n" + 
+			"    constant #8 method_ref: #3.#9 java/lang/Object.<init> ()V\n" + 
+			"    constant #9 name_and_type: #5.#6 <init> ()V\n" + 
+			"    constant #10 utf8: \"LineNumberTable\"\n" + 
+			"    constant #11 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #12 utf8: \"this\"\n" + 
+			"    constant #13 utf8: \"LX;\"\n" + 
+			"    constant #14 utf8: \"main\"\n" + 
+			"    constant #15 utf8: \"([Ljava/lang/String;)V\"\n" + 
+			"    constant #16 name_and_type: #17.#18 foo ()LI;\n" + 
+			"    constant #17 utf8: \"foo\"\n" + 
+			"    constant #18 utf8: \"()LI;\"\n" + 
+			"    constant #19 invoke dynamic: #0 #16 foo ()LI;\n" + 
+			"    constant #20 utf8: \"args\"\n" + 
+			"    constant #21 utf8: \"[Ljava/lang/String;\"\n" + 
+			"    constant #22 utf8: \"i\"\n" + 
+			"    constant #23 utf8: \"LI;\"\n" + 
+			"    constant #24 utf8: \"lambda$0\"\n" + 
+			"    constant #25 utf8: \"SourceFile\"\n" + 
+			"    constant #26 utf8: \"X.java\"\n" + 
+			"    constant #27 method_ref: #28.#30 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #28 class: #29 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #29 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #30 name_and_type: #31.#32 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #31 utf8: \"metafactory\"\n" + 
+			"    constant #32 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #33 method handle: invokestatic (6) #27 \n" + 
+			"    constant #34 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #35 method type: #6 ()V\n" + 
+			"    constant #36 method_ref: #1.#37 X.lambda$0 ()V\n" + 
+			"    constant #37 name_and_type: #24.#6 lambda$0 ()V\n" + 
+			"    constant #38 method handle: invokestatic (6) #36 \n" + 
+			"    constant #39 method type: #6 ()V\n" + 
+			"    constant #40 utf8: \"InnerClasses\"\n" + 
+			"    constant #41 class: #42 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #42 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #43 class: #44 java/lang/invoke/MethodHandles\n" + 
+			"    constant #44 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #45 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Method descriptor #6 ()V\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public X();\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  invokespecial java.lang.Object() [8]\n" + 
+			"    4  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 4]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+			"  \n" + 
+			"  // Method descriptor #15 ([Ljava/lang/String;)V\n" + 
+			"  // Stack: 1, Locals: 2\n" + 
+			"  public static void main(java.lang.String[] args);\n" + 
+			"    0  invokedynamic 0 foo() : I [19]\n" + 
+			"    5  astore_1 [i]\n" + 
+			"    6  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 6]\n" + 
+			"        [pc: 6, line: 7]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 7] local: args index: 0 type: java.lang.String[]\n" + 
+			"        [pc: 6, pc: 7] local: i index: 1 type: I\n" + 
+			"  \n" + 
+			"  // Method descriptor #6 ()V\n" + 
+			"  // Stack: 0, Locals: 0\n" + 
+			"  private static synthetic void lambda$0();\n" + 
+			"    0  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 6]\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #41 java/lang/invoke/MethodHandles$Lookup, outer class info: #43 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #45 Lookup, accessflags: 25 public static final]\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 33 arguments: {#35,#38,#39}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X.class", ClassFileBytesDisassembler.SYSTEM);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406392, [1.8][compiler][codegen] Improve identification of lambdas that must capture enclosing instance
+public void test016() throws Exception {
+	// This test proves that when a lambda body references a type variable of an enclosing method, it can still be emitted as a static method. 
+	this.runConformTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"	<T> void foo() {\n" +
+				"		class Y {\n" +
+				"			T goo() {\n" +
+				"				((I) () -> {\n" +
+				"	    			T t = null;\n" +
+				"		    		System.out.println(\"Lambda\");\n" +
+				"				}).doit();\n" +
+				"				return null;\n" +
+				"			}\n" +
+				"		}\n" +
+				"		new Y().goo();\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().<String>foo(); \n" +
+				"	}\n" +
+				"}\n",
+		},
+		"Lambda");
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"class X$1Y {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X$1Y\n" + 
+			"    constant #2 utf8: \"X$1Y\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"this$0\"\n" + 
+			"    constant #6 utf8: \"LX;\"\n" + 
+			"    constant #7 utf8: \"<init>\"\n" + 
+			"    constant #8 utf8: \"(LX;)V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 field_ref: #1.#11 X$1Y.this$0 LX;\n" + 
+			"    constant #11 name_and_type: #5.#6 this$0 LX;\n" + 
+			"    constant #12 method_ref: #3.#13 java/lang/Object.<init> ()V\n" + 
+			"    constant #13 name_and_type: #7.#14 <init> ()V\n" + 
+			"    constant #14 utf8: \"()V\"\n" + 
+			"    constant #15 utf8: \"LineNumberTable\"\n" + 
+			"    constant #16 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #17 utf8: \"this\"\n" + 
+			"    constant #18 utf8: \"LX$1Y;\"\n" + 
+			"    constant #19 utf8: \"goo\"\n" + 
+			"    constant #20 utf8: \"()Ljava/lang/Object;\"\n" + 
+			"    constant #21 utf8: \"Signature\"\n" + 
+			"    constant #22 utf8: \"()TT;\"\n" + 
+			"    constant #23 name_and_type: #24.#25 doit ()LI;\n" + 
+			"    constant #24 utf8: \"doit\"\n" + 
+			"    constant #25 utf8: \"()LI;\"\n" + 
+			"    constant #26 invoke dynamic: #0 #23 doit ()LI;\n" + 
+			"    constant #27 interface_method_ref: #28.#30 I.doit ()V\n" + 
+			"    constant #28 class: #29 I\n" + 
+			"    constant #29 utf8: \"I\"\n" + 
+			"    constant #30 name_and_type: #24.#14 doit ()V\n" + 
+			"    constant #31 utf8: \"lambda$0\"\n" + 
+			"    constant #32 field_ref: #33.#35 java/lang/System.out Ljava/io/PrintStream;\n" + 
+			"    constant #33 class: #34 java/lang/System\n" + 
+			"    constant #34 utf8: \"java/lang/System\"\n" + 
+			"    constant #35 name_and_type: #36.#37 out Ljava/io/PrintStream;\n" + 
+			"    constant #36 utf8: \"out\"\n" + 
+			"    constant #37 utf8: \"Ljava/io/PrintStream;\"\n" + 
+			"    constant #38 string: #39 \"Lambda\"\n" + 
+			"    constant #39 utf8: \"Lambda\"\n" + 
+			"    constant #40 method_ref: #41.#43 java/io/PrintStream.println (Ljava/lang/String;)V\n" + 
+			"    constant #41 class: #42 java/io/PrintStream\n" + 
+			"    constant #42 utf8: \"java/io/PrintStream\"\n" + 
+			"    constant #43 name_and_type: #44.#45 println (Ljava/lang/String;)V\n" + 
+			"    constant #44 utf8: \"println\"\n" + 
+			"    constant #45 utf8: \"(Ljava/lang/String;)V\"\n" + 
+			"    constant #46 utf8: \"t\"\n" + 
+			"    constant #47 utf8: \"Ljava/lang/Object;\"\n" + 
+			"    constant #48 utf8: \"LocalVariableTypeTable\"\n" + 
+			"    constant #49 utf8: \"TT;\"\n" + 
+			"    constant #50 utf8: \"SourceFile\"\n" + 
+			"    constant #51 utf8: \"X.java\"\n" + 
+			"    constant #52 utf8: \"EnclosingMethod\"\n" + 
+			"    constant #53 class: #54 X\n" + 
+			"    constant #54 utf8: \"X\"\n" + 
+			"    constant #55 name_and_type: #56.#14 foo ()V\n" + 
+			"    constant #56 utf8: \"foo\"\n" + 
+			"    constant #57 method_ref: #58.#60 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #58 class: #59 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #59 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #60 name_and_type: #61.#62 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #61 utf8: \"metafactory\"\n" + 
+			"    constant #62 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #63 method handle: invokestatic (6) #57 \n" + 
+			"    constant #64 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #65 method type: #14 ()V\n" + 
+			"    constant #66 method_ref: #1.#67 X$1Y.lambda$0 ()V\n" + 
+			"    constant #67 name_and_type: #31.#14 lambda$0 ()V\n" + 
+			"    constant #68 method handle: invokestatic (6) #66 \n" + 
+			"    constant #69 method type: #14 ()V\n" + 
+			"    constant #70 utf8: \"InnerClasses\"\n" + 
+			"    constant #71 utf8: \"Y\"\n" + 
+			"    constant #72 class: #73 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #73 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #74 class: #75 java/lang/invoke/MethodHandles\n" + 
+			"    constant #75 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #76 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LX;\n" + 
+			"  final synthetic X this$0;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 (LX;)V\n" + 
+			"  // Stack: 2, Locals: 2\n" + 
+			"  X$1Y(X arg0);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  aload_1 [arg0]\n" + 
+			"     2  putfield X$1Y.this$0 : X [10]\n" + 
+			"     5  aload_0 [this]\n" + 
+			"     6  invokespecial java.lang.Object() [12]\n" + 
+			"     9  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 6]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 10] local: this index: 0 type: new X(){}\n" + 
+			"  \n" + 
+			"  // Method descriptor #20 ()Ljava/lang/Object;\n" + 
+			"  // Signature: ()TT;\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  java.lang.Object goo();\n" + 
+			"     0  invokedynamic 0 doit() : I [26]\n" + 
+			"     5  invokeinterface I.doit() : void [27] [nargs: 1]\n" + 
+			"    10  aconst_null\n" + 
+			"    11  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 8]\n" + 
+			"        [pc: 5, line: 11]\n" + 
+			"        [pc: 10, line: 12]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 12] local: this index: 0 type: new X(){}\n" + 
+			"  \n" + 
+			"  // Method descriptor #14 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  private static synthetic void lambda$0();\n" + 
+			"     0  aconst_null\n" + 
+			"     1  astore_0 [t]\n" + 
+			"     2  getstatic java.lang.System.out : java.io.PrintStream [32]\n" + 
+			"     5  ldc <String \"Lambda\"> [38]\n" + 
+			"     7  invokevirtual java.io.PrintStream.println(java.lang.String) : void [40]\n" + 
+			"    10  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 9]\n" + 
+			"        [pc: 2, line: 10]\n" + 
+			"        [pc: 10, line: 11]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 2, pc: 10] local: t index: 0 type: java.lang.Object\n" + 
+			"      Local variable type table:\n" + 
+			"        [pc: 2, pc: 10] local: t index: 0 type: T\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #1 X$1Y, outer class info: #0\n" + 
+			"     inner name: #71 Y, accessflags: 0 default],\n" + 
+			"    [inner class info: #72 java/lang/invoke/MethodHandles$Lookup, outer class info: #74 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #76 Lookup, accessflags: 25 public static final]\n" + 
+			"  Enclosing Method: #53  #55 X.foo()V\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 63 arguments: {#65,#68,#69}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X$1Y.class", ClassFileBytesDisassembler.SYSTEM);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406392, [1.8][compiler][codegen] Improve identification of lambdas that must capture enclosing instance
+public void test017() throws Exception {
+	// This test proves that when a lambda body references a type variable of an enclosing class, it can still be emitted as a static method. 
+	this.runConformTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void doit();\n" +
+				"}\n" +
+				"public class X<T>  {\n" +
+				"	void foo() {\n" +
+				"		class Y {\n" +
+				"			T goo() {\n" +
+				"				((I) () -> {\n" +
+				"				T t = null;\n" +
+				"				System.out.println(\"Lambda\");     \n" +
+				"				}).doit();\n" +
+				"				return null;\n" +
+				"			}\n" +
+				"		}\n" +
+				"		new Y().goo();\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().<String>foo(); \n" +
+				"	}\n" +
+				"}\n",
+		},
+		"Lambda");
+
+	String expectedOutput =
+			"// Compiled from X.java (version 1.8 : 52.0, super bit)\n" + 
+			"class X$1Y {\n" + 
+			"  Constant pool:\n" + 
+			"    constant #1 class: #2 X$1Y\n" + 
+			"    constant #2 utf8: \"X$1Y\"\n" + 
+			"    constant #3 class: #4 java/lang/Object\n" + 
+			"    constant #4 utf8: \"java/lang/Object\"\n" + 
+			"    constant #5 utf8: \"this$0\"\n" + 
+			"    constant #6 utf8: \"LX;\"\n" + 
+			"    constant #7 utf8: \"<init>\"\n" + 
+			"    constant #8 utf8: \"(LX;)V\"\n" + 
+			"    constant #9 utf8: \"Code\"\n" + 
+			"    constant #10 field_ref: #1.#11 X$1Y.this$0 LX;\n" + 
+			"    constant #11 name_and_type: #5.#6 this$0 LX;\n" + 
+			"    constant #12 method_ref: #3.#13 java/lang/Object.<init> ()V\n" + 
+			"    constant #13 name_and_type: #7.#14 <init> ()V\n" + 
+			"    constant #14 utf8: \"()V\"\n" + 
+			"    constant #15 utf8: \"LineNumberTable\"\n" + 
+			"    constant #16 utf8: \"LocalVariableTable\"\n" + 
+			"    constant #17 utf8: \"this\"\n" + 
+			"    constant #18 utf8: \"LX$1Y;\"\n" + 
+			"    constant #19 utf8: \"goo\"\n" + 
+			"    constant #20 utf8: \"()Ljava/lang/Object;\"\n" + 
+			"    constant #21 utf8: \"Signature\"\n" + 
+			"    constant #22 utf8: \"()TT;\"\n" + 
+			"    constant #23 name_and_type: #24.#25 doit ()LI;\n" + 
+			"    constant #24 utf8: \"doit\"\n" + 
+			"    constant #25 utf8: \"()LI;\"\n" + 
+			"    constant #26 invoke dynamic: #0 #23 doit ()LI;\n" + 
+			"    constant #27 interface_method_ref: #28.#30 I.doit ()V\n" + 
+			"    constant #28 class: #29 I\n" + 
+			"    constant #29 utf8: \"I\"\n" + 
+			"    constant #30 name_and_type: #24.#14 doit ()V\n" + 
+			"    constant #31 utf8: \"lambda$0\"\n" + 
+			"    constant #32 field_ref: #33.#35 java/lang/System.out Ljava/io/PrintStream;\n" + 
+			"    constant #33 class: #34 java/lang/System\n" + 
+			"    constant #34 utf8: \"java/lang/System\"\n" + 
+			"    constant #35 name_and_type: #36.#37 out Ljava/io/PrintStream;\n" + 
+			"    constant #36 utf8: \"out\"\n" + 
+			"    constant #37 utf8: \"Ljava/io/PrintStream;\"\n" + 
+			"    constant #38 string: #39 \"Lambda\"\n" + 
+			"    constant #39 utf8: \"Lambda\"\n" + 
+			"    constant #40 method_ref: #41.#43 java/io/PrintStream.println (Ljava/lang/String;)V\n" + 
+			"    constant #41 class: #42 java/io/PrintStream\n" + 
+			"    constant #42 utf8: \"java/io/PrintStream\"\n" + 
+			"    constant #43 name_and_type: #44.#45 println (Ljava/lang/String;)V\n" + 
+			"    constant #44 utf8: \"println\"\n" + 
+			"    constant #45 utf8: \"(Ljava/lang/String;)V\"\n" + 
+			"    constant #46 utf8: \"t\"\n" + 
+			"    constant #47 utf8: \"Ljava/lang/Object;\"\n" + 
+			"    constant #48 utf8: \"LocalVariableTypeTable\"\n" + 
+			"    constant #49 utf8: \"TT;\"\n" + 
+			"    constant #50 utf8: \"SourceFile\"\n" + 
+			"    constant #51 utf8: \"X.java\"\n" + 
+			"    constant #52 utf8: \"EnclosingMethod\"\n" + 
+			"    constant #53 class: #54 X\n" + 
+			"    constant #54 utf8: \"X\"\n" + 
+			"    constant #55 name_and_type: #56.#14 foo ()V\n" + 
+			"    constant #56 utf8: \"foo\"\n" + 
+			"    constant #57 method_ref: #58.#60 java/lang/invoke/LambdaMetafactory.metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #58 class: #59 java/lang/invoke/LambdaMetafactory\n" + 
+			"    constant #59 utf8: \"java/lang/invoke/LambdaMetafactory\"\n" + 
+			"    constant #60 name_and_type: #61.#62 metafactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\n" + 
+			"    constant #61 utf8: \"metafactory\"\n" + 
+			"    constant #62 utf8: \"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;\"\n" + 
+			"    constant #63 method handle: invokestatic (6) #57 \n" + 
+			"    constant #64 utf8: \"BootstrapMethods\"\n" + 
+			"    constant #65 method type: #14 ()V\n" + 
+			"    constant #66 method_ref: #1.#67 X$1Y.lambda$0 ()V\n" + 
+			"    constant #67 name_and_type: #31.#14 lambda$0 ()V\n" + 
+			"    constant #68 method handle: invokestatic (6) #66 \n" + 
+			"    constant #69 method type: #14 ()V\n" + 
+			"    constant #70 utf8: \"InnerClasses\"\n" + 
+			"    constant #71 utf8: \"Y\"\n" + 
+			"    constant #72 class: #73 java/lang/invoke/MethodHandles$Lookup\n" + 
+			"    constant #73 utf8: \"java/lang/invoke/MethodHandles$Lookup\"\n" + 
+			"    constant #74 class: #75 java/lang/invoke/MethodHandles\n" + 
+			"    constant #75 utf8: \"java/lang/invoke/MethodHandles\"\n" + 
+			"    constant #76 utf8: \"Lookup\"\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LX;\n" + 
+			"  final synthetic X this$0;\n" + 
+			"  \n" + 
+			"  // Method descriptor #8 (LX;)V\n" + 
+			"  // Stack: 2, Locals: 2\n" + 
+			"  X$1Y(X arg0);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  aload_1 [arg0]\n" + 
+			"     2  putfield X$1Y.this$0 : X [10]\n" + 
+			"     5  aload_0 [this]\n" + 
+			"     6  invokespecial java.lang.Object() [12]\n" + 
+			"     9  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 6]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 10] local: this index: 0 type: new X(){}\n" + 
+			"  \n" + 
+			"  // Method descriptor #20 ()Ljava/lang/Object;\n" + 
+			"  // Signature: ()TT;\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  java.lang.Object goo();\n" + 
+			"     0  invokedynamic 0 doit() : I [26]\n" + 
+			"     5  invokeinterface I.doit() : void [27] [nargs: 1]\n" + 
+			"    10  aconst_null\n" + 
+			"    11  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 8]\n" + 
+			"        [pc: 5, line: 11]\n" + 
+			"        [pc: 10, line: 12]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 12] local: this index: 0 type: new X(){}\n" + 
+			"  \n" + 
+			"  // Method descriptor #14 ()V\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  private static synthetic void lambda$0();\n" + 
+			"     0  aconst_null\n" + 
+			"     1  astore_0 [t]\n" + 
+			"     2  getstatic java.lang.System.out : java.io.PrintStream [32]\n" + 
+			"     5  ldc <String \"Lambda\"> [38]\n" + 
+			"     7  invokevirtual java.io.PrintStream.println(java.lang.String) : void [40]\n" + 
+			"    10  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 9]\n" + 
+			"        [pc: 2, line: 10]\n" + 
+			"        [pc: 10, line: 11]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 2, pc: 10] local: t index: 0 type: java.lang.Object\n" + 
+			"      Local variable type table:\n" + 
+			"        [pc: 2, pc: 10] local: t index: 0 type: T\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #1 X$1Y, outer class info: #0\n" + 
+			"     inner name: #71 Y, accessflags: 0 default],\n" + 
+			"    [inner class info: #72 java/lang/invoke/MethodHandles$Lookup, outer class info: #74 java/lang/invoke/MethodHandles\n" + 
+			"     inner name: #76 Lookup, accessflags: 25 public static final]\n" + 
+			"  Enclosing Method: #53  #55 X.foo()V\n" + 
+			"Bootstrap methods:\n" + 
+			"  0 : # 63 arguments: {#65,#68,#69}\n" + 
+			"}";
+
+	verifyClassFile(expectedOutput, "X$1Y.class", ClassFileBytesDisassembler.SYSTEM);
+}
+public static Class testClass() {
+	return Jsr335ClassFileTest.class;
+}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
new file mode 100644
index 0000000..ce9a660
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LambdaExpressionsTest.java
@@ -0,0 +1,1707 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import junit.framework.Test;
+public class LambdaExpressionsTest extends AbstractRegressionTest {
+
+static {
+//	TESTS_NAMES = new String[] { "testSuperReference03"};
+//	TESTS_NUMBERS = new int[] { 50 };
+//	TESTS_RANGE = new int[] { 11, -1 };
+}
+public LambdaExpressionsTest(String name) {
+	super(name);
+}
+public static Test suite() {
+	return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+}
+
+public void test001() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"  int add(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    I i = (x, y) -> {\n" +
+				"      return x + y;\n" +
+				"    };\n" +
+				"    System.out.println(i.add(1234, 5678));\n" +
+				"  }\n" +
+				"}\n",
+			},
+			"6912"
+			);
+}
+public void test002() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface Greetings {\n" +
+				"  void greet(String head, String tail);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    Greetings g = (x, y) -> {\n" +
+				"      System.out.println(x + y);\n" +
+				"    };\n" +
+				"    g.greet(\"Hello, \", \"World!\");\n" +
+				"  }\n" +
+				"}\n",
+			},
+			"Hello, World!"
+			);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406178,  [1.8][compiler] Some functional interfaces are wrongly rejected
+public void test003() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"  void foo(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    BinaryOperator<String> binOp = (x,y) -> { return x+y; };\n" +
+				"    System.out.println(\"SUCCESS\");\n" +
+				"    // System.out.println(binOp.apply(\"SUCC\", \"ESS\")); // when lambdas run\n" +
+				"  }\n" +
+				"}\n",
+				"BiFunction.java",
+				"@FunctionalInterface\n" + 
+				"public interface BiFunction<T, U, R> {\n" + 
+				"    R apply(T t, U u);\n" + 
+				"}",
+				"BinaryOperator.java",
+				"@FunctionalInterface\n" + 
+				"public interface BinaryOperator<T> extends BiFunction<T,T,T> {\n" + 
+				"}"
+			},
+			"SUCCESS");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406178,  [1.8][compiler] Some functional interfaces are wrongly rejected
+public void test004() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"  void foo(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    BinaryOperator binOp = (x,y) -> { return x+y; };\n" +
+				"    System.out.println(\"SUCCESS\");\n" +
+				"    // System.out.println(binOp.apply(\"SUCC\", \"ESS\")); // when lambdas run\n" +
+				"  }\n" +
+				"}\n",
+				"BiFunction.java",
+				"@FunctionalInterface\n" + 
+				"public interface BiFunction<T, U, R> {\n" + 
+				"    R apply(T t, U u);\n" + 
+				"}",
+				"BinaryOperator.java",
+				"@FunctionalInterface\n" + 
+				"public interface BinaryOperator<T> extends BiFunction<T,T,T> {\n" + 
+				"}"
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 6)\n" + 
+			"	BinaryOperator binOp = (x,y) -> { return x+y; };\n" + 
+			"	^^^^^^^^^^^^^^\n" + 
+			"BinaryOperator is a raw type. References to generic type BinaryOperator<T> should be parameterized\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	BinaryOperator binOp = (x,y) -> { return x+y; };\n" + 
+			"	                                         ^^^\n" + 
+			"The operator + is undefined for the argument type(s) java.lang.Object, java.lang.Object\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test005() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String id(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = (s) -> s;\n" +
+				"		System.out.println(i.id(\"Hello\"));\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"Hello");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test006() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String id(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = (s) -> s + s;\n" +
+				"		System.out.println(i.id(\"Hello\"));\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"HelloHello");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test007() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void print(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = (s) -> System.out.println(s);\n" +
+				"		i.print(\"Hello\");\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"Hello");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test008() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String print(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = (s) -> new String(s).toUpperCase();\n" +
+				"		System.out.println(i.print(\"Hello\"));\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"HELLO");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test009() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String print(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = (s) -> new String(s);\n" +
+				"		System.out.println(i.print(\"Hello\"));\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"Hello");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test010() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	int unbox(Integer i);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = (s) -> s;\n" +
+				"		System.out.println(i.unbox(new Integer(1234)));\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"1234");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test011() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer box(int i);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = (s) -> s;\n" +
+				"		System.out.println(i.box(1234));\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"1234");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test012() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	X subType();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = () -> new Y();\n" +
+				"		System.out.println(i.subType());\n" +
+				"	}\n" +
+				"}\n" +
+				"class Y extends X {\n" +
+				"    public String toString() {\n" +
+				"        return \"Some Y\";\n" +
+				"    }\n" +
+				"}"
+			},
+			"Some Y");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406175, [1.8][compiler][codegen] Generate code for lambdas with expression body.
+public void test013() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        int in = 12345678;\n" +
+				"        I i = (s) -> {\n" +
+				"            I j = (s2) -> {\n" +
+				"                System.out.println(s + s2 + in);  \n" +
+				"            };\n" +
+				"            j.foo(\"Number=\");\n" +
+				"        };\n" +
+				"        i.foo(\"The \");\n" +
+				"    }\n" +
+				"}\n"
+			},
+			"The Number=12345678");
+}
+public void test014() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void nonmain(String[] args) {\n" + 
+					"    int var = 2;\n" + 
+					"    I x2 = () -> {\n" + 
+					"      System.out.println(\"Argc = \" + args.length);\n" + 
+					"      for (int i = 0; i < args.length; i++) {\n" +
+					"          System.out.println(\"Argv[\" + i + \"] = \" + args[i]);\n" +
+					"      }\n" +
+					"    };\n" +
+					"    x2.doit();\n" +
+					"    var=2;\n" + 
+					"  }\n" +
+					"  public static void main(String[] args) {\n" + 
+					"      nonmain(new String[] {\"Hello! \", \"World!\" });\n" +
+					"  }\n" +
+					"}" ,
+				},
+				"Argc = 2\n" + 
+				"Argv[0] = Hello! \n" + 
+				"Argv[1] = World!");
+}
+public void test015() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    try {\n" + 
+					"      new java.io.File((String) null).getCanonicalPath();\n" + 
+					"    } catch (NullPointerException | java.io.IOException ioe) {\n" + 
+					"      I x2 = () -> {\n" + 
+					"        System.out.println(ioe.getMessage()); // OK: args is not re-assignment since declaration/first assignment\n" + 
+					"      };\n" +
+					"      x2.doit();\n" +
+					"    };\n"+
+					"  }\n" +
+					"}\n"
+				},
+				"null");
+}
+public void test016() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    java.util.List<String> list = new java.util.ArrayList<>();\n" + 
+					"    list.add(\"SomeString\");\n" +
+					"    for (String s : list) {\n" + 
+					"      I x2 = () -> {\n" + 
+					"        System.out.println(s); // OK: args is not re-assignment since declaration/first assignment\n" + 
+					"      };\n" + 
+					"      x2.doit();\n" +
+					"    };\n" + 
+					"  }\n" + 
+					"\n" +
+					"}\n" ,
+				},
+				"SomeString");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406181, [1.8][compiler][codegen] IncompatibleClassChangeError when running code with lambda method
+public void test017() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void foo(int x, int y);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) {\n" +
+					"    BinaryOperator<String> binOp = (x,y) -> { return x+y; }; \n" +
+					"    System.out.println(binOp.apply(\"SUCC\", \"ESS\")); // when lambdas run\n" +
+					"  }\n" +
+					"}\n" +
+					"@FunctionalInterface\n" +
+					"interface BiFunction<T, U, R> { \n" +
+					"    R apply(T t, U u);\n" +
+					"}\n" +
+					"@FunctionalInterface \n" +
+					"interface BinaryOperator<T> extends BiFunction<T,T,T> { \n" +
+					"}\n",
+				},
+				"SUCCESS");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=405071, [1.8][compiler][codegen] Generate code for array constructor references
+public void test018() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X [][][] copy (short x);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = X[][][]::new;\n" +
+					"       I j = X[][][]::new;\n" +
+					"		X[][][] x = i.copy((short) 631);\n" +
+					"		System.out.println(x.length);\n" +
+					"       x = j.copy((short) 136);\n" +
+					"		System.out.println(x.length);\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"631\n" + 
+				"136");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=405071, [1.8][compiler][codegen] Generate code for array constructor references
+public void test019() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X [][][] copy (int x);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = X[][][]::new;\n" +
+					"       I j = X[][][]::new;\n" +
+					"		X[][][] x = i.copy(631);\n" +
+					"		System.out.println(x.length);\n" +
+					"       x = j.copy(136);\n" +
+					"		System.out.println(x.length);\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"631\n" + 
+				"136");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=405071, [1.8][compiler][codegen] Generate code for array constructor references
+public void test020() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X [][][] copy (Integer x);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = X[][][]::new;\n" +
+					"       I j = X[][][]::new;\n" +
+					"		X[][][] x = i.copy(631);\n" +
+					"		System.out.println(x.length);\n" +
+					"       x = j.copy(136);\n" +
+					"		System.out.println(x.length);\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"631\n" + 
+				"136");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=405071, [1.8][compiler][codegen] Generate code for array constructor references
+public void test021() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X [][][] copy (Integer x);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = X[][][]::new;\n" +
+					"       I j = X[][][]::new;\n" +
+					"		X[][][] x = i.copy(new Integer(631));\n" +
+					"		System.out.println(x.length);\n" +
+					"       x = j.copy(new Integer((short)136));\n" +
+					"		System.out.println(x.length);\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"631\n" + 
+				"136");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406388,  [1.8][compiler][codegen] Runtime evaluation of method reference produces "BootstrapMethodError: call site initialization exception"
+public void test022() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    Object copy(int [] ia);\n" +
+					"}\n" +
+					"interface J {\n" +
+					"	int [] copy(int [] ia);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = int[]::<String>clone;\n" +
+					"        int [] x = new int [] { 10, 20, 30 };\n" +
+					"        int [] y = (int []) i.copy(x);\n" +
+					"        if (x == y || x.length != y.length || x[0] != y[0] || x[1] != y[1] || x[2] != y[2]) {\n" +
+					"        	System.out.println(\"Broken\");\n" +
+					"        } else {\n" +
+					"        	System.out.println(\"OK\");\n" +
+					"        }\n" +
+					"        J j = int []::clone;\n" +
+					"        y = null;\n" +
+					"        y = j.copy(x);\n" +
+					"        if (x == y || x.length != y.length || x[0] != y[0] || x[1] != y[1] || x[2] != y[2]) {\n" +
+					"        	System.out.println(\"Broken\");\n" +
+					"        } else {\n" +
+					"        	System.out.println(\"OK\");\n" +
+					"        }\n" +
+					"    }\n" +
+					"}\n" ,
+				},
+				"OK\n" + 
+				"OK");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406388,  [1.8][compiler][codegen] Runtime evaluation of method reference produces "BootstrapMethodError: call site initialization exception"
+public void test023() {
+this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    Object copy(int [] ia);\n" +
+					"}\n" +
+					"\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = int[]::<String>clone;\n" +
+					"        int [] ia = (int []) i.copy(new int[10]);\n" +
+					"        System.out.println(ia.length);\n" +
+					"    }\n" +
+					"}\n",
+				},
+				"10");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406388,  [1.8][compiler][codegen] Runtime evaluation of method reference produces "BootstrapMethodError: call site initialization exception"
+public void test024() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    YBase copy(Y ia);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = Y::<String>copy;\n" +
+					"        YBase yb = i.copy(new Y());\n" +
+					"        System.out.println(yb.getClass());\n" +
+					"    }\n" +
+					"}\n" +
+					"class YBase {\n" +
+					"	public YBase copy() {\n" +
+					"		return this;\n" +
+					"	}\n" +
+					"}\n" +
+					"class Y extends YBase {\n" +
+					"}\n",
+				},
+				"class Y");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406388,  [1.8][compiler][codegen] Runtime evaluation of method reference produces "BootstrapMethodError: call site initialization exception"
+public void test025() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    int foo(int [] ia);\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = int[]::<String>hashCode;\n" +
+					"        i.foo(new int[10]);\n" +
+					"    }\n" +
+					"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406589, [1.8][compiler][codegen] super call misdispatched 
+public void test026() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	Integer foo(int x, int y);\n" +
+					"}\n" +
+					"class Y {\n" +
+					"	int foo(int x, int y) {\n" +
+					"		System.out.println(\"Y.foo(\" + x + \",\" + y + \")\");\n" +
+					"		return foo(x, y);\n" +
+					"	}\n" +
+					"}\n" +
+					"public class X extends Y {\n" +
+					"	int foo(int x, int y) {\n" +
+					"		System.out.println(\"X.foo(\" + x + \",\" + y + \")\");\n" +
+					"		return x + y;\n" +
+					"	}\n" +
+					"	void goo() {\n" +
+					"		I i = super::foo;\n" +
+					"		System.out.println(i.foo(1234, 4321));\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().goo();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"Y.foo(1234,4321)\n" + 
+				"X.foo(1234,4321)\n" + 
+				"5555");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406589, [1.8][compiler][codegen] super call misdispatched 
+public void test027() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	int foo(int x, int y);\n" +
+					"}\n" +
+					"interface J {\n" +
+					"	default int foo(int x, int y) {\n" +
+					"		System.out.println(\"I.foo(\" + x + \",\" + y + \")\");\n" +
+					"		return x + y;\n" +
+					"	}\n" +
+					"}\n" +
+					"public class X implements J {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = new X().f();\n" +
+					"		System.out.println(i.foo(1234, 4321));\n" +
+					"		i = new X().g();\n" +
+					"		try {\n" +
+					"			System.out.println(i.foo(1234, 4321));\n" +
+					"		} catch (Throwable e) {\n" +
+					"			System.out.println(e.getMessage());\n" +
+					"		}\n" +
+					"	}\n" +
+					"	I f() {\n" +
+					"		return J.super::foo;\n" +
+					"	}\n" +
+					"	I g() {\n" +
+					"		return new X()::foo;\n" +
+					"	}\n" +
+					"	public int foo(int x, int y) {\n" +
+					"		throw new RuntimeException(\"Exception\");\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"I.foo(1234,4321)\n" + 
+				"5555\n" + 
+				"Exception");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406584, Bug 406584 - [1.8][compiler][codegen] ClassFormatError: Invalid method signature 
+public void test028() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    Object copy();\n" +
+					"}\n" +
+					"public class X  {\n" +
+					"    public static void main(String [] args) {\n" +
+					"    	int [] x = new int[] { 0xdeadbeef, 0xfeedface };\n" +
+					"    	I i = x::<String>clone;\n" +
+					"       System.out.println(Integer.toHexString(((int []) i.copy())[0]));\n" +
+					"       System.out.println(Integer.toHexString(((int []) i.copy())[1]));\n" +
+					"    }\n" +
+					"}\n",
+				},
+				"deadbeef\n" + 
+				"feedface");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406588, [1.8][compiler][codegen] java.lang.invoke.LambdaConversionException: Incorrect number of parameters for static method newinvokespecial 
+public void test029() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X.Y.Z makexyz(int val);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public static void main(String args []) {\n" +
+					"		new X().new Y().new Z().new P().goo();\n" +
+					"	}\n" +
+					"	class Y {\n" +
+					"		class Z {\n" +
+					"			Z(int val) {\n" +
+					"				System.out.println(Integer.toHexString(val));\n" +
+					"			}	\n" +
+					"			Z() {\n" +
+					"			}\n" +
+					"			class P {\n" +
+					"				void goo() {\n" +
+					"					I i = Z::new;\n" +
+					"					i.makexyz(0xdeadbeef);\n" +
+					"				}\n" +
+					"				I i = Z::new;\n" +
+					"				{ i.makexyz(0xfeedface); }\n" +
+					"			}\n" +
+					"		}\n" +
+					"		I i = Z::new;\n" +
+					"		{ i.makexyz(0xbeeffeed); }\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"beeffeed\n" + 
+				"feedface\n" + 
+				"deadbeef");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406588, [1.8][compiler][codegen] java.lang.invoke.LambdaConversionException: Incorrect number of parameters for static method newinvokespecial 
+public void test030() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X.Y makeY();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public class Y {\n" +
+					"       public String toString() {\n" +
+					"           return \"class Y\";\n" +
+					"   }\n" +
+					"	}\n" +
+					"	void foo() {\n" +
+					"		I i = Y::new;\n" +
+					"		System.out.println(i.makeY());\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().foo();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"class Y");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406588, [1.8][compiler][codegen] java.lang.invoke.LambdaConversionException: Incorrect number of parameters for static method newinvokespecial 
+public void test031() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X.Y makeY(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	class Y {\n" +
+					"		String state; \n" +
+					"		Y(int x) {\n" +
+					"			state = Integer.toHexString(x);\n" +
+					"		}\n" +
+					"		public String toString() {\n" +
+					"			return state;\n" +
+					"		}\n" +
+					"	}\n" +
+					"	class Z extends Y {\n" +
+					"		Z(int x) {\n" +
+					"			super(x);\n" +
+					"		}\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().f();\n" +
+					"	}\n" +
+					"	void f() {\n" +
+					"		I i = Y::new;\n" +
+					"		System.out.println(i.makeY(0xdeadbeef));\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"deadbeef");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406588, [1.8][compiler][codegen] java.lang.invoke.LambdaConversionException: Incorrect number of parameters for static method newinvokespecial 
+public void test032() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X.Y makeY(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	class Y {\n" +
+					"		String state; \n" +
+					"		Y(int x) {\n" +
+					"			state = Integer.toHexString(x);\n" +
+					"		}\n" +
+					"		public String toString() {\n" +
+					"			return state;\n" +
+					"		}\n" +
+					"	}\n" +
+					"	class Z extends Y {\n" +
+					"		Z(int x) {\n" +
+					"			super(x);\n" +
+					"		}\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().f();\n" +
+					"	}\n" +
+					"	void f() {\n" +
+					"		I i = Z::new;\n" +
+					"		System.out.println(i.makeY(0xdeadbeef));\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"deadbeef");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406588, [1.8][compiler][codegen] java.lang.invoke.LambdaConversionException: Incorrect number of parameters for static method newinvokespecial 
+public void test033() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X.Y.Z makeY(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	class Y {\n" +
+					"		Y() {\n" +
+					"		}\n" +
+					"		class Z {\n" +
+					"			String state;\n" +
+					"			Z(int x) {\n" +
+					"				state = Integer.toHexString(x);\n" +
+					"			}\n" +
+					"			public String toString() {\n" +
+					"				return state;\n" +
+					"			}\n" +
+					"		}\n" +
+					"	}\n" +
+					"	class YS extends Y {\n" +
+					"		YS() {\n" +
+					"		}\n" +
+					"		void f() {\n" +
+					"			I i = Z::new;\n" +
+					"			System.out.println(i.makeY(0xbeefface));\n" +
+					"		}\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().new YS().f();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"beefface");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406319, [1.8][compiler][codegen] Generate code for enclosing instance capture in lambda methods. 
+public void test034() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    int foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    int f = 1234;\n" +
+					"    void foo() {\n" +
+					"        int x = 4321;\n" +
+					"        I i = () -> x + f;\n" +
+					"        System.out.println(i.foo());\n" +
+					"    }\n" +
+					"    public static void main(String[] args) {\n" +
+					"		new X().foo();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"5555");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406319, [1.8][compiler][codegen] Generate code for enclosing instance capture in lambda methods. 
+public void test035() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"			class Local {\n" +
+					"				void foo() {\n" +
+					"               }\n" +
+					"			};\n" +
+					"			new Local();\n" +
+					"		};\n" +
+					"   }\n" +
+					"	public static void main(String[] args) {\n" +
+					"		System.out.println(\"OK\");\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"OK");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406319, [1.8][compiler][codegen] Generate code for enclosing instance capture in lambda methods. 
+public void test036() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    String foo(String x, String y);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    String xf = \"Lambda \";\n" +
+					"    String x() {\n" +
+					"    	String xl = \"code \";\n" +
+					"    	class Y {\n" +
+					"			String yf = \"generation \";\n" +
+					"			String y () {\n" +
+					"				String yl = \"with \";\n" +
+					"				class Z {\n" +
+					"					String zf = \"instance \";\n" +
+					"					String z () {\n" +
+					"						String zl = \"and \";\n" +
+					"						class P {\n" +
+					"							String pf = \"local \";\n" +
+					"							String p () {\n" +
+					"								String pl = \"capture \";\n" +
+					"								I i = (x1, y1) -> {\n" +
+					"									return (((I) ((x2, y2) -> {\n" +
+					"										return ( ((I) ((x3, y3) -> {\n" +
+					"											return xf + xl + yf + yl + zf + zl + pf + pl + x3 + y3;\n" +
+					"										})).foo(\"works \", \"fine \") + x2 + y2);\n" +
+					"									})).foo(\"in \", \"the \") + x1 + y1);\n" +
+					"								};\n" +
+					"								return i.foo(\"eclipse \", \"compiler \");\n" +
+					"							}\n" +
+					"						}\n" +
+					"						return new P().p();\n" +
+					"					}\n" +
+					"				}\n" +
+					"				return new Z().z();\n" +
+					"			}\n" +
+					"    	}\n" +
+					"    	return new Y().y();\n" +
+					"    }\n" +
+					"    public static void main(String[] args) {\n" +
+					"	System.out.println(new X().x());\n" +
+					"    }\n" +
+					"}\n",
+				},
+				"Lambda code generation with instance and local capture works fine in the eclipse compiler");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406319, [1.8][compiler][codegen] Generate code for enclosing instance capture in lambda methods. 
+public void test037() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    String foo(String x, String y);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    String xf = \"Lambda \";\n" +
+					"    String x() {\n" +
+					"    	String xl = \"code \";\n" +
+					"    	class Y {\n" +
+					"			String yf = \"generation \";\n" +
+					"			String y () {\n" +
+					"				String yl = \"with \";\n" +
+					"				class Z {\n" +
+					"					String zf = \"instance \";\n" +
+					"					String z () {\n" +
+					"						String zl = \"and \";\n" +
+					"						class P {\n" +
+					"							String pf = \"local \";\n" +
+					"							String p () {\n" +
+					"								String pl = \"capture \";\n" +
+					"								I i = (x1, y1) -> {\n" +
+					"									return (((I) ((x2, y2) -> {\n" +
+					"										return ( ((I) ((x3, y3) -> {\n" +
+					"                                           String exclaim = \"!\";\n" +
+					"											return xf + xl + yf + yl + zf + zl + pf + pl + x3 + y3 + x2 + y2 + x1 + y1 + exclaim;\n" +
+					"										})).foo(\"works \", \"fine \"));\n" +
+					"									})).foo(\"in \", \"the \"));\n" +
+					"								};\n" +
+					"								return i.foo(\"eclipse \", \"compiler \");\n" +
+					"							}\n" +
+					"						}\n" +
+					"						return new P().p();\n" +
+					"					}\n" +
+					"				}\n" +
+					"				return new Z().z();\n" +
+					"			}\n" +
+					"    	}\n" +
+					"    	return new Y().y();\n" +
+					"    }\n" +
+					"    public static void main(String[] args) {\n" +
+					"	System.out.println(new X().x());\n" +
+					"    }\n" +
+					"}\n",
+				},
+				"Lambda code generation with instance and local capture works fine in the eclipse compiler !");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406641, [1.8][compiler][codegen] Code generation for intersection cast.
+public void test038() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"}\n" +
+					"interface J {\n" +
+					"}\n" +
+					"public class X implements I, J {\n" +
+					"	public static void main( String [] args) { \n" +
+					"		f(new X());\n" +
+					"	}\n" +
+					"	static void f(Object o) {\n" +
+					"		X x = (X & I & J) o;\n" +
+					"       System.out.println(\"OK\");\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"OK");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406641, [1.8][compiler][codegen] Code generation for intersection cast.
+public void test039() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"}\n" +
+					"interface J {\n" +
+					"}\n" +
+					"public class X implements J {\n" +
+					"	public static void main( String [] args) { \n" +
+					"		f(new X());\n" +
+					"	}\n" +
+					"	static void f(Object o) {\n" +
+					"       try {\n" +
+					"		    X x = (X & I & J) o;\n" +
+					"       } catch (ClassCastException e) {\n" +
+					"           System.out.println(e.getMessage());\n" +
+					"       }\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"X cannot be cast to I");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406744, [1.8][compiler][codegen] LambdaConversionException seen when method reference targets a varargs method
+public void _test040() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"    void foo(Integer a1, Integer a2, String a3);\n" +
+					"}\n" +
+					"class Y {\n" +
+					"    static void m(Number a1, Object... rest) { \n" +
+					"        System.out.println(a1);\n" +
+					"        print(rest);\n" +
+					"    }\n" +
+					"    static void print (Object [] o) {\n" +
+					"        for (int i = 0; i < o.length; i++)\n" +
+					"            System.out.println(o[i]);\n" +
+					"    }\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    public static void main(String [] args) {\n" +
+					"        I i = Y::m;\n" +
+					"        i.foo(10, 20, \"10, 20\");\n" +
+					"    }\n" +
+					"}\n",
+				},
+				"X cannot be cast to I");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test041() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X makeX(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	class Z {\n" +
+					"		void f() {\n" +
+					"			I i = X::new;\n" +
+					"			i.makeX(123456);\n" +
+					"		}\n" +
+					"	}\n" +
+					"	private X(int x) {\n" +
+					"		System.out.println(x);\n" +
+					"	}\n" +
+					"	X() {\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().new Z().f();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"123456");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test042() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X makeX(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	class Y extends X {\n" +
+					"		class Z {\n" +
+					"			void f() {\n" +
+					"				I i = X::new;\n" +
+					"				i.makeX(123456);\n" +
+					"				i = Y::new;\n" +
+					"				i.makeX(987654);\n" +
+					"			}\n" +
+					"		}\n" +
+					"		private Y(int y) {\n" +
+					"			System.out.println(\"Y(\" + y + \")\");\n" +
+					"		}\n" +
+					"		private Y() {\n" +
+					"			\n" +
+					"		}\n" +
+					"	}\n" +
+					"	private X(int x) {\n" +
+					"		System.out.println(\"X(\" + x + \")\");\n" +
+					"	}\n" +
+					"\n" +
+					"	X() {\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().new Y().new Z().f();\n" +
+					"	}\n" +
+					"\n" +
+					"}\n",
+				},
+				"X(123456)\n" + 
+				"Y(987654)");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test043() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X makeX(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	class Y extends X {\n" +
+					"		class Z extends X {\n" +
+					"			void f() {\n" +
+					"				I i = X::new;\n" +
+					"				i.makeX(123456);\n" +
+					"				i = Y::new;\n" +
+					"				i.makeX(987654);\n" +
+					"               i = Z::new;\n" +
+					"               i.makeX(456789);\n" +
+					"			}\n" +
+					"       	private Z(int z) {\n" +
+					"				System.out.println(\"Z(\" + z + \")\");\n" +
+					"			}\n" +
+					"           Z() {\n" +
+					"           }\n" +
+					"       }\n" +
+					"		private Y(int y) {\n" +
+					"			System.out.println(\"Y(\" + y + \")\");\n" +
+					"		}\n" +
+					"		private Y() {\n" +
+					"			\n" +
+					"		}\n" +
+					"	}\n" +
+					"	private X(int x) {\n" +
+					"		System.out.println(\"X(\" + x + \")\");\n" +
+					"	}\n" +
+					"\n" +
+					"	X() {\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().new Y().new Z().f();\n" +
+					"	}\n" +
+					"\n" +
+					"}\n",
+				},
+				"X(123456)\n" + 
+				"Y(987654)\n" + 
+				"Z(456789)");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test044() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X makeX(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	void foo() {\n" +
+					"		int local;\n" +
+					"		class Y extends X {\n" +
+					"			class Z extends X {\n" +
+					"				void f() {\n" +
+					"					I i = X::new;\n" +
+					"					i.makeX(123456);\n" +
+					"					i = Y::new;\n" +
+					"					i.makeX(987654);\n" +
+					"					i = Z::new;\n" +
+					"					i.makeX(456789);\n" +
+					"				}\n" +
+					"				private Z(int z) {\n" +
+					"					System.out.println(\"Z(\" + z + \")\");\n" +
+					"				}\n" +
+					"				Z() {}\n" +
+					"			}\n" +
+					"			private Y(int y) {\n" +
+					"				System.out.println(\"Y(\" + y + \")\");\n" +
+					"			}\n" +
+					"			private Y() {\n" +
+					"			}\n" +
+					"		}\n" +
+					"		new Y().new Z().f();\n" +
+					"	}\n" +
+					"	private X(int x) {\n" +
+					"		System.out.println(\"X(\" + x + \")\");\n" +
+					"	}\n" +
+					"\n" +
+					"	X() {\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().foo();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"X(123456)\n" + 
+				"Y(987654)\n" + 
+				"Z(456789)");
+}
+public void test045() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	X makeX(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	I i = (x) -> {\n" +
+					"		class Y extends X {\n" +
+					"			private Y (int y) {\n" +
+					"				System.out.println(y);\n" +
+					"			}\n" +
+					"			Y() {\n" +
+					"			}\n" +
+					"			void f() {\n" +
+					"				I i = X::new;\n" +
+					"				i.makeX(123456);\n" +
+					"				i = X.Y::new;\n" +
+					"				i.makeX(987654);\n" +
+					"			}\n" +
+					"		}\n" +
+					"		return null; \n" +
+					"	};\n" +
+					"	private X(int x) {\n" +
+					"		System.out.println(x);\n" +
+					"	}\n" +
+					"	X() {\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().new Y().f();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 6)\n" + 
+				"	class Y extends X {\n" + 
+				"	      ^\n" + 
+				"The type Y is never used locally\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 7)\n" + 
+				"	private Y (int y) {\n" + 
+				"	        ^^^^^^^^^\n" + 
+				"The constructor Y(int) is never used locally\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 10)\n" + 
+				"	Y() {\n" + 
+				"	^^^\n" + 
+				"The constructor Y() is never used locally\n" + 
+				"----------\n" + 
+				"4. WARNING in X.java (at line 13)\n" + 
+				"	I i = X::new;\n" + 
+				"	  ^\n" + 
+				"The local variable i is hiding a field from type X\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 15)\n" + 
+				"	i = X.Y::new;\n" + 
+				"	      ^\n" + 
+				"Y cannot be resolved or is not a field\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 27)\n" + 
+				"	new X().new Y().f();\n" + 
+				"	            ^\n" + 
+				"X.Y cannot be resolved to a type\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406760, [1.8][compiler][codegen] "VerifyError: Bad type on operand stack" with qualified super method references
+public void test046() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	String doit();\n" +
+					"}\n" +
+					"public class X extends B {\n" +
+					"	class Y {\n" +
+					"		class Z {\n" +
+					"			void f() {\n" +
+					"				\n" +
+					"				 I i = X.super::toString; // Verify error\n" +
+					"				 System.out.println(i.doit());\n" +
+					"				 i = X.this::toString; // This call gets dispatched OK.\n" +
+					"				 System.out.println(i.doit());\n" +
+					"			}\n" +
+					"		}\n" +
+					"	}\n" +
+					"	\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().new Y().new Z().f(); \n" +
+					"	}\n" +
+					"	\n" +
+					"	public String toString() {\n" +
+					"		return \"X's toString\";\n" +
+					"	}\n" +
+					"}\n" +
+					"class B {\n" +
+					"	public String toString() {\n" +
+					"		return \"B's toString\";\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"B\'s toString\n" + 
+				"X\'s toString");
+}
+public void test047() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int x, int y);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		long lng = 1234;\n" +
+					"		double d = 1234.5678;\n" +
+					"		I i = (x, y) -> {\n" +
+					"			System.out.println(\"long = \" + lng);\n" +
+					"			System.out.println(\"args length = \" + args.length);\n" +
+					"			System.out.println(\"double = \" + d);\n" +
+					"			System.out.println(\"x = \" + x);\n" +
+					"			System.out.println(\"y = \" + y);\n" +
+					"		};\n" +
+					"		i.foo(9876, 4321);\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"long = 1234\n" + 
+				"args length = 0\n" + 
+				"double = 1234.5678\n" + 
+				"x = 9876\n" + 
+				"y = 4321");
+}
+public void test048() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I<T, J> {\n" +
+					"	void foo(T x, J y);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		long lng = 1234;\n" +
+					"		double d = 1234.5678;\n" +
+					"		I<Object, Object> i = (x, y) -> {\n" +
+					"			System.out.println(\"long = \" + lng);\n" +
+					"			System.out.println(\"args length = \" + args.length);\n" +
+					"			System.out.println(\"double = \" + d);\n" +
+					"			System.out.println(\"x = \" + x);\n" +
+					"			System.out.println(\"y = \" + y);\n" +
+					"		};\n" +
+					"		i.foo(9876, 4321);\n" +
+					"		\n" +
+					"		I<String, String> i2 = (x, y) -> {\n" +
+					"			System.out.println(x);\n" +
+					"			System.out.println(y);\n" +
+					"		};\n" +
+					"		i2.foo(\"Hello !\",  \"World\");\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"long = 1234\n" + 
+				"args length = 0\n" + 
+				"double = 1234.5678\n" + 
+				"x = 9876\n" + 
+				"y = 4321\n" + 
+				"Hello !\n" + 
+				"World");
+}
+public void test049() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I<T, J> {\n" +
+					"	void foo(X x, T t, J j);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I<String, String> i = X::foo;\n" +
+					"		i.foo(new X(), \"Hello\", \"World!\");\n" +
+					"	}\n" +
+					"	void foo(String s, String t) {\n" +
+					"		System.out.println(s);\n" +
+					"		System.out.println(t);\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"Hello\n" + 
+				"World!");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test050() {
+	this.runConformTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int x, int y);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	static private void add(int x, int y) {\n" +
+					"		System.out.println(x + y);\n" +
+					"	}\n" +
+					"	private void multiply(int x, int y) {\n" +
+					"		System.out.println(x * y);\n" +
+					"	}\n" +
+					"	static class Y {\n" +
+					"		static private void subtract(int x, int y) {\n" +
+					"			System.out.println(x - y);\n" +
+					"		}\n" +
+					"		private void divide (int x, int y) {\n" +
+					"			System.out.println(x / y);\n" +
+					"		}\n" +
+					"		static void doy() {\n" +
+					"			I i = X::add;\n" +
+					"			i.foo(1234, 12);\n" +
+					"			i = new X()::multiply;\n" +
+					"			i.foo(12, 20);\n" +
+					"			i = Y::subtract;\n" +
+					"			i.foo(123,  13);\n" +
+					"			i = new Y()::divide;\n" +
+					"			i.foo(99, 9);\n" +
+					"		}\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = X::add;\n" +
+					"		i.foo(1234, 12);\n" +
+					"		i = new X()::multiply;\n" +
+					"		i.foo(12, 20);\n" +
+					"		i = Y::subtract;\n" +
+					"		i.foo(123,  13);\n" +
+					"		i = new Y()::divide;\n" +
+					"		i.foo(99, 9);\n" +
+					"		Y.subtract(10,  7);\n" +
+					"		Y.doy();\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"1246\n" + 
+				"240\n" + 
+				"110\n" + 
+				"11\n" + 
+				"3\n" + 
+				"1246\n" + 
+				"240\n" + 
+				"110\n" + 
+				"11");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test051() {
+	this.runConformTest(
+			new String[] {
+					"p2/B.java",
+					"package p2;\n" +
+					"import p1.*;								\n" +
+					"interface I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"interface J {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"public class B extends A {\n" +
+					"	class Y {\n" +
+					"		void g() {\n" +
+					"			I i = B::foo;\n" +
+					"			i.foo();\n" +
+					"			J j = new B()::goo;\n" +
+					"			j.foo();\n" +
+					"		}\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new B().new Y().g();\n" +
+					"	}\n" +
+					"}\n",
+					"p1/A.java",
+					"package p1;\n" +
+					"import p2.*;\n" +
+					"public class A {\n" +
+					"	protected static void foo() {\n" +
+					"	    System.out.println(\"A's static foo\");\n" +
+					"	}\n" +
+					"	protected void goo() {\n" +
+					"	    System.out.println(\"A's instance goo\");\n" +
+					"	}\n" +
+					"}"
+				},
+				"A\'s static foo\n" + 
+				"A\'s instance goo");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test052() {
+	this.runConformTest(
+			new String[] {
+					"X.java", 
+					"interface I {\n" +
+					"	void foo(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	void foo() {\n" +
+					"		int local = 10;\n" +
+					"		class Y {\n" +
+					"			void foo(int x) {\n" +
+					"				System.out.println(local);\n" +
+					"			}\n" +
+					"			void goo() {\n" +
+					"				I i = this::foo;\n" +
+					"				i.foo(10);\n" +
+					"			}\n" +
+					"		}\n" +
+					"		new Y().goo();\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().foo();\n" +
+					"	}\n" +
+					"}\n"
+				},
+				"10");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406847, [1.8] lambda code compiles but then produces IncompatibleClassChangeError when run
+public void test053() {
+	  this.runConformTest(
+	    new String[] {
+	      "X.java",
+	      "import java.util.*;\n" +
+	      "public class X {\n" +
+	      "  public static <E> void printItem(E value, int index) {\n" +
+	      "    String output = String.format(\"%d -> %s\", index, value);\n" +
+	      "    System.out.println(output);\n" +
+	      "  }\n" +
+	      "  public static void main(String[] argv) {\n" +
+	      "    List<String> list = Arrays.asList(\"A\",\"B\",\"C\");\n" +
+	      "    eachWithIndex(list,X::printItem);\n" +
+	      "  }\n" +
+	      "  interface ItemWithIndexVisitor<E> {\n" +
+	      "    public void visit(E item, int index);\n" +
+	      "  }\n" +
+	      "  public static <E> void eachWithIndex(List<E> list, ItemWithIndexVisitor<E> visitor) {\n" +
+	      "    for (int i = 0; i < list.size(); i++) {\n" +
+	      "         visitor.visit(list.get(i), i);\n" +
+	      "    }\n" +
+	      "  }\n" +
+	      "}\n"
+	    },
+	    "0 -> A\n" + 
+	    "1 -> B\n" + 
+	    "2 -> C");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406847, [1.8] lambda code compiles but then produces IncompatibleClassChangeError when run
+public void test054() {
+	  this.runConformTest(
+	    new String[] {
+	      "X.java",
+	      "import java.util.*;\n" +
+	      "public class X {\n" +
+	      "  public static <E> void printItem(E value) {}\n" +
+	      "  public static void main(String[] argv) {\n" +
+	      "    List<String> list = null;\n" +
+	      "    eachWithIndex(list, X::printItem);\n" +
+	      "  }\n" +
+	      "  interface ItemWithIndexVisitor<E> {\n" +
+	      "    public void visit(E item);\n" +
+	      "  }\n" +
+	      "  public static <E> void eachWithIndex(List<E> list, ItemWithIndexVisitor<E> visitor) {}\n" +
+	      "}\n"
+	    },
+	    "");
+}
+public void test055() {
+	  this.runConformTest(
+	    new String[] {
+	      "X.java",
+	      "interface I {\n" +
+		  "	void foo(int i);\n" +
+		  "}\n" +
+		  "public class X {\n" +
+		  "	public static void main(String[] args) {\n" +
+		  "		X x = null;\n" +
+		  "		I i = x::foo;\n" +
+		  "	}\n" +
+		  "	int foo(int x) {\n" +
+		  "		return x;\n" +
+		  "	}\n" +
+		  "}\n" 
+	    },
+	    "");
+}
+public void test056() {
+	  this.runConformTest(
+	    new String[] {
+	      "X.java",
+	      "interface I {\n" +
+		  "	void foo(int i);\n" +
+		  "}\n" +
+		  "public class X {\n" +
+		  "	public static void main(String[] args) {\n" +
+		  "		X x = null;\n" +
+		  "		I i = x::foo;\n" +
+		  "		try {\n" +
+		  "			i.foo(10);\n" +
+		  "		} catch (NullPointerException npe) {\n" +
+		  "			System.out.println(npe.getMessage());\n" +
+		  "		}\n" +
+		  "	}\n" +
+		  "	int foo(int x) {\n" +
+		  "		return x;\n" +
+		  "	}\n" +
+		  "}\n" 
+	    },
+	    "null");
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=410114, [1.8] CCE when trying to parse method reference expression with inappropriate type arguments
+public void test057() {
+	String source = "interface I {\n" +
+			"    void foo(Y<String> y);\n" +
+			"}\n" +
+			"public class Y<T> {\n" +
+			"    class Z<K> {\n" +
+			"        Z(Y<String> y) {\n" +
+			"            System.out.println(\"Y<T>.Z<K>:: new\");\n" +
+			"        }\n" +
+			"        public void bar() {\n" +
+			"            I i = Y<String>.Z<Integer>::<String> new;\n" +
+			"            i.foo(new Y<String>());\n" +
+			"            i = Y<String>.Z<Integer>:: new;\n" +
+			"            i.foo(new Y<String>());\n" +
+			"            i = Y.Z:: new;\n" +
+			"            i.foo(new Y<String>());\n" +
+			"        }\n" +
+			"    }\n" +
+			"	public void foo() {\n" +
+		    "		Z<String> z = new Z<String>(null);\n" +
+			"		z.bar();\n" +
+		    "	}\n" +
+		    "	public static void main(String[] args) {\n" +
+		    "		Y<String> y = new Y<String>();\n" +
+		    "		y.foo();\n" +
+		    "	}\n" +
+			"}\n";
+this.runConformTest(
+	new String[]{"Y.java",
+				source},
+				"Y<T>.Z<K>:: new\n" +
+				"Y<T>.Z<K>:: new\n" +
+				"Y<T>.Z<K>:: new\n" +
+				"Y<T>.Z<K>:: new");
+}
+// Bug 411273 - [1.8][compiler] Bogus error about unhandled exceptions for unchecked exceptions thrown by method reference.
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=411273
+public void test058() {
+	this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		F1 f = X::foo;\n" +
+				"		System.out.println(\"Hello, World\");\n" +
+				"	}\n" +
+				"    static int foo (int x) throws NumberFormatException { return 0; }\n" +
+				"}\n" +
+				"interface F1 { int X(int x);}\n"
+			},
+			"Hello, World"
+			);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420582,  [1.8][compiler] Compiler should allow creation of generic array creation with unbounded wildcard type arguments
+public void testGenericArrayCreation() {
+		this.runConformTest(
+			new String[] {
+					"X.java", 
+					"interface I {\n" +
+					"	X<?, ?, ?>[] makeArray(int i);\n" +
+					"}\n" +
+					"public class X<T, U, V> {\n" +
+					"	public static void main(String [] args) {\n" +
+					"		I i = X<?, ?, ?>[]::new; // OK.\n" +
+					"		System.out.println(i.makeArray(1024).length);\n" +
+					"	}\n" +
+					"}\n" + 
+					""
+			},
+			"1024"
+		);
+}
+
+public static Class testClass() {
+	return LambdaExpressionsTest.class;
+}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java
index a53b3e5..8bdc3b6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LookupTest.java
@@ -1,13 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for bug 185682 - Increment/decrement operators mark local variables as read
+ *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for
+ *	 							bug 185682 - Increment/decrement operators mark local variables as read
+ *								bug 388800 - [1.8] adjust tests to 1.8 JRE
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -2561,6 +2567,8 @@
 				"        public int size() {\n" +
 				"                return 0;\n" +
 				"        }\n" +
+				getCollectionAndListRawImplJRE8() +
+				getIterableRawImplJRE8() +
 				"}", // =================
 			},
 			"");
@@ -2981,7 +2989,7 @@
 		"3. ERROR in X.java (at line 4)\n" + 
 		"	public volatile void foo() {}\n" + 
 		"	                     ^^^^^\n" + 
-		"Illegal modifier for the method foo; only public, protected, private, static, final, abstract, synchronized & native are permitted\n" + 
+		"Illegal modifier for the method foo; only public, protected, private, abstract, static, final, synchronized, native & strictfp are permitted\n" + 
 		"----------\n"
 	);
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodParametersAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodParametersAttributeTest.java
new file mode 100644
index 0000000..b33a366
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodParametersAttributeTest.java
@@ -0,0 +1,903 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper Steen Moeller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     Jesper Steen Moeller - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.ToolFactory;
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException;
+import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+public class MethodParametersAttributeTest extends AbstractRegressionTest {
+	public MethodParametersAttributeTest(String name) {
+		super(name);
+	}
+
+	public static Class testClass() {
+		return MethodParametersAttributeTest.class;
+	}
+
+	// Use this static initializer to specify subset for tests
+	// All specified tests which does not belong to the class are skipped...
+	static {
+//		TESTS_PREFIX = "test012";
+//		TESTS_NAMES = new String[] { "testBug359495" };
+//		TESTS_NUMBERS = new int[] { 53 };
+//		TESTS_RANGE = new int[] { 23 -1,};
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+	
+	String originalSource =
+		"import java.util.concurrent.Callable;\n" + 
+		"\n" + 
+		"public class ParameterNames {\n" + 
+		"	\n" + 
+		"	public void someMethod(int simple, final double complex) {\n" + 
+		"	}\n" + 
+		"	\n" + 
+		"	public Callable<String> makeInnerWithCapture(final String finalMessage, String mutableMessage) {\n" + 
+		"		return new Callable<String>()  {\n" + 
+		"			public String call() throws Exception {\n" + 
+		"				return finalMessage;\n" + 
+		"			}\n" + 
+		"		};\n" + 
+		"	}\n" + 
+		"\n" + 
+		"	public int localMath(final String finalMessage, String mutableMessage) {\n" + 
+		"		int capturedB = 42;\n" + 
+		"		\n" + 
+		"		class Local {\n" + 
+		"			int fieldA;\n" + 
+		"			Local(int a) {\n" + 
+		"				this.fieldA = a;\n" + 
+		"			}\n" + 
+		"			int calculate(final int parameterC) {\n" + 
+		"				return  this.fieldA + capturedB + parameterC;\n" + 
+		"			}\n" + 
+		"		}\n" + 
+		"		\n" + 
+		"		return new Local(2).calculate(3);\n" + 
+		"	}\n" + 
+		"\n" + 
+		"}\n" + 
+		"";
+
+	public void test001() throws Exception {
+
+			ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+			String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "ParameterNames.class";
+			byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+			String actualOutput =
+				disassembler.disassemble(
+					classFileBytes,
+					"\n",
+					ClassFileBytesDisassembler.DETAILED);
+
+			String expectedOutput =
+					"// Compiled from ParameterNames.java (version 1.8 : 52.0, super bit)\n" + 
+					"public class ParameterNames {\n" + 
+					"  \n" + 
+					"  // Method descriptor #12 ()V\n" + 
+					"  // Stack: 1, Locals: 1\n" + 
+					"  public ParameterNames();\n" + 
+					"    0  aload_0 [this]\n" + 
+					"    1  invokespecial java.lang.Object() [1]\n" + 
+					"    4  return\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 3]\n" + 
+					"  \n" + 
+					"  // Method descriptor #16 (ID)V\n" + 
+					"  // Stack: 0, Locals: 4\n" + 
+					"  public void someMethod(int simple, double complex);\n" + 
+					"    0  return\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 6]\n" + 
+					"      Method Parameters:\n" + 
+					"        simple\n" + 
+					"        final complex\n" + 
+					"  \n" + 
+					"  // Method descriptor #21 (Ljava/lang/String;Ljava/lang/String;)Ljava/util/concurrent/Callable;\n" + 
+					"  // Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/util/concurrent/Callable<Ljava/lang/String;>;\n" + 
+					"  // Stack: 4, Locals: 3\n" + 
+					"  public java.util.concurrent.Callable makeInnerWithCapture(java.lang.String finalMessage, java.lang.String mutableMessage);\n" + 
+					"     0  new ParameterNames$1 [2]\n" + 
+					"     3  dup\n" + 
+					"     4  aload_0 [this]\n" + 
+					"     5  aload_1 [finalMessage]\n" + 
+					"     6  invokespecial ParameterNames$1(ParameterNames, java.lang.String) [3]\n" + 
+					"     9  areturn\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 9]\n" + 
+					"      Method Parameters:\n" + 
+					"        final finalMessage\n" + 
+					"        mutableMessage\n" + 
+					"  \n" + 
+					"  // Method descriptor #27 (Ljava/lang/String;Ljava/lang/String;)I\n" + 
+					"  // Stack: 5, Locals: 4\n" + 
+					"  public int localMath(java.lang.String finalMessage, java.lang.String mutableMessage);\n" + 
+					"     0  bipush 42\n" + 
+					"     2  istore_3\n" + 
+					"     3  new ParameterNames$1Local [4]\n" + 
+					"     6  dup\n" + 
+					"     7  aload_0 [this]\n" + 
+					"     8  iconst_2\n" + 
+					"     9  iload_3\n" + 
+					"    10  invokespecial ParameterNames$1Local(ParameterNames, int, int) [5]\n" + 
+					"    13  iconst_3\n" + 
+					"    14  invokevirtual ParameterNames$1Local.calculate(int) : int [6]\n" + 
+					"    17  ireturn\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 17]\n" + 
+					"        [pc: 3, line: 29]\n" + 
+					"      Method Parameters:\n" + 
+					"        final finalMessage\n" + 
+					"        mutableMessage\n" + 
+					"\n" + 
+					"  Inner classes:\n" + 
+					"    [inner class info: #4 ParameterNames$1Local, outer class info: #0\n" + 
+					"     inner name: #9 Local, accessflags: 0 default],\n" + 
+					"    [inner class info: #2 ParameterNames$1, outer class info: #0\n" + 
+					"     inner name: #0, accessflags: 0 default]\n" + 
+					"}";
+
+
+			assertSubstring(actualOutput, expectedOutput);
+	}
+	public void test002() throws Exception {
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "ParameterNames$1.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+			"// Compiled from ParameterNames.java (version 1.8 : 52.0, super bit)\n" + 
+			"// Signature: Ljava/lang/Object;Ljava/util/concurrent/Callable<Ljava/lang/String;>;\n" + 
+			"class ParameterNames$1 implements java.util.concurrent.Callable {\n" + 
+			"  \n" + 
+			"  // Field descriptor #9 Ljava/lang/String;\n" + 
+			"  final synthetic java.lang.String val$finalMessage;\n" + 
+			"  \n" + 
+			"  // Field descriptor #11 LParameterNames;\n" + 
+			"  final synthetic ParameterNames this$0;\n" + 
+			"  \n" + 
+			"  // Method descriptor #13 (LParameterNames;Ljava/lang/String;)V\n" + 
+			"  // Stack: 2, Locals: 3\n" + 
+			"  ParameterNames$1(ParameterNames this$0, java.lang.String val$finalMessage);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  aload_1 [this$0]\n" + 
+			"     2  putfield ParameterNames$1.this$0 : ParameterNames [1]\n" + 
+			"     5  aload_0 [this]\n" + 
+			"     6  aload_2 [val$finalMessage]\n" + 
+			"     7  putfield ParameterNames$1.val$finalMessage : java.lang.String [2]\n" + 
+			"    10  aload_0 [this]\n" + 
+			"    11  invokespecial java.lang.Object() [3]\n" + 
+			"    14  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 9]\n" + 
+			"      Method Parameters:\n" + 
+			"        final mandated this$0\n" + 
+			"        final synthetic val$finalMessage\n" + 
+			"  \n" + 
+			"  // Method descriptor #18 ()Ljava/lang/String;\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public java.lang.String call() throws java.lang.Exception;\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  getfield ParameterNames$1.val$finalMessage : java.lang.String [2]\n" + 
+			"    4  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 11]\n" + 
+			"  \n" + 
+			"  // Method descriptor #21 ()Ljava/lang/Object;\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public bridge synthetic java.lang.Object call() throws java.lang.Exception;\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  invokevirtual ParameterNames$1.call() : java.lang.String [4]\n" + 
+			"    4  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 9]\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #5 ParameterNames$1, outer class info: #0\n" + 
+			"     inner name: #0, accessflags: 0 default]\n" + 
+			"  Enclosing Method: #27  #28 ParameterNames.makeInnerWithCapture(Ljava/lang/String;Ljava/lang/String;)Ljava/util/concurrent/Callable;\n" + 
+			"}";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+
+	public void test003() throws Exception {
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "ParameterNames$1Local.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+			"// Compiled from ParameterNames.java (version 1.8 : 52.0, super bit)\n" + 
+			"class ParameterNames$1Local {\n" + 
+			"  \n" + 
+			"  // Field descriptor #8 I\n" + 
+			"  int fieldA;\n" + 
+			"  \n" + 
+			"  // Field descriptor #8 I\n" + 
+			"  final synthetic int val$capturedB;\n" + 
+			"  \n" + 
+			"  // Field descriptor #11 LParameterNames;\n" + 
+			"  final synthetic ParameterNames this$0;\n" + 
+			"  \n" + 
+			"  // Method descriptor #13 (LParameterNames;II)V\n" + 
+			"  // Signature: (I)V\n" + 
+			"  // Stack: 2, Locals: 4\n" + 
+			"  ParameterNames$1Local(ParameterNames this$0, int val$capturedB, int a);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  aload_1 [this$0]\n" + 
+			"     2  putfield ParameterNames$1Local.this$0 : ParameterNames [1]\n" + 
+			"     5  aload_0 [this]\n" + 
+			"     6  iload_3 [a]\n" + 
+			"     7  putfield ParameterNames$1Local.val$capturedB : int [2]\n" + 
+			"    10  aload_0 [this]\n" + 
+			"    11  invokespecial java.lang.Object() [3]\n" + 
+			"    14  aload_0 [this]\n" + 
+			"    15  iload_2 [val$capturedB]\n" + 
+			"    16  putfield ParameterNames$1Local.fieldA : int [4]\n" + 
+			"    19  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 21]\n" + 
+			"        [pc: 14, line: 22]\n" + 
+			"        [pc: 19, line: 23]\n" + 
+			"      Method Parameters:\n" + 
+			"        final mandated this$0\n" + 
+			"        final synthetic val$capturedB\n" + 
+			"        a\n" + 
+			"  \n" + 
+			"  // Method descriptor #21 (I)I\n" + 
+			"  // Stack: 2, Locals: 2\n" + 
+			"  int calculate(int parameterC);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  getfield ParameterNames$1Local.fieldA : int [4]\n" + 
+			"     4  aload_0 [this]\n" + 
+			"     5  getfield ParameterNames$1Local.val$capturedB : int [2]\n" + 
+			"     8  iadd\n" + 
+			"     9  iload_1 [parameterC]\n" + 
+			"    10  iadd\n" + 
+			"    11  ireturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 25]\n" + 
+			"      Method Parameters:\n" + 
+			"        final parameterC\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #5 ParameterNames$1Local, outer class info: #0\n" + 
+			"     inner name: #33 Local, accessflags: 0 default]\n" + 
+			"  Enclosing Method: #26  #27 ParameterNames.localMath(Ljava/lang/String;Ljava/lang/String;)I\n" + 
+			"}";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+
+	public void test004() throws Exception {
+
+		// Test the results of the ClassFileReader
+		String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "ParameterNames.class";
+		
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = ClassFileReader.read(path);
+		IBinaryMethod[] methodInfos = classFileReader.getMethods();
+		assertNotNull("No method infos", methodInfos);
+		int length = methodInfos.length;
+		assertEquals("Must have four methods", 4, length);
+		assertEquals("finalMessage", new String(methodInfos[2].getArgumentNames()[0]));
+		assertEquals("mutableMessage", new String(methodInfos[2].getArgumentNames()[1]));
+	}
+
+	public void test005() throws Exception {
+		// Test the results of the ClassFileReader where some of the paramers are synthetic and/or mandated
+		String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "ParameterNames$1Local.class";
+		
+		org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader classFileReader = ClassFileReader.read(path);
+		IBinaryMethod[] methodInfos = classFileReader.getMethods();
+		assertNotNull("No method infos", methodInfos);
+		int length = methodInfos.length;
+		assertEquals("Must have two methods", 2, length);
+		assertEquals("this$0", new String(methodInfos[0].getArgumentNames()[0]));
+		assertEquals("val$capturedB", new String(methodInfos[0].getArgumentNames()[1]));
+	}
+	public void test006() throws Exception {
+		// Test that the code generator can emit the names, so the ClassFileReader may read them back
+		
+		this.runParameterNameTest(
+			"X.java",
+			"public class X {\n" +
+			"    X(int wholeNumber) {\n" +
+			"    }\n" +
+			"    void foo(final float pluggedTheHoles, boolean yesItFloats) {\n" +
+			"    }\n" +
+			"}");
+
+		try {
+			ClassFileReader classFileReader = ClassFileReader.read(OUTPUT_DIR + File.separator + "X.class");
+			IBinaryMethod[] methods = classFileReader.getMethods();
+			assertNotNull("No methods", methods);
+			assertEquals("Wrong size", 2, methods.length);
+			assertEquals("Wrong name", "<init>", new String(methods[0].getSelector()));
+			char[][] argumentNames = methods[0].getArgumentNames();
+			assertEquals("<init> should have 1 parameter", 1, argumentNames.length);
+			assertEquals("wholeNumber", new String(argumentNames[0]));
+			assertEquals("Wrong name", "foo", new String(methods[1].getSelector()));
+			assertEquals("pluggedTheHoles", new String(methods[1].getArgumentNames()[0]));
+			assertEquals("yesItFloats", new String(methods[1].getArgumentNames()[1]));
+		} catch (ClassFormatException e) {
+			assertTrue(false);
+		} catch (IOException e) {
+			assertTrue(false);
+		}
+	}
+
+	public void test007() throws Exception {
+		// Test that the code generator can emit the names, so the disassembler may read them back (same source as was compiled with javac)
+		
+		this.runParameterNameTest(
+			"ParameterNames.java",
+			this.originalSource);
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "ParameterNames.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+	
+		String expectedOutput =
+				"// Compiled from ParameterNames.java (version 1.8 : 52.0, super bit)\n" + 
+				"public class ParameterNames {\n" + 
+				"  \n" + 
+				"  // Method descriptor #6 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  public ParameterNames();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [8]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 3]\n" + 
+				"  \n" + 
+				"  // Method descriptor #12 (ID)V\n" + 
+				"  // Stack: 0, Locals: 4\n" + 
+				"  public void someMethod(int simple, double complex);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 6]\n" + 
+				"      Method Parameters:\n" + 
+				"        simple\n" + 
+				"        final complex\n" + 
+				"  \n" + 
+				"  // Method descriptor #17 (Ljava/lang/String;Ljava/lang/String;)Ljava/util/concurrent/Callable;\n" + 
+				"  // Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/util/concurrent/Callable<Ljava/lang/String;>;\n" + 
+				"  // Stack: 4, Locals: 3\n" + 
+				"  public java.util.concurrent.Callable makeInnerWithCapture(java.lang.String finalMessage, java.lang.String mutableMessage);\n" + 
+				"     0  new ParameterNames$1 [20]\n" + 
+				"     3  dup\n" + 
+				"     4  aload_0 [this]\n" + 
+				"     5  aload_1 [finalMessage]\n" + 
+				"     6  invokespecial ParameterNames$1(ParameterNames, java.lang.String) [22]\n" + 
+				"     9  areturn\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 9]\n" + 
+				"      Method Parameters:\n" + 
+				"        final finalMessage\n" + 
+				"        mutableMessage\n" + 
+				"  \n" + 
+				"  // Method descriptor #28 (Ljava/lang/String;Ljava/lang/String;)I\n" + 
+				"  // Stack: 5, Locals: 4\n" + 
+				"  public int localMath(java.lang.String finalMessage, java.lang.String mutableMessage);\n" + 
+				"     0  bipush 42\n" + 
+				"     2  istore_3\n" + 
+				"     3  new ParameterNames$1Local [29]\n" + 
+				"     6  dup\n" + 
+				"     7  aload_0 [this]\n" + 
+				"     8  iconst_2\n" + 
+				"     9  iload_3\n" + 
+				"    10  invokespecial ParameterNames$1Local(ParameterNames, int, int) [31]\n" + 
+				"    13  iconst_3\n" + 
+				"    14  invokevirtual ParameterNames$1Local.calculate(int) : int [34]\n" + 
+				"    17  ireturn\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 17]\n" + 
+				"        [pc: 3, line: 29]\n" + 
+				"      Method Parameters:\n" + 
+				"        final finalMessage\n" + 
+				"        mutableMessage\n" + 
+				"\n" + 
+				"  Inner classes:\n" + 
+				"    [inner class info: #20 ParameterNames$1, outer class info: #0\n" + 
+				"     inner name: #0, accessflags: 0 default],\n" + 
+				"    [inner class info: #29 ParameterNames$1Local, outer class info: #0\n" + 
+				"     inner name: #41 Local, accessflags: 0 default]\n" + 
+				"}";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+
+	public void test008() throws Exception {
+		// Test that the code generator can emit synthetic and mandated names, just to match javac as closely as possibly
+		
+		this.runParameterNameTest(
+			"ParameterNames.java",
+			this.originalSource);
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "ParameterNames$1.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+			"// Compiled from ParameterNames.java (version 1.8 : 52.0, super bit)\n" + 
+			"// Signature: Ljava/lang/Object;Ljava/util/concurrent/Callable<Ljava/lang/String;>;\n" + 
+			"class ParameterNames$1 implements java.util.concurrent.Callable {\n" + 
+			"  \n" + 
+			"  // Field descriptor #8 LParameterNames;\n" + 
+			"  final synthetic ParameterNames this$0;\n" + 
+			"  \n" + 
+			"  // Field descriptor #10 Ljava/lang/String;\n" + 
+			"  private final synthetic java.lang.String val$finalMessage;\n" + 
+			"  \n" + 
+			"  // Method descriptor #12 (LParameterNames;Ljava/lang/String;)V\n" + 
+			"  // Stack: 2, Locals: 3\n" + 
+			"  ParameterNames$1(ParameterNames this$0, java.lang.String val$finalMessage);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  aload_1 [this$0]\n" + 
+			"     2  putfield ParameterNames$1.this$0 : ParameterNames [14]\n" + 
+			"     5  aload_0 [this]\n" + 
+			"     6  aload_2 [val$finalMessage]\n" + 
+			"     7  putfield ParameterNames$1.val$finalMessage : java.lang.String [16]\n" + 
+			"    10  aload_0 [this]\n" + 
+			"    11  invokespecial java.lang.Object() [18]\n" + 
+			"    14  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 10, line: 9]\n" + 
+			"      Method Parameters:\n" + 
+			"        final mandated this$0\n" + 
+			"        final synthetic val$finalMessage\n" + 
+			"  \n" + 
+			"  // Method descriptor #24 ()Ljava/lang/String;\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public java.lang.String call() throws java.lang.Exception;\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  getfield ParameterNames$1.val$finalMessage : java.lang.String [16]\n" + 
+			"    4  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 11]\n" + 
+			"  \n" + 
+			"  // Method descriptor #28 ()Ljava/lang/Object;\n" + 
+			"  // Stack: 1, Locals: 1\n" + 
+			"  public bridge synthetic java.lang.Object call() throws java.lang.Exception;\n" + 
+			"    0  aload_0 [this]\n" + 
+			"    1  invokevirtual ParameterNames$1.call() : java.lang.String [29]\n" + 
+			"    4  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"\n" + 
+			"  Inner classes:\n" + 
+			"    [inner class info: #1 ParameterNames$1, outer class info: #0\n" + 
+			"     inner name: #0, accessflags: 0 default]\n" + 
+			"  Enclosing Method: #36  #38 ParameterNames.makeInnerWithCapture(Ljava/lang/String;Ljava/lang/String;)Ljava/util/concurrent/Callable;\n" + 
+			"}"	;
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+
+	public void test009() throws Exception {
+		// Test that the code generator can emit synthetic and mandated names, just to match javac as closely as possibly
+		
+		this.runParameterNameTest(
+			"FancyEnum.java",
+			"\n" + 
+			"public enum FancyEnum {\n" + 
+			"	ONE(1), TWO(2);\n" + 
+			"	\n" + 
+			"	private FancyEnum(final int v) { this.var = v; }\n" + 
+			"	int var;\n" + 
+			"}\n" + 
+			"");
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "FancyEnum.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+			"// Compiled from FancyEnum.java (version 1.8 : 52.0, super bit)\n" + 
+			"// Signature: Ljava/lang/Enum<LFancyEnum;>;\n" + 
+			"public final enum FancyEnum {\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LFancyEnum;\n" + 
+			"  public static final enum FancyEnum ONE;\n" + 
+			"  \n" + 
+			"  // Field descriptor #6 LFancyEnum;\n" + 
+			"  public static final enum FancyEnum TWO;\n" + 
+			"  \n" + 
+			"  // Field descriptor #9 I\n" + 
+			"  int var;\n" + 
+			"  \n" + 
+			"  // Field descriptor #11 [LFancyEnum;\n" + 
+			"  private static final synthetic FancyEnum[] ENUM$VALUES;\n" + 
+			"  \n" + 
+			"  // Method descriptor #13 ()V\n" + 
+			"  // Stack: 5, Locals: 0\n" + 
+			"  static {};\n" + 
+			"     0  new FancyEnum [1]\n" + 
+			"     3  dup\n" + 
+			"     4  ldc <String \"ONE\"> [15]\n" + 
+			"     6  iconst_0\n" + 
+			"     7  iconst_1\n" + 
+			"     8  invokespecial FancyEnum(java.lang.String, int, int) [16]\n" + 
+			"    11  putstatic FancyEnum.ONE : FancyEnum [20]\n" + 
+			"    14  new FancyEnum [1]\n" + 
+			"    17  dup\n" + 
+			"    18  ldc <String \"TWO\"> [22]\n" + 
+			"    20  iconst_1\n" + 
+			"    21  iconst_2\n" + 
+			"    22  invokespecial FancyEnum(java.lang.String, int, int) [16]\n" + 
+			"    25  putstatic FancyEnum.TWO : FancyEnum [23]\n" + 
+			"    28  iconst_2\n" + 
+			"    29  anewarray FancyEnum [1]\n" + 
+			"    32  dup\n" + 
+			"    33  iconst_0\n" + 
+			"    34  getstatic FancyEnum.ONE : FancyEnum [20]\n" + 
+			"    37  aastore\n" + 
+			"    38  dup\n" + 
+			"    39  iconst_1\n" + 
+			"    40  getstatic FancyEnum.TWO : FancyEnum [23]\n" + 
+			"    43  aastore\n" + 
+			"    44  putstatic FancyEnum.ENUM$VALUES : FancyEnum[] [25]\n" + 
+			"    47  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 3]\n" + 
+			"        [pc: 28, line: 2]\n" + 
+			"  \n" + 
+			"  // Method descriptor #19 (Ljava/lang/String;II)V\n" + 
+			"  // Stack: 3, Locals: 4\n" + 
+			"  private FancyEnum(java.lang.String $enum$name, int $enum$ordinal, int v);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  aload_1 [$enum$name]\n" + 
+			"     2  iload_2 [$enum$ordinal]\n" + 
+			"     3  invokespecial java.lang.Enum(java.lang.String, int) [28]\n" + 
+			"     6  aload_0 [this]\n" + 
+			"     7  iload_3 [v]\n" + 
+			"     8  putfield FancyEnum.var : int [31]\n" + 
+			"    11  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 5]\n" + 
+			"      Method Parameters:\n" + 
+			"        synthetic $enum$name\n" + 
+			"        synthetic $enum$ordinal\n" + 
+			"        final v\n" + 
+			"  \n" + 
+			"  // Method descriptor #38 ()[LFancyEnum;\n" + 
+			"  // Stack: 5, Locals: 3\n" + 
+			"  public static FancyEnum[] values();\n" + 
+			"     0  getstatic FancyEnum.ENUM$VALUES : FancyEnum[] [25]\n" + 
+			"     3  dup\n" + 
+			"     4  astore_0\n" + 
+			"     5  iconst_0\n" + 
+			"     6  aload_0\n" + 
+			"     7  arraylength\n" + 
+			"     8  dup\n" + 
+			"     9  istore_1\n" + 
+			"    10  anewarray FancyEnum [1]\n" + 
+			"    13  dup\n" + 
+			"    14  astore_2\n" + 
+			"    15  iconst_0\n" + 
+			"    16  iload_1\n" + 
+			"    17  invokestatic java.lang.System.arraycopy(java.lang.Object, int, java.lang.Object, int, int) : void [39]\n" + 
+			"    20  aload_2\n" + 
+			"    21  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"  \n" + 
+			"  // Method descriptor #46 (Ljava/lang/String;)LFancyEnum;\n" + 
+			"  // Stack: 2, Locals: 1\n" + 
+			"  public static FancyEnum valueOf(java.lang.String name);\n" + 
+			"     0  ldc <Class FancyEnum> [1]\n" + 
+			"     2  aload_0 [name]\n" + 
+			"     3  invokestatic java.lang.Enum.valueOf(java.lang.Class, java.lang.String) : java.lang.Enum [47]\n" + 
+			"     6  checkcast FancyEnum [1]\n" + 
+			"     9  areturn\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"      Method Parameters:\n" + 
+			"        mandated name\n" + 
+			"}";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+	
+	public void test010() throws Exception {
+		// Test that the non private inner class gets a mandated enclosing instance parameter.
+		
+		this.runParameterNameTest(
+			"X.java",
+			"public class X {\n" +
+			"    class Y {}\n" +
+			"}\n"
+		);
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "X$Y.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+				"  X$Y(X this$0);\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  aload_1 [this$0]\n" + 
+				"     2  putfield X$Y.this$0 : X [10]\n" + 
+				"     5  aload_0 [this]\n" + 
+				"     6  invokespecial java.lang.Object() [12]\n" + 
+				"     9  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 2]\n" + 
+				"      Method Parameters:\n" + 
+				"        final mandated this$0\n" + 
+				"\n";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+	
+	public void test011() throws Exception {
+		// Test that a private inner class does not get a mandated enclosing instance parameter.
+		
+		this.runParameterNameTest(
+			"X.java",
+			"public class X {\n" +
+			"    private class Y {}\n" +
+			"}\n"
+		);
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "X$Y.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+				"  private X$Y(X this$0);\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  aload_1 [this$0]\n" + 
+				"     2  putfield X$Y.this$0 : X [10]\n" + 
+				"     5  aload_0 [this]\n" + 
+				"     6  invokespecial java.lang.Object() [12]\n" + 
+				"     9  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 2]\n" + 
+				"      Method Parameters:\n" + 
+				"        final synthetic this$0\n" + 
+				"\n";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+	
+	public void test012() throws Exception {
+		
+		this.runParameterNameTest(
+			"X.java",
+			"public class X {\n" +
+			"    void foo() {\n" +
+			"        new Y().new Z() {\n" +
+			"        };\n" +
+			"    }\n" +
+			"}\n" +
+			"class Y {\n" +
+			"    class Z {}\n" +
+			"}\n" 
+		);
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "X$1.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+				"  X$1(X this$0, Y this$1);\n" + 
+				"     0  aload_0 [this]\n" + 
+				"     1  aload_1 [this$0]\n" + 
+				"     2  putfield X$1.this$0 : X [10]\n" + 
+				"     5  aload_0 [this]\n" + 
+				"     6  aload_2 [this$1]\n" + 
+				"     7  invokespecial Y$Z(Y) [12]\n" + 
+				"    10  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 1]\n" + 
+				"        [pc: 5, line: 3]\n" + 
+				"      Method Parameters:\n" + 
+				"        final synthetic this$0\n" + 
+				"        final mandated this$1\n" + 
+				"\n";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+	
+	public void test013() throws Exception {
+		// Test that synthesized enum constructor arguments show up as synthetic
+		
+		this.runParameterNameTest(
+			"FancyEnum.java",
+			"\n" + 
+			"public enum FancyEnum {\n" + 
+			"	ONE, TWO;\n" + 
+			"}\n" + 
+			"");
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "FancyEnum.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+				"  private FancyEnum(java.lang.String $enum$name, int $enum$ordinal);\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  aload_1 [$enum$name]\n" + 
+				"    2  iload_2 [$enum$ordinal]\n" + 
+				"    3  invokespecial java.lang.Enum(java.lang.String, int) [26]\n" + 
+				"    6  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 2]\n" + 
+				"      Method Parameters:\n" + 
+				"        synthetic $enum$name\n" + 
+				"        synthetic $enum$ordinal\n" + 
+				"  \n";
+
+		assertSubstring(actualOutput, expectedOutput);
+	}
+	
+	public void test014() throws Exception {
+		// Test that the name argument of enum valueOf shows up as mandated
+		
+		this.runParameterNameTest(
+			"FancyEnum.java",
+			"\n" + 
+			"public enum FancyEnum {\n" + 
+			"	ONE, TWO;\n" + 
+			"}\n" + 
+			"");
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "FancyEnum.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+				"  public static FancyEnum valueOf(java.lang.String name);\n" + 
+						"     0  ldc <Class FancyEnum> [1]\n" + 
+						"     2  aload_0 [name]\n" + 
+						"     3  invokestatic java.lang.Enum.valueOf(java.lang.Class, java.lang.String) : java.lang.Enum [40]\n" + 
+						"     6  checkcast FancyEnum [1]\n" + 
+						"     9  areturn\n" + 
+						"      Line numbers:\n" + 
+						"        [pc: 0, line: 1]\n" + 
+						"      Method Parameters:\n" + 
+						"        mandated name\n";
+		assertSubstring(actualOutput, expectedOutput);
+	}
+
+	public void test015() throws Exception {
+		// Test that the name argument of enum valueOf shows up as mandated
+		
+		this.runParameterNameTest(
+			"InnerLocalClassTest.java",
+			"public class InnerLocalClassTest {\n" + 
+			"   void test() {\n" + 
+			"     class Local { }\n" + 
+			"     new Local() { };\n" + 
+			"   } \n" + 
+			"}\n");
+
+		ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+		String path = OUTPUT_DIR + File.separator + "InnerLocalClassTest$1.class";
+		byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(new File(path));
+		String actualOutput =
+			disassembler.disassemble(
+				classFileBytes,
+				"\n",
+				ClassFileBytesDisassembler.DETAILED);
+
+		String expectedOutput =
+			"  InnerLocalClassTest$1(InnerLocalClassTest this$0, InnerLocalClassTest this$1);\n" + 
+			"     0  aload_0 [this]\n" + 
+			"     1  aload_2 [this$1]\n" + 
+			"     2  putfield InnerLocalClassTest$1.this$0 : InnerLocalClassTest [10]\n" + 
+			"     5  aload_0 [this]\n" + 
+			"     6  aload_1 [this$0]\n" + 
+			"     7  invokespecial InnerLocalClassTest$1Local(InnerLocalClassTest) [12]\n" + 
+			"    10  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 1]\n" + 
+			"        [pc: 5, line: 4]\n" + 
+			"      Method Parameters:\n" + 
+			"        final synthetic this$0\n" + 
+			"        final synthetic this$1\n";
+		assertSubstring(actualOutput, expectedOutput);
+	}
+
+	private void runParameterNameTest(String fileName, String body) {
+		Map compilerOptions = getCompilerOptions();
+		compilerOptions.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.DO_NOT_GENERATE);
+		compilerOptions.put(CompilerOptions.OPTION_MethodParametersAttribute, CompilerOptions.GENERATE);
+		this.runConformTest(
+			new String[] {
+				fileName, 
+				body
+			},
+			compilerOptions /* custom options */
+		);
+	}
+
+	private void assertSubstring(String actualOutput, String expectedOutput) {
+		int index = actualOutput.indexOf(expectedOutput);
+		if (index == -1 || expectedOutput.length() == 0) {
+			System.out.println(Util.displayString(actualOutput, 2));
+		}
+		if (index == -1) {
+			assertEquals("Wrong contents", expectedOutput, actualOutput);
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
index c1d7514..fe81185 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java
@@ -4,14 +4,20 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
+ *								bug 388800 - [1.8] adjust tests to 1.8 JRE
  *								bug 388795 - [compiler] detection of name clash depends on order of super interfaces
+ *								bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract
+ *								bug 402237 - [1.8][compiler] investigate differences between compilers re MethodVerifyTest
  *								bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795
  *								bug 409473 - [compiler] JDT cannot compile against JRE 1.8
- *								Bug 410325 - [1.7][compiler] Generified method override different between javac and eclipse compiler
  *	   Andy Clement - Contribution for
  *								bug 406928 - computation of inherited methods seems damaged (affecting @Overrides)
  *******************************************************************************/
@@ -25,6 +31,7 @@
 import org.eclipse.jdt.core.Flags;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.ToolFactory;
+import org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.JavacTestOptions.Excuse;
 import org.eclipse.jdt.core.tests.util.Util;
 import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
 import org.eclipse.jdt.core.util.IClassFileReader;
@@ -1818,8 +1825,10 @@
 		this.runConformTest(
 			new String[] {
 				"X.java",
+				"import java.util.*;\n" + 
 				"public class X extends java.util.AbstractMap {\n" +
 				"	public java.util.Set entrySet() { return null; }\n" +
+				MAP_RAW_IMPL_JRE8 +
 				"}\n"
 			},
 			""
@@ -3001,6 +3010,25 @@
 		);
 	}
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=72704
+	// variant where C and C.id are concrete
+	public void test043_1() { // ambiguous message sends because of substitution from 2 different type variables
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X { void test(E<Integer,Integer> e) { e.id(new Integer(1)); } }\n" +
+				"class C<A> { public void id(A x) {} }\n" +
+				"interface I<B> { void id(B x); }\n" +
+				"abstract class E<A, B> extends C<A> implements I<B> {}\n"
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 4)\n" +
+			"	abstract class E<A, B> extends C<A> implements I<B> {}\n" +
+			"	               ^\n" +
+			"Name clash: The method id(A) of type C<A> has the same erasure as id(B) of type I<B> but does not override it\n" +
+			"----------\n"
+		);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=72704
 	public void test043a() { // ambiguous message sends because of substitution from 2 different type variables
 		this.runNegativeTest(
 			new String[] {
@@ -6875,6 +6903,8 @@
 				"	public boolean hasNext() {	return false; }\n" +
 				"	public Object next() {	return null; }\n" +
 				"	public void remove() {}\n" +
+				ITERABLE_RAW_IMPL_JRE8 +
+				COLLECTION_AND_LIST_RAW_IMPL_JRE8 +
 				"}\n", // =================
 			},
 			"----------\n" +
@@ -6995,6 +7025,8 @@
 				"	public boolean hasNext() {	return false; }\n" +
 				"	public Object next() {	return null; }\n" +
 				"	public void remove() {}\n" +
+				ITERABLE_RAW_IMPL_JRE8 +
+				COLLECTION_AND_LIST_RAW_IMPL_JRE8 +
 				"}\n", // =================
 			},
 			"----------\n" +
@@ -7105,6 +7137,8 @@
 				"	public boolean hasNext() {	return false; }\n" +
 				"	public Object next() {	return null; }\n" +
 				"	public void remove() {}\n" +
+				ITERABLE_RAW_IMPL_JRE8 +
+				COLLECTION_AND_LIST_RAW_IMPL_JRE8 + 
 				"}\n", // =================
 			},
 			"----------\n" +
@@ -10044,6 +10078,7 @@
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=243820
 public void test169() {
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"class X<T> {\n" +
@@ -10056,6 +10091,8 @@
 			"}\n" +
 			"class R<T> extends X.A {}"
 		},
+		null,
+		null,
 		"----------\n" + 
 		"1. WARNING in X.java (at line 6)\n" + 
 		"	public R foo(A a, I i) { return null; }\n" + 
@@ -10066,12 +10103,14 @@
 		"	public R foo(A a, I i) { return null; }\n" + 
 		"	                  ^\n" + 
 		"X.I is a raw type. References to generic type X<T>.I<S> should be parameterized\n" + 
-		"----------\n"
+		"----------\n",
+		Excuse.EclipseHasSomeMoreWarnings
 	);
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=243820
 public void test169a() {
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"class X<T> {\n" +
@@ -10084,6 +10123,8 @@
 			"class A {}\n" +
 			"class R<T> extends A {}"
 		},
+		null,
+		null,
 		"----------\n" + 
 		"1. WARNING in X.java (at line 3)\n" + 
 		"	public R foo(X<String>.B b, I i) { return null; }\n" + 
@@ -10094,7 +10135,8 @@
 		"	public R foo(X<String>.B b, I i) { return null; }\n" + 
 		"	                            ^\n" + 
 		"I is a raw type. References to generic type I<S> should be parameterized\n" + 
-		"----------\n"
+		"----------\n",
+		Excuse.EclipseHasSomeMoreWarnings
 	);
 }
 
@@ -10103,20 +10145,21 @@
 	Map options = getCompilerOptions();
 	options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR);
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"class X { synchronized void foo() {} }\n" +
 			"class Y extends X { @Override void foo() { } }"
 		},
+		null, // libs
+		options,
 		"----------\n" +
 		"1. ERROR in X.java (at line 2)\n" +
 		"	class Y extends X { @Override void foo() { } }\n" +
 		"	                                   ^^^^^\n" +
 		"The method Y.foo() is overriding a synchronized method without being synchronized\n" +
 		"----------\n",
-	null,
-	false,
-	options);
+		Excuse.EclipseWarningConfiguredAsError);
 }
 
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=239066 - variation
@@ -10124,6 +10167,7 @@
 	Map options = getCompilerOptions();
 	options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR);
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"public enum X {\n" + 
@@ -10131,15 +10175,15 @@
 			"  synchronized void foo() { }\n"+
 			"}"
 		},
+		null,
+		options,
 		"----------\n" +
 		"1. ERROR in X.java (at line 2)\n" +
 		"	FOO { @Override void foo() { super.foo(); } };\n" +
 		"	                     ^^^^^\n" +
 		"The method new X(){}.foo() is overriding a synchronized method without being synchronized\n" +
 		"----------\n",
-		null,
-		false,
-		options);
+		Excuse.EclipseWarningConfiguredAsError);
 }
 
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=239066 - variation
@@ -10147,6 +10191,7 @@
 	Map options = getCompilerOptions();
 	options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR);
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"public class X {\n" + 
@@ -10154,15 +10199,15 @@
 			"  synchronized void foo() { }\n"+
 			"}"
 		},
+		null,
+		options,
 		"----------\n" +
 		"1. ERROR in X.java (at line 2)\n" +
 		"	void bar() { new X() { @Override void foo() {} }; }\n"+
 		"	                                      ^^^^^\n" +
 		"The method new X(){}.foo() is overriding a synchronized method without being synchronized\n" +
 		"----------\n",
-		null,
-		false,
-		options);
+		Excuse.EclipseWarningConfiguredAsError);
 }
 
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=239066 - variation
@@ -10170,21 +10215,22 @@
 	Map options = getCompilerOptions();
 	options.put(CompilerOptions.OPTION_ReportMissingSynchronizedOnInheritedMethod, CompilerOptions.ERROR);
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"public class X { synchronized void foo() {} }\n" +
 			"class Y extends X {}\n" +
 			"class Z extends Y { @Override void foo() {} }\n"
 		},
+		null,
+		options,
 		"----------\n" +
 		"1. ERROR in X.java (at line 3)\n" +
 		"	class Z extends Y { @Override void foo() {} }\n" +
 		"	                                   ^^^^^\n" +
 		"The method Z.foo() is overriding a synchronized method without being synchronized\n" +
 		"----------\n",
-		null,
-		false,
-		options);
+		Excuse.EclipseWarningConfiguredAsError);
 }
 
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=249140
@@ -10213,21 +10259,22 @@
 	Map options = getCompilerOptions();
 	options.put(CompilerOptions.OPTION_ReportMissingHashCodeMethod, CompilerOptions.WARNING);
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"A.java",
 			"class A {\n" +
 			"	@Override public boolean equals(Object o) { return true; }\n" +
 			"}"
 		},
+		null,
+		options,
 		"----------\n" + 
 		"1. WARNING in A.java (at line 1)\n" + 
 		"	class A {\n" + 
 		"	      ^\n" + 
 		"The type A should also implement hashCode() since it overrides Object.equals()\n" + 
 		"----------\n",
-	null,
-	false,
-	options);
+		Excuse.EclipseHasSomeMoreWarnings);
 }
 
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=38751
@@ -10805,6 +10852,7 @@
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=271303
 public void test186() {
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"p1/A.java",
 			"package p1;\n" +
@@ -10816,6 +10864,8 @@
 			"package p1;\n" +
 			"public class C extends p2.B { @Override void m() {} }"
 		},
+		null,
+		null,
 		"----------\n" + 
 		"1. WARNING in p2\\B.java (at line 2)\n" + 
 		"	public class B extends p1.A { void m() {} }\n" + 
@@ -10827,7 +10877,8 @@
 		"	public class C extends p2.B { @Override void m() {} }\n" + 
 		"	                                             ^^^\n" + 
 		"The method C.m() does not override the inherited method from B since it is private to a different package\n" + 
-		"----------\n"
+		"----------\n",
+		Excuse.EclipseHasSomeMoreWarnings
 	);
 }
 // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182950
@@ -10891,6 +10942,7 @@
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=279836
 public void test188() {
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"Y.java",
 			"abstract class Y<T extends Number> implements I<T> {\n" +
@@ -10899,12 +10951,15 @@
 			"interface I<T> { T get(T element); }\n" +
 			"class Z extends Y {}"
 		},
+		null,
+		null,
 		"----------\n" + 
 		"1. WARNING in Y.java (at line 5)\n" + 
 		"	class Z extends Y {}\n" + 
 		"	                ^\n" + 
 		"Y is a raw type. References to generic type Y<T> should be parameterized\n" + 
-		"----------\n"
+		"----------\n",
+		Excuse.EclipseHasSomeMoreWarnings
 	);
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=284431
@@ -11390,6 +11445,7 @@
 			"		return compare((I) o1, (I) o2);\n" +
 			"	}\n" +
 			"	public int compare(I o1, I o2) { return 0; }\n" +
+			COMPARATOR_RAW_IMPL_JRE8 +
 			"}"
 		},
 		""
@@ -12302,6 +12358,7 @@
 			"			public int compare(Object o1, Object o2) {\n" + 
 			"				return 0;\n" + 
 			"			}\n" + 
+			COMPARATOR_RAW_IMPL_JRE8 +
 			"		};\n" + 
 			"		Test.assertEquals(\"Test\", comparator, new ArrayList(), new ArrayList());\n" + 
 			"	}\n" + 
@@ -12372,6 +12429,7 @@
 			"			public int compare(Object o1, Object o2) {\n" + 
 			"				return 0;\n" + 
 			"			}\n" + 
+			COMPARATOR_RAW_IMPL_JRE8 +
 			"		};\n" + 
 			"		Test.assertEquals(\"Test\", comparator, new ArrayList(), new ArrayList());\n" + 
 			"	}\n" + 
@@ -12840,6 +12898,7 @@
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=346029
 public void test346029c() throws Exception {
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"class A<T> {\n" +
@@ -12853,16 +12912,20 @@
 			"    }\n" +
 			"}\n"
 		},
+		null,
+		null,
 		"----------\n" + 
 		"1. WARNING in X.java (at line 8)\n" + 
 		"	public void f(String t) {\n" + 
 		"	            ^^^^^^^^^^^\n" + 
 		"The method f(String) of type X should be tagged with @Override since it actually overrides a superclass method\n" + 
-		"----------\n");
+		"----------\n",
+		Excuse.EclipseHasSomeMoreWarnings);
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=346029
 public void test346029d() throws Exception {
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"class A<T> {\n" +
@@ -12876,16 +12939,20 @@
 			"    }\n" +
 			"}\n"
 		},
+		null,
+		null,
 		"----------\n" + 
 		"1. WARNING in X.java (at line 8)\n" + 
 		"	public void f(String t) {\n" + 
 		"	            ^^^^^^^^^^^\n" + 
 		"The method f(String) of type X should be tagged with @Override since it actually overrides a superclass method\n" + 
-		"----------\n");
+		"----------\n",
+		Excuse.EclipseHasSomeMoreWarnings);
 }
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=346029
 public void test346029e() throws Exception {
 	this.runNegativeTest(
+		false,
 		new String[] {
 			"X.java",
 			"class A<T> {\n" +
@@ -12899,12 +12966,15 @@
 			"       }\n" +
 			"}\n"
 		},
+		null,
+		null,
 		"----------\n" + 
 		"1. WARNING in X.java (at line 8)\n" + 
 		"	void f(String s) {\n" + 
 		"	     ^^^^^^^^^^^\n" + 
 		"The method f(String) of type X should be tagged with @Override since it actually overrides a superclass method\n" + 
-		"----------\n");
+		"----------\n",
+		Excuse.EclipseHasSomeMoreWarnings);
 }
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=346029
 public void test346029f() throws Exception {
@@ -13812,6 +13882,39 @@
 		"Erasure of method e(Action<S>) is the same as another method in type X\n" +
 		"----------\n");
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384580, Apply changes in JLS 8.4.5 to calculation of duplicate method return types
+public void testBug384580() {
+	this.runNegativeTest(
+		new String[] {
+			"X.java",
+			"import java.util.List;\n" +
+			"interface X { <T> List<T> m(); }\n" +
+			"interface Y<K> { List<K> m(); }\n" +
+			"interface Z extends X, Y {}  \n" +
+			"class Foo implements Z {\n" +
+			"	public <T> List<T> m() {\n" +
+			"		return null;\n" +
+			"	}\n" +
+			"	\n" +
+			"}\n"
+		},
+		"----------\n" + 
+		"1. WARNING in X.java (at line 4)\n" + 
+		"	interface Z extends X, Y {}  \n" + 
+		"	                       ^\n" + 
+		"Y is a raw type. References to generic type Y<K> should be parameterized\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 5)\n" + 
+		"	class Foo implements Z {\n" + 
+		"	      ^^^\n" + 
+		"The type Foo must implement the inherited abstract method Y.m()\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 6)\n" + 
+		"	public <T> List<T> m() {\n" + 
+		"	                   ^^^\n" + 
+		"Name clash: The method m() of type Foo has the same erasure as m() of type Y but does not override it\n" + 
+		"----------\n");
+}
 // https://bugs.eclipse.org/406928 - computation of inherited methods seems damaged (affecting @Overrides)
 public void testBug406928() {
 	if (this.complianceLevel < ClassFileConstants.JDK1_6) return;
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
new file mode 100644
index 0000000..f1a1b1f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeLambdaExpressionsTest.java
@@ -0,0 +1,7164 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - Contributions for
+ *							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *							bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
+ *                          Bug 384687 - [1.8] Wildcard type arguments should be rejected for lambda and reference expressions
+ *                          Bug 404657 - [1.8][compiler] Analysis for effectively final variables fails to consider loops
+ *     Stephan Herrmann - Contribution for
+ *							bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super via I.super.m() syntax
+ *							bug 404728 - [1.8]NPE on QualifiedSuperReference error
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+import junit.framework.Test;
+public class NegativeLambdaExpressionsTest extends AbstractRegressionTest {
+
+static {
+//	TESTS_NAMES = new String[] { "testSuperReference03"};
+//	TESTS_NUMBERS = new int[] { 50 };
+//	TESTS_RANGE = new int[] { 11, -1 };
+}
+public NegativeLambdaExpressionsTest(String name) {
+	super(name);
+}
+public static Test suite() {
+	return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382818, ArrayStoreException while compiling lambda
+public void test001() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"  void foo(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    int x, y;\n" +
+				"    I i = () -> {\n" +
+				"      int z = 10;\n" +
+				"    };\n" +
+				"    i++;\n" +
+				"  }\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	I i = () -> {\n" + 
+			"      int z = 10;\n" + 
+			"    };\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	i++;\n" + 
+			"	^^^\n" + 
+			"Type mismatch: cannot convert from I to int\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382841, ClassCastException while compiling lambda
+public void test002() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				" void foo(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    int x, y;\n" +
+				"    I i = (p, q) -> {\n" +
+				"      int r = 10;\n" +
+				"    };\n" +
+				"    i++;\n" +
+				"  }\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	i++;\n" + 
+			"	^^^\n" + 
+			"Type mismatch: cannot convert from I to int\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382841, ClassCastException while compiling lambda
+public void test003() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				" void foo(int x, int y);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    int x, y;\n" +
+				"    I i = null, i2 = (p, q) -> {\n" +
+				"      int r = 10;\n" +
+				"    }, i3 = null;\n" +
+				"    i++;\n" +
+				"  }\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	i++;\n" + 
+			"	^^^\n" + 
+			"Type mismatch: cannot convert from I to int\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383046, syntax error reported incorrectly on syntactically valid lambda expression
+public void test004() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface IX {\n" +
+				"    public void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"     IX i = () -> 42;\n" +
+				"     int x\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	IX i = () -> 42;\n" + 
+			"	             ^^\n" + 
+			"Void methods cannot return a value\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	int x\n" + 
+			"	    ^\n" + 
+			"Syntax error, insert \";\" to complete FieldDeclaration\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383085 super::identifier not accepted.
+public void test005() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface IX{\n" +
+				"	public void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	IX i = super::toString;\n" +
+				"   Zork z;\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383046, syntax error reported incorrectly on *syntactically* valid reference expression
+public void test006() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface One{}\n" +
+				"interface Two{}\n" +
+				"interface Three{}\n" +
+				"interface Four{}\n" +
+				"interface Five{}\n" +
+				"interface Blah{}\n" +
+				"interface Outer<T1,T2>{interface Inner<T3,T4>{interface Leaf{ <T> void method(); } } }\n" +
+				"interface IX{\n" +
+				"	public void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	IX i = Outer<One, Two>.Inner<Three, Four>.Deeper<Five, Six<String>>.Leaf::<Blah, Blah>method;\n" +
+				"   int x\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 12)\n" + 
+			"	IX i = Outer<One, Two>.Inner<Three, Four>.Deeper<Five, Six<String>>.Leaf::<Blah, Blah>method;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The member type Outer<One,Two>.Inner cannot be qualified with a parameterized type, since it is static. Remove arguments from qualifying type Outer<One,Two>\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 12)\n" + 
+			"	IX i = Outer<One, Two>.Inner<Three, Four>.Deeper<Five, Six<String>>.Leaf::<Blah, Blah>method;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Outer.Inner.Deeper cannot be resolved to a type\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 12)\n" + 
+			"	IX i = Outer<One, Two>.Inner<Three, Four>.Deeper<Five, Six<String>>.Leaf::<Blah, Blah>method;\n" + 
+			"	                                                       ^^^\n" + 
+			"Six cannot be resolved to a type\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 13)\n" + 
+			"	int x\n" + 
+			"	    ^\n" + 
+			"Syntax error, insert \";\" to complete FieldDeclaration\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383096, NullPointerException with a wrong lambda code snippet
+public void _test007() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {}\n" +
+					"public class X {\n" +
+					"    void foo() {\n" +
+					"            I t1 = f -> {{};\n" +
+					"            I t2 = () -> 42;\n" +
+					"        } \n" +
+					"        }\n" +
+					"}\n",
+				},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	int\n" + 
+			"	^^^\n" + 
+			"Syntax error on token \"int\", delete this token\n" + 
+			"----------\n" /* expected compiler log */,
+			true /* perform statement recovery */);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383949,  Explicit this parameter illegal in lambda expressions
+public void test008() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  int foo(X x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) {\n" +
+					"    I i = (X this) -> 10;  \n" +
+					"  }\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	I i = (X this) -> 10;  \n" + 
+				"	         ^^^^\n" + 
+				"Lambda expressions cannot declare a this parameter\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383949,  Explicit this parameter illegal in lambda expressions
+public void test009() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.awt.event.ActionListener;\n" +
+					"interface I {\n" +
+					"    void doit(String s1, String s2);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public void test1(int x) {\n" +
+					"    ActionListener al = (public xyz) -> System.out.println(xyz); \n" +
+					"    I f = (abstract final s, @Nullable t) -> System.out.println(s + t); \n" +
+					"  }\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	ActionListener al = (public xyz) -> System.out.println(xyz); \n" + 
+				"	                            ^^^\n" + 
+				"Syntax error, modifiers and annotations are not allowed for the lambda parameter xyz as its type is elided\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 8)\n" + 
+				"	I f = (abstract final s, @Nullable t) -> System.out.println(s + t); \n" + 
+				"	                      ^\n" + 
+				"Syntax error, modifiers and annotations are not allowed for the lambda parameter s as its type is elided\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 8)\n" + 
+				"	I f = (abstract final s, @Nullable t) -> System.out.println(s + t); \n" + 
+				"	                                   ^\n" + 
+				"Syntax error, modifiers and annotations are not allowed for the lambda parameter t as its type is elided\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=381121,  [] should be accepted in reference expressions.
+public void test010() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	Object foo(int [] ia);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	I i = (int [] ia) -> {\n" +
+					"		      return ia.clone();\n" +
+					"	      };\n" +
+					"	I i2 = int[]::clone;\n" +
+					"	Zork z;\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382701, [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expressions.
+public void test011() {
+	// This test checks that common semantic checks are indeed 
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	Object foo(int [] ia);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	I i = (int [] ia) -> {\n" +
+					"		Zork z;\n" +  // Error: No such type
+					"		unknown = 0;\n;" + // Error: No such variable
+					"		int a = 42 + ia;\n" + // Error: int + int[] is wrong 
+					"		return ia.clone();\n" +
+					"	};\n" +
+					"	static void staticLambda() {\n" +
+					"		I i = (int [] ia) -> this;\n" + // 'this' is static
+					"	}\n" +
+					"	I j = array -> {\n" +
+					"		int a = array[2] + 3;\n" + // No error, ia must be correctly identifies as int[]
+					"		int b = 42 + array;\n" + // Error: int + int[] is wrong - yes it is!
+					"		System.out.println(\"i(array) = \" + i.foo(array));\n" + // fields are accessible!
+					"		return;\n" + // Error here, expecting Object, not void
+					"	};\n" +
+					"	Runnable r = () -> { return 42; };\n" + // Runnable.run not expecting return value
+					"	void anotherLambda() {\n" +
+					"		final int beef = 0;\n" +
+					"		I k = (int [] a) -> a.length + beef;\n" + // No error, beef is in scope
+					"	}\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 7)\n" + 
+				"	unknown = 0;\n" + 
+				"	^^^^^^^\n" + 
+				"unknown cannot be resolved to a variable\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 8)\n" + 
+				"	;		int a = 42 + ia;\n" + 
+				"	 		        ^^^^^^^\n" + 
+				"The operator + is undefined for the argument type(s) int, int[]\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 12)\n" + 
+				"	I i = (int [] ia) -> this;\n" + 
+				"	                     ^^^^\n" + 
+				"Cannot use this in a static context\n" + 
+				"----------\n" +
+				"5. ERROR in X.java (at line 16)\n" + 
+				"	int b = 42 + array;\n" + 
+				"	        ^^^^^^^^^^\n" + 
+				"The operator + is undefined for the argument type(s) int, int[]\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 18)\n" + 
+				"	return;\n" + 
+				"	^^^^^^^\n" + 
+				"This method must return a result of type Object\n" +
+				"----------\n" + 
+				"7. ERROR in X.java (at line 20)\n" + 
+				"	Runnable r = () -> { return 42; };\n" + 
+				"	                     ^^^^^^^^^^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n"
+);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384600, [1.8] 'this' should not be allowed in lambda expressions in contexts that don't allow it
+public void test012() {
+	// This test checks that common semantic checks are indeed 
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	static void foo() {\n" +
+					"		I i = () -> {\n" +
+					"			System.out.println(this);\n" +
+					"			I j = () -> {\n" +
+					"				System.out.println(this);\n" +
+					"				I k = () -> {\n" +
+					"					System.out.println(this);\n" +
+					"				};\n" +
+					"			};\n" +
+					"		};\n" +
+					"	}\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	System.out.println(this);\n" + 
+				"	                   ^^^^\n" + 
+				"Cannot use this in a static context\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 9)\n" + 
+				"	System.out.println(this);\n" + 
+				"	                   ^^^^\n" + 
+				"Cannot use this in a static context\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 11)\n" + 
+				"	System.out.println(this);\n" + 
+				"	                   ^^^^\n" + 
+				"Cannot use this in a static context\n" + 
+				"----------\n"
+				);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384600, [1.8] 'this' should not be allowed in lambda expressions in contexts that don't allow it
+public void test013() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	void foo(Zork z) {\n" +
+					"		I i = () -> {\n" +
+					"			System.out.println(this);\n" +
+					"			I j = () -> {\n" +
+					"				System.out.println(this);\n" +
+					"				I k = () -> {\n" +
+					"					System.out.println(this);\n" +
+					"				};\n" +
+					"			};\n" +
+					"		};\n" +
+					"	}\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	void foo(Zork z) {\n" + 
+				"	         ^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n"
+				);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384595, Reject illegal modifiers on lambda arguments.
+public void test014() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int x, int y, int z);	\n" +
+					"}\n" +
+					"public class X {\n" +
+					"     I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" + 
+				"	                             ^^^^^^^^^\n" + 
+				"Undefined cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" + 
+				"	                                                              ^^^^^^\n" + 
+				"Lambda expression\'s parameter o is expected to be of type int\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" + 
+				"	                                                                     ^\n" + 
+				"Illegal modifier for parameter o; only final is permitted\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 5)\n" + 
+				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" + 
+				"	                                                                                            ^\n" + 
+				"Illegal modifier for parameter p; only final is permitted\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 5)\n" + 
+				"	I i = (final @Marker int x, @Undefined static strictfp public Object o, static volatile int p) -> x;\n" + 
+				"	                                                                                                  ^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399534, [1.8][compiler] Lambda parameters must be checked for compatibility with the single abstract method of the functional interface.
+public void test015() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.Collection;\n" +
+					"import java.util.List;\n" +
+					"interface I { void run(int x); }\n" +
+					"interface J { void run(int x, String s); }\n" +
+					"interface K { void run(Collection<String> jobs); }\n" +
+					"class X {\n" +
+					"    I i1 = (String y) -> {};\n" +
+					"    I i2 = (y) -> {};\n" +
+					"    I i3 = y -> {};\n" +
+					"    I i4 = (int x, String y) -> {};\n" +
+					"    I i5 = (int x) -> {};\n" +
+					"    J j1 = () -> {};\n" +
+					"    J j2 = (x, s) -> {};\n" +
+					"    J j3 = (String x, int s) -> {};\n" +
+					"    J j4 = (int x, String s) -> {};\n" +
+					"    J j5 = x ->  {};\n" +
+					"    K k1 = (Collection l) -> {};\n" +
+					"    K k2 = (Collection <Integer> l) -> {};\n" +
+					"    K k3 = (Collection <String> l) -> {};\n" +
+					"    K k4 = (List <String> l) -> {};\n" +
+					"    K k5 = (l) -> {};\n" +
+					"    K k6 = l -> {};\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	I i1 = (String y) -> {};\n" + 
+				"	        ^^^^^^\n" + 
+				"Lambda expression\'s parameter y is expected to be of type int\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i4 = (int x, String y) -> {};\n" + 
+				"	       ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 12)\n" + 
+				"	J j1 = () -> {};\n" + 
+				"	       ^^^^^^^^\n" + 
+				"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 14)\n" + 
+				"	J j3 = (String x, int s) -> {};\n" + 
+				"	        ^^^^^^\n" + 
+				"Lambda expression\'s parameter x is expected to be of type int\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 14)\n" + 
+				"	J j3 = (String x, int s) -> {};\n" + 
+				"	                  ^^^\n" + 
+				"Lambda expression\'s parameter s is expected to be of type String\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 16)\n" + 
+				"	J j5 = x ->  {};\n" + 
+				"	       ^^^^^^^^\n" + 
+				"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+				"----------\n" + 
+				"7. WARNING in X.java (at line 17)\n" + 
+				"	K k1 = (Collection l) -> {};\n" + 
+				"	        ^^^^^^^^^^\n" + 
+				"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 17)\n" + 
+				"	K k1 = (Collection l) -> {};\n" + 
+				"	        ^^^^^^^^^^\n" + 
+				"Lambda expression\'s parameter l is expected to be of type Collection<String>\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 18)\n" + 
+				"	K k2 = (Collection <Integer> l) -> {};\n" + 
+				"	        ^^^^^^^^^^\n" + 
+				"Lambda expression\'s parameter l is expected to be of type Collection<String>\n" + 
+				"----------\n" + 
+				"10. ERROR in X.java (at line 20)\n" + 
+				"	K k4 = (List <String> l) -> {};\n" + 
+				"	        ^^^^\n" + 
+				"Lambda expression\'s parameter l is expected to be of type Collection<String>\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test016() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  String foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) {\n" +
+					"    I i1 = () -> 42;\n" +
+					"    I i2 = () -> \"Hello\";\n" +
+					"    I i3 = () -> { return 42; };\n" +
+					"    I i4 = () -> { return \"Hello\"; };\n" +
+					"    I i5 = () -> {};\n" +
+					"  }\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	I i1 = () -> 42;\n" + 
+				"	             ^^\n" + 
+				"Type mismatch: cannot convert from int to String\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 8)\n" + 
+				"	I i3 = () -> { return 42; };\n" + 
+				"	                      ^^\n" + 
+				"Type mismatch: cannot convert from int to String\n" +
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test017() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  Integer foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) {\n" +
+					"    I i1 = () -> 42;\n" +
+					"    I i2 = () -> \"Hello\";\n" +
+					"    I i3 = () -> { return 42; };\n" +
+					"    I i4 = () -> { return \"Hello\"; };\n" +
+					"    I i5 = () -> {};\n" +
+					"  }\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	I i2 = () -> \"Hello\";\n" + 
+				"	             ^^^^^^^\n" + 
+				"Type mismatch: cannot convert from String to Integer\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 9)\n" + 
+				"	I i4 = () -> { return \"Hello\"; };\n" + 
+				"	                      ^^^^^^^\n" + 
+				"Type mismatch: cannot convert from String to Integer\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test018() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  I foo();\n" +
+					"}\n" +
+					"class P implements I {\n" +
+					"   public I foo() { return null; }\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) {\n" +
+					"    I i1 = () -> 42;\n" +
+					"    I i2 = () -> \"Hello\";\n" +
+					"    I i3 = () -> { return 42; };\n" +
+					"    I i4 = () -> { return \"Hello\"; };\n" +
+					"    I i5 = () -> { return new P(); };\n" +
+					"  }\n" +
+					"}\n",
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	I i1 = () -> 42;\n" + 
+				"	             ^^\n" + 
+				"Type mismatch: cannot convert from int to I\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = () -> \"Hello\";\n" + 
+				"	             ^^^^^^^\n" + 
+				"Type mismatch: cannot convert from String to I\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 11)\n" + 
+				"	I i3 = () -> { return 42; };\n" + 
+				"	                      ^^\n" + 
+				"Type mismatch: cannot convert from int to I\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 12)\n" + 
+				"	I i4 = () -> { return \"Hello\"; };\n" + 
+				"	                      ^^^^^^^\n" + 
+				"Type mismatch: cannot convert from String to I\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test019() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    I i1 = () -> 42;\n" +
+					"    I i3 = () -> { return 42; };\n" +
+					"    I i4 = () -> System.out.println();\n" +
+					"    I i5 = () -> { System.out.println(); };\n" +
+					"}\n",
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	I i1 = () -> 42;\n" + 
+				"	             ^^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 6)\n" + 
+				"	I i3 = () -> { return 42; };\n" + 
+				"	               ^^^^^^^^^^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test020() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  int foo(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    I i5 = (x) -> { if (x == 0) throw new NullPointerException(); };\n" +
+					"}\n",
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	I i5 = (x) -> { if (x == 0) throw new NullPointerException(); };\n" + 
+				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"This method must return a result of type int\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test021() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  int foo(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    I i5 = (x) -> { if (x == 0) throw new NullPointerException(); throw new NullPointerException(); };\n" +
+					"    Zork z;\n" +
+					"}\n",
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test022() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  J foo();\n" +
+					"}\n" +
+					"interface J {\n" +
+					"  int foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    I I = () -> () -> 10;\n" +
+					"    Zork z;\n" +
+					"}\n",
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test023() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  J foo();\n" +
+					"}\n" +
+					"interface J {\n" +
+					"  int foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"    I i1 = () -> 10;\n" +
+					"    I i2 = () -> { return 10; };\n" +
+					"    I i3 = () -> () -> 10;\n" +
+					"    I i4 = () -> { return () -> 10; };\n" +
+					"}\n",
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	I i1 = () -> 10;\n" + 
+				"	             ^^\n" + 
+				"Type mismatch: cannot convert from int to J\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 9)\n" + 
+				"	I i2 = () -> { return 10; };\n" + 
+				"	                      ^^\n" + 
+				"Type mismatch: cannot convert from int to J\n" + 
+				"----------\n");
+}
+// Bug 398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test024() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I3 {\n" +
+					"  Object foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) {\n" +
+					"    I3 i = () -> 42; // Warning: Autoboxing, but casting to Object??\n" +
+					"  }\n" +
+					"  Object foo(Zork z) {\n" +
+					"	  return 42;\n" +
+					"  }\n" +
+					"}\n",
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	Object foo(Zork z) {\n" + 
+				"	           ^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test025() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\r\n" + 
+			"  String foo();\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\r\n" + 
+			"    I i = () -> 42;\r\n" + 
+			"    I i2 = () -> \"Hello, Lambda\";\r\n" + 
+			"  }\r\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = () -> 42;\n" + 
+			"	            ^^\n" + 
+			"Type mismatch: cannot convert from int to String\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test026() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\r\n" + 
+			"  String foo();\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\r\n" + 
+			"    I i = () -> {\r\n" +
+			"      return 42;\r\n" +
+			"    };\r\n" + 
+			"    I i2 = () -> {\r\n" +
+			"      return \"Hello, Lambda as a block!\";\r\n" +
+			"    };\r\n" + 
+			"  }\r\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	return 42;\n" + 
+			"	       ^^\n" + 
+			"Type mismatch: cannot convert from int to String\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test027() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\r\n" + 
+			"  int baz();\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\n" + 
+			"    I i1 = () -> {\n" + 
+			"      System.out.println(\"No return\");\n" + 
+			"    }; // Error: Lambda block should return value\n" + 
+			"    I i2 = () -> {\n" + 
+			"      if (Math.random() < 0.5) return 42;\n" + 
+			"    }; // Error: Lambda block doesn't always return a value\n" + 
+			"    I i3 = () -> {\n" + 
+			"      return 42;\n" + 
+			"      System.out.println(\"Dead!\");\n" + 
+			"    }; // Error: Lambda block has dead code\n" + 
+			"  }\n" + 
+			"  public static I doesFlowInfoEscape() {\n" + 
+			"    I i1 = () -> {\n" + 
+			"      return 42;\n" + 
+			"    };\n" + 
+			"    return i1; // Must not complain about unreachable code!\n" + 
+			"  }\n" + 
+			"  public static I areExpresionsCheckedForReturns() {\n" + 
+			"    I i1 = () -> 42;  // Must not complain about missing return!\n" + 
+			"    return i1;\n" + 
+			"  }\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i1 = () -> {\n" + 
+			"      System.out.println(\"No return\");\n" + 
+			"    }; // Error: Lambda block should return value\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"This method must return a result of type int\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	I i2 = () -> {\n" + 
+			"      if (Math.random() < 0.5) return 42;\n" + 
+			"    }; // Error: Lambda block doesn\'t always return a value\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"This method must return a result of type int\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 14)\n" + 
+			"	System.out.println(\"Dead!\");\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unreachable code\n" + 
+			"----------\n");
+}
+// Bug 399979 - [1.8][compiler] Statement expressions should be allowed in non-block lambda body when return type is void (edit) 
+public void test028() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\n" +
+			"  void foo();\n" +
+			"}\n" +
+			"public class X {\n" +
+			"  int data;\n" +
+			"  public void main(String[] args) {\n" +
+			"    I i1 = () -> data++;\n" +
+			"    I i2 = () -> data = 10;\n" +
+			"    I i3 = () -> data += 10;\n" +
+			"    I i4 = () -> --data;\n" +
+			"    I i5 = () -> bar();\n" +
+			"    I i6 = () -> new X();\n" +
+			"    I i7 = () -> 0;\n" +
+			"    I i = () -> 1 + data++;\n" +
+			"  }\n" +
+			"  int bar() {\n" +
+			"	  return 0;\n" +
+			"  }\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 13)\n" + 
+			"	I i7 = () -> 0;\n" + 
+			"	             ^\n" + 
+			"Void methods cannot return a value\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 14)\n" + 
+			"	I i = () -> 1 + data++;\n" + 
+			"	            ^^^^^^^^^^\n" + 
+			"Void methods cannot return a value\n" + 
+			"----------\n");
+}
+// Bug 384600 - [1.8] 'this' should not be allowed in lambda/Reference expressions in contexts that don't allow it
+public void test029() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\n" +
+			"	void doit();\n" +
+			"}\n" +
+			"public class X extends Y {\n" +
+			"	static void foo() {\n" +
+			"		I i1 = this::zoo;\n" +
+			"		I i2 = super::boo;\n" +
+			"		I i3 = () -> super.zoo();\n" +
+			"		I i4 = () -> this.boo();\n" +
+			"	}\n" +
+			"	void boo () {\n" +
+			"		I i1 = this::zoo;\n" +
+			"		I i2 = super::boo;\n" +
+			"		I i3 = () -> super.zoo();\n" +
+			"		I i4 = () -> this.boo();\n" +
+			"	}\n" +
+			"	void zoo() {\n" +
+			"	}\n" +
+			"}\n" +
+			"class Y {\n" +
+			"	void boo() {\n" +
+			"	}\n" +
+			"	void zoo() {\n" +
+			"	}\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i1 = this::zoo;\n" + 
+			"	       ^^^^\n" + 
+			"Cannot use this in a static context\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
+			"	I i2 = super::boo;\n" + 
+			"	       ^^^^^\n" + 
+			"Cannot use super in a static context\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 8)\n" + 
+			"	I i3 = () -> super.zoo();\n" + 
+			"	             ^^^^^\n" + 
+			"Cannot use super in a static context\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 9)\n" + 
+			"	I i4 = () -> this.boo();\n" + 
+			"	             ^^^^\n" + 
+			"Cannot use this in a static context\n" + 
+			"----------\n");
+}
+// Bug 382713 - [1.8][compiler] Compiler should reject lambda expressions when target type is not a functional interface
+public void test030() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\n" +
+			"  void foo();\n" +
+			"  void goo();\n" +
+			"}\n" +
+			"public class X {\n" +
+			"  public static void main(String[] args) {\n" +
+			"    X x = () -> 10;\n" +
+			"    I i = () -> 10;\n" +
+			"  }\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	X x = () -> 10;\n" + 
+			"	      ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 8)\n" + 
+			"	I i = () -> 10;\n" + 
+			"	      ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+// Bug 398267 - [1.8][compiler] Variables in the body of the lambda expression should be valid
+public void test031() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\n" +
+			"  void foo();\n" +
+			"}\n" +
+			"public class X {\n" +
+			"  public void main(String[] args) {\n" +
+			"    I i = () -> {\n" +
+			"            		p = 10;\n" +
+			"            		Zork z = this.blank;\n" +
+			"            		super.foo();\n" +
+			"            		goo();\n" +
+			"           	};\n" +
+			"  }\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	p = 10;\n" + 
+			"	^\n" + 
+			"p cannot be resolved to a variable\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 8)\n" + 
+			"	Zork z = this.blank;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 8)\n" + 
+			"	Zork z = this.blank;\n" + 
+			"	              ^^^^^\n" + 
+			"blank cannot be resolved or is not a field\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 9)\n" + 
+			"	super.foo();\n" + 
+			"	      ^^^\n" + 
+			"The method foo() is undefined for the type Object\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 10)\n" + 
+			"	goo();\n" + 
+			"	^^^\n" + 
+			"The method goo() is undefined for the type X\n" + 
+			"----------\n");
+}
+// Bug 399537 - [1.8][compiler] Exceptions thrown from lambda body must match specification per function descriptor
+public void test032() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface IA {\r\n" + 
+			"  void snazz();\r\n" + 
+			"}\r\n" + 
+			"interface IB {\r\n" + 
+			"  void baz() throws java.io.IOException;\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\n" + 
+			"    IA i1 = () -> {\n" + 
+			"      throw new java.io.EOFException(); // Error: not declared\n" + 
+			"    };\n" + 
+			"    IB i2 = () -> {\n" + 
+			"      throw new java.io.EOFException(); // Fine: IOException is declared\n" + 
+			"    }; // No error, it's all good\n" + 
+			"  }\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	throw new java.io.EOFException(); // Error: not declared\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type EOFException\n" + 
+			"----------\n");
+}
+// Bug 399537 - [1.8][compiler] Exceptions thrown from lambda body must match specification per function descriptor
+public void test033() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface IA {\r\n" + 
+			"  void snazz();\r\n" + 
+			"}\r\n" + 
+			"interface IB {\r\n" + 
+			"  void baz() throws java.io.IOException;\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\n" + 
+			"    IA i1 = () -> {\n" + 
+			"      throw new java.io.EOFException(); // Error: not declared\n" + 
+			"    };\n" + 
+			"    IB i2 = () -> {\n" + 
+			"      throw new java.io.EOFException(); // Fine: IOException is declared\n" + 
+			"    }; // No error, it's all good\n" + 
+			"  }\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	throw new java.io.EOFException(); // Error: not declared\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type EOFException\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=398734 - [1.8][compiler] Lambda expression type or return type should be checked against the target functional interface method's result type
+public void test034() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\r\n" + 
+			"  int foo(int x, int y);\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\r\n" + 
+			"    int x = 2;\r\n" + 
+			"    I i = (a, b) -> {\r\n" + 
+			"      return 42.0 + a + args.length; // Type mismatch: cannot convert from double to int\r\n" + 
+			"    };\r\n" + 
+			"  }\r\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	return 42.0 + a + args.length; // Type mismatch: cannot convert from double to int\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Type mismatch: cannot convert from double to int\n" + 
+			"----------\n");
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=381121,  [] should be accepted in reference expressions.
+public void test035() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	Object foo(int [] ia);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	I i = (int [] ia) -> ia.clone();\n" +
+					"	I i2 = int[]::clone;\n" +
+					"	Zork z;\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727,  Lambda expression parameters and locals cannot shadow variables from context
+public void test036() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\r\n" + 
+			"  void foo(int x, int y);\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\r\n" + 
+			"    int x, y;\r\n" + 
+			"    I i = (x, y) -> { // Error: x,y being redeclared\r\n" + 
+			"      int args = 10; //  Error args is being redeclared\r\n" + 
+			"    };\r\n" + 
+			"  }\r\n" + 
+			"}"}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	I i = (x, y) -> { // Error: x,y being redeclared\n" + 
+			"	       ^\n" + 
+			"Lambda expression\'s parameter x cannot redeclare another local variable defined in an enclosing scope. \n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
+			"	I i = (x, y) -> { // Error: x,y being redeclared\n" + 
+			"	          ^\n" + 
+			"Lambda expression\'s parameter y cannot redeclare another local variable defined in an enclosing scope. \n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 8)\n" + 
+			"	int args = 10; //  Error args is being redeclared\n" + 
+			"	    ^^^^\n" + 
+			"Lambda expression\'s local variable args cannot redeclare another local variable defined in an enclosing scope. \n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382702 - [1.8][compiler] Lambda expressions should be rejected in disallowed contexts
+public void test037() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\r\n" + 
+			"  int foo1(String x);\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\r\n" +
+			"    System.out.println(\"Lambda in illegal context: \" + (() -> \"Illegal Lambda\"));\r\n" +
+			"    System.out.println(\"Method Reference in illegal context: \" + System::exit);\r\n" +
+			"    System.out.println(\"Constructor Reference in illegal context: \" + String::new);\r\n" +
+			"    I sam1 = (x) -> x.length(); // OK\r\n" +
+//			"    I sam2 = ((String::length)); // OK\r\n" +
+//			"    I sam3 = (Math.random() > 0.5) ? String::length : String::hashCode; // OK\r\n" +
+//			"    I sam4 = (I)(String::length); // OK\r\n" +
+            "    int x = (x) -> 10;\n" +
+            "    X x2 = (x) -> 10;\n" +
+			"  }\r\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	System.out.println(\"Lambda in illegal context: \" + (() -> \"Illegal Lambda\"));\n" + 
+			"	                                                   ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
+			"	System.out.println(\"Method Reference in illegal context: \" + System::exit);\n" + 
+			"	                                                             ^^^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 8)\n" + 
+			"	System.out.println(\"Constructor Reference in illegal context: \" + String::new);\n" + 
+			"	                                                                  ^^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 10)\n" + 
+			"	int x = (x) -> 10;\n" + 
+			"	        ^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 11)\n" + 
+			"	X x2 = (x) -> 10;\n" + 
+			"	       ^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399537 - [1.8][compiler] Exceptions thrown from lambda body must match specification per function descriptor 
+public void test038() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"import java.io.EOFException;\n" +
+			"import java.io.IOException;\n" +
+			"interface I { void m() throws IOException; }\n" +
+			"interface J { void m() throws EOFException; }\n" +
+			"interface K { void m() throws ClassNotFoundException; }\n" +
+			"interface IJ extends I, J {}\n" +
+			"interface IJK extends I, J, K {}\n" +
+			"public class X {\n" +
+			"	int var;\n" +
+			"	IJ ij = () -> {\n" +
+			"		if (var == 0) {\n" +
+			"			throw new IOException();\n" +
+			"		} else if (var == 2) {\n" +
+			"			throw new EOFException();\n" +
+			"		} else {\n" +
+			"			throw new ClassNotFoundException(); \n" +
+			"		}\n" +
+			"	};\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 12)\n" + 
+			"	throw new IOException();\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type IOException\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 16)\n" + 
+			"	throw new ClassNotFoundException(); \n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type ClassNotFoundException\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399537 - [1.8][compiler] Exceptions thrown from lambda body must match specification per function descriptor 
+public void test039() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"import java.io.EOFException;\n" +
+			"import java.io.IOException;\n" +
+			"import java.sql.SQLException;\n" +
+			"import java.sql.SQLTransientException;\n" +
+			"import java.util.List;\n" +
+			"import java.util.concurrent.TimeoutException;\n" +
+			"interface A {\n" +
+			"  List<String> foo(List<String> arg) throws IOException, SQLTransientException;\n" +
+			"}\n" +
+			"interface B {\n" +
+			"  List foo(List<String> arg) throws EOFException, SQLException, TimeoutException;\n" +
+			"}\n" +
+			"interface C {\n" +
+			"  List foo(List arg) throws Exception;\n" +
+			"}\n" +
+			"interface D extends A, B {}\n" +
+			"interface E extends A, B, C {}\n" +
+			"public class X {\n" +
+			"	int var;\n" +
+			"	D d = (x) -> {\n" +
+			"		switch (var) {\n" +
+			"		case 0 : throw new EOFException();\n" +
+			"		case 1: throw new IOException();\n" +
+			"		case 2: throw new SQLException();\n" +
+			"		case 3: throw new SQLTransientException();\n" +
+			"		case 4: throw new TimeoutException();\n" +
+			"		default: throw new NullPointerException();\n" +
+			"		}\n" +
+			"	};\n" +
+			"	E e = (x) -> {\n" +
+			"		switch (var) {\n" +
+			"		case 0 : throw new EOFException();\n" +
+			"		case 1: throw new IOException();\n" +
+			"		case 2: throw new SQLException();\n" +
+			"		case 3: throw new SQLTransientException();\n" +
+			"		case 4: throw new TimeoutException();\n" +
+			"		default: throw new NullPointerException();\n" +
+			"		}\n" +
+			"	};\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 11)\n" + 
+			"	List foo(List<String> arg) throws EOFException, SQLException, TimeoutException;\n" + 
+			"	^^^^\n" + 
+			"List is a raw type. References to generic type List<E> should be parameterized\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 14)\n" + 
+			"	List foo(List arg) throws Exception;\n" + 
+			"	^^^^\n" + 
+			"List is a raw type. References to generic type List<E> should be parameterized\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 14)\n" + 
+			"	List foo(List arg) throws Exception;\n" + 
+			"	         ^^^^\n" + 
+			"List is a raw type. References to generic type List<E> should be parameterized\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 23)\n" + 
+			"	case 1: throw new IOException();\n" + 
+			"	        ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type IOException\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 24)\n" + 
+			"	case 2: throw new SQLException();\n" + 
+			"	        ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type SQLException\n" + 
+			"----------\n" + 
+			"6. ERROR in X.java (at line 26)\n" + 
+			"	case 4: throw new TimeoutException();\n" + 
+			"	        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type TimeoutException\n" + 
+			"----------\n" + 
+			"7. ERROR in X.java (at line 33)\n" + 
+			"	case 1: throw new IOException();\n" + 
+			"	        ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type IOException\n" + 
+			"----------\n" + 
+			"8. ERROR in X.java (at line 34)\n" + 
+			"	case 2: throw new SQLException();\n" + 
+			"	        ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type SQLException\n" + 
+			"----------\n" + 
+			"9. ERROR in X.java (at line 36)\n" + 
+			"	case 4: throw new TimeoutException();\n" + 
+			"	        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type TimeoutException\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399537 - [1.8][compiler] Exceptions thrown from lambda body must match specification per function descriptor 
+public void test040() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I {\n" +
+			"  <P extends Exception> Object m() throws P;\n" +
+			"}\n" +
+			"interface J {\n" +
+			"  <Q extends Exception> String m() throws Exception;\n" +
+			"}\n" +
+			"interface G extends I, J {}\n" +
+			"public class X {\n" +
+			"	int var;\n" +
+			"	G g1 = () -> {\n" +
+			"	    throw new Exception(); \n" +
+			"	};\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	G g1 = () -> {\n" + 
+			"	    throw new Exception(); \n" + 
+			"	};\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method m of type J is generic \n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399537 - [1.8][compiler] Exceptions thrown from lambda body must match specification per function descriptor 
+public void test041() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"import java.io.IOException;\n" +
+			"import java.sql.SQLException;\n" +
+			"interface G1 {\n" +
+			"  <E extends Exception> Object m(E p) throws E;\n" +
+			"}\n" +
+			"interface G2 {\n" +
+			"  <F extends Exception> String m(F q) throws Exception;\n" +
+			"}\n" +
+			"interface G extends G1, G2 {} // G has descriptor <F extends Exception> ()->String throws F\n" +
+			"public class X {\n" +
+			"	G g = (x) -> { // Elided type is inferred from descriptor to be F\n" +
+			"	    throw x;    // ~== throw new F()\n" +
+			"	};\n" +
+			"}\n" +
+			"class Y implements G {\n" +
+			"	public <T extends Exception> String m(T t) throws T {\n" +
+			"		throw t;\n" +
+			"	}\n" +
+			"	void foo(G1 g1) {\n" +
+			"			g1.m(new IOException());\n" +
+			"	}\n" +
+			"	void foo(G2 g2) {\n" +
+			"			g2.m(new SQLException());\n" +
+			"	}\n" +
+			"}\n"
+
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 11)\n" + 
+			"	G g = (x) -> { // Elided type is inferred from descriptor to be F\n" + 
+			"	    throw x;    // ~== throw new F()\n" + 
+			"	};\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method m of type G2 is generic \n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 20)\n" + 
+			"	g1.m(new IOException());\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type IOException\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 23)\n" + 
+			"	g2.m(new SQLException());\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Unhandled exception type Exception\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399537 - [1.8][compiler] Exceptions thrown from lambda body must match specification per function descriptor 
+public void test042() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"import java.io.IOException;\n" +
+			"import java.sql.SQLException;\n" +
+			"interface G1 {\n" +
+			"  <E extends Exception> Object m(E p) throws E;\n" +
+			"}\n" +
+			"interface G2 {\n" +
+			"  <F extends Exception> String m(F q) throws Exception;\n" +
+			"}\n" +
+			"interface G extends G1, G2 {} // G has descriptor <F extends Exception> ()->String throws F\n" +
+			"public class X {\n" +
+			"	G g1 = (F x) -> {\n" +
+			"	    throw x;\n" +
+			"	};\n" +
+			"	G g2 = (IOException x) -> {\n" +
+			"	    throw x;\n" +
+			"	};\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 11)\n" + 
+			"	G g1 = (F x) -> {\n" + 
+			"	    throw x;\n" + 
+			"	};\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method m of type G2 is generic \n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 14)\n" + 
+			"	G g2 = (IOException x) -> {\n" + 
+			"	    throw x;\n" + 
+			"	};\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method m of type G2 is generic \n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399224 - [1.8][compiler][internal] Implement TypeBinding.getSingleAbstractMethod 
+public void test043() {
+	Map options = getCompilerOptions();
+	options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR);
+	options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.IGNORE);
+	options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE);
+	options.put(CompilerOptions.OPTION_ReportTypeParameterHiding, CompilerOptions.IGNORE);
+
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+            "import java.util.List;\n" +
+			"interface A { void foo(); }\n" +  // yes
+			"interface B { boolean equals(Object obj); }\n" + // no
+			"interface C extends B { void foo(); }\n" + // yes
+			"interface D<T> { boolean equals(Object obj); void foo(); }\n" + // yes
+			"interface E { void foo(); Object clone(); }\n" + // no
+			"interface F { void foo(List<String> p); }\n" + // yes
+            "interface G { void foo(List<String> p); }\n" + // yes
+            "interface H extends F, G {}\n" + // yes
+            "interface I { List foo(List<String> p); }\n" + // yes
+            "interface J { List<String> foo(List arg); }\n" + // yes
+            "interface K extends I, J {}\n" + // yes
+            "interface L { void foo(List<Integer> p); }\n" +  // yes
+            "interface M extends I, L {}\n" + // no
+            "interface N { void foo(List<String> p, Class q); }\n" + // yes
+            "interface O { void foo(List p, Class<?> q); }\n" + // yes
+            "interface P extends N, O {}\n" + // no
+            "interface Q { long foo(); }\n" + // yes
+            "interface R { int foo(); }\n" + // yes
+            "interface S extends Q, R {}\n" + // no
+            "interface T<P> { void foo(P p); }\n" + // yes
+            "interface U<P> { void foo(P p); }\n" + // yes
+            "interface V<P, Q> extends T<P>, U<Q> {}\n" + // no
+            "interface W<T, N extends Number> { void m(T arg); void m(N arg); }\n" + // no
+            "interface X extends W<String, Integer> {}\n" + // no
+            "interface Y extends W<Integer, Integer> {}\n" + // yes
+
+            "class Z {\n" +
+            "    A a              =    () -> {};\n" +
+            "    B b              =    () -> {};\n" +
+            "    C c              =    () -> {};\n" +
+            "    D<?> d           =    () -> {};\n" +
+            "    E e              =    () -> {};\n" +
+            "    F f              =    (p0) -> {};\n" +
+            "    G g              =    (p0) -> {};\n" +
+            "    H h              =    (p0) -> {};\n" +
+            "    I i              =    (p0) -> { return null; };\n" +
+            "    J j              =    (p0) -> { return null; };\n" +
+            "    K k              =    (p0) -> { return null; };\n" +
+            "    L l              =    (p0) -> {};\n" +
+            "    M m              =    (p0) -> {};\n" +
+            "    N n              =    (p0, q0) -> {};\n" +
+            "    O o              =    (p0, q0) -> {};\n" +
+            "    P p              =    (p0, q0) -> {};\n" +
+            "    Q q              =    () -> { return 0;};\n" +
+            "    R r              =    () -> { return 0;};\n" +
+            "    S s              =    () -> {};\n" +
+            "    T<?> t           =    (p0) -> {};\n" +
+            "    U<?> u           =    (p0) -> {};\n" +
+            "    V<?,?> v         =    (p0) -> {};\n" +
+            "    W<?,?> w         =    (p0) -> {};\n" +
+            "    X x              =    (p0) -> {};\n" +
+            "    Y y              =    (p0) -> {};\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 17)\n" + 
+			"	interface P extends N, O {}\n" + 
+			"	          ^\n" + 
+			"Name clash: The method foo(List, Class<?>) of type O has the same erasure as foo(List<String>, Class) of type N but does not override it\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 20)\n" + 
+			"	interface S extends Q, R {}\n" + 
+			"	          ^\n" + 
+			"The return types are incompatible for the inherited methods Q.foo(), R.foo()\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 23)\n" + 
+			"	interface V<P, Q> extends T<P>, U<Q> {}\n" + 
+			"	          ^\n" + 
+			"Name clash: The method foo(P) of type U<P> has the same erasure as foo(P) of type T<P> but does not override it\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 29)\n" + 
+			"	B b              =    () -> {};\n" + 
+			"	                      ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 32)\n" + 
+			"	E e              =    () -> {};\n" + 
+			"	                      ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"6. ERROR in X.java (at line 40)\n" + 
+			"	M m              =    (p0) -> {};\n" + 
+			"	                      ^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"7. ERROR in X.java (at line 43)\n" + 
+			"	P p              =    (p0, q0) -> {};\n" + 
+			"	                      ^^^^^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"8. ERROR in X.java (at line 46)\n" + 
+			"	S s              =    () -> {};\n" + 
+			"	                      ^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"9. ERROR in X.java (at line 49)\n" + 
+			"	V<?,?> v         =    (p0) -> {};\n" + 
+			"	                      ^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"10. ERROR in X.java (at line 50)\n" + 
+			"	W<?,?> w         =    (p0) -> {};\n" + 
+			"	                      ^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"11. ERROR in X.java (at line 51)\n" + 
+			"	X x              =    (p0) -> {};\n" + 
+			"	                      ^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n",
+			null,
+			false,
+			options);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399224 - [1.8][compiler][internal] Implement TypeBinding.getSingleAbstractMethod 
+public void test044() {
+	Map options = getCompilerOptions();
+	options.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR);
+	options.put(CompilerOptions.OPTION_ReportUncheckedTypeOperation, CompilerOptions.IGNORE);
+	options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE);
+	options.put(CompilerOptions.OPTION_ReportTypeParameterHiding, CompilerOptions.IGNORE);
+
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"import java.util.List;\n" +
+			"interface A { <T> T foo(List<T> p); }\n" +
+			"interface B { <S> S foo(List<S> p); }\n" +
+			"interface C { <T, S> S foo(List<T> p); }\n" +
+			"interface D extends A, B {}\n" +
+			"interface E extends A, C {}\n" +
+
+			"class Z {\n" +
+	        "    A a              =    (p) -> { return null;};\n" +
+	        "    B b              =    (p) -> { return null;};\n" +
+	        "    C c              =    (p) -> { return null;};\n" +
+	        "    D d              =    (p) -> { return null;};\n" +
+	        "    E e              =    (p) -> { return null;};\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	interface E extends A, C {}\n" + 
+			"	          ^\n" + 
+			"Name clash: The method foo(List<T>) of type C has the same erasure as foo(List<T>) of type A but does not override it\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 8)\n" + 
+			"	A a              =    (p) -> { return null;};\n" + 
+			"	                      ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method foo of type A is generic \n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 9)\n" + 
+			"	B b              =    (p) -> { return null;};\n" + 
+			"	                      ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method foo of type B is generic \n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 10)\n" + 
+			"	C c              =    (p) -> { return null;};\n" + 
+			"	                      ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method foo of type C is generic \n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 11)\n" + 
+			"	D d              =    (p) -> { return null;};\n" + 
+			"	                      ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Illegal lambda expression: Method foo of type A is generic \n" + 
+			"----------\n" + 
+			"6. ERROR in X.java (at line 12)\n" + 
+			"	E e              =    (p) -> { return null;};\n" + 
+			"	                      ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n",
+			null,
+			false,
+			options);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400386 - [1.8][spec] Broken example in 9.8, discussion box - bullet 2 ?
+public void test045() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"interface I { Object m(); }\n" +
+			"interface J<S> { S m(); }\n" +
+			"interface K<T> { T m(); }\n" +
+			"interface Functional<S,T> extends I, J<S>, K<T> {}\n" +
+			"class X {\n" +
+			"    Functional<String,Integer> f = () -> { };\n" +
+			"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	interface Functional<S,T> extends I, J<S>, K<T> {}\n" + 
+			"	          ^^^^^^^^^^\n" + 
+			"The return types are incompatible for the inherited methods I.m(), J<S>.m(), K<T>.m()\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	Functional<String,Integer> f = () -> { };\n" + 
+			"	                               ^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+public void test046() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"import java.util.List;\n" +
+			"interface A { void f(List<String> ls); }\n" +
+			"interface B { void f(List<Integer> li); }\n" +
+			"interface C extends A,B {}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	interface C extends A,B {}\n" + 
+			"	          ^\n" + 
+			"Name clash: The method f(List<Integer>) of type B has the same erasure as f(List<String>) of type A but does not override it\n" + 
+			"----------\n");
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test047() {
+	// This test checks that the simple cases are OK
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    int var = 2;\n" + 
+					"    I x = new I() {\n" + 
+					"      public void doit() {\n" + 
+					"        System.out.println(args); // OK: args is not re-assignment since declaration/first assignment\n" + 
+					"        System.out.println(var); // Error: var is not effectively final\n" + 
+					"      }\n" + 
+					"    };\n" + 
+					"    var=2;\n" + 
+					"  }\n" + 
+					"}" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	System.out.println(var); // Error: var is not effectively final\n" + 
+				"	                   ^^^\n" + 
+				"Local variable var defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n"
+				);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test048() {
+	// This test checks that the simple cases are OK
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    int var = 2;\n" + 
+					"    I x2 = () -> {\n" + 
+					"      System.out.println(var); // Error: var is not effectively final\n" + 
+					"    };\n" + 
+					"    var=2;\n" + 
+					"  }\n" + 
+					"}" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	System.out.println(var); // Error: var is not effectively final\n" + 
+				"	                   ^^^\n" + 
+				"Local variable var defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test049() {
+	// This test checks that the simple cases are OK
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    int var = 2;\n" + 
+					"    I x2 = () -> {\n" + 
+					"      System.out.println(args); // OK: args is not re-assignment since declaration/first assignment\n" + 
+					"    };\n" + 
+					"    var=2;\n" + 
+					"  }\n" + 
+					"}" ,
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test050() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    try {\n" + 
+					"      new java.io.File(\"dweep\").getCanonicalPath();\n" + 
+					"    } catch (java.io.IOException ioe) {\n" + 
+					"      I x2 = () -> {\n" + 
+					"        System.out.println(ioe.getMessage()); // OK: args is not re-assignment since declaration/first assignment\n" + 
+					"      };\n" + 
+					"    };\n"+
+					"  }\n" +
+					"}\n"
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test051() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    java.util.List<String> list = new java.util.ArrayList<>();\n" + 
+					"    for (String s : list) {\n" + 
+					"      I x2 = () -> {\n" + 
+					"        System.out.println(s); // OK: args is not re-assignment since declaration/first assignment\n" + 
+					"      };\n" + 
+					"    };\n" + 
+					"  }\n" + 
+					"\n" +
+					"}\n" ,
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test052() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  public static void main(String[] args) {\n" + 
+					"    java.util.List<String> list = new java.util.ArrayList<>();\n" + 
+					"    for (String s2 : list) {\n" + 
+					"      s2 = \"Nice!\";\n" + 
+					"      I x2 = () -> {\n" + 
+					"        System.out.println(s2); // Error: var is not effectively final\n" + 
+					"      };\n" + 
+					"    };\n" + 
+					"  }\n" + 
+					"\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	System.out.println(s2); // Error: var is not effectively final\n" + 
+				"	                   ^^\n" + 
+				"Local variable s2 defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test053() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  void foo() {\n" + 
+					"    try {\n" + 
+					"       System.out.println(\"try\");\n" +
+					"  } catch (NullPointerException | ArrayIndexOutOfBoundsException e) {\n" + 
+					"    I i = () -> {\n" + 
+					"      System.out.println(e);\n" + 
+					"     };\n" + 
+					"    }\n" + 
+					"  }\n" +
+					"}\n" ,
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test054() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  void foo2(String[] args) {\n" + 
+					"   int var;\n" + 
+					"   if (args != null)\n" + 
+					"      var = args.length;\n" + 
+					"   else\n" + 
+					"      var = 2;\n" + 
+					"   I x = new I() {\n" + 
+					"     public void doit() {\n" + 
+					"       System.out.println(var);\n" +  // no error here.
+					"       args = null;\n" + // error here.
+					"     }\n" + 
+					"   };\n" + 
+					"  }\n" +
+					"}\n" ,
+				}, 		
+				"----------\n" + 
+				"1. ERROR in X.java (at line 14)\n" + 
+				"	args = null;\n" + 
+				"	^^^^\n" + 
+				"Local variable args defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test055() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  void foo(final int x) {\n" + 
+					"    I i = () -> {\n" + 
+					"      x = 10;\n" + 
+					"     };\n" + 
+					"  }\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	x = 10;\n" + 
+				"	^\n" + 
+				"The final local variable x cannot be assigned. It must be blank and not using a compound assignment\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test056() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  void foo(final int x) {\n" + 
+					"    X i = new X() {\n" + 
+					"      { x = 10; }\n" + 
+					"     };\n" + 
+					"  }\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	{ x = 10; }\n" + 
+				"	  ^\n" + 
+				"The final local variable x cannot be assigned, since it is defined in an enclosing type\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test057() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  void foo(int x) {\n" + 
+					"    I i = () -> {\n" + 
+					"      x = 10;\n" + 
+					"     };\n" + 
+					"  }\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	x = 10;\n" + 
+				"	^\n" + 
+				"Local variable x defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test058() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  void foo(int x) {\n" + 
+					"    X i = new X() {\n" + 
+					"      { x = 10; }\n" + 
+					"     };\n" + 
+					"  }\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	{ x = 10; }\n" + 
+				"	  ^\n" + 
+				"Local variable x defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test059() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"class X {\n" +
+					"	void foo(int [] p) {\n" +
+					"		for (int is : p) {\n" +
+					"			I j = new I () {\n" +
+					"				public void foo() {\n" +
+					"					System.out.println(is);\n" +
+					"				};\n" +
+					"			};\n" +
+					"		}\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test060() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"class X {\n" +
+					"	void foo(int [] p) {\n" +
+					"		for (int is : p) {\n" +
+					"			I j = () -> {\n" +
+					"					System.out.println(is);\n" +
+					"			};\n" +
+					"		}\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test061() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" + 
+					"	void doit();\n" + 
+					"}\n" + 
+					"public class X {\n" + 
+					"  void foo2(String[] args) {\n" + 
+					"   int var;\n" + 
+					"   if (args != null)\n" + 
+					"      var = args.length;\n" + 
+					"   else\n" + 
+					"      var = 2;\n" + 
+					"   I x = () ->  {\n" + 
+					"       System.out.println(var);\n" +  // no error here.
+					"       args = null;\n" + // error here.
+					"   };\n" + 
+					"  }\n" +
+					"}\n" ,
+				}, 		
+				"----------\n" + 
+				"1. ERROR in X.java (at line 13)\n" + 
+				"	args = null;\n" + 
+				"	^^^^\n" + 
+				"Local variable args defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test062() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) {\n" +
+					"    int var;\n" +
+					"    if (args != null) {\n" +
+					"       var = args.length;\n" +
+					"       I x = new I() {\n" +
+					"         public void doit() {\n" +
+					"           System.out.println(var);\n" +
+					"         }\n" +
+					"       };\n" +
+					"    } else {\n" +
+					"       var = 2; // HERE\n" +
+					"    }\n" +
+					"  }\n" +
+					"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test063() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.io.IOException;\n" +
+					"interface I {\n" +
+					"    void doit();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) throws IOException {\n" +
+					"\n" +
+					"	try {\n" +
+					"		throw new IOException();\n" +
+					"	} catch (Exception e) {\n" +
+					"		if (args == null) {\n" +
+					"			throw e;\n" +
+					"		} \n" +
+					"                else {\n" +
+					"			e = null;\n" +
+					"		}\n" +
+					"	}\n" +
+					"  }\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 12)\n" + 
+				"	throw e;\n" + 
+				"	^^^^^^^^\n" + 
+				"Unhandled exception type Exception\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 14)\n" + 
+				"	else {\n" + 
+				"			e = null;\n" + 
+				"		}\n" + 
+				"	     ^^^^^^^^^^^^^^^^^^\n" + 
+				"Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test064() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.io.IOException;\n" +
+					"interface I {\n" +
+					"    void doit();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"  public static void main(String[] args) throws IOException {\n" +
+					"\n" +
+					"	try {\n" +
+					"		throw new IOException();\n" +
+					"	} catch (Exception e) {\n" +
+					"		if (args == null) {\n" +
+					"			throw e;\n" +
+					"		} \n" +
+					"	}\n" +
+					"  }\n" +
+					"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test065() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"class X {\n" +
+					"	void foo() {\n" +
+					"		int x = 10;\n" +
+					"		I i = () -> {\n" +
+					"			System.out.println(x++);\n" +
+					"		};\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	System.out.println(x++);\n" + 
+				"	                   ^\n" + 
+				"Local variable x defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test066() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.io.IOException;\n" +
+					"class X {\n" +
+					"	void foo(int x) throws IOException {\n" +
+					"		try {\n" +
+					"			throw new IOException();\n" +
+					"		} catch (Exception e) {\n" +
+					"			if (x == 0) {\n" +
+					"				throw e;\n" +
+					"			} else {\n" +
+					"				e = null;\n" +
+					"			}\n" +
+					"		}\n" +
+					"	}\n" +
+					"}\n" ,
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	throw e;\n" + 
+				"	^^^^^^^^\n" + 
+				"Unhandled exception type Exception\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 9)\n" + 
+				"	} else {\n" + 
+				"				e = null;\n" + 
+				"			}\n" + 
+				"	       ^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Statement unnecessarily nested within else clause. The corresponding then clause does not complete normally\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test067() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit ();\n" +
+					"}\n" +
+					"class X {\n" +
+					"	int p;\n" +
+					"	void foo(int p) {\n" +
+					"		int i = 10;\n" +
+					"		X x = new X();\n" +
+					"		x = new X();\n" +
+					"		I l = () -> {\n" +
+					"			x.p = i++;\n" +
+					"		};\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 6)\n" + 
+				"	void foo(int p) {\n" + 
+				"	             ^\n" + 
+				"The parameter p is hiding a field from type X\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 11)\n" + 
+				"	x.p = i++;\n" + 
+				"	      ^\n" + 
+				"Local variable i defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382721, [1.8][compiler] Effectively final variables needs special treatment
+public void test068() {
+	// This test checks that common semantic checks are indeed run
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit ();\n" +
+					"}\n" +
+					"class X {\n" +
+					"	int p;\n" +
+					"	void foo(int p) {\n" +
+					"		int i = 10;\n" +
+					"		X x = new X();\n" +
+					"		x = new X();\n" +
+					"		I l = () -> {\n" +
+					"			x.p = i;\n" +
+					"		};\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 6)\n" + 
+				"	void foo(int p) {\n" + 
+				"	             ^\n" + 
+				"The parameter p is hiding a field from type X\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 11)\n" + 
+				"	x.p = i;\n" + 
+				"	^\n" + 
+				"Local variable x defined in an enclosing scope must be final or effectively final\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test069() {
+	// Lambda argument hides a field.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	int f1;\n" +
+					"	int f2;\n" +
+					"\n" +
+					"	void foo() {\n" +
+					"		I i = (int f1)  -> {\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 9)\n" + 
+				"	I i = (int f1)  -> {\n" + 
+				"	           ^^\n" + 
+				"The parameter f1 is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test070() {
+	// Lambda argument redeclares outer method argument.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	void foo(int x) {\n" +
+					"		I i = (int x)  -> {\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	I i = (int x)  -> {\n" + 
+				"	           ^\n" + 
+				"Lambda expression\'s parameter x cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test071() {
+	// Lambda argument redeclares outer method local.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	void foo(int x) {\n" +
+					"       int l;\n" +
+					"		I i = (int l)  -> {\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	I i = (int l)  -> {\n" + 
+				"	           ^\n" + 
+				"Lambda expression\'s parameter l cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test072() {
+	// Lambda redeclares its own argument
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	void foo(int x) {\n" +
+					"       int l;\n" +
+					"		I i = (int p, int p)  -> {\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	I i = (int p, int p)  -> {\n" + 
+				"	                  ^\n" + 
+				"Duplicate parameter p\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test073() {
+	// Lambda local hides a field
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo() {\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           int f;\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 8)\n" + 
+				"	int f;\n" + 
+				"	    ^\n" + 
+				"The local variable f is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test074() {
+	// Lambda local redeclares the enclosing method's argument
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int a) {\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           int a;\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	int a;\n" + 
+				"	    ^\n" + 
+				"Lambda expression\'s local variable a cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test075() {
+	// Lambda local redeclares the enclosing method's local
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int a) {\n" +
+					"       int loc;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           int loc;\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	int loc;\n" + 
+				"	    ^^^\n" + 
+				"Lambda expression\'s local variable loc cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test076() {
+	// Lambda local redeclares its own parameter
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int a) {\n" +
+					"       int loc;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           int p;\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	int p;\n" + 
+				"	    ^\n" + 
+				"Duplicate local variable p\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test077() {
+	// Lambda local redeclares its own self
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int a) {\n" +
+					"       int loc;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           int self, self;\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	int self, self;\n" + 
+				"	          ^^^^\n" + 
+				"Duplicate local variable self\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test078() {
+	// Nested Lambda argument redeclares a field.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int a) {\n" +
+					"       int loc;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = (int f, int p0) -> {};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = (int f, int p0) -> {};\n" + 
+				"	            ^\n" + 
+				"The parameter f is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test079() {
+	// Nested Lambda argument redeclares outer method's argument.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int loc;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = (int f, int outerp) -> {};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = (int f, int outerp) -> {};\n" + 
+				"	            ^\n" + 
+				"The parameter f is hiding a field from type X\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 9)\n" + 
+				"	I i2 = (int f, int outerp) -> {};\n" + 
+				"	                   ^^^^^^\n" + 
+				"Lambda expression\'s parameter outerp cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test080() {
+	// Nested Lambda argument redeclares outer method's local.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = (int locouter, int outerp) -> {};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	I i2 = (int locouter, int outerp) -> {};\n" + 
+				"	            ^^^^^^^^\n" + 
+				"Lambda expression\'s parameter locouter cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 9)\n" + 
+				"	I i2 = (int locouter, int outerp) -> {};\n" + 
+				"	                          ^^^^^^\n" + 
+				"Lambda expression\'s parameter outerp cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test081() {
+	// Nested Lambda argument redeclares outer lambda's argument.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = (int p, int q) -> {};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	I i2 = (int p, int q) -> {};\n" + 
+				"	            ^\n" + 
+				"Lambda expression\'s parameter p cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 9)\n" + 
+				"	I i2 = (int p, int q) -> {};\n" + 
+				"	                   ^\n" + 
+				"Lambda expression\'s parameter q cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test082() {
+	// Nested Lambda argument redeclares outer lambda's local.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = (int lamlocal, int q) -> {};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {};\n" + 
+				"	            ^^^^^^^^\n" + 
+				"Lambda expression\'s parameter lamlocal cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {};\n" + 
+				"	                          ^\n" + 
+				"Lambda expression\'s parameter q cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test083() {
+	// Nested Lambda local redeclares a field.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = (int lamlocal, int q) -> {int f;};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {int f;};\n" + 
+				"	            ^^^^^^^^\n" + 
+				"Lambda expression\'s parameter lamlocal cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {int f;};\n" + 
+				"	                          ^\n" + 
+				"Lambda expression\'s parameter q cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {int f;};\n" + 
+				"	                                     ^\n" + 
+				"The local variable f is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test084() {
+	// Nested Lambda local redeclares outer methods local.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = (int lamlocal, int q) -> {int locouter;};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {int locouter;};\n" + 
+				"	            ^^^^^^^^\n" + 
+				"Lambda expression\'s parameter lamlocal cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {int locouter;};\n" + 
+				"	                          ^\n" + 
+				"Lambda expression\'s parameter q cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int lamlocal, int q) -> {int locouter;};\n" + 
+				"	                                     ^^^^^^^^\n" + 
+				"Lambda expression\'s local variable locouter cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test085() {
+	// Nested Lambda local redeclares outer lambda's argument & local
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = (int j, int q) -> {int p, lamlocal;};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int j, int q) -> {int p, lamlocal;};\n" + 
+				"	                   ^\n" + 
+				"Lambda expression\'s parameter q cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int j, int q) -> {int p, lamlocal;};\n" + 
+				"	                              ^\n" + 
+				"Lambda expression\'s local variable p cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int j, int q) -> {int p, lamlocal;};\n" + 
+				"	                                 ^^^^^^^^\n" + 
+				"Lambda expression\'s local variable lamlocal cannot redeclare another local variable defined in an enclosing scope. \n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test086() {
+	// Nested Lambda local redeclares its own argument & local
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = (int x1, int x2) -> {int x1, x2;};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int x1, int x2) -> {int x1, x2;};\n" + 
+				"	                                ^^\n" + 
+				"Duplicate local variable x1\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = (int x1, int x2) -> {int x1, x2;};\n" + 
+				"	                                    ^^\n" + 
+				"Duplicate local variable x2\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test087() {
+	// Inner class (!) inside Lambda hides field
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           class X { void foo(int f) {} }\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	class X { void foo(int f) {} }\n" + 
+				"	      ^\n" + 
+				"The nested type X cannot hide an enclosing type\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 10)\n" + 
+				"	class X { void foo(int f) {} }\n" + 
+				"	                       ^\n" + 
+				"The parameter f is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test088() {
+	// class inside lambda (!) redeclares a field.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int a) {\n" +
+					"       int loc;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = new I() { public void foo(int f, int p0) {};\n" +
+					"		};};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = new I() { public void foo(int f, int p0) {};\n" + 
+				"	                                     ^\n" + 
+				"The parameter f is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test089() {
+	// class inside lambda redeclares outer method's argument.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int loc;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = new I() { public void foo(int f, int outerp) {}};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = new I() { public void foo(int f, int outerp) {}};\n" + 
+				"	                                     ^\n" + 
+				"The parameter f is hiding a field from type X\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = new I() { public void foo(int f, int outerp) {}};\n" + 
+				"	                                            ^^^^^^\n" + 
+				"The parameter outerp is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test090() {
+	// class inside lambda redeclares outer method's local.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = new I() { public void foo(int locouter, int outerp)  {}};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = new I() { public void foo(int locouter, int outerp)  {}};\n" + 
+				"	                                     ^^^^^^^^\n" + 
+				"The parameter locouter is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = new I() { public void foo(int locouter, int outerp)  {}};\n" + 
+				"	                                                   ^^^^^^\n" + 
+				"The parameter outerp is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test091() {
+	// class inside lambda redeclares outer lambda's argument.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"           I i2 = new I() { public void foo (int p, int q) {}};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = new I() { public void foo (int p, int q) {}};\n" + 
+				"	                                      ^\n" + 
+				"The parameter p is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 9)\n" + 
+				"	I i2 = new I() { public void foo (int p, int q) {}};\n" + 
+				"	                                             ^\n" + 
+				"The parameter q is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test092() {
+	// class inside lambda redeclares outer lambda's local.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = new I() { public void foo (int lamlocal, int q)  {} };\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo (int lamlocal, int q)  {} };\n" + 
+				"	                                      ^^^^^^^^\n" + 
+				"The parameter lamlocal is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo (int lamlocal, int q)  {} };\n" + 
+				"	                                                    ^\n" + 
+				"The parameter q is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test093() {
+	// local of class inside lambda redeclares a field.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = new I() { public void foo (int lamlocal, int q) {int f;}};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo (int lamlocal, int q) {int f;}};\n" + 
+				"	                                      ^^^^^^^^\n" + 
+				"The parameter lamlocal is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo (int lamlocal, int q) {int f;}};\n" + 
+				"	                                                    ^\n" + 
+				"The parameter q is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo (int lamlocal, int q) {int f;}};\n" + 
+				"	                                                            ^\n" + 
+				"The local variable f is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test094() {
+	// local of class under lambda redeclares outer methods local.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = new I() { public void foo(int lamlocal, int q) {int locouter;}};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int lamlocal, int q) {int locouter;}};\n" + 
+				"	                                     ^^^^^^^^\n" + 
+				"The parameter lamlocal is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int lamlocal, int q) {int locouter;}};\n" + 
+				"	                                                   ^\n" + 
+				"The parameter q is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int lamlocal, int q) {int locouter;}};\n" + 
+				"	                                                           ^^^^^^^^\n" + 
+				"The local variable locouter is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test095() {
+	// local of class under lambda redeclares outer lambda's argument & local
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = new I() { public void foo(int j, int q) {int p, lamlocal;}};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int j, int q) {int p, lamlocal;}};\n" + 
+				"	                                            ^\n" + 
+				"The parameter q is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int j, int q) {int p, lamlocal;}};\n" + 
+				"	                                                    ^\n" + 
+				"The local variable p is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int j, int q) {int p, lamlocal;}};\n" + 
+				"	                                                       ^^^^^^^^\n" + 
+				"The local variable lamlocal is hiding another local variable defined in an enclosing scope\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382727, [1.8][compiler] Lambda expression parameters and locals cannot shadow variables from context
+public void test096() {
+	// local of class under lambda redeclares its own argument & local
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo(int p, int q);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   int f;\n" +
+					"	void foo(int outerp) {\n" +
+					"       int locouter;\n" +
+					"		I i = (int p, int q)  -> {\n" +
+					"       int lamlocal;\n" +
+					"           I i2 = new I() { public void foo(int x1, int x2) {int x1, x2;}};\n" +
+					"		};\n" +
+					"	}	\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int x1, int x2) {int x1, x2;}};\n" + 
+				"	                                                      ^^\n" + 
+				"Duplicate local variable x1\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 10)\n" + 
+				"	I i2 = new I() { public void foo(int x1, int x2) {int x1, x2;}};\n" + 
+				"	                                                          ^^\n" + 
+				"Duplicate local variable x2\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384687 [1.8] Wildcard type arguments should be rejected for lambda and reference expressions
+public void test097() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"class Action<K> {\r\n" + 
+			"  static <T1> int fooMethod(Object x) { return 0; }\r\n" + 
+			"}\r\n" + 
+			"interface I {\r\n" + 
+			"  int foo(Object x);\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\r\n" + 
+			"    I functional = Action::<?>fooMethod;\r\n" + // no raw type warning here, Action:: is really Action<>::
+			"  }\r\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	I functional = Action::<?>fooMethod;\n" + 
+			"	                        ^\n" + 
+			"Wildcard is not allowed at this location\n" + 
+			"----------\n");
+}
+
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=384687 [1.8] Wildcard type arguments should be rejected for lambda and reference expressions
+public void test098() {
+	this.runNegativeTest(
+			new String[] {
+			"X.java",
+			"class Action<K> {\r\n" + 
+			"  int foo(Object x, Object y, Object z) { return 0; }\r\n" + 
+			"}\r\n" + 
+			"interface I {\r\n" + 
+			"  void foo(Object x);\r\n" + 
+			"}\r\n" + 
+			"public class X {\r\n" + 
+			"  public static void main(String[] args) {\r\n" + 
+			"    Action<Object> exp = new Action<Object>();\r\n" + 
+			"    int x,y,z;\r\n" + 
+			"    I len6 = foo->exp.<?>method(x, y, z);\r\n" + 
+			"  }\r\n" + 
+			"}"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 11)\n" + 
+			"	I len6 = foo->exp.<?>method(x, y, z);\n" + 
+			"	                   ^\n" + 
+			"Wildcard is not allowed at this location\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399770: [1.8][compiler] Implement support for @FunctionalInterface
+public void test_bug399770_1() {
+	this.runConformTest(
+			new String[] {
+					"YYY.java",
+					"interface BASE { void run(); }\n" +
+					"@FunctionalInterface\n" +
+					"interface DERIVED extends BASE {void run();}" +
+					"public class YYY {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		System.out.println(\"Hello\");" +
+					"	}\n" +
+					"}",
+			},
+			"Hello"
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399770: [1.8][compiler] Implement support for @FunctionalInterface
+public void test_bug399770_2() {
+	this.runNegativeTest(
+			new String[] {
+					"YYY.java",
+					"interface BASE { void run(); }\n" +
+					"@FunctionalInterface\n" +
+					"interface DERIVED extends BASE {void run1();}" +
+					"@FunctionalInterface public class YYY {\n" +
+					"   @FunctionalInterface int x;" +
+					"	@FunctionalInterface public static void main(String[] args) {\n" +
+					"       @FunctionalInterface int y;" +
+					"		System.out.println(\"Hello\");" +
+					"	}\n" +
+					"}",
+			},
+			"----------\n" + 
+			"1. ERROR in YYY.java (at line 3)\n" + 
+			"	interface DERIVED extends BASE {void run1();}@FunctionalInterface public class YYY {\n" + 
+			"	          ^^^^^^^\n" + 
+			"Invalid \'@FunctionalInterface\' annotation; DERIVED is not a functional interface\n" + 
+			"----------\n" + 
+			"2. ERROR in YYY.java (at line 3)\n" + 
+			"	interface DERIVED extends BASE {void run1();}@FunctionalInterface public class YYY {\n" + 
+			"	                                                                               ^^^\n" + 
+			"Invalid \'@FunctionalInterface\' annotation; YYY is not a functional interface\n" + 
+			"----------\n" + 
+			"3. ERROR in YYY.java (at line 4)\n" + 
+			"	@FunctionalInterface int x;	@FunctionalInterface public static void main(String[] args) {\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The annotation @FunctionalInterface is disallowed for this location\n" + 
+			"----------\n" + 
+			"4. ERROR in YYY.java (at line 4)\n" + 
+			"	@FunctionalInterface int x;	@FunctionalInterface public static void main(String[] args) {\n" + 
+			"	                           	^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The annotation @FunctionalInterface is disallowed for this location\n" + 
+			"----------\n" + 
+			"5. ERROR in YYY.java (at line 5)\n" + 
+			"	@FunctionalInterface int y;		System.out.println(\"Hello\");	}\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The annotation @FunctionalInterface is disallowed for this location\n" + 
+			"----------\n"
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400745, [1.8][compiler] Compiler incorrectly allows shadowing of local class names.
+public void test400745() {
+	// Lambda redeclares a local class from its outer scope.
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public void foo() {\n" +
+					"		class Y {};\n" + 
+					"		I i = ()  -> {\n" +
+					"			class Y{} ;\n" +
+					"		};\n" +
+					"	}\n" +	
+					"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	class Y{} ;\n" + 
+			"	      ^\n" + 
+			"Duplicate nested type Y\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400745, [1.8][compiler] Compiler incorrectly allows shadowing of local class names.
+public void test400745a() {
+	// local type hiding scenario 
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	private void foo() {\n" +
+					"		class Y {}\n" +
+					"		X x = new X() {\n" +
+					"			private void foo() {\n" +
+					"				class Y {};\n" +
+					"			}\n" +
+					"		};\n" +
+					"		I i = () -> {\n" +
+					"			class LX {\n" +
+					"				void foo() {\n" +
+					"					class Y {};\n" +
+					"				}\n" +
+					"			};\n" +
+					"		};\n" +
+					"	}\n" +
+					"}\n",
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 5)\n" + 
+			"	private void foo() {\n" + 
+			"	             ^^^^^\n" + 
+			"The method foo() from the type X is never used locally\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 6)\n" + 
+			"	class Y {}\n" + 
+			"	      ^\n" + 
+			"The type Y is never used locally\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 8)\n" + 
+			"	private void foo() {\n" + 
+			"	             ^^^^^\n" + 
+			"The method foo() from the type new X(){} is never used locally\n" + 
+			"----------\n" + 
+			"4. WARNING in X.java (at line 9)\n" + 
+			"	class Y {};\n" + 
+			"	      ^\n" + 
+			"The type Y is hiding the type Y\n" + 
+			"----------\n" + 
+			"5. WARNING in X.java (at line 9)\n" + 
+			"	class Y {};\n" + 
+			"	      ^\n" + 
+			"The type Y is never used locally\n" + 
+			"----------\n" + 
+			"6. WARNING in X.java (at line 13)\n" + 
+			"	class LX {\n" + 
+			"	      ^^\n" + 
+			"The type LX is never used locally\n" + 
+			"----------\n" + 
+			"7. WARNING in X.java (at line 14)\n" + 
+			"	void foo() {\n" + 
+			"	     ^^^^^\n" + 
+			"The method foo() from the type LX is never used locally\n" + 
+			"----------\n" + 
+			"8. WARNING in X.java (at line 15)\n" + 
+			"	class Y {};\n" + 
+			"	      ^\n" + 
+			"The type Y is hiding the type Y\n" + 
+			"----------\n" + 
+			"9. WARNING in X.java (at line 15)\n" + 
+			"	class Y {};\n" + 
+			"	      ^\n" + 
+			"The type Y is never used locally\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"public interface I<P extends ParameterType> {\n" +
+					"	<T extends ExceptionType , R extends ReturnType> R doit(P p) throws T;\n" +
+					"}\n" +
+					"\n" +
+					"class ReturnType {\n" +
+					"}\n" +
+					"\n" +
+					"class ParameterType {\n" +
+					"}\n" +
+					"\n" +
+					"class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I i = (p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\I.java (at line 12)\n" + 
+			"	class ExceptionType extends Exception {\n" + 
+			"	      ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	^\n" + 
+			"I is a raw type. References to generic type I<P> should be parameterized\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ReturnType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ParameterType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ExceptionType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n");
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556a() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"public interface I<P extends ParameterType> {\n" +
+					"	<T extends ExceptionType , R extends ReturnType> R doit(P p) throws T;\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n" +
+					"\n" +
+					"class ParameterType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I i = (p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	^\n" + 
+			"I is a raw type. References to generic type I<P> should be parameterized\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ParameterType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556b() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType> {\n" +
+					"	<T extends ExceptionType , R extends ReturnType> R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n" +
+					"\n" +
+					"class ReturnType {\n" +
+					"}\n" +
+					"\n" +
+					"class ParameterType {\n" +
+					"}\n" +
+					"\n" +
+					"class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I i = (p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\I.java (at line 13)\n" + 
+			"	class ExceptionType extends Exception {\n" + 
+			"	      ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	^\n" + 
+			"I is a raw type. References to generic type I<P> should be parameterized\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ReturnType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 3)\n" + 
+			"	I i = (p) -> { return null; };\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ExceptionType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556c() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n" +
+					"class ParameterType {\n" +
+					"}\n" +
+					"class ReturnType {\n" +
+					"}\n" +
+					"class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I<?, ?, ?> i = (p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\I.java (at line 10)\n" + 
+			"	class ExceptionType extends Exception {\n" + 
+			"	      ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	I<?, ?, ?> i = (p) -> { return null; };\n" + 
+			"	               ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ReturnType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	I<?, ?, ?> i = (p) -> { return null; };\n" + 
+			"	               ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ParameterType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 3)\n" + 
+			"	I<?, ?, ?> i = (p) -> { return null; };\n" + 
+			"	               ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type ExceptionType from the descriptor computed for the target context is not visible here.  \n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556d() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I<?, ?, ?> i = (p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556e() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I<?, ?, ?> i = (String p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	I<?, ?, ?> i = (String p) -> { return null; };\n" + 
+			"	                ^^^^^^\n" + 
+			"Lambda expression\'s parameter p is expected to be of type List<? extends List<ParameterType>>[]\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556f() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I<? extends p.ParameterType, ? extends p.ExceptionType, ? extends p.ReturnType> i = (String p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	I<? extends p.ParameterType, ? extends p.ExceptionType, ? extends p.ReturnType> i = (String p) -> { return null; };\n" + 
+			"	                                                                                     ^^^^^^\n" + 
+			"Lambda expression\'s parameter p is expected to be of type List<? extends List<ParameterType>>[]\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556g() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"class P extends p.ParameterType {}\n" +
+					"class T extends p.ExceptionType {}\n" +
+					"class R extends p.ReturnType {}\n" +
+					"public class X {\n" +
+					"	I<P, T, R> i = (String p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	class T extends p.ExceptionType {}\n" + 
+			"	      ^\n" + 
+			"The serializable class T does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	I<P, T, R> i = (String p) -> { return null; };\n" + 
+			"	                ^^^^^^\n" + 
+			"Lambda expression\'s parameter p is expected to be of type List<? extends List<P>>[]\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556h() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"class P extends p.ParameterType {}\n" +
+					"class T extends p.ExceptionType {}\n" +
+					"class R extends p.ReturnType {}\n" +
+					"public class X {\n" +
+					"	I<T, R, P> i = (String p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	class T extends p.ExceptionType {}\n" + 
+			"	      ^\n" + 
+			"The serializable class T does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	I<T, R, P> i = (String p) -> { return null; };\n" + 
+			"	  ^\n" + 
+			"Bound mismatch: The type T is not a valid substitute for the bounded parameter <P extends ParameterType> of the type I<P,T,R>\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 6)\n" + 
+			"	I<T, R, P> i = (String p) -> { return null; };\n" + 
+			"	     ^\n" + 
+			"Bound mismatch: The type R is not a valid substitute for the bounded parameter <T extends ExceptionType> of the type I<P,T,R>\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 6)\n" + 
+			"	I<T, R, P> i = (String p) -> { return null; };\n" + 
+			"	        ^\n" + 
+			"Bound mismatch: The type P is not a valid substitute for the bounded parameter <R extends ReturnType> of the type I<P,T,R>\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 6)\n" + 
+			"	I<T, R, P> i = (String p) -> { return null; };\n" + 
+			"	               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The target type of this expression is not a well formed parameterized type due to bound(s) mismatch\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556i() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"class P extends p.ParameterType {}\n" +
+					"class T extends p.ExceptionType {}\n" +
+					"class R extends p.ReturnType {}\n" +
+					"public class X {\n" +
+					"	I<? super P, ? super T, ? super R> i = (String p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	class T extends p.ExceptionType {}\n" + 
+			"	      ^\n" + 
+			"The serializable class T does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	I<? super P, ? super T, ? super R> i = (String p) -> { return null; };\n" + 
+			"	                                        ^^^^^^\n" + 
+			"Lambda expression\'s parameter p is expected to be of type List<? extends List<P>>[]\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556j() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends P , R extends T> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"class P extends p.ParameterType {}\n" +
+					"class T extends p.ExceptionType {}\n" +
+					"class R extends p.ReturnType {}\n" +
+					"public class X {\n" +
+					"	I<?, ?, ?> i = (String p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in p\\I.java (at line 4)\n" + 
+			"	R doit(List<? extends List<P>>[] p) throws T;\n" + 
+			"	                                           ^\n" + 
+			"No exception of type T can be thrown; an exception type must be a subclass of Throwable\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	class T extends p.ExceptionType {}\n" + 
+			"	      ^\n" + 
+			"The serializable class T does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	I<?, ?, ?> i = (String p) -> { return null; };\n" + 
+			"	               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The target type of this expression is not a well formed parameterized type due to bound(s) mismatch\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=400556, [1.8][compiler] Visibility checks are missing for lambda/reference expressions
+public void test400556k() {
+	this.runNegativeTest(
+			new String[] {
+					"p/I.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"public interface I<P extends ParameterType, T extends ExceptionType , R extends ReturnType> {\n" +
+					"	R doit(List<? extends List<P>>[] p) throws T;\n" +
+					"}\n",
+					"p/ParameterType.java",
+					"package p;\n" +
+					"public class ParameterType {\n" +
+					"}\n",
+					"p/ReturnType.java",
+					"package p;\n" +
+					"public class ReturnType {\n" +
+					"}\n",
+					"p/ExceptionType.java",
+					"package p;\n" +
+					"public class ExceptionType extends Exception {\n" +
+					"}\n",
+					"X.java",
+					"import p.I;\n" +
+					"public class X {\n" +
+					"	I i = (String p) -> { return null; };\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in p\\ExceptionType.java (at line 2)\n" + 
+			"	public class ExceptionType extends Exception {\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"The serializable class ExceptionType does not declare a static final serialVersionUID field of type long\n" + 
+			"----------\n" + 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 3)\n" + 
+			"	I i = (String p) -> { return null; };\n" + 
+			"	^\n" + 
+			"I is a raw type. References to generic type I<P,T,R> should be parameterized\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	I i = (String p) -> { return null; };\n" + 
+			"	       ^^^^^^\n" + 
+			"Lambda expression\'s parameter p is expected to be of type List[]\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	int x = 0;\n" +
+					"	I i = x::zoo;\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = x::zoo;\n" + 
+			"	      ^\n" + 
+			"Cannot invoke zoo(int, String) on the primitive type int\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750a() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	int x = 0;\n" +
+					"	I i = I::new;\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = I::new;\n" + 
+			"	      ^\n" + 
+			"Cannot instantiate the type I\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750b() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void zoo(int x, String p);\n" +
+					"}\n" +
+					"abstract public class X {\n" +
+					"	int x = 0;\n" +
+					"	I i = X::new;\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = X::new;\n" + 
+			"	      ^\n" + 
+			"Cannot instantiate the type X\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750c() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void zoo(int x, String p);\n" +
+					"}\n" +
+					"abstract public class X {\n" +
+					"	int x = 0;\n" +
+					"	I i = E::new;\n" +
+					"}\n" +
+					"enum E {}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = E::new;\n" + 
+			"	      ^\n" + 
+			"Cannot instantiate the type E\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750d() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  X<?> zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X<T> {\n" +
+					"	X(int x, String p) {}\n" +
+					"	I i = X<? extends String>::new;\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = X<? extends String>::new;\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Cannot instantiate the type X<? extends String>\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750e() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  X<?> zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X<T> {\n" +
+					"	X(int x, String p) {}\n" +
+					"	I i = T::new;\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = T::new;\n" + 
+			"	      ^\n" + 
+			"Cannot instantiate the type T\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750f() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  X<?> zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X<T> {\n" +
+					"	X(int x, String p) {}\n" +
+					"	I i = Annot::new;\n" +
+					"}\n" +
+					"@interface Annot {}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	I i = Annot::new;\n" + 
+			"	      ^^^^^\n" + 
+			"Cannot instantiate the type Annot\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750g() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  X<?> zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X<T> {\n" +
+					"	X(int x, String p) {}\n" +
+					"   static {\n" +
+					"	    I i = this::foo;\n" +
+					"   }\n" +
+					"   X<?> foo(int x, String p) { return null; }\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	I i = this::foo;\n" + 
+			"	      ^^^^\n" + 
+			"Cannot use this in a static context\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750h() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  X<?> zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X<T> {\n" +
+					"	X(int x, String p) {}\n" +
+					"	I i = this::foo;\n" +
+					"   X<?> foo(int x, String p) { return null; }\n" +
+					"}\n"
+			},
+			"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750i() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  X<?> zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X<T> extends Y {\n" +
+					"   static {\n" +
+					"	    I i = super::foo;\n" +
+					"   }\n" +
+					"}\n" +
+					"class Y {\n" +
+					"    X<?> foo(int x, String p) { return null; }\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 6)\n" + 
+					"	I i = super::foo;\n" + 
+					"	      ^^^^^\n" + 
+					"Cannot use super in a static context\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750j() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  X<?> zoo(int x, String p);\n" +
+					"}\n" +
+					"public class X<T> extends Y {\n" +
+					"	I i = super::foo;\n" +
+					"}\n" +
+					"class Y {\n" +
+					"    X<?> foo(int x, String p) { return null; }\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 5)\n" + 
+					"	I i = super::foo;\n" + 
+					"	      ^^^^^^^^^^\n" + 
+					"Access to enclosing method foo(int, String) from the type Y is emulated by a synthetic accessor method\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750k() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void zoo();\n" +
+					"}\n" +
+					"class Z {\n" +
+					"	void zoo() {}\n" +
+					"}\n" +
+					"class X extends Z {\n" +
+					"    static class N {\n" +
+					"    	I i = X.super::zoo;\n" +
+					"    }\n" +
+					"}\n" 
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 9)\n" + 
+					"	I i = X.super::zoo;\n" + 
+					"	      ^^^^^^^\n" + 
+					"No enclosing instance of the type X is accessible in scope\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750l() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"  void zoo();\n" +
+					"}\n" +
+					"class Z {\n" +
+					"	void zoo() {}\n" +
+					"}\n" +
+					"class X extends Z {\n" +
+					"    class N {\n" +
+					"    	I i = X.super::zoo;\n" +
+					"    }\n" +
+					"}\n" 
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 9)\n" + 
+					"	I i = X.super::zoo;\n" + 
+					"	      ^^^^^^^^^^^^\n" + 
+					"Access to enclosing method zoo() from the type Z is emulated by a synthetic accessor method\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750m() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.ArrayList;\n" +
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit();\n" +
+					"}\n" +
+					"interface J {\n" +
+					"	int size(ArrayList<String> als);\n" +
+					"}\n" +
+					"class X {\n" +
+					"   I i1 = ArrayList::new;\n" +
+					"   I i2 = ArrayList<String>::new;\n" +
+					"   I i3 = ArrayList<Integer>::new;\n" +
+					"   I i4 = List<String>::new;\n" +
+					"   J j1 = String::length;\n" +
+					"   J j2 = List::size;\n" +
+					"   J j3 = List<String>::size;\n" +
+					"   J j4 = List<Integer>::size;\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 12)\n" + 
+					"	I i3 = ArrayList<Integer>::new;\n" + 
+					"	       ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+					"The constructed object of type ArrayList<Integer> is incompatible with the descriptor\'s return type: List<String>\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 13)\n" + 
+					"	I i4 = List<String>::new;\n" + 
+					"	       ^^^^^^^^^^^^\n" + 
+					"Cannot instantiate the type List<String>\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 14)\n" + 
+					"	J j1 = String::length;\n" + 
+					"	       ^^^^^^^^^^^^^^\n" + 
+					"The type String does not define length(ArrayList<String>) that is applicable here\n" + 
+					"----------\n" + 
+					"4. WARNING in X.java (at line 15)\n" + 
+					"	J j2 = List::size;\n" + 
+					"	       ^^^^\n" + 
+					"List is a raw type. References to generic type List<E> should be parameterized\n" + 
+					"----------\n" + 
+					"5. ERROR in X.java (at line 17)\n" + 
+					"	J j4 = List<Integer>::size;\n" + 
+					"	       ^^^^^^^^^^^^^^^^^^^\n" + 
+					"The type List<Integer> does not define size(ArrayList<String>) that is applicable here\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750n() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.ArrayList;\n" +
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   I i1 = ArrayList<String>[]::new;\n" +
+					"   I i2 = List<String>[]::new;\n" +
+					"   I i3 = ArrayList<String>::new;\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 7)\n" + 
+					"	I i1 = ArrayList<String>[]::new;\n" + 
+					"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+					"Cannot create a generic array of ArrayList<String>\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 8)\n" + 
+					"	I i2 = List<String>[]::new;\n" + 
+					"	       ^^^^^^^^^^^^^^^^^^^\n" + 
+					"Cannot create a generic array of List<String>\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750o() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.ArrayList;\n" +
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> [] doit();\n" +
+					"}\n" +
+					"interface J {\n" +
+					"	List<String> [] doit(long l);\n" +
+					"}\n" +
+					"interface K {\n" +
+					"	List<String> [] doit(String s, long l);\n" +
+					"}\n" +
+					"interface L {\n" +
+					"	List<String> [] doit(short s);\n" +
+					"}\n" +
+					"interface M {\n" +
+					"	List<String> [] doit(byte b);\n" +
+					"}\n" +
+					"interface N {\n" +
+					"	List<String> [] doit(int i);\n" +
+					"}\n" +
+					"interface O {\n" +
+					"	List<String> [] doit(Integer i);\n" +
+					"}\n" +
+					"interface P {\n" +
+					"	List<String> [] doit(Short i);\n" +
+					"}\n" +
+					"interface Q {\n" +
+					"	List<String> [] doit(Float i);\n" +
+					"}\n" +
+					"interface R {\n" +
+					"	List<String> [] doit(int i);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"   I i = List[]::new;\n" +
+					"   J j = ArrayList[]::new;\n" +
+					"   K k = ArrayList[]::new;\n" +
+					"   L l = ArrayList[]::new;\n" +
+					"   M m = ArrayList[]::new;\n" +
+					"   N n = ArrayList[]::new;\n" +
+					"   O o = ArrayList[]::new;\n" +
+					"   P p = ArrayList[]::new;\n" +
+					"   Q q = ArrayList[]::new;\n" +
+					"   R r = ArrayList[][][]::new;\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 34)\n" + 
+					"	I i = List[]::new;\n" + 
+					"	      ^^^^^^^^^^^\n" + 
+					"Incompatible parameter list for array constructor. Expected (int), but found ()\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 35)\n" + 
+					"	J j = ArrayList[]::new;\n" + 
+					"	      ^^^^^^^^^^^^^^^^\n" + 
+					"Incompatible parameter list for array constructor. Expected (int), but found (long)\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 36)\n" + 
+					"	K k = ArrayList[]::new;\n" + 
+					"	      ^^^^^^^^^^^^^^^^\n" + 
+					"Incompatible parameter list for array constructor. Expected (int), but found (String, long)\n" + 
+					"----------\n" + 
+					"4. ERROR in X.java (at line 42)\n" + 
+					"	Q q = ArrayList[]::new;\n" + 
+					"	      ^^^^^^^^^^^^^^^^\n" + 
+					"Incompatible parameter list for array constructor. Expected (int), but found (Float)\n" + 
+					"----------\n" + 
+					"5. ERROR in X.java (at line 43)\n" + 
+					"	R r = ArrayList[][][]::new;\n" + 
+					"	      ^^^^^^^^^^^^^^^^^^^^\n" + 
+					"Constructed array ArrayList[][][] cannot be assigned to List<String>[] as required in the interface descriptor  \n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750p() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit();\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	static void foo() {}\n" +
+					"	{\n" +
+					"		X<String> x = new X<String>();\n" +
+					"		I i1 = x::foo;\n" +
+					"		I i2 = X<String>::foo;\n" +
+					"		I i3 = X::foo;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 9)\n" + 
+					"	I i1 = x::foo;\n" + 
+					"	       ^^^^^^\n" + 
+					"The method foo() from the type X<String> should be accessed in a static way \n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 10)\n" + 
+					"	I i2 = X<String>::foo;\n" + 
+					"	       ^^^^^^^^^^^^^^\n" + 
+					"The method foo() from the type X<String> should be accessed in a static way \n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 11)\n" + 
+					"	I i3 = X::foo;\n" + 
+					"	       ^^^^^^\n" + 
+					"The type of foo() from the type X is void, this is incompatible with the descriptor\'s return type: List<String>\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750q() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit();\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	void foo() {}\n" +
+					"	{\n" +
+					"		X<String> x = new X<String>();\n" +
+					"		I i1 = x::foo;\n" +
+					"		I i2 = X<String>::foo;\n" +
+					"		I i3 = X::foo;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 9)\n" + 
+					"	I i1 = x::foo;\n" + 
+					"	       ^^^^^^\n" + 
+					"The type of foo() from the type X<String> is void, this is incompatible with the descriptor\'s return type: List<String>\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 10)\n" + 
+					"	I i2 = X<String>::foo;\n" + 
+					"	       ^^^^^^^^^^^^^^\n" + 
+					"Cannot make a static reference to the non-static method foo() from the type X<String>\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 11)\n" + 
+					"	I i3 = X::foo;\n" + 
+					"	       ^^^^^^\n" + 
+					"Cannot make a static reference to the non-static method foo() from the type X\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750r() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit(X<String> xs);\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	void foo() {}\n" +
+					"	{\n" +
+					"		X<String> x = new X<String>();\n" +
+					"		I i1 = X::foo;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 9)\n" + 
+					"	I i1 = X::foo;\n" + 
+					"	       ^\n" + 
+					"X is a raw type. References to generic type X<T> should be parameterized\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 9)\n" + 
+					"	I i1 = X::foo;\n" + 
+					"	       ^^^^^^\n" + 
+					"The type of foo() from the type X<String> is void, this is incompatible with the descriptor\'s return type: List<String>\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750s() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit(X<String> xs);\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	void foo() {}\n" +
+					"	{\n" +
+					"		X<String> x = new X<String>();\n" +
+					"		I i1 = X<String>::foo;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 9)\n" + 
+					"	I i1 = X<String>::foo;\n" + 
+					"	       ^^^^^^^^^^^^^^\n" + 
+					"The type of foo() from the type X<String> is void, this is incompatible with the descriptor\'s return type: List<String>\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750t() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit(X<String> xs);\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	static List<String> foo() {}\n" +
+					"	{\n" +
+					"		X<String> x = new X<String>();\n" +
+					"		I i1 = X<String>::foo;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 9)\n" + 
+					"	I i1 = X<String>::foo;\n" + 
+					"	       ^^^^^^^^^^^^^^\n" + 
+					"The method foo() from the type X<String> should be accessed in a static way \n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750u() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit(X<String> xs, int x);\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	static List<String> foo() {}\n" +
+					"	{\n" +
+					"		X<String> x = new X<String>();\n" +
+					"		I i1 = X::foo;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 9)\n" + 
+					"	I i1 = X::foo;\n" + 
+					"	       ^\n" + 
+					"X is a raw type. References to generic type X<T> should be parameterized\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 9)\n" + 
+					"	I i1 = X::foo;\n" + 
+					"	       ^^^^^^\n" + 
+					"The type X does not define foo(X<String>, int) that is applicable here\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750v() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit(X<String> xs, int x);\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	static List<String> foo(X<String> xs, int x) {}\n" +
+					"	List<String> foo(int x) {}\n" +
+					"	{\n" +
+					"		X<String> x = new X<String>();\n" +
+					"		I i1 = X::foo;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 10)\n" + 
+					"	I i1 = X::foo;\n" + 
+					"	       ^^^^^^\n" + 
+					"Ambiguous method reference: both foo(int) and foo(X<String>, int) from the type X<String> are eligible\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750w() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	X<String> doit(int x);\n" +
+					"}\n" +
+					"interface J {\n" +
+					"	X<String> doit(int x, int p);\n" +
+					"}\n" +
+					"interface K {\n" +
+					"	X<String> doit(int x);\n" +
+					"   void goo();\n" +
+					"}\n" +
+					"interface L {\n" +
+					"	X<String> doit(short x);\n" +
+					"}\n" +
+					"interface M {\n" +
+					"	X<String> doit(String s);\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	X(int x, int y) {}\n" +
+					"	X(int x) {}\n" +
+					"	{\n" +
+					"		I i = X::new;\n" +
+					"       J j = X<Integer>::new;\n" +
+					"       K k = X::new;\n" +
+					"       L l = X<String>::new;\n" +
+					"       M m = X<String>::new;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 23)\n" + 
+					"	J j = X<Integer>::new;\n" + 
+					"	      ^^^^^^^^^^^^^^^\n" + 
+					"The constructed object of type X<Integer> is incompatible with the descriptor\'s return type: X<String>\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 24)\n" + 
+					"	K k = X::new;\n" + 
+					"	      ^^^^^^\n" + 
+					"The target type of this expression must be a functional interface\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 26)\n" + 
+					"	M m = X<String>::new;\n" + 
+					"	      ^^^^^^^^^^^^^^\n" + 
+					"The type X<String> does not define X(String) that is applicable here\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750x() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"import java.io.IOException;\n" +
+					"import java.io.FileNotFoundException;\n" +		
+					"interface I {\n" +
+					"	X<String> doit(int x);\n" +
+					"}\n" +
+					"interface J {\n" +
+					"	X<String> doit(int x) throws IOException;\n" +
+					"}\n" +
+					"interface K {\n" +
+					"	X<String> doit(int x) throws FileNotFoundException;\n" +
+					"}\n" +
+					"interface L {\n" +
+					"	X<String> doit(short x) throws Exception;\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"	X(int x) throws IOException, FileNotFoundException {}\n" +
+					"	{\n" +
+					"		I i = X::new;\n" +
+					"       J j = X<Integer>::new;\n" +
+					"       K k = X::new;\n" +
+					"       L l = X<String>::new;\n" +
+					"	}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 19)\n" + 
+					"	I i = X::new;\n" + 
+					"	      ^^^^^^\n" + 
+					"Unhandled exception type IOException\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 19)\n" + 
+					"	I i = X::new;\n" + 
+					"	      ^^^^^^\n" + 
+					"Unhandled exception type FileNotFoundException\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 20)\n" + 
+					"	J j = X<Integer>::new;\n" + 
+					"	      ^^^^^^^^^^^^^^^\n" + 
+					"The constructed object of type X<Integer> is incompatible with the descriptor\'s return type: X<String>\n" + 
+					"----------\n" + 
+					"4. ERROR in X.java (at line 21)\n" + 
+					"	K k = X::new;\n" + 
+					"	      ^^^^^^\n" + 
+					"Unhandled exception type IOException\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750y() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"abstract class Y {\n" +
+					"    abstract void foo();\n" +
+					"}\n" +
+					"class X extends Y {\n" +
+					"	void foo() {}\n" +
+					"   I i = super::foo;\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 10)\n" + 
+					"	I i = super::foo;\n" + 
+					"	      ^^^^^^^^^^\n" + 
+					"Cannot directly invoke the abstract method foo() for the type Y\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z() {
+	Map customOptions = getCompilerOptions();
+	customOptions.put(CompilerOptions.OPTION_ReportIndirectStaticAccess, CompilerOptions.WARNING);
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"class Y {\n" +
+					"    static void foo() {}\n" +
+					"}\n" +
+					"class X extends Y {\n" +
+					"   I i = X::foo;\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 8)\n" + 
+					"	I i = X::foo;\n" + 
+					"	      ^^^^^^\n" + 
+					"The static method foo() from the type Y should be accessed directly \n" + 
+					"----------\n",
+					null, false, customOptions);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z1() {
+	Map customOptions = getCompilerOptions();
+	customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.WARNING);
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"class X extends Y {\n" +
+					"   I i = X::foo;\n" +
+					"}\n",
+					"Y.java", 
+					"@Deprecated class Y {\n" +
+					"    @Deprecated static void foo() {}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 4)\n" + 
+					"	class X extends Y {\n" + 
+					"	                ^\n" + 
+					"The type Y is deprecated\n" + 
+					"----------\n" + 
+					"2. WARNING in X.java (at line 5)\n" + 
+					"	I i = X::foo;\n" + 
+					"	      ^^^^^^\n" + 
+					"The method foo() from the type Y is deprecated\n" + 
+					"----------\n",
+					null, false, customOptions);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z2() {
+	Map customOptions = getCompilerOptions();
+	customOptions.put(CompilerOptions.OPTION_ReportUnusedTypeArgumentsForMethodInvocation, CompilerOptions.WARNING);
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"class X extends Y {\n" +
+					"   I i = X::<String>foo;\n" +
+					"}\n",
+					"Y.java", 
+					"@Deprecated class Y {\n" +
+					"    @Deprecated static void foo() {}\n" +
+					"}\n"
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 4)\n" + 
+					"	class X extends Y {\n" + 
+					"	                ^\n" + 
+					"The type Y is deprecated\n" + 
+					"----------\n" + 
+					"2. WARNING in X.java (at line 5)\n" + 
+					"	I i = X::<String>foo;\n" + 
+					"	      ^^^^^^^^^^^^^^\n" + 
+					"The method foo() from the type Y is deprecated\n" + 
+					"----------\n" + 
+					"3. WARNING in X.java (at line 5)\n" + 
+					"	I i = X::<String>foo;\n" + 
+					"	          ^^^^^^\n" + 
+					"Unused type arguments for the non generic method foo() of type Y; it should not be parameterized with arguments <String>\n" + 
+					"----------\n",
+					null, false, customOptions);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z3() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit();\n" +
+					"}\n" +
+					"class X {\n" +
+					"   String foo() { return null; }\n" +
+					"   I i = new X()::foo;\n" +
+					"}\n",
+					},
+					"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z4() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	List<String> doit();\n" +
+					"}\n" +
+					"class X {\n" +
+					"   void foo() { return; }\n" +
+					"   I i = new X()::foo;\n" +
+					"}\n",
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 7)\n" + 
+					"	I i = new X()::foo;\n" + 
+					"	      ^^^^^^^^^^^^\n" + 
+					"The type of foo() from the type X is void, this is incompatible with the descriptor\'s return type: List<String>\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z5() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"import java.util.ArrayList;\n" +
+					"interface I {\n" +
+					"	List<String> doit();\n" +
+					"}\n" +
+					"class X {\n" +
+					"   ArrayList<Integer> foo() { return null; }\n" +
+					"   I i = new X()::foo;\n" +
+					"}\n",
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 8)\n" + 
+					"	I i = new X()::foo;\n" + 
+					"	      ^^^^^^^^^^^^\n" + 
+					"The type of foo() from the type X is ArrayList<Integer>, this is incompatible with the descriptor\'s return type: List<String>\n" + 
+					"----------\n");
+}
+//  https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z6() {
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"import java.util.ArrayList;\n" +
+					"interface I {\n" +
+					"	List<String> doit(X<String> x, int y);\n" +
+					"}\n" +
+					"class X<T> {\n" +
+					"   ArrayList<String> foo(int x) { return null; }\n" +
+					"   I i = X::foo;\n" +
+					"}\n",
+					},
+					"----------\n" + 
+					"1. WARNING in X.java (at line 8)\n" + 
+					"	I i = X::foo;\n" + 
+					"	      ^\n" + 
+					"X is a raw type. References to generic type X<T> should be parameterized\n" + 
+					"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z7() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"import java.util.List;\n" +
+				"import java.util.ArrayList;\n" +
+				"interface I {\n" +
+				"	List<String> doit(X x, int y);\n" +
+				"}\n" +
+				"class X<T> {\n" +
+				"   ArrayList<Integer> foo(int x) { return null; }\n" +
+				"   I i = X::foo;\n" +
+				"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 4)\n" + 
+				"	List<String> doit(X x, int y);\n" + 
+				"	                  ^\n" + 
+				"X is a raw type. References to generic type X<T> should be parameterized\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 8)\n" + 
+				"	I i = X::foo;\n" + 
+				"	      ^\n" + 
+				"X is a raw type. References to generic type X<T> should be parameterized\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z8() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	int [] doit(int [] ia);\n" +
+				"}\n" +
+				"class X<T> {\n" +
+				"   I i = int []::clone;\n" +
+				"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384750, [1.8] Compiler should reject invalid method reference expressions
+public void test384750z9() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	int [] doit(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+    			"	Zork foo() {\n" +
+    			"	}\n" +
+    			"   I i = X::foo;\n" +
+    			"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	Zork foo() {\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 7)\n" + 
+				"	I i = X::foo;\n" + 
+				"	      ^^^^^^\n" + 
+				"The method foo() from the type X refers to the missing type Zork\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 7)\n" + 
+				"	I i = X::foo;\n" + 
+				"	      ^^^^^^\n" + 
+				"The type of foo() from the type X is Zork, this is incompatible with the descriptor\'s return type: int[]\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610() {
+this.runConformTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {\n" +
+				"		System.out.println(\"foo\");\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"foo");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610a() {
+this.runConformTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"    void foo(int x, int y);\n" +
+				"}\n" +
+				"interface K {\n" +
+				"    void foo(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {\n" +
+				"		System.out.println(\"foo(I)\");\n" +
+				"	}\n" +
+				"	void foo(J j) {\n" +
+				"		System.out.println(\"foo(J)\");\n" +
+				"	}\n" +
+				"	void foo(K k) {\n" +
+				"		System.out.println(\"foo(K)\");\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{});\n" +
+				"		new X().foo((x, y)->{});\n" +
+				"		new X().foo((s)->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"foo(I)\n" + 
+				"foo(J)\n" + 
+				"foo(K)");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610b() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"    void foo(int x, int y);\n" +
+				"}\n" +
+				"interface K {\n" +
+				"    void foo(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {\n" +
+				"		System.out.println(\"foo(I)\");\n" +
+				"	}\n" +
+				"	void foo(J j) {\n" +
+				"		System.out.println(\"foo(J)\");\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{});\n" +
+				"		new X().foo((x, y)->{});\n" +
+				"		new X().foo((s)->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 20)\n" + 
+				"	new X().foo((s)->{});\n" + 
+				"	            ^^^^^^^\n" + 
+				"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610c() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo();\n" +
+				"}\n" +
+				"interface K {\n" +
+				"    String foo(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {\n" +
+				"		System.out.println(\"foo(I)\");\n" +
+				"	}\n" +
+				"	void foo(K k) {\n" +
+				"		System.out.println(\"foo(K)\");\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{ return \"\";});\n" +
+				"		new X().foo(()-> 10);\n" +
+				"		new X().foo((s)->{});\n" +
+				"		new X().foo((s)->{ return;});\n" +
+				"		new X().foo((s)->{ return \"\";});\n" +
+				"		new X().foo((s)-> \"hello\");\n" +
+				"		new X().foo(()->{ return;});\n" +
+				"		new X().foo(()-> System.out.println());\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 15)\n" + 
+				"	new X().foo(()->{ return \"\";});\n" + 
+				"	                  ^^^^^^^^^^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 16)\n" + 
+				"	new X().foo(()-> 10);\n" + 
+				"	                 ^^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 17)\n" + 
+				"	new X().foo((s)->{});\n" + 
+				"	            ^^^^^^^\n" + 
+				"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 18)\n" + 
+				"	new X().foo((s)->{ return;});\n" + 
+				"	            ^^^^^^^^^^^^^^^\n" + 
+				"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610d() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"public class X {\n" +
+				"    <T> T id(T arg) { return arg; }\n" +
+				"    Runnable r = id(() -> { System.out.println(); });\n" +
+				"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610e() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I<T extends String> {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	<T> T foo(I<T> it) { return null; }\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 1)\n" + 
+				"	interface I<T extends String> {\n" + 
+				"	                      ^^^^^^\n" + 
+				"The type parameter T should not be bounded by the final type String. Final types cannot be further extended\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	<T> T foo(I<T> it) { return null; }\n" + 
+				"	            ^\n" + 
+				"Bound mismatch: The type T is not a valid substitute for the bounded parameter <T extends String> of the type I<T>\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 7)\n" + 
+				"	new X().foo(()->{});\n" + 
+				"	            ^^^^^^\n" + 
+				"The target type of this expression is not a well formed parameterized type due to bound(s) mismatch\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610f() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I<T> {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	<T> T foo(I<T> it) { return null; }\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610g() {
+this.runConformTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"interface J { \n" +
+				"    String foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I it) { System.out.println(\"foo(I)\");}\n" +
+				"	void foo(J it) { System.out.println(\"foo(J)\");}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"foo(I)");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610h() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"interface J { \n" +
+				"    String foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I it) { System.out.println(\"foo(I)\");}\n" +
+				"	void foo(J it) { System.out.println(\"foo(J)\");}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(()->{ return 10; });\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 11)\n" + 
+				"	new X().foo(()->{ return 10; });\n" + 
+				"	                  ^^^^^^^^^^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610i() {
+this.runConformTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"interface J { \n" +
+				"    void foo(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I it) { System.out.println(\"foo(I)\");}\n" +
+				"	void foo(J it) { System.out.println(\"foo(J)\");}\n" +
+				
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo((String s)->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"foo(J)");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401610, [1.8][compiler] Allow lambda/reference expressions in non-overloaded method invocation contexts
+public void test401610j() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"interface J { \n" +
+				"    void foo(String s);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I it) { System.out.println(\"foo(I)\");}\n" +
+				"	void foo(J it) { System.out.println(\"foo(J)\");}\n" +
+				
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo((Object o)->{});\n" +
+				"	}\n" +
+				"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 11)\n" + 
+				"	new X().foo((Object o)->{});\n" + 
+				"	             ^^^^^^\n" + 
+				"Lambda expression\'s parameter o is expected to be of type int\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401789, [1.8][compiler] Enable support for method/constructor references in non-overloaded method calls.
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401790, Follow up of bug 401610, explicit constructor calls and allocation expressions needs updates too.
+public void test401789_401790() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	int foo(I i) { return 10;}\n" +
+				"	class Y {\n" +
+				"		Y (I i) {}\n" +
+				"		Y() {\n" +
+				"			this(X::goo);\n" +
+				"		}\n" +
+				"	}\n" +
+				"	X(I i) {}\n" +
+				"	X() {\n" +
+				"		this((x) -> { return 10;});\n" +
+				"	}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		foo(X::goo);\n" +
+				"		new X((x)->{ return 10;});\n" +
+				"		new X((x)->{ return 10;}).new Y((x) -> { return 0;});\n" +
+				"		new X((x)->{ return 10;}) {};\n" +
+				"	}\n" +
+				"}\n" +
+				"class Z extends X {\n" +
+				"	Z() {\n" +
+				"		super(X::goo);\n" +
+				"	}\n" +
+				"	Z(int i) {\n" +
+				"		super (x -> 10);\n" +
+				"	}\n" +
+				"   Zork z;\n" +
+				"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 31)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401789, [1.8][compiler] Enable support for method/constructor references in non-overloaded method calls.
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401790, Follow up of bug 401610, explicit constructor calls and allocation expressions needs updates too.
+public void test401789_401790a() {
+this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String foo(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	int foo(I i) { return 10;}\n" +
+				"	class Y {\n" +
+				"		Y (I i) {}\n" +
+				"		Y() {\n" +
+				"			this(X::goo);\n" +
+				"		}\n" +
+				"	}\n" +
+				"	X(I i) {}\n" +
+				"	X() {\n" +
+				"		this((x) -> { return 10;});\n" +
+				"	}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		foo(X::goo);\n" +
+				"		new X((x)->{ return 10;});\n" +
+				"		new X((x)->{ return 10;}).new Y((x) -> { return 0;});\n" +
+				"		new X((x)->{ return 10;}) {};\n" +
+				"	}\n" +
+				"}\n" +
+				"class Z extends X {\n" +
+				"	Z() {\n" +
+				"		super(X::goo);\n" +
+				"	}\n" +
+				"	Z(int i) {\n" +
+				"		super (x -> 10);\n" +
+				"	}\n" +
+				"   Zork z;\n" +
+				"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	this(X::goo);\n" + 
+				"	     ^^^^^^\n" + 
+				"The type of goo() from the type X is int, this is incompatible with the descriptor\'s return type: String\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 14)\n" + 
+				"	this((x) -> { return 10;});\n" + 
+				"	                     ^^\n" + 
+				"Type mismatch: cannot convert from int to String\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 18)\n" + 
+				"	foo(X::goo);\n" + 
+				"	    ^^^^^^\n" + 
+				"The type of goo() from the type X is int, this is incompatible with the descriptor\'s return type: String\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 19)\n" + 
+				"	new X((x)->{ return 10;});\n" + 
+				"	                    ^^\n" + 
+				"Type mismatch: cannot convert from int to String\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 20)\n" + 
+				"	new X((x)->{ return 10;}).new Y((x) -> { return 0;});\n" + 
+				"	                    ^^\n" + 
+				"Type mismatch: cannot convert from int to String\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 21)\n" + 
+				"	new X((x)->{ return 10;}) {};\n" + 
+				"	                    ^^\n" + 
+				"Type mismatch: cannot convert from int to String\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 26)\n" + 
+				"	super(X::goo);\n" + 
+				"	      ^^^^^^\n" + 
+				"The type of goo() from the type X is int, this is incompatible with the descriptor\'s return type: String\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 29)\n" + 
+				"	super (x -> 10);\n" + 
+				"	            ^^\n" + 
+				"Type mismatch: cannot convert from int to String\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 31)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401845, [1.8][compiler] Bad interaction between varargs and lambas/references
+public void test401845() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X extends Zork {\n" +
+				"	int foo(I ...i) { return 10;}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		foo(X::goo);\n" +
+				"		foo((x)-> {return 10;});\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	public class X extends Zork {\n" + 
+			"	                       ^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401845, [1.8][compiler] Bad interaction between varargs and lambas/references
+public void test401845a() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	int foo(I [] ...i) { return 10;}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		foo(X::goo);\n" +
+				"		foo((x)-> {return 10;});\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	foo(X::goo);\n" + 
+			"	    ^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	foo((x)-> {return 10;});\n" + 
+			"	    ^^^^^^^^^^^^^^^^^^\n" + 
+			"The target type of this expression must be a functional interface\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401845, [1.8][compiler] Bad interaction between varargs and lambas/references
+public void test401845b() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X extends Zork {\n" +
+				"	X(I ...i) {}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		new X(X::goo);\n" +
+				"		new X((x)-> {return 10;});\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	public class X extends Zork {\n" + 
+			"	                       ^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401845, [1.8][compiler] Bad interaction between varargs and lambas/references
+public void test401845c() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X extends Zork {\n" +
+				"	X(I ...i) {}\n" +
+				"   X() {\n" +
+				"       this((x)-> {return 10;});\n" +
+				"}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		new X(X::goo);\n" +
+				"		new X((x)-> {return 10;});\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	public class X extends Zork {\n" + 
+			"	                       ^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401845, [1.8][compiler] Bad interaction between varargs and lambas/references
+public void test401845d() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X extends Zork {\n" +
+				"    class Y {\n" +
+				"        Y(I ... i) {}\n" +
+				"    }\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		new X().new Y(X::goo);\n" +
+				"		new X().new Y((x)-> {return 10;});\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	public class X extends Zork {\n" + 
+			"	                       ^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401845, [1.8][compiler] Bad interaction between varargs and lambas/references
+public void test401845e() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X extends Zork {\n" +
+				"	X(I ...i) {}\n" +
+				"   X() {\n" +
+				"       this((x)-> {return 10;});\n" +
+				"}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		new X(X::goo) {};\n" +
+				"		new X((x)-> {return 10;}){};\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	public class X extends Zork {\n" + 
+			"	                       ^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401847, [1.8][compiler] Polyconditionals not accepted in method invocation contexts.
+public void test401847() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	Integer foo(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	int foo(I ...i) { return 10;}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		foo(true ? X::goo : X::goo);\n" +
+				"		foo(true ? x-> 1 : x->0);\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 8)\n" + 
+			"	foo(true ? X::goo : X::goo);\n" + 
+			"	                    ^^^^^^\n" + 
+			"Dead code\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 9)\n" + 
+			"	foo(true ? x-> 1 : x->0);\n" + 
+			"	                   ^^^^\n" + 
+			"Dead code\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401847, [1.8][compiler] Polyconditionals not accepted in method invocation contexts.
+public void test401847a() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String foo(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	int foo(I ...i) { return 10;}\n" +
+				"	int goo() { return 0;}\n" +
+				"	{\n" +
+				"		foo(true ? X::goo : X::goo);\n" +
+				"		foo(true ? x-> 1 : x->0);\n" +
+				"	}\n" +
+				"}\n",
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	foo(true ? X::goo : X::goo);\n" + 
+			"	           ^^^^^^\n" + 
+			"The type of goo() from the type X is int, this is incompatible with the descriptor\'s return type: String\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 8)\n" + 
+			"	foo(true ? X::goo : X::goo);\n" + 
+			"	                    ^^^^^^\n" + 
+			"The type of goo() from the type X is int, this is incompatible with the descriptor\'s return type: String\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 9)\n" + 
+			"	foo(true ? x-> 1 : x->0);\n" + 
+			"	^^^\n" + 
+			"The method foo(I...) in the type X is not applicable for the arguments ((true ? (<no type> x) -> 1 : (<no type> x) -> 0))\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 9)\n" + 
+			"	foo(true ? x-> 1 : x->0);\n" + 
+			"	               ^\n" + 
+			"Type mismatch: cannot convert from int to String\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 9)\n" + 
+			"	foo(true ? x-> 1 : x->0);\n" + 
+			"	                      ^\n" + 
+			"Type mismatch: cannot convert from int to String\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401939, [1.8][compiler] Incorrect shape analysis leads to method resolution failure .
+public void test401939() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	int foo();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	void foo(I i) {}\n" +
+				"	I i = ()->{ throw new RuntimeException(); }; // OK\n" +
+				"	{\n" +
+				"		foo(()->{ throw new RuntimeException(); });\n" +
+				"	}\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 5)\n" + 
+				"	void foo(I i) {}\n" + 
+				"	           ^\n" + 
+				"The parameter i is hiding a field from type X\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401939, [1.8][compiler] Incorrect shape analysis leads to method resolution failure .
+public void test401939a() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	int foo();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	void foo(I i) {}\n" +
+				"	I i = ()->{ throw new RuntimeException(); }; // OK\n" +
+				"	{\n" +
+				"		foo(()->{ if (1 == 2) throw new RuntimeException(); });\n" +
+				"	}\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 5)\n" + 
+				"	void foo(I i) {}\n" + 
+				"	           ^\n" + 
+				"The parameter i is hiding a field from type X\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 8)\n" + 
+				"	foo(()->{ if (1 == 2) throw new RuntimeException(); });\n" + 
+				"	^^^\n" + 
+				"The method foo(I) in the type X is not applicable for the arguments (() -> {\n" + 
+				"  if ((1 == 2))\n" + 
+				"      throw new RuntimeException();\n" + 
+				"})\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401939, [1.8][compiler] Incorrect shape analysis leads to method resolution failure .
+public void test401939b() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    String foo(String x) throws Exception;\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	static final boolean FALSE = false;\n" +
+				"	static final boolean TRUE = true;\n" +
+				"	void goo(I i) {\n" +
+				"	}\n" +
+				"	void zoo() {\n" +
+				"		final boolean NIJAM = true;\n" +
+				"		final boolean POI = false;\n" +
+				"       final boolean BLANK;\n" +
+				"       BLANK = true;\n" +
+				"		goo((x) -> { while (FALSE) throw new Exception(); });\n" +
+				"		goo((x) -> { while (TRUE) throw new Exception(); });\n" +
+				"		goo((x) -> { while (NIJAM) throw new Exception(); });\n" +
+				"		goo((x) -> { while (POI) throw new Exception(); });\n" +
+				"		goo((x) -> { if (TRUE) throw new Exception(); else throw new Exception(); });\n" +
+				"		goo((x) -> { if (TRUE) throw new Exception(); });\n" +
+				"		goo((x) -> { if (true) throw new Exception(); else throw new Exception(); });\n" +
+				"		goo((x) -> { if (false) throw new Exception(); else throw new Exception(); });\n" +
+				"		goo((x) -> { while (BLANK) throw new Exception(); });\n" +
+				"	}\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 14)\n" + 
+				"	goo((x) -> { while (FALSE) throw new Exception(); });\n" + 
+				"	^^^\n" + 
+				"The method goo(I) in the type X is not applicable for the arguments ((<no type> x) -> {\n" + 
+				"  while (FALSE)    throw new Exception();\n" + 
+				"})\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 17)\n" + 
+				"	goo((x) -> { while (POI) throw new Exception(); });\n" + 
+				"	^^^\n" + 
+				"The method goo(I) in the type X is not applicable for the arguments ((<no type> x) -> {\n" + 
+				"  while (POI)    throw new Exception();\n" + 
+				"})\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 19)\n" + 
+				"	goo((x) -> { if (TRUE) throw new Exception(); });\n" + 
+				"	^^^\n" + 
+				"The method goo(I) in the type X is not applicable for the arguments ((<no type> x) -> {\n" + 
+				"  if (TRUE)\n" + 
+				"      throw new Exception();\n" + 
+				"})\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 22)\n" + 
+				"	goo((x) -> { while (BLANK) throw new Exception(); });\n" + 
+				"	^^^\n" + 
+				"The method goo(I) in the type X is not applicable for the arguments ((<no type> x) -> {\n" + 
+				"  while (BLANK)    throw new Exception();\n" + 
+				"})\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401939, [1.8][compiler] Incorrect shape analysis leads to method resolution failure .
+public void test401939c() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    String foo(String x) throws Exception;\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void goo(I i) {\n" +
+				"	}\n" +
+				"	void zoo() {\n" +
+				"		goo((x) -> { if (x) return null; });\n" +
+				"		goo((x) -> {});\n" +
+				"	}\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	goo((x) -> { if (x) return null; });\n" + 
+				"	                 ^\n" + 
+				"Type mismatch: cannot convert from String to boolean\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 9)\n" + 
+				"	goo((x) -> {});\n" + 
+				"	^^^\n" + 
+				"The method goo(I) in the type X is not applicable for the arguments ((<no type> x) -> {\n" + 
+				"})\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401939, [1.8][compiler] Incorrect shape analysis leads to method resolution failure .
+public void test401939d() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    String foo(boolean x) throws Exception;\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void goo(I i) {\n" +
+				"	}\n" +
+				"	void zoo() {\n" +
+				"		goo((x) -> { if (x) return null; });\n" +
+				"	}\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	goo((x) -> { if (x) return null; });\n" + 
+				"	    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"This method must return a result of type String\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401939, [1.8][compiler] Incorrect shape analysis leads to method resolution failure .
+public void test401939e() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo(boolean x) throws Exception;\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void goo(I i) {\n" +
+				"	}\n" +
+				"	void zoo() {\n" +
+				"		goo((x) -> { return null; });\n" +
+				"	}\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	goo((x) -> { return null; });\n" + 
+				"	             ^^^^^^^^^^^^\n" + 
+				"Void methods cannot return a value\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401939, [1.8][compiler] Incorrect shape analysis leads to method resolution failure .
+public void test401939f() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    void foo(boolean x) throws Exception;\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void goo(I i) {\n" +
+				"	}\n" +
+				"	void zoo() {\n" +
+				"		goo((x) -> { throw new Exception(); });\n" +
+				"	}\n" +
+				"}\n",			},
+				"");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402219, [1.8][compiler] Compile time errors in lambda during hypothetical type check should render candidate method inapplicable.
+public void test402219() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String foo(String s1, String s2);\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	X foo(X x1, X x2);\n" +
+				"}\n" +
+				"public class X { \n" +
+				"	void goo(I i) {}\n" +
+				"	void goo(J j) {}\n" +
+				"    public static void main(String [] args) {\n" +
+				"		new X().goo((p1, p2) -> p1 = p1 + p2);\n" +
+				"    }\n" +
+				"    Zork z;\n" +
+				"}\n",			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 13)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402219, [1.8][compiler] Compile time errors in lambda during hypothetical type check should render candidate method inapplicable.
+public void test402219a() {
+	Map options = getCompilerOptions();
+	options.put(CompilerOptions.OPTION_ReportUndocumentedEmptyBlock, CompilerOptions.ERROR);
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo(String s1, String s2);\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	X foo(X x1, X x2);\n" +
+				"}\n" +
+				"public class X { \n" +
+				"	void goo(I i) {/* */}\n" +
+				"	void goo(J j) {/* */}\n" +
+				"    public static void main(String [] args) {\n" +
+				"		new X().goo((p1, p2) -> {});\n" +
+				"    }\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 11)\n" + 
+				"	new X().goo((p1, p2) -> {});\n" + 
+				"	                        ^^\n" + 
+				"Empty block should be documented\n" + 
+				"----------\n",
+			null,
+			false,
+			options);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402219, [1.8][compiler] Compile time errors in lambda during hypothetical type check should render candidate method inapplicable.
+public void test402219b() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String foo(String s1, String s2);\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	X foo(X x1, X x2);\n" +
+				"}\n" +
+				"public class X { \n" +
+				"	void goo(I i) {}\n" +
+				"	void goo(J j) {}\n" +
+				"    public static void main(String [] args) {\n" +
+				"		new X().goo((p1, p2) -> p1 + p2);\n" +
+				"    }\n" +
+				"    Zork z;\n" +
+				"}\n",			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 13)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402259, [1.8][compiler] NPE during overload resolution when there are syntax errors. 
+public void test402259() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	J foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {};\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(() -> { return () -> { return}; });\n" +
+				"	}\n" +
+				"}\n",			},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 10)\n" + 
+				"	new X().foo(() -> { return () -> { return}; });\n" + 
+				"	                                   ^^^^^^\n" + 
+				"Syntax error, insert \";\" to complete BlockStatements\n" + 
+				"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402261, [1.8][compiler] Shape analysis confused by returns from inner classes.. 
+public void test402261() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	J foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {};\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(() -> { class local { void foo() { return; }} return () -> { return;}; });\n" +
+				"	}\n" +
+				"   Zork z;\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 12)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402261, [1.8][compiler] Shape analysis confused by returns from inner classes.. 
+public void test402261a() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	J foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {};\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(() -> { J j = () -> { return; }; return () -> { return;}; });\n" +
+				"	}\n" +
+				"   Zork z;\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 12)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402261, [1.8][compiler] Shape analysis confused by returns from inner classes.. 
+public void test402261b() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	J foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {};\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(() -> { J j = new J() { public void foo() { return; } }; return () -> { return;}; });\n" +
+				"	}\n" +
+				"   Zork z;\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 12)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402261, [1.8][compiler] Shape analysis confused by returns from inner classes.. 
+public void test402261c() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	J foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(I i) {};\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new X().foo(() -> { return new J() { public void foo() { return; } }; });\n" +
+				"	}\n" +
+				"   Zork z;\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 12)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401769, [1.8][compiler] Explore solutions with better performance characteristics than LambdaExpression#copy()
+public void test401769() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"class X {\n" +
+				"	void g(I i) {}\n" +
+				"	void g(J j) {}\n" +
+				"	int f;\n" +
+				"	{\n" +
+				"		g(() -> f++);\n" +
+				"	}\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 12)\n" + 
+			"	g(() -> f++);\n" + 
+			"	^\n" + 
+			"The method g(I) is ambiguous for the type X\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402609, [1.8][compiler] AIOOB exception with a program using method references.
+public void test402609() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"abstract class Y {\n" +
+				"	abstract void foo();\n" +
+				"}\n" +
+				"public class X extends Y {\n" +
+				"	void f(I i) {}\n" +
+				"	void f(J j) {}\n" +
+				"	\n" +
+				"	void foo() {\n" +
+				"	}\n" +
+				"	\n" +
+				"	public static void main(String[] args) {\n" +
+				"		f(super::foo);\n" +
+				"	}\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 18)\n" + 
+			"	f(super::foo);\n" + 
+			"	  ^^^^^\n" + 
+			"Cannot use super in a static context\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402609, [1.8][compiler] AIOOB exception with a program using method references.
+public void test402609a() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"abstract class Y {\n" +
+				"	abstract void foo();\n" +
+				"}\n" +
+				"public class X extends Y {\n" +
+				"	void f(I i) {}\n" +
+				"	\n" +
+				"	void foo() {\n" +
+				"	}\n" +
+				"	\n" +
+				"	public void main(String[] args) {\n" +
+				"		f(super::foo);\n" +
+				"       I i = super::foo;\n" +
+				"	}\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 17)\n" + 
+			"	f(super::foo);\n" + 
+			"	  ^^^^^^^^^^\n" + 
+			"Cannot directly invoke the abstract method foo() for the type Y\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 18)\n" + 
+			"	I i = super::foo;\n" + 
+			"	      ^^^^^^^^^^\n" + 
+			"Cannot directly invoke the abstract method foo() for the type Y\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402609, [1.8][compiler] AIOOB exception with a program using method references.
+public void test402609b() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"abstract class Y {\n" +
+				"	abstract void foo();\n" +
+				"}\n" +
+				"public class X extends Y {\n" +
+				"	void f(I i) {}\n" +
+				"	void f(J j) {}\n" +
+				"	\n" +
+				"	void foo() {\n" +
+				"	}\n" +
+				"	\n" +
+				"	public void zoo(String[] args) {\n" +
+				"		f(super::foo);\n" +
+				"	}\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 18)\n" + 
+			"	f(super::foo);\n" + 
+			"	^\n" + 
+			"The method f(I) is ambiguous for the type X\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 18)\n" + 
+			"	f(super::foo);\n" + 
+			"	  ^^^^^^^^^^\n" + 
+			"Cannot directly invoke the abstract method foo() for the type Y\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402609, [1.8][compiler] AIOOB exception with a program using method references.
+public void test402609c() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo();\n" +
+				"}\n" +
+				"abstract class Y {\n" +
+				"	void foo() {}\n" +
+				"}\n" +
+				"public class X extends Y {\n" +
+				"	void f(I i) {}\n" +
+				"	void f(J j) {}\n" +
+				"	\n" +
+				"	void foo() {\n" +
+				"	}\n" +
+				"	\n" +
+				"	public void main(String[] args) {\n" +
+				"		f(super::foo);\n" +
+				"	}\n" +
+				"}\n",			
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 18)\n" + 
+			"	f(super::foo);\n" + 
+			"	^\n" + 
+			"The method f(I) is ambiguous for the type X\n" + 
+			"----------\n");
+}
+
+// 15.28:
+// https://bugs.eclipse.org/382350 - [1.8][compiler] Unable to invoke inherited default method via I.super.m() syntax
+public void testSuperReference01() {
+	this.runNegativeTest(
+		new String[] {
+			"X.java",
+			"public class X implements I2, I1 {\n" +
+			"	@Override\n" +
+			"	public void print() {\n" +
+			"		System.out.print(\"!\");" +
+			"	}\n" +
+			"   void test() {\n" +
+			"		doOutput(I1.super::print); // illegal attempt to skip I2.print()\n" +
+			"	}\n" +
+			"	public static void main(String... args) {\n" +
+			"		new X().test();\n" +
+			"	}\n" +
+			"   void doOutput(CanPrint printer) {\n" +
+			"      printer.print();" +
+			"   }\n" +
+			"}\n" +
+			"interface CanPrint {\n" +
+			"	void print();\n" +
+			"}\n" +
+			"interface I1 {\n" +
+			"	default void print() {\n" +
+			"		System.out.print(\"O\");\n" +
+			"	}\n" +
+			"}\n" +
+			"interface I2 extends I1 {\n" +
+			"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 6)\n" + 
+		"	doOutput(I1.super::print); // illegal attempt to skip I2.print()\n" + 
+		"	         ^^^^^^^^\n" + 
+		"Illegal reference to super type I1, cannot bypass the more specific direct super type I2\n" + 
+		"----------\n"
+	);
+}
+
+// 15.28.1:
+// https://bugs.eclipse.org/382350 - [1.8][compiler] Unable to invoke inherited default method via I.super.m() syntax
+public void testSuperReference02() {
+	this.runNegativeTest(
+		new String[] {
+			"X.java",
+			"interface I0 {\n" + 
+			"	default void print() { System.out.println(\"I0\"); }\n" + 
+			"}\n" + 
+			"\n" + 
+			"interface IA extends I0 {}\n" + 
+			"\n" + 
+			"interface IB extends I0 {\n" + 
+			"	@Override default void print() {\n" + 
+			"		System.out.println(\"IB\");\n" + 
+			"	}\n" + 
+			"}\n" + 
+			"public class X implements IA, IB {\n" +
+			"	@Override\n" +
+			"	public void print() {\n" +
+			"		System.out.print(\"!\");" +
+			"	}\n" +
+			"   void test() {\n" +
+			"		doOutput(IA.super::print); // illegal attempt to skip IB.print()\n" +
+			"	}\n" +
+			"	public static void main(String... args) {\n" +
+			"		new X().test();\n" +
+			"	}\n" +
+			"   void doOutput(CanPrint printer) {\n" +
+			"      printer.print();" +
+			"   }\n" +
+			"}\n" +
+			"interface CanPrint {\n" +
+			"	void print();\n" +
+			"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 17)\n" + 
+		"	doOutput(IA.super::print); // illegal attempt to skip IB.print()\n" + 
+		"	         ^^^^^^^^^^^^^^^\n" + 
+		"Illegal reference to super method print() from type I0, cannot bypass the more specific override from type IB\n" + 
+		"----------\n"
+	);
+}
+
+public void testSuperReference03() {
+	this.runNegativeTest(
+			new String[] {
+				"XY.java",
+				"interface J {\n" + 
+				"	void foo(int x);\n" + 
+				"}\n" + 
+				"class XX {\n" + 
+				"	public  void foo(int x) {}\n" + 
+				"}\n" + 
+				"class Y extends XX {\n" + 
+				"	static class Z {\n" + 
+				"		public static void foo(int x) {\n" + 
+				"			System.out.print(x);\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"		public void foo(int x) {\n" + 
+				"			System.out.print(x);\n" + 
+				"		}\n" + 
+				"}\n" + 
+				"\n" + 
+				"public class XY extends XX {\n" + 
+				"	@SuppressWarnings(\"unused\")\n" + 
+				"	public  void bar(String [] args) {\n" + 
+				"		 Y y = new Y();\n" + 
+				"		 J jj = y :: foo;\n" + 
+				"		 J jx = y.super ::  foo;\n" + 
+				"	}\n" + 
+				"	public static void main (String [] args) {}\n" + 
+				"}"
+			},
+			"----------\n" + 
+			"1. ERROR in XY.java (at line 23)\n" + 
+			"	J jx = y.super ::  foo;\n" + 
+			"	       ^\n" + 
+			"y cannot be resolved to a type\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406614, [1.8][compiler] Missing and incorrect errors for lambda in explicit constructor call. 
+public void test406614() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	int doit();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	int f;\n" +
+				"	X(I i) {\n" +
+				"	}\n" +
+				"	X() {\n" +
+				"		this(() -> this.f);\n" +
+				"	}\n" +
+				"	X(short s) {\n" +
+				"		this(() -> this.g());\n" +
+				"	}\n" +
+				"	X (int x) {\n" +
+				"	    this(() -> f);\n" +
+				"	}\n" +
+				"	X (long x) {\n" +
+				"	    this(() -> g());\n" +
+				"	}\n" +
+				"	int g() {\n" +
+				"		return 0;\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	this(() -> this.f);\n" + 
+			"	           ^^^^\n" + 
+			"Cannot refer to \'this\' nor \'super\' while explicitly invoking a constructor\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 12)\n" + 
+			"	this(() -> this.g());\n" + 
+			"	           ^^^^\n" + 
+			"Cannot refer to \'this\' nor \'super\' while explicitly invoking a constructor\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 15)\n" + 
+			"	this(() -> f);\n" + 
+			"	           ^\n" + 
+			"Cannot refer to an instance field f while explicitly invoking a constructor\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 18)\n" + 
+			"	this(() -> g());\n" + 
+			"	           ^\n" + 
+			"Cannot refer to an instance method while explicitly invoking a constructor\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406588, [1.8][compiler][codegen] java.lang.invoke.LambdaConversionException: Incorrect number of parameters for static method newinvokespecial 
+public void test406588() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	X.Y.Z makeY(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	class Y {\n" +
+				"		Y(I i) {\n" +
+				"			\n" +
+				"		}\n" +
+				"		Y() {\n" +
+				"			this(Z::new);\n" +
+				"		}\n" +
+				"		class Z {\n" +
+				"			Z(int x) {\n" +
+				"\n" +
+				"			}\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	this(Z::new);\n" + 
+			"	     ^^^^^^\n" + 
+			"No enclosing instance of the type X.Y is accessible in scope\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406586, [1.8][compiler] Missing error about unavailable enclosing instance 
+public void test406586() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	X.Y makeY();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public class Y {\n" +
+				"	}\n" +
+				"	static void foo() {\n" +
+				"		I i = Y::new;\n" +
+				"	}\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	I i = Y::new;\n" + 
+			"	      ^^^^^^\n" + 
+			"No enclosing instance of the type X is accessible in scope\n" + 
+			"----------\n");
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401989, [1.8][compiler] hook lambda expressions into "can be static" analysis 
+public void test401989() {
+		Map compilerOptions = getCompilerOptions();
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+		this.runNegativeTest(
+			new String[] {
+				"X.java", 
+				"interface I {\n" +
+				"	void make();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	int val;\n" +
+				"	private I test() {\n" +
+				"		return () -> System.out.println(val);\n" +
+				"	}\n" +
+				"	private I testCanBeStatic() {\n" +
+				"		return () -> System.out.println();\n" +
+				"	}\n" +
+				"	public void call() { test().make(); testCanBeStatic().make();}\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	private I testCanBeStatic() {\n" + 
+			"	          ^^^^^^^^^^^^^^^^^\n" + 
+			"The method testCanBeStatic() from the type X can be declared as static\n" + 
+			"----------\n",
+			null /* no extra class libraries */,
+			true /* flush output directory */,
+			compilerOptions /* custom options */
+		);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406773, [1.8][compiler][codegen] "java.lang.IncompatibleClassChangeError" caused by attempted invocation of private constructor
+public void test406773() {
+		Map compilerOptions = getCompilerOptions();
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+		this.runNegativeTest(
+			new String[] {
+					"X.java", 
+					"interface I {\n" +
+					"	X makeX(int x);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	void foo() {\n" +
+					"		int local = 10;\n" +
+					"		class Y extends X {\n" +
+					"			class Z extends X {\n" +
+					"				void f() {\n" +
+					"					I i = X::new;\n" +
+					"					i.makeX(123456);\n" +
+					"					i = Y::new;\n" +
+					"					i.makeX(987654);\n" +
+					"					i = Z::new;\n" +
+					"					i.makeX(456789);\n" +
+					"				}\n" +
+					"				private Z(int z) {\n" +
+					"				}\n" +
+					"				Z() {}\n" +
+					"			}\n" +
+					"			private Y(int y) {\n" +
+					"				System.out.println(local);\n" +
+					"			}\n" +
+					"			private Y() {\n" +
+					"			}\n" +
+					"		}\n" +
+					"		new Y().new Z().f();\n" +
+					"	}\n" +
+					"	private X(int x) {\n" +
+					"	}\n" +
+					"	X() {\n" +
+					"	}\n" +
+					"	public static void main(String[] args) {\n" +
+					"		new X().foo();\n" +
+					"	}\n" +
+					"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	void foo() {\n" + 
+			"	     ^^^^^\n" + 
+			"The method foo() from the type X can potentially be declared as static\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 10)\n" + 
+			"	I i = X::new;\n" + 
+			"	      ^^^^^^\n" + 
+			"Access to enclosing constructor X(int) is emulated by a synthetic accessor method\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 12)\n" + 
+			"	i = Y::new;\n" + 
+			"	    ^^^^^^\n" + 
+			"No enclosing instance of the type X is accessible in scope\n" + 
+			"----------\n",
+			null /* no extra class libraries */,
+			true /* flush output directory */,
+			compilerOptions /* custom options */
+		);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=406859,  [1.8][compiler] Bad hint that method could be declared static
+public void test406859a() {
+		Map compilerOptions = getCompilerOptions();
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+		this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	int foo(int i);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		X x = new X();\n" +
+					"		I i = x::foo;\n" +
+					"		i.foo(3);\n" +
+					"	}\n" +
+					"	int foo(int x) {\n" +
+					"		return x;\n" +
+					"	}   \n" +
+					"}\n"
+			},
+			"",
+			null /* no extra class libraries */,
+			true /* flush output directory */,
+			compilerOptions /* custom options */
+		);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=406859,  [1.8][compiler] Bad hint that method could be declared static
+public void test406859b() {
+		Map compilerOptions = getCompilerOptions();
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+		this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit (Y y);\n" +
+					"}\n" +
+					"\n" +
+					"class Y {\n" +
+					"	void foo() {\n" +
+					"		return;\n" +
+					"	}\n" +
+					"}\n" +
+					"\n" +
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = Y::foo; \n" +
+					"		Y y = new Y();\n" +
+					"		i.doit(y);\n" +
+					"	}\n" +
+					"}\n"
+			},
+			"",
+			null /* no extra class libraries */,
+			true /* flush output directory */,
+			compilerOptions /* custom options */
+		);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=406859,  [1.8][compiler] Bad hint that method could be declared static
+public void test406859c() {
+		Map compilerOptions = getCompilerOptions();
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+		compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+		this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"interface I {\n" +
+					"	void doit ();\n" +
+					"}\n" +
+					"\n" +
+					"class Y {\n" +
+					"	void foo() {  \n" +
+					"		return;\n" +
+					"	}\n" +
+					"}\n" +
+					"\n" +
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = new Y()::foo;\n" +
+					"		i.doit();\n" +
+					"	}\n" +
+					"}\n"
+			},
+			"",
+			null /* no extra class libraries */,
+			true /* flush output directory */,
+			compilerOptions /* custom options */
+		);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406859,  [1.8][compiler] Bad hint that method could be declared static
+// A case where we can't help but report the wrong hint due to separate compilation.
+public void test406859d() {
+	Map compilerOptions = getCompilerOptions();
+	compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+	compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.WARNING);
+	this.runNegativeTest(
+		new String[] {
+				"Y.java",
+				"public class Y {\n" +
+				"	void foo() {\n" +
+				"		return;\n" +
+				"	}\n" +
+				"}",
+				"X.java",
+				"interface I {\n" +
+				"	void doit ();\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = new Y()::foo;\n" +
+				"		i.doit();\n" +
+				"	}\n" +
+				"}\n"
+		},
+		"----------\n" +
+		"1. WARNING in Y.java (at line 2)\n" +
+		"	void foo() {\n" +
+		"	     ^^^^^\n" +
+		"The method foo() from the type Y can potentially be declared as static\n" +
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		compilerOptions /* custom options */
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=410114, [1.8] CCE when trying to parse method reference expression with inappropriate type arguments
+public void test410114() throws IOException {
+	String source = "interface I {\n" +
+					"    void foo(Y<String> y);\n" +
+					"}\n" +
+					"public class Y<T> {\n" +
+					"    class Z<K> {\n" +
+					"        Z(Y<String> y) {\n" +
+					"            System.out.println(\"Y<T>.Z<K>:: new\");\n" +
+					"        }\n" +
+					"        void bar() {\n" +
+					"            I i = Y<String>.Z<Integer>::<String> new;\n" +
+					"            i.foo(new Y<String>());\n" +
+					"            i = Y<String>.Z<Integer>:: new;\n" +
+					"            i.foo(new Y<String>());\n" +
+					"            i = Y.Z:: new;\n" +
+					"            i.foo(new Y<String>());\n" +
+					"        }\n" +
+					"    }\n" +
+					"}\n";
+	this.runNegativeTest(
+			new String[]{"Y.java",
+						source},
+						"----------\n" + 
+						"1. WARNING in Y.java (at line 10)\n" + 
+						"	I i = Y<String>.Z<Integer>::<String> new;\n" + 
+						"	                             ^^^^^^\n" + 
+						"Unused type arguments for the non generic constructor Y<String>.Z<Integer>(Y<String>) of type Y<String>.Z<Integer>; it should not be parameterized with arguments <String>\n" + 
+						"----------\n" + 
+						"2. WARNING in Y.java (at line 14)\n" + 
+						"	i = Y.Z:: new;\n" + 
+						"	    ^^^^^^^^^\n" + 
+						"Type safety: The constructor Y.Z(Y) belongs to the raw type Y.Z. References to generic type Y<T>.Z<K> should be parameterized\n" + 
+						"----------\n");
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=412453,
+//[1.8][compiler] Stackoverflow when compiling LazySeq
+public void test412453() {
+	this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"import java.util.AbstractList;\n" +
+				"import java.util.Comparator;\n" +
+				"import java.util.Optional;\n" +
+				"\n" +
+				"import java.util.function.*;\n" +
+				"\n" +
+				"abstract class Y<E> extends AbstractList<E> {\n" +
+				"	public <C extends Comparable<? super C>> Optional<E> minBy(Function<E, C> propertyFun) { return null;} \n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	public void foo(Y<Integer> empty) throws Exception {\n" +
+				"		final Optional<Integer> min = empty.minBy((a, b) -> a - b);\n" +
+				"	}\n" +
+				"}\n" +
+				"\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 13)\n" + 
+		"	final Optional<Integer> min = empty.minBy((a, b) -> a - b);\n" + 
+		"	                                          ^^^^^^^^^^^^^^^\n" + 
+		"Lambda expression\'s signature does not match the signature of the functional interface method\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=412284,
+//[1.8][compiler] [1.8][compiler] Inspect all casts to/instanceof AbstractMethodDeclaration to eliminate potential CCEs
+public void test412284a() {
+	this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"import java.io.IOException;\n" +
+				"interface I { void foo() throws IOException; }\n" +
+				"public class X {\n" +
+				" void bar() {\n" +
+				"	 I i = () -> {\n" +
+				"		 try {\n" +
+				"			 throw new IOException();\n" +
+				"		 } catch (IOException e) {			 \n" +
+				"		 } finally {\n" +
+				"			 i.foo();\n" +
+				"		 }\n" +
+				"	 };\n" +
+				" }\n" +
+				"}\n"
+		},
+
+		"----------\n" + 
+		"1. ERROR in X.java (at line 10)\n" + 
+		"	i.foo();\n" + 
+		"	^\n" + 
+		"The local variable i may not have been initialized\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=412284,
+//[1.8][compiler] [1.8][compiler] Inspect all casts to/instanceof AbstractMethodDeclaration to eliminate potential CCEs
+public void test412284b() {
+	this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I { void foo();}\n" + 
+				"class X { \n" +
+				"   final int t;\n" +
+				"   X(){\n" +
+				"       I x = () ->  {\n" +
+				"    	 try {\n" +
+				"           t = 3;\n" +
+				"         } catch (Exception e) {\n" +
+				"           t = 4;\n" +
+				"         }\n" +
+				"      };\n" +
+				"  }\n" +
+				"}\n"
+		},
+
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	X(){\n" + 
+		"	^^^\n" + 
+		"The blank final field t may not have been initialized\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 7)\n" + 
+		"	t = 3;\n" + 
+		"	^\n" + 
+		"The final field X.t cannot be assigned\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 9)\n" + 
+		"	t = 4;\n" + 
+		"	^\n" + 
+		"The final field X.t cannot be assigned\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=412284,
+//[1.8][compiler] [1.8][compiler] Inspect all casts to/instanceof AbstractMethodDeclaration to eliminate potential CCEs
+public void test412284c() {
+	this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I { void foo();}\n" + 
+				"class X { \n" +
+				"   final int t;\n" +
+				"   X(){\n" +
+				"       I x = () ->  {\n" +
+				"    	 try {\n" +
+				"           t += 3;\n" +
+				"         } catch (Exception e) {\n" +
+				"           t += 4;\n" +
+				"         }\n" +
+				"      };\n" +
+				"  }\n" +
+				"}\n"
+		},
+
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	X(){\n" + 
+		"	^^^\n" + 
+		"The blank final field t may not have been initialized\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 7)\n" + 
+		"	t += 3;\n" + 
+		"	^\n" + 
+		"The final field X.t cannot be assigned\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 9)\n" + 
+		"	t += 4;\n" + 
+		"	^\n" + 
+		"The final field X.t cannot be assigned\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=412650
+// [1.8][compiler]Incongruent Lambda Exception thrown
+public void test412650() {
+	this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"interface I {\n" +
+				"	String sam();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	static String foo(I i) { return \"\"; }\n" +
+				"	public static void main(String[] args) {\n" +
+				"		foo(() -> foo(X::getInt));\n" +
+				"	}\n" +
+				"	static Integer getInt() { return 0; }\n" +
+				"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 7)\n" +
+		"	foo(() -> foo(X::getInt));\n" +
+		"	              ^^^^^^^^^\n" +
+		"The type of getInt() from the type X is Integer, this is incompatible with the descriptor's return type: String\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=409544
+// Bug 409544 - [1.8][compiler] Any local variable used but not declared in a lambda body must be definitely assigned before the lambda body.
+public void test409544() {
+	this.runNegativeTest(
+		new String[] {
+				"Sample.java",
+				"public class Sample{\n" + 
+				"	interface Int { void setInt(int[] i); }\n" + 
+				"	public static void main(String[] args) {\n" +
+				"		int j;\n" +
+				"		Int int1 = (int... i) -> {\n" +
+				"										j=10;\n" +
+				"								};\n" +
+				"	}\n" +
+				"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in Sample.java (at line 6)\n" +
+		"	j=10;\n" +
+		"	^\n" +
+		"Local variable j defined in an enclosing scope must be final or effectively final\n" +
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=409544
+// Bug 409544 - [1.8][compiler] Any local variable used but not declared in a lambda body must be definitely assigned before the lambda body.
+public void test409544b() {
+	this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"public class X {\n" +
+				"    interface Int {\n" +
+				"	void setInt(int[] i);\n" +
+				"    }\n" +
+				"    public static void main(String[] args) {\n" +
+				"\n" +
+				"    int j = 0;\n" +
+				"    Int i = new Int() {\n" +
+				"		@Override\n" +
+				"		public void setInt(int[] i) {\n" +
+				"			j = 10;\n" +
+				"		}\n" +
+				"	};\n" +
+				"    }\n" +
+				"}\n"
+		},
+		"----------\n" + 
+		"1. WARNING in X.java (at line 10)\n" + 
+		"	public void setInt(int[] i) {\n" + 
+		"	                         ^\n" + 
+		"The parameter i is hiding another local variable defined in an enclosing scope\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 11)\n" + 
+		"	j = 10;\n" + 
+		"	^\n" + 
+		"Local variable j defined in an enclosing scope must be final or effectively final\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=415844
+// Bug 415844 - [1.8][compiler] Blank final initialized in a lambda expression should not pass
+public void test415844a() {
+	this.runNegativeTest(
+		new String[] {
+				"Sample.java",
+				"public class Sample{\n" + 
+				"	interface Int { void setInt(int i); }\n" + 
+				"	public static void main(String[] args) {\n" +
+				"		final int j;\n" +
+				"		Int int1 = (int i) -> {\n" +
+				"								j=10;\n" +
+				"		};\n" +
+				"	}\n" +
+				"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in Sample.java (at line 6)\n" +
+		"	j=10;\n" +
+		"	^\n" +
+		"The final local variable j cannot be assigned, since it is defined in an enclosing type\n" +
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=415844
+// Bug 415844 - [1.8][compiler] Blank final initialized in a lambda expression should not pass
+public void test415844b() {
+	this.runNegativeTest(
+		new String[] {
+				"X.java",
+				"public class X {\n" +
+				"    interface Int {\n" +
+				"		void setInt(int[] i);\n" +
+				"    }\n" +
+				"    public static void main(String[] args) {\n" +
+				"    	final int j;\n" +
+				"    	Int i = new Int() {\n" +
+				"			@Override\n" +
+				"			public void setInt(int[] i) {\n" +
+				"				j = 10;\n" +
+				"			}\n" +
+				"		};\n" +
+				"    }\n" +
+				"}\n"
+		},
+		"----------\n" + 
+		"1. WARNING in X.java (at line 9)\n" + 
+		"	public void setInt(int[] i) {\n" + 
+		"	                         ^\n" + 
+		"The parameter i is hiding another local variable defined in an enclosing scope\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 10)\n" + 
+		"	j = 10;\n" + 
+		"	^\n" + 
+		"The final local variable j cannot be assigned, since it is defined in an enclosing type\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		null /* custom options */
+	);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=404657 [1.8][compiler] Analysis for effectively final variables fails to consider loops
+public void test404657_final() {
+		this.runNegativeTest(
+			new String[] {
+					"X.java", 
+					"public class X {\n" + 
+					" void executeLater(Runnable r) { /* ... */\n" + 
+					" }\n" + 
+					" public int testFinally() {\n" + 
+					"  int n;\n" + 
+					"  try {\n" + 
+					"   n = 42;\n" + 
+					"    executeLater(() -> System.out.println(n)); // Error: n is not effectively final\n" + 
+					"  } finally {\n" + 
+					"   n = 23;\n" + 
+					"  }\n" + 
+					"  return n;\n" + 
+					" }\n" + 
+					"\n" + 
+					"}\n" + 
+					""
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	executeLater(() -> System.out.println(n)); // Error: n is not effectively final\n" + 
+			"	                                      ^\n" + 
+			"Local variable n defined in an enclosing scope must be final or effectively final\n" + 
+			"----------\n"
+		);
+}
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=404657 [1.8][compiler] Analysis for effectively final variables fails to consider loops
+public void test404657_loop() {
+		this.runNegativeTest(
+			new String[] {
+					"X.java", 
+					"public class X {\n" + 
+					" void executeLater(Runnable r) { /* ... */\n" + 
+					" }\n" + 
+					" public void testLoop() {\n" + 
+					"  int n;\n" + 
+					"  for (int i = 0; i < 3; i++) {\n" + 
+					"   n = i;\n" + 
+					"   executeLater(() -> System.out.println(n)); // Error: n is not effectively final\n" + 
+					"  }\n" + 
+					" }\n" + 
+					"\n" + 
+					"}\n" + 
+					""
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	executeLater(() -> System.out.println(n)); // Error: n is not effectively final\n" + 
+			"	                                      ^\n" + 
+			"Local variable n defined in an enclosing scope must be final or effectively final\n" + 
+			"----------\n"
+		);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420580, [1.8][compiler] ReferenceExpression drops explicit type arguments
+public void testExplicitTypeArgument() {
+		this.runNegativeTest(
+			new String[] {
+					"X.java", 
+					"interface I {\n" +
+					"	void sam(X t, Integer s);\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	<T> void function(T t) {}\n" +
+					"	public static void main(String [] args) {\n" +
+					"		I i = X::<String>function;\n" +
+					"		i = X::function;\n" +
+					"		i = X::<Integer>function;\n" +
+					"	}\n" +
+					"}\n" + 
+					""
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	I i = X::<String>function;\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^\n" + 
+			"The type X does not define function(X, Integer) that is applicable here\n" + 
+			"----------\n"
+		);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420582,  [1.8][compiler] Compiler should allow creation of generic array creation with unbounded wildcard type arguments
+public void testGenericArrayCreation() {
+		this.runNegativeTest(
+			new String[] {
+					"X.java", 
+					"interface I {\n" +
+					"	X<?, ?, ?>[] makeArray(int i);\n" +
+					"}\n" +
+					"public class X<T, U, V> {\n" +
+					"	public static void main(String [] args) {\n" +
+					"		I i = X<?, ?, ?>[]::new; // OK.\n" +
+					"		i = X<String, Integer, ?>[]::new; // ! OK\n" +
+					"		X<?, ?, ?> [] a = new X<?, ?, ?>[10]; // OK\n" +
+					"		a = new X<String, Integer, ?>[10]; // ! OK\n" +
+					"		System.out.println(i.makeArray(1024).length);\n" +
+					"	}\n" +
+					"}\n" + 
+					""
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 7)\n" + 
+			"	i = X<String, Integer, ?>[]::new; // ! OK\n" + 
+			"	    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Cannot create a generic array of X<String,Integer,?>\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	a = new X<String, Integer, ?>[10]; // ! OK\n" + 
+			"	    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Cannot create a generic array of X<String,Integer,?>\n" + 
+			"----------\n"
+		);
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420598, [1.8][compiler] Incorrect error about intersection cast type not being a functional interface. 
+public void testIntersectionCast() {
+		this.runNegativeTest(
+			new String[] {
+					"X.java", 
+					"import java.io.Serializable;\n" +
+					"interface I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"interface J extends I {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"interface K {\n" +
+					"}\n" +
+					"interface L {\n" +
+					"	void foo();\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"		I i = (I & Serializable) () -> {};\n" +
+					"		i = (I & J & K) () -> {};\n" +
+					"		i = (J & I & K) () -> {};  \n" +
+					"		i = (J & I & K & L) () -> {};  \n" +
+					"	}\n" +
+					"}\n" + 
+					""
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 18)\n" + 
+			"	i = (J & I & K & L) () -> {};  \n" + 
+			"	                    ^^^^^^^^\n" + 
+			"The target type of this expression is not a functional interface: more than one of the intersecting interfaces are functional\n" + 
+			"----------\n"
+		);
+}
+public static Class testClass() {
+	return NegativeLambdaExpressionsTest.class;
+}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
new file mode 100644
index 0000000..790beff
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NegativeTypeAnnotationTest.java
@@ -0,0 +1,4196 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.File;
+
+import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+import junit.framework.Test;
+
+public class NegativeTypeAnnotationTest extends AbstractRegressionTest {
+
+	static { 
+//		TESTS_NUMBERS = new int [] { 35 };
+//		TESTS_NAMES = new String [] { "test0390882b" };
+	}
+	public static Class testClass() {
+		return NegativeTypeAnnotationTest.class;
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+	public NegativeTypeAnnotationTest(String testName){
+		super(testName);
+	}
+	public void test001() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X extends @Marker2 Object {}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker2 Object {}\n" + 
+				"	                        ^^^^^^^\n" + 
+				"Marker2 cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test002() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.io.Serializable;\n" +
+					"public class X implements @Marker2 Serializable {\n" +
+					"	private static final long serialVersionUID = 1L;\n" +
+					"}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	public class X implements @Marker2 Serializable {\n" + 
+				"	                           ^^^^^^^\n" + 
+				"Marker2 cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test003() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X extends @Marker Object {}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker Object {}\n" + 
+				"	                        ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test004() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X<@Marker T> {}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X<@Marker T> {}\n" + 
+				"	                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test005() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X<@Marker T> {}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X<@Marker T> {}\n" + 
+				"	                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test006() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"Y.java",
+				"class Y {}\n",
+				"X.java",
+				"public class X extends @A(id=\"Hello, World!\") @B @C('(') Y {\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	public class X extends @A(id=\"Hello, World!\") @B @C(\'(\') Y {\n" + 
+		"	                        ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 1)\n" + 
+		"	public class X extends @A(id=\"Hello, World!\") @B @C(\'(\') Y {\n" + 
+		"	                                               ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 1)\n" + 
+		"	public class X extends @A(id=\"Hello, World!\") @B @C(\'(\') Y {\n" + 
+		"	                                                  ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	public void test007() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X implements @A(id=\"Hello, World!\") I, @B @C('(') J {}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	public class X implements @A(id=\"Hello, World!\") I, @B @C(\'(\') J {}\n" + 
+		"	                           ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 1)\n" + 
+		"	public class X implements @A(id=\"Hello, World!\") I, @B @C(\'(\') J {}\n" + 
+		"	                                                     ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 1)\n" + 
+		"	public class X implements @A(id=\"Hello, World!\") I, @B @C(\'(\') J {}\n" + 
+		"	                                                        ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	public void test010() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"Y.java",
+				"class Y<T> {}\n",
+				"X.java",
+				"public class X extends @A(\"Hello, World!\") Y<@B @C('(') String> {\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	public class X extends @A(\"Hello, World!\") Y<@B @C(\'(\') String> {\n" + 
+		"	                        ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 1)\n" + 
+		"	public class X extends @A(\"Hello, World!\") Y<@B @C(\'(\') String> {\n" + 
+		"	                                              ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 1)\n" + 
+		"	public class X extends @A(\"Hello, World!\") Y<@B @C(\'(\') String> {\n" + 
+		"	                                                 ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	public void test011() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"I.java",
+				"interface I<T> {}\n",
+				"J.java",
+				"interface J<T> {}\n",
+				"X.java",
+				"public class X implements I<@A(\"Hello, World!\") String>,  @B J<@C('(') Integer> {}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	public class X implements I<@A(\"Hello, World!\") String>,  @B J<@C(\'(\') Integer> {}\n" + 
+		"	                             ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 1)\n" + 
+		"	public class X implements I<@A(\"Hello, World!\") String>,  @B J<@C(\'(\') Integer> {}\n" + 
+		"	                                                           ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 1)\n" + 
+		"	public class X implements I<@A(\"Hello, World!\") String>,  @B J<@C(\'(\') Integer> {}\n" + 
+		"	                                                                ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// throws
+	public void test012() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"E.java",
+				"class E extends RuntimeException {\n" +
+				"	private static final long serialVersionUID = 1L;\n" +
+				"}\n",
+				"E1.java",
+				"class E1 extends RuntimeException {\n" +
+				"	private static final long serialVersionUID = 1L;\n" +
+				"}\n",
+				"E2.java",
+				"class E2 extends RuntimeException {\n" +
+				"	private static final long serialVersionUID = 1L;\n" +
+				"}\n",
+				"X.java",
+				"public class X {\n" +
+				"	void foo() throws @A(\"Hello, World!\") E, E1, @B @C('(') E2 {}\n" +
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	void foo() throws @A(\"Hello, World!\") E, E1, @B @C(\'(\') E2 {}\n" + 
+		"	                   ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 2)\n" + 
+		"	void foo() throws @A(\"Hello, World!\") E, E1, @B @C(\'(\') E2 {}\n" + 
+		"	                                              ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 2)\n" + 
+		"	void foo() throws @A(\"Hello, World!\") E, E1, @B @C(\'(\') E2 {}\n" + 
+		"	                                                 ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// method receiver
+	public void test013() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	void foo(@B(3) X this) {}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	void foo(@B(3) X this) {}\n" + 
+		"	          ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// method return type
+	public void test014() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	@B(3) int foo() {\n" +
+				"		return 1;\n" +
+				"	}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	@B(3) int foo() {\n" + 
+		"	 ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// field type
+	public void test015() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	@B(3) int field;\n" +
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	@B(3) int field;\n" + 
+		"	 ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// method parameter
+	public void test016() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	int foo(@B(3) String s) {\n" +
+				"		return s.length();\n" +
+				"	}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	int foo(@B(3) String s) {\n" + 
+		"	         ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// method parameter generic or array
+	public void test017() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	int foo(String @B(3) [] s) {\n" +
+				"		return s.length;\n" +
+				"	}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	int foo(String @B(3) [] s) {\n" + 
+		"	                ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// field type generic or array
+	public void test018() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	int @B(3) [] field;\n" +
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	int @B(3) [] field;\n" + 
+		"	     ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// class type parameter
+	public void test019() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X<@A @B(3) T> {}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	public class X<@A @B(3) T> {}\n" + 
+		"	                ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 1)\n" + 
+		"	public class X<@A @B(3) T> {}\n" + 
+		"	                   ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// method type parameter
+	public void test020() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	<@A @B(3) T> void foo(T t) {}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	<@A @B(3) T> void foo(T t) {}\n" + 
+		"	  ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 2)\n" + 
+		"	<@A @B(3) T> void foo(T t) {}\n" + 
+		"	     ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// class type parameter bound
+	public void test021() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"Z.java",
+				"public class Z {}",
+				"X.java",
+				"public class X<T extends @A Z & @B(3) Cloneable> {}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	public class X<T extends @A Z & @B(3) Cloneable> {}\n" + 
+		"	                          ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 1)\n" + 
+		"	public class X<T extends @A Z & @B(3) Cloneable> {}\n" + 
+		"	                                 ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// class type parameter bound generic or array
+	public void test022() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"Y.java",
+				"public class Y<T> {}",
+				"X.java",
+				"public class X<T extends Y<@A String @C[][]@B[]> & @B(3) Cloneable> {}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 1)\n" + 
+		"	public class X<T extends Y<@A String @C[][]@B[]> & @B(3) Cloneable> {}\n" + 
+		"	                            ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 1)\n" + 
+		"	public class X<T extends Y<@A String @C[][]@B[]> & @B(3) Cloneable> {}\n" + 
+		"	                                      ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 1)\n" + 
+		"	public class X<T extends Y<@A String @C[][]@B[]> & @B(3) Cloneable> {}\n" + 
+		"	                                            ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 1)\n" + 
+		"	public class X<T extends Y<@A String @C[][]@B[]> & @B(3) Cloneable> {}\n" + 
+		"	                                                    ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// method type parameter bound
+	public void test023() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"Z.java",
+				"public class Z {}",
+				"X.java",
+				"public class X {\n" +
+				"	<T extends @A Z & @B(3) Cloneable> void foo(T t) {}\n" +
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	<T extends @A Z & @B(3) Cloneable> void foo(T t) {}\n" + 
+		"	            ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 2)\n" + 
+		"	<T extends @A Z & @B(3) Cloneable> void foo(T t) {}\n" + 
+		"	                   ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// class type parameter bound generic or array
+	public void test024() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"Z.java",
+				"public class Z {}",
+				"Y.java",
+				"public class Y<T> {}",
+				"X.java",
+				"public class X {\n" +
+				"	<T extends Y<@A Z @C[][]@B[]> & @B(3) Cloneable> void foo(T t) {}\n" +
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	<T extends Y<@A Z @C[][]@B[]> & @B(3) Cloneable> void foo(T t) {}\n" + 
+		"	              ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 2)\n" + 
+		"	<T extends Y<@A Z @C[][]@B[]> & @B(3) Cloneable> void foo(T t) {}\n" + 
+		"	                   ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 2)\n" + 
+		"	<T extends Y<@A Z @C[][]@B[]> & @B(3) Cloneable> void foo(T t) {}\n" + 
+		"	                         ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 2)\n" + 
+		"	<T extends Y<@A Z @C[][]@B[]> & @B(3) Cloneable> void foo(T t) {}\n" + 
+		"	                                 ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// local variable + generic or array
+	public void test025() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	void foo(String s) {\n" + 
+				"		@C int i;\n" + 
+				"		@A String [] @B(3)[] tab = new String[][] {};\n" + 
+				"		if (tab != null) {\n" + 
+				"			i = 0;\n" + 
+				"			System.out.println(i + tab.length);\n" + 
+				"		} else {\n" + 
+				"			System.out.println(tab.length);\n" + 
+				"		}\n" + 
+				"		i = 4;\n" + 
+				"		System.out.println(-i + tab.length);\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 3)\n" + 
+		"	@C int i;\n" + 
+		"	 ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 4)\n" + 
+		"	@A String [] @B(3)[] tab = new String[][] {};\n" + 
+		"	 ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 4)\n" + 
+		"	@A String [] @B(3)[] tab = new String[][] {};\n" + 
+		"	              ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// type argument constructor call
+	public void test026() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	<T> X(T t) {\n" + 
+				"	}\n" + 
+				"	public Object foo() {\n" + 
+				"		X x = new <@A @B(1) String>X(null);\n" + 
+				"		return x;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 5)\n" + 
+		"	X x = new <@A @B(1) String>X(null);\n" + 
+		"	            ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 5)\n" + 
+		"	X x = new <@A @B(1) String>X(null);\n" + 
+		"	               ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// type argument constructor call generic or array
+	public void test027() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	<T> X(T t) {\n" + 
+				"	}\n" + 
+				"	public Object foo() {\n" + 
+				"		X x = new <@A @B(1) String>X(null);\n" + 
+				"		return x;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 5)\n" + 
+		"	X x = new <@A @B(1) String>X(null);\n" + 
+		"	            ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 5)\n" + 
+		"	X x = new <@A @B(1) String>X(null);\n" + 
+		"	               ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// type argument method call and generic or array
+	public void test028() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"\n" +
+				"	static <T, U> T foo(T t, U u) {\n" +
+				"		return t;\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println(X.<@A @B(1) String[], @C('-') X>foo(new String[]{\"SUCCESS\"}, null)[0]);\n" +
+				"	}\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 7)\n" + 
+		"	System.out.println(X.<@A @B(1) String[], @C(\'-\') X>foo(new String[]{\"SUCCESS\"}, null)[0]);\n" + 
+		"	                       ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 7)\n" + 
+		"	System.out.println(X.<@A @B(1) String[], @C(\'-\') X>foo(new String[]{\"SUCCESS\"}, null)[0]);\n" + 
+		"	                          ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 7)\n" + 
+		"	System.out.println(X.<@A @B(1) String[], @C(\'-\') X>foo(new String[]{\"SUCCESS\"}, null)[0]);\n" + 
+		"	                                          ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	public void test029() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X extends @Marker2 Object {}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker2 Object {}\n" + 
+				"	                        ^^^^^^^\n" + 
+				"Marker2 cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test030() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.io.Serializable;\n" +
+					"public class X implements @Marker2 Serializable {\n" +
+					"	private static final long serialVersionUID = 1L;\n" +
+					"}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	public class X implements @Marker2 Serializable {\n" + 
+				"	                           ^^^^^^^\n" + 
+				"Marker2 cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test031() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"Marker.java",
+					"import java.lang.annotation.Target;\n" + 
+					"import static java.lang.annotation.ElementType.*;\n" + 
+					"@Target(TYPE)\n" + 
+					"@interface Marker {}",
+					"X.java",
+					"public class X<@Marker T> {}",
+
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n" +
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X<@Marker T> {}\n" + 
+				"	               ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n");
+	}
+	public void test032() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"Marker.java",
+					"@interface Marker {}",
+					"X.java",
+					"public class X<@Marker T> {}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X<@Marker T> {}\n" + 
+				"	               ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n");
+	}
+	public void test033() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"Marker.java",
+					"@interface Marker {}",
+					"Y.java",
+					"public class Y {}",
+					"X.java",
+					"public class X extends @Marker Y {}",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X extends @Marker Y {}\n" + 
+				"	                       ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n");
+	}
+	// check locations
+	public void test034() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.Map;\n" +
+				"import java.util.List;\n" +
+				"public class X {\n" + 
+				"	@H String @E[] @F[] @G[] field;\n" + 
+				"	@A Map<@B String, @C List<@D Object>> field2;\n" + 
+				"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	@H String @E[] @F[] @G[] field;\n" + 
+		"	 ^\n" + 
+		"H cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 4)\n" + 
+		"	@H String @E[] @F[] @G[] field;\n" + 
+		"	           ^\n" + 
+		"E cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 4)\n" + 
+		"	@H String @E[] @F[] @G[] field;\n" + 
+		"	                ^\n" + 
+		"F cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 4)\n" + 
+		"	@H String @E[] @F[] @G[] field;\n" + 
+		"	                     ^\n" + 
+		"G cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"5. ERROR in X.java (at line 5)\n" + 
+		"	@A Map<@B String, @C List<@D Object>> field2;\n" + 
+		"	 ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"6. ERROR in X.java (at line 5)\n" + 
+		"	@A Map<@B String, @C List<@D Object>> field2;\n" + 
+		"	        ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"7. ERROR in X.java (at line 5)\n" + 
+		"	@A Map<@B String, @C List<@D Object>> field2;\n" + 
+		"	                   ^\n" + 
+		"C cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"8. ERROR in X.java (at line 5)\n" + 
+		"	@A Map<@B String, @C List<@D Object>> field2;\n" + 
+		"	                           ^\n" + 
+		"D cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"9. ERROR in X.java (at line 6)\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"	 ^\n" + 
+		"A cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"10. ERROR in X.java (at line 6)\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"	        ^\n" + 
+		"B cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"11. ERROR in X.java (at line 6)\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"	                   ^\n" + 
+		"H cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"12. ERROR in X.java (at line 6)\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"	                             ^\n" + 
+		"E cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"13. ERROR in X.java (at line 6)\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"	                                  ^\n" + 
+		"F cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"14. ERROR in X.java (at line 6)\n" + 
+		"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+		"	                                       ^\n" + 
+		"G cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// check locations
+	public void test035() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.util.Map;\n" +
+				"import java.util.List;\n" +
+				"public class X {\n" + 
+				"	@H java.lang.String @E[] @F[] @G[] field;\n" + 
+				"}",
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 4)\n" + 
+		"	@H java.lang.String @E[] @F[] @G[] field;\n" + 
+		"	 ^\n" + 
+		"H cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"2. ERROR in X.java (at line 4)\n" + 
+		"	@H java.lang.String @E[] @F[] @G[] field;\n" + 
+		"	                     ^\n" + 
+		"E cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 4)\n" + 
+		"	@H java.lang.String @E[] @F[] @G[] field;\n" + 
+		"	                          ^\n" + 
+		"F cannot be resolved to a type\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 4)\n" + 
+		"	@H java.lang.String @E[] @F[] @G[] field;\n" + 
+		"	                               ^\n" + 
+		"G cannot be resolved to a type\n" + 
+		"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383884 -- Compiler tolerates illegal dimension annotation in class literal expressions
+	public void test036() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    System.out.println(int @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" +
+				"    System.out.println(X @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" +
+				"    System.out.println(int [] [] [] [] [].class);\n" +
+				"    System.out.println(X [] [] [] [] [].class);\n" +
+				"  }\n" +
+				"}\n" +
+				"@interface Empty {\n" +
+				"}\n" +
+				"@interface NonEmpty {\n" +
+				"}\n",
+		},
+		"----------\n" + 
+		"1. WARNING in X.java (at line 3)\n" + 
+		"	System.out.println(int @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" + 
+		"	                       ^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"2. WARNING in X.java (at line 3)\n" + 
+		"	System.out.println(int @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" + 
+		"	                                       ^^^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"3. WARNING in X.java (at line 3)\n" + 
+		"	System.out.println(int @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" + 
+		"	                                                              ^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"4. ERROR in X.java (at line 4)\n" + 
+		"	System.out.println(X @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" + 
+		"	                     ^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"5. ERROR in X.java (at line 4)\n" + 
+		"	System.out.println(X @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" + 
+		"	                                     ^^^^^^^^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n" + 
+		"6. ERROR in X.java (at line 4)\n" + 
+		"	System.out.println(X @NonEmpty [] [] @NonEmpty @Empty [] [] @NonEmpty[].class); // illegal!\n" + 
+		"	                                                            ^^^^^^^^^\n" + 
+		"Syntax error, type annotations are illegal here\n" + 
+		"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383950
+	// [1.8][compiler] Type annotations must have target type meta annotation TYPE_USE
+	public void test037() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"@interface Marker {}\n" +
+					"@Marker	// line 2: Don't complain \n" +
+					"public class X<@Marker T>  extends @Marker Object{		// 3: Complain \n" +
+					"	public @Marker Object foo(@Marker Object obj) {  // 4: Don't complain on both\n" +
+					"		return null;\n" +
+					"	}\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	public class X<@Marker T>  extends @Marker Object{		// 3: Complain \n" + 
+				"	               ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	public class X<@Marker T>  extends @Marker Object{		// 3: Complain \n" + 
+				"	                                   ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383950
+	// [1.8][compiler] Type annotations must have target type meta annotation TYPE_USE
+	public void test038() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.Target;\n" + 
+						"import static java.lang.annotation.ElementType.*;\n" + 
+						"@Target({PACKAGE, TYPE, METHOD, FIELD, CONSTRUCTOR, PARAMETER, LOCAL_VARIABLE})\n" + 
+						"@interface Marker {}\n" +
+						"public class X<@Marker T>  extends @Marker Object{		// 3: Complain \n" +
+						"}\n",
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 5)\n" + 
+					"	public class X<@Marker T>  extends @Marker Object{		// 3: Complain \n" + 
+					"	               ^^^^^^^\n" + 
+					"The annotation @Marker is disallowed for this location\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 5)\n" + 
+					"	public class X<@Marker T>  extends @Marker Object{		// 3: Complain \n" + 
+					"	                                   ^^^^^^^\n" + 
+					"The annotation @Marker is disallowed for this location\n" + 
+					"----------\n");
+	}
+	// JSR 308: "It is not permitted to annotate the type name in an import statement."
+	public void test039() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import @Marker java.lang.String; // Compilation error \n" +
+						"public class X { \n" +
+						"}\n" + 
+						"@interface Marker {}\n"
+					}, 
+					"----------\n" + 
+					"1. ERROR in X.java (at line 1)\n" + 
+					"	import @Marker java.lang.String; // Compilation error \n" + 
+					"	       ^^^^^^^\n" + 
+					"Syntax error, type annotations are illegal here\n" + 
+					"----------\n");
+	}
+	// Test that type name can't be left out in a cast expression with an annotations 
+	public void test040() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X { \n" +
+						"	public void foo(Object myObject) {\n" +
+						"		String myString = (@NonNull) myObject;" +
+						"	}\n" +
+						"}\n" + 
+						"@interface NonNull {}\n"
+					}, 
+					"----------\n" + 
+					"1. ERROR in X.java (at line 3)\n" + 
+					"	String myString = (@NonNull) myObject;	}\n" + 
+					"	                   ^\n" + 
+					"Syntax error on token \"@\", delete this token\n" + 
+					"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385111
+	// [1.8][compiler] Compiler fails to flag undefined annotation type. 
+	public void test0385111() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.util.ArrayList;\n" +
+						"import java.util.List;\n" +
+						"public class X {\n" +
+						"    public void foo(String fileName) {\n" +
+						"        List<String> l = new @MissingTypeNotIgnored ArrayList<String>();\n" +
+						"        List<String> l1 = new @MissingTypeIgnored ArrayList<>();\n" +
+						"    }\n" +
+						"}\n",
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 5)\n" + 
+					"	List<String> l = new @MissingTypeNotIgnored ArrayList<String>();\n" + 
+					"	                      ^^^^^^^^^^^^^^^^^^^^^\n" + 
+					"MissingTypeNotIgnored cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 6)\n" + 
+					"	List<String> l1 = new @MissingTypeIgnored ArrayList<>();\n" + 
+					"	                       ^^^^^^^^^^^^^^^^^^\n" + 
+					"MissingTypeIgnored cannot be resolved to a type\n" + 
+					"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385111
+	// Test to exercise assorted cleanup along with bug fix. 
+	public void test0385111a() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"    public void foo(String fileName) {\n" +
+						"        try (@Annot X x = null; @Annot X x2 = null) {\n"+
+						"        } catch (@Annot NullPointerException | @Annot UnsupportedOperationException e) {\n" +
+						"        }\n" +
+						"    }\n" +
+						"}\n",
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 3)\n" + 
+					"	try (@Annot X x = null; @Annot X x2 = null) {\n" + 
+					"	      ^^^^^\n" + 
+					"Annot cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 3)\n" + 
+					"	try (@Annot X x = null; @Annot X x2 = null) {\n" + 
+					"	            ^\n" + 
+					"The resource type X does not implement java.lang.AutoCloseable\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 3)\n" + 
+					"	try (@Annot X x = null; @Annot X x2 = null) {\n" + 
+					"	                         ^^^^^\n" + 
+					"Annot cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"4. ERROR in X.java (at line 3)\n" + 
+					"	try (@Annot X x = null; @Annot X x2 = null) {\n" + 
+					"	                               ^\n" + 
+					"The resource type X does not implement java.lang.AutoCloseable\n" + 
+					"----------\n" + 
+					"5. ERROR in X.java (at line 4)\n" + 
+					"	} catch (@Annot NullPointerException | @Annot UnsupportedOperationException e) {\n" + 
+					"	          ^^^^^\n" + 
+					"Annot cannot be resolved to a type\n" + 
+					"----------\n" + 
+					"6. ERROR in X.java (at line 4)\n" + 
+					"	} catch (@Annot NullPointerException | @Annot UnsupportedOperationException e) {\n" + 
+					"	                                        ^^^^^\n" + 
+					"Annot cannot be resolved to a type\n" + 
+					"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913() {
+		this.runNegativeTest(
+				new String[]{
+						"X.java",
+						"public class X {\n" +
+						"	public void foo(Object obj, X this) {}\n" +
+						"	public void foo(Object obj1, X this, Object obj2) {}\n" +
+						"	public void foo(Object obj, Object obj2, Object obj3, X this) {}\n" +
+						"	class Y {\n" +
+						"		Y(Object obj, Y Y.this){}\n" +
+						"	}\n" +
+						"}"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	public void foo(Object obj, X this) {}\n" + 
+				"	                              ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	public void foo(Object obj1, X this, Object obj2) {}\n" + 
+				"	                               ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 4)\n" + 
+				"	public void foo(Object obj, Object obj2, Object obj3, X this) {}\n" + 
+				"	                                                        ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 6)\n" + 
+				"	Y(Object obj, Y Y.this){}\n" + 
+				"	                  ^^^^\n" + 
+				"Only the first formal parameter may be declared explicitly as 'this'\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913b() {
+		this.runNegativeTest(
+				new String[] {
+						"Outer.java",
+						"public class Outer {\n" +
+						"    Outer(Outer Outer.this) {}\n" +
+						"    Outer(Outer this, int i) {}\n" +
+						"    class Inner<K,V> {\n" +
+						"        class InnerMost<T> {\n" +
+						"            InnerMost(Outer.Inner this) {}\n" +
+						"            InnerMost(Outer.Inner Outer.Inner.this, int i, float f) {}\n" +
+						"            InnerMost(Outer Outer.this, float f) {}\n" +
+						"            InnerMost(Outer.Inner<K,V>.InnerMost<T> Outer.Inner.InnerMost.this, Object obj) {}\n" +
+						"            InnerMost(Inner<K,V> Outer.Inner.InnerMost.this, int i) {}\n" +
+						"            InnerMost(Outer.Inner<K, V> this, float f, int i) {}\n" +
+						"            InnerMost(Outer.Inner<K,V> Inner.this, long l) {}\n" +
+						"        }\n" +
+						"    }\n" +
+						"}\n"},
+						"----------\n" + 
+						"1. ERROR in Outer.java (at line 2)\n" + 
+						"	Outer(Outer Outer.this) {}\n" + 
+						"	                  ^^^^\n" + 
+						"Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+						"----------\n" + 
+						"2. ERROR in Outer.java (at line 3)\n" + 
+						"	Outer(Outer this, int i) {}\n" + 
+						"	            ^^^^\n" + 
+						"Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+						"----------\n" + 
+						"3. WARNING in Outer.java (at line 6)\n" + 
+						"	InnerMost(Outer.Inner this) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"Outer.Inner is a raw type. References to generic type Outer.Inner<K,V> should be parameterized\n" + 
+						"----------\n" + 
+						"4. ERROR in Outer.java (at line 6)\n" + 
+						"	InnerMost(Outer.Inner this) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"5. ERROR in Outer.java (at line 6)\n" + 
+						"	InnerMost(Outer.Inner this) {}\n" + 
+						"	                      ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Inner\n" + 
+						"----------\n" + 
+						"6. WARNING in Outer.java (at line 7)\n" + 
+						"	InnerMost(Outer.Inner Outer.Inner.this, int i, float f) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"Outer.Inner is a raw type. References to generic type Outer.Inner<K,V> should be parameterized\n" + 
+						"----------\n" + 
+						"7. ERROR in Outer.java (at line 7)\n" + 
+						"	InnerMost(Outer.Inner Outer.Inner.this, int i, float f) {}\n" + 
+						"	          ^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"8. ERROR in Outer.java (at line 7)\n" + 
+						"	InnerMost(Outer.Inner Outer.Inner.this, int i, float f) {}\n" + 
+						"	                      ^^^^^^^^^^^^^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Inner\n" + 
+						"----------\n" + 
+						"9. ERROR in Outer.java (at line 8)\n" + 
+						"	InnerMost(Outer Outer.this, float f) {}\n" + 
+						"	          ^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"10. ERROR in Outer.java (at line 8)\n" + 
+						"	InnerMost(Outer Outer.this, float f) {}\n" + 
+						"	                ^^^^^^^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Inner\n" + 
+						"----------\n" + 
+						"11. ERROR in Outer.java (at line 9)\n" + 
+						"	InnerMost(Outer.Inner<K,V>.InnerMost<T> Outer.Inner.InnerMost.this, Object obj) {}\n" + 
+						"	          ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>\n" + 
+						"----------\n" + 
+						"12. ERROR in Outer.java (at line 9)\n" + 
+						"	InnerMost(Outer.Inner<K,V>.InnerMost<T> Outer.Inner.InnerMost.this, Object obj) {}\n" + 
+						"	                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Inner\n" + 
+						"----------\n" + 
+						"13. ERROR in Outer.java (at line 10)\n" + 
+						"	InnerMost(Inner<K,V> Outer.Inner.InnerMost.this, int i) {}\n" + 
+						"	                     ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Inner\n" + 
+						"----------\n" + 
+						"14. ERROR in Outer.java (at line 11)\n" + 
+						"	InnerMost(Outer.Inner<K, V> this, float f, int i) {}\n" + 
+						"	                            ^^^^\n" + 
+						"The explicit 'this' parameter is expected to be qualified with Inner\n" + 
+						"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913c() {
+		this.runNegativeTest(
+				new String[] {
+						"Outer.java",
+						"public class Outer {\n" +
+						"    class Inner<K,V> {\n" +
+						"        class InnerMost<T> {\n" +
+						"            public void foo(Outer Outer.this) {}\n" +
+						"            public void foo(Inner<K,V> Inner.this, int i) {}\n" +
+						"            public void foo(InnerMost this, int i, int j) {}\n" +
+						"            public void foo(Inner.InnerMost<T> this, Object obj) {}\n" +
+						"            public void foo(InnerMost<T> this, float f) {}\n" +
+						"            public void foo(Inner<K,V>.InnerMost<T> this, long l) {}\n" +
+						"            public void foo(Outer.Inner<K,V>.InnerMost<T> this, float f, float ff) {}\n" +
+						"            public void foo(InnerMost<T> Outer.Inner.InnerMost.this, int i, float f) {}\n" +
+						"        }\n" +
+						"    }\n" +
+						"}\n"},
+						"----------\n" + 
+						"1. ERROR in Outer.java (at line 4)\n" + 
+						"	public void foo(Outer Outer.this) {}\n" + 
+						"	                ^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n" + 
+						"2. ERROR in Outer.java (at line 4)\n" + 
+						"	public void foo(Outer Outer.this) {}\n" + 
+						"	                      ^^^^^^^^^^\n" + 
+						"The explicit 'this' parameter for a method cannot have a qualifying name\n" + 
+						"----------\n" + 
+						"3. ERROR in Outer.java (at line 5)\n" + 
+						"	public void foo(Inner<K,V> Inner.this, int i) {}\n" + 
+						"	                ^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n" + 
+						"4. ERROR in Outer.java (at line 5)\n" + 
+						"	public void foo(Inner<K,V> Inner.this, int i) {}\n" + 
+						"	                           ^^^^^^^^^^\n" + 
+						"The explicit 'this' parameter for a method cannot have a qualifying name\n" + 
+						"----------\n" + 
+						"5. WARNING in Outer.java (at line 6)\n" + 
+						"	public void foo(InnerMost this, int i, int j) {}\n" + 
+						"	                ^^^^^^^^^\n" + 
+						"Outer.Inner.InnerMost is a raw type. References to generic type Outer.Inner<K,V>.InnerMost<T> should be parameterized\n" + 
+						"----------\n" + 
+						"6. ERROR in Outer.java (at line 6)\n" + 
+						"	public void foo(InnerMost this, int i, int j) {}\n" + 
+						"	                ^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n" + 
+						"7. ERROR in Outer.java (at line 7)\n" + 
+						"	public void foo(Inner.InnerMost<T> this, Object obj) {}\n" + 
+						"	                ^^^^^^^^^^^^^^^\n" + 
+						"The member type Outer.Inner.InnerMost<T> must be qualified with a parameterized type, since it is not static\n" + 
+						"----------\n" + 
+						"8. ERROR in Outer.java (at line 7)\n" + 
+						"	public void foo(Inner.InnerMost<T> this, Object obj) {}\n" + 
+						"	                ^^^^^^^^^^^^^^^\n" + 
+						"The declared type of the explicit 'this' parameter is expected to be Outer.Inner<K,V>.InnerMost<T>\n" + 
+						"----------\n" +
+						"9. ERROR in Outer.java (at line 11)\n" + 
+						"	public void foo(InnerMost<T> Outer.Inner.InnerMost.this, int i, float f) {}\n" + 
+						"	                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+						"The explicit 'this' parameter for a method cannot have a qualifying name\n" + 
+						"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383913
+	public void test0383913d() {
+		this.runNegativeTest(
+				new String[] {
+						"Outer.java",
+						"import java.lang.annotation.Target;\n" + 
+						"import static java.lang.annotation.ElementType.*;\n" + 
+						"public class Outer {\n" +
+						"    class Inner<K,V> {\n" +
+						"		public Inner(@Missing Outer Outer.this) {}\n" +
+						"        class InnerMost<T> {\n" +
+						"            public void bar() {\n" +
+						"                new AnonymousInner() {\n" +
+						"                    public void foobar(AnonymousInner this) {}\n" +
+						"                };\n" +
+						"            }\n" +
+						"            void bar(int i) {\n" +
+						"                class Local {\n" +
+						"                    public int hashCode(Local this, int k) { return 0; }\n" +
+						"                    public int hashCode(Outer.Local this) { return 0; }\n" +
+						"                }\n" +
+						"            }\n" +
+						"        }\n" +
+						"    }\n" +
+						"    static class StaticNested {\n" +
+						"        public StaticNested(@Marker Outer.StaticNested Outer.StaticNested.this) {}\n" +
+						"    }\n" +
+						"    public static void foo(@Marker Outer this) {}\n" +
+						"    public void foo(@Missing Outer this, int i) {}\n" +
+						"}\n" +
+						"interface AnonymousInner {\n" +
+						"    public void foobar(AnonymousInner this);\n" +
+						"}\n" +
+						"@Target(TYPE_USE)\n" + 
+						"@interface Marker {}",
+
+						"java/lang/annotation/ElementType.java",
+						"package java.lang.annotation;\n" +
+						"public enum ElementType {\n" +
+						"    TYPE,\n" +
+						"    FIELD,\n" +
+						"    METHOD,\n" +
+						"    PARAMETER,\n" +
+						"    CONSTRUCTOR,\n" +
+						"    LOCAL_VARIABLE,\n" +
+						"    ANNOTATION_TYPE,\n" +
+						"    PACKAGE,\n" +
+						"    TYPE_PARAMETER,\n" +
+						"    TYPE_USE\n" +
+						"}\n"
+					},
+							"----------\n" + 
+							"1. ERROR in Outer.java (at line 5)\n" + 
+							"	public Inner(@Missing Outer Outer.this) {}\n" + 
+							"	              ^^^^^^^\n" + 
+							"Missing cannot be resolved to a type\n" + 
+							"----------\n" + 
+							"2. ERROR in Outer.java (at line 9)\n" + 
+							"	public void foobar(AnonymousInner this) {}\n" + 
+							"	                                  ^^^^\n" + 
+							"Explicit \'this\' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+							"----------\n" + 
+							"3. ERROR in Outer.java (at line 15)\n" + 
+							"	public int hashCode(Outer.Local this) { return 0; }\n" + 
+							"	                    ^^^^^^^^^^^\n" + 
+							"Outer.Local cannot be resolved to a type\n" + 
+							"----------\n" + 
+							"4. ERROR in Outer.java (at line 21)\n" + 
+							"	public StaticNested(@Marker Outer.StaticNested Outer.StaticNested.this) {}\n" + 
+							"	                    ^^^^^^^\n" + 
+							"Type annotations are not allowed on type names used to access static members\n" + 
+							"----------\n" + 
+							"5. ERROR in Outer.java (at line 21)\n" + 
+							"	public StaticNested(@Marker Outer.StaticNested Outer.StaticNested.this) {}\n" + 
+							"	                                                                  ^^^^\n" + 
+							"Explicit \'this\' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+							"----------\n" + 
+							"6. ERROR in Outer.java (at line 23)\n" + 
+							"	public static void foo(@Marker Outer this) {}\n" + 
+							"	                                     ^^^^\n" + 
+							"Explicit \'this\' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors\n" + 
+							"----------\n" + 
+							"7. ERROR in Outer.java (at line 24)\n" + 
+							"	public void foo(@Missing Outer this, int i) {}\n" + 
+							"	                 ^^^^^^^\n" + 
+							"Missing cannot be resolved to a type\n" + 
+							"----------\n");
+	}
+	public void test0383908() {
+		this.runNegativeTest(
+				new String[]{"X.java",
+				"public class X { \n" +
+				"	void foo(X this) {}\n" +
+				"   void foo() {}\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	void foo(Y this) {}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		new Y().foo();\n" +
+				"	}\n" +
+				"}"}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	void foo(X this) {}\n" + 
+				"	     ^^^^^^^^^^^\n" + 
+				"Duplicate method foo() in type X\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	void foo() {}\n" + 
+				"	     ^^^^^\n" + 
+				"Duplicate method foo() in type X\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on nested package names.
+	public void test383596() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" +
+				"public class X {\n" +
+				"}"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	           ^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 1)\n" + 
+			"	package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	                        ^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 1)\n" + 
+			"	package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	                                           ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on nested package names.
+	public void test383596a() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"@Marker package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" +
+				"public class X {\n" +
+				"}"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	@Marker package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	^^^^^^^\n" + 
+			"Package annotations must be in file package-info.java\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 1)\n" + 
+			"	@Marker package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	                   ^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 1)\n" + 
+			"	@Marker package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	                                ^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 1)\n" + 
+			"	@Marker package p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	                                                   ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on nested import names.
+	public void test039b() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" +
+				"public class X {\n" +
+				"}"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	       ^\n" + 
+			"The import p cannot be resolved\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	          ^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	                       ^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z. z2;\n" + 
+			"	                                          ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on nested import names.
+	public void test383596b() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" +
+				"public class X {\n" +
+				"}"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+			"	       ^\n" + 
+			"The import p cannot be resolved\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+			"	          ^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+			"	                       ^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 1)\n" + 
+			"	import p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+			"	                                          ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on nested static import names.
+	public void test041() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.z2;\n" +
+						"public class X {\n" +
+						"}"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.z2;\n" + 
+				"	              ^\n" + 
+				"The import p cannot be resolved\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.z2;\n" + 
+				"	                 ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.z2;\n" + 
+				"	                              ^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.z2;\n" + 
+				"	                                                 ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on nested static import names.
+	public void test042() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" +
+						"public class X {\n" +
+						"}"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+				"	              ^\n" + 
+				"The import p cannot be resolved\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+				"	                 ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+				"	                              ^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 1)\n" + 
+				"	import static p. @Marker q.x. @Marker @Marker y. @Marker @Marker @Marker z.*;\n" + 
+				"	                                                 ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on Qualified name in explicit this.
+	// Much water has flown under the bridge. The grammar itself does not allow annotations in qualified name in explicit this.
+	// We now use the production UnannotatableName instead of plain Name. 
+	public void test043() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"   class Y {\n" +
+			    "       class Z {\n" +
+				"           Z(X. @Marker Y  Y.this) {\n" +
+				"           }\n" +
+				"       }\n" +
+				"    }\n" +
+				"}"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	Z(X. @Marker Y  Y.this) {\n" + 
+			"	      ^^^^^^\n" + 
+			"Marker cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on Qualified name in explicit constructor call -- super form
+	public void test044() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	static X x;\n" +
+						"	public class InnerBar {\n" +
+						"	}\n" +
+						"	public class SubInnerBar extends InnerBar {\n" +
+						"		SubInnerBar() {\n" +
+						"			X.@Marker x. @Marker @Marker @Marker x.super();\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	X.@Marker x. @Marker @Marker @Marker x.super();\n" + 
+				"	  ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 7)\n" + 
+				"	X.@Marker x. @Marker @Marker @Marker x.super();\n" + 
+				"	             ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 7)\n" + 
+				"	X.@Marker x. @Marker @Marker @Marker x.super();\n" + 
+				"	                                     ^\n" + 
+				"The static field X.x should be accessed in a static way\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on Qualified name in explicit constructor call, super form with explicit type arguments
+	public void test045() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	static X x;\n" +
+						"	public class InnerBar {\n" +
+						"	}\n" +
+						"	public class SubInnerBar extends InnerBar {\n" +
+						"		SubInnerBar() {\n" +
+						"			X.@Marker x. @Marker @Marker @Marker x.<String>super();\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	X.@Marker x. @Marker @Marker @Marker x.<String>super();\n" + 
+				"	  ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 7)\n" + 
+				"	X.@Marker x. @Marker @Marker @Marker x.<String>super();\n" + 
+				"	             ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 7)\n" + 
+				"	X.@Marker x. @Marker @Marker @Marker x.<String>super();\n" + 
+				"	                                     ^\n" + 
+				"The static field X.x should be accessed in a static way\n" + 
+				"----------\n" + 
+				"4. WARNING in X.java (at line 7)\n" + 
+				"	X.@Marker x. @Marker @Marker @Marker x.<String>super();\n" + 
+				"	                                        ^^^^^^\n" + 
+				"Unused type arguments for the non generic constructor X.InnerBar() of type X.InnerBar; it should not be parameterized with arguments <String>\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on Qualified name in explicit constructor call - this form
+	public void test046() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	Bar bar;\n" +
+						"	class Bar {\n" +
+						"		//static Bar x;\n" +
+						"		public class InnerBar {\n" +
+						"			InnerBar(Bar x) {\n" +
+						"			}\n" +
+						"		}\n" +
+						"		public class SubInnerBar extends InnerBar {\n" +
+						"			SubInnerBar() {\n" +
+						"				X. @Marker bar.this();\n" +
+						"			}\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 11)\n" + 
+				"	X. @Marker bar.this();\n" + 
+				"	^^^^^^^^^^^^^^\n" + 
+				"Illegal enclosing instance specification for type X.Bar.SubInnerBar\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 11)\n" + 
+				"	X. @Marker bar.this();\n" + 
+				"	^^^^^^^^^^^^^^\n" + 
+				"Cannot make a static reference to the non-static field X.bar\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 11)\n" + 
+				"	X. @Marker bar.this();\n" + 
+				"	   ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+					"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on Qualified name in explicit constructor call, this form with explicit type arguments
+	public void test047() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	Bar bar;\n" +
+						"	class Bar {\n" +
+						"		//static Bar x;\n" +
+						"		public class InnerBar {\n" +
+						"			InnerBar(Bar x) {\n" +
+						"			}\n" +
+						"		}\n" +
+						"		public class SubInnerBar extends InnerBar {\n" +
+						"			SubInnerBar() {\n" +
+						"				X.@Marker bar.<String>this();\n" +
+						"			}\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 11)\n" + 
+				"	X.@Marker bar.<String>this();\n" + 
+				"	^^^^^^^^^^^^^\n" + 
+				"Illegal enclosing instance specification for type X.Bar.SubInnerBar\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 11)\n" + 
+				"	X.@Marker bar.<String>this();\n" + 
+				"	^^^^^^^^^^^^^\n" + 
+				"Cannot make a static reference to the non-static field X.bar\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 11)\n" + 
+				"	X.@Marker bar.<String>this();\n" + 
+				"	  ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"4. WARNING in X.java (at line 11)\n" + 
+				"	X.@Marker bar.<String>this();\n" + 
+				"	               ^^^^^^\n" + 
+				"Unused type arguments for the non generic constructor X.Bar.SubInnerBar() of type X.Bar.SubInnerBar; it should not be parameterized with arguments <String>\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations on Qualified name in PrimaryNoNewArray
+	public void test048() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	X bar;\n" +
+						"	private void foo(X x) {\n" +
+						"		System.out.println((x. @Marker bar));\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	System.out.println((x. @Marker bar));\n" + 
+				"	                       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified this.
+	public void test049() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	class Y {\n" +
+						"		class Z {\n" +
+						"			void foo() {\n" +
+						"				Object o = X.@Marker Y.this; \n" +
+						"			}\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	Object o = X.@Marker Y.this; \n" + 
+				"	             ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" +
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified super.
+	public void test050() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	public class Y  {\n" +
+						"		public void foo() {\n" +
+						"			X. @Marker Y.super.hashCode();\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	X. @Marker Y.super.hashCode();\n" + 
+				"	   ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in Name.class
+	public void test051() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	public class Y  {\n" +
+						"		public void foo() {\n" +
+						"			Class<?> c = X. @Marker @Illegal Y.class;\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	Class<?> c = X. @Marker @Illegal Y.class;\n" + 
+				"	                ^^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in Name [].class.
+	public void test052() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	public class Y  {\n" +
+						"		public void foo() {\n" +
+						"			Class<?> c = X. @Marker @Another Y @YetMore [].class;\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	Class<?> c = X. @Marker @Another Y @YetMore [].class;\n" + 
+				"	                ^^^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	Class<?> c = X. @Marker @Another Y @YetMore [].class;\n" + 
+				"	                                   ^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in binary expressions with qualified names.
+	public void test053() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"public class X {\n" +
+						"    static int x;\n" +
+						"    static boolean fb;\n" +
+						"	 public void foo(boolean b) {\n" +
+						"		x = (X.@Marker x * 10);\n" +
+						"		x = (X.@Marker x / 10);\n" +
+						"		x = (X.@Marker x % 10);\n" +
+						"		x = (X.@Marker x + 10);\n" +
+						"		x = (X.@Marker x - 10);\n" +
+						"		x = (X.@Marker x << 10);\n" +
+						"		x = (X.@Marker x >> 10);\n" +
+						"		x = (X.@Marker x >>> 10);\n" +
+						"		b = (X.@Marker x < 10);\n" +
+						"		b = (X.@Marker x > 10);\n" +
+						"		b = (X.@Marker x <= 10);\n" +
+						"		b = (X.@Marker x >= 10);\n" +
+						"		b = (X.@Marker x instanceof Object);\n" +
+						"		b = (X.@Marker x == 10);\n" +
+						"		b = (X.@Marker x != 10);\n" +
+						"		x = (X.@Marker x & 10);\n" +
+						"		x = (X.@Marker x ^ 10);\n" +
+						"		x = (X.@Marker x | 10);\n" +
+						"		fb = (X.@Marker fb && true);\n" +
+						"		fb = (X.@Marker fb || true);\n" +
+						"		x = (X.@Marker fb ? 10 : 10);\n" +
+						"	 }\n" +
+						"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	x = (X.@Marker x * 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 6)\n" + 
+				"	x = (X.@Marker x / 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 7)\n" + 
+				"	x = (X.@Marker x % 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 8)\n" + 
+				"	x = (X.@Marker x + 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 9)\n" + 
+				"	x = (X.@Marker x - 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 10)\n" + 
+				"	x = (X.@Marker x << 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 11)\n" + 
+				"	x = (X.@Marker x >> 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 12)\n" + 
+				"	x = (X.@Marker x >>> 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 13)\n" + 
+				"	b = (X.@Marker x < 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"10. ERROR in X.java (at line 14)\n" + 
+				"	b = (X.@Marker x > 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"11. ERROR in X.java (at line 15)\n" + 
+				"	b = (X.@Marker x <= 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"12. ERROR in X.java (at line 16)\n" + 
+				"	b = (X.@Marker x >= 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"13. ERROR in X.java (at line 17)\n" + 
+				"	b = (X.@Marker x instanceof Object);\n" + 
+				"	    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Incompatible conditional operand types int and Object\n" + 
+				"----------\n" + 
+				"14. ERROR in X.java (at line 17)\n" + 
+				"	b = (X.@Marker x instanceof Object);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"15. ERROR in X.java (at line 18)\n" + 
+				"	b = (X.@Marker x == 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"16. ERROR in X.java (at line 19)\n" + 
+				"	b = (X.@Marker x != 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"17. ERROR in X.java (at line 20)\n" + 
+				"	x = (X.@Marker x & 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"18. ERROR in X.java (at line 21)\n" + 
+				"	x = (X.@Marker x ^ 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"19. ERROR in X.java (at line 22)\n" + 
+				"	x = (X.@Marker x | 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"20. ERROR in X.java (at line 23)\n" + 
+				"	fb = (X.@Marker fb && true);\n" + 
+				"	        ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"21. ERROR in X.java (at line 24)\n" + 
+				"	fb = (X.@Marker fb || true);\n" + 
+				"	        ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"22. ERROR in X.java (at line 25)\n" + 
+				"	x = (X.@Marker fb ? 10 : 10);\n" + 
+				"	       ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in annotations with qualified names.
+	   This test is disabled. Now the grammar itself forbids annotations in the said place by using the production
+	   AnnotationName ::= '@' UnannotatableName. We don't want to add tests that will be fragile and unstable due to 
+	   syntax. If a construct is provably not parsed at the grammar level, that ought to be good enough.
+	*/
+	public void test054() throws Exception {
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified names used as annotation values.
+	public void test055() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"@interface Annot {\n" +
+					"	String bar();\n" +
+					"}\n" +
+					"@Annot(bar = X. @Marker s)\n" +
+					"public class X {\n" +
+					"	final static String s = \"\";\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	@Annot(bar = X. @Marker s)\n" + 
+				"	                ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified names that are postfix expressions.
+	public void test056() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    static int x;\n" +
+					"    int foo() {\n" +
+					"        return X.@Marker x;\n" +
+					"    }\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	return X.@Marker x;\n" + 
+				"	         ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified names used in array access.
+	public void test057() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    static int x[];\n" +
+					"    int foo() {\n" +
+					"        return X.@Marker x[0];\n" +
+					"    }\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	return X.@Marker x[0];\n" + 
+				"	         ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified name with type arguments used in method invocation.
+	public void test058() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    static X x;\n" +
+					"    int foo() {\n" +
+					"        return X.@Marker x.<String> foo();\n" +
+					"    }\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	return X.@Marker x.<String> foo();\n" + 
+				"	         ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 4)\n" + 
+				"	return X.@Marker x.<String> foo();\n" + 
+				"	                    ^^^^^^\n" + 
+				"Unused type arguments for the non generic method foo() of type X; it should not be parameterized with arguments <String>\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified name used in method invocation.
+	public void test059() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    static X x;\n" +
+					"    int foo() {\n" +
+					"        return X.@Marker x. @Blah foo();\n" +
+					"    }\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	return X.@Marker x. @Blah foo();\n" + 
+				"	         ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	return X.@Marker x. @Blah foo();\n" + 
+				"	                    ^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified name used in class instance creation
+	public void test060() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    static Y y;\n" +
+					"    class Y {\n" +
+					"        class Z {\n" +
+					"            void foo() {\n" +
+					"                Z z = X. @Marker y.new Z();\n" +
+					"            }\n" +
+					"        }\n" +
+					"    }\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	Z z = X. @Marker y.new Z();\n" + 
+				"	         ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596 -- reject annotations in qualified name used in class instance creation
+	public void test061() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    static X x;\n" +
+					"    X getX() {\n" +
+					"        return (X.@Marker x);\n" +
+					"    }\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	return (X.@Marker x);\n" + 
+				"	          ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	public void test062() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	public <T> @Marker Object foo() {\n" +
+					"	}\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	public <T> @Marker Object foo() {\n" + 
+				"	           ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n");
+	}
+	public void test063() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	Object o = @Marker int.class;\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	Object o = @Marker int.class;\n" + 
+				"	           ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	public void test064() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"@interface X {\n" +
+					"	<T> @Marker String foo();\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	<T> @Marker String foo();\n" + 
+				"	    ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	<T> @Marker String foo();\n" + 
+				"	                   ^^^^^\n" + 
+				"Annotation attributes cannot be generic\n" + 
+				"----------\n");
+	}
+	public void test065() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	Object o = new <String> @Marker X();\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. WARNING in X.java (at line 2)\n" + 
+				"	Object o = new <String> @Marker X();\n" + 
+				"	                ^^^^^^\n" + 
+				"Unused type arguments for the non generic constructor X() of type X; it should not be parameterized with arguments <String>\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	Object o = new <String> @Marker X();\n" + 
+				"	                        ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n");
+	}
+	public void test066() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	Object o = new X().new <String> @Marker X();\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	Object o = new X().new <String> @Marker X();\n" + 
+				"	                                ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	Object o = new X().new <String> @Marker X();\n" + 
+				"	                                ^^^^^^^^^\n" + 
+				"X.X cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test067() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	Object o = x.new <String> @Marker X() {};\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	Object o = x.new <String> @Marker X() {};\n" + 
+				"	           ^\n" + 
+				"x cannot be resolved to a variable\n" + 
+				"----------\n");
+	}
+	public void test068() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	Object o = new <String> @Marker X() {};\n" +
+					"}\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. WARNING in X.java (at line 2)\n" + 
+				"	Object o = new <String> @Marker X() {};\n" + 
+				"	                ^^^^^^\n" + 
+				"Unused type arguments for the non generic constructor X() of type X; it should not be parameterized with arguments <String>\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	Object o = new <String> @Marker X() {};\n" + 
+				"	                        ^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385293
+	public void test069() throws Exception {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"class X<final T> {\n" +
+					"	Object o = (Object) (public X<final String>) null;\n" + 
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	class X<final T> {\n" + 
+				"	        ^^^^^\n" + 
+				"Syntax error on token \"final\", delete this token\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	Object o = (Object) (public X<final String>) null;\n" + 
+				"	                     ^^^^^^\n" + 
+				"Syntax error on token \"public\", delete this token\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 2)\n" + 
+				"	Object o = (Object) (public X<final String>) null;\n" + 
+				"	                              ^^^^^\n" + 
+				"Syntax error on token \"final\", delete this token\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=388085
+	public void test0388085() {
+		this.runNegativeTest(
+				new String[] {"X.java",
+						"class X {\n" +
+						"	public void main() {\n" +
+						"		final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;" +
+						"		one = null;\n" +
+						"	}\n" +
+						"}\n" +
+						"class One<R> {}\n" +
+						"class Two<S> {}\n" +
+						"class Three<T> {}\n" +
+						"class Four<U, V> {}\n"},
+							"----------\n" + 
+							"1. ERROR in X.java (at line 3)\n" + 
+							"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+							"	           ^^^^^^\n" + 
+							"Marker cannot be resolved to a type\n" + 
+							"----------\n" + 
+							"2. ERROR in X.java (at line 3)\n" + 
+							"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+							"	                                 ^^^^^^\n" + 
+							"Marker cannot be resolved to a type\n" + 
+							"----------\n" + 
+							"3. ERROR in X.java (at line 3)\n" + 
+							"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+							"	                                                                      ^^^^^^\n" + 
+							"Marker cannot be resolved to a type\n" + 
+							"----------\n" + 
+							"4. ERROR in X.java (at line 3)\n" + 
+							"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+							"	                                                                                              ^^^^^^\n" + 
+							"Marker cannot be resolved to a type\n" + 
+							"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=388085
+	public void test0388085a() {
+		this.runNegativeTest(
+				new String[] {"X.java",
+						"import java.lang.annotation.Target;\n" + 
+						"import static java.lang.annotation.ElementType.*;\n" + 
+						"class X {\n" +
+						"	public void main() {\n" +
+						"		final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;" +
+						"		one = null;\n" +
+						"	}\n" +
+						"}\n" +
+						"class One<R> {}\n" +
+						"class Two<S> {}\n" +
+						"class Three<T> {}\n" +
+						"class Four<U, V> {}\n" +
+						"@interface Marker {}"},
+						"----------\n" + 
+						"1. ERROR in X.java (at line 5)\n" + 
+						"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+						"	          ^^^^^^^\n" + 
+						"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+						"----------\n" + 
+						"2. ERROR in X.java (at line 5)\n" + 
+						"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+						"	                                ^^^^^^^\n" + 
+						"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+						"----------\n" + 
+						"3. ERROR in X.java (at line 5)\n" + 
+						"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+						"	                                                                     ^^^^^^^\n" + 
+						"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+						"----------\n" + 
+						"4. ERROR in X.java (at line 5)\n" + 
+						"	final One<@Marker ? extends Two<@Marker ? super Three<? extends Four<@Marker ? super String, @Marker ? extends Object>>>> one = null;		one = null;\n" + 
+						"	                                                                                             ^^^^^^^\n" + 
+						"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+						"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=390882
+	public void test0390882() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.Target;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"public class X {    \n " +
+					"	Object o1 = (@Marker java.lang.Integer) null;   // 1. Right.\n" +
+					"	Object o2 = (java. @Marker lang.Integer) null;  // 2. Wrong.\n" +
+					"	Object o3 = (java.lang. @Marker Integer) null;  // 3. Legal.\n" +
+					"	public void foo(java. @Marker lang.Integer arg) {}\n" +
+					"	public void bar(java.lang. @Marker Integer arg) {}\n" +
+					"	public void foobar(@Marker java.lang.Integer arg) {}\n" +
+					"}\n" +
+					"@Target(TYPE_USE)\n" +
+					"@interface Marker {}\n",
+
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n" +
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	Object o1 = (@Marker java.lang.Integer) null;   // 1. Right.\n" + 
+				"	             ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	Object o2 = (java. @Marker lang.Integer) null;  // 2. Wrong.\n" + 
+				"	                   ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 7)\n" + 
+				"	public void foo(java. @Marker lang.Integer arg) {}\n" + 
+				"	                      ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 9)\n" + 
+				"	public void foobar(@Marker java.lang.Integer arg) {}\n" + 
+				"	                   ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n");
+	}
+	public void test0390882a() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.Target;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"public class X {    \n " +
+					"	Object o1 = (java. @Marker @Annot lang.Integer) null;  // 1. Wrong.\n" +
+					"	Object o2 = (java.lang. @Marker @Annot Integer) null;  // 2. Legal\n" +
+					"	Object o3 = (java.@lang lang) null;  // 3. Wrong.\n" +
+					"}\n" +
+					"@Target(TYPE_USE)\n" +
+					"@interface Marker {}\n" +
+					"@Target(TYPE_USE)\n" +
+					"@interface Annot {}",
+
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n" +
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	Object o1 = (java. @Marker @Annot lang.Integer) null;  // 1. Wrong.\n" + 
+				"	                   ^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 6)\n" + 
+				"	Object o3 = (java.@lang lang) null;  // 3. Wrong.\n" + 
+				"	             ^^^^^^^^^^^^^^^\n" + 
+				"java.lang cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void test0390882b() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.Target;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"public class X {    \n " +
+					"	Object o1 = (@Marker @Annot java.util.List<String>) null; 	// 1. Wrong.\n" +
+					"	Object o2 = (java. @Marker @Annot lang.Integer[]) null;		// 2. Wrong.\n" +
+					"	Object o3 = (@Marker @Annot java.util.List<String>[]) null; // 3. Wrong.\n" +
+					"	Object o4 = (java.util.List<String> @Marker @Annot []) null; // 4. Right.\n" +
+					"	Object o5 = (java.lang.Integer @Marker @Annot []) null;	// 5. Right.\n" +
+					"}\n" +
+					"@Target(TYPE_USE)\n" +
+					"@interface Marker {}\n" +
+					"@Target(TYPE_USE)\n" +
+					"@interface Annot {}",
+
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n" +
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	Object o1 = (@Marker @Annot java.util.List<String>) null; 	// 1. Wrong.\n" + 
+				"	             ^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	Object o2 = (java. @Marker @Annot lang.Integer[]) null;		// 2. Wrong.\n" + 
+				"	                   ^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 6)\n" + 
+				"	Object o3 = (@Marker @Annot java.util.List<String>[]) null; // 3. Wrong.\n" + 
+				"	             ^^^^^^^^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385137
+	public void test0385137() {
+		this.runNegativeTest(
+				new String[]{ "A.java",
+				"package p;" +
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"public class A<T> { \n" +
+				"	static class B<T> {" +
+				"		static class C<K, V> {" +
+				"		}	" +
+				"	}\n" +
+				"   public void foo() {\n" +
+				"		Object o = (@Marker @Annot A.@Marker B.@Marker C) null;\n" +
+				"		Object o2 = (@Marker p.@Marker A.@Marker B.@Marker C) null;\n" +
+				"   }\n" +
+				"}\n" +
+				"@Target(TYPE_USE)\n" + 
+				"@interface Marker {}\n" +
+				"@Target(TYPE_USE)\n" + 
+				"@interface Annot {}\n",
+
+				"java/lang/annotation/ElementType.java",
+				"package java.lang.annotation;\n" +
+				"public enum ElementType {\n" +
+				"    TYPE,\n" +
+				"    FIELD,\n" +
+				"    METHOD,\n" +
+				"    PARAMETER,\n" +
+				"    CONSTRUCTOR,\n" +
+				"    LOCAL_VARIABLE,\n" +
+				"    ANNOTATION_TYPE,\n" +
+				"    PACKAGE,\n" +
+				"    TYPE_PARAMETER,\n" +
+				"    TYPE_USE\n" +
+				"}\n"},
+					"----------\n" + 
+					"1. ERROR in A.java (at line 6)\n" + 
+					"	Object o = (@Marker @Annot A.@Marker B.@Marker C) null;\n" + 
+					"	            ^^^^^^^^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n" + 
+					"2. WARNING in A.java (at line 6)\n" + 
+					"	Object o = (@Marker @Annot A.@Marker B.@Marker C) null;\n" + 
+					"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+					"A.B.C is a raw type. References to generic type A<T>.B<T>.C<K,V> should be parameterized\n" + 
+					"----------\n" + 
+					"3. ERROR in A.java (at line 6)\n" + 
+					"	Object o = (@Marker @Annot A.@Marker B.@Marker C) null;\n" + 
+					"	                             ^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n" + 
+					"4. ERROR in A.java (at line 7)\n" + 
+					"	Object o2 = (@Marker p.@Marker A.@Marker B.@Marker C) null;\n" + 
+					"	             ^^^^^^^\n" + 
+					"Syntax error, type annotations are illegal here\n" + 
+					"----------\n" + 
+					"5. WARNING in A.java (at line 7)\n" + 
+					"	Object o2 = (@Marker p.@Marker A.@Marker B.@Marker C) null;\n" + 
+					"	             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+					"A.B.C is a raw type. References to generic type A<T>.B<T>.C<K,V> should be parameterized\n" + 
+					"----------\n" + 
+					"6. ERROR in A.java (at line 7)\n" + 
+					"	Object o2 = (@Marker p.@Marker A.@Marker B.@Marker C) null;\n" + 
+					"	                       ^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n" + 
+					"7. ERROR in A.java (at line 7)\n" + 
+					"	Object o2 = (@Marker p.@Marker A.@Marker B.@Marker C) null;\n" + 
+					"	                                 ^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n");
+	}
+	public void test0385137a() {
+		this.runNegativeTest(
+				new String[]{"A.java",
+				"package p;" +
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"public class A { \n" +
+				"	static class B<T> {" +
+				"		static class C<K, V> {" +
+				"		}	" +
+				"	}\n" +
+				"   public void foo() {\n" +
+				"		Object o1 = (@Marker p.@Marker A.@Marker B.@Marker C[]) null;\n" +
+				"		Object o2 = (@Marker @Annot A.@Annot B.C<Integer, String>) null;\n" +
+				"		Object o5 = (@Marker @Annot A.B<String>[]) null;\n" +
+				"   }\n" +
+				"}\n" +
+				"@Target(TYPE_USE)\n" + 
+				"@interface Marker {}\n" +
+				"@Target(TYPE_USE)\n" + 
+				"@interface Annot {}\n",
+
+				"java/lang/annotation/ElementType.java",
+				"package java.lang.annotation;\n" +
+				"public enum ElementType {\n" +
+				"    TYPE,\n" +
+				"    FIELD,\n" +
+				"    METHOD,\n" +
+				"    PARAMETER,\n" +
+				"    CONSTRUCTOR,\n" +
+				"    LOCAL_VARIABLE,\n" +
+				"    ANNOTATION_TYPE,\n" +
+				"    PACKAGE,\n" +
+				"    TYPE_PARAMETER,\n" +
+				"    TYPE_USE\n" +
+				"}\n",
+				},
+				"----------\n" + 
+					"1. ERROR in A.java (at line 6)\n" + 
+					"	Object o1 = (@Marker p.@Marker A.@Marker B.@Marker C[]) null;\n" + 
+					"	             ^^^^^^^\n" + 
+					"Syntax error, type annotations are illegal here\n" + 
+					"----------\n" + 
+					"2. ERROR in A.java (at line 6)\n" + 
+					"	Object o1 = (@Marker p.@Marker A.@Marker B.@Marker C[]) null;\n" + 
+					"	                       ^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n" + 
+					"3. ERROR in A.java (at line 6)\n" + 
+					"	Object o1 = (@Marker p.@Marker A.@Marker B.@Marker C[]) null;\n" + 
+					"	                                 ^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n" + 
+					"4. ERROR in A.java (at line 7)\n" + 
+					"	Object o2 = (@Marker @Annot A.@Annot B.C<Integer, String>) null;\n" + 
+					"	             ^^^^^^^^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n" + 
+					"5. ERROR in A.java (at line 7)\n" + 
+					"	Object o2 = (@Marker @Annot A.@Annot B.C<Integer, String>) null;\n" + 
+					"	                              ^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n" + 
+					"6. ERROR in A.java (at line 8)\n" + 
+					"	Object o5 = (@Marker @Annot A.B<String>[]) null;\n" + 
+					"	             ^^^^^^^^^^^^^^\n" + 
+					"Type annotations are not allowed on type names used to access static members\n" + 
+					"----------\n");
+	}
+	public void testBug391196() {
+		this.runNegativeTest(
+				new String[]{
+					"p/Bug391196.java",
+					"package p;\n" +
+					"public class Bug391196 {\n" +
+					"	@Marker\n" +
+					"	public class X<@Marker @Marker2 T> {\n" +
+					"		@Marker @Marker2 X(@Marker int i) {}\n" +
+					"		@Unresolved X() {}\n" +
+					"	}\n" +
+					"	@Marker\n" +
+					"	enum Color {RED, BLUE}\n" +
+					"	@Marker\n" +
+					"	interface Inter {}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker {}\n" + 
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker2 {}\n" + 
+					"}\n",
+					"java/lang/annotation/ElementType.java",
+					"package java.lang.annotation;\n" +
+					"public enum ElementType {\n" +
+					"    TYPE,\n" +
+					"    FIELD,\n" +
+					"    METHOD,\n" +
+					"    PARAMETER,\n" +
+					"    CONSTRUCTOR,\n" +
+					"    LOCAL_VARIABLE,\n" +
+					"    ANNOTATION_TYPE,\n" +
+					"    PACKAGE,\n" +
+					"    TYPE_PARAMETER,\n" +
+					"    TYPE_USE\n" +
+					"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in p\\Bug391196.java (at line 6)\n" + 
+				"	@Unresolved X() {}\n" + 
+				"	 ^^^^^^^^^^\n" + 
+				"Unresolved cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void testBug391315() {
+		this.runNegativeTest(
+				new String[]{
+				"X.java",
+				"class X<T> {\n" +
+				"	X<@Marker ?> l;\n" +
+				"	X<@Marker2 ?> l2;\n" +
+				"	X<@Marker3 ?> l3;\n" +
+				"	class Y {\n" +
+				"		void Y1(Y this) {}\n" +
+				"	}\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n" +
+				"@interface Marker3 {}\n",
+				"java/lang/annotation/ElementType.java",
+				"package java.lang.annotation;\n" +
+				"public enum ElementType {\n" +
+				"    TYPE,\n" +
+				"    FIELD,\n" +
+				"    METHOD,\n" +
+				"    PARAMETER,\n" +
+				"    CONSTRUCTOR,\n" +
+				"    LOCAL_VARIABLE,\n" +
+				"    ANNOTATION_TYPE,\n" +
+				"    PACKAGE,\n" +
+				"    TYPE_PARAMETER,\n" +
+				"    TYPE_USE\n" +
+				"}\n"},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	X<@Marker ?> l;\n" + 
+				"	  ^^^^^^^\n" + 
+				"The annotation @Marker is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	X<@Marker3 ?> l3;\n" + 
+				"	  ^^^^^^^^\n" + 
+				"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+				"----------\n");
+	}
+	public void testBug391315a() {
+		this.runNegativeTest(
+				new String[]{
+				"X.java",
+				"public class X<@Marker T> {\n" +
+				"	@Marker T t;\n" +
+				"	T t2 = (@Marker T) null;\n" +
+				"}\n" +
+				"class X2<@Marker2 T> {\n" +
+				"	@Marker2 T t;\n" +
+				"	T t2 = (@Marker2 T) null;\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+				"@interface Marker2 {}",
+				"java/lang/annotation/ElementType.java",
+				"package java.lang.annotation;\n" +
+				"public enum ElementType {\n" +
+				"    TYPE,\n" +
+				"    FIELD,\n" +
+				"    METHOD,\n" +
+				"    PARAMETER,\n" +
+				"    CONSTRUCTOR,\n" +
+				"    LOCAL_VARIABLE,\n" +
+				"    ANNOTATION_TYPE,\n" +
+				"    PACKAGE,\n" +
+				"    TYPE_PARAMETER,\n" +
+				"    TYPE_USE\n" +
+				"}\n"},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 6)\n" + 
+				"	@Marker2 T t;\n" + 
+				"	^^^^^^^^\n" + 
+				"The annotation @Marker2 is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 7)\n" + 
+				"	T t2 = (@Marker2 T) null;\n" + 
+				"	        ^^^^^^^^\n" + 
+				"The annotation @Marker2 is disallowed for this location\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391500
+	public void testBug391500() {
+		this.runNegativeTest(
+				new String[]{
+				"X.java",
+				"public class X {\n" +
+				"	class Y {\n" +
+				"		class Z {\n" +
+				"		}\n" +
+				"		Z z1 = new @Marker X().new @Marker Y().new @Marker Z();\n" +
+				"		Z z3 = new @Marker Z(){};\n" +
+				"	};\n" +
+				"}\n"},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	Z z1 = new @Marker X().new @Marker Y().new @Marker Z();\n" + 
+				"	            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	Z z1 = new @Marker X().new @Marker Y().new @Marker Z();\n" + 
+				"	                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	Z z1 = new @Marker X().new @Marker Y().new @Marker Z();\n" + 
+				"	                                            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 6)\n" + 
+				"	Z z3 = new @Marker Z(){};\n" + 
+				"	            ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	public void testBug391464() {
+		this.runNegativeTest(
+				new String[]{
+				"X.java",
+				"public class X<T> {\n" +
+				"	public void foo() {\n" +
+				"		Object o = (X @Marker []) null;\n" +
+				"		o = (java.lang.String @Marker []) null;\n" +
+				"		o = (X<String> @Marker []) null;\n" +
+				"		o = (java.util.List<String> @Marker []) null;\n" +
+				"		if (o == null) return;\n" +
+				"	}" +
+				"}\n"},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	Object o = (X @Marker []) null;\n" + 
+				"	               ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	o = (java.lang.String @Marker []) null;\n" + 
+				"	                       ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	o = (X<String> @Marker []) null;\n" + 
+				"	                ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 6)\n" + 
+				"	o = (java.util.List<String> @Marker []) null;\n" + 
+				"	                             ^^^^^^\n" + 
+				"Marker cannot be resolved to a type\n" + 
+				"----------\n");
+	}	
+	public void testBug391464_2() {
+		this.runNegativeTest(
+				new String[]{
+				"X.java",
+				"public class X  {\n" +
+				"	class Y {\n" +
+				"		class Z {}\n" +
+				"	}\n" +
+				"	@M X.@M Y.@Unreported Z z = null;\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface M {\n" +
+				"}\n",
+				
+				"java/lang/annotation/ElementType.java",
+				"package java.lang.annotation;\n" +
+				"public enum ElementType {\n" +
+				"    TYPE,\n" +
+				"    FIELD,\n" +
+				"    METHOD,\n" +
+				"    PARAMETER,\n" +
+				"    CONSTRUCTOR,\n" +
+				"    LOCAL_VARIABLE,\n" +
+				"    ANNOTATION_TYPE,\n" +
+				"    PACKAGE,\n" +
+				"    TYPE_PARAMETER,\n" +
+				"    TYPE_USE\n" +
+				"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	@M X.@M Y.@Unreported Z z = null;\n" + 
+				"	           ^^^^^^^^^^\n" + 
+				"Unreported cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391108
+	public void testBug391108() {
+		this.runNegativeTest(
+				new String[]{
+						"X.java",
+						"public class X {\n" +
+						"	@Marker @Marker2 @Marker3 public void foo() {}\n" +
+						"	@Marker @Marker2 @Marker3 void foo2() {}\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.METHOD)\n" +
+						"@interface Marker2 {}\n" +
+						"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE_USE, java.lang.annotation.ElementType.METHOD})\n" +
+						"@interface Marker3 {}",
+						"java/lang/annotation/ElementType.java",
+						"package java.lang.annotation;\n" +
+						"public enum ElementType {\n" +
+						"    TYPE,\n" +
+						"    FIELD,\n" +
+						"    METHOD,\n" +
+						"    PARAMETER,\n" +
+						"    CONSTRUCTOR,\n" +
+						"    LOCAL_VARIABLE,\n" +
+						"    ANNOTATION_TYPE,\n" +
+						"    PACKAGE,\n" +
+						"    TYPE_PARAMETER,\n" +
+						"    TYPE_USE\n" +
+						"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 2)\n" + 
+				"	@Marker @Marker2 @Marker3 public void foo() {}\n" + 
+				"	^^^^^^^\n" + 
+				"Type annotation is illegal for a method that returns void\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 3)\n" + 
+				"	@Marker @Marker2 @Marker3 void foo2() {}\n" + 
+				"	^^^^^^^\n" + 
+				"Type annotation is illegal for a method that returns void\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=392119
+	public void test392119() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java", //-----------------------------------------------------------------------
+				"@Marker78 @Marker8 @Marker7\n" +
+				"public class X {\n" +
+				"    Zork z;\n" +
+				"}\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE_USE, java.lang.annotation.ElementType.TYPE})\n" +
+				"@interface Marker78 {\n" +
+				"}\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE})\n" +
+				"@interface Marker7 {\n" +
+				"}\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE_USE})\n" +
+				"@interface Marker8 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n",
+			null,
+			true, // flush output
+			null,
+			true, // generate output
+			false,
+			false);
+		String expectedOutput =
+				"  RuntimeInvisibleAnnotations: \n" + 
+				"    #24 @Marker78(\n" + 
+				"    )\n" + 
+				"    #25 @Marker8(\n" + 
+				"    )\n" + 
+				"    #26 @Marker7(\n" + 
+				"    )\n" + 
+				"  Attribute: MissingTypes Length: 4\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=392119, variant with explicit class file retention.
+	public void test392119b() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java", //-----------------------------------------------------------------------
+				"@Marker78 @Marker8 @Marker7\n" +
+				"public class X {\n" +
+				"    Zork z;\n" +
+				"}\n" +
+				"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS)\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE_USE, java.lang.annotation.ElementType.TYPE})\n" +
+				"@interface Marker78 {\n" +
+				"}\n" +
+				"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS)\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE})\n" +
+				"@interface Marker7 {\n" +
+				"}\n" +
+				"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.CLASS)\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE_USE})\n" +
+				"@interface Marker8 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n",
+			null,
+			true, // flush output
+			null,
+			true, // generate output
+			false,
+			false);
+		String expectedOutput =
+				"  RuntimeInvisibleAnnotations: \n" + 
+				"    #24 @Marker78(\n" + 
+				"    )\n" + 
+				"    #25 @Marker8(\n" + 
+				"    )\n" + 
+				"    #26 @Marker7(\n" + 
+				"    )\n" + 
+				"  Attribute: MissingTypes Length: 4\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=392119, variant with explicit runtime retention.
+	public void test392119c() throws Exception {
+		this.runNegativeTest(
+			new String[] {
+				"X.java", //-----------------------------------------------------------------------
+				"@Marker78 @Marker8 @Marker7\n" +
+				"public class X {\n" +
+				"    Zork z;\n" +
+				"}\n" +
+				"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE_USE, java.lang.annotation.ElementType.TYPE})\n" +
+				"@interface Marker78 {\n" +
+				"}\n" +
+				"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE})\n" +
+				"@interface Marker7 {\n" +
+				"}\n" +
+				"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)\n" +
+				"@java.lang.annotation.Target ({java.lang.annotation.ElementType.TYPE_USE})\n" +
+				"@interface Marker8 {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	Zork z;\n" + 
+			"	^^^^\n" + 
+			"Zork cannot be resolved to a type\n" + 
+			"----------\n",
+			null,
+			true, // flush output
+			null,
+			true, // generate output
+			false,
+			false);
+		String expectedOutput =
+				"  RuntimeVisibleAnnotations: \n" + 
+				"    #24 @Marker78(\n" + 
+				"    )\n" + 
+				"    #25 @Marker8(\n" + 
+				"    )\n" + 
+				"    #26 @Marker7(\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=394355
+	public void testBug394355() {
+		this.runNegativeTest(
+			new String[]{
+				"X.java",
+				"import java.lang.annotation.Target;\n" +
+				"import static java.lang.annotation.ElementType.*;\n" +
+				"public class X {\n" +
+				"	public void foo(@Marker @Marker2 X this) {}\n" +
+				"	class Y {\n" +
+				"		Y(@Marker @Marker2 X X.this) {}\n" +
+				"	}\n" +
+				"}\n" +
+				"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@Target ({METHOD, PARAMETER, TYPE, PACKAGE, FIELD, CONSTRUCTOR, LOCAL_VARIABLE, TYPE_PARAMETER})\n" +
+				"@interface Marker2 {}",
+				"java/lang/annotation/ElementType.java",
+				"package java.lang.annotation;\n" +
+				"public enum ElementType {\n" +
+				"    TYPE,\n" +
+				"    FIELD,\n" +
+				"    METHOD,\n" +
+				"    PARAMETER,\n" +
+				"    CONSTRUCTOR,\n" +
+				"    LOCAL_VARIABLE,\n" +
+				"    ANNOTATION_TYPE,\n" +
+				"    PACKAGE,\n" +
+				"    TYPE_PARAMETER,\n" +
+				"    TYPE_USE\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	public void foo(@Marker @Marker2 X this) {}\n" + 
+			"	                        ^^^^^^^^\n" + 
+			"The annotation @Marker2 is disallowed for this location\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	Y(@Marker @Marker2 X X.this) {}\n" + 
+			"	          ^^^^^^^^\n" + 
+			"The annotation @Marker2 is disallowed for this location\n" + 
+			"----------\n"); 
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399453
+	public void testBug399453() {
+		this.runNegativeTest(
+				new String[]{
+					"X.java",
+					"import java.lang.annotation.Target;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"public class X {\n" +
+					"	public void foo() {\n" +
+					"		int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] @Marker @Marker2 [];\n" +
+					"		int @Marker [][][] j = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker X.bar2(2)] @Marker @Marker2 [];\n" +
+					"	}\n" +
+					"	public int bar() {\n" +
+					"		return 2;\n" +
+					"	}\n" +
+					"	public static int bar2(int k) {\n" +
+					"		return k;\n" + 
+					"	}\n" +
+					"}\n" +
+					"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker {}\n" +
+					"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker2 {}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] @Marker @Marker2 [];\n" + 
+				"	                                                                               ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 6)\n" + 
+				"	int @Marker [][][] j = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker X.bar2(2)] @Marker @Marker2 [];\n" + 
+				"	                                                                               ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n"); 
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399453
+	public void testBug391894() {
+		this.runNegativeTest(
+				new String[]{
+					"X.java",
+					"import java.lang.annotation.Target;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"public class X {\n" +
+					"	public void foo() {\n" +
+					"		int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] ;\n" +
+					"		int @Marker [] j = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] ;\n" +
+					"	}\n" +
+					"	public int bar() {\n" +
+					"		return 2;\n" +
+					"	}\n" +
+					"}\n" +
+					"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker {}\n" +
+					"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker2 {}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 5)\n" + 
+				"	int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] ;\n" + 
+				"	                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Type mismatch: cannot convert from int[][] to int[][][]\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 5)\n" + 
+				"	int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] ;\n" + 
+				"	                                                                               ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 6)\n" + 
+				"	int @Marker [] j = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] ;\n" + 
+				"	                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Type mismatch: cannot convert from int[][] to int[]\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 6)\n" + 
+				"	int @Marker [] j = new @Marker2 int @Marker @Marker2 [2] @Marker @Marker2 [@Marker bar()] ;\n" + 
+				"	                                                                           ^^^^^^^\n" + 
+				"Syntax error, type annotations are illegal here\n" + 
+				"----------\n"); 
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=402618, [1.8][compiler] Compiler fails to resolve type annotations on method/constructor references
+	public void test402618() {
+		this.runNegativeTest(
+				new String[]{
+					"X.java",
+					"import java.util.List;\n" +
+					"interface I {\n" +
+					"	void foo(List<String> l);\n" +
+					"}\n" +
+					"\n" +
+					"public class X {\n" +
+					"	public void main(String[] args) {\n" +
+					"		I i = @Readonly List<@English String>::<@NonNegative Integer>size;\n" +
+					"	}\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 8)\n" + 
+				"	I i = @Readonly List<@English String>::<@NonNegative Integer>size;\n" + 
+				"	       ^^^^^^^^\n" + 
+				"Readonly cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 8)\n" + 
+				"	I i = @Readonly List<@English String>::<@NonNegative Integer>size;\n" + 
+				"	                      ^^^^^^^\n" + 
+				"English cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. WARNING in X.java (at line 8)\n" + 
+				"	I i = @Readonly List<@English String>::<@NonNegative Integer>size;\n" + 
+				"	                                        ^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Unused type arguments for the non generic method size() of type List<String>; it should not be parameterized with arguments <Integer>\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 8)\n" + 
+				"	I i = @Readonly List<@English String>::<@NonNegative Integer>size;\n" + 
+				"	                                         ^^^^^^^^^^^\n" + 
+				"NonNegative cannot be resolved to a type\n" + 
+				"----------\n"); 
+		}
+	public void testBug403132() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	class Y {\n" +
+					"		class Z {\n" +
+					"			public Z (@A X.@B Y Y.this, String str) {}\n" +
+					"    	 	public void foo (@A X.@B Y.@C Z this, String str) {}\n" +
+					"		}\n" +
+					"    }\n" +
+					"}\n"
+				}, 
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	public Z (@A X.@B Y Y.this, String str) {}\n" + 
+				"	           ^\n" + 
+				"A cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 4)\n" + 
+				"	public Z (@A X.@B Y Y.this, String str) {}\n" + 
+				"	                ^\n" + 
+				"B cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 5)\n" + 
+				"	public void foo (@A X.@B Y.@C Z this, String str) {}\n" + 
+				"	                  ^\n" + 
+				"A cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 5)\n" + 
+				"	public void foo (@A X.@B Y.@C Z this, String str) {}\n" + 
+				"	                       ^\n" + 
+				"B cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 5)\n" + 
+				"	public void foo (@A X.@B Y.@C Z this, String str) {}\n" + 
+				"	                            ^\n" + 
+				"C cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=403410
+	public void testBug403410() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.Target;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface A {}\n" +
+					"public class X {\n" +
+					"	class Y {\n" +
+					"		public Y (final @A X X.this) {}\n" +
+					"		public Y (static @A X X.this, int i) {}\n" +
+					"		public void foo(final @A Y this) {}\n" +
+					"		public void foo(static @A Y this, int i) {}\n" +
+					"}\n}"},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 7)\n" + 
+					"	public Y (final @A X X.this) {}\n" + 
+					"	          ^^^^^^^^^^^^^^^^^\n" + 
+					"Syntax error, modifiers are not allowed here\n" + 
+					"----------\n" +
+					"2. ERROR in X.java (at line 8)\n" + 
+					"	public Y (static @A X X.this, int i) {}\n" + 
+					"	          ^^^^^^^^^^^^^^^^^^\n" + 
+					"Syntax error, modifiers are not allowed here\n" + 
+					"----------\n" + 
+					"3. ERROR in X.java (at line 9)\n" + 
+					"	public void foo(final @A Y this) {}\n" + 
+					"	                ^^^^^^^^^^^^^^^\n" + 
+					"Syntax error, modifiers are not allowed here\n" + 
+					"----------\n" + 
+					"4. ERROR in X.java (at line 10)\n" + 
+					"	public void foo(static @A Y this, int i) {}\n" + 
+					"	                ^^^^^^^^^^^^^^^^\n" + 
+					"Syntax error, modifiers are not allowed here\n" + 
+					"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=403581,  [1.8][compiler] Compile error on varargs annotations.
+	public void test403581() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"public class X {\n" +
+					"	void foo(List<String> @Marker ... ls) {}\n" +
+					"}\n" +
+					"@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker {\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. WARNING in X.java (at line 3)\n" + 
+				"	void foo(List<String> @Marker ... ls) {}\n" + 
+				"	                                  ^^\n" + 
+				"Type safety: Potential heap pollution via varargs parameter ls\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=392671, [1.8][recovery] NPE with a method with explicit this and a following incomplete parameter
+	public void test392671() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    public void foobar(X this, int, int k) {} // NPE!\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	class X {\n" + 
+				"	        ^\n" + 
+				"Syntax error, insert \"}\" to complete ClassBody\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 2)\n" + 
+				"	public void foobar(X this, int, int k) {} // NPE!\n" + 
+				"	                           ^^^\n" + 
+				"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameter\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 3)\n" + 
+				"	}\n" + 
+				"	^\n" + 
+				"Syntax error on token \"}\", delete this token\n" + 
+				"----------\n");
+	}
+	// [1.8][compiler] Missing expected error for incorrect placement of type annotation (https://bugs.eclipse.org/bugs/show_bug.cgi?id=406587)
+	public void test406587() {
+		this.runNegativeTest(
+				new String[] {
+					"p/X.java",
+					"package p;\n" +
+					"import java.lang.annotation.*;\n" +
+					"public class X {\n" +
+					"	@B(1) @A(1) String field1;\n" +
+					"	@B @A X.Y field3;\n" +
+					"	@A @B p.X.Y field4;\n" +
+					"	@B(1) @A(1) java.lang.@A(1) @B(1) String field2;\n" +
+					"	public @B(1) @A(1) java.lang. @A(1) @B(1)  String foo(@A(1) @B(1) java.lang. @A(1) @B(1) String str1) {\n" +
+					"		@A(1) @B(1)  String local1;\n" +
+					"		@A(1) @B(1) java.lang.  @B(1) @A(1) String local2;\n" +
+					"		@B @A X.Y local3;\n" +
+					"		@B @A p.X.Y local4;\n" +
+					"		@B @A p.q.X local5;\n" +
+					"		return null;\n" +
+					"	}\n" +
+					"	class Y {}" +
+					"}\n" +
+					"@Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})\n" +
+					"@interface A {\n" +
+					"	int value() default -1;\n" +
+					"}\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface B {\n" +
+					"	int value() default -1;\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in p\\X.java (at line 6)\n" + 
+				"	@A @B p.X.Y field4;\n" + 
+				"	   ^^\n" + 
+				"The annotation @B is disallowed for this location\n" + 
+				"----------\n" + 
+				"2. ERROR in p\\X.java (at line 7)\n" + 
+				"	@B(1) @A(1) java.lang.@A(1) @B(1) String field2;\n" + 
+				"	^^\n" + 
+				"The annotation @B is disallowed for this location\n" + 
+				"----------\n" + 
+				"3. ERROR in p\\X.java (at line 7)\n" + 
+				"	@B(1) @A(1) java.lang.@A(1) @B(1) String field2;\n" + 
+				"	                      ^^\n" + 
+				"The annotation @A is disallowed for this location\n" + 
+				"----------\n" + 
+				"4. ERROR in p\\X.java (at line 8)\n" + 
+				"	public @B(1) @A(1) java.lang. @A(1) @B(1)  String foo(@A(1) @B(1) java.lang. @A(1) @B(1) String str1) {\n" + 
+				"	       ^^\n" + 
+				"The annotation @B is disallowed for this location\n" + 
+				"----------\n" + 
+				"5. ERROR in p\\X.java (at line 8)\n" + 
+				"	public @B(1) @A(1) java.lang. @A(1) @B(1)  String foo(@A(1) @B(1) java.lang. @A(1) @B(1) String str1) {\n" + 
+				"	                              ^^\n" + 
+				"The annotation @A is disallowed for this location\n" + 
+				"----------\n" + 
+				"6. ERROR in p\\X.java (at line 8)\n" + 
+				"	public @B(1) @A(1) java.lang. @A(1) @B(1)  String foo(@A(1) @B(1) java.lang. @A(1) @B(1) String str1) {\n" + 
+				"	                                                            ^^\n" + 
+				"The annotation @B is disallowed for this location\n" + 
+				"----------\n" + 
+				"7. ERROR in p\\X.java (at line 8)\n" + 
+				"	public @B(1) @A(1) java.lang. @A(1) @B(1)  String foo(@A(1) @B(1) java.lang. @A(1) @B(1) String str1) {\n" + 
+				"	                                                                             ^^\n" + 
+				"The annotation @A is disallowed for this location\n" + 
+				"----------\n" + 
+				"8. ERROR in p\\X.java (at line 10)\n" + 
+				"	@A(1) @B(1) java.lang.  @B(1) @A(1) String local2;\n" + 
+				"	      ^^\n" + 
+				"The annotation @B is disallowed for this location\n" + 
+				"----------\n" + 
+				"9. ERROR in p\\X.java (at line 10)\n" + 
+				"	@A(1) @B(1) java.lang.  @B(1) @A(1) String local2;\n" + 
+				"	                              ^^\n" + 
+				"The annotation @A is disallowed for this location\n" + 
+				"----------\n" + 
+				"10. ERROR in p\\X.java (at line 12)\n" + 
+				"	@B @A p.X.Y local4;\n" + 
+				"	^^\n" + 
+				"The annotation @B is disallowed for this location\n" + 
+				"----------\n" + 
+				"11. ERROR in p\\X.java (at line 13)\n" + 
+				"	@B @A p.q.X local5;\n" + 
+				"	      ^^^\n" + 
+				"p.q cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=417076, Eclipse compiler rejects multiple annotations for varargs.
+	public void test417076() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface A {\n" +
+					"}\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface B {\n" +
+					"}\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface C {\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public @A String foo(int @B @C @D ... args) {\n" +
+					"	      return null;\n" +
+					"	}\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 13)\n" + 
+				"	public @A String foo(int @B @C @D ... args) {\n" + 
+				"	                                ^\n" + 
+				"D cannot be resolved to a type\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=417076, Eclipse compiler rejects multiple annotations for varargs.
+	public void test417076b() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface A {\n" +
+					"}\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface B {\n" +
+					"}\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface C {\n" +
+					"}\n" +
+					"public class X {\n" +
+					"	public @A String foo(int @B @C @A ... args) {\n" +
+					"	      return null;\n" +
+					"	}\n" +
+					"	public @A String goo(int @B @C @A ... args) {\n" +
+					"	}\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 16)\n" + 
+				"	public @A String goo(int @B @C @A ... args) {\n" + 
+				"	                 ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"This method must return a result of type String\n" + 
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// This is the basic test case which demonstrated the issue for a local variable.
+	// We correctly identified the problem in function bar but failed to do so for foo.
+	public void test415308a() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface Illegal {\n" +
+					"}\n" +
+					"class Y {\n" +
+					"	static class Z {\n" +
+					"		Z() {}\n" +
+					"	}\n" +
+					"}\n" +
+					"class X {\n" +
+					"	Y.Z foo() {\n" +
+					"		@Illegal Y.Z z = null;\n" +
+					"		return z;\n" +
+					"	}\n" +
+					"	Y.Z bar() {\n" +
+					"		Y.Z z = (@Illegal Y.Z)null;\n" +
+					"		return z;\n" +
+					"	}\n" +
+					"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 14)\n" +
+				"	@Illegal Y.Z z = null;\n" +
+				"	^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n" +
+				"2. ERROR in X.java (at line 18)\n" +
+				"	Y.Z z = (@Illegal Y.Z)null;\n" +
+				"	         ^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// This test case is similar to test415308a. SimpleTypes on which annotations are applied are modified to array
+	// types.
+	public void test415308a2() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class Z {\n" +
+						"		Z() {}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"	Y.Z[] foo() {\n" +
+						"		@Illegal Y.Z[] z = null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"	Y.Z[] bar() {\n" +
+						"		Y.Z[] z = (@Illegal Y.Z[])null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 14)\n" +
+				"	@Illegal Y.Z[] z = null;\n" +
+				"	^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n" +
+				"2. ERROR in X.java (at line 18)\n" +
+				"	Y.Z[] z = (@Illegal Y.Z[])null;\n" +
+				"	           ^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// Testing type use annotations on nested types.
+	// We check all the qualifiers as we look for a static type. This test checks if we are able to
+	// go beyond 1 level as part of the loop.
+	public void test415308b() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class YY {\n" +
+						"		class Z {\n" +
+						"			Z() {}\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"	Y.YY.Z foo() {\n" +
+						"		@Illegal Y.YY.Z z = null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"	Y.YY.Z foo2() {\n" +
+						"		Y.@Illegal YY.Z z = null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"	Y.YY.Z foo3() {\n" +
+						"		Y.YY.@Illegal Z z = null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 16)\n" +
+				"	@Illegal Y.YY.Z z = null;\n" +
+				"	^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// This test case is similar to test415308a. SimpleTypes on which annotations are applied are modified to array
+	// types.
+	public void test415308b2() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class YY {\n" +
+						"		class Z {\n" +
+						"			Z() {}\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"	Y.YY.Z[] foo() {\n" +
+						"		@Illegal Y.YY.Z[] z = null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"	Y.YY.Z[] foo2() {\n" +
+						"		Y.@Illegal YY.Z[] z = null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"	Y.YY.Z[] foo3() {\n" +
+						"		Y.YY.@Illegal Z[] z = null;\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 16)\n" +
+				"	@Illegal Y.YY.Z[] z = null;\n" +
+				"	^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// The test case is to validate that we report errors for only type annotations and nothing else in case of
+	// of parameter types.
+	public void test415308c() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface IllegalTypeUse {\n" +
+						"}\n" +
+						"@Target({ElementType.TYPE_USE, ElementType.PARAMETER})\n" +
+						"@interface LegalTypeUseParam {\n" +
+						"}\n" +
+						"@Target(ElementType.PARAMETER)\n" +
+						"@interface LegalParam {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class Z {\n" +
+						"		Z() {}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"	Y.Z foo(@LegalParam Y.Z z) { //Legal\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"	Y.Z foo2(@LegalTypeUseParam Y.Z z) { //Legal\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"	Y.Z foo3(@IllegalTypeUse @LegalParam Y.Z z) { //Illegal\n" +
+						"		return z;\n" +
+						"	}\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 25)\n" +
+				"	Y.Z foo3(@IllegalTypeUse @LegalParam Y.Z z) { //Illegal\n" +
+				"	         ^^^^^^^^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	//[1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	//The test case is to validate type use annotation for class fields.
+	public void test415308d() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class Z {\n" +
+						"		Z() {}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"   @Illegal \n" +
+						"	Y.Z z;\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 13)\n" +
+				"	@Illegal \n" +
+				"	^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	//[1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	//The test case checks for annotations which are not exclusively TYPE_USE. We should not report a error.
+	public void test415308d2() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target({ElementType.TYPE_USE, ElementType.FIELD})\n" +
+						"@interface Legal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class Z {\n" +
+						"		Z() {}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"   @Legal \n" +
+						"	Y.Z z;\n" +
+						"}\n"
+				},
+				"");
+	}
+	//[1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	//The test case is to validate type use annotation for class fields.
+	//We check all the qualifiers as we look for a static type. This test checks if we are able to
+	//go beyond 1 level as part of the loop.
+	public void test415308e() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal {\n" +
+						"}\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal2 {\n" +
+						"}\n" +
+						"@Target(ElementType.FIELD)\n" +
+						"@interface Legal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class YY {\n" +
+						"		class Z {\n" +
+						"			Z() {}\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"   @Legal @Illegal @Illegal2\n" +
+						"	Y.YY.Z z;\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 21)\n" +
+				"	@Legal @Illegal @Illegal2\n" +
+				"	       ^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n" +
+				"2. ERROR in X.java (at line 21)\n" +
+				"	@Legal @Illegal @Illegal2\n" +
+				"	                ^^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// The test case is to validate type use annotations on return types for methods.
+	public void test415308f() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class Z {\n" +
+						"		Z() {}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"   public @Illegal Y.Z foo() { return null;}\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 13)\n" +
+				"	public @Illegal Y.Z foo() { return null;}\n" +
+				"	       ^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// The test case is a array version of test415308f.
+	public void test415308f2() {
+		this.runNegativeTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface Illegal {\n" +
+						"}\n" +
+						"class Y {\n" +
+						"	static class Z {\n" +
+						"		Z() {}\n" +
+						"	}\n" +
+						"}\n" +
+						"class X {\n" +
+						"   public @Illegal Y.Z[] foo() { return null;}\n" +
+						"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 13)\n" +
+				"	public @Illegal Y.Z[] foo() { return null;}\n" +
+				"	       ^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// [1.8][compiler] Illegal type annotations not rejected (https://bugs.eclipse.org/bugs/show_bug.cgi?id=415308)
+	// The test case is used to test enums with type annotations.
+	public void test415308g() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface Illegal {\n" +
+					"}\n" +
+					"class Y {\n" +
+					"	enum A { B }\n" +
+					"}\n" +
+					"class X {\n" +
+					"	@Illegal Y.A foo(@Illegal Y.A a) {\n" +
+					"		return a;\n" +
+					"	}\n" +
+					"}\n"
+				},
+				"----------\n" +
+				"1. ERROR in X.java (at line 11)\n" +
+				"	@Illegal Y.A foo(@Illegal Y.A a) {\n" +
+				"	^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n" +
+				"2. ERROR in X.java (at line 11)\n" +
+				"	@Illegal Y.A foo(@Illegal Y.A a) {\n" +
+				"	                 ^^^^^^^^\n" +
+				"Type annotations are not allowed on type names used to access static members\n" +
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418041, NPE during AST creation.
+	public void test418041() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"import java.util.List;\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@interface Readonly {\n" +
+					"}\n" +
+					"class UnmodifiableList<T> implements\n" +
+					"@Readonly List<@Readonly T> { }\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.addAll(int, Collection<? extends T>)\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.addAll(Collection<? extends T>)\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.lastIndexOf(Object)\n" + 
+				"----------\n" + 
+				"4. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.subList(int, int)\n" + 
+				"----------\n" + 
+				"5. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.contains(Object)\n" + 
+				"----------\n" + 
+				"6. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.get(int)\n" + 
+				"----------\n" + 
+				"7. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.retainAll(Collection<?>)\n" + 
+				"----------\n" + 
+				"8. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.clear()\n" + 
+				"----------\n" + 
+				"9. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.indexOf(Object)\n" + 
+				"----------\n" + 
+				"10. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.toArray(T[])\n" + 
+				"----------\n" + 
+				"11. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.toArray()\n" + 
+				"----------\n" + 
+				"12. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.isEmpty()\n" + 
+				"----------\n" + 
+				"13. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.listIterator(int)\n" + 
+				"----------\n" + 
+				"14. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.listIterator()\n" + 
+				"----------\n" + 
+				"15. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.add(int, T)\n" + 
+				"----------\n" + 
+				"16. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.add(T)\n" + 
+				"----------\n" + 
+				"17. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.set(int, T)\n" + 
+				"----------\n" + 
+				"18. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.size()\n" + 
+				"----------\n" + 
+				"19. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.containsAll(Collection<?>)\n" + 
+				"----------\n" + 
+				"20. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.remove(int)\n" + 
+				"----------\n" + 
+				"21. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.remove(Object)\n" + 
+				"----------\n" + 
+				"22. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.removeAll(Collection<?>)\n" + 
+				"----------\n" + 
+				"23. ERROR in X.java (at line 7)\n" + 
+				"	class UnmodifiableList<T> implements\n" + 
+				"	      ^^^^^^^^^^^^^^^^\n" + 
+				"The type UnmodifiableList<T> must implement the inherited abstract method List<T>.iterator()\n" + 
+				"----------\n");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418041, NPE during AST creation.
+	public void test418041a() {
+		this.runNegativeTest(
+				new String[] {
+					"X.java",
+					"public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker {}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                                  ^^^^^^^^^\n" + 
+				"Y cannot be resolved to a type\n" + 
+				"----------\n" + 
+				"2. WARNING in X.java (at line 1)\n" + 
+				"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+				"	                                                                          ^^^^^^^^^^^^^^^\n" + 
+				"The type parameter Q should not be bounded by the final type Integer. Final types cannot be further extended\n" + 
+				"----------\n");
+	}
+	public void testWildcardCapture() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import java.util.List;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface NonNull {\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface Nullable {\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		List<@Nullable ? extends X> lx1 = null;\n" +
+				"		List<@NonNull ? extends X> lx2 = null;\n" +
+				"		lx1 = lx2;\n" +
+				"		lx1.add(lx2.get(0));\n" +
+				"		lx1.add(lx1.get(0));\n" +
+				"       getAdd(lx1, lx2);\n" +
+				"	}\n" +
+				"	static <@NonNull P>  void getAdd(List<P> p1, List<P> p2) {\n" +
+				"		p1.add(p2.get(0));\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 18)\n" + 
+			"	lx1.add(lx2.get(0));\n" + 
+			"	    ^^^\n" + 
+			"The method add(capture#3-of ? extends X) in the type List<capture#3-of ? extends X> is not applicable for the arguments (capture#4-of ? extends X)\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 19)\n" + 
+			"	lx1.add(lx1.get(0));\n" + 
+			"	    ^^^\n" + 
+			"The method add(capture#5-of ? extends X) in the type List<capture#5-of ? extends X> is not applicable for the arguments (capture#6-of ? extends X)\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 20)\n" + 
+			"	getAdd(lx1, lx2);\n" + 
+			"	^^^^^^\n" + 
+			"The method getAdd(List<P>, List<P>) in the type X is not applicable for the arguments (List<capture#7-of ? extends X>, List<capture#8-of ? extends X>)\n" + 
+			"----------\n");		
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=414038, [1.8][compiler] CCE in resolveAnnotations
+	public void testBug414038() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface NonNull { int[].class value() default 0;}\n" +
+				"public class X extends @NonNull() Object {    \n" +
+				"    public static int i = 0; \n" +
+				"}\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	@interface NonNull { int[].class value() default 0;}\n" + 
+			"	                          ^^^^^^\n" + 
+			"Syntax error on tokens, delete these tokens\n" + 
+			"----------\n");		
+	}	
+	public void testGenericConstructor() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Annotation;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"} \n" +
+				"public class X { \n" +
+				"\n" +
+				"	<P> @T X() {\n" +
+				"	}\n" +
+				"   @T <P> X(X x) {\n" +
+				"   }\n" +
+				"}\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	<P> @T X() {\n" + 
+			"	    ^\n" + 
+			"Syntax error on token \"@\", delete this token\n" + 
+			"----------\n");		
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=419833, [1.8] NPE in CompilationUnitProblemFinder and ASTNode
+	public void test419833() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"class S {\n" +
+				"}\n" +
+				"interface I {\n" +
+				"}\n" +
+				"public class X extends @T S implements @T  {\n" +
+				"	public int foo() {\n" +
+				"       return 0;\n" +
+				"	}	\n" +
+				"}\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	public class X extends @T S implements @T  {\n" + 
+			"	                                       ^\n" + 
+			"Syntax error on token \"@\", delete this token\n" + 
+			"----------\n");		
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420038,  [1.8][compiler] Tolerate type annotations on array dimensions of class literals for now for compatibility. 
+	public void test420038() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		Class<?> c = int @T [].class; \n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 8)\n" + 
+			"	Class<?> c = int @T [].class; \n" + 
+			"	                 ^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n");		
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=420284, [1.8][compiler] IllegalStateException from TypeSystem.cacheDerivedType 
+	public void test420284() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.io.Serializable;\n" +
+				"import java.util.List;\n" +
+				"public class X {\n" +
+				"    void foo(Object o) {\n" +
+				"        Integer i = (Integer & Serializable) o;\n" +
+				"        List<@NonNull Integer> l;\n" +
+				"    }\n" +
+				"}\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	List<@NonNull Integer> l;\n" + 
+			"	      ^^^^^^^\n" + 
+			"NonNull cannot be resolved to a type\n" + 
+			"----------\n");		
+	}	
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
index 847ca4a..f05cace 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullAnnotationTest.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     Stephan Herrmann - initial API and implementation
  *     Till Brychcy <register.eclipse@brychcy.de> - Contribution for
@@ -21,31 +25,12 @@
 
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 
 // see bug 186342 - [compiler][null] Using annotations for null checking
-public class NullAnnotationTest extends AbstractComparableTest {
+public class NullAnnotationTest extends AbstractNullAnnotationTest {
 
-// class libraries including our default null annotation types:
-String[] LIBS;
-
-// names and content of custom annotations used in a few tests:
-private static final String CUSTOM_NONNULL_NAME = "org/foo/NonNull.java";
-private static final String CUSTOM_NONNULL_CONTENT =
-	"package org.foo;\n" +
-	"import static java.lang.annotation.ElementType.*;\n" +
-	"import java.lang.annotation.*;\n" +
-	"@Retention(RetentionPolicy.CLASS)\n" +
-	"@Target({METHOD,PARAMETER,LOCAL_VARIABLE})\n" +
-	"public @interface NonNull {\n" +
-	"}\n";
-private static final String CUSTOM_NULLABLE_NAME = "org/foo/Nullable.java";
-private static final String CUSTOM_NULLABLE_CONTENT = "package org.foo;\n" +
-	"import static java.lang.annotation.ElementType.*;\n" +
-	"import java.lang.annotation.*;\n" +
-	"@Retention(RetentionPolicy.CLASS)\n" +
-	"@Target({METHOD,PARAMETER,LOCAL_VARIABLE})\n" +
-	"public @interface Nullable {\n" +
-	"}\n";
+private String TEST_JAR_SUFFIX = ".jar";
 
 public NullAnnotationTest(String name) {
 	super(name);
@@ -67,92 +52,87 @@
 	return NullAnnotationTest.class;
 }
 
+String mismatch_NonNull_Nullable(String type) {
+	return 	(this.complianceLevel < ClassFileConstants.JDK1_8) 
+			? "Null type mismatch: required \'@NonNull "+type+"\' but the provided value is specified as @Nullable\n" 
+			: "Null type mismatch (type annotations): required '@NonNull "+type+"' but this expression has type '@Nullable "+type+"'\n";
+}
+String nullTypeSafety() {
+	return (this.complianceLevel < ClassFileConstants.JDK1_8)
+			? "Null type safety: "
+			: "Null type safety (type annotations): ";
+}
+String mismatch_NonNull_Null(String type7, String type8) {
+	return 	(this.complianceLevel < ClassFileConstants.JDK1_8) 
+			? "Null type mismatch: required \'@NonNull "+type7+"\' but the provided value is null\n" 
+			: "Null type mismatch: required \'@NonNull "+type8+"\' but the provided value is null\n";
+}
+String variableMayBeNull(String var) {
+	return 	(this.complianceLevel < ClassFileConstants.JDK1_8) 
+			? "Potential null pointer access: The variable "+var+" may be null at this location\n" 
+			: "Potential null pointer access: this expression has a '@Nullable' type\n";
+}
+String redundant_check_nonnull(String expr, String type) {
+	return this.complianceLevel < ClassFileConstants.JDK1_8
+			? "Redundant null check: "+expr+" is specified as @NonNull\n"
+			: "Redundant null check: comparing '"+type+"' against null\n";
+}
+String redundantCheck_method_cannot_return_null(String method, String type) {
+	return this.complianceLevel < ClassFileConstants.JDK1_8
+			? "Redundant null check: The method "+method+" cannot return null\n"
+			: "Redundant null check: comparing '@NonNull "+type+"' against null\n";
+}
+String checkAlwaysFalse_method_cannot_return_null(String method, String type) {
+	return this.complianceLevel < ClassFileConstants.JDK1_8
+			? "Null comparison always yields false: The method "+method+" cannot return null\n"
+			: "Redundant null check: comparing '@NonNull "+type+"' against null\n";
+}
+String redundant_check_canonlynull(String expr, String type) {
+	return this.complianceLevel < ClassFileConstants.JDK1_8
+			? "Redundant null check: "+expr+" can only be null at this location\n"
+			: "Redundant null check: comparing '@NonNull "+type+"' against null\n";
+}
+
+String checkAlwaysFalse_nonnull(String expr, String type) {
+	return (this.complianceLevel < ClassFileConstants.JDK1_8)
+		? "Null comparison always yields false: "+expr+" is specified as @NonNull\n"
+		: "Redundant null check: comparing '@NonNull "+type+"' against null\n";
+}
+String potNPE_nullable(String expr) {
+	return (this.complianceLevel < ClassFileConstants.JDK1_8)
+		? "Potential null pointer access: "+expr+" is specified as @Nullable\n"
+		: "Potential null pointer access: this expression has a '@Nullable' type\n";
+}
+String potNPE_nullable_maybenull(String expr) {
+	return (this.complianceLevel < ClassFileConstants.JDK1_8)
+		? "Potential null pointer access: "+expr+" may be null at this location\n"
+		: "Potential null pointer access: this expression has a '@Nullable' type\n";
+}
+String nonNullArrayOf(String string) {
+	return (this.complianceLevel < ClassFileConstants.JDK1_8)
+			? "@NonNull Object[]"
+			: "Object @NonNull[]";
+}
+
+
+String targetTypeUseIfAvailable() {
+	return this.complianceLevel >= ClassFileConstants.JDK1_8
+				? "@Target(ElementType.TYPE_USE)\n"
+				: "";
+}
+
+/**
+ * @deprecated
+ */
 protected void setUp() throws Exception {
 	super.setUp();
+	if (this.complianceLevel >= ClassFileConstants.JDK1_8)
+		this.TEST_JAR_SUFFIX = "_1.8.jar";
 	if (this.LIBS == null) {
-		this.LIBS = getLibsWithNullAnnotations();
+		this.LIBS = getLibsWithNullAnnotations(this.complianceLevel);
 	}
 }
-// Conditionally augment problem detection settings
-static boolean setNullRelatedOptions = true;
-protected Map getCompilerOptions() {
-    Map defaultOptions = super.getCompilerOptions();
-    if (setNullRelatedOptions) {
-    	defaultOptions.put(JavaCore.COMPILER_PB_NULL_REFERENCE, JavaCore.ERROR);
-	    defaultOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
-	    defaultOptions.put(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK, JavaCore.ERROR);
-		defaultOptions.put(JavaCore.COMPILER_PB_INCLUDE_ASSERTS_IN_NULL_ANALYSIS, JavaCore.ENABLED);
 
-		defaultOptions.put(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION, JavaCore.DISABLED);
-
-		// enable null annotations:
-		defaultOptions.put(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
-		// leave other new options at these defaults:
-//		defaultOptions.put(CompilerOptions.OPTION_ReportNullContractViolation, JavaCore.ERROR);
-//		defaultOptions.put(CompilerOptions.OPTION_ReportPotentialNullContractViolation, JavaCore.ERROR);
-//		defaultOptions.put(CompilerOptions.OPTION_ReportNullContractInsufficientInfo, CompilerOptions.WARNING);
-
-//		defaultOptions.put(CompilerOptions.OPTION_NullableAnnotationName, "org.eclipse.jdt.annotation.Nullable");
-//		defaultOptions.put(CompilerOptions.OPTION_NonNullAnnotationName, "org.eclipse.jdt.annotation.NonNull");
-    }
-    return defaultOptions;
-}
-void runNegativeTestWithLibs(String[] testFiles, String expectedErrorLog) {
-	runNegativeTest(
-			testFiles,
-			expectedErrorLog,
-			this.LIBS,
-			false /*shouldFlush*/);
-}
-void runNegativeTestWithLibs(boolean shouldFlushOutputDirectory, String[] testFiles, Map customOptions, String expectedErrorLog) {
-	runNegativeTest(
-			shouldFlushOutputDirectory,
-			testFiles,
-			this.LIBS,
-			customOptions,
-			expectedErrorLog,
-			// runtime options
-		    JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
-}
-void runNegativeTestWithLibs(String[] testFiles, Map customOptions, String expectedErrorLog) {
-	runNegativeTestWithLibs(false /* flush output directory */,	testFiles, customOptions, expectedErrorLog);
-}
-void runConformTestWithLibs(String[] testFiles, Map customOptions, String expectedCompilerLog) {
-	runConformTestWithLibs(false /* flush output directory */, testFiles, customOptions, expectedCompilerLog);
-}
-void runConformTestWithLibs(String[] testFiles, Map customOptions, String expectedCompilerLog, String expectedOutput) {
-	runConformTest(
-			false, /* flush output directory */
-			testFiles,
-			this.LIBS,
-			customOptions,
-			expectedCompilerLog,
-			expectedOutput,
-			"",/* expected error */
-		    JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
-}
-void runConformTestWithLibs(boolean shouldFlushOutputDirectory, String[] testFiles, Map customOptions, String expectedCompilerLog) {
-	runConformTest(
-			shouldFlushOutputDirectory,
-			testFiles,
-			this.LIBS,
-			customOptions,
-			expectedCompilerLog,
-			"",/* expected output */
-			"",/* expected error */
-		    JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
-}
-void runConformTest(String[] testFiles, Map customOptions, String expectedOutputString) {
-	runConformTest(
-			testFiles,
-			expectedOutputString,
-			null /*classLibraries*/,
-			true /*shouldFlushOutputDirectory*/,
-			null /*vmArguments*/,
-			customOptions,
-			null /*customRequestor*/);
-
-}
 // a nullable argument is dereferenced without a check
 public void test_nullable_paramter_001() {
 	runNegativeTest(
@@ -168,7 +148,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	System.out.print(o.toString());\n" +
 		"	                 ^\n" +
-		"Potential null pointer access: The variable o may be null at this location\n" +
+		variableMayBeNull("o") +
 		"----------\n",
 		this.LIBS,
 		true /* shouldFlush*/);
@@ -210,7 +190,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	if (o != null)\n" +
 		"	    ^\n" +
-		"Redundant null check: The variable o is specified as @NonNull\n" +
+		redundant_check_nonnull("The variable o", "@NonNull Object") +
 		"----------\n",
 		this.LIBS,
 		true /* shouldFlush*/);
@@ -321,7 +301,7 @@
 		"1. WARNING in X.java (at line 3)\n" +
 		"	l.setObject(o);\n" +
 		"	            ^\n" +
-		"Null type safety: The expression of type Object needs unchecked conversion to conform to \'@NonNull Object\'\n" +
+		nullTypeSafety() + "The expression of type 'Object' needs unchecked conversion to conform to \'@NonNull Object\'\n" +
 		"----------\n");
 }
 // a ternary non-null expression is passed to a nonnull parameter
@@ -366,7 +346,7 @@
 		"1. ERROR in XSub.java (at line 4)\n" +
 		"	super(b);\n" +
 		"	      ^\n" +
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("String") +
 		"----------\n");
 }
 // a nullable value is passed to a non-null parameter in an allocation expression
@@ -388,7 +368,7 @@
 		"1. ERROR in X.java (at line 5)\n" +
 		"	return new X(b);\n" +
 		"	             ^\n" +
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("String") +
 		"----------\n"  /* compiler output */);
 }
 // a nullable value is passed to a non-null parameter in a qualified allocation expression
@@ -412,7 +392,7 @@
 		"1. ERROR in X.java (at line 7)\n" +
 		"	return this.new Local(b);\n" +
 		"	                      ^\n" +
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("String") +
 		"----------\n"  /* compiler output */);
 }
 // null is passed to a non-null parameter in a qualified allocation expression, across CUs
@@ -529,7 +509,7 @@
 		"2. ERROR in X.java (at line 4)\n" + 
 		"	ContainingInner2.Inner inner = container.new Inner(null);\n" + 
 		"	                                                   ^^^^\n" + 
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is null\n" + 
+		mismatch_NonNull_Null("Object", "Object") +
 		"----------\n"  /* compiler output */);
 }
 // a method of a local class has a non-null parameter, client passes null
@@ -557,20 +537,21 @@
 }
 // non-null varargs (message send)
 public void test_nonnull_parameter_015() {
-	if (this.complianceLevel > ClassFileConstants.JDK1_7) {
-		fail("Reminder: should check if JSR 308 mandates a change in handling vararg elements (see bug 365983).");
-		return;
-	}
 	runNegativeTest(
 		new String[] {
 			"X.java",
 			"import org.eclipse.jdt.annotation.*;\n" +
 			"public class X {\n" +
-			"    void foo(@NonNull Object ... o) {\n" +
+			((this.complianceLevel < ClassFileConstants.JDK1_8)
+			 ? "    void foo(@NonNull Object ... o) {\n"
+			 : "    void foo(Object @NonNull... o) {\n") +
 			"        if (o != null)\n" +
 			"              System.out.print(o.toString());\n" +
 			"    }\n" +
-			"    void foo2(int i, @NonNull Object ... o) {\n" +
+			((this.complianceLevel < ClassFileConstants.JDK1_8)
+			? "    void foo2(int i, @NonNull Object ... o) {\n"
+			: "    void foo2(int i, Object @NonNull ... o) {\n"
+			) +
 			"        if (o.length > 0 && o[0] != null)\n" +
 			"              System.out.print(o[0].toString());\n" +
 			"    }\n" +
@@ -588,12 +569,12 @@
 			"1. ERROR in X.java (at line 4)\n" + 
 			"	if (o != null)\n" + 
 			"	    ^\n" + 
-			"Redundant null check: The variable o is specified as @NonNull\n" + 
+			redundant_check_nonnull("The variable o", "Object @NonNull[]") + 
 			"----------\n" + 
 			"2. ERROR in X.java (at line 14)\n" + 
 			"	foo(objs);\n" + 
 			"	    ^^^^\n" + 
-			"Null type mismatch: required \'@NonNull Object[]\' but the provided value is null\n" + 
+			"Null type mismatch: required \'"+nonNullArrayOf("Object")+"\' but the provided value is null\n" + 
 			"----------\n" + 
 			"3. WARNING in X.java (at line 18)\n" + 
 			"	foo2(2, null);\n" + 
@@ -603,31 +584,33 @@
 			"4. ERROR in X.java (at line 18)\n" + 
 			"	foo2(2, null);\n" + 
 			"	        ^^^^\n" + 
-			"Null type mismatch: required \'@NonNull Object[]\' but the provided value is null\n" + 
+			"Null type mismatch: required \'"+nonNullArrayOf("Object")+"\' but the provided value is null\n" + 
 			"----------\n",
 		this.LIBS,
 		true /* shouldFlush*/);
 }
 // non-null varargs (allocation and explicit constructor calls)
 public void test_nonnull_parameter_016() {
-	if (this.complianceLevel > ClassFileConstants.JDK1_7) {
-		fail("Reminder: should check if JSR 308 mandates a change in handling vararg elements (see bug 365983).");
-		return;
-	}
 	runNegativeTest(
 		new String[] {
 			"X.java",
 			"import org.eclipse.jdt.annotation.*;\n" +
 			"public class X {\n" +
-			"    X(@NonNull Object ... o) {\n" +
+			((this.complianceLevel < ClassFileConstants.JDK1_8)
+			 ? "    X(@NonNull Object ... o) {\n"
+			 : "    X(Object @NonNull... o) {\n") +
 			"        if (o != null)\n" +
 			"              System.out.print(o.toString());\n" +
 			"    }\n" +
 			"    class Y extends X {\n" +
-			"        Y(int i, @NonNull Object ... o) {\n" +
+			((this.complianceLevel < ClassFileConstants.JDK1_8)
+			 ? "    Y(int i, @NonNull Object ... o) {\n"
+			 : "    Y(int i, Object @NonNull... o) {\n") +
 			"        	super(i, (Object)null);\n" +
 			"        }\n" +
-			"        Y(char c, @NonNull Object ... o) {\n" +
+			((this.complianceLevel < ClassFileConstants.JDK1_8)
+			 ? "    Y(char c, @NonNull Object ... o) {\n"
+			 : "    Y(char c, Object @NonNull... o) {\n") +
 			"        	this(1, new Object(), null);\n" +
 			"        }\n" +
 			"    }\n" +
@@ -644,17 +627,17 @@
 			"1. ERROR in X.java (at line 4)\n" +
 			"	if (o != null)\n" +
 			"	    ^\n" +
-			"Redundant null check: The variable o is specified as @NonNull\n" +
+			redundant_check_nonnull("The variable o", "Object @NonNull[]") + 
 			"----------\n" +
 			"2. ERROR in X.java (at line 16)\n" +
 			"	new X((Object[])null);\n" +
 			"	      ^^^^^^^^^^^^^^\n" +
-			"Null type mismatch: required \'@NonNull Object[]\' but the provided value is null\n" +
+			"Null type mismatch: required \'"+nonNullArrayOf("Object")+"\' but the provided value is null\n" +
 			"----------\n" +
 			"3. ERROR in X.java (at line 21)\n" +
 			"	this.new Y(2, (Object[])null);\n" +
 			"	              ^^^^^^^^^^^^^^\n" +
-			"Null type mismatch: required \'@NonNull Object[]\' but the provided value is null\n" +
+			"Null type mismatch: required \'"+nonNullArrayOf("Object")+"\' but the provided value is null\n" +
 			"----------\n",
 		this.LIBS,
 		true /* shouldFlush*/);
@@ -728,8 +711,8 @@
 		"----------\n" + 
 		"1. ERROR in B.java (at line 8)\n" + 
 		"	l.callMe(getNull());\n" + 
-		"	         ^^^^^^^^^\n" + 
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is inferred as @Nullable\n" + 
+		"	         ^^^^^^^^^\n" +
+		mismatch_NonNull_Nullable("Object") +
 		"----------\n");
 }
 // assigning potential null to a nonnull local variable
@@ -760,7 +743,7 @@
 		"3. WARNING in X.java (at line 7)\n" +
 		"	@NonNull Object o3 = p;\n" +
 		"	                     ^\n" +
-		"Null type safety: The expression of type Object needs unchecked conversion to conform to \'@NonNull Object\'\n" +
+		nullTypeSafety() + "The expression of type 'Object' needs unchecked conversion to conform to \'@NonNull Object\'\n" +
 		"----------\n",
 		this.LIBS,
 		true /* shouldFlush*/);
@@ -797,7 +780,7 @@
 		"3. WARNING in X.java (at line 10)\n" +
 		"	o3 = p;\n" +
 		"	     ^\n" +
-		"Null type safety: The expression of type Object needs unchecked conversion to conform to \'@NonNull Object\'\n" +
+		nullTypeSafety() + "The expression of type 'Object' needs unchecked conversion to conform to \'@NonNull Object\'\n" +
 		"----------\n",
 		this.LIBS,
 		true /* shouldFlush*/);
@@ -870,7 +853,7 @@
 		"1. ERROR in X.java (at line 3)\n" +
 		"	void foo(Object o) {\n" +
 		"	         ^^^^^^\n" +
-		"Missing nullable annotation: inherited method from Lib declares this parameter as @Nullable\n" +
+		"Missing nullable annotation: inherited method from Lib specifies this parameter as @Nullable\n" +
 		"----------\n");
 }
 // a method relaxes the parameter null specification, super interface declares parameter o as @NonNull
@@ -1068,18 +1051,18 @@
 		"1. WARNING in XSub.java (at line 3)\n" + 
 		"	public void printObject(Object o) { super.printObject(o); }\n" + 
 		"	                        ^^^^^^\n" + 
-		"Missing non-null annotation: inherited method from X declares this parameter as @NonNull\n" + 
+		"Missing non-null annotation: inherited method from X specifies this parameter as @NonNull\n" + 
 		"----------\n" + 
 		"2. ERROR in XSub.java (at line 3)\n" +
 		"	public void printObject(Object o) { super.printObject(o); }\n" +
 		"	                                                      ^\n" +
-		"Null type safety: The expression of type Object needs unchecked conversion to conform to \'@NonNull Object\'\n" +
+		nullTypeSafety() + "The expression of type 'Object' needs unchecked conversion to conform to \'@NonNull Object\'\n" +
 		"----------\n" +
 		"----------\n" +
 		"1. ERROR in M.java (at line 3)\n" +
 		"	x.printObject(o);\n" +
 		"	              ^\n" +
-		"Null type safety: The expression of type Object needs unchecked conversion to conform to \'@NonNull Object\'\n" +
+		nullTypeSafety() + "The expression of type 'Object' needs unchecked conversion to conform to \'@NonNull Object\'\n" +
 		"----------\n");
 }
 // a static method has a more relaxed null contract than a like method in the super class, but no overriding.
@@ -1369,7 +1352,7 @@
 		"1. ERROR in XSub.java (at line 3)\n" +
 		"	public void foo(String s) { if (s != null) super.foo(s); }\n" +
 		"	                ^^^^^^\n" +
-		"Missing non-null annotation: inherited method from X declares this parameter as @NonNull\n" +
+		"Missing non-null annotation: inherited method from X specifies this parameter as @NonNull\n" +
 		"----------\n");
 }
 
@@ -1400,7 +1383,7 @@
 		"1. WARNING in XSub.java (at line 1)\n" + 
 		"	public class XSub extends X implements IX {\n" + 
 		"	             ^^^^\n" + 
-		"Missing non-null annotation: inherited method from IX declares this parameter as @NonNull\n" + 
+		"Missing non-null annotation: inherited method from IX specifies this parameter as @NonNull\n" + 
 		"----------\n");
 }
 
@@ -1514,7 +1497,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	if (o != null)\n" +
 		"	    ^\n" +
-		"Redundant null check: The variable o cannot be null at this location\n" +
+		"Redundant null check: The variable o cannot be null at this location\n" + // no immediate type annotation
 		"----------\n");
 }
 // a non-null method returns null
@@ -1555,7 +1538,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	return o;\n" +
 		"	       ^\n" +
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("Object") +
 		"----------\n");
 }
 // a non-null method returns its non-null argument
@@ -1589,7 +1572,7 @@
 		"1. WARNING in X.java (at line 4)\n" +
 		"	return o;\n" +
 		"	       ^\n" +
-		"Null type safety: The expression of type Object needs unchecked conversion to conform to \'@NonNull Object\'\n" +
+		nullTypeSafety() + "The expression of type 'Object' needs unchecked conversion to conform to \'@NonNull Object\'\n" +
 		"----------\n");
 }
 // a result from a nullable method is directly dereferenced
@@ -1637,7 +1620,7 @@
 		"1. ERROR in X.java (at line 7)\n" +
 		"	if (getObject() == null)\n" +
 		"	    ^^^^^^^^^^^\n" +
-		"Null comparison always yields false: The method getObject() cannot return null\n" +
+		checkAlwaysFalse_method_cannot_return_null("getObject()", "Object") +
 		"----------\n" + 
 		"2. WARNING in X.java (at line 8)\n" + 
 		"	throw new RuntimeException();\n" + 
@@ -1674,7 +1657,7 @@
 		"2. ERROR in X.java (at line 8)\n" +
 		"	if (left != getObject())\n" +
 		"	            ^^^^^^^^^^^\n" +
-		"Redundant null check: The method getObject() cannot return null\n" +
+		redundantCheck_method_cannot_return_null("getObject()", "Object") +
 		"----------\n");
 }
 // a result from a nonnull method is directly checked for null (from local): not redundant due to loop
@@ -1731,7 +1714,7 @@
 		"1. ERROR in X.java (at line 9)\n" +
 		"	if (left != getObject())\n" +
 		"	    ^^^^\n" +
-		"Redundant null check: The variable left can only be null at this location\n" +
+		redundant_check_canonlynull("The variable left", "Object") +
 		"----------\n" +
 		"2. ERROR in X.java (at line 9)\n" +
 		"	if (left != getObject())\n" +
@@ -1791,7 +1774,9 @@
 		"1. ERROR in X.java (at line 5)\n" +
 		"	if (dubious == null)\n" +
 		"	    ^^^^^^^\n" +
-		"Null comparison always yields false: The variable dubious is specified as @NonNull\n" +
+		((this.complianceLevel < ClassFileConstants.JDK1_8)
+			? "Null comparison always yields false: The variable dubious is specified as @NonNull\n"
+			: "Redundant null check: comparing '@NonNull Object' against null\n" ) +
 		"----------\n" +
 		"2. WARNING in X.java (at line 6)\n" +
 		"	return dubious;\n" +
@@ -1970,17 +1955,19 @@
 			"package org.foo;\n" +
 			"import java.lang.annotation.*;\n" +
 			"@Retention(RetentionPolicy.CLASS)\n" +
+			targetTypeUseIfAvailable() +
 			"public @interface MayBeNull {}\n",
 
 			"org/foo/MustNotBeNull.java",
 			"package org.foo;\n" +
 			"import java.lang.annotation.*;\n" +
 			"@Retention(RetentionPolicy.CLASS)\n" +
+			targetTypeUseIfAvailable() +
 			"public @interface MustNotBeNull {}\n",
 
 			"Lib.java",
 			"public class Lib {\n" +
-			"    Object getObject() { return new Object(); }\n" +
+			"    public Object getObject() { return new Object(); }\n" +
 			"}\n",
 			"X.java",
 			"import org.foo.*;\n" +
@@ -1997,7 +1984,7 @@
 		"1. ERROR in X.java (at line 4)\n" +
 		"	return l.getObject();\n" +
 		"	       ^^^^^^^^^^^^^\n" +
-		"Null type safety: The expression of type Object needs unchecked conversion to conform to \'@MustNotBeNull Object\'\n" +
+		nullTypeSafety() + "The expression of type 'Object' needs unchecked conversion to conform to \'@MustNotBeNull Object\'\n" +
 		"----------\n",
 		JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
 }
@@ -2050,7 +2037,9 @@
 		"1. ERROR in X.java (at line 2)\n" +
 		"	@NonNull public class X {\n" +
 		"	^^^^^^^^\n" +
-		"The annotation @NonNull is disallowed for this location\n" +
+		((this.complianceLevel < ClassFileConstants.JDK1_8)
+		? "The annotation @NonNull is disallowed for this location\n"
+		: "The nullness annotation 'NonNull' is not applicable at this location\n") +
 		"----------\n",
 		this.LIBS,
 		false/*shouldFlush*/);
@@ -2092,8 +2081,30 @@
 		"----------\n" +
 		"1. ERROR in X.java (at line 3)\n" +
 		"	@NonNull void foo() {}\n" +
-		"	^^^^^^^^^^^^^\n" +
-		"The nullness annotation @NonNull is not applicable for the primitive type void\n" +
+		"	^^^^^^^^\n" + 
+		((this.complianceLevel < ClassFileConstants.JDK1_8)
+			? "The nullness annotation @NonNull is not applicable for the primitive type void\n"
+			: "Type annotation is illegal for a method that returns void\n") +
+		"----------\n",
+		this.LIBS,
+		false/*shouldFlush*/);
+}
+
+// a null annotation is illegally used on an int method:
+public void test_illegal_annotation_003b() {
+	runNegativeTest(
+		new String[] {
+			"X.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public class X {\n" +
+			"	@NonNull int foo() { return 1; }\n" +
+			"}\n"
+		},
+		"----------\n" +
+		"1. ERROR in X.java (at line 3)\n" +
+		"	@NonNull int foo() { return 1; }\n" +
+		"	^^^^^^^^\n" + 
+		"The nullness annotation @NonNull is not applicable for the primitive type int\n" +
 		"----------\n",
 		this.LIBS,
 		false/*shouldFlush*/);
@@ -2112,7 +2123,7 @@
 		"----------\n" +
 		"1. ERROR in X.java (at line 3)\n" +
 		"	void foo(@Nullable int i) {}\n" +
-		"	         ^^^^^^^^^^^^^\n" +
+		"	         ^^^^^^^^^\n" +
 		"The nullness annotation @Nullable is not applicable for the primitive type int\n" +
 		"----------\n",
 		this.LIBS,
@@ -2135,7 +2146,7 @@
 		"----------\n" +
 		"1. ERROR in X.java (at line 4)\n" +
 		"	@Nullable int i = 3;\n" +
-		"	^^^^^^^^^^^^^\n" +
+		"	^^^^^^^^^\n" +
 		"The nullness annotation @Nullable is not applicable for the primitive type int\n" +
 		"----------\n",
 		this.LIBS,
@@ -2210,6 +2221,28 @@
 		"----------\n");
 }
 
+// a null annotation is illegally used on a constructor:
+public void test_illegal_annotation_008() {
+	runNegativeTest(
+		new String[] {
+			"X.java",
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public class X {\n" +
+			"	@NonNull X() {}\n" +
+			"}\n"
+		},
+		"----------\n" +
+		"1. ERROR in X.java (at line 3)\n" +
+		"	@NonNull X() {}\n" +
+		"	^^^^^^^^\n" +
+		((this.complianceLevel < ClassFileConstants.JDK1_8)
+		 ? "The annotation @NonNull is disallowed for this location\n"
+		 : "The nullness annotation 'NonNull' is not applicable at this location\n" ) +
+		"----------\n",
+		this.LIBS,
+		false/*shouldFlush*/);
+}
+
 public void test_default_nullness_002() {
 	Map customOptions = getCompilerOptions();
 //	customOptions.put(CompilerOptions.OPTION_ReportPotentialNullSpecViolation, JavaCore.ERROR);
@@ -2290,7 +2323,7 @@
 		"2. ERROR in p2\\Y.java (at line 6)\n" +
 		"	bar(o);\n" +
 		"	    ^\n" +
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("Object") +
 		"----------\n");
 }
 // package level default is consumed from package-info.class, similarly for type level default
@@ -2342,12 +2375,12 @@
 		"2. ERROR in p2\\Y.java (at line 6)\n" +
 		"	bar(o);\n" +
 		"	    ^\n" +
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("Object") +
 		"----------\n" +
 		"3. ERROR in p2\\Y.java (at line 7)\n" +
 		"	accept(o);\n" +
 		"	       ^\n" +
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("Object") +
 		"----------\n");
 }
 // same as test_default_nullness_003a, but default-induced annotations are combined with explicit ones (not null related)
@@ -2405,12 +2438,12 @@
 		"2. ERROR in p2\\Y.java (at line 6)\n" +
 		"	bar(o);\n" +
 		"	    ^\n" +
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("Object") +
 		"----------\n" +
 		"3. ERROR in p2\\Y.java (at line 7)\n" +
 		"	accept(o);\n" +
 		"	       ^\n" +
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("Object") +
 		"----------\n");
 }
 // don't apply type-level default to non-reference type
@@ -2832,7 +2865,7 @@
 		"4. ERROR in X.java (at line 11)\n" + 
 		"	iFoo = arg;\n" + 
 		"	       ^^^\n" + 
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" + 
+		mismatch_NonNull_Nullable("Object") + 
 		"----------\n");
 }
 
@@ -3255,7 +3288,7 @@
 		"2. ERROR in X.java (at line 10)\n" +
 		"	print(s);\n" +
 		"	      ^\n" +
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("String") +
 		"----------\n" +
 		"3. ERROR in X.java (at line 15)\n" +
 		"	print(s);\n" +
@@ -3307,7 +3340,7 @@
 		"1. ERROR in X.java (at line 10)\n" +
 		"	print(s);\n" +
 		"	      ^\n" +
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("String") +
 		"----------\n" +
 		"2. ERROR in X.java (at line 16)\n" +
 		"	print(s);\n" +
@@ -3354,7 +3387,7 @@
 		"1. ERROR in X.java (at line 12)\n" +
 		"	print(s);\n" +
 		"	      ^\n" +
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("String") +
 		"----------\n" +
 		"2. ERROR in X.java (at line 19)\n" +
 		"	print(s);\n" +
@@ -3468,8 +3501,8 @@
 		"----------\n" + 
 		"1. WARNING in Bug370930.java (at line 5)\n" + 
 		"	for(@NonNull String s: list) { // warning here: insufficient info on elements\n" + 
-		"	                       ^^^^\n" + 
-		"Null type safety: The expression of type String needs unchecked conversion to conform to \'@NonNull String\'\n" + 
+		"	                       ^^^^\n" +
+		nullTypeSafety() + "The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" +
 		"----------\n");
 }
 //Bug 370930 - NonNull annotation not considered for enhanced for loops over array
@@ -3492,7 +3525,7 @@
 		"1. WARNING in Bug370930.java (at line 4)\n" + 
 		"	for(@NonNull String s: array) { // warning here: insufficient info on elements\n" + 
 		"	                       ^^^^^\n" + 
-		"Null type safety: The expression of type String needs unchecked conversion to conform to \'@NonNull String\'\n" + 
+		nullTypeSafety() + "The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" +
 		"----------\n");
 }
 //Bug 370930 - NonNull annotation not considered for enhanced for loops
@@ -3516,7 +3549,7 @@
 		"1. ERROR in Bug370930.java (at line 6)\n" + 
 		"	expectNonNull(s); // warning here\n" + 
 		"	              ^\n" + 
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" + 
+		mismatch_NonNull_Nullable("String") + 
 		"----------\n");
 }
 public void test_assignment_expression_1() {
@@ -3595,7 +3628,7 @@
 		"1. ERROR in X.java (at line 16)\n" +
 		"	print(s2);\n" +
 		"	      ^^\n" +
-		"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" +
+		mismatch_NonNull_Nullable("String") +
 		"----------\n" +
 		"2. ERROR in X.java (at line 25)\n" +
 		"	@NonNull String s3R = s3;\n" +
@@ -3957,12 +3990,12 @@
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	return o == null;\n" + 
 		"	       ^\n" + 
-		"Null comparison always yields false: The field o is declared as @NonNull\n" + 
+		checkAlwaysFalse_nonnull("The field o", "Object") +
 		"----------\n" + 
 		"2. ERROR in X.java (at line 8)\n" + 
 		"	return this.o != null;\n" + 
-		"	            ^\n" + 
-		"Redundant null check: The field o is declared as @NonNull\n" + 
+		"	            ^\n" +
+		redundant_check_nonnull("The field o", "@NonNull Object") +
 		"----------\n");
 }
 
@@ -3988,12 +4021,12 @@
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	if (o != null)\n" + 
 		"	    ^\n" + 
-		"Redundant null check: The field o is declared as @NonNull\n" + 
+		redundant_check_nonnull("The field o", "@NonNull Object") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 8)\n" + 
 		"	return this.o == null;\n" + 
 		"	            ^\n" + 
-		"Null comparison always yields false: The field o is declared as @NonNull\n" + 
+		checkAlwaysFalse_nonnull("The field o", "Object") +
 		"----------\n");
 }
 
@@ -4030,12 +4063,12 @@
 		"1. ERROR in X.java (at line 7)\n" + 
 		"	if (Objects.o != null) // redundant\n" + 
 		"	            ^\n" + 
-		"Redundant null check: The field o is declared as @NonNull\n" + 
+		redundant_check_nonnull("The field o", "@NonNull Object") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 13)\n" + 
 		"	if (null != Objects.o) // redundant\n" + 
 		"	                    ^\n" + 
-		"Redundant null check: The field o is declared as @NonNull\n" + 
+		redundant_check_nonnull("The field o", "@NonNull Object") + 
 		"----------\n");
 }
 
@@ -4066,7 +4099,7 @@
 		"1. ERROR in X.java (at line 7)\n" + 
 		"	if (objs.o == null) // always false\n" + 
 		"	         ^\n" + 
-		"Null comparison always yields false: The field o is declared as @NonNull\n" + 
+		checkAlwaysFalse_nonnull("The field o", "Object") + 
 		"----------\n" + 
 		"2. WARNING in X.java (at line 8)\n" + 
 		"	System.out.print(\"not null\");\n" + 
@@ -4106,12 +4139,12 @@
 		"1. ERROR in X.java (at line 8)\n" + 
 		"	if (this.objs.o != null) // redundant\n" + 
 		"	              ^\n" + 
-		"Redundant null check: The field o is declared as @NonNull\n" + 
+		redundant_check_nonnull("The field o", "@NonNull Object") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 11)\n" + 
 		"	if (getObjs().o != null) // redundant\n" + 
-		"	              ^\n" + 
-		"Redundant null check: The field o is declared as @NonNull\n" + 
+		"	              ^\n" +
+		redundant_check_nonnull("The field o", "@NonNull Object") + 
 		"----------\n");
 }
 
@@ -4139,7 +4172,7 @@
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	o = x;\n" + 
 		"	    ^\n" + 
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" + 
+		mismatch_NonNull_Nullable("Object") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 10)\n" + 
 		"	objs.o = null;\n" + 
@@ -4163,7 +4196,7 @@
 		"----------\n" + 
 		"1. ERROR in X.java (at line 3)\n" + 
 		"	@NonNull int o = 1;\n" + 
-		"	^^^^^^^^^^^^\n" + 
+		"	^^^^^^^^\n" + 
 		"The nullness annotation @NonNull is not applicable for the primitive type int\n" + 
 		"----------\n");
 }
@@ -4354,8 +4387,8 @@
 		"----------\n" + 
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	return this.o.toString();\n" + 
-		"	            ^\n" + 
-		"Potential null pointer access: The field o is declared as @Nullable\n" + 
+		"	            ^\n" +
+		potNPE_nullable("The field o") + 
 		"----------\n");
 }
 // access to a nullable field - single name reference
@@ -4377,7 +4410,7 @@
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	return o.toString();\n" + 
 		"	       ^\n" + 
-		"Potential null pointer access: The field o is declared as @Nullable\n" + 
+		potNPE_nullable("The field o") +
 		"----------\n");
 }
 // access to a nullable field - qualified name reference
@@ -4400,12 +4433,12 @@
 		"1. ERROR in X.java (at line 6)\n" +
 		"	return other.o.toString();\n" +
 		"	       ^^^^^\n" +
-		"Potential null pointer access: The field other is declared as @Nullable\n" +
+		potNPE_nullable("The field other") +
 		"----------\n" +
 		"2. ERROR in X.java (at line 6)\n" +
 		"	return other.o.toString();\n" +
 		"	             ^\n" +
-		"Potential null pointer access: The field o is declared as @Nullable\n" +
+		potNPE_nullable("The field o") +
 		"----------\n");
 }
 // access to a nullable field - qualified name reference - multiple segments
@@ -4428,17 +4461,17 @@
 		"1. ERROR in X.java (at line 6)\n" +
 		"	return other.other.o.toString();\n" +
 		"	       ^^^^^\n" +
-		"Potential null pointer access: The field other is declared as @Nullable\n" +
+		potNPE_nullable("The field other") +
 		"----------\n" +
 		"2. ERROR in X.java (at line 6)\n" +
 		"	return other.other.o.toString();\n" +
 		"	             ^^^^^\n" +
-		"Potential null pointer access: The field other is declared as @Nullable\n" +
+		potNPE_nullable("The field other") +
 		"----------\n" +
 		"3. ERROR in X.java (at line 6)\n" +
 		"	return other.other.o.toString();\n" +
 		"	                   ^\n" +
-		"Potential null pointer access: The field o is declared as @Nullable\n" +
+		potNPE_nullable("The field o") +
 		"----------\n");
 }
 // access to a nullable field - dereference after check
@@ -4476,12 +4509,12 @@
 		"1. ERROR in X.java (at line 12)\n" + 
 		"	String local = o.toString();\n" + 
 		"	               ^\n" + 
-		"Potential null pointer access: The field o is declared as @Nullable\n" + 
+		potNPE_nullable("The field o") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 15)\n" + 
 		"	return this.o.toString(); // warn here\n" + 
 		"	            ^\n" + 
-		"Potential null pointer access: The field o is declared as @Nullable\n" + 
+		potNPE_nullable("The field o") + 
 		"----------\n");
 }
 
@@ -4513,8 +4546,8 @@
 		"----------\n" + 
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	return y.z.o.toString(); // pot.NPE on z\n" + 
-		"	         ^\n" + 
-		"Potential null pointer access: The field z is declared as @Nullable\n" + 
+		"	         ^\n" +
+		potNPE_nullable("The field z") + 
 		"----------\n");
 }
 
@@ -4548,12 +4581,12 @@
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	return y.z.o.toString(); // pot.NPE on y and o\n" + 
 		"	       ^\n" + 
-		"Potential null pointer access: The field y is declared as @Nullable\n" + 
+		potNPE_nullable("The field y") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 5)\n" + 
 		"	return y.z.o.toString(); // pot.NPE on y and o\n" + 
 		"	           ^\n" + 
-		"Potential null pointer access: The field o is declared as @Nullable\n" + 
+		potNPE_nullable("The field o") + 
 		"----------\n");
 }
 
@@ -4580,13 +4613,13 @@
 		"----------\n" + 
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	return this.y.o.toString(); // pot.NPE on y and o\n" + 
-		"	            ^\n" + 
-		"Potential null pointer access: The field y is declared as @Nullable\n" + 
+		"	            ^\n" +
+		potNPE_nullable("The field y") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 5)\n" + 
 		"	return this.y.o.toString(); // pot.NPE on y and o\n" + 
-		"	              ^\n" + 
-		"Potential null pointer access: The field o is declared as @Nullable\n" + 
+		"	              ^\n" +
+		potNPE_nullable("The field o") + 
 		"----------\n");
 }
 
@@ -4625,7 +4658,7 @@
 			"----------\n" + 
 			"1. ERROR in X.java (at line 3)\n" + 
 			"	@Nullable int i;\n" + 
-			"	^^^^^^^^^^^^^\n" + 
+			"	^^^^^^^^^\n" + 
 			"The nullness annotation @Nullable is not applicable for the primitive type int\n" + 
 			"----------\n");	
 }
@@ -4699,37 +4732,37 @@
 		"1. ERROR in X.java (at line 7)\n" + 
 		"	System.out.println(other.o1.toString());\n" + 
 		"	                         ^^\n" + 
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o1") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 10)\n" + 
 		"	System.out.println(o2.toString());\n" + 
 		"	                   ^^\n" + 
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o2") + 
 		"----------\n" + 
 		"3. ERROR in X.java (at line 12)\n" + 
 		"	System.out.println(this.o2.toString());\n" + 
 		"	                        ^^\n" + 
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o2") + 
 		"----------\n" + 
 		"4. ERROR in X.java (at line 13)\n" + 
 		"	System.out.println (null != o3 ? o3.toString() : \"nothing\");\n" + 
 		"	                                 ^^\n" + 
-		"Potential null pointer access: The field o3 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o3") + 
 		"----------\n" + 
 		"5. ERROR in X.java (at line 15)\n" + 
 		"	System.out.println(x.o1.toString());\n" + 
 		"	                     ^^\n" + 
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o1") + 
 		"----------\n" + 
 		"6. ERROR in X.java (at line 17)\n" + 
 		"	System.out.println(this.x.o1.toString());\n" + 
 		"	                          ^^\n" + 
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o1") + 
 		"----------\n" + 
 		"7. ERROR in X.java (at line 19)\n" + 
 		"	System.out.println(this.x.o1.toString());\n" + 
 		"	                          ^^\n" + 
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o1") + 
 		"----------\n");
 }
 
@@ -4767,22 +4800,22 @@
 		"1. ERROR in X.java (at line 8)\n" +
 		"	System.out.println(o2.toString()); // warn here: disjunktion is no protection\n" +
 		"	                   ^^\n" +
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" +
+		potNPE_nullable("The field o2") +
 		"----------\n" +
 		"2. ERROR in X.java (at line 10)\n" +
 		"	System.out.println(o1.toString()); // warn here: negated inequality is no protection\n" +
 		"	                   ^^\n" +
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" +
+		potNPE_nullable("The field o1") +
 		"----------\n" +
 		"3. ERROR in X.java (at line 14)\n" +
 		"	System.out.println(o2.toString()); // warn here: negated conjunction is no protection\n" +
 		"	                   ^^\n" +
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" +
+		potNPE_nullable("The field o2") +
 		"----------\n" +
 		"4. ERROR in X.java (at line 16)\n" +
 		"	System.out.println(o1.toString()); // warn here: double negation is no protection\n" +
 		"	                   ^^\n" +
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" +
+		potNPE_nullable("The field o1") +
 		"----------\n");
 }
 
@@ -4815,7 +4848,7 @@
 		"1. ERROR in X.java (at line 12)\n" + 
 		"	System.out.println(o1.toString()); // info is expired\n" + 
 		"	                   ^^\n" + 
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o1") + 
 		"----------\n");
 }
 
@@ -4856,7 +4889,7 @@
 		"2. ERROR in X.java (at line 6)\n" + 
 		"	System.out.println(this.o2.toString()); // field access is not protected\n" + 
 		"	                        ^^\n" + 
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o2") + 
 		"----------\n" + 
 		"3. WARNING in X.java (at line 12)\n" + 
 		"	Y o1 = new Y();\n" + 
@@ -4866,12 +4899,12 @@
 		"4. ERROR in X.java (at line 14)\n" + 
 		"	System.out.println(this.o1.o2.toString()); // field access via other field not protected\n" + 
 		"	                           ^^\n" + 
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o2") + 
 		"----------\n" + 
 		"5. ERROR in X.java (at line 16)\n" + 
 		"	System.out.println(o1.o2.toString()); // field access via local not protected\n" + 
 		"	                      ^^\n" + 
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o2") + 
 		"----------\n");
 }
 
@@ -4900,12 +4933,12 @@
 		"1. ERROR in X.java (at line 5)\n" + 
 		"	if (o1 != null && o1 != null) // second term is redundant\n" + 
 		"	                  ^^\n" + 
-		"Redundant null check: this expression cannot be null\n" + 
+		"Redundant null check: The field o1 cannot be null at this location (ignoring concurrency)\n" + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 8)\n" + 
 		"	if (o1 != null) // this if is redundant\n" + 
 		"	    ^^\n" + 
-		"Redundant null check: this expression cannot be null\n" + 
+		"Redundant null check: The field o1 cannot be null at this location (ignoring concurrency)\n" + 
 		"----------\n");
 }
 
@@ -5015,22 +5048,22 @@
 		"1. ERROR in X.java (at line 6)\n" + 
 		"	System.out.println(goo()+other.o1.toString()); // warn here: expired by call to goo()\n" + 
 		"	                               ^^\n" + 
-		"Potential null pointer access: The field o1 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o1") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 9)\n" + 
 		"	System.out.println(o2.toString()); // warn here: not protected\n" +
 		"	                   ^^\n" + 
-		"Potential null pointer access: The field o2 is declared as @Nullable\n" +
+		potNPE_nullable("The field o2") +
 		"----------\n" +
 		"3. ERROR in X.java (at line 11)\n" + 
 		"	System.out.println(o3.toString()); // warn here: expired by empty statement\n" + 
 		"	                   ^^\n" + 
-		"Potential null pointer access: The field o3 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o3") + 
 		"----------\n" + 
 		"4. ERROR in X.java (at line 13)\n" + 
 		"	System.out.println(o4.toString()); // warn here: expired by call to hoo()\n" + 
 		"	                   ^^\n" + 
-		"Potential null pointer access: The field o4 is declared as @Nullable\n" + 
+		potNPE_nullable("The field o4") + 
 		"----------\n");
 }
 
@@ -5058,7 +5091,7 @@
 		"1. ERROR in X.java (at line 7)\n" + 
 		"	this.o2 = other.o1; // warn here: assign @Nullable to @NonNull\n" + 
 		"	          ^^^^^^^^\n" + 
-		"Null type mismatch: required \'@NonNull Object\' but the provided value is specified as @Nullable\n" + 
+		mismatch_NonNull_Nullable("Object") + 
 		"----------\n");
 }
 
@@ -5107,7 +5140,7 @@
 		"1. ERROR in X.java (at line 6)\n" + 
 		"	return this.o.toString(); // warn here, check has no effect\n" + 
 		"	            ^\n" + 
-		"Potential null pointer access: The field o is declared as @Nullable\n" + 
+		potNPE_nullable("The field o") + 
 		"----------\n");
 }
 
@@ -5136,17 +5169,17 @@
 		"1. ERROR in X.java (at line 8)\n" + 
 		"	((Number)nullable).intValue(); // A\n" + 
 		"	         ^^^^^^^^\n" + 
-		"Potential null pointer access: The field nullable is declared as @Nullable\n" + 
+		potNPE_nullable("The field nullable") + 
 		"----------\n" + 
 		"2. ERROR in X.java (at line 11)\n" + 
 		"	nullable.toString(); // B\n" + 
 		"	^^^^^^^^\n" + 
-		"Potential null pointer access: The field nullable is declared as @Nullable\n" + 
+		potNPE_nullable("The field nullable") + 
 		"----------\n" + 
 		"3. ERROR in X.java (at line 13)\n" + 
 		"	nullable.toString(); // C\n" + 
 		"	^^^^^^^^\n" + 
-		"Potential null pointer access: The field nullable is declared as @Nullable\n" + 
+		potNPE_nullable("The field nullable") + 
 		"----------\n");
 }
 // an enum is declared within the scope of a null-default
@@ -5247,7 +5280,7 @@
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=374129  - more tests for bug 372011
 // Test whether @NonNullByDefault on a binary package or an enclosing type is respected from enclosed elements.
 public void testBug374129() {
-	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test374129.jar";
+	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test374129"+this.TEST_JAR_SUFFIX;
 	/* content of Test372129.jar:
 	 	p1bin/package-info.java:
 	 		@org.eclipse.jdt.annotation.NonNullByDefault
@@ -5331,27 +5364,27 @@
 			"1. ERROR in bug374129\\Test.java (at line 22)\n" + 
 			"	s = c1.getId(n, n); // error on first arg (package default)\n" + 
 			"	             ^\n" + 
-			"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" + 
+			mismatch_NonNull_Nullable("String") + 
 			"----------\n" + 
 			"2. ERROR in bug374129\\Test.java (at line 23)\n" + 
 			"	s = c1i.getId(n, n); // error on first arg (package default propagated into inner)\n" + 
 			"	              ^\n" + 
-			"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" + 
+			mismatch_NonNull_Nullable("String") + 
 			"----------\n" + 
 			"3. ERROR in bug374129\\Test.java (at line 24)\n" + 
 			"	s = c2.getId(n, n); // error on first arg (type default)\n" + 
 			"	             ^\n" + 
-			"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" + 
+			mismatch_NonNull_Nullable("String") + 
 			"----------\n" + 
 			"4. WARNING in bug374129\\Test.java (at line 25)\n" + 
 			"	s = c2i.getId(n, n); // no arg error (canceled default), return requires unchecked conversion\n" + 
 			"	    ^^^^^^^^^^^^^^^\n" + 
-			"Null type safety: The expression of type String needs unchecked conversion to conform to \'@NonNull String\'\n" + 
+			nullTypeSafety() + "The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" + 
 			"----------\n" + 
 			"5. ERROR in bug374129\\Test.java (at line 26)\n" + 
 			"	s = c3.getId(n, n); // error on first arg (method default)\n" + 
 			"	             ^\n" + 
-			"Null type mismatch: required \'@NonNull String\' but the provided value is specified as @Nullable\n" + 
+			mismatch_NonNull_Nullable("String") + 
 			"----------\n",
 		libs,
 		true /* shouldFlush*/);
@@ -5463,7 +5496,7 @@
 		"1. ERROR in X.java (at line 7)\n" + 
 		"	System.out.println(a.toString());\n" + 
 		"	                   ^\n" + 
-		"Potential null pointer access: The variable a may be null at this location\n" + 
+		variableMayBeNull("a") + 
 		"----------\n");
 }
 
@@ -5532,7 +5565,7 @@
 // Test whether null annotations from a super interface are respected
 // Class and its super interface both read from binary
 public void testBug388281_01() {
-	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281.jar";
+	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281"+this.TEST_JAR_SUFFIX;
 	String[] libs = new String[this.LIBS.length + 1];
 	System.arraycopy(this.LIBS, 0, libs, 0, this.LIBS.length);
 	libs[this.LIBS.length] = path;
@@ -5569,7 +5602,7 @@
 // Test whether null annotations from a super interface are respected
 // Class from source, its supers (class + super interface) from binary
 public void testBug388281_02() {
-	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281.jar";
+	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281"+this.TEST_JAR_SUFFIX;
 	String[] libs = new String[this.LIBS.length + 1];
 	System.arraycopy(this.LIBS, 0, libs, 0, this.LIBS.length);
 	libs[this.LIBS.length] = path;
@@ -5603,8 +5636,8 @@
 		"----------\n" + 
 		"1. ERROR in ctest\\C.java (at line 5)\n" + 
 		"	System.out.println(a1.toString());   // (1)\n" + 
-		"	                   ^^\n" + 
-		"Potential null pointer access: The variable a1 may be null at this location\n" + 
+		"	                   ^^\n" +
+		potNPE_nullable_maybenull("The variable a1") +
 		"----------\n" + 
 		"2. ERROR in ctest\\C.java (at line 6)\n" + 
 		"	return null;                         // (2)\n" + 
@@ -5631,7 +5664,7 @@
 // Test whether null annotations from a super interface trigger an error against the overriding implementation
 // Class from source, its super interface from binary
 public void testBug388281_03() {
-	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281.jar";
+	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281"+this.TEST_JAR_SUFFIX;
 	String[] libs = new String[this.LIBS.length + 1];
 	System.arraycopy(this.LIBS, 0, libs, 0, this.LIBS.length);
 	libs[this.LIBS.length] = path;
@@ -5659,8 +5692,8 @@
 		"----------\n" + 
 		"1. ERROR in ctest\\C.java (at line 4)\n" + 
 		"	System.out.println(a1.toString());   // (1)\n" + 
-		"	                   ^^\n" + 
-		"Potential null pointer access: The variable a1 may be null at this location\n" + 
+		"	                   ^^\n" +
+		potNPE_nullable_maybenull("The variable a1") +
 		"----------\n" + 
 		"2. ERROR in ctest\\C.java (at line 5)\n" + 
 		"	return null;                         // (2)\n" + 
@@ -5669,8 +5702,8 @@
 		"----------\n" + 
 		"3. ERROR in ctest\\C.java (at line 12)\n" + 
 		"	System.out.println(a1.toString());   // (3)\n" + 
-		"	                   ^^\n" + 
-		"Potential null pointer access: The variable a1 may be null at this location\n" + 
+		"	                   ^^\n" +
+		potNPE_nullable_maybenull("The variable a1") +
 		"----------\n",
 		libs,		
 		true /* shouldFlush*/,
@@ -5712,7 +5745,7 @@
 		"1. ERROR in ctest\\C.java (at line 5)\n" + 
 		"	System.out.println(s2.toString());   // (1)\n" + 
 		"	                   ^^\n" + 
-		"Potential null pointer access: The variable s2 may be null at this location\n" + 
+		variableMayBeNull("s2") +
 		"----------\n" + 
 		"2. ERROR in ctest\\C.java (at line 6)\n" + 
 		"	return null;                         // (2)\n" + 
@@ -5722,7 +5755,7 @@
 		"3. ERROR in ctest\\C.java (at line 9)\n" + 
 		"	System.out.println(s1.toString());   // (3)\n" + 
 		"	                   ^^\n" + 
-		"Potential null pointer access: The variable s1 may be null at this location\n" + 
+		variableMayBeNull("s1") +
 		"----------\n");
 }
 
@@ -5731,7 +5764,7 @@
 // Class from source, its super interface from binary
 // Super interface subject to package level @NonNullByDefault
 public void testBug388281_05() {
-	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281.jar";
+	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281"+this.TEST_JAR_SUFFIX;
 	String[] libs = new String[this.LIBS.length + 1];
 	System.arraycopy(this.LIBS, 0, libs, 0, this.LIBS.length);
 	libs[this.LIBS.length] = path;
@@ -5784,7 +5817,7 @@
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=388281
 // Conflicting annotations from several indirect super interfaces must be detected
 public void testBug388281_06() {
-	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281.jar";
+	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281"+this.TEST_JAR_SUFFIX;
 	String[] libs = new String[this.LIBS.length + 1];
 	System.arraycopy(this.LIBS, 0, libs, 0, this.LIBS.length);
 	libs[this.LIBS.length] = path;
@@ -5864,7 +5897,7 @@
 		"3. ERROR in p2\\Sub.java (at line 7)\n" + 
 		"	System.out.println(arg.toString()); // (1)\n" + 
 		"	                   ^^^\n" + 
-		"Potential null pointer access: The variable arg may be null at this location\n" + 
+		variableMayBeNull("arg") +
 		"----------\n" + 
 		"----------\n" + 
 		"1. ERROR in Client.java (at line 4)\n" + 
@@ -5877,7 +5910,7 @@
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=388281
 // report conflict between inheritance and default - binary types
 public void testBug388281_08() {
-	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281.jar";
+	String path = this.getCompilerTestsPluginDirectoryPath() + File.separator + "workspace" + File.separator + "Test388281"+this.TEST_JAR_SUFFIX;
 	String[] libs = new String[this.LIBS.length + 1];
 	System.arraycopy(this.LIBS, 0, libs, 0, this.LIBS.length);
 	libs[this.LIBS.length] = path;
@@ -5921,8 +5954,8 @@
 		"----------\n" + 
 		"3. ERROR in ctest\\Ctest.java (at line 12)\n" + 
 		"	System.out.println(o1.toString()); // (1) inherited @Nullable\n" + 
-		"	                   ^^\n" + 
-		"Potential null pointer access: The variable o1 may be null at this location\n" + 
+		"	                   ^^\n" +
+		potNPE_nullable_maybenull("The variable o1") +
 		"----------\n" + 
 		"4. ERROR in ctest\\Ctest.java (at line 13)\n" + 
 		"	return null; // (2) @NonNullByDefault in i2.II\n" + 
@@ -6113,7 +6146,7 @@
 			"1. ERROR in X.java (at line 11)\n" + 
 			"	return o1.length(); // no longer protected\n" + 
 			"	       ^^\n" + 
-			"Potential null pointer access: The field o1 is declared as @Nullable\n" + 
+			potNPE_nullable("The field o1") + 
 			"----------\n");
 }
 //https://bugs.eclipse.org/400761: [compiler][null] null may be return as boolean without a diagnostic
@@ -6292,6 +6325,131 @@
 		"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
 		"----------\n");
 }
+
+// missing type in constructor declaration must not cause NPE in QAE#resolveType(..)
+public void testBug415850_a() {
+	this.runNegativeTest(
+			new String[] {
+				"X.java", //-----------------------------------------------------------------------
+				"public class X {\n" +
+				"	void foo(X1 x1) {\n" +
+				"		Object o = new X1(x1){};\n" +
+				"	}\n" +
+				"}\n",
+				"X1.java", //-----------------------------------------------------------------------
+				"public class X1 {\n" +
+				"	public X1(Zork z) {}\n" +
+				"}\n"
+			},
+			"----------\n" +
+			"1. ERROR in X.java (at line 3)\n" +
+			"	Object o = new X1(x1){};\n" +
+			"	               ^^^^^^\n" +
+			"The constructor X1(Zork) refers to the missing type Zork\n" +
+			"----------\n" +
+			"----------\n" +
+			"1. ERROR in X1.java (at line 2)\n" +
+			"	public X1(Zork z) {}\n" +
+			"	          ^^^^\n" +
+			"Zork cannot be resolved to a type\n" +
+			"----------\n");
+}
+
+// avoid NPE in BinaryTypeBinding.getField(..) due to recursive dependency enum->package-info->annotation->enum 
+public void testBug415850_b() {
+	runConformTestWithLibs(
+		new String[] {
+			"p/package-info.java",
+			"@p.Annot(state=p.MyEnum.BROKEN)\n" + 
+			"package p;",
+			"p/Annot.java",
+			"package p;\n" + 
+			"@Annot(state=MyEnum.KO)\n" + 
+			"public @interface Annot {\n" + 
+			"	MyEnum state() default MyEnum.KO;\n" + 
+			"}",
+			"p/MyEnum.java",
+			"package p;\n" + 
+			"@Annot(state=MyEnum.KO)\n" + 
+			"public enum MyEnum {\n" + 
+			"	WORKS, OK, KO, BROKEN, ;\n" + 
+			"}",
+			"test180/Test.java",
+			"package test180;\n" +
+			"import p.MyEnum;\n" + 
+			"import p.Annot;\n" + 
+			"@Annot(state=MyEnum.OK)\n" + 
+			"public class Test {}",
+		},
+		getCompilerOptions(),
+		""
+	);
+	Map options = getCompilerOptions();
+	options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
+	runConformTestWithLibs(
+		new String[] {
+			"X.java",
+			"import test180.Test;\n" +
+			"public class X {\n" + 
+			"	public static void main(String[] args) {\n" + 
+			"		System.out.println(Test.class);\n" + 
+			"	}\n" + 
+			"}"
+		},
+		options,
+		"",
+		"class test180.Test");
+}
+public void testBug417295_5() {
+	runNegativeTestWithLibs(
+		new String[] {
+			"AllAreNonNull.java",
+			"@org.eclipse.jdt.annotation.NonNullByDefault\n" +
+			"public class AllAreNonNull {\n" + 
+			"	String s3 = \"\";\n" + 
+			"	void test() {\n" + 
+			"		this.s3 = null;\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in AllAreNonNull.java (at line 5)\n" + 
+		"	this.s3 = null;\n" + 
+		"	          ^^^^\n" + 
+		"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+		"----------\n");
+}
+public void testBug417295_7() {
+	runConformTestWithLibs(
+			new String[] {
+				"p1/AllAreNonNull.java",
+				"package p1;\n" +
+				"@org.eclipse.jdt.annotation.NonNullByDefault\n" +
+				"public class AllAreNonNull {\n" + 
+				"	public String s3 = \"\";\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"");
+	runNegativeTestWithLibs(
+		false,
+		new String[] {
+			"Client.java",
+			"public class Client {\n" + 
+			"	void test(p1.AllAreNonNull aann) {\n" + 
+			"		aann.s3 = null;\n" + 
+			"	}\n" + 
+			"}\n"
+		},
+		getCompilerOptions(),
+		"----------\n" + 
+		"1. ERROR in Client.java (at line 3)\n" + 
+		"	aann.s3 = null;\n" + 
+		"	          ^^^^\n" + 
+		"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+		"----------\n");
+}
+
 // Bug 415413 - [compiler][null] NullpointerException in Null Analysis caused by interaction of LoopingFlowContext and FinallyFlowContext
 public void testBug415413() {
 	Map options = getCompilerOptions();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
new file mode 100644
index 0000000..0066674
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullTypeAnnotationTest.java
@@ -0,0 +1,3258 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.JavaCore;
+
+public class NullTypeAnnotationTest extends AbstractNullAnnotationTest {
+
+	public NullTypeAnnotationTest(String name) {
+		super(name);
+	}
+
+	// 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[] { "testConditional2" };
+//			TESTS_NUMBERS = new int[] { 561 };
+//			TESTS_RANGE = new int[] { 1, 2049 };
+	}
+
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+
+	public static Class testClass() {
+		return NullTypeAnnotationTest.class;
+	}
+
+	// a list with nullable elements is used
+	public void test_nonnull_list_elements_01() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "import java.util.List;\n" +
+				  "public class X {\n" +
+				  "    void foo(List<@Nullable Object> l) {\n" +
+				  "        System.out.print(l.get(0).toString()); // problem: retrieved element can be null\n" +
+				  "        l.add(null);\n" +
+				  "    }\n" +
+				  "    void bar(java.util.List<@Nullable Object> l) {\n" +
+				  "        System.out.print(l.get(1).toString()); // problem: retrieved element can be null\n" +
+				  "        l.add(null);\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	System.out.print(l.get(0).toString()); // problem: retrieved element can be null\n" + 
+			"	                 ^^^^^^^^\n" + 
+			"Potential null pointer access: The method get(int) may return null\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	System.out.print(l.get(1).toString()); // problem: retrieved element can be null\n" + 
+			"	                 ^^^^^^^^\n" + 
+			"Potential null pointer access: The method get(int) may return null\n" + 
+			"----------\n");
+	}
+
+	// a list with nullable elements is used, custom annotations
+	public void test_nonnull_list_elements_01a() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_NULLABLE_ANNOTATION_NAME, "org.foo.Nullable");
+		customOptions.put(JavaCore.COMPILER_NONNULL_ANNOTATION_NAME, "org.foo.NonNull");
+		runNegativeTest(
+			new String[] {
+				CUSTOM_NULLABLE_NAME,
+				CUSTOM_NULLABLE_CONTENT_JSR308,
+				CUSTOM_NONNULL_NAME,
+				CUSTOM_NONNULL_CONTENT_JSR308,
+				"X.java",
+				  "import org.foo.*;\n" +
+				  "import java.util.List;\n" +
+				  "public class X {\n" +
+				  "    void foo(List<@Nullable Object> l) {\n" +
+				  "        System.out.print(l.get(0).toString()); // problem: retrieved element can be null\n" +
+				  "        l.add(null);\n" +
+				  "    }\n" +
+				  "    void bar(java.util.List<@Nullable Object> l) {\n" +
+				  "        System.out.print(l.get(1).toString()); // problem: retrieved element can be null\n" +
+				  "        l.add(null);\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	System.out.print(l.get(0).toString()); // problem: retrieved element can be null\n" + 
+			"	                 ^^^^^^^^\n" + 
+			"Potential null pointer access: The method get(int) may return null\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	System.out.print(l.get(1).toString()); // problem: retrieved element can be null\n" + 
+			"	                 ^^^^^^^^\n" + 
+			"Potential null pointer access: The method get(int) may return null\n" + 
+			"----------\n",
+			null,
+			true, /* shouldFlush*/
+			customOptions);
+	}
+
+	// a list with nullable elements is used, @Nullable is second annotation
+	public void test_nonnull_list_elements_02() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"Dummy.java",
+				"import static java.lang.annotation.ElementType.*;\n" +
+				"import java.lang.annotation.*;\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({METHOD,PARAMETER,LOCAL_VARIABLE,TYPE_USE})\n" +
+				"public @interface Dummy {\n" +
+				"}\n",
+				"X.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "import java.util.List;\n" +
+				  "public class X {\n" +
+				  "    void foo(List<@Dummy @Nullable Object> l) {\n" +
+				  "        System.out.print(l.get(0).toString()); // problem: retrieved element can be null\n" +
+				  "        l.add(null);\n" +
+				  "    }\n" +
+				  "    void bar(java.util.List<@Dummy @Nullable Object> l) {\n" +
+				  "        System.out.print(l.get(1).toString()); // problem: retrieved element can be null\n" +
+				  "        l.add(null);\n" +
+				  "    }\n" +
+				  "    void bar2(java.util.List<java.lang.@Dummy @Nullable Object> l2) {\n" +
+				  "        System.out.print(l2.get(1).toString()); // problem: retrieved element can be null\n" +
+				  "        l2.add(null);\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	System.out.print(l.get(0).toString()); // problem: retrieved element can be null\n" + 
+			"	                 ^^^^^^^^\n" + 
+			"Potential null pointer access: The method get(int) may return null\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	System.out.print(l.get(1).toString()); // problem: retrieved element can be null\n" + 
+			"	                 ^^^^^^^^\n" + 
+			"Potential null pointer access: The method get(int) may return null\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 13)\n" + 
+			"	System.out.print(l2.get(1).toString()); // problem: retrieved element can be null\n" + 
+			"	                 ^^^^^^^^^\n" + 
+			"Potential null pointer access: The method get(int) may return null\n" + 
+			"----------\n");
+	}
+
+	// a list with non-null elements is used, list itself is nullable
+	public void test_nonnull_list_elements_03() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"Dummy.java",
+				  "import static java.lang.annotation.ElementType.*;\n" +
+				  "import java.lang.annotation.*;\n" +
+				  "@Retention(RetentionPolicy.CLASS)\n" +
+				  "@Target({METHOD,PARAMETER,LOCAL_VARIABLE,TYPE_USE})\n" +
+				  "public @interface Dummy {\n" +
+				  "}\n",
+				"X.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "import java.util.List;\n" +
+				  "public class X {\n" +
+				  "    void foo(@Nullable List<@NonNull Object> l) {\n" +
+				  "        System.out.print(l.get(0).toString()); // problem: l may be null\n" +
+				  "        l.add(null); // problem: cannot insert 'null' into this list\n" +
+				  "    }\n" +
+				  "    void bar(@Nullable List<java.lang.@NonNull Object> l) {\n" +
+				  "        System.out.print(l.get(0).toString()); // problem: l may be null\n" +
+				  "        l.add(0, null); // problem: cannot insert 'null' into this list\n" +
+				  "    }\n" +
+				  "    void bar2(@Dummy java.util.@Nullable List<java.lang.@NonNull Object> l2) {\n" +
+				  "        System.out.print(l2.get(0).toString()); // problem: l2 may be null\n" +
+				  "        l2.add(0, null); // problem: cannot insert 'null' into this list\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	System.out.print(l.get(0).toString()); // problem: l may be null\n" + 
+			"	                 ^\n" + 
+			"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	l.add(null); // problem: cannot insert \'null\' into this list\n" + 
+			"	      ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull Object\' but the provided value is null\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 9)\n" + 
+			"	System.out.print(l.get(0).toString()); // problem: l may be null\n" + 
+			"	                 ^\n" + 
+			"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 10)\n" + 
+			"	l.add(0, null); // problem: cannot insert \'null\' into this list\n" + 
+			"	         ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull Object\' but the provided value is null\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 13)\n" + 
+			"	System.out.print(l2.get(0).toString()); // problem: l2 may be null\n" + 
+			"	                 ^^\n" + 
+			"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+			"----------\n" + 
+			"6. ERROR in X.java (at line 14)\n" + 
+			"	l2.add(0, null); // problem: cannot insert \'null\' into this list\n" + 
+			"	          ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull Object\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	// an outer and inner class both have a type parameter,
+	// client instantiates with nullable/nonnull actual type arguments
+	public void test_nestedType_01() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class A<X> {\n" +
+				  "    public class I<Y> {\n" +
+				  "        public X foo(Y l) {\n" +
+				  "            return null;\n" +
+				  "        }\n" +
+				  "    }\n" +
+				  "    void bar(A<@Nullable Object>.I<@NonNull Object> i) {\n" + // legal instantiation
+				  "        @NonNull Object o = i.foo(null); // problems: argument and assignment violate null contracts\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in A.java (at line 9)\n" + 
+			"	@NonNull Object o = i.foo(null); // problems: argument and assignment violate null contracts\n" + 
+			"	                    ^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required '@NonNull Object' but this expression has type '@Nullable Object'\n" + 
+			"----------\n" + 
+			"2. ERROR in A.java (at line 9)\n" + 
+			"	@NonNull Object o = i.foo(null); // problems: argument and assignment violate null contracts\n" + 
+			"	                          ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull Object\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	// an outer and inner class both have a type parameter,
+	// a subclass instantiates with nullable/nonnull actual type arguments
+	// and correctly implements an abstract inherited method
+	// compile errors only inside that method
+	public void test_nestedType_02() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "public class A<X> {\n" +
+				  "    public abstract class I<Y> {\n" +
+				  "        public abstract X foo(Y l);\n" +
+				  "        public X idX(X in) { return in; }\n" +
+				  "        public Y idY(Y in) { return in; }\n" +
+				  "    }\n" +
+				  "}\n",
+				"B.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class B extends A<@NonNull Object> {\n" +
+				  "    public class J extends I<@Nullable String> {\n" +
+				  "        @Override\n" +
+				  "        public @NonNull Object foo(@Nullable String l) {\n" +
+				  "            System.out.print(idX(null));\n" +
+				  "            return idY(null);\n" +
+				  "        }\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in B.java (at line 6)\n" + 
+			"	System.out.print(idX(null));\n" + 
+			"	                     ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull Object\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. ERROR in B.java (at line 7)\n" + 
+			"	return idY(null);\n" + 
+			"	       ^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required '@NonNull Object' but this expression has type '@Nullable String'\n" + 
+			"----------\n");
+	}
+
+	// an outer and inner class both have a type parameter,
+	// a subclass instantiates with nullable/nonnull actual type arguments
+	// and incorrectly implements an abstract inherited method
+	public void test_nestedType_03() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "public class A<X> {\n" +
+				  "    public abstract class I<Y> {\n" +
+				  "        public abstract X foo(Y l);\n" +
+				  "    }\n" +
+				  "}\n",
+				"B.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class B extends A<@NonNull Object> {\n" +
+				  "    public class J extends I<@Nullable String> {\n" +
+				  "        @Override\n" +
+				  "        public @Nullable Object foo(@NonNull String l) {\n" +
+				  "            return null;\n" +
+				  "        }\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in B.java (at line 5)\n" + 
+			"	public @Nullable Object foo(@NonNull String l) {\n" + 
+			"	       ^^^^^^^^^^^^^^^^\n" + 
+			"The return type is incompatible with the @NonNull return from A<Object>.I<String>.foo(String)\n" + 
+			"----------\n" + 
+			"2. ERROR in B.java (at line 5)\n" + 
+			"	public @Nullable Object foo(@NonNull String l) {\n" + 
+			"	                            ^^^^^^^^^^^^^^^\n" + 
+			"Illegal redefinition of parameter l, inherited method from A<Object>.I<String> declares this parameter as @Nullable\n" + 
+			"----------\n");
+	}
+
+	// a reference to a nested type has annotations for both types
+	public void test_nestedType_04() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "public class A<X> {\n" +
+				  "    public abstract class I<Y> {\n" +
+				  "        public abstract X foo(Y l);\n" +
+				  "    }\n" +
+				  "}\n",
+				"B.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class B {\n" +
+				  "    public void foo(A<Object>.@Nullable I<@NonNull String> ai) {\n" +
+				  "            ai.foo(null); // problems: ai can be null, arg must not be null\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in B.java (at line 4)\n" + 
+			"	ai.foo(null); // problems: ai can be null, arg must not be null\n" + 
+			"	^^\n" + 
+			"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+			"----------\n" + 
+			"2. ERROR in B.java (at line 4)\n" + 
+			"	ai.foo(null); // problems: ai can be null, arg must not be null\n" + 
+			"	       ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	// a reference to a nested type has annotations for both types, mismatch in detail of outer
+	public void test_nestedType_05() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "public class A<X> {\n" +
+				  "    public abstract class I<Y> {\n" +
+				  "        public abstract X foo(Y l);\n" +
+				  "    }\n" +
+				  "}\n",
+				"B.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class B {\n" +
+				  "    public void foo(A<@NonNull Object>.@Nullable I<@NonNull String> ai1) {\n" +
+				  "		A<@Nullable Object>.@Nullable I<@NonNull String> ai2 = ai1;\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in B.java (at line 4)\n" + 
+			"	A<@Nullable Object>.@Nullable I<@NonNull String> ai2 = ai1;\n" + 
+			"	                                                       ^^^\n" + 
+			"Null type mismatch (type annotations): required \'A<@Nullable Object>.@Nullable I<@NonNull String>\' but this expression has type \'A<@NonNull Object>.@Nullable I<@NonNull String>\'\n" + 
+			"----------\n");
+	}
+
+	public void testMissingAnnotationTypes_01() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"	public class U {}\n" +
+				"   @Missing1 X.@Missing2 U fU;\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	@Missing1 X.@Missing2 U fU;\n" + 
+			"	 ^^^^^^^^\n" + 
+			"Missing1 cannot be resolved to a type\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	@Missing1 X.@Missing2 U fU;\n" + 
+			"	             ^^^^^^^^\n" + 
+			"Missing2 cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+
+	// bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+	// annotation on leaf type in 1-dim array
+	public void testArrayType_01() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"Wrapper.java",
+				  "public class Wrapper<T> {\n" +
+				  "	T content;" +
+				  "	public T content() { return content; }\n" +
+				  "}\n",
+				"A.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class A {\n" +
+// Using Wrapper is a workaround until bug 391331 is fixed (to force the interesting annotation to be consumed as a type annotation):
+				  "    void bar(Wrapper<@NonNull String[]> realStrings, Wrapper<@Nullable String[]> maybeStrings) {\n" +
+				  "        System.out.println(realStrings.content()[0].toUpperCase()); // no problem\n" +
+				  "        realStrings.content()[0] = null; // problem: cannot assign null as @NonNull element\n" +
+				  "        System.out.println(maybeStrings.content()[0].toUpperCase()); // problem: element can be null\n" +
+				  "        maybeStrings.content()[0] = null; // no problem\n" +
+				  "    }\n" +
+				  "}\n"},
+		    "----------\n" + 
+			"1. ERROR in A.java (at line 5)\n" + 
+			"	realStrings.content()[0] = null; // problem: cannot assign null as @NonNull element\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. ERROR in A.java (at line 6)\n" + 
+			"	System.out.println(maybeStrings.content()[0].toUpperCase()); // problem: element can be null\n" + 
+			"	                   ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Potential null pointer access: array element may be null\n" + 
+			"----------\n");
+	}
+
+	// bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+	// annotation on leaf type in 2-dim array
+	public void testArrayType_02() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"Wrapper.java",
+				  "public class Wrapper<T> {\n" +
+				  "	T content;" +
+				  "	public T content() { return content; }\n" +
+				  "}\n",
+				"A.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class A {\n" +
+// Using Wrapper is a workaround until bug 391331 is fixed (to force the interesting annotation to be consumed as a type annotation):
+				  "    void bar(Wrapper<@NonNull String[][]> realStrings, Wrapper<@Nullable String[][]> maybeStrings) {\n" +
+				  "        System.out.println(realStrings.content()[0][0].toUpperCase()); // no problem\n" +
+				  "        realStrings.content()[0][0] = null; // problem: cannot assign null as @NonNull element\n" +
+				  "        System.out.println(maybeStrings.content()[0][0].toUpperCase()); // problem: element can be null\n" +
+				  "        maybeStrings.content()[0][0] = null; // no problem\n" +
+				  "    }\n" +
+				  "}\n"},
+		    "----------\n" + 
+			"1. ERROR in A.java (at line 5)\n" + 
+			"	realStrings.content()[0][0] = null; // problem: cannot assign null as @NonNull element\n" + 
+			"	^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. ERROR in A.java (at line 6)\n" + 
+			"	System.out.println(maybeStrings.content()[0][0].toUpperCase()); // problem: element can be null\n" + 
+			"	                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Potential null pointer access: array element may be null\n" + 
+			"----------\n");
+	}
+
+	// bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+	// annotation on array type (1-dim array)
+	public void testArrayType_03() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class A {\n" +
+				  "    void array(String @NonNull[] realStringArray, String @Nullable[] maybeStringArray) {\n" +
+				  "        @NonNull Object array;\n" +
+				  "        array = realStringArray;  // no problem\n" +
+				  "        realStringArray = null; 	 // problem: cannot assign null as @NonNull array\n" +
+				  "        array = maybeStringArray; // problem: array can be null\n" +
+				  "        maybeStringArray = null;  // no problem\n" +
+				  "    }\n" +
+				  "    void leaf(String @NonNull[] realStringArray, String @Nullable[] maybeStringArray, boolean b) {\n" +
+				  "        @NonNull String string;\n" +
+				  "        string = realStringArray[0];  // problem: unchecked conversion\n" +
+				  "        realStringArray[0] = null; 	 // no problem\n" +
+				  "        if (b)\n" +
+				  "            string = maybeStringArray[0]; // problems: indexing nullable array & unchecked conversion\n" +
+				  "        else\n" +
+				  "            maybeStringArray[0] = null; 	 // problem: indexing nullable array\n" +
+				  "        maybeStringArray[0] = null; 	 // problem protected by previous dereference\n" +
+				  "    }\n" +
+				  "}\n"},
+		    "----------\n" + 
+    		"1. ERROR in A.java (at line 6)\n" + 
+    		"	realStringArray = null; 	 // problem: cannot assign null as @NonNull array\n" + 
+    		"	                  ^^^^\n" + 
+    		"Null type mismatch: required \'String @NonNull[]\' but the provided value is null\n" + 
+		    "----------\n" + 
+    		"2. ERROR in A.java (at line 7)\n" + 
+    		"	array = maybeStringArray; // problem: array can be null\n" + 
+    		"	        ^^^^^^^^^^^^^^^^\n" + 
+    		"Null type mismatch (type annotations): required '@NonNull Object' but this expression has type 'String @Nullable[]'\n" + 
+    		"----------\n" + 
+    		"3. WARNING in A.java (at line 12)\n" + 
+    		"	string = realStringArray[0];  // problem: unchecked conversion\n" + 
+    		"	         ^^^^^^^^^^^^^^^^^^\n" + 
+    		"Null type safety (type annotations): The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" + 
+    		"----------\n" + 
+    		"4. ERROR in A.java (at line 15)\n" + 
+    		"	string = maybeStringArray[0]; // problems: indexing nullable array & unchecked conversion\n" + 
+    		"	         ^^^^^^^^^^^^^^^^\n" + 
+    		"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+    		"----------\n" + 
+    		"5. WARNING in A.java (at line 15)\n" + 
+    		"	string = maybeStringArray[0]; // problems: indexing nullable array & unchecked conversion\n" + 
+    		"	         ^^^^^^^^^^^^^^^^^^^\n" + 
+    		"Null type safety (type annotations): The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" + 
+    		"----------\n" + 
+    		"6. ERROR in A.java (at line 17)\n" + 
+    		"	maybeStringArray[0] = null; 	 // problem: indexing nullable array\n" + 
+    		"	^^^^^^^^^^^^^^^^\n" + 
+    		"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+			"----------\n");
+	}
+
+	// bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+	// annotation on intermediate type in 2-dim array
+	public void testArrayType_04() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class A {\n" +
+				  "    void outer(String [] @NonNull[] realArrays, String [] @Nullable[] maybeArrays) {\n" +
+				  "        @NonNull Object array;\n" +
+				  "        array = realArrays; 		// problem: unchecked conversion\n" +
+				  "        realArrays = null; 		// no problem, outer array is unspecified\n" +
+				  "        array = maybeArrays; 	// problem: unchecked conversion\n" +
+				  "        maybeArrays = null; 		// no problem\n" +
+				  "    }\n" +
+				  "    void inner(String [] @NonNull[] realArrays, String [] @Nullable[] maybeArrays) {\n" +
+				  "        @NonNull Object array;\n" +
+				  "        array = realArrays[0]; 	// no problem\n" +
+				  "        realArrays[0] = null; 	// problem: cannot assign null to @NonNull array\n" +
+				  "        array = maybeArrays[0]; 	// problem: element can be null\n" +
+				  "        maybeArrays[0] = null; 	// no problem\n" +
+				  "    }\n" +
+				  "    void leaf(String [] @NonNull[] realArrays, String [] @Nullable[] maybeArrays) {\n" +
+				  "        @NonNull Object array;\n" +
+				  "        array = realArrays[0][0]; // problem: unchecked conversion\n" +
+				  "        realArrays[0][0] = null;  // no problem, element type is unspecified\n" +
+				  "        array = maybeArrays[0][0]; // problems: indexing nullable array & unchecked conversion\n" +
+				  "        maybeArrays[0][0] = null; // problem: indexing nullable array\n" +
+				  "    }\n" +
+				  "}\n"},
+		    "----------\n" + 
+    		"1. WARNING in A.java (at line 5)\n" + 
+    		"	array = realArrays; 		// problem: unchecked conversion\n" + 
+    		"	        ^^^^^^^^^^\n" + 
+    		"Null type safety (type annotations): The expression of type 'String [] @NonNull[]' needs unchecked conversion to conform to \'@NonNull Object\'\n" + 
+		    "----------\n" + 
+			"2. WARNING in A.java (at line 7)\n" + 
+    		"	array = maybeArrays; 	// problem: unchecked conversion\n" + 
+    		"	        ^^^^^^^^^^^\n" + 
+    		"Null type safety (type annotations): The expression of type 'String [] @Nullable[]' needs unchecked conversion to conform to \'@NonNull Object\'\n" + 
+			"----------\n" + 
+			"3. ERROR in A.java (at line 13)\n" + 
+			"	realArrays[0] = null; 	// problem: cannot assign null to @NonNull array\n" + 
+			"	^^^^^^^^^^^^^\n" + 
+			"Null type mismatch: required \'String @NonNull[]\' but the provided value is null\n" + 
+			"----------\n" + 
+			"4. ERROR in A.java (at line 14)\n" +
+			"	array = maybeArrays[0]; 	// problem: element can be null\n" +
+			"	        ^^^^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required '@NonNull Object' but this expression has type 'String @Nullable[]'\n" + 
+			"----------\n" + 
+			"5. WARNING in A.java (at line 19)\n" +
+			"	array = realArrays[0][0]; // problem: unchecked conversion\n" +
+			"	        ^^^^^^^^^^^^^^^^\n" +
+    		"Null type safety (type annotations): The expression of type 'String' needs unchecked conversion to conform to \'@NonNull Object\'\n" + 
+			"----------\n" + 
+			"6. ERROR in A.java (at line 21)\n" +
+			"	array = maybeArrays[0][0]; // problems: indexing nullable array & unchecked conversion\n" +
+			"	        ^^^^^^^^^^^^^^\n" +
+    		"Potential null pointer access: array element may be null\n" + 
+			"----------\n" + 
+			"7. WARNING in A.java (at line 21)\n" +
+			"	array = maybeArrays[0][0]; // problems: indexing nullable array & unchecked conversion\n" +
+			"	        ^^^^^^^^^^^^^^^^^\n" +
+			"Null type safety (type annotations): The expression of type 'String' needs unchecked conversion to conform to \'@NonNull Object\'\n" +
+			"----------\n" + 
+			"8. ERROR in A.java (at line 22)\n" + 
+			"	maybeArrays[0][0] = null; // problem: indexing nullable array\n" + 
+			"	^^^^^^^^^^^^^^\n" + 
+			"Potential null pointer access: array element may be null\n" + 
+			"----------\n");
+	}
+
+	// bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+	// mismatches against outer array type, test display of type annotation in error messages
+	public void testArrayType_05() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class A {\n" +
+				  "    void outer(String @NonNull[] @NonNull[] realArrays, String @NonNull[] @Nullable[] maybeArrays, String @Nullable[][] unknownArrays) {\n" +
+				  "        realArrays[0] = maybeArrays[0];		// problem: inner array can be null\n" +
+				  "        realArrays[0] = unknownArrays[0];	// problems: inner array is unspecified, outer can be null\n" +
+				  "    }\n" +
+				  "    void oneDim(String @Nullable[] maybeStrings, String[] unknownStrings) {\n" +
+				  "        String @NonNull[] s = maybeStrings;\n" +
+				  "        s = unknownStrings;\n" +
+				  "        consume(maybeStrings);\n" +
+				  "        consume(unknownStrings);\n" +
+				  "    }\n" +
+				  "    void consume(String @NonNull[] s) {};\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in A.java (at line 4)\n" + 
+			"	realArrays[0] = maybeArrays[0];		// problem: inner array can be null\n" + 
+			"	^^^^^^^^^^^^^\n" + 
+			"Null type mismatch: required \'String @NonNull[]\' but the provided value is inferred as @Nullable\n" + 
+			"----------\n" + 
+			"2. WARNING in A.java (at line 5)\n" + 
+			"	realArrays[0] = unknownArrays[0];	// problems: inner array is unspecified, outer can be null\n" + 
+			"	^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type 'String[]' needs unchecked conversion to conform to \'String @NonNull[]\'\n" + 
+			"----------\n" + 
+			"3. ERROR in A.java (at line 5)\n" + 
+			"	realArrays[0] = unknownArrays[0];	// problems: inner array is unspecified, outer can be null\n" + 
+			"	                ^^^^^^^^^^^^^\n" + 
+			"Potential null pointer access: this expression has a \'@Nullable\' type\n" + 
+			"----------\n" + 
+			"4. ERROR in A.java (at line 8)\n" + 
+			"	String @NonNull[] s = maybeStrings;\n" + 
+			"	                      ^^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @NonNull[]\' but this expression has type \'String @Nullable[]\'\n" + 
+			"----------\n" + 
+			"5. WARNING in A.java (at line 9)\n" + 
+			"	s = unknownStrings;\n" + 
+			"	    ^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'String @NonNull[]\'\n" + 
+			"----------\n" + 
+			"6. ERROR in A.java (at line 10)\n" + 
+			"	consume(maybeStrings);\n" + 
+			"	        ^^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @NonNull[]\' but this expression has type \'String @Nullable[]\'\n" + 
+			"----------\n" + 
+			"7. WARNING in A.java (at line 11)\n" + 
+			"	consume(unknownStrings);\n" + 
+			"	        ^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'String @NonNull[]\'\n" + 
+			"----------\n");
+	}
+
+	// bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+	// more compiler messages
+	public void testArrayType_10() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"A.java",
+				  "import org.eclipse.jdt.annotation.*;\n" +
+				  "public class A {\n" +
+				  "    void outer(String @NonNull[] @NonNull[] realArrays, String @NonNull[] @Nullable[] maybeArrays, String @Nullable[][] unknownArrays, String @NonNull[][] mixedArrays) {\n" +
+				  "        realArrays = maybeArrays;			// problem on inner dimension!\n" +
+				  "        realArrays = unknownArrays; 			// problems on both dimensions\n" +
+				  "        maybeArrays = realArrays;			// problem on inner dimension\n" +
+				  "        unknownArrays = maybeArrays;			// problsm on outer dimension\n" +
+				  "        realArrays = mixedArrays;			// problem on inner\n" +
+				  "        maybeArrays = mixedArrays;			// problem on inner\n" +
+				  "        consume(maybeArrays, mixedArrays, maybeArrays);\n" +
+				  "    }\n" +
+				  "    void consume(String @NonNull[] @NonNull[] realStrings, String @NonNull[] @Nullable[] maybeArrays, String @Nullable[][] unknownArrays) {\n" +
+				  "    }\n" +
+				  "}\n"},
+			"----------\n" + 
+			"1. ERROR in A.java (at line 4)\n" + 
+			"	realArrays = maybeArrays;			// problem on inner dimension!\n" + 
+			"	             ^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @NonNull[] @NonNull[]\' but this expression has type \'String @NonNull[] @Nullable[]\'\n" + 
+			"----------\n" + 
+			"2. ERROR in A.java (at line 5)\n" + 
+			"	realArrays = unknownArrays; 			// problems on both dimensions\n" + 
+			"	             ^^^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @NonNull[] @NonNull[]\' but this expression has type \'String @Nullable[] []\'\n" + 
+			"----------\n" + 
+			"3. ERROR in A.java (at line 6)\n" + 
+			"	maybeArrays = realArrays;			// problem on inner dimension\n" + 
+			"	              ^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @NonNull[] @Nullable[]\' but this expression has type \'String @NonNull[] @NonNull[]\'\n" + 
+			"----------\n" + 
+			"4. ERROR in A.java (at line 7)\n" + 
+			"	unknownArrays = maybeArrays;			// problsm on outer dimension\n" + 
+			"	                ^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @Nullable[] []\' but this expression has type \'String @NonNull[] @Nullable[]\'\n" + 
+			"----------\n" + 
+			"5. WARNING in A.java (at line 8)\n" + 
+			"	realArrays = mixedArrays;			// problem on inner\n" + 
+			"	             ^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String @NonNull[] []\' needs unchecked conversion to conform to \'String @NonNull[] @NonNull[]\'\n" + 
+			"----------\n" + 
+			"6. WARNING in A.java (at line 9)\n" + 
+			"	maybeArrays = mixedArrays;			// problem on inner\n" + 
+			"	              ^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String @NonNull[] []\' needs unchecked conversion to conform to \'String @NonNull[] @Nullable[]\'\n" + 
+			"----------\n" + 
+			"7. ERROR in A.java (at line 10)\n" + 
+			"	consume(maybeArrays, mixedArrays, maybeArrays);\n" + 
+			"	        ^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @NonNull[] @NonNull[]\' but this expression has type \'String @NonNull[] @Nullable[]\'\n" + 
+			"----------\n" + 
+			"8. WARNING in A.java (at line 10)\n" + 
+			"	consume(maybeArrays, mixedArrays, maybeArrays);\n" + 
+			"	                     ^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String @NonNull[] []\' needs unchecked conversion to conform to \'String @NonNull[] @Nullable[]\'\n" + 
+			"----------\n" + 
+			"9. ERROR in A.java (at line 10)\n" + 
+			"	consume(maybeArrays, mixedArrays, maybeArrays);\n" + 
+			"	                                  ^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'String @Nullable[] []\' but this expression has type \'String @NonNull[] @Nullable[]\'\n" + 
+			"----------\n");
+	}
+	
+	// https://bugs.eclipse.org/403216 - [1.8][null] TypeReference#captureTypeAnnotations treats type annotations as type argument annotations 
+	public void testBug403216_1() {
+		runConformTest(
+			new String[] {
+				"Test.java",
+				"import java.lang.annotation.ElementType;\n" + 
+				"import java.lang.annotation.Target;\n" + 
+				"\n" + 
+				"public class Test {}\n" + 
+				"\n" + 
+				"class X {\n" + 
+				"	class Y {\n" + 
+				"		public void foo( @A X. @B Y this) {}\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"@Target(value={ElementType.TYPE_USE})\n" + 
+				"@interface A {}\n" + 
+				"@Target(value={ElementType.TYPE_USE})\n" + 
+				"@interface B {}\n"
+			});
+	}
+
+	// issue from https://bugs.eclipse.org/bugs/show_bug.cgi?id=403216#c7
+	public void testBug403216_2() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"import java.util.*;\n" +
+				"public class X {\n" +
+				"    void test(List<@NonNull String> strings) {\n" + 
+				"        List<String> someStrings;\n" + 
+				"        someStrings = strings;\n" +
+				"    }\n" +
+				"}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=403216#c9 
+	public void testBug403216_3() {
+		runConformTestWithLibs(
+			new String[] {
+				"Test.java",
+				"import java.lang.annotation.ElementType;\n" + 
+				"import java.lang.annotation.Target;\n" +
+				"import org.eclipse.jdt.annotation.*;\n" + 
+				"\n" + 
+				"public class Test {}\n" + 
+				"\n" + 
+				"class X {\n" + 
+				"	class Y {\n" + 
+				"		public void foo( @A X. @NonNull Y this) {}\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"@Target(value={ElementType.TYPE_USE})\n" + 
+				"@interface A {}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// https://bugs.eclipse.org/403457 - [1.8][compiler] NPE in WildcardBinding.signature
+	public void testBug403457_1() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" + 
+				"import java.lang.annotation.Target;\n" + 
+				"import org.eclipse.jdt.annotation.*;\n" + 
+				"\n" + 
+				"public class X {\n" + 
+				"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" + 
+				"   void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" + 
+				"}\n" + 
+				"\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@interface Marker {\n" + 
+				"	\n" + 
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" + 
+			"	         ^^^\n" + 
+			"Map cannot be resolved to a type\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
+			"	void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" + 
+			"	         ^^^\n" + 
+			"Map cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+
+	// https://bugs.eclipse.org/403457 - [1.8][compiler] NPE in WildcardBinding.signature
+	// variant with null annotations
+	public void testBug403457_2() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"// import java.util.Map;\n" +
+				"import org.eclipse.jdt.annotation.*;\n" + 
+				"\n" + 
+				"public class X {\n" + 
+				"	void foo(Map<@Nullable ? super @Nullable Object, @Nullable ? extends @Nullable String> m){}\n" + 
+				"   void goo(Map<@Nullable ? extends @Nullable Object, @Nullable ? super @Nullable String> m){}\n" + 
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	void foo(Map<@Nullable ? super @Nullable Object, @Nullable ? extends @Nullable String> m){}\n" + 
+			"	         ^^^\n" + 
+			"Map cannot be resolved to a type\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	void goo(Map<@Nullable ? extends @Nullable Object, @Nullable ? super @Nullable String> m){}\n" + 
+			"	         ^^^\n" + 
+			"Map cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: RETURN_TYPE
+	public void testBinary01() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		runConformTestWithLibs(
+				new String[] {
+					"p/X.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class X {\n" +
+					"	public List<@Nullable String> getSomeStrings() { return null; }\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y.java",
+					"import p.X;\n" +
+					"public class Y {\n" +
+					"	public void test(X x) {\n" +
+					"		String s0 = x.getSomeStrings().get(0);\n" +
+					"		System.out.println(s0.toUpperCase());\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y.java (at line 5)\n" + 
+				"	System.out.println(s0.toUpperCase());\n" + 
+				"	                   ^^\n" + 
+				"Potential null pointer access: The variable s0 may be null at this location\n" + 
+				"----------\n"
+				);
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: METHOD_FORMAL_PARAMETER & METHOD_RECEIVER
+	// Note: receiver annotation is not evaluated by the compiler, this part of the test only serves debugging purposes.
+	public void testBinary02() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		runConformTestWithLibs(
+				new String[] {
+					"p/X.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"import java.lang.annotation.*;\n" +
+					"@Retention(RetentionPolicy.CLASS)\n" +
+					"@Target(TYPE_USE)\n" +
+					"@interface Immutable {}\n" +
+					"public class X {\n" +
+					"	public void setAllStrings(@Immutable X this, int dummy, List<@NonNull String> ss) { }\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y.java",
+					"import p.X;\n" +
+					"import java.util.List;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class Y {\n" +
+					"	public void test(X x, List<@Nullable String> ss) {\n" +
+					"		x.setAllStrings(-1, ss);\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y.java (at line 6)\n" + 
+				"	x.setAllStrings(-1, ss);\n" + 
+				"	                    ^^\n" + 
+				"Null type mismatch (type annotations): required \'List<@NonNull String>\' but this expression has type \'List<@Nullable String>\'\n" + 
+				"----------\n"
+				);
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: FIELD
+	public void testBinary03() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1 {\n" +
+					"	public static String @Nullable [] f1 = null;\n" +
+					"	public static String [] @Nullable [] f2 = new String[][] { null };\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import p.X1;\n" +
+					"public class Y1 {\n" +
+					"	public void test() {\n" +
+					"		System.out.println(p.X1.f1.length);\n" +
+					"		System.out.println(X1.f2[0].length);\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y1.java (at line 4)\n" + 
+				"	System.out.println(p.X1.f1.length);\n" + 
+				"	                        ^^\n" + 
+				"Potential null pointer access: this expression has a '@Nullable' type\n" + 
+				"----------\n" + 
+				"2. ERROR in Y1.java (at line 5)\n" + 
+				"	System.out.println(X1.f2[0].length);\n" + 
+				"	                   ^^^^^^^^\n" + 
+				"Potential null pointer access: array element may be null\n" + 
+				"----------\n"
+				);
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: SUPER_TYPE
+	public void testBinary04() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.ArrayList;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1 extends ArrayList<@Nullable String> {\n" +
+					"}\n",
+					"p/X2.java",
+					"package p;\n" +
+					"import java.util.List;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X2 implements List<@Nullable String> {\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import p.X1;\n" +
+					"public class Y1 {\n" +
+					"	public void test(X1 x) {\n" +
+					"		String s0 = x.get(0);\n" +
+					"		System.out.println(s0.toUpperCase());\n" +
+					"	}\n" +
+					"}\n",
+					"Y2.java",
+					"import p.X2;\n" +
+					"public class Y2 {\n" +
+					"	public void test(X2 x) {\n" +
+					"		String s0 = x.get(0);\n" +
+					"		System.out.println(s0.toUpperCase());\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y1.java (at line 5)\n" + 
+				"	System.out.println(s0.toUpperCase());\n" + 
+				"	                   ^^\n" + 
+				"Potential null pointer access: The variable s0 may be null at this location\n" +
+				"----------\n" +
+				"----------\n" +
+				"1. ERROR in Y2.java (at line 5)\n" + 
+				"	System.out.println(s0.toUpperCase());\n" + 
+				"	                   ^^\n" + 
+				"Potential null pointer access: The variable s0 may be null at this location\n" + 
+				"----------\n"
+				);
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: CLASS_TYPE_PARAMETER & METHOD_TYPE_PARAMETER
+	public void testBinary05() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.ArrayList;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1<@NonNull T> extends ArrayList<T> {\n" +
+					"    public <@Nullable S> void foo(S s) {}\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import p.X1;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class Y1 {\n" +
+					"	X1<@Nullable String> maybeStrings;\n" + // incompatible: T is constrained to @NonNull
+					"	void test(X1<@NonNull String> x) {\n" + // OK
+					"		x.<@NonNull Object>foo(new Object());\n" + // incompatible: S is constrained to @Nullable
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y1.java (at line 4)\n" + 
+				"	X1<@Nullable String> maybeStrings;\n" + 
+				"	   ^^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type \'@Nullable String\' is not a valid substitute for the type parameter \'T\' which is constrained as \'@NonNull\'\n" + 
+				"----------\n" + 
+				"2. ERROR in Y1.java (at line 6)\n" + 
+				"	x.<@NonNull Object>foo(new Object());\n" + 
+				"	   ^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type \'@NonNull Object\' is not a valid substitute for the type parameter \'S\' which is constrained as \'@Nullable\'\n" + 
+				"----------\n");
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: CLASS_TYPE_PARAMETER_BOUND & METHOD_TYPE_PARAMETER_BOUND
+	public void testBinary06() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runNegativeTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.ArrayList;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1<T extends @NonNull Object> extends ArrayList<T> {\n" +
+					"    public <U, V extends @Nullable Object> void foo(U u, V v) {}\n" +
+					"}\n",
+					"p/X2.java", 
+					"package p;\n"+
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class X2<@NonNull W extends @Nullable Object> {}\n" // incompatible constraints
+				},
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in p\\X2.java (at line 3)\n" + 
+				"	public class X2<@NonNull W extends @Nullable Object> {}\n" + 
+				"	                                   ^^^^^^^^^\n" + 
+				"This nullness annotation conflicts with a \'@NonNull\' annotation which is effective on the same type parameter \n" + 
+				"----------\n");
+		// fix the bug:		
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.ArrayList;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1<T extends @NonNull Object> extends ArrayList<T> {\n" +
+					"    public <U, V extends @Nullable Object> void foo(U u, V v) {}\n" +
+					"}\n",
+					"p/X2.java", 
+					"package p;\n"+
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class X2<@Nullable W extends Object> {}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import p.X1;\n" +
+					"import p.X2;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class Y1 {\n" +
+					"	X1<@Nullable String> maybeStrings;\n" + // incompatible: T has a bound constrained to @NonNull
+					"   X2<@NonNull String> strings;\n" +       // incompatible: W is constrained to @Nullable
+					"	void test(X1<@NonNull String> x) {\n" + // OK
+					"		x.<Y1, @NonNull Object>foo(this, new Object());\n" + // incompatible: V is constrained to @Nullable via superclass
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y1.java (at line 5)\n" + 
+				"	X1<@Nullable String> maybeStrings;\n" + 
+				"	   ^^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type \'@Nullable String\' is not a valid substitute for the type parameter \'T\' which is constrained as \'@NonNull\'\n" + 
+				"----------\n" + 
+				"2. ERROR in Y1.java (at line 6)\n" + 
+				"	X2<@NonNull String> strings;\n" + 
+				"	   ^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type \'@NonNull String\' is not a valid substitute for the type parameter \'W\' which is constrained as \'@Nullable\'\n" + 
+				"----------\n" + 
+				"3. ERROR in Y1.java (at line 8)\n" + 
+				"	x.<Y1, @NonNull Object>foo(this, new Object());\n" + 
+				"	       ^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type '@NonNull Object' is not a valid substitute for the type parameter 'V' which is constrained as '@Nullable'\n" + 
+				"----------\n"
+				);
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: CLASS_TYPE_PARAMETER_BOUND & METHOD_TYPE_PARAMETER_BOUND
+	// variant: qualified type references
+	public void testBinary06b() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runNegativeTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.ArrayList;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1<T extends java.lang.@NonNull Object> extends ArrayList<T> {\n" +
+					"    public <U, V extends java.lang.@Nullable Object> void foo(U u, V v) {}\n" +
+					"}\n",
+					"p/X2.java", 
+					"package p;\n"+
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class X2<@NonNull W extends java.lang.@Nullable Object> {}\n" // incompatible constraints
+				},
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in p\\X2.java (at line 3)\n" + 
+				"	public class X2<@NonNull W extends java.lang.@Nullable Object> {}\n" + 
+				"	                                             ^^^^^^^^^\n" + 
+				"This nullness annotation conflicts with a \'@NonNull\' annotation which is effective on the same type parameter \n" + 
+				"----------\n");
+		// fix the bug:		
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.ArrayList;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1<T extends java.lang.@NonNull Object> extends ArrayList<T> {\n" +
+					"    public <U, V extends java.lang.@Nullable Object> void foo(U u, V v) {}\n" +
+					"}\n",
+					"p/X2.java", 
+					"package p;\n"+
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class X2<@Nullable W extends Object> {}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class Y1 {\n" +
+					"	p.X1<java.lang.@Nullable String> maybeStrings;\n" + // incompatible: T has a bound constrained to @NonNull
+					"   p.X2<java.lang.@NonNull String> strings;\n" +       // incompatible: W is constrained to @Nullable
+					"	void test(p.X1<java.lang.@NonNull String> x) {\n" + // OK
+					"		x.<Y1, java.lang.@NonNull Object>foo(this, new Object());\n" + // incompatible: V is constrained to @Nullable via superclass
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y1.java (at line 3)\n" + 
+				"	p.X1<java.lang.@Nullable String> maybeStrings;\n" + 
+				"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type \'@Nullable String\' is not a valid substitute for the type parameter \'T\' which is constrained as \'@NonNull\'\n" + 
+				"----------\n" + 
+				"2. ERROR in Y1.java (at line 4)\n" + 
+				"	p.X2<java.lang.@NonNull String> strings;\n" + 
+				"	     ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type \'@NonNull String\' is not a valid substitute for the type parameter \'W\' which is constrained as \'@Nullable\'\n" + 
+				"----------\n" + 
+				"3. ERROR in Y1.java (at line 6)\n" + 
+				"	x.<Y1, java.lang.@NonNull Object>foo(this, new Object());\n" + 
+				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type '@NonNull Object' is not a valid substitute for the type parameter 'V' which is constrained as '@Nullable'\n" + 
+				"----------\n"
+				);
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: method with all kinds of type annotations
+	public void testBinary07() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.*;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"import static java.lang.annotation.ElementType.*;\n" +
+					"import java.lang.annotation.*;\n" +
+					"@Retention(RetentionPolicy.CLASS)\n" +
+					"@Target(TYPE_USE)\n" +
+					"@interface Immutable {}\n" +
+					"public abstract class X1 {\n" +
+					"    public <@NonNull U, V extends @Nullable Object> List<@NonNull Map<Object, @NonNull String>> foo(@Immutable X1 this, U u, V v) { return null; }\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import p.X1;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class Y1 {\n" +
+					"	void test(X1 x) {\n" +
+					"		x.<@NonNull Y1, @NonNull Object>foo(this, new Object())\n" + // @NonNull Object conflicts with "V extends @Nullable Object"
+					"			.get(0).put(null, null);\n" + // second null is illegal
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y1.java (at line 5)\n" + 
+				"	x.<@NonNull Y1, @NonNull Object>foo(this, new Object())\n" + 
+				"	                ^^^^^^^^^^^^^^^\n" + 
+				"Null constraint mismatch: The type '@NonNull Object' is not a valid substitute for the type parameter 'V' which is constrained as '@Nullable'\n" + 
+				"----------\n" + 
+				"2. ERROR in Y1.java (at line 6)\n" + 
+				"	.get(0).put(null, null);\n" + 
+				"	                  ^^^^\n" + 
+				"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+				"----------\n");
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: details
+	public void testBinary08() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runNegativeTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.*;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1 {\n" +
+					"    public class Inner {}\n" +
+					"    public Object []@NonNull[] arrays(Object @NonNull[][] oa1) { return null; }\n" +
+					"    public void nesting(@NonNull Inner i1, X1.@Nullable Inner i2) { }\n" +
+					"    public void wildcard1(List<@Nullable ? extends @NonNull X1> l) { } // contradiction\n" +
+					"    public void wildcard2(List<? super @NonNull X1> l) { }\n" +
+					"}\n"
+				},
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in p\\X1.java (at line 8)\n" + 
+				"	public void wildcard1(List<@Nullable ? extends @NonNull X1> l) { } // contradiction\n" + 
+				"	                                               ^^^^^^^^\n" + 
+				"This nullness annotation conflicts with a \'@Nullable\' annotation which is effective on the same type parameter \n" + 
+				"----------\n");
+		// fix the error:
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.*;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1 {\n" +
+					"    public class Inner {}\n" +
+					"    public Object []@NonNull[] arrays(Object @NonNull[][] oa1) { return null; }\n" +
+					"    public void nesting(@NonNull Inner i1, X1.@Nullable Inner i2) { }\n" +
+					"    public void wildcard1(List<@Nullable ? extends X1> l) { }\n" +
+					"    public void wildcard2(List<? super @NonNull X1> l) { }\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import p.X1;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"import java.util.*;\n" +
+					"public class Y1 {\n" +
+					"	void test(X1 x) {\n" +
+					"		Object @NonNull[][] a = new Object[0][]; // unsafe\n" +
+					"		x.arrays(a)[0] = null; // illegal\n" +
+					"		x.nesting(null, null); // 1st null is illegal\n" +
+					"		x.wildcard2(new ArrayList<@NonNull Object>());\n" +
+					"		x.wildcard2(new ArrayList<@Nullable Object>()); // incompatible(1)\n" +
+					"		x.wildcard1(new ArrayList<@NonNull X1>()); // incompatible(2)\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. WARNING in Y1.java (at line 6)\n" + 
+				"	Object @NonNull[][] a = new Object[0][]; // unsafe\n" + 
+				"	                        ^^^^^^^^^^^^^^^\n" + 
+				"Null type safety (type annotations): The expression of type \'Object[][]\' needs unchecked conversion to conform to \'Object @NonNull[] []\'\n" + 
+				"----------\n" + 
+				"2. ERROR in Y1.java (at line 7)\n" + 
+				"	x.arrays(a)[0] = null; // illegal\n" + 
+				"	^^^^^^^^^^^^^^\n" + 
+				"Null type mismatch: required \'Object @NonNull[]\' but the provided value is null\n" +
+				"----------\n" + 
+				"3. ERROR in Y1.java (at line 8)\n" + 
+				"	x.nesting(null, null); // 1st null is illegal\n" + 
+				"	          ^^^^\n" + 
+				"Null type mismatch: required \'X1.@NonNull Inner\' but the provided value is null\n" + 
+				"----------\n" + 
+				"4. ERROR in Y1.java (at line 10)\n" + 
+				"	x.wildcard2(new ArrayList<@Nullable Object>()); // incompatible(1)\n" + 
+				"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null type mismatch (type annotations): required \'List<? super @NonNull X1>\' but this expression has type \'ArrayList<@Nullable Object>\', corresponding supertype is \'List<@Nullable Object>\'\n" + 
+				"----------\n" + 
+				"5. ERROR in Y1.java (at line 11)\n" + 
+				"	x.wildcard1(new ArrayList<@NonNull X1>()); // incompatible(2)\n" + 
+				"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null type mismatch (type annotations): required \'List<@Nullable ? extends X1>\' but this expression has type \'ArrayList<@NonNull X1>\', corresponding supertype is \'List<@NonNull X1>\'\n" + 
+				"----------\n");
+	}
+
+	// storing and decoding null-type-annotations to/from classfile: details
+	// variant: qualified references
+	public void testBinary08b() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		customOptions.put(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION, JavaCore.IGNORE);
+		runNegativeTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1 {\n" +
+					"    public class Inner {}\n" +
+					"    public java.lang.Object []@NonNull[] arrays(java.lang.Object @NonNull[][] oa1) { return null; }\n" +
+					"    public void nesting(@NonNull Inner i1, X1.@Nullable Inner i2) { }\n" +
+					"    public void wildcard1(java.util.List<@Nullable ? extends p.@NonNull X1> l) { } // contradiction\n" +
+					"    public void wildcard2(java.util.List<? super p.@NonNull X1> l) { }\n" +
+					"}\n"
+				},
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in p\\X1.java (at line 7)\n" + 
+				"	public void wildcard1(java.util.List<@Nullable ? extends p.@NonNull X1> l) { } // contradiction\n" + 
+				"	                                                           ^^^^^^^^\n" + 
+				"This nullness annotation conflicts with a \'@Nullable\' annotation which is effective on the same type parameter \n" + 
+				"----------\n");
+		// fix the error:
+		runConformTestWithLibs(
+				new String[] {
+					"p/X1.java",
+					"package p;\n" +
+					"import java.util.*;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public abstract class X1 {\n" +
+					"    public class Inner {}\n" +
+					"    public java.lang.Object []@NonNull[] arrays(java.lang.Object @NonNull[][] oa1) { return null; }\n" +
+					"    public void nesting(@NonNull Inner i1, p.X1.@Nullable Inner i2) { }\n" +
+					"    public void wildcard1(List<@Nullable ? extends p.X1> l) { }\n" +
+					"    public void wildcard2(List<? super p.@NonNull X1> l) { }\n" +
+					"}\n"
+				},
+				customOptions,
+				"");
+
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y1.java",
+					"import p.X1;\n" +
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"import java.util.*;\n" +
+					"public class Y1 {\n" +
+					"	void test(X1 x) {\n" +
+					"		java.lang.Object @NonNull[][] a = new java.lang.Object[0][]; // unsafe\n" +
+					"		x.arrays(a)[0] = null; // illegal\n" +
+					"		x.nesting(null, null); // 1st null is illegal\n" +
+					"		x.wildcard2(new ArrayList<java.lang.@NonNull Object>());\n" +
+					"		x.wildcard2(new ArrayList<java.lang.@Nullable Object>()); // incompatible(1)\n" +
+					"		x.wildcard1(new ArrayList<p.@NonNull X1>()); // incompatible(2)\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. WARNING in Y1.java (at line 6)\n" + 
+				"	java.lang.Object @NonNull[][] a = new java.lang.Object[0][]; // unsafe\n" + 
+				"	                                  ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null type safety (type annotations): The expression of type \'Object[][]\' needs unchecked conversion to conform to \'Object @NonNull[] []\'\n" + 
+				"----------\n" + 
+				"2. ERROR in Y1.java (at line 7)\n" + 
+				"	x.arrays(a)[0] = null; // illegal\n" + 
+				"	^^^^^^^^^^^^^^\n" + 
+				"Null type mismatch: required \'Object @NonNull[]\' but the provided value is null\n" +
+				"----------\n" + 
+				"3. ERROR in Y1.java (at line 8)\n" + 
+				"	x.nesting(null, null); // 1st null is illegal\n" + 
+				"	          ^^^^\n" + 
+				"Null type mismatch: required \'X1.@NonNull Inner\' but the provided value is null\n" + 
+				"----------\n" + 
+				"4. ERROR in Y1.java (at line 10)\n" + 
+				"	x.wildcard2(new ArrayList<java.lang.@Nullable Object>()); // incompatible(1)\n" + 
+				"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null type mismatch (type annotations): required \'List<? super @NonNull X1>\' but this expression has type \'ArrayList<@Nullable Object>\', corresponding supertype is \'List<@Nullable Object>\'\n" + 
+				"----------\n" + 
+				"5. ERROR in Y1.java (at line 11)\n" + 
+				"	x.wildcard1(new ArrayList<p.@NonNull X1>()); // incompatible(2)\n" + 
+				"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Null type mismatch (type annotations): required \'List<@Nullable ? extends X1>\' but this expression has type \'ArrayList<@NonNull X1>\', corresponding supertype is \'List<@NonNull X1>\'\n" + 
+				"----------\n");
+	}
+	
+	// storing and decoding null-type-annotations to/from classfile: EXTENDED DIMENSIONS.
+	public void testBinary09() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		runNegativeTestWithLibs(
+				new String[] {
+					"X.java",
+					"import org.eclipse.jdt.annotation.NonNull;\n" +
+					"import org.eclipse.jdt.annotation.Nullable;\n" +
+					"public class X {\n" +
+					"	@NonNull String @Nullable [] f @NonNull [] = null;\n" +
+					"	static void foo(@NonNull String @Nullable [] p @NonNull []) {\n" +
+					"		p = null;\n" +
+					"		@NonNull String @Nullable [] l @NonNull [] = null;\n" +
+					"	}\n" +
+					"}\n"
+
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 4)\n" + 
+				"	@NonNull String @Nullable [] f @NonNull [] = null;\n" + 
+				"	                                             ^^^^\n" + 
+				"Null type mismatch: required \'@NonNull String @NonNull[] @Nullable[]\' but the provided value is null\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 6)\n" + 
+				"	p = null;\n" + 
+				"	    ^^^^\n" + 
+				"Null type mismatch: required \'@NonNull String @NonNull[] @Nullable[]\' but the provided value is null\n" + 
+				"----------\n" + 
+				"3. ERROR in X.java (at line 7)\n" + 
+				"	@NonNull String @Nullable [] l @NonNull [] = null;\n" + 
+				"	                                             ^^^^\n" + 
+				"Null type mismatch: required \'@NonNull String @NonNull[] @Nullable[]\' but the provided value is null\n" + 
+				"----------\n");
+		// fix the error:
+		runConformTestWithLibs(
+				new String[] {
+						"X.java",
+						"import org.eclipse.jdt.annotation.NonNull;\n" +
+						"import org.eclipse.jdt.annotation.Nullable;\n" +
+						"public class X {\n" +
+						"	@NonNull String @Nullable [] f @NonNull [] = new @NonNull String @Nullable [0] @NonNull [];\n" +
+						"}\n"
+				},
+				customOptions,
+				"");
+
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y.java",
+					"import org.eclipse.jdt.annotation.*;\n" +
+					"public class Y {\n" +
+					"	void test(X x) {\n" +
+					"       x.f = null;\n" +
+					"       x.f[0] = null;\n" +
+					"       x.f[0][0] = null;\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. WARNING in Y.java (at line 1)\n" + 
+				"	import org.eclipse.jdt.annotation.*;\n" + 
+				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"The import org.eclipse.jdt.annotation is never used\n" + 
+				"----------\n" + 
+				"2. ERROR in Y.java (at line 4)\n" + 
+				"	x.f = null;\n" + 
+				"	      ^^^^\n" + 
+				"Null type mismatch: required \'@NonNull String @NonNull[] @Nullable[]\' but the provided value is null\n" + 
+				"----------\n" + 
+				"3. ERROR in Y.java (at line 6)\n" + 
+				"	x.f[0][0] = null;\n" + 
+				"	^^^^^^\n" + 
+				"Potential null pointer access: array element may be null\n" + 
+				"----------\n" + 
+				"4. ERROR in Y.java (at line 6)\n" + 
+				"	x.f[0][0] = null;\n" + 
+				"	^^^^^^^^^\n" + 
+				"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+				"----------\n");
+}
+	
+	// storing and decoding null-type-annotations to/from classfile: array annotations.
+	public void testBinary10() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE, JavaCore.ERROR);
+		runNegativeTestWithLibs(
+				new String[] {
+					"X.java",
+					"import java.util.ArrayList;\n" +
+					"import org.eclipse.jdt.annotation.NonNull;\n" +
+					"public class X  {\n" +
+					"	void foo(ArrayList<String> @NonNull [] p) {\n" +
+					"	}\n" +
+					"}\n" +
+					"class Y extends X {\n" +
+					"	void foo() {\n" +
+					"		super.foo(null);\n" +
+					"	}\n" +
+					"}\n"
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	super.foo(null);\n" + 
+				"	          ^^^^\n" + 
+				"Null type mismatch: required \'ArrayList<String> @NonNull[]\' but the provided value is null\n" + 
+				"----------\n");
+		// fix the error:
+		runConformTestWithLibs(
+				new String[] {
+						"X.java",
+						"import java.util.ArrayList;\n" +
+						"import org.eclipse.jdt.annotation.NonNull;\n" +
+						"public class X  {\n" +
+						"	void foo(ArrayList<String> @NonNull [] p) {\n" +
+						"	}\n" +
+						"}\n"
+				},
+				customOptions,
+				"");
+
+		runNegativeTestWithLibs(
+				new String[] {
+					"Y.java",
+					"public class Y extends X {\n" +
+					"	void foo() {\n" +
+					"		super.foo(null);\n" +
+					"	}\n" +
+					"}\n"
+				}, 
+				customOptions,
+				"----------\n" + 
+				"1. ERROR in Y.java (at line 3)\n" + 
+				"	super.foo(null);\n" + 
+				"	          ^^^^\n" + 
+				"Null type mismatch: required \'ArrayList<String> @NonNull[]\' but the provided value is null\n" + 
+				"----------\n");
+	}
+	
+	public void testConditional1() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "import java.util.*;\n"
+				+ "public class X {\n"
+				+ "	List<@NonNull String> foo(List<@NonNull String> good, List<String> dubious, int f) {\n"
+				+ "		if (f < 2)\n"
+				+ "			return f == 0 ? good : dubious;\n"
+				+ "		if (f < 4)\n"
+				+ "			return f == 2 ? dubious : good;\n"
+				+ "		if (f < 6)\n"
+				+ "			return f == 4 ? good : good;\n"
+				+ "		return null;\n"
+				+ "	}\n"
+				+ "}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 6)\n" + 
+			"	return f == 0 ? good : dubious;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 8)\n" + 
+			"	return f == 2 ? dubious : good;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n");
+	}
+
+	public void _testConditional2() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "import java.util.*;\n"
+				+ "public class X {\n"
+				+ "	List<@NonNull String> foo(List<@NonNull String> good, ArrayList<String> dubious, int f) {\n"
+				+ "		if (f < 2)\n"
+				+ "			return f == 0 ? good : dubious;\n"
+				+ "		if (f < 4)\n"
+				+ "			return f == 2 ? dubious : good;\n"
+				+ "		if (f < 6)\n"
+				+ "			return f == 4 ? good : good;\n"
+				+ "		return null;\n"
+				+ "	}\n"
+				+ "}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 6)\n" + 
+			"	return f == 0 ? good : dubious;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 8)\n" + 
+			"	return f == 2 ? dubious : good;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n");
+	}
+
+	// types with null annotations on details (type parameter) are compatible to equal types
+	public void testCompatibility1() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "import java.util.*;\n"
+				+ "public class X {\n"
+				+ "	List<@NonNull String> return1(List<@NonNull String> noNulls) {\n"
+				+ "		return noNulls;\n"
+				+ "	}\n"
+				+ "	List<@Nullable String> return2(List<@Nullable String> withNulls) {\n"
+				+ "		return withNulls;\n"
+				+ "	}\n"
+				+ "	void assigns(List<@NonNull String> noNulls, List<String> dubious, List<@Nullable String> withNulls) {\n"
+				+ "		List<@NonNull String> l1 = noNulls;\n"
+				+ "		List<@Nullable String> l2 = withNulls;\n"
+				+ "		List<String> l3 = dubious;\n"
+				+ "	}\n"
+				+ "	void arguments(List<@NonNull String> noNulls, List<String> dubious, List<@Nullable String> withNulls) {\n"
+				+ "		assigns(noNulls, dubious, withNulls);\n"
+				+ "	}\n"
+				+ "}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// types with null annotations on details (array content) are compatible to equal types
+	public void testCompatibility1a() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "public class X {\n"
+				+ "	@NonNull String[] return1(@NonNull String[] noNulls) {\n"
+				+ "		return noNulls;\n"
+				+ "	}\n"
+				+ "	@Nullable String[] return2(@Nullable String[] noNulls) {\n"
+				+ "		return noNulls;\n"
+				+ "	}\n"
+				+ "	void assigns(@NonNull String[] noNulls, String dubious[], @Nullable String[] withNulls) {\n"
+				+ "		@NonNull String[] l1 = noNulls;\n"
+				+ "		@Nullable String[] l2 = withNulls;\n"
+				+ "		String[] l3 = dubious;\n"
+				+ "	}\n"
+				+ "	void arguments(@NonNull String[] noNulls, String[] dubious, @Nullable String[] withNulls) {\n"
+				+ "		assigns(noNulls, dubious, withNulls);\n"
+				+ "	}\n"
+				+ "}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// types with null annotations on details (type parameter) are compatible to types lacking the annotation
+	public void testCompatibility2() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "import java.util.*;\n"
+				+ "public class X {\n"
+				+ "	List<String> return1(List<@NonNull String> noNulls) {\n"
+				+ "		return noNulls;\n"
+				+ "	}\n"
+				+ "	List<String> return2(List<String> dubious) {\n"
+				+ "		return dubious;\n"
+				+ "	}\n"
+				+ "	List<String> return3(List<@Nullable String> withNulls) {\n"
+				+ "		return withNulls;\n"
+				+ "	}\n"
+				+ "	void assigns(List<@NonNull String> noNulls, List<String> dubious, List<@Nullable String> withNulls) {\n"
+				+ "		List<String> l1 = noNulls;\n"
+				+ "		List<String> l2 = dubious;\n"
+				+ "		List<String> l3 = withNulls;\n"
+				+ "	}\n"
+				+ "	void arguments(List<@NonNull String> noNulls, List<String> dubious, List<@Nullable String> withNulls) {\n"
+				+ "		takeAny(noNulls);\n"
+				+ "		takeAny(dubious);\n"
+				+ "		takeAny(withNulls);\n"
+				+ "	}\n"
+				+ "	void takeAny(List<String> any) {}\n"
+				+ "}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// types with null annotations on details (array content) are compatible to types lacking the annotation
+	public void testCompatibility2a() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "public class X {\n"
+				+ "	String[] return1(@NonNull String[] noNulls) {\n"
+				+ "		return noNulls;\n"
+				+ "	}\n"
+				+ "	String[] return2(String[] dubious) {\n"
+				+ "		return dubious;\n"
+				+ "	}\n"
+				+ "	String[] return3(@Nullable String[] withNulls) {\n"
+				+ "		return withNulls;\n"
+				+ "	}\n"
+				+ "	void assigns(@NonNull String[] noNulls, String[] dubious, @Nullable String[] withNulls) {\n"
+				+ "		String[] l1 = noNulls;\n"
+				+ "		String[] l2 = dubious;\n"
+				+ "		String[] l3 = withNulls;\n"
+				+ "	}\n"
+				+ "	void arguments(@NonNull String[] noNulls, String[] dubious, @Nullable String[] withNulls) {\n"
+				+ "		takeAny(noNulls);\n"
+				+ "		takeAny(dubious);\n"
+				+ "		takeAny(withNulls);\n"
+				+ "	}\n"
+				+ "	void takeAny(String[] any) {}\n"
+				+ "}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// types without null annotations are converted (unsafe) to types with detail annotations (type parameter)
+	public void testCompatibility3() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "import java.util.*;\n"
+				+ "public class X {\n"
+				+ "	List<@NonNull String> return1(List<String> dubious) {\n"
+				+ "		return dubious;\n"
+				+ "	}\n"
+				+ "	List<@Nullable String> return2(List<String> dubious) {\n"
+				+ "		return dubious;\n"
+				+ "	}\n"
+				+ "	void assigns(List<String> dubious) {\n"
+				+ "		List<@Nullable String> l1 = dubious;\n"
+				+ "		List<@NonNull String> l2 = dubious;\n"
+				+ "	}\n"
+				+ "	void arguments(List<String> dubious) {\n"
+				+ "		acceptNulls(dubious);\n"
+				+ "		acceptNoNulls(dubious);\n"
+				+ "	}\n"
+				+ "	void acceptNulls(List<@NonNull String> noNulls) {}\n"
+				+ "	void acceptNoNulls(List<@NonNull String> noNulls) {}\n"
+				+ "}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 5)\n" + 
+			"	return dubious;\n" + 
+			"	       ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 8)\n" + 
+			"	return dubious;\n" + 
+			"	       ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@Nullable String>\'\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 11)\n" + 
+			"	List<@Nullable String> l1 = dubious;\n" + 
+			"	                            ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@Nullable String>\'\n" + 
+			"----------\n" + 
+			"4. WARNING in X.java (at line 12)\n" + 
+			"	List<@NonNull String> l2 = dubious;\n" + 
+			"	                           ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n" + 
+			"5. WARNING in X.java (at line 15)\n" + 
+			"	acceptNulls(dubious);\n" + 
+			"	            ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n" + 
+			"6. WARNING in X.java (at line 16)\n" + 
+			"	acceptNoNulls(dubious);\n" + 
+			"	              ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<String>\' needs unchecked conversion to conform to \'List<@NonNull String>\'\n" + 
+			"----------\n");
+	}
+
+	// types without null annotations are converted (unsafe) to types with detail annotations (array content)
+	public void testCompatibility3a() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "public class X {\n"
+				+ "	@NonNull String[] return1(String[] dubious) {\n"
+				+ "		return dubious;\n"
+				+ "	}\n"
+				+ "	@Nullable String[] return2(String[] dubious) {\n"
+				+ "		return dubious;\n"
+				+ "	}\n"
+				+ "	void assigns(String[] dubious) {\n"
+				+ "		@Nullable String[] l1 = dubious;\n"
+				+ "		@NonNull String[] l2 = dubious;\n"
+				+ "	}\n"
+				+ "	void arguments(String[] dubious) {\n"
+				+ "		acceptNulls(dubious);\n"
+				+ "		acceptNoNulls(dubious);\n"
+				+ "	}\n"
+				+ "	void acceptNulls(@Nullable String[] withNulls) {}\n"
+				+ "	void acceptNoNulls(@NonNull String[] noNulls) {}\n"
+				+ "}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 4)\n" + 
+			"	return dubious;\n" + 
+			"	       ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'@NonNull String []\'\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 7)\n" + 
+			"	return dubious;\n" + 
+			"	       ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'@Nullable String []\'\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 10)\n" + 
+			"	@Nullable String[] l1 = dubious;\n" + 
+			"	                        ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'@Nullable String []\'\n" + 
+			"----------\n" + 
+			"4. WARNING in X.java (at line 11)\n" + 
+			"	@NonNull String[] l2 = dubious;\n" + 
+			"	                       ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'@NonNull String []\'\n" + 
+			"----------\n" + 
+			"5. WARNING in X.java (at line 14)\n" + 
+			"	acceptNulls(dubious);\n" + 
+			"	            ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'@Nullable String []\'\n" + 
+			"----------\n" + 
+			"6. WARNING in X.java (at line 15)\n" + 
+			"	acceptNoNulls(dubious);\n" + 
+			"	              ^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'@NonNull String []\'\n" + 
+			"----------\n");
+	}
+
+	// types with null annotations on details (type parameter) are incompatible to opposite types
+	public void testCompatibility4() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "import java.util.*;\n"
+				+ "public class X {\n"
+				+ "	List<@Nullable String> return1(List<@NonNull String> noNulls) {\n"
+				+ "		return noNulls;\n"
+				+ "	}\n"
+				+ "	List<@NonNull String> return2(List<@Nullable String> withNulls) {\n"
+				+ "		return withNulls;\n"
+				+ "	}\n"
+				+ "	void assigns(List<@NonNull String> noNulls, List<@Nullable String> withNulls) {\n"
+				+ "		List<@NonNull String> l1 = withNulls;\n"
+				+ "		List<@Nullable String> l2 = noNulls;\n"
+				+ "	}\n"
+				+ "	void arguments(List<@NonNull String> noNulls, List<@Nullable String> withNulls) {\n"
+				+ "		assigns(withNulls, noNulls);\n"
+				+ "	}\n"
+				+ "}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	return noNulls;\n" + 
+			"	       ^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required 'List<@Nullable String>' but this expression has type 'List<@NonNull String>'\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 8)\n" + 
+			"	return withNulls;\n" + 
+			"	       ^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required 'List<@NonNull String>' but this expression has type 'List<@Nullable String>'\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 11)\n" + 
+			"	List<@NonNull String> l1 = withNulls;\n" + 
+			"	                           ^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required 'List<@NonNull String>' but this expression has type 'List<@Nullable String>'\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 12)\n" + 
+			"	List<@Nullable String> l2 = noNulls;\n" + 
+			"	                            ^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required 'List<@Nullable String>' but this expression has type 'List<@NonNull String>'\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 15)\n" + 
+			"	assigns(withNulls, noNulls);\n" + 
+			"	        ^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required 'List<@NonNull String>' but this expression has type 'List<@Nullable String>'\n" + 
+			"----------\n" + 
+			"6. ERROR in X.java (at line 15)\n" + 
+			"	assigns(withNulls, noNulls);\n" + 
+			"	                   ^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required 'List<@Nullable String>' but this expression has type 'List<@NonNull String>'\n" + 
+			"----------\n");
+	}
+
+	// types with null annotations on details (array content) are incompatible to opposite types
+	public void testCompatibility4a() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n"
+				+ "public class X {\n"
+				+ "	@Nullable String[] return1(@NonNull String[] noNulls) {\n"
+				+ "		return noNulls;\n"
+				+ "	}\n"
+				+ "	@NonNull String[] return2(@Nullable String[] withNulls) {\n"
+				+ "		return withNulls;\n"
+				+ "	}\n"
+				+ "	void assigns(@NonNull String[] noNulls, @Nullable String[] withNulls) {\n"
+				+ "		@NonNull String[] l1 = withNulls;\n"
+				+ "		@Nullable String[] l2 = noNulls;\n"
+				+ "	}\n"
+				+ "	void arguments(@NonNull String[] noNulls, @Nullable String[] withNulls) {\n"
+				+ "		assigns(withNulls, noNulls);\n"
+				+ "	}\n"
+				+ "}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	return noNulls;\n" + 
+			"	       ^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'@Nullable String []\' but this expression has type \'@NonNull String []\'\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
+			"	return withNulls;\n" + 
+			"	       ^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'@NonNull String []\' but this expression has type \'@Nullable String []\'\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 10)\n" + 
+			"	@NonNull String[] l1 = withNulls;\n" + 
+			"	                       ^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'@NonNull String []\' but this expression has type \'@Nullable String []\'\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 11)\n" + 
+			"	@Nullable String[] l2 = noNulls;\n" + 
+			"	                        ^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'@Nullable String []\' but this expression has type \'@NonNull String []\'\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 14)\n" + 
+			"	assigns(withNulls, noNulls);\n" + 
+			"	        ^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'@NonNull String []\' but this expression has type \'@Nullable String []\'\n" + 
+			"----------\n" + 
+			"6. ERROR in X.java (at line 14)\n" + 
+			"	assigns(withNulls, noNulls);\n" + 
+			"	                   ^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'@Nullable String []\' but this expression has type \'@NonNull String []\'\n" + 
+			"----------\n");
+	}
+
+	// challenge parameterized type with partial substitution of super's type parameters
+	public void testCompatibility5() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.util.Map;\n" + 
+				"\n" + 
+				"import org.eclipse.jdt.annotation.*;\n" + 
+				"\n" + 
+				"abstract public class X<Y> implements Map<@NonNull String,Y> {\n" + 
+				"	void foo(X<Object> x) {\n" + 
+				"		Map<@NonNull String, Object> m1 = x; // OK\n" + 
+				"		Map<@Nullable String, Object> m2 = x; // NOK\n" + 
+				"	}\n" + 
+				"}"
+			},
+			getCompilerOptions(),
+			"----------\n" +
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	Map<@Nullable String, Object> m2 = x; // NOK\n" + 
+			"	                                   ^\n" + 
+			"Null type mismatch (type annotations): required \'Map<@Nullable String,Object>\' but this expression has type \'X<Object>\', corresponding supertype is \'Map<@NonNull String,Object>\'\n" + 
+			"----------\n");
+	}
+
+	// challenge parameterized type with partial substitution of super's type parameters
+	public void testCompatibility6() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.util.Map;\n" + 
+				"\n" + 
+				"import org.eclipse.jdt.annotation.*;\n" + 
+				"\n" + 
+				"abstract public class X<@Nullable Y> implements Map<@Nullable String,Y> {\n" + 
+				"	void foo(X<Object> x) {\n" + 
+				"		Map<@Nullable String, @Nullable Object> m1 = x; // OK\n" + 
+				"		Map<@Nullable String, @NonNull Object> m2 = x; // NOK\n" + 
+				"	}\n" + 
+				"}"
+			},
+			getCompilerOptions(),
+			"----------\n" +
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	Map<@Nullable String, @NonNull Object> m2 = x; // NOK\n" + 
+			"	                                            ^\n" + 
+			"Null type mismatch (type annotations): required \'Map<@Nullable String,@NonNull Object>\' but this expression has type \'X<Object>\', corresponding supertype is \'Map<@Nullable String,@Nullable Object>\'\n" + 
+			"----------\n");
+	}
+
+	// illegal for type declaration
+	public void testUnsupportedLocation01() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"public @NonNull class X {}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	public @NonNull class X {}\n" + 
+			"	       ^^^^^^^^\n" + 
+			"The nullness annotation \'NonNull\' is not applicable at this location\n" + 
+			"----------\n");
+	}
+
+	// illegal for enclosing class (locations: field, argument, return type, local
+	public void testUnsupportedLocation02() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"public class X {\n" +
+				"    class Inner {}\n" +
+				"    @NonNull X.Inner f;\n" +
+				"    @NonNull X.Inner foo(@NonNull X.Inner arg) {\n" +
+				"        @NonNull X.Inner local = arg;\n" +
+				"        return local;\n" +
+				"    }\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	@NonNull X.Inner f;\n" + 
+			"	^^^^^^^^\n" + 
+			"The nullness annotation \'NonNull\' is not applicable at this location\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 5)\n" + 
+			"	@NonNull X.Inner foo(@NonNull X.Inner arg) {\n" + 
+			"	^^^^^^^^\n" + 
+			"The nullness annotation \'NonNull\' is not applicable at this location\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 5)\n" + 
+			"	@NonNull X.Inner foo(@NonNull X.Inner arg) {\n" + 
+			"	                     ^^^^^^^^\n" + 
+			"The nullness annotation \'NonNull\' is not applicable at this location\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 6)\n" + 
+			"	@NonNull X.Inner local = arg;\n" + 
+			"	^^^^^^^^\n" + 
+			"The nullness annotation \'NonNull\' is not applicable at this location\n" + 
+			"----------\n");
+	}
+
+	// illegal for cast & instanceof with scalar type
+	public void testUnsupportedLocation03() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"public class X {\n" +
+				"    @NonNull X foo(X arg) {\n" +
+				"        if (!(arg instanceof @NonNull X))\n" +
+				"			return (@NonNull X)arg;\n" +
+				"        return arg;\n" +
+				"    }\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in X.java (at line 4)\n" + 
+			"	if (!(arg instanceof @NonNull X))\n" + 
+			"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The expression of type X is already an instance of type X\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 4)\n" + 
+			"	if (!(arg instanceof @NonNull X))\n" + 
+			"	                     ^^^^^^^^^^\n" + 
+			"Nullness annotations are not applicable at this location \n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 5)\n" + 
+			"	return (@NonNull X)arg;\n" + 
+			"	       ^^^^^^^^^^^^^^^\n" + 
+			"Null type safety: Unchecked cast from X to @NonNull X\n" + 
+			"----------\n");
+	}
+
+	// illegal for cast & instanceof with complex type
+	public void testUnsupportedLocation04() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"import java.util.*;\n" +
+				"public class X {\n" +
+				"    List<@NonNull X> parameterized(List<X> arg) {\n" +
+				"        if (!(arg instanceof List<@NonNull X>))\n" +
+				"			return (java.util.List<@NonNull X>)arg;\n" +
+				"        return arg;\n" +
+				"    }\n" +
+				"    X @NonNull[] arrays(X[] arg) {\n" +
+				"        if (!(arg instanceof X @NonNull[]))\n" +
+				"			return (p.X @NonNull[])arg;\n" +
+				"        return arg;\n" +
+				"    }\n" +
+				"	ArrayList<@NonNull String> foo(List<@NonNull String> l) {\n" + 
+				"		return (ArrayList<@NonNull String>) l;\n" + // OK 
+				"	}" +
+				"	ArrayList<@NonNull String> foo2(List<@NonNull String> l) {\n" + 
+				"		return (ArrayList<String>) l;\n" + // warn, TODO(stephan) with flow analysis (bug 415292) we might recover the original @NonNull...
+				"	}" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in p\\X.java (at line 6)\n" + 
+			"	if (!(arg instanceof List<@NonNull X>))\n" + 
+			"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Cannot perform instanceof check against parameterized type List<X>. Use the form List<?> instead since further generic type information will be erased at runtime\n" + 
+			"----------\n" + 
+			"2. ERROR in p\\X.java (at line 6)\n" + 
+			"	if (!(arg instanceof List<@NonNull X>))\n" + 
+			"	                     ^^^^^^^^^^^^^^^^\n" + 
+			"Nullness annotations are not applicable at this location \n" + 
+			"----------\n" + 
+			"3. WARNING in p\\X.java (at line 7)\n" + 
+			"	return (java.util.List<@NonNull X>)arg;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety: Unchecked cast from List<X> to List<@NonNull X>\n" + 
+			"----------\n" + 
+			"4. WARNING in p\\X.java (at line 11)\n" + 
+			"	if (!(arg instanceof X @NonNull[]))\n" + 
+			"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The expression of type X[] is already an instance of type X[]\n" + 
+			"----------\n" + 
+			"5. ERROR in p\\X.java (at line 11)\n" + 
+			"	if (!(arg instanceof X @NonNull[]))\n" + 
+			"	                     ^^^^^^^^^^^^\n" + 
+			"Nullness annotations are not applicable at this location \n" + 
+			"----------\n" + 
+			"6. WARNING in p\\X.java (at line 12)\n" + 
+			"	return (p.X @NonNull[])arg;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety: Unchecked cast from X[] to X @NonNull[]\n" + 
+			"----------\n" + 
+			"7. WARNING in p\\X.java (at line 18)\n" + 
+			"	return (ArrayList<String>) l;\n" + 
+			"	       ^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'ArrayList<@NonNull String>\'\n" + 
+			"----------\n");
+	}
+
+	// illegal for allocation expression
+	public void testUnsupportedLocation05() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"public class X {\n" +
+				"	X x = new @NonNull X();\n" +
+				"	class Inner {}\n" +
+				"   Inner i = this.new @Nullable Inner();\n" +
+				"	java.util.List<@NonNull String> s = new java.util.ArrayList<@NonNull String>();\n" + // OK
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	X x = new @NonNull X();\n" + 
+			"	          ^^^^^^^^\n" + 
+			"The nullness annotation \'NonNull\' is not applicable at this location\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 5)\n" + 
+			"	Inner i = this.new @Nullable Inner();\n" + 
+			"	                   ^^^^^^^^^\n" + 
+			"The nullness annotation \'Nullable\' is not applicable at this location\n" + 
+			"----------\n");
+	}
+
+	public void testForeach() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"import java.util.*;\n" +
+				"public class X {\n" +
+				"	void foo(List<@NonNull String> nns) {\n" +
+				"		for(String s1 : nns) {\n" +
+				"			logMsg(s1);\n" +
+				"		}\n" +
+				"		for(String s2 : getStrings()) {\n" +
+				"			logMsg(s2);\n" +
+				"		}\n" +
+				"	}\n" +
+				"	Collection<@Nullable String> getStrings() { return null; }\n" +
+				"	void logMsg(@NonNull String msg) { }\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	logMsg(s2);\n" + 
+			"	       ^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is inferred as @Nullable\n" + 
+			"----------\n");
+	}
+	
+	// missing return type should not cause NPE
+	public void testBug415850_01() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" +
+				"public class X {\n" +
+				"	@NonNull foo() {}\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	@NonNull foo() {}\n" + 
+			"	         ^^^^^\n" + 
+			"Return type for the method is missing\n" + 
+			"----------\n");
+	}
+	
+	// enum constant inside raw type: initialization must be recognized as conform to the implicitly @NonNull declaration 
+	public void testBug415850_02(){
+		runConformTestWithLibs(
+			new String[] {
+				"Callable.java",
+				"interface Callable<T> {\n" +
+				"	public enum Result {\n" +
+				"		GOOD, BAD\n" +
+				"	};\n" +
+				"	public Result call(T arg);\n" +
+				"}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// when mapping 1st parameter to method receiver, avoid AIOOBE in ReferenceExpression#resolveType(..)
+	public void testBug415850_03() throws Exception {
+		Map options = getCompilerOptions();
+		options.put(JavaCore.COMPILER_PB_DEPRECATION, JavaCore.IGNORE);
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" +
+				"import java.util.Date;\n" +
+				"import static java.lang.annotation.ElementType.*; \n" +
+				"@Target(TYPE_USE)\n" +
+				"@interface Vernal {}\n" +
+				"interface I {\n" +
+				"	int f(Date d);\n" +
+				"}\n" +
+				"class X {\n" +
+				"	static void monitorTemperature(Object myObject) {\n" +
+				"		I i = @Vernal Date::getDay;\n" +
+				"	}\n" +
+				"}\n",
+			},
+			options,
+			"");
+	}
+
+	// ensure annotation type has super types connected, to avoid NPE in ImplicitNullAnnotationVerifier.collectOverriddenMethods(..)
+	public void testBug415850_04() throws Exception {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"public class X implements @B @C('i') J { }",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"J.java",
+				"interface J {}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// don't let type annotations on array dimensions spoil type compatibility
+	public void testBug415850_05() {
+		runNegativeTestWithLibs(
+			new String[]{
+				"X.java",
+				"import java.lang.annotation.Target;\n" +
+				"import static java.lang.annotation.ElementType.*;\n" +
+				"public class X {\n" +
+				"	public void foo() {\n" +
+				"		int @Marker [][][] i = new @Marker int @Marker [2] @Marker [@Marker bar()] @Marker [];\n" +
+				"	}\n" +
+				"	public int bar() {\n" +
+				"		return 2;\n" +
+				"	}\n" +
+				"}\n" +
+				"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	int @Marker [][][] i = new @Marker int @Marker [2] @Marker [@Marker bar()] @Marker [];\n" + 
+			"	                                                            ^^^^^^^\n" + 
+			"Syntax error, type annotations are illegal here\n" + 
+			"----------\n"); 
+	}
+
+	// don't let type annotations on array dimensions spoil type compatibility
+	// case without any error
+	public void testBug415850_06() {
+		runConformTestWithLibs(
+			new String[]{
+				"X.java",
+				"import java.lang.annotation.Target;\n" +
+				"public class X {\n" +
+				"	public void foo() {\n" +
+				"		int @Marker [][][] i = new @Marker int @Marker [2] @Marker [bar()] @Marker [];\n" +
+				"	}\n" +
+				"	public int bar() {\n" +
+				"		return 2;\n" +
+				"	}\n" +
+				"}\n" +
+				"@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n"
+			},
+			getCompilerOptions(),
+			""); 
+	}
+
+	public void testBug416172() {
+        runNegativeTestWithLibs(
+            new String[] {
+                "X.java",
+                "import org.eclipse.jdt.annotation.NonNull;\n" + 
+                "\n" + 
+                "public class X {\n" + 
+                "   class Y {}\n" + 
+                "   X.@NonNull Y  foo(X.@NonNull Y xy) {\n" + 
+                "       return new X().new Y();\n" + 
+                "   }\n" + 
+                "}\n" + 
+                "\n" + 
+                "class Z extends X {\n" +
+                "   @Override\n" + 
+                "   X.@NonNull Y  foo(X.Y xy) {\n" + 
+                "       return null;\n" + 
+                "   }\n" + 
+                "}\n"
+            },
+            getCompilerOptions(),
+            "----------\n" + 
+    		"1. WARNING in X.java (at line 12)\n" + 
+    		"	X.@NonNull Y  foo(X.Y xy) {\n" + 
+    		"	                  ^^^\n" + 
+    		"Missing non-null annotation: inherited method from X specifies this parameter as @NonNull\n" + 
+    		"----------\n" + 
+    		"2. ERROR in X.java (at line 13)\n" + 
+    		"	return null;\n" + 
+    		"	       ^^^^\n" + 
+    		"Null type mismatch: required \'X.@NonNull Y\' but the provided value is null\n" + 
+    		"----------\n");
+    }
+	
+	public void testBug416174() {
+		// FIXME(stephan): should report null spec violation
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.util.List;\n" + 
+				"\n" + 
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X {\n" + 
+				"	void  foo(List<X> lx) {\n" + 
+				"	}\n" + 
+				"}\n" + 
+				"\n" + 
+				"class Z extends X {\n" + 
+				"	void  foo(List<@NonNull X> xy) {\n" + 
+				"	}\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. WARNING in X.java (at line 11)\n" + 
+			"	void  foo(List<@NonNull X> xy) {\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"The method foo(List<X>) of type Z should be tagged with @Override since it actually overrides a superclass method\n" + 
+			"----------\n");
+	}
+
+	public void testBug416175() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.util.ArrayList;\n" + 
+				"import java.util.List;\n" + 
+				"\n" + 
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		List<@NonNull ? extends @NonNull String> ls = new ArrayList<String>();\n" + 
+				"		ls.add(null);\n" + 
+				"		@NonNull String s = ls.get(0);\n" + 
+				"	}\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. WARNING in X.java (at line 8)\n" + 
+			"	List<@NonNull ? extends @NonNull String> ls = new ArrayList<String>();\n" + 
+			"	                                              ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'List<@NonNull ? extends String>\'\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	ls.add(null);\n" + 
+			"	       ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull ? extends String\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	// original test (was throwing stack overflow)
+	public void testBug416176() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X<@NonNull T> {\n" + 
+				"	T foo(T t) {\n" + 
+				"		return t;\n" + 
+				"	}\n" +
+				"}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	// variant to challenge merging of annotation on type variable and its use
+	public void testBug416176a() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"import org.eclipse.jdt.annotation.Nullable;\n" + 
+				"\n" + 
+				"public class X<@NonNull T> {\n" + 
+				"	T foo(T t) {\n" + 
+				"		return t;\n" + 
+				"	}\n" +
+				"	@NonNull T bar1(@NonNull T t) {\n" +
+				"		return t;\n" +
+				"	}\n" + 
+				"	@NonNull T bar2(@Nullable T t) { // argument: contradiction (1)\n" +
+				"		return t;\n" +
+				"	}\n" + 
+				"	@Nullable T bar3(T t) { // return type: contradiction (2)\n" +
+				"		@Nullable T l = t; // local: contradiction (3)\n" +
+				"		return l;\n" +
+				"	}\n" +
+				"	class Inner {\n" +
+				"		@Nullable T f; // field: contradiction (4)\n" +
+				"	}\n" + 
+				"	T bar3() {\n" +
+				"		return null;\n" +
+				"	}\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 11)\n" + 
+			"	@NonNull T bar2(@Nullable T t) { // argument: contradiction (1)\n" + 
+			"	                ^^^^^^^^^\n" + 
+			"Contradictory null specification; only one of @NonNull and @Nullable can be specified at any location\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 14)\n" + 
+			"	@Nullable T bar3(T t) { // return type: contradiction (2)\n" + 
+			"	^^^^^^^^^\n" + 
+			"Contradictory null specification; only one of @NonNull and @Nullable can be specified at any location\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 15)\n" + 
+			"	@Nullable T l = t; // local: contradiction (3)\n" + 
+			"	^^^^^^^^^\n" + 
+			"Contradictory null specification; only one of @NonNull and @Nullable can be specified at any location\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 19)\n" + 
+			"	@Nullable T f; // field: contradiction (4)\n" + 
+			"	^^^^^^^^^\n" + 
+			"Contradictory null specification; only one of @NonNull and @Nullable can be specified at any location\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 22)\n" + 
+			"	return null;\n" + 
+			"	       ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull T\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	// variant to challenge duplicate methods, though with different parameter annotations
+	public void testBug416176b() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"import org.eclipse.jdt.annotation.Nullable;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"	@NonNull T bar(@NonNull T t) {\n" +
+				"		return t;\n" +
+				"	}\n" + 
+				"	@NonNull T bar(@Nullable T t) {\n" +
+				"		return t;\n" +
+				"	}\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	@NonNull T bar(@NonNull T t) {\n" + 
+			"	           ^^^^^^^^^^^^^^^^^\n" + 
+			"Duplicate method bar(T) in type X<T>\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 8)\n" + 
+			"	@NonNull T bar(@Nullable T t) {\n" + 
+			"	           ^^^^^^^^^^^^^^^^^^\n" + 
+			"Duplicate method bar(T) in type X<T>\n" + 
+			"----------\n");
+	}
+
+	public void testBug416180() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"	T foo(T t) {\n" + 
+				"		return t;\n" + 
+				"	}\n" + 
+				"	\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		X<String> x = new Y();\n" + 
+				"	}\n" + 
+				"} \n" + 
+				"\n" + 
+				"class Y extends X<@NonNull String> {\n" +
+				"   @Override\n" + 
+				"	@NonNull String foo(java.lang.@NonNull String t) {\n" + 
+				"		return \"\";\n" + 
+				"	};\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+
+	public void testBug416181() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"	class Y {\n" + 
+				"		\n" + 
+				"	}\n" + 
+				"	\n" + 
+				"	X<String>.@NonNull Y y = null; // 1st error here.\n" + 
+				"	\n" + 
+				"	@NonNull Y y2 = null; // 2nd error here.\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	X<String>.@NonNull Y y = null; // 1st error here.\n" + 
+			"	                         ^^^^\n" + 
+			"Null type mismatch: required \'X<String>.@NonNull Y\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	@NonNull Y y2 = null; // 2nd error here.\n" + 
+			"	                ^^^^\n" + 
+			"Null type mismatch: required \'X<T>.@NonNull Y\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	public void testBug416182() { 
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"import org.eclipse.jdt.annotation.Nullable;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"	T foo(@NonNull T t) {\n" + 
+				"		return t;\n" + 
+				"	}\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		X<@Nullable String> xs = new X<String>();\n" + // TODO(stephan): must detect that foo() now has contradictory annots, see bug 416190 
+				"		xs.foo(null);\n" + 
+				"	}\n" + 
+				"	\n" +
+				"	public void test(X<String> x) {\n" + 
+				"		X<@Nullable String> xs = x;\n" + 
+				"		xs.bar(null);\n" + 
+				"	}\n" + 
+				"	public void bar(T t) {}\n" + 
+				"\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. WARNING in X.java (at line 9)\n" + 
+			"	X<@Nullable String> xs = new X<String>();\n" + 
+			"	                         ^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type 'X<String>' needs unchecked conversion to conform to 'X<@Nullable String>'\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 14)\n" + 
+			"	X<@Nullable String> xs = x;\n" + 
+			"	                         ^\n" + 
+			"Null type safety (type annotations): The expression of type \'X<String>\' needs unchecked conversion to conform to \'X<@Nullable String>\'\n" + 
+			"----------\n");
+	}
+	
+	public void testBug416183() {
+		runConformTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"	T foo(@NonNull T t) {\n" + 
+				"		return t;\n" + 
+				"	}\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		X<String> xs = new X<String>();\n" + 
+				"		xs.foo(\"\");\n" + 
+				"	}\n" + 
+				"	\n" + 
+				"}\n"
+			},
+			getCompilerOptions(),
+			"");
+	}
+	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=417113#c25, point 4.
+	public void testSubstitution() { 
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"import java.util.List;\n" +
+				"import java.util.ArrayList;\n" +
+				"public class X<T> {\n" +
+				"	T foo(@NonNull List<@NonNull T> l) {\n" +
+				"		return l.get(0);\n" +
+				"	}	\n" +
+				"	public static void main(String[] args) {\n" +
+				"		X<String> s = new X<>();\n" +
+				"		s.foo(new ArrayList<String>()); // (1)\n" +
+				"		s.foo(null); // (2)\n" +
+				"	}\n" +
+				"}\n"
+
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. WARNING in X.java (at line 10)\n" + 
+			"	s.foo(new ArrayList<String>()); // (1)\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'ArrayList<String>\' needs unchecked conversion to conform to \'@NonNull List<@NonNull String>\'\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 11)\n" + 
+			"	s.foo(null); // (2)\n" + 
+			"	      ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull List<@NonNull String>\' but the provided value is null\n" + 
+			"----------\n");
+	}
+	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=417113#c25, point 4.
+	public void testSubstitution2() { 
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"import org.eclipse.jdt.annotation.Nullable;\n" + 
+				"public class X<T> {\n" +
+				"	T foo(@NonNull T @NonNull [] l) {\n" +
+				"		return l[0];\n" +
+				"	}	\n" +
+				"	public static void main(String[] args) {\n" +
+				"		X<String> s = new X<>();\n" +
+				"       s.foo(new String [] { null });\n" +
+				"       s.foo(new String @Nullable [] { null });\n" +
+				"       s.foo(new String @NonNull [] { null });\n" +
+				"       s.foo(new @Nullable String @NonNull [] { null });\n" +
+				"       s.foo(new @NonNull String @NonNull [] { \"\" });\n" +
+				"		s.foo(null); // (2)\n" +
+				"	}\n" +
+				"}\n"
+
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. WARNING in X.java (at line 9)\n" + 
+			"	s.foo(new String [] { null });\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String[]\' needs unchecked conversion to conform to \'@NonNull String @NonNull[]\'\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 10)\n" + 
+			"	s.foo(new String @Nullable [] { null });\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String @Nullable[]\' needs unchecked conversion to conform to \'@NonNull String @NonNull[]\'\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 11)\n" + 
+			"	s.foo(new String @NonNull [] { null });\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'String @NonNull[]\' needs unchecked conversion to conform to \'@NonNull String @NonNull[]\'\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 12)\n" + 
+			"	s.foo(new @Nullable String @NonNull [] { null });\n" + 
+			"	      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type mismatch (type annotations): required \'@NonNull String @NonNull[]\' but this expression has type \'@Nullable String @NonNull[]\'\n" + 
+			"----------\n" + 
+			"5. ERROR in X.java (at line 14)\n" + 
+			"	s.foo(null); // (2)\n" + 
+			"	      ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String @NonNull[]\' but the provided value is null\n" + 
+			"----------\n");
+	}
+	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=417113#c25, point 4.
+	public void testSubstitution3() { 
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"public class X<T> {\n" +
+				"	T foo(@NonNull T l) {\n" +
+				"		return l;\n" +
+				"	}	\n" +
+				"	public static void main(String[] args) {\n" +
+				"		X<String> s = new X<>();\n" +
+				"       s.foo(null);\n" +
+				"	}\n" +
+				"}\n"
+
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	s.foo(null);\n" + 
+			"	      ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n");
+	}
+	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=417113#c25, point 4.
+	public void testSubstitution4() { 
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface TypeAnnotation {\n" +
+				"}\n" +
+				"public class X<T> {\n" +
+				"    class Y {}\n" +
+				"    void foo(@TypeAnnotation X<T>.@NonNull Y l) {\n" +
+				"    }	\n" +
+				"    public static void main(String[] args) {\n" +
+				"        X<String> s = new X<>();\n" +
+				"        s.foo(null);\n" +
+				"    }\n" +
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 13)\n" + 
+			"	s.foo(null);\n" + 
+			"	      ^^^^\n" + 
+			"Null type mismatch: required \'X<String>.@NonNull Y\' but the provided value is null\n" + 
+			"----------\n");
+	}
+	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=417113#c25, point 4.
+	public void testSubstitution5() { 
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"public class X<T> {\n" +
+				"    void foo(@NonNull X<@NonNull ? extends T> p) {\n" +
+				"    }	\n" +
+				"    public static void main(String[] args) {\n" +
+				"        X<String> s = new X<>();\n" +
+				"        X<@NonNull String> s2 = new X<@NonNull String>();\n" +
+				"        s.foo(s);\n" +
+				"        s.foo(s2);\n" +
+				"    }\n" +
+				"}\n"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. WARNING in X.java (at line 8)\n" + 
+			"	s.foo(s);\n" + 
+			"	      ^\n" + 
+			"Null type safety (type annotations): The expression of type \'X<String>\' needs unchecked conversion to conform to \'@NonNull X<@NonNull ? extends String>\'\n" + 
+			"----------\n");
+	}
+	
+	// https://bugs.eclipse.org/417758 - [1.8][null] Null safety compromise during array creation.
+	// original test case
+	public void testArray1() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"   \n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		@NonNull String @NonNull [] s = new @NonNull String [] { null };\n" + 
+				"		if (s != null && s[0] != null) {\n" + 
+				"			System.out.println(\"Not null\");\n" + 
+				"		}\n" + 
+				"		System.out.println(\"Length = \" + s[0].length());\n" + 
+				"	}\n" + 
+				"}"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	@NonNull String @NonNull [] s = new @NonNull String [] { null };\n" + 
+			"	                                                         ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
+			"	if (s != null && s[0] != null) {\n" + 
+			"	    ^\n" + 
+			"Redundant null check: comparing \'@NonNull String @NonNull[]\' against null\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 7)\n" + 
+			"	if (s != null && s[0] != null) {\n" + 
+			"	                 ^^^^\n" + 
+			"Redundant null check: comparing \'@NonNull String\' against null\n" + 
+			"----------\n");
+	}
+	
+	// https://bugs.eclipse.org/417758 - [1.8][null] Null safety compromise during array creation.
+	// two-dim array with annotations on dimensions
+	public void testArray2() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"   \n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		@NonNull String @NonNull [][] s1 = new @NonNull String @NonNull [][] { null, { null} }; // problem at inner null\n" + 
+				"		@NonNull String @NonNull [][] s2 = new @NonNull String [] @NonNull [] { null, { null} }; // problem at both nulls\n" + 
+				"	}\n" + 
+				"}"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. ERROR in X.java (at line 6)\n" + 
+			"	@NonNull String @NonNull [][] s1 = new @NonNull String @NonNull [][] { null, { null} }; // problem at inner null\n" + 
+			"	                                                                               ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 7)\n" + 
+			"	@NonNull String @NonNull [][] s2 = new @NonNull String [] @NonNull [] { null, { null} }; // problem at both nulls\n" + 
+			"	                                                                        ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String @NonNull[]\' but the provided value is null\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 7)\n" + 
+			"	@NonNull String @NonNull [][] s2 = new @NonNull String [] @NonNull [] { null, { null} }; // problem at both nulls\n" + 
+			"	                                                                                ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	// https://bugs.eclipse.org/417758 - [1.8][null] Null safety compromise during array creation.
+	// three-dim array with annotations on dimensions, also assignment has a problem
+	public void testArray3() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"   \n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		@NonNull String [][] @NonNull [] s = new @NonNull String []@NonNull [][] { null, { {null}, null/*ok*/ } };\n" + 
+				"	}\n" + 
+				"}"
+			},
+			getCompilerOptions(),
+			"----------\n" + 
+			"1. WARNING in X.java (at line 6)\n" + 
+			"	@NonNull String [][] @NonNull [] s = new @NonNull String []@NonNull [][] { null, { {null}, null/*ok*/ } };\n" + 
+			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'@NonNull String [] @NonNull[] []\' needs unchecked conversion to conform to \'@NonNull String [] [] @NonNull[]\'\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 6)\n" + 
+			"	@NonNull String [][] @NonNull [] s = new @NonNull String []@NonNull [][] { null, { {null}, null/*ok*/ } };\n" + 
+			"	                                                                           ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String @NonNull[] []\' but the provided value is null\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 6)\n" + 
+			"	@NonNull String [][] @NonNull [] s = new @NonNull String []@NonNull [][] { null, { {null}, null/*ok*/ } };\n" + 
+			"	                                                                                    ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull String\' but the provided value is null\n" + 
+			"----------\n");
+	}
+
+	public void testBug417759() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.*;\n" + 
+				"\n" + 
+				"public class X<T> {\n" + 
+				"	void foo(@NonNull X<@NonNull ?> l) { \n" + 
+				"	}	\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		@NonNull X<String> s = new X<>();\n" + 
+				"       s.foo(s);  // String vs. @NonNull ?\n" +
+				"       @NonNull X<@Nullable String> s2 = new X<>();\n" +
+				"		s.foo(s2); // @Nullable String vs. @NonNull ?\n" +
+				"       @NonNull X<@NonNull String> s3 = new X<>();\n" +
+				"		s.foo(s3); // good\n" +
+				"	}\n" + 
+				"}"
+			}, 
+			getCompilerOptions(), 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 8)\n" + 
+			"	s.foo(s);  // String vs. @NonNull ?\n" + 
+			"	      ^\n" + 
+			"Null type safety (type annotations): The expression of type \'@NonNull X<String>\' needs unchecked conversion to conform to \'@NonNull X<@NonNull ?>\'\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 10)\n" + 
+			"	s.foo(s2); // @Nullable String vs. @NonNull ?\n" + 
+			"	      ^^\n" + 
+			"Null type mismatch (type annotations): required \'@NonNull X<@NonNull ?>\' but this expression has type \'@NonNull X<@Nullable String>\'\n" + 
+			"----------\n");		
+	}
+	public void testTypeVariable() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface Junk {\n" +
+				"}\n" +
+				"public class X<@NonNull T> {\n" +
+				"	T t = null;\n" +
+				"	@Junk T t2 = null;\n" +
+				"}\n"
+			}, 
+			getCompilerOptions(), 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 8)\n" + 
+			"	T t = null;\n" + 
+			"	      ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull T\' but the provided value is null\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 9)\n" + 
+			"	@Junk T t2 = null;\n" + 
+			"	             ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull T\' but the provided value is null\n" + 
+			"----------\n");		
+	}
+	public void testSE7AnnotationCopy() { // we were dropping annotations here, but null analysis worked already since the tagbits were not "dropped", just the same capturing in a test
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	class Y {}\n" +
+				"	void foo(@T X.@NonNull Y p) {\n" +
+				"		foo(null);\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			getCompilerOptions(), 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	foo(null);\n" + 
+			"	    ^^^^\n" + 
+			"Null type mismatch: required \'X.@NonNull Y\' but the provided value is null\n" + 
+			"----------\n");		
+	}
+	public void testWildcardCapture() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import java.util.ArrayList;\n" +
+				"import java.util.List;\n" +
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"       List<X> ax = new ArrayList<X>();\n" +
+				"       ax.add(new X());\n" +
+				"		List<? extends X> lx = ax;\n" +
+				"		getAdd(lx);\n" +
+				"	}\n" +
+				"	static <@NonNull P>  void getAdd(List<P> lt) {\n" +
+				"		lt.add(lt.get(0));\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			getCompilerOptions(), 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 16)\n" + 
+			"	getAdd(lx);\n" + 
+			"	       ^^\n" + 
+			"Null type safety (type annotations): The expression of type \'List<capture#>\' needs unchecked conversion to conform to \'List<@NonNull capture#>\'\n" + 
+			"----------\n");		
+	}
+	public void testWildcardCapture2() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import java.util.ArrayList;\n" +
+				"import java.util.List;\n" +
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"       List<@NonNull X> ax = new ArrayList<@NonNull X>();\n" +
+				"       ax.add(new X());\n" +
+				"		List<@NonNull ? extends X> lx = ax;\n" +
+				"		getAdd(lx);\n" +
+				"	}\n" +
+				"	static <@NonNull P>  void getAdd(List<P> lt) {\n" +
+				"		lt.add(lt.get(0));\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			getCompilerOptions(), 
+			"");		
+	}
+	public void testWildcardCapture3() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import java.util.ArrayList;\n" +
+				"import java.util.List;\n" +
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"import org.eclipse.jdt.annotation.Nullable;\n" +
+				"\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"       List<@Nullable X> ax = new ArrayList<@Nullable X>();\n" +
+				"       ax.add(new X());\n" +
+				"		List<@Nullable ? extends X> lx = ax;\n" +
+				"		getAdd(lx);\n" +
+				"	}\n" +
+				"	static <@NonNull P>  void getAdd(List<P> lt) {\n" +
+				"		lt.add(lt.get(0));\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			getCompilerOptions(), 
+			"");		
+	}
+	public void testLocalArrays() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"import org.eclipse.jdt.annotation.Nullable;\n" +
+				"\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"       class L {};\n" +
+				"       L @NonNull [] @Nullable [] la = new L[5][];\n" +
+				"       L @Nullable [] @NonNull [] la2 = new L[3][];\n" +
+				"       la = la2;\n" +
+				"   }\n" +
+				"}\n"
+			}, 
+			getCompilerOptions(), 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 13)\n" + 
+			"	L @NonNull [] @Nullable [] la = new L[5][];\n" + 
+			"	                                ^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'L[][]\' needs unchecked conversion to conform to \'L @NonNull[] @Nullable[]\'\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 14)\n" + 
+			"	L @Nullable [] @NonNull [] la2 = new L[3][];\n" + 
+			"	                                 ^^^^^^^^^^\n" + 
+			"Null type safety (type annotations): The expression of type \'L[][]\' needs unchecked conversion to conform to \'L @Nullable[] @NonNull[]\'\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 15)\n" + 
+			"	la = la2;\n" + 
+			"	     ^^^\n" + 
+			"Null type mismatch (type annotations): required \'L @NonNull[] @Nullable[]\' but this expression has type \'L @Nullable[] @NonNull[]\'\n" + 
+			"----------\n");
+		
+		// Without annotations.
+		runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	public static void main(String[] args) {\n" +
+					"       class L {};\n" +
+					"       L [] [] la = new L[5][];\n" +
+					"       L []  [] la2 = new L[3][];\n" +
+					"       la = la2;\n" +
+					"       System.out.println(\"Done\");\n" +
+					"   }\n" +
+					"}\n"
+				}, 
+				"Done");
+	}
+	public void testRawType() {
+		runNegativeTestWithLibs(
+			new String[] {
+				"X.java",
+				"import org.eclipse.jdt.annotation.NonNull;\n" +
+				"public class X<T> {\n" +
+				"	class Y <P> {}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		@NonNull X x = null;\n" +
+				"		X.@NonNull Y xy = null;\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			getCompilerOptions(), 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 5)\n" + 
+			"	@NonNull X x = null;\n" + 
+			"	         ^\n" + 
+			"X is a raw type. References to generic type X<T> should be parameterized\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 5)\n" + 
+			"	@NonNull X x = null;\n" + 
+			"	               ^^^^\n" + 
+			"Null type mismatch: required \'@NonNull X\' but the provided value is null\n" + 
+			"----------\n" + 
+			"3. WARNING in X.java (at line 6)\n" + 
+			"	X.@NonNull Y xy = null;\n" + 
+			"	^^^^^^^^^^^^\n" + 
+			"X.Y is a raw type. References to generic type X<T>.Y<P> should be parameterized\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 6)\n" + 
+			"	X.@NonNull Y xy = null;\n" + 
+			"	                  ^^^^\n" + 
+			"Null type mismatch: required \'X.@NonNull Y\' but the provided value is null\n" + 
+			"----------\n");		
+	}	
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
index 5ef1b36..d2c0f2f 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
@@ -8374,4 +8374,97 @@
 		"}\n"
 	);
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406396, Method can be static analysis misses a bunch of cases... 
+public void test406396() {
+	Map compilerOptions = getCompilerOptions();
+	compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+	compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+	this.runNegativeTest(
+		new String[] {
+			"X.java", 
+			"public class X  {\n" +
+			"	int f;\n" +
+			"	void foo() {\n" +
+			"		class Y {\n" +
+			"			int p;\n" +
+			"			{\n" +
+			"				class Z {\n" +
+			"					int f = p;\n" +
+			"				}\n" +
+			"			}\n" +
+			"		};\n" +
+			"	}\n" +
+			"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 3)\n" + 
+		"	void foo() {\n" + 
+		"	     ^^^^^\n" + 
+		"The method foo() from the type X can potentially be declared as static\n" + 
+		"----------\n" + 
+		"2. WARNING in X.java (at line 4)\n" + 
+		"	class Y {\n" + 
+		"	      ^\n" + 
+		"The type Y is never used locally\n" + 
+		"----------\n" + 
+		"3. WARNING in X.java (at line 7)\n" + 
+		"	class Z {\n" + 
+		"	      ^\n" + 
+		"The type Z is never used locally\n" + 
+		"----------\n" + 
+		"4. WARNING in X.java (at line 8)\n" + 
+		"	int f = p;\n" + 
+		"	    ^\n" + 
+		"The field Z.f is hiding a field from type X\n" + 
+		"----------\n" + 
+		"5. WARNING in X.java (at line 8)\n" + 
+		"	int f = p;\n" + 
+		"	    ^\n" + 
+		"The value of the field Z.f is not used\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		compilerOptions /* custom options */
+	);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406396, Method can be static analysis misses a bunch of cases... 
+public void test406396a() {
+	Map compilerOptions = getCompilerOptions();
+	compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBeStatic, CompilerOptions.ERROR);
+	compilerOptions.put(CompilerOptions.OPTION_ReportMethodCanBePotentiallyStatic, CompilerOptions.ERROR);
+	this.runNegativeTest(
+		new String[] {
+			"X.java", 
+			"public class X  {\n" +
+			"	int f;\n" +
+			"	int foo() {\n" +
+			"		int f = 0;\n" +
+			"		return f;\n" +
+			"	}\n" +
+			"	int goo() {\n" +
+			"		return 0;\n" +
+			"	}\n" +
+			"}\n"
+		},
+		"----------\n" + 
+		"1. ERROR in X.java (at line 3)\n" + 
+		"	int foo() {\n" + 
+		"	    ^^^^^\n" + 
+		"The method foo() from the type X can potentially be declared as static\n" + 
+		"----------\n" + 
+		"2. WARNING in X.java (at line 4)\n" + 
+		"	int f = 0;\n" + 
+		"	    ^\n" + 
+		"The local variable f is hiding a field from type X\n" + 
+		"----------\n" + 
+		"3. ERROR in X.java (at line 7)\n" + 
+		"	int goo() {\n" + 
+		"	    ^^^^^\n" + 
+		"The method goo() from the type X can potentially be declared as static\n" + 
+		"----------\n",
+		null /* no extra class libraries */,
+		true /* flush output directory */,
+		compilerOptions /* custom options */
+	);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RepeatableAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RepeatableAnnotationTest.java
new file mode 100644
index 0000000..e8810bc
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/RepeatableAnnotationTest.java
@@ -0,0 +1,1534 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper S Moller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Jesper S Moller - initial API and implementation
+ *     					Bug 412151 - [1.8][compiler] Check repeating annotation's collection type
+ *     					Bug 412149 - [1.8][compiler] Emit repeated annotations into the designated container
+ *     					Bug 419209 - [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
+ *		Stephan Herrmann - Contribution for
+ *						Bug 419209 - [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.jdt.internal.compiler.impl.IntConstant;
+import org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;
+
+public class RepeatableAnnotationTest extends AbstractComparableTest {
+
+	// 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[] { "test006" };
+//		TESTS_NUMBERS = new int[] { 297 };
+//		TESTS_RANGE = new int[] { 294, -1 };
+	}
+
+	public RepeatableAnnotationTest(String name) {
+		super(name);
+	}
+
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+
+	public static Class testClass() {
+		return RepeatableAnnotationTest.class;
+	}
+
+	// check repeated occurrence of non-repeatable annotation
+	public void test001() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"public @Foo @Foo class X {\n" +
+				"}\n" +
+				"\n",
+				"Foo.java",
+				"public @interface Foo {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	public @Foo @Foo class X {\n" + 
+			"	       ^^^^\n" + 
+			"Duplicate annotation of non-repeatable type @Foo. Only annotation types marked @Repeatable can be used multiple times at one target.\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 1)\n" + 
+			"	public @Foo @Foo class X {\n" + 
+			"	            ^^^^\n" + 
+			"Duplicate annotation of non-repeatable type @Foo. Only annotation types marked @Repeatable can be used multiple times at one target.\n" + 
+			"----------\n");
+	}
+
+	public void test002() {
+		this.runConformTest(
+				new String[] {
+						"X.java",
+						"@Foo @Foo public class X {\n" +
+								"}\n" +
+								"\n",
+								"Foo.java",
+								"@java.lang.annotation.Repeatable(FooContainer.class) public @interface Foo {\n" +
+										"}\n",
+										"FooContainer.java",
+										"public @interface FooContainer {\n" +
+												"	Foo[] value();\n" +
+												"}\n"
+				},
+				"");
+	}
+
+	// check repeated occurrence of annotation where annotation container is not valid for the target 
+	public void test003() {
+		this.runNegativeTest(
+			new String[] {
+				"FooContainer.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target({ElementType.METHOD, ElementType.FIELD}) public @interface FooContainer {\n" +
+				
+				"	Foo[] value();\n" +
+				"}\n",
+				"Foo.java",
+				"@java.lang.annotation.Repeatable(FooContainer.class) public @interface Foo {\n" +
+				"}\n",
+				"X.java",
+				"@Foo @Foo public class X { /* Problem */\n" +
+				"  @Foo @Foo void okHere() { /* No problem */\n" +
+				"    @Foo @Foo int local = 0; /* Problem! */\n" +
+				"  }\n" +
+				"  @Foo @Foo int alsoFoo = 0; /* No problem */\n" +
+				"  @Foo class Y {} /* No problem since not repeated */\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	@Foo @Foo public class X { /* Problem */\n" + 
+			"	^^^^\n" + 
+			"The annotation @Foo cannot be repeated at this location since its container annotation type @FooContainer is disallowed at this location\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 3)\n" + 
+			"	@Foo @Foo int local = 0; /* Problem! */\n" + 
+			"	^^^^\n" + 
+			"The annotation @Foo cannot be repeated at this location since its container annotation type @FooContainer is disallowed at this location\n" + 
+			"----------\n");
+	}
+
+	// This is the same test as test003, only where the annotation info for Foo is from a class file, not from the compiler
+	public void test004() {
+		this.runConformTest(
+			new String[] {
+					"FooContainer.java",
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"@Target({ElementType.METHOD, ElementType.FIELD}) public @interface FooContainer {\n" +
+					"	Foo[] value();\n" +
+					"}\n",
+					"Foo.java",
+					"@java.lang.annotation.Repeatable(FooContainer.class) public @interface Foo {\n" +
+					"}\n"
+				}, 
+				"");
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"@Foo @Foo public class X { /* Problem */\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	@Foo @Foo public class X { /* Problem */\n" + 
+			"	^^^^\n" + 
+			"The annotation @Foo cannot be repeated at this location since its container annotation type @FooContainer is disallowed at this location\n" + 
+			"----------\n",
+			null, false /* don't flush*/);
+	}
+
+	// Test that a single, repeatable annotation can exist just fine an occurrence of its container annotation
+	public void test005() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"@java.lang.annotation.Repeatable(FooContainer.class) @interface Foo {}\n" +
+				"@interface FooContainer { Foo[] value(); }\n" +
+				"@Foo @FooContainer({@Foo, @Foo}) public class X { /* Not a problem */ }\n"
+			}, 
+			"");
+	}
+
+	// Test that an repeated annotation can't occur together with its container annotation
+	public void test006() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"@interface FooContainer { Foo[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class) @interface Foo {}\n" +
+				"@Foo @Foo @FooContainer({@Foo, @Foo}) public class X { /* A problem */ }\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 3)\n" + 
+			"	@Foo @Foo @FooContainer({@Foo, @Foo}) public class X { /* A problem */ }\n" + 
+			"	^^^^\n" + 
+			"The repeatable annotation @Foo may not be repeated where its container annotation type @FooContainer is also used directly\n" + 
+			"----------\n");
+	}
+
+	// Test that an repeated annotation can't occur together with its container annotation, even if it itself is repeatable.
+	public void test007() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"@interface FooContainerContainer { FooContainer[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainerContainer.class) @interface FooContainer { Foo[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class) @interface Foo {}\n" +
+				"@Foo @Foo @FooContainer({@Foo, @Foo}) public class X { /* Still a problem */ }\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	@Foo @Foo @FooContainer({@Foo, @Foo}) public class X { /* Still a problem */ }\n" + 
+			"	^^^^\n" + 
+			"The repeatable annotation @Foo may not be repeated where its container annotation type @FooContainer is also used directly\n" + 
+			"----------\n");
+	}
+	
+	// Test that an repeated annotation can't occur together with its container annotation, even if it itself is repeatable.
+	public void test007a() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"@interface FooContainerContainer { FooContainer[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainerContainer.class) @interface FooContainer { Foo[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class) @interface Foo {}\n" +
+				"@interface Bar {}\n" +
+				"@Foo @Foo @Bar @Bar @FooContainer({@Foo, @Foo}) public class X { /* Still a problem */ }\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 5)\n" + 
+			"	@Foo @Foo @Bar @Bar @FooContainer({@Foo, @Foo}) public class X { /* Still a problem */ }\n" + 
+			"	^^^^\n" + 
+			"The repeatable annotation @Foo may not be repeated where its container annotation type @FooContainer is also used directly\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 5)\n" + 
+			"	@Foo @Foo @Bar @Bar @FooContainer({@Foo, @Foo}) public class X { /* Still a problem */ }\n" + 
+			"	          ^^^^\n" + 
+			"Duplicate annotation of non-repeatable type @Bar. Only annotation types marked @Repeatable can be used multiple times at one target.\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 5)\n" + 
+			"	@Foo @Foo @Bar @Bar @FooContainer({@Foo, @Foo}) public class X { /* Still a problem */ }\n" + 
+			"	               ^^^^\n" + 
+			"Duplicate annotation of non-repeatable type @Bar. Only annotation types marked @Repeatable can be used multiple times at one target.\n" + 
+			"----------\n");
+	}
+
+	// Test that repeated annotations should be contiguous (raises a warning if not) -- not yet in BETA_JAVA8
+	public void _test008() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"@interface Bar {}\n" +
+				"@interface Baz {}\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class) @interface Foo {}\n" +
+				"@interface FooContainer { Foo[] value(); }\n" +
+				"@Foo @Bar @Foo /* just lexical */ @Foo public class X { /* Gives a warning */ }\n"
+			}, 
+			"----------\n" + 
+			"1. WARNING in X.java (at line 5)\n" + 
+			"	@Foo @Bar @Foo /* just lexical */ @Foo public class X { /* Gives a warning */ }\n" + 
+			"	          ^^^^\n" + 
+			"Repeated @Foo annotations are not grouped together\n" + 
+			"----------\n");
+	}
+	// Test that deprecation of container annotation is reflected in the repeated annotation (disabled until specification clarification is available)
+	public void _test009() {
+		this.runConformTest(
+			new String[] {
+				"Y.java",
+				"@java.lang.annotation.Repeatable(FooContainer.class) @interface Foo { int value(); }\n" +
+				"@Deprecated @interface FooContainer { Foo[] value(); }\n" +
+				"@Foo(0) class X { /* Gives a warning */ }\n" + 
+				"@Foo(1) @Foo(2) public class Y { /* Gives a warning */ }\n"
+			}, 
+			new ASTVisitor() {
+				public boolean visit(
+						TypeDeclaration typeDeclaration,
+						CompilationUnitScope scope) {
+						if (new String(typeDeclaration.name).equals("X")) {
+							assertFalse("Foo on X should NOT be deprecated!", typeDeclaration.annotations[0].getCompilerAnnotation().getAnnotationType().isDeprecated());
+						}
+						if (new String(typeDeclaration.name).equals("Y")) {
+							assertEquals("Find Foo(1) on Y",  IntConstant.fromValue(1), typeDeclaration.annotations[0].getCompilerAnnotation().getElementValuePairs()[0].value);
+							assertTrue("1st Foo on Y should be deprecated!", typeDeclaration.annotations[0].getCompilerAnnotation().getAnnotationType().isDeprecated());
+							assertEquals("Find Foo(2) on Y",  IntConstant.fromValue(2), typeDeclaration.annotations[1].getCompilerAnnotation().getElementValuePairs()[0].value);
+							assertTrue("2nd Foo on Y should be deprecated!", typeDeclaration.annotations[1].getCompilerAnnotation().getAnnotationType().isDeprecated());
+						}
+						return true; // do nothing by default, keep traversing
+					}
+			});
+	}
+	// Bug 412151: [1.8][compiler] Check repeating annotation's collection type
+	// 412151: The collections type's (TC) declaration must have a array of Ts as its value() - with Foo and FooContainer in same compilation round
+	public void test010() {
+		this.runNegativeTest(
+			new String[] {
+			"Foo.java",
+			"@interface FooContainer {\n" +
+			"}\n" +
+			"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+			"@interface Foo {}\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 3)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"The container annotation type @FooContainer must declare a member value()\n" + 
+		"----------\n");
+	}
+	// 412151: The collections type's (TC) declaration must have a array of Ts as its value() - with Foo and FooContainer in same compilation round
+	public void test011() {
+		this.runNegativeTest(
+			new String[] {
+			"Foo.java",
+			"@interface FooContainer {\n" +
+			"    int[] value();\n" +
+			"}\n" +
+			"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+			"@interface Foo {}\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 4)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"The value method in the container annotation type @FooContainer must be of type Foo[] but is int[]\n" + 
+		"----------\n");
+	}
+	// 412151: The collections type's (TC) declaration must have a array of Ts as its value() - with Foo and FooContainer in same compilation round
+	public void test012() {
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"@interface FooContainer {\n" +
+				"    Foo[][] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@interface Foo {}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in Foo.java (at line 2)\n" + 
+			"	Foo[][] value();\n" + 
+			"	^^^^^^^\n" + 
+			"Invalid type Foo[][] for the annotation attribute FooContainer.value; only primitive type, String, Class, annotation, enumeration are permitted or 1-dimensional arrays thereof\n" + 
+			"----------\n" + 
+			"2. ERROR in Foo.java (at line 4)\n" + 
+			"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+			"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+			"The value method in the container annotation type @FooContainer must be of type Foo[] but is Foo[][]\n" + 
+			"----------\n"
+		);
+	}
+	// 412151: Any methods declared by TC other than value() have a default value (JLS 9.6.2).
+	public void test013() {
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"@interface FooContainer {\n" +
+				"    Foo[] value();\n" +
+				"    int hasDefaultValue() default 1337;\n" +
+				"    int doesntHaveDefaultValue();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@interface Foo {}\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 6)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"The container annotation type @FooContainer must declare a default value for the annotation attribute \'doesntHaveDefaultValue\'\n" + 
+		"----------\n");
+	}
+	// 412151: The @Retention meta-annotation of TC must at least include the retention of T ()
+	public void test014() {
+		this.runConformTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@interface FooContainer {\n" +
+				"    Foo[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@interface Foo {\n" +
+				"}\n"
+			}, 
+		"");
+	}
+
+	// 
+	public void test015() {
+		// These are fine:
+		this.runConformTest(
+			new String[] {
+					"FooContainer.java",
+					"public @interface FooContainer {\n" +
+					"	Foo[] value();\n" +
+					"}\n",
+					"Foo.java",
+					"@java.lang.annotation.Repeatable(FooContainer.class) public @interface Foo {\n" +
+					"}\n"
+				}, 
+				"");
+		// This changes FooContainer without re-checking Foo
+		this.runConformTest(
+				new String[] {
+						"FooContainer.java",
+						"public @interface FooContainer {\n" +
+						"	int[] value();\n" +
+						"}\n"
+					},
+					"",
+					null,
+					false,
+					null);
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"@Foo @Foo public class X { /* Problem since Foo now uses FooContainer which doesn't work anymore*/\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	@Foo @Foo public class X { /* Problem since Foo now uses FooContainer which doesn\'t work anymore*/\n" + 
+			"	^^^^\n" + 
+			"The value method in the container annotation type @FooContainer must be of type Foo[] but is int[]\n" + 
+			"----------\n",
+			null, false /* don't flush*/);
+	}
+
+	// 412151: The @Retention meta-annotation of TC must at least include the retention of T ()
+	// Base example, both targets are specified
+	public void test016() {
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"@Retention(RetentionPolicy.SOURCE)\n" +
+				"@interface FooContainer { Foo[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Foo { }\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 5)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"Retention \'RUNTIME\' of @Foo is longer than the retention of its container annotation type @FooContainer, which is \'SOURCE\'\n" + 
+		"----------\n");
+	}
+
+	// 412151: The @Retention meta-annotation of TC must at least include the retention of T ()
+	// Only specified on FooContainer
+	public void test017() {
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"@Retention(RetentionPolicy.SOURCE)\n" +
+				"@interface FooContainer { Foo[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@interface Foo { }\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 5)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"Retention \'CLASS\' of @Foo is longer than the retention of its container annotation type @FooContainer, which is \'SOURCE\'\n" + 
+		"----------\n");
+	}
+
+	// 412151: The @Retention meta-annotation of TC must at least include the retention of T ()
+	// Only specified on Foo
+	public void test018() {
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"@interface FooContainer { Foo[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Foo { }\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 4)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"Retention \'RUNTIME\' of @Foo is longer than the retention of its container annotation type @FooContainer, which is \'CLASS\'\n" + 
+		"----------\n");
+	}
+
+	// 412151: The @Retention meta-annotation of TC must at least include the retention of T ()
+	// Only specified on Foo - but positive
+	public void test019() {
+		this.runConformTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"@interface FooContainer { Foo[] value(); }\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@Retention(RetentionPolicy.SOURCE)\n" +
+				"@interface Foo { }\n"
+			});
+	}
+
+	// 412151: The @Retention meta-annotation of TC must at least include the retention of T
+	// Only specified on FooContainer, separate compilation
+	public void test020() {
+		this.runConformTest(
+			new String[] {
+					"FooContainer.java",
+					"import java.lang.annotation.Retention;\n" + 
+					"import java.lang.annotation.RetentionPolicy;\n" + 
+					"@Retention(RetentionPolicy.SOURCE)\n" +
+					"public @interface FooContainer { Foo[] value(); }\n",
+					"Foo.java",
+					"import java.lang.annotation.Retention;\n" + 
+					"import java.lang.annotation.RetentionPolicy;\n" + 
+					"@Retention(RetentionPolicy.SOURCE)\n" +
+					"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+					"public @interface Foo { }\n"
+				});
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"public @interface Foo { } // If omitted, retention is class\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 1)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"Retention \'CLASS\' of @Foo is longer than the retention of its container annotation type @FooContainer, which is \'SOURCE\'\n" + 
+		"----------\n",
+		null, false /* don't flush*/);
+	}
+
+	// 412151: The @Retention meta-annotation of TC must at least include the retention of T ()
+	// Only specified on Foo, separate compilation
+	public void test021() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"public @interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"public @interface Foo { }\n"
+			});
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Retention;\n" + 
+				"import java.lang.annotation.RetentionPolicy;\n" + 
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@Retention(RetentionPolicy.RUNTIME)\n" +
+				"@interface Foo { }\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 3)\n" + 
+		"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+		"Retention \'RUNTIME\' of @Foo is longer than the retention of its container annotation type @FooContainer, which is \'CLASS\'\n" + 
+		"----------\n",
+		null, false /* don't flush*/);
+	}
+
+	// 412151: TC's @Targets, if specified, must be a subset or the same as T's @Targets
+	// TC's @Targets, if specified, must be a subset or the same as T's @Targets. Simple test
+	public void test022() {
+		this.runNegativeTest(
+			new String[] {
+				"FooContainer.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"public @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})\n" +
+				"@interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"public @java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@Target({ElementType.FIELD})\n" +
+				"@interface Foo { }\n"
+			},
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 3)\n" + 
+		"	public @java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                        ^^^^^^^^^^^^^^^^^^\n" + 
+		"The container annotation type @FooContainer is allowed at targets where the repeatable annotation type @Foo is not: TYPE, METHOD\n" + 
+		"----------\n");
+	}
+
+	// 412151: TC's @Targets, if specified, must be a subset or the same as T's @Targets
+	// TC's @Targets, if specified, must be a subset or the same as T's @Targets. Test this as a separate pass, so that
+	// FooContainer is loaded from binary.
+	public void test023() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"public @Target({ElementType.METHOD})\n" +
+				"@interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"public @Target({ElementType.METHOD})\n" +
+				"@interface Foo { }\n"
+			});
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"public @java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@java.lang.annotation.Target({ElementType.FIELD})\n" +
+				"@interface Foo { }\n"
+			}, 
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 3)\n" + 
+		"	public @java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                        ^^^^^^^^^^^^^^^^^^\n" + 
+		"The container annotation type @FooContainer is allowed at targets where the repeatable annotation type @Foo is not: METHOD\n" + 
+		"----------\n",
+		null, false /* don't flush*/);
+	}
+
+	// 412151: TC's @Targets, if specified, must be a subset or the same as T's @Targets
+	// TC's may target ANNOTATION_TYPE but that should match TYPE for T, since it's a superset
+	public void test024() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"import java.lang.annotation.ElementType;\n" + 
+				"@java.lang.annotation.Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})\n" +
+				"@interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"import java.lang.annotation.ElementType;\n" + 
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@java.lang.annotation.Target({ElementType.METHOD, ElementType.TYPE})\n" +
+				"@interface Foo { }\n"
+			});
+	}
+
+	// 412151: TC's @Targets, if specified, must be a subset or the same as T's @Targets
+	// Test that all ElementTypes can be reported
+	public void test025() {
+		this.runNegativeTest(
+			new String[] {
+				"FooContainer.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"public @Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE, ElementType.PACKAGE, ElementType.TYPE_PARAMETER, ElementType.TYPE_USE})\n" +
+				"@interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"public @java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@Target({})\n" +
+				"@interface Foo { }\n"
+			},
+		"----------\n" + 
+		"1. ERROR in Foo.java (at line 3)\n" + 
+		"	public @java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+		"	                                        ^^^^^^^^^^^^^^^^^^\n" + 
+		"The container annotation type @FooContainer is allowed at targets where the repeatable annotation type @Foo is not: TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE, TYPE_PARAMETER, TYPE_USE\n" + 
+		"----------\n");
+	}
+
+	// 412151: TC's @Targets, if specified, must be a subset or the same as T's @Targets
+	// TC's has no @Targets (=every SE7 location), but @Foo has, then complain.
+	public void test026() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"@interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"@interface Foo { }\n"
+			});
+		this.runNegativeTest(
+			new String[] {
+				"Foo.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.ElementType;\n" + 
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@java.lang.annotation.Target({ElementType.FIELD})\n" +
+				"@interface Foo { }\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in Foo.java (at line 3)\n" + 
+			"	@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+			"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+			"The container annotation type @FooContainer is allowed at targets where the repeatable annotation type @Foo is not: TYPE, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE, ANNOTATION_TYPE, PACKAGE\n" + 
+			"----------\n",
+		null, false /* don't flush*/);
+	}
+
+	// 412151: If T is @Documented, then TC should also be Documented
+	public void test027() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"@java.lang.annotation.Documented @interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"@java.lang.annotation.Documented @interface Foo { }\n"});
+	}
+	
+	// 412151: If T is @Documented, then TC should also be Documented, OK for TC to be documented while T is not
+	public void test028() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"@java.lang.annotation.Documented @interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"@interface Foo { }\n"});
+	}
+
+	// 412151: If T is @Documented, then TC should also be Documented
+	public void test029() {
+		this.runNegativeTest(
+			new String[] {
+				"FooContainer.java",
+				"@interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"@java.lang.annotation.Repeatable(FooContainer.class) @java.lang.annotation.Documented\n" +
+				"@interface Foo { }\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in Foo.java (at line 1)\n" + 
+			"	@java.lang.annotation.Repeatable(FooContainer.class) @java.lang.annotation.Documented\n" + 
+			"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+			"The repeatable annotation type @Foo is marked @Documented, but its container annotation type @FooContainer is not\n" + 
+			"----------\n");
+	}
+
+	// 412151: If T is @Documented, then TC should also be Documented - check from previous compilation
+	public void test030() {
+		this.runConformTest(
+				new String[] {
+					"FooContainer.java",
+					"@java.lang.annotation.Documented @interface FooContainer { Foo[] value(); }\n",
+					"Foo.java",
+					"@java.lang.annotation.Documented @interface Foo { }\n"
+				});
+			this.runConformTest(
+				new String[] {
+					"Foo.java",
+					"public @java.lang.annotation.Documented @java.lang.annotation.Repeatable(FooContainer.class)\n" +
+					"@interface Foo { }\n"
+				},
+				"",
+				null,
+				false,
+				null);
+	}
+
+	// 412151: If T is @Inherited, then TC should also be Inherited
+	public void test031() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"@java.lang.annotation.Inherited @interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"@java.lang.annotation.Inherited @interface Foo { }\n"});
+	}
+
+	// 412151: If T is @Inherited, then TC should also be Inherited, OK for TC to be inherited while T is not.
+	public void test032() {
+		this.runConformTest(
+			new String[] {
+				"FooContainer.java",
+				"@java.lang.annotation.Inherited @interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"@interface Foo { }\n"});
+	}
+	// 412151: If T is @Inherited, then TC should also be Inherited
+	public void test033() {
+		this.runNegativeTest(
+			new String[] {
+				"FooContainer.java",
+				"@interface FooContainer { Foo[] value(); }\n",
+				"Foo.java",
+				"@java.lang.annotation.Repeatable(FooContainer.class) @java.lang.annotation.Inherited\n" +
+				"@interface Foo { }\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in Foo.java (at line 1)\n" + 
+			"	@java.lang.annotation.Repeatable(FooContainer.class) @java.lang.annotation.Inherited\n" + 
+			"	                                 ^^^^^^^^^^^^^^^^^^\n" + 
+			"The repeatable annotation type @Foo is marked @Inherited, but its container annotation type @FooContainer is not\n" + 
+			"----------\n");
+	}
+
+	// 412151: If T is @Inherited, then TC should also be Inherited - check from previous compilation
+	public void test034() {
+		this.runConformTest(
+				new String[] {
+					"FooContainer.java",
+					"@java.lang.annotation.Inherited @interface FooContainer { Foo[] value(); }\n",
+					"Foo.java",
+					"@java.lang.annotation.Inherited @interface Foo { }\n"
+				});
+			this.runConformTest(
+				new String[] {
+					"Foo.java",
+					"public @java.lang.annotation.Inherited @java.lang.annotation.Repeatable(FooContainer.class)\n" +
+					"@interface Foo { }\n"
+				},
+				"",
+				null,
+				false,
+				null);
+	}
+	// 412151: Ensure no double reporting for bad target.
+	public void test035() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.FIELD)\n" +
+				"@interface TC {\n" +
+				"	T [] value();\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE)\n" +
+				"@Repeatable(TC.class)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"@T @T // we used to double report here.\n" +
+				"public class X { \n" +
+				"	X f;\n" +
+				"}\n"
+			}, 
+			"----------\n" + 
+			"1. ERROR in X.java (at line 9)\n" + 
+			"	@Repeatable(TC.class)\n" + 
+			"	            ^^^^^^^^\n" + 
+			"The container annotation type @TC is allowed at targets where the repeatable annotation type @T is not: FIELD\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 12)\n" + 
+			"	@T @T // we used to double report here.\n" + 
+			"	^^\n" + 
+			"The annotation @T cannot be repeated at this location since its container annotation type @TC is disallowed at this location\n" + 
+			"----------\n");
+	}	
+	// 412149: [1.8][compiler] Emit repeated annotations into the designated container
+	public void test036() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import static java.lang.annotation.RetentionPolicy.*;\n" +
+				"\n" +
+				"@Retention(RUNTIME)\n" +
+				"@interface AttrContainer {\n" +
+				"  public Attr[] value();\n" +
+				"}\n" +
+				"@Retention(RUNTIME)\n" +
+				"@Repeatable(AttrContainer.class)\n" + 
+				"@interface Attr {\n" +
+				"  public int value() default -1;\n" +
+				"}\n" +
+				"\n" +
+				"@Attr(1) @Attr(2)\n" +
+				"public class X {\n" +
+				"  public static void main(String args[]) {\n" +
+				"  	Object e[] = X.class.getAnnotationsByType(Attr.class);\n" +
+				"  	for (int i=0; i<e.length;++i) System.out.print(e[i] + \" \");\n" +
+				"  }\n" +
+				"}"
+			},
+			"@Attr(value=1) @Attr(value=2)");
+		
+	}
+	// 412149: [1.8][compiler] Emit repeated annotations into the designated container
+	// Test that only repetitions go into the container 
+	public void test037() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import static java.lang.annotation.RetentionPolicy.*;\n" +
+				"\n" +
+				"@Retention(RUNTIME)\n" +
+				"@interface AttrContainer {\n" +
+				"  public Attr[] value();\n" +
+				"}\n" +
+				"@Retention(RUNTIME)\n" +
+				"@Repeatable(AttrContainer.class)\n" + 
+				"@interface Attr {\n" +
+				"  public int value() default -1;\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"  @Attr(1) class Y1 {}\n" +
+				"  @Attr(1) @Attr(2) class Y2 {} \n" +
+				"  public static void main(String args[]) {\n" +
+				"  	System.out.println(\"Y1: \" + Y1.class.getAnnotation(Attr.class));\n" +
+				"  	System.out.println(\"Y2: \" + Y2.class.getAnnotation(Attr.class));\n" +
+				"  	System.out.println(\"Y1: \" + Y1.class.getAnnotation(AttrContainer.class));\n" +
+				"  	System.out.println(\"Y2: \" + Y2.class.getAnnotation(AttrContainer.class));\n" +
+				"  }\n" +
+				"}"
+			},
+			"Y1: @Attr(value=1)\n" + 
+			"Y2: null\n" + 
+			"Y1: null\n" + 
+			"Y2: @AttrContainer(value=[@Attr(value=1), @Attr(value=2)])");
+		
+	}
+	// 412149: [1.8][compiler] Emit repeated annotations into the designated container
+	// Test that the retention from the containing annotation is used
+	public void test038() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import static java.lang.annotation.RetentionPolicy.*;\n" +
+				"\n" +
+				"@Retention(RUNTIME)\n" +
+				"@interface AttrContainer {\n" +
+				"  public Attr[] value();\n" +
+				"}\n" +
+				"@Retention(SOURCE)\n" +
+				"@Repeatable(AttrContainer.class)\n" + 
+				"@interface Attr {\n" +
+				"  public int value() default -1;\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"  @Attr(1) class Y1 {}\n" +
+				"  @Attr(1) @Attr(2) class Y2 {} \n" +
+				"  public static void main(String args[]) {\n" +
+				"  	System.out.println(\"Y1 has \" + Y1.class.getAnnotationsByType(Attr.class).length);\n" +
+				"  	System.out.println(\"Y2 has \" + Y2.class.getAnnotationsByType(Attr.class).length);\n" +
+				"  }\n" +
+				"}"
+			},
+			"Y1 has 0\n" + 
+			"Y2 has 2");
+		
+	}
+	// 412149: [1.8][compiler] Emit repeated annotations into the designated container
+	// Test that repeated annotations can appear at package targets
+	public void test039() throws Exception {
+		String[] testFiles = {
+				"repeatable/Main.java",
+				"package repeatable;\n" +
+				"public class Main {\n" +
+				"    public static void main (String[] argv) {\n" + 
+				"    };\n" +
+				"}",
+
+			"repeatable/FooContainer.java",
+			"package repeatable;\n" +
+			"@java.lang.annotation.Target(java.lang.annotation.ElementType.PACKAGE)\n" +
+			"@java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy.RUNTIME)\n" +
+			"public @interface FooContainer {\n" +
+			"	Foo[] value();\n" +
+			"}\n",
+
+			"repeatable/Foo.java",
+			"package repeatable;\n" +
+			"@java.lang.annotation.Repeatable(FooContainer.class)\n" + 
+			"public @interface Foo {}\n",
+
+			"repeatable/package-info.java",
+			"@Foo @Foo\n" +
+			"package repeatable;\n" +
+			"import repeatable.Foo;",
+		};
+		runConformTest(testFiles, "");
+		String expectedOutout = 
+				"  RuntimeVisibleAnnotations: \n" + 
+				"    #8 @repeatable.FooContainer(\n" + 
+				"      #9 value=[\n" + 
+				"        annotation value =\n" + 
+				"            #10 @repeatable.Foo(\n" + 
+				"            )\n" + 
+				"        annotation value =\n" + 
+				"            #10 @repeatable.Foo(\n" + 
+				"            )\n" + 
+				"        ]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "repeatable" + File.separator + "package-info.class", "package-info", expectedOutout, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// 412149: [1.8][compiler] Emit repeated annotations into the designated container
+	// Test that repeated annotations show up on fields, methods, and parameters
+	public void test040() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.reflect.Field;\n" + 
+				"import java.lang.reflect.Method;\n" + 
+				"import java.lang.reflect.Parameter;\n" + 
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import static java.lang.annotation.RetentionPolicy.*;\n" +
+				"\n" +
+				"@Retention(RUNTIME)\n" +
+				"@interface AttrContainer {\n" +
+				"  public Attr[] value();\n" +
+				"}\n" +
+				"@Retention(RUNTIME)\n" +
+				"@Repeatable(AttrContainer.class)\n" + 
+				"@interface Attr {\n" +
+				"  public int value() default -1;\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"   @Attr(1) @Attr(2) public int field;\n" + 
+				"\n" + 
+				"   @Attr(3) @Attr(4)\n" + 
+				"   public static void main(@Attr(5) @Attr(6) String args[]) throws Exception {\n" + 
+				"    Field fieldField = X.class.getField(\"field\");\n" + 
+				"    dump(fieldField.getAnnotationsByType(Attr.class));\n" + 
+				"    Method mainMethod = X.class.getMethod(\"main\", (new String[0]).getClass());\n" + 
+				"    dump(mainMethod.getAnnotationsByType(Attr.class));\n" + 
+				"    Parameter argvParameter = mainMethod.getParameters()[0];\n" + 
+				"    dump(argvParameter.getAnnotationsByType(Attr.class));\n" + 
+				"   }\n" + 
+				"   static void dump(Attr[] attrs) {\n" + 
+				"    for (int i=0; i<attrs.length;++i) System.out.print(attrs[i] + \" \");\n" + 
+				"   }\n" +
+				"}"
+			},
+			"@Attr(value=1) @Attr(value=2) @Attr(value=3) @Attr(value=4) @Attr(value=5) @Attr(value=6)");
+	}
+	// Test that repeated annotations show up type parameters properly.
+	public void testTypeParameters() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Annotation;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import java.lang.reflect.AnnotatedElement;\n" +
+				"import java.lang.reflect.AnnotatedType;\n" +
+				"import java.lang.reflect.Field;\n" +
+				"import java.lang.reflect.Method;\n" +
+				"import java.lang.reflect.Type;\n" +
+				"import java.lang.reflect.TypeVariable;\n" +
+				"\n" +
+				"import static java.lang.annotation.RetentionPolicy.*;\n" +
+				"\n" +
+				"@Retention(RUNTIME)\n" +
+				"@Target({ElementType.TYPE_USE, ElementType.TYPE, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER,})\n" +
+				"@interface TC {\n" +
+				"  public T[] value();\n" +
+				"}\n" +
+				"@Retention(RUNTIME)\n" +
+				"@Repeatable(TC.class)\n" +
+				"@Target({ElementType.TYPE_USE, ElementType.TYPE, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.METHOD})\n" +
+				"@interface T {\n" +
+				"  public int value() default -1;\n" +
+				"}\n" +
+				"\n" +
+				"interface I<@T(1) @T(2) K extends @T(3) @T(4) Object & java.lang.@T(5) @T(6) Comparable<?>> {\n" +
+				"}\n" +
+				"\n" +
+				"\n" +
+				"public class X {\n" +
+				"  public static void main(String args[]) {\n" +
+				"	Class<I> ci = I.class;  \n" +
+				"  	printAnnotations(\"I.class\", ci);\n" +
+				"  	TypeVariable<Class<I>>[] typeParameters = ci.getTypeParameters();\n" +
+				"  	for (TypeVariable<?> t: typeParameters) {\n" +
+				"  		printAnnotations(t.getName(), t);\n" +
+				"  		AnnotatedType[] bounds = t.getAnnotatedBounds();\n" +
+				"  		for (AnnotatedType bound : bounds) {\n" +
+				"  			printAnnotations(bound.getType().getTypeName(), bound);\n" +
+				"  		}\n" +
+				"  	}\n" +
+				"  }\n" +
+				"  \n" +
+				"  static void printAnnotations(String name, AnnotatedElement element) {\n" +
+				"	  int [] iterations = { 0, 1 };\n" +
+				"	  for (int i : iterations) {\n" +
+				"		  Class<? extends Annotation> annotation = i == 0 ? T.class : TC.class;\n" +
+				"		  for (int j: iterations) {\n" +
+				"			  Annotation [] annotations = j == 0 ? new Annotation [] { element.getAnnotation(annotation) } : element.getAnnotationsByType(annotation);\n" +
+				"			  if (annotations.length == 0 || (annotations.length == 1 && annotations[0] == null)) continue;\n" +
+				"			  System.out.print(name + (j == 0 ? \".getAnnotation(\" : \".getAnnotationByType(\") + annotation.getName() + \".class): \");\n" +
+				"			  for (Annotation a : annotations) {\n" +
+				"				  System.out.print(a + \" \");\n" +
+				"			  }\n" +
+				"			  System.out.println();\n" +
+				"		  }\n" +
+				"	  }\n" +
+				"  }\n" +
+				"}\n"
+
+			},
+			"K.getAnnotationByType(T.class): @T(value=1) @T(value=2) \n" +
+			"K.getAnnotation(TC.class): @TC(value=[@T(value=1), @T(value=2)]) \n" +
+			"K.getAnnotationByType(TC.class): @TC(value=[@T(value=1), @T(value=2)]) \n" +
+			"java.lang.Object.getAnnotationByType(T.class): @T(value=3) @T(value=4) \n" +
+			"java.lang.Object.getAnnotation(TC.class): @TC(value=[@T(value=3), @T(value=4)]) \n" +
+			"java.lang.Object.getAnnotationByType(TC.class): @TC(value=[@T(value=3), @T(value=4)]) \n" +
+			"java.lang.Comparable<?>.getAnnotationByType(T.class): @T(value=5) @T(value=6) \n" +
+			"java.lang.Comparable<?>.getAnnotation(TC.class): @TC(value=[@T(value=5), @T(value=6)]) \n" +
+			"java.lang.Comparable<?>.getAnnotationByType(TC.class): @TC(value=[@T(value=5), @T(value=6)])",
+			null,
+			true,
+			new String [] { "-Ddummy" }); // Not sure, unless we force the VM to not be reused by passing dummy vm argument, the generated program aborts midway through its execution.
+	}
+	// Test that repeated annotations show up at various sites, both type use and declaration.
+	public void testVariousSites() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Annotation;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Retention;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import java.lang.reflect.AnnotatedArrayType;\n" +
+				"import java.lang.reflect.AnnotatedElement;\n" +
+				"import java.lang.reflect.AnnotatedParameterizedType;\n" +
+				"import java.lang.reflect.AnnotatedType;\n" +
+				"import java.lang.reflect.Constructor;\n" +
+				"import java.lang.reflect.Field;\n" +
+				"import java.lang.reflect.Method;\n" +
+				"import java.lang.reflect.TypeVariable;\n" +
+				"\n" +
+				"import static java.lang.annotation.RetentionPolicy.*;\n" +
+				"\n" +
+				"@Retention(RUNTIME)\n" +
+				"@Target({ElementType.TYPE_USE, ElementType.TYPE, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.METHOD})\n" +
+				"@interface TC {\n" +
+				"  public T[] value();\n" +
+				"}\n" +
+				"@Retention(RUNTIME)\n" +
+				"@Repeatable(TC.class)\n" +
+				"@Target({ElementType.TYPE_USE, ElementType.TYPE, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.METHOD})\n" +
+				"@interface T {\n" +
+				"  public int value() default -1;\n" +
+				"}\n" +
+				"\n" +
+				"interface I {\n" +
+				"}\n" +
+				"\n" +
+				"@T(1) @T(2)\n" +
+				"public class X<@T(3) @T(4) K extends @T(5) @T(6) Object & java.lang.@T(7) @T(8) Comparable<?>, @T(9) @T(10) V> extends @T(11) @T(12) Object implements @T(13) @T(14) I {\n" +
+				"  public @T(15) @T(16) X<@T(17) @T(18) String, @T(19) @T(20) Integer> field;\n" +
+				"  @T(21) @T(22)\n" +
+				"  public <@T(23) @T(24) Q> X @T(25) @T(26) [] method(@T(27) @T(28) X<K, V> this, \n" +
+				"		                                             @T(29) @T(30) X<@T(31) @T(32) String, String> that) throws @T(33) @T(34) NullPointerException {\n" +
+				"	  return null;\n" +
+				"  }\n" +
+				"  @T(35) @T(36)\n" +
+				"  public X() {\n" +
+				"	  \n" +
+				"  }\n" +
+				"  @T(37) @T(48)\n" +
+				"  public class MemberType {\n" +
+				"	  \n" +
+				"  }\n" +
+				"  \n" +
+				"  public static void main(String args[]) {\n" +
+				"	Class<X> xc = X.class;  \n" +
+				"  	printAnnotations(\"Class: \" + \"X.class\", xc);\n" +
+				"  	TypeVariable<Class<X>>[] typeParameters = xc.getTypeParameters();\n" +
+				"  	for (TypeVariable<?> t: typeParameters) {\n" +
+				"  		printAnnotations(\"Type Parameter: \" + t.getName(), t);\n" +
+				"  		AnnotatedType[] bounds = t.getAnnotatedBounds();\n" +
+				"  		for (AnnotatedType bound : bounds) {\n" +
+				"  			printAnnotations(\"Type parameter bound: \" + bound.getType().getTypeName(), bound);\n" +
+				"  		}\n" +
+				"  	}\n" +
+				"  	AnnotatedType annotatedSuperclass = xc.getAnnotatedSuperclass();\n" +
+				"  	printAnnotations(\"Superclass: \" + annotatedSuperclass.getType().getTypeName(), annotatedSuperclass);\n" +
+				"  	\n" +
+				"  	AnnotatedType [] annotatedSuperInterfaces = xc.getAnnotatedInterfaces();\n" +
+				"  	printAnnotations(\"Superinterface: \" + annotatedSuperInterfaces[0].getType().getTypeName(), annotatedSuperInterfaces[0]);\n" +
+				"  	\n" +
+				"  	for (Field field: xc.getFields()) {\n" +
+				"  		printAnnotations(\"Field: \" + field.getName(), field);\n" +
+				"  		AnnotatedParameterizedType fType = (AnnotatedParameterizedType) field.getAnnotatedType();\n" +
+				"  		for (AnnotatedType typeArgumentType : fType.getAnnotatedActualTypeArguments())\n" +
+				"  			printAnnotations(\"Field Type argument: \" + typeArgumentType.getType().getTypeName(), typeArgumentType);\n" +
+				"  			\n" +
+				"  	}\n" +
+				"  	for (Method method: xc.getMethods()) {\n" +
+				"  		switch (method.getName()) {\n" +
+				"  		case \"method\"  :\n" +
+				"  			printAnnotations(method.getName(), method);\n" +
+				"  			AnnotatedArrayType mType = (AnnotatedArrayType) method.getAnnotatedReturnType();\n" +
+				"  			printAnnotations(\"Method return type: \" + mType.getType().getTypeName(), mType);\n" +
+				"  			AnnotatedType mTypeEtype = mType.getAnnotatedGenericComponentType();\n" +
+				"  			printAnnotations(\"Method return type, element type: \" + mTypeEtype.getType().getTypeName(), mTypeEtype);\n" +
+				"  			TypeVariable<Method>[] typeParameters2 = method.getTypeParameters();\n" +
+				"  		  	for (TypeVariable<?> t: typeParameters2) {\n" +
+				"  		  		printAnnotations(\"Method Type Parameter: \" + t.getName(), t);\n" +
+				"  		  	}\n" +
+				"  		  	AnnotatedType annotatedReceiverType = method.getAnnotatedReceiverType();\n" +
+				"  		  	printAnnotations(\"Receiver: \", annotatedReceiverType);\n" +
+				"  		  	AnnotatedType[] annotatedParameterTypes = method.getAnnotatedParameterTypes();\n" +
+				"  		  	for (AnnotatedType annotatedParameterType : annotatedParameterTypes) {\n" +
+				"  		  		printAnnotations(\"Parameter: \", annotatedParameterType);\n" +
+				"  		  	}\n" +
+				"  		  	AnnotatedType[] annotatedExceptionTypes = method.getAnnotatedExceptionTypes();\n" +
+				"  		  	for (AnnotatedType annotatedType : annotatedExceptionTypes) {\n" +
+				"				printAnnotations(\"Exception type: \", annotatedType);\n" +
+				"			}\n" +
+				"  			break;\n" +
+				"  		}\n" +
+				"  	}\n" +
+				"  	for (Constructor<?> constructor : xc.getConstructors()) {\n" +
+				"  		printAnnotations(\"Constructor: \", constructor);\n" +
+				"  	}\n" +
+				"  	// don't know how to get member classes.\n" +
+				"  }\n" +
+				"  \n" +
+				"  static void printAnnotations(String name, AnnotatedElement element) {\n" +
+				"	  int [] iterations = { 0, 1 };\n" +
+				"	  for (int i : iterations) {\n" +
+				"		  Class<? extends Annotation> annotation = i == 0 ? T.class : TC.class;\n" +
+				"		  for (int j: iterations) {\n" +
+				"			  Annotation [] annotations = j == 0 ? new Annotation [] { element.getAnnotation(annotation) } : element.getAnnotationsByType(annotation);\n" +
+				"			  if (annotations.length == 0 || (annotations.length == 1 && annotations[0] == null)) continue;\n" +
+				"			  System.out.print(name + (j == 0 ? \".getAnnotation(\" : \".getAnnotationByType(\") + annotation.getName() + \".class): \");\n" +
+				"			  for (Annotation a : annotations) {\n" +
+				"				  System.out.print(a + \" \");\n" +
+				"			  }\n" +
+				"			  System.out.println();\n" +
+				"		  }\n" +
+				"	  }\n" +
+				"  }\n" +
+				"}\n"
+
+			},
+			"Class: X.class.getAnnotationByType(T.class): @T(value=1) @T(value=2) \n" +
+			"Class: X.class.getAnnotation(TC.class): @TC(value=[@T(value=1), @T(value=2)]) \n" +
+			"Class: X.class.getAnnotationByType(TC.class): @TC(value=[@T(value=1), @T(value=2)]) \n" +
+			"Type Parameter: K.getAnnotationByType(T.class): @T(value=3) @T(value=4) \n" +
+			"Type Parameter: K.getAnnotation(TC.class): @TC(value=[@T(value=3), @T(value=4)]) \n" +
+			"Type Parameter: K.getAnnotationByType(TC.class): @TC(value=[@T(value=3), @T(value=4)]) \n" +
+			"Type parameter bound: java.lang.Object.getAnnotationByType(T.class): @T(value=5) @T(value=6) \n" +
+			"Type parameter bound: java.lang.Object.getAnnotation(TC.class): @TC(value=[@T(value=5), @T(value=6)]) \n" +
+			"Type parameter bound: java.lang.Object.getAnnotationByType(TC.class): @TC(value=[@T(value=5), @T(value=6)]) \n" +
+			"Type parameter bound: java.lang.Comparable<?>.getAnnotationByType(T.class): @T(value=7) @T(value=8) \n" +
+			"Type parameter bound: java.lang.Comparable<?>.getAnnotation(TC.class): @TC(value=[@T(value=7), @T(value=8)]) \n" +
+			"Type parameter bound: java.lang.Comparable<?>.getAnnotationByType(TC.class): @TC(value=[@T(value=7), @T(value=8)]) \n" +
+			"Type Parameter: V.getAnnotationByType(T.class): @T(value=9) @T(value=10) \n" +
+			"Type Parameter: V.getAnnotation(TC.class): @TC(value=[@T(value=9), @T(value=10)]) \n" +
+			"Type Parameter: V.getAnnotationByType(TC.class): @TC(value=[@T(value=9), @T(value=10)]) \n" +
+			"Superclass: java.lang.Object.getAnnotationByType(T.class): @T(value=11) @T(value=12) \n" +
+			"Superclass: java.lang.Object.getAnnotation(TC.class): @TC(value=[@T(value=11), @T(value=12)]) \n" +
+			"Superclass: java.lang.Object.getAnnotationByType(TC.class): @TC(value=[@T(value=11), @T(value=12)]) \n" +
+			"Superinterface: I.getAnnotationByType(T.class): @T(value=13) @T(value=14) \n" +
+			"Superinterface: I.getAnnotation(TC.class): @TC(value=[@T(value=13), @T(value=14)]) \n" +
+			"Superinterface: I.getAnnotationByType(TC.class): @TC(value=[@T(value=13), @T(value=14)]) \n" +
+			"Field: field.getAnnotationByType(T.class): @T(value=15) @T(value=16) \n" +
+			"Field: field.getAnnotation(TC.class): @TC(value=[@T(value=15), @T(value=16)]) \n" +
+			"Field: field.getAnnotationByType(TC.class): @TC(value=[@T(value=15), @T(value=16)]) \n" +
+			"Field Type argument: java.lang.String.getAnnotationByType(T.class): @T(value=17) @T(value=18) \n" +
+			"Field Type argument: java.lang.String.getAnnotation(TC.class): @TC(value=[@T(value=17), @T(value=18)]) \n" +
+			"Field Type argument: java.lang.String.getAnnotationByType(TC.class): @TC(value=[@T(value=17), @T(value=18)]) \n" +
+			"Field Type argument: java.lang.Integer.getAnnotationByType(T.class): @T(value=19) @T(value=20) \n" +
+			"Field Type argument: java.lang.Integer.getAnnotation(TC.class): @TC(value=[@T(value=19), @T(value=20)]) \n" +
+			"Field Type argument: java.lang.Integer.getAnnotationByType(TC.class): @TC(value=[@T(value=19), @T(value=20)]) \n" +
+			"method.getAnnotationByType(T.class): @T(value=21) @T(value=22) \n" +
+			"method.getAnnotation(TC.class): @TC(value=[@T(value=21), @T(value=22)]) \n" +
+			"method.getAnnotationByType(TC.class): @TC(value=[@T(value=21), @T(value=22)]) \n" +
+			"Method return type: X[].getAnnotationByType(T.class): @T(value=25) @T(value=26) \n" +
+			"Method return type: X[].getAnnotation(TC.class): @TC(value=[@T(value=25), @T(value=26)]) \n" +
+			"Method return type: X[].getAnnotationByType(TC.class): @TC(value=[@T(value=25), @T(value=26)]) \n" +
+			"Method return type, element type: X.getAnnotationByType(T.class): @T(value=21) @T(value=22) \n" +
+			"Method return type, element type: X.getAnnotation(TC.class): @TC(value=[@T(value=21), @T(value=22)]) \n" +
+			"Method return type, element type: X.getAnnotationByType(TC.class): @TC(value=[@T(value=21), @T(value=22)]) \n" +
+			"Method Type Parameter: Q.getAnnotationByType(T.class): @T(value=23) @T(value=24) \n" +
+			"Method Type Parameter: Q.getAnnotation(TC.class): @TC(value=[@T(value=23), @T(value=24)]) \n" +
+			"Method Type Parameter: Q.getAnnotationByType(TC.class): @TC(value=[@T(value=23), @T(value=24)]) \n" +
+			"Receiver: .getAnnotationByType(T.class): @T(value=27) @T(value=28) \n" +
+			"Receiver: .getAnnotation(TC.class): @TC(value=[@T(value=27), @T(value=28)]) \n" +
+			"Receiver: .getAnnotationByType(TC.class): @TC(value=[@T(value=27), @T(value=28)]) \n" +
+			"Parameter: .getAnnotationByType(T.class): @T(value=29) @T(value=30) \n" +
+			"Parameter: .getAnnotation(TC.class): @TC(value=[@T(value=29), @T(value=30)]) \n" +
+			"Parameter: .getAnnotationByType(TC.class): @TC(value=[@T(value=29), @T(value=30)]) \n" +
+			"Exception type: .getAnnotationByType(T.class): @T(value=33) @T(value=34) \n" +
+			"Exception type: .getAnnotation(TC.class): @TC(value=[@T(value=33), @T(value=34)]) \n" +
+			"Exception type: .getAnnotationByType(TC.class): @TC(value=[@T(value=33), @T(value=34)]) \n" +
+			"Constructor: .getAnnotationByType(T.class): @T(value=35) @T(value=36) \n" +
+			"Constructor: .getAnnotation(TC.class): @TC(value=[@T(value=35), @T(value=36)]) \n" +
+			"Constructor: .getAnnotationByType(TC.class): @TC(value=[@T(value=35), @T(value=36)])",
+			null,
+			true,
+			new String [] { "-Ddummy" }); // Not sure, unless we force the VM to not be reused by passing dummy vm argument, the generated program aborts midway through its execution.
+	}
+
+	// Test that bad container specifications are handled properly.
+	public void testBadContainerType() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Repeatable;\n" +
+				"@Repeatable(X.class)\n" +
+				"@interface T {\n" +
+				"  public int value() default -1;\n" +
+				"}\n" +
+				"public class X {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 2)\n" + 
+			"	@Repeatable(X.class)\n" + 
+			"	            ^^^^^^^\n" + 
+			"Type mismatch: cannot convert from Class<X> to Class<? extends Annotation>\n" + 
+			"----------\n");
+	}	
+	// Test unspecified target.
+	public void testUnspecifiedTarget() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface TC {\n" +
+				"	T [] value();\n" +
+				"}\n" +
+				"\n" +
+				"@Repeatable(TC.class)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"\n" +
+				"@T @T\n" +
+				"public class X { \n" +
+				"	X f;\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	@Repeatable(TC.class)\n" + 
+			"	            ^^^^^^^^\n" + 
+			"The container annotation type @TC is allowed at targets where the repeatable annotation type @T is not: TYPE_USE\n" + 
+			"----------\n");
+	}
+	// Test unspecified target.
+	public void testUnspecifiedTarget2() {
+		this.runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Repeatable;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"\n" +
+				"@Target(ElementType.TYPE_PARAMETER)\n" +
+				"@interface TC {\n" +
+				"	T [] value();\n" +
+				"}\n" +
+				"\n" +
+				"@Repeatable(TC.class)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"\n" +
+				"@T @T\n" +
+				"public class X { \n" +
+				"	X f;\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	@Repeatable(TC.class)\n" + 
+			"	            ^^^^^^^^\n" + 
+			"The container annotation type @TC is allowed at targets where the repeatable annotation type @T is not: TYPE_PARAMETER\n" + 
+			"----------\n" + 
+			"2. ERROR in X.java (at line 14)\n" + 
+			"	@T @T\n" + 
+			"	^^\n" + 
+			"The annotation @T cannot be repeated at this location since its container annotation type @TC is disallowed at this location\n" + 
+			"----------\n");
+	}
+	public void testDeprecation() {
+		this.runNegativeTest(
+			new String[] {
+				"TC.java",
+				"@Deprecated\n" +
+				"public @interface TC {\n" +
+				"  public T[] value();\n" +
+				"}\n",
+				"T.java",
+				"@java.lang.annotation.Repeatable(TC.class)\n" +
+				"@interface T {\n" +
+				"  public int value() default -1;\n" +  
+				"}\n" +
+				"interface I<@T(1) @T(2) K> {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in T.java (at line 1)\n" + 
+			"	@java.lang.annotation.Repeatable(TC.class)\n" + 
+			"	                                 ^^\n" + 
+			"The type TC is deprecated\n" + 
+			"----------\n" + 
+			"2. ERROR in T.java (at line 5)\n" + 
+			"	interface I<@T(1) @T(2) K> {\n" + 
+			"	            ^^\n" + 
+			"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+			"----------\n" + 
+			"3. WARNING in T.java (at line 5)\n" + 
+			"	interface I<@T(1) @T(2) K> {\n" + 
+			"	            ^^\n" + 
+			"The type TC is deprecated\n" + 
+			"----------\n" + 
+			"4. ERROR in T.java (at line 5)\n" + 
+			"	interface I<@T(1) @T(2) K> {\n" + 
+			"	            ^^\n" + 
+			"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+			"----------\n" + 
+			"5. ERROR in T.java (at line 5)\n" + 
+			"	interface I<@T(1) @T(2) K> {\n" + 
+			"	                  ^^\n" + 
+			"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+			"----------\n");
+	}
+	public void testDeprecation2() { // verify that deprecation warning does not show up when the deprecated element is used in the same file defining it.
+		this.runNegativeTest(
+			new String[] {
+				"T.java",
+				"@Deprecated\n" +
+				"@interface TC {\n" +
+				"  public T[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(TC.class)\n" +
+				"@interface T {\n" +
+				"  public int value() default -1;\n" +  
+				"}\n" +
+				"interface I<@T(1) @T(2) K> {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in T.java (at line 9)\n" + 
+			"	interface I<@T(1) @T(2) K> {\n" + 
+			"	            ^^\n" + 
+			"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+			"----------\n" + 
+			"2. ERROR in T.java (at line 9)\n" + 
+			"	interface I<@T(1) @T(2) K> {\n" + 
+			"	            ^^\n" + 
+			"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+			"----------\n" + 
+			"3. ERROR in T.java (at line 9)\n" + 
+			"	interface I<@T(1) @T(2) K> {\n" + 
+			"	                  ^^\n" + 
+			"Annotation types that do not specify explicit target element types cannot be applied here\n" + 
+			"----------\n");
+	}	
+	
+	// 419209: [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
+	public void testRepeatableWithContaining1() {
+		this.runNegativeTest(
+			new String[] {
+				"A.java",
+				"@interface FooContainerContainer {\n" +
+				"  public FooContainer[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainerContainer.class)\n" +
+				"@interface FooContainer {\n" +
+				"  public Foo[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@interface Foo {\n" +
+				"  public int value() default -1;\n" +  
+				"}\n" +
+				"@FooContainer({@Foo(1)}) @FooContainer({@Foo(2)}) @Foo(3) class A {}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in A.java (at line 12)\n" + 
+			"	@FooContainer({@Foo(1)}) @FooContainer({@Foo(2)}) @Foo(3) class A {}\n" + 
+			"	                                                  ^^^^\n" + 
+			"The repeatable annotation @Foo may not be present where its container annotation type @FooContainer is repeated\n" + 
+			"----------\n");
+	}
+	// 419209: [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
+	public void testRepeatableWithContaining2() {
+		this.runNegativeTest(
+			new String[] {
+				"A.java",
+				"@interface FooContainerContainer {\n" +
+				"  public FooContainer[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainerContainer.class)\n" +
+				"@interface FooContainer {\n" +
+				"  public Foo[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@interface Foo {\n" +
+				"  public int value() default -1;\n" +  
+				"}\n" +
+				"@Foo(1) @FooContainer({@Foo(2)}) @FooContainer({@Foo(3)}) class A {}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in A.java (at line 12)\n" + 
+			"	@Foo(1) @FooContainer({@Foo(2)}) @FooContainer({@Foo(3)}) class A {}\n" + 
+			"	^^^^\n" + 
+			"The repeatable annotation @Foo may not be present where its container annotation type @FooContainer is repeated\n" + 
+			"----------\n");
+	}
+	// 419209: [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
+	public void testRepeatableWithContaining3() {
+		this.runNegativeTest(
+			new String[] {
+				"A.java",
+				"@interface FooContainerContainer {\n" +
+				"  public FooContainer[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainerContainer.class)\n" +
+				"@interface FooContainer {\n" +
+				"  public Foo[] value();\n" +
+				"}\n" +
+				"@java.lang.annotation.Repeatable(FooContainer.class)\n" +
+				"@interface Foo {\n" +
+				"  public int value() default -1;\n" +  
+				"}\n" +
+				"@FooContainer({@Foo(2)}) @Foo(1) @FooContainer({@Foo(3)}) class A {}\n"
+			},
+			"----------\n" + 
+			"1. WARNING in A.java (at line 12)\n" + 
+			"	@FooContainer({@Foo(2)}) @Foo(1) @FooContainer({@Foo(3)}) class A {}\n" + 
+			"	                         ^^^^\n" + 
+			"The repeatable annotation @Foo may not be present where its container annotation type @FooContainer is repeated\n" + 
+			"----------\n");
+	}	
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java
index b5de00b..a5c80e6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ScannerTest.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -1340,4 +1344,32 @@
 			assertTrue("Should not fail with InvalidInputException", false);
 		}
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383062
+	public void test062() {
+		IScanner scanner = ToolFactory.createScanner(false, false, false, JavaCore.VERSION_1_4);
+		char[] source = "->".toCharArray(); //$NON-NLS-1$
+		scanner.setSource(source);
+		scanner.resetTo(0, source.length - 1);
+		int token = 0;
+		try {
+			token = scanner.getNextToken();
+		} catch (InvalidInputException e) {
+			// ignore ...
+		}
+		assertEquals("Expecting ->", ITerminalSymbols.TokenNameARROW, token);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383062
+	public void test063() {
+		IScanner scanner = ToolFactory.createScanner(false, false, false, JavaCore.VERSION_1_4);
+		char[] source = "::".toCharArray(); //$NON-NLS-1$
+		scanner.setSource(source);
+		scanner.resetTo(0, source.length - 1);
+		int token = 0;
+		try {
+			token = scanner.getNextToken();
+		} catch (InvalidInputException e) {
+			// ignore.
+		}
+		assertEquals("Expecting ::", ITerminalSymbols.TokenNameCOLON_COLON, token);
+	}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java
index ba6b9b7..0d20881 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/StackMapAttributeTest.java
@@ -4,10 +4,15 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann - contribution for
+ *     Stephan Herrmann - Contribution for
+ *								bug 388800 - [1.8] adjust tests to 1.8 JRE
  *								Bug 412203 - [compiler] Internal compiler error: java.lang.IllegalArgumentException: info cannot be null
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
@@ -1778,6 +1783,7 @@
             		"    public Iterator<Value_Type> iterator() {\n" +
             		"        return null;\n" +
             		"    }\n" +
+            		ITERABLE_IMPL_JRE8.replaceAll("\\*", "Value_Type") +
             		"}\n" +
             		"\n" +
             		"class BirBlock {\n" +
@@ -8202,8 +8208,8 @@
 			"StartingDone");
 	}
 	
-	// https://bugs.eclipse.org/412076
-	public void testBug412076_a() throws Exception {
+	// https://bugs.eclipse.org/412203
+	public void testBug412203_a() throws Exception {
 		if (this.complianceLevel < ClassFileConstants.JDK1_7) return; // using <>
 		Map options = getCompilerOptions();
 		options.put(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
@@ -8270,7 +8276,7 @@
 					"}\n",
 				},
 				"",
-				getLibsWithNullAnnotations(),
+				getLibsWithNullAnnotations(ClassFileConstants.JDK1_7),
 				true/*flush*/,
 				null/*vmArgs*/,
 				options,
@@ -8359,9 +8365,9 @@
 			}
 	}
 
-	// https://bugs.eclipse.org/412076
+	// https://bugs.eclipse.org/412203
 	// yet simplified version - using FieldReference
-	public void testBug412076_b() throws Exception {
+	public void testBug412203_b() throws Exception {
 		Map options = getCompilerOptions();
 		options.put(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
 		options.put(JavaCore.COMPILER_PB_NULL_REFERENCE, JavaCore.ERROR);
@@ -8392,7 +8398,7 @@
 					"}\n",
 				},
 				"",
-				getLibsWithNullAnnotations(),
+				getLibsWithNullAnnotations(ClassFileConstants.JDK1_7),
 				true/*flush*/,
 				null/*vmArgs*/,
 				options,
@@ -8476,9 +8482,9 @@
 			}
 	}
 
-	// https://bugs.eclipse.org/412076
+	// https://bugs.eclipse.org/412203
 	// yet simplified version - using SingleNameReference
-	public void testBug412076_c() throws Exception {
+	public void testBug412203_c() throws Exception {
 		Map options = getCompilerOptions();
 		options.put(JavaCore.COMPILER_ANNOTATION_NULL_ANALYSIS, JavaCore.ENABLED);
 		options.put(JavaCore.COMPILER_PB_NULL_REFERENCE, JavaCore.ERROR);
@@ -8509,7 +8515,7 @@
 					"}\n",
 				},
 				"",
-				getLibsWithNullAnnotations(),
+				getLibsWithNullAnnotations(ClassFileConstants.JDK1_7),
 				true/*flush*/,
 				null/*vmArgs*/,
 				options,
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
index 49a2b1f..c5c27b4 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
@@ -1,16 +1,26 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
  *     Stephan Herrmann - Contributions for
  *								bug 186342 - [compiler][null] Using annotations for null checking
  *								bug 358903 - Filter practically unimportant resource leak warnings
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *								Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *								bug 407191 - [1.8] Binary access support for type annotations
+ *       Jesper Steen Moeller - Contributions for:
+ *								Bug 406973 - [compiler] Parse MethodParameters attribute
+ *								Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -113,6 +123,33 @@
 	ArrayList since_1_6 = new ArrayList();
 	since_1_6.add(StackMapAttributeTest.class);
 	since_1_6.add(Compliance_1_6.class);
+	
+	ArrayList since_1_7 = new ArrayList();
+	since_1_7.add(AssignmentTest_1_7.class);
+	since_1_7.add(BinaryLiteralTest.class);
+	since_1_7.add(UnderscoresInLiteralsTest.class);
+	since_1_7.add(TryStatement17Test.class);
+	since_1_7.add(TryWithResourcesStatementTest.class);
+	since_1_7.add(GenericsRegressionTest_1_7.class);
+	since_1_7.add(PolymorphicSignatureTest.class);
+	since_1_7.add(Compliance_1_7.class);
+	
+	ArrayList since_1_8 = new ArrayList();
+	since_1_8.add(NegativeTypeAnnotationTest.class);
+	since_1_8.add(NullTypeAnnotationTest.class);
+	since_1_8.add(NegativeLambdaExpressionsTest.class);
+	since_1_8.add(LambdaExpressionsTest.class);
+	since_1_8.add(Jsr335ClassFileTest.class);
+	since_1_8.add(ExpressionContextTests.class);
+	since_1_8.add(InterfaceMethodsTest.class);
+	since_1_8.add(GrammarCoverageTests308.class);
+	since_1_8.add(FlowAnalysisTest8.class);
+	since_1_8.add(TypeAnnotationTest.class);
+	since_1_8.add(JSR308SpecSnippetTests.class);
+	since_1_8.add(Deprecated18Test.class);
+	since_1_8.add(MethodParametersAttributeTest.class);
+	since_1_8.add(ClassFileReaderTest_1_8.class);
+	since_1_8.add(RepeatableAnnotationTest.class);
 
 	// Build final test suite
 	TestSuite all = new TestSuite(TestAll.class.getName());
@@ -175,14 +212,7 @@
 		tests_1_7.addAll(since_1_4);
 		tests_1_7.addAll(since_1_5);
 		tests_1_7.addAll(since_1_6);
-		tests_1_7.add(AssignmentTest_1_7.class);
-		tests_1_7.add(BinaryLiteralTest.class);
-		tests_1_7.add(UnderscoresInLiteralsTest.class);
-		tests_1_7.add(TryStatement17Test.class);
-		tests_1_7.add(TryWithResourcesStatementTest.class);
-		tests_1_7.add(GenericsRegressionTest_1_7.class);
-		tests_1_7.add(PolymorphicSignatureTest.class);
-		tests_1_7.add(Compliance_1_7.class);
+		tests_1_7.addAll(since_1_7);
 		// Reset forgotten subsets tests
 		TestCase.TESTS_PREFIX = null;
 		TestCase.TESTS_NAMES = null;
@@ -191,6 +221,21 @@
 		TestCase.RUN_ONLY_ID = null;
 		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK1_7, tests_1_7));
 	}
+	if ((possibleComplianceLevels & AbstractCompilerTest.F_1_8) != 0) {
+		ArrayList tests_1_8 = (ArrayList)standardTests.clone();
+		tests_1_8.addAll(since_1_4);
+		tests_1_8.addAll(since_1_5);
+		tests_1_8.addAll(since_1_6);
+		tests_1_8.addAll(since_1_7);
+		tests_1_8.addAll(since_1_8);
+		// Reset forgotten subsets tests
+		TestCase.TESTS_PREFIX = null;
+		TestCase.TESTS_NAMES = null;
+		TestCase.TESTS_NUMBERS= null;
+		TestCase.TESTS_RANGE = null;
+		TestCase.RUN_ONLY_ID = null;
+		all.addTest(AbstractCompilerTest.buildComplianceTestSuite(ClassFileConstants.JDK1_8, tests_1_8));
+	}
 	all.addTest(new TestSuite(Jsr14Test.class));
 	return all;
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java
index 3300eba..eeaef15 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryWithResourcesStatementTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * Copyright (c) 2011, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -438,12 +442,12 @@
 		"1. WARNING in X.java (at line 5)\n" + 
 		"	public void foo(int p) {\n" + 
 		"	                    ^\n" + 
-		"The parameter p is hiding another local variable defined in an enclosing type scope\n" + 
+		"The parameter p is hiding another local variable defined in an enclosing scope\n" + 
 		"----------\n" + 
 		"2. WARNING in X.java (at line 8)\n" + 
 		"	} catch (Exception y) {\n" + 
 		"	                   ^\n" + 
-		"The parameter y is hiding another local variable defined in an enclosing type scope\n" + 
+		"The parameter y is hiding another local variable defined in an enclosing scope\n" + 
 		"----------\n" + 
 		"3. ERROR in X.java (at line 13)\n" + 
 		"	System.out.println(y);\n" + 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java
new file mode 100644
index 0000000..fc229ea
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java
@@ -0,0 +1,6296 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
+ *                          Bug 409246 - [1.8][compiler] Type annotations on catch parameters not handled properly
+ *                          Bug 409517 - [1.8][compiler] Type annotation problems on more elaborate array references
+ *                          Bug 415821 - [1.8][compiler] CLASS_EXTENDS target type annotation missing for anonymous classes
+ *        Stephan Herrmann - Contribution for
+ *							Bug 415911 - [1.8][compiler] NPE when TYPE_USE annotated method with missing return type
+ *							Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
+ *         Jesper S Moller - Contributions for
+ *                          Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import java.io.File;
+import java.util.Map;
+import org.eclipse.jdt.core.util.ClassFileBytesDisassembler;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+import junit.framework.Test;
+
+public class TypeAnnotationTest extends AbstractRegressionTest {
+
+	static {
+//		TESTS_NUMBERS = new int [] { 40 };
+//		TESTS_NAMES = new String[] { "testTypeVariable" };
+	}
+	public static Class testClass() {
+		return TypeAnnotationTest.class;
+	}
+	public static Test suite() {
+		return buildMinimalComplianceTestSuite(testClass(), F_1_8);
+	}
+	public TypeAnnotationTest(String testName){
+		super(testName);
+	}
+
+	// Enables the tests to run individually
+	protected Map getCompilerOptions() {
+		Map defaultOptions = super.getCompilerOptions();
+		defaultOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		defaultOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		defaultOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+		return defaultOptions;
+	}
+	
+	private static final String HELPER_CLASS =
+		"import java.lang.annotation.*;\n"+
+		"import java.lang.reflect.*;\n"+
+		"class Helper {\n"+
+		"\n"+
+		// Print type annotations on super types
+		"  public static void printTypeAnnotations(Class<?> clazz) {\n"+
+		"    System.out.println(\"Annotations on superclass of \"+clazz.getName());\n"+
+		"    AnnotatedType superat = clazz.getAnnotatedSuperclass();\n"+
+		"    Helper.printAnnos(\"  \", superat.getType(),superat.getAnnotations());\n"+
+		"    AnnotatedType[] superinterfaces = clazz.getAnnotatedInterfaces();\n"+
+		"    if (superinterfaces.length!=0) {\n"+
+		"      System.out.println(\"Annotations on superinterfaces of \"+clazz.getName());\n"+
+		"      for (int j=0;j<superinterfaces.length;j++) {\n"+
+		"        Helper.printAnnos(\"  \", superinterfaces[j].getType(),superinterfaces[j].getAnnotations());\n"+
+		"      }\n"+
+		"    }\n"+
+		"  }\n"+
+		// Print type annotations on a type
+		"  public static void printTypeAnnotations2(Class<?> clazz) {\n"+
+		"    System.out.print(clazz.getName()+\"<\");\n"+
+		"    TypeVariable<?>[] tvs = clazz.getTypeParameters();\n"+
+		"    for (int t=0;t<tvs.length;t++) {\n"+
+		"      TypeVariable<?> tv = tvs[t];\n"+
+		"      Annotation[] annos = tv.getAnnotations();\n"+
+		"      for (int a=0;a<annos.length;a++) {\n"+
+		"        System.out.print(toStringAnno(annos[a])+\" \");\n"+
+		"      }\n"+
+		"      System.out.print(tv.getName());\n"+
+		"      if ((t+1)<tvs.length) System.out.print(\",\");\n"+
+		"    }\n"+
+		"    System.out.println(\">\");\n"+
+		"  }\n"+
+		"  public static String toStringAnno(Annotation anno) {\n"+
+		"    String s = anno.toString();\n"+
+		"    if (s.endsWith(\"()\")) return s.substring(0,s.length()-2); else return s;\n"+
+		"  }\n"+
+		"  \n"+
+		"  public static void printAnnos(String header, Type t, Annotation[] annos) {\n"+
+		"    if (annos.length==0) { System.out.println(header+t+\":no annotations\"); return;} \n"+
+		"    System.out.print(header+t+\":\");\n"+
+		"    for (int i=0;i<annos.length;i++) {\n"+
+		"      System.out.print(toStringAnno(annos[i])+\" \");\n"+
+		"    }\n"+
+		"    System.out.println();\n"+
+		"  }\n"+
+		"}\n";
+	
+	// http://types.cs.washington.edu/jsr308/specification/java-annotation-design.pdf
+	//		type_annotation {
+	//			// New fields in JSR 308:
+	//			u1 target_type; // the type of the targeted program element, see Section 3.2
+	//			union {
+	//				type_parameter_target;
+	//				supertype_target;
+	//				type_parameter_bound_target;
+	//				empty_target;
+	//				method_formal_parameter_target;
+	//				throws_target;
+	//				localvar_target;
+	//				catch_target;
+	//				offset_target;
+	//				type_argument_target;
+	//				method_reference_target;
+	//			} target_info; // identifies the targeted program element, see Section 3.3
+	//			type_path target_path; // identifies targeted type in a compound type (array, generic, etc.), see Section 3.4
+	//			// Original fields from "annotation" structure:
+	//			u2 type_index;
+	//			u2 num_element_value_pairs;
+	//			{
+	//				u2 element_name_index;
+	//				element_value value;
+	//			} element_value_pairs[num_element_value_pairs];
+	//			}
+	
+	public void test001_classTypeParameter() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X<@Marker T> {}",
+
+					"Marker.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n"+
+					"@Target(ElementType.TYPE_PARAMETER)\n" + 
+					"@interface Marker {}",					
+				},
+				"");
+		// javac-b81: 9[0 1 0 0 0 0 13 0 0]  (13=Marker annotation)
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #21 @Marker(\n" + 
+			"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+			"      type parameter index = 0\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test002_classTypeParameter_reflection() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X<@Marker T> {\n"+
+					"  public static void main(String[] argv) { Helper.printTypeAnnotations2(X.class);}\n"+
+					"}",
+					
+					"Helper.java",HELPER_CLASS,
+					"Marker.java",
+					"import java.lang.annotation.*;\n" + 
+					"import static java.lang.annotation.ElementType.*;\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n"+
+					"@Target(TYPE_PARAMETER)\n" + 
+					"@interface Marker {}",
+				},
+				"X<@Marker T>");
+	}
+
+	public void test003_classTypeParameter() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X<@A1 T1,@A2 @A3 T2> {}",
+
+					"A1.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n"+
+					"@Target(ElementType.TYPE_PARAMETER)\n" + 
+					"@interface A1 {}",
+					
+					"A2.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n"+
+					"@Target(ElementType.TYPE_PARAMETER)\n" + 
+					"@interface A2 {}",
+					
+					"A3.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n"+
+					"@Target(ElementType.TYPE_PARAMETER)\n" + 
+					"@interface A3 {}",
+
+				},
+				"");
+		// javac-b81: 9[0 1 0 0 0 0 13 0 0]  (13=Marker)
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @A1(\n" + 
+				"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+				"      type parameter index = 0\n" + 
+				"    )\n" + 
+				"    #22 @A2(\n" + 
+				"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+				"      type parameter index = 1\n" + 
+				"    )\n" + 
+				"    #23 @A3(\n" + 
+				"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+				"      type parameter index = 1\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test004_classTypeParameter_reflection() throws Exception {
+		this.runConformTest(
+				new String[] {
+						"X.java",
+						"public class X<@A1 T1,@A2 @A3 T2> {\n"+
+						"    public static void main(String[] argv) { Helper.printTypeAnnotations2(X.class); }\n"+
+						"}",
+						
+						"Helper.java",HELPER_CLASS,
+						"A1.java",
+						"import java.lang.annotation.*;\n" +  
+						"@Retention(RetentionPolicy.RUNTIME)\n"+
+						"@Target(ElementType.TYPE_PARAMETER)\n" + 
+						"@interface A1 {}",
+						"A2.java",
+						"import java.lang.annotation.*;\n" + 
+						"import static java.lang.annotation.ElementType.*;\n" + 
+						"@Retention(RetentionPolicy.RUNTIME)\n"+
+						"@Target(TYPE_PARAMETER)\n" + 
+						"@interface A2 {}",
+						"A3.java",
+						"import java.lang.annotation.*;\n" + 
+						"import static java.lang.annotation.ElementType.*;\n" + 
+						"@Retention(RetentionPolicy.RUNTIME)\n"+
+						"@Target(TYPE_PARAMETER)\n" + 
+						"@interface A3 {}",
+				},
+				"X<@A1 T1,@A2 @A3 T2>");
+	}
+	
+	public void test005_classTypeParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X<@A @B(3) T> {}",
+		},
+		"");
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #25 @A(\n" + 
+			"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+			"      type parameter index = 0\n" + 
+			"    )\n" + 
+			"  RuntimeInvisibleTypeAnnotations: \n" + 
+			"    #21 @B(\n" + 
+			"      #22 value=(int) 3 (constant type)\n" + 
+			"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+			"      type parameter index = 0\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test006_classTypeParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X<T1,T2,@A @B(3) T3> {}",
+		},
+		"");
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #25 @A(\n" + 
+			"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+			"      type parameter index = 2\n" + 
+			"    )\n" + 
+			"  RuntimeInvisibleTypeAnnotations: \n" + 
+			"    #21 @B(\n" + 
+			"      #22 value=(int) 3 (constant type)\n" + 
+			"      target type = 0x0 CLASS_TYPE_PARAMETER\n" + 
+			"      type parameter index = 2\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test007_methodTypeParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	<@A @B(3) T> void foo(T t) {}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #27 @A(\n" + 
+			"        target type = 0x1 METHOD_TYPE_PARAMETER\n" + 
+			"        type parameter index = 0\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #23 @B(\n" + 
+			"        #24 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x1 METHOD_TYPE_PARAMETER\n" + 
+			"        type parameter index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test008_methodTypeParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_PARAMETER)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	<T1, @A @B(3) T2> void foo(T1 t1,T2 t2) {}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #29 @A(\n" + 
+			"        target type = 0x1 METHOD_TYPE_PARAMETER\n" + 
+			"        type parameter index = 1\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #25 @B(\n" + 
+			"        #26 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x1 METHOD_TYPE_PARAMETER\n" + 
+			"        type parameter index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test009_classExtends() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"Marker.java",
+					"import java.lang.annotation.Target;\n" + 
+					"import static java.lang.annotation.ElementType.*;\n" + 
+					"@Target(TYPE_USE)\n" + 
+					"@interface Marker {}",
+					"X.java",
+					"public class X extends @Marker Object {}",
+				},
+				"");
+		// javac-b81 annotation contents: len:10[0 1 16 -1 -1 0 0 17 0 0]
+		String expectedOutput =
+			"  RuntimeInvisibleTypeAnnotations: \n" + 
+			"    #17 @Marker(\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = -1\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test010_classExtends() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"Marker.java",
+					"import java.lang.annotation.*;\n" + 
+					"import static java.lang.annotation.ElementType.*;\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n"+
+					"@Target(TYPE_USE)\n" + 
+					"@interface Marker {}",
+					"X.java",
+					"public class X extends @Marker Object {}",
+				},
+				"");
+		// Bytes:10[0 1 16 -1 -1 0 0 17 0 0]
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #17 @Marker(\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = -1\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test011_classExtends_reflection() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X extends @Marker Object {public static void main(String[] argv) {Helper.printTypeAnnotations(X.class);}}",
+					"Helper.java",HELPER_CLASS,
+					"Marker.java",
+					"import java.lang.annotation.Target;\n" + 
+					"import static java.lang.annotation.ElementType.*;\n" + 
+					"@Target(TYPE_USE)\n" + 
+					"@interface Marker {}"
+				},
+				"Annotations on superclass of X\n"+
+				"  class java.lang.Object:no annotations");
+	}
+
+	public void test012_classExtends_reflection() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X extends @Marker Object {public static void main(String[] argv) {Helper.printTypeAnnotations(X.class);}}",
+					"Helper.java",HELPER_CLASS,
+					"Marker.java",
+					"import java.lang.annotation.*;\n" + 
+					"import static java.lang.annotation.ElementType.*;\n" + 
+					"@Target(TYPE_USE)\n" +
+					"@Retention(RetentionPolicy.RUNTIME)\n"+
+					"@interface Marker {}"
+				},
+				"Annotations on superclass of X\n"+
+				"  class java.lang.Object:@Marker");
+	}
+
+	public void test013_classExtends_interfaces() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String id() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X implements @A(id=\"Hello, World!\") I, @B @C('(') J {}",
+		},
+		"");
+		// Output from javac b81 lambda
+		// RuntimeVisibleTypeAnnotations
+		// Bytes:28[0 2 16 0 0 0 0 13 0 1 0 14 115 0 15 16 0 1 0 0 16 0 1 0 17 67 0 18]
+		// RuntimeInvisibleTypeAnnotations
+		// Bytes:10[0 1 16 0 1 0 0 20 0 0]		
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #23 @A(\n" + 
+			"      #24 id=\"Hello, World!\" (constant type)\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = 0\n" + 
+			"    )\n" + 
+			"    #26 @C(\n" + 
+			"      #27 value=\'(\' (constant type)\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = 1\n" + 
+			"    )\n" + 
+			"  RuntimeInvisibleTypeAnnotations: \n" + 
+			"    #21 @B(\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = 1\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test014_classExtends_interfaces_reflection() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X implements @A I {public static void main(String[]argv) {Helper.printTypeAnnotations(X.class);}}",
+				"Helper.java",HELPER_CLASS,
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n"
+		},
+		"Annotations on superclass of X\n" + 
+		"  class java.lang.Object:no annotations\n" + 
+		"Annotations on superinterfaces of X\n" + 
+		"  interface I:@A");
+	}
+	
+	public void test015_classExtends_interfaces_reflection() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X implements @A(id=\"Hello, World!\") I, @B @C('i') J {public static void main(String[] argv) { Helper.printTypeAnnotations(X.class);}}",
+				"Helper.java",HELPER_CLASS,
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String id() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+		},
+		"Annotations on superclass of X\n" + 
+		"  class java.lang.Object:no annotations\n" + 
+		"Annotations on superinterfaces of X\n" + 
+		"  interface I:@A(id=Hello, World!) \n" + 
+		"  interface J:@C(value=i)");
+	}
+
+	public void test016_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"Y.java",
+				"class Y<T> {}\n",
+				"X.java",
+				"public class X extends Y<@B String> {\n" + 
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:12[0 1 16 -1 -1 1 3 0 0 13 0 0] // type path: 1,3,0
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #19 @B(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = -1\n" + 
+				"      location = [TYPE_ARGUMENT(0)]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test017_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"Marker.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface Marker { }\n",
+				"I.java",
+				"interface I<T> {}\n",
+				"X.java",
+				"public class X implements I<@Marker String> {\n" + 
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:12[0 1 16 0 0 1 3 0 0 14 0 0] // type path: 1,3,0
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @Marker(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0)]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test018_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+
+				"I.java",
+				"interface I<T1,T2> {}\n",
+				
+				"X.java",
+				"public class X implements I<Integer, @A String> {}\n"
+		},
+		"");
+		// javac-b81: Bytes:12[0 1 16 0 0 1 3 1 0 14 0 0] // type path: 1,3,1
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @A(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(1)]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test019_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+
+				"J.java",
+				"interface J<T> {}\n",
+				
+				"I.java",
+				"interface I<T> {}\n",
+				
+				"X.java",
+				"public class X implements I<J<@A String>> {}\n"
+		},
+		"");
+		// javac-b81: Bytes:14[0 1 16 0 0 2 3 0 3 0 0 14 0 0] // type path: 2,3,0,3,0
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @A(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0), TYPE_ARGUMENT(0)]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test020_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+				
+				"I.java",
+				"interface I<T> {}\n",
+				
+				"X.java",
+				"public class X implements I<@A String[]> {}\n"
+		},
+		"");
+		// javac-b81: Bytes:14[0 1 16 0 0 2 3 0 0 0 0 14 0 0] // type path: 2,3,0,0,0
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @A(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0), ARRAY]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test021_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+				
+				"I.java",
+				"interface I<T> {}\n",
+				
+				"X.java",
+				"public class X implements I<String @A[]> {}\n"
+		},
+		"");
+		// javac-b81: Bytes:12[0 1 16 0 0 1 3 0 0 14 0 0] // type path: 1,3,0
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @A(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0)]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test022_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+				
+				"I.java",
+				"interface I<T> {}\n",
+				
+				"X.java",
+				"public class X implements I<String []@A[]> {}\n"
+		},
+		"");
+		// javac-b81: Bytes:14[0 1 16 0 0 2 3 0 0 0 0 14 0 0] // type path: 2,3,0,0,0
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @A(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0), ARRAY]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test023_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+				
+				"I.java",
+				"interface I<T> {}\n",
+				
+				"X.java",
+				"public class X implements I<@A String [][][]> {}\n"
+		},
+		"");
+		// javac-b81: Bytes:10[0 1 16 0 0 0 0 12 0 0] // type path: 4,3,0,0,0,0,0,0,0
+		String expectedOutput =
+				"  RuntimeVisibleTypeAnnotations: \n" + 
+				"    #21 @A(\n" + 
+				"      target type = 0x10 CLASS_EXTENDS\n" + 
+				"      type index = 0\n" + 
+				"      location = [TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]\n" + 
+				"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	
+	public void test024_classExtends() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I<T> {}\n",
+				"J.java",
+				"interface J<U,T> {}\n",
+				"X.java",
+				"public class X implements I<@A(\"Hello, World!\") String>, @B J<String, @C('(') Integer> {}",
+		},
+		"");
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #25 @A(\n" + 
+			"      #26 value=\"Hello, World!\" (constant type)\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = 0\n" + 
+			"      location = [TYPE_ARGUMENT(0)]\n" + 
+			"    )\n" + 
+			"    #28 @C(\n" + 
+			"      #26 value=\'(\' (constant type)\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = 1\n" + 
+			"      location = [TYPE_ARGUMENT(1)]\n" + 
+			"    )\n" + 
+			"  RuntimeInvisibleTypeAnnotations: \n" + 
+			"    #23 @B(\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = 1\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test025_classTypeParameterBound() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T extends @A String> {}",
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {}\n"
+		},
+		"");
+		// javac-b81: Bytes:10[0 1 17 0 0 0 0 13 0 0] 
+		// [17 0 0] is CLASS_PARAMETER_BOUND type_parameter_index=0 bound_index=0
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #21 @A(\n" + 
+			"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+			"      type parameter index = 0 type parameter bound index = 0\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test026_classTypeParameterBound() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X<T extends @A String & @B(3) Cloneable> {}",
+		},
+		"");
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #25 @A(\n" + 
+			"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+			"      type parameter index = 0 type parameter bound index = 0\n" + 
+			"    )\n" + 
+			"  RuntimeInvisibleTypeAnnotations: \n" + 
+			"    #21 @B(\n" + 
+			"      #22 value=(int) 3 (constant type)\n" + 
+			"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+			"      type parameter index = 0 type parameter bound index = 1\n" + 
+			"    )\n" ;
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test027_classTypeParameterBound_complex() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"Y.java",
+				"public class Y<T> {}",
+				"X.java",
+				"public class X<U, T extends Y<@A String @C[][]@B[]> & @B(3) Cloneable> {}",
+		},
+		"");
+		// javac-b81:
+		// Bytes:28[0 2 17 1 0 1 3 0 0 13 0 0 17 1 0 4 3 0 0 0 0 0 0 0 0 14 0 0]
+		// Bytes:29[0 2 17 1 0 3 3 0 0 0 0 0 0 16 0 0 17 1 1 0 0 16 0 1 0 17 73 0 18]
+		String expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #25 @A(\n" + 
+			"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+			"      type parameter index = 1 type parameter bound index = 0\n" + 
+			"      location = [TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]\n" + 
+			"    )\n" + 
+			"    #26 @C(\n" + 
+			"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+			"      type parameter index = 1 type parameter bound index = 0\n" + 
+			"      location = [TYPE_ARGUMENT(0)]\n" + 
+			"    )\n" + 
+			"  RuntimeInvisibleTypeAnnotations: \n" + 
+			"    #21 @B(\n" + 
+			"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+			"      type parameter index = 1 type parameter bound index = 0\n" + 
+			"      location = [TYPE_ARGUMENT(0), ARRAY, ARRAY]\n" + 
+			"    )\n" + 
+			"    #21 @B(\n" + 
+			"      #22 value=(int) 3 (constant type)\n" + 
+			"      target type = 0x11 CLASS_TYPE_PARAMETER_BOUND\n" + 
+			"      type parameter index = 1 type parameter bound index = 1\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test028_methodTypeParameterBound() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"Z.java",
+				"public class Z {}",
+				"X.java",
+				"public class X {\n" +
+				"	<T extends @A Z> void foo(T t) {}\n" +
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:10[0 1 18 0 0 0 0 13 0 0]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #23 @A(\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test029_methodTypeParameterBound() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"Z.java",
+				"public class Z {}",
+				"X.java",
+				"public class X {\n" +
+				"	<T extends @A Z & @B(3) Cloneable> void foo(T t) {}\n" +
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #27 @A(\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 0\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #23 @B(\n" + 
+			"        #24 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test030_methodTypeParameterBound() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"Z.java",
+				"public class Z {}",
+				"Y.java",
+				"public class Y<T> {}",
+				"X.java",
+				"public class X {\n" +
+				"	<T extends Y<Z [][]@B[]> & Cloneable> void foo(T t) {}\n" +
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" +  
+			"      #23 @B(\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 0\n" + 
+			"        location = [TYPE_ARGUMENT(0), ARRAY, ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test031_methodTypeParameterBound_complex() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"Z.java",
+				"public class Z {}",
+				"Y.java",
+				"public class Y<T> {}",
+				"X.java",
+				"public class X {\n" +
+				"	<T extends Y<@A Z @C[][]@B[]> & @B(3) Cloneable> void foo(T t) {}\n" +
+				"}",
+		},
+		"");
+		// javac-b81:
+		// Bytes:28[0 2 18 0 0 1 3 0 0 13 0 0 18 0 0 4 3 0 0 0 0 0 0 0 0 14 0 0]
+		// Bytes:29[0 2 18 0 0 3 3 0 0 0 0 0 0 16 0 0 18 0 1 0 0 16 0 1 0 17 73 0 18]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #27 @A(\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 0\n" + 
+			"        location = [TYPE_ARGUMENT(0), ARRAY, ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #28 @C(\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 0\n" + 
+			"        location = [TYPE_ARGUMENT(0)]\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" +  
+			"      #23 @B(\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 0\n" + 
+			"        location = [TYPE_ARGUMENT(0), ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #23 @B(\n" + 
+			"        #24 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x12 METHOD_TYPE_PARAMETER_BOUND\n" + 
+			"        type parameter index = 0 type parameter bound index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test032_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {}\n",
+				
+				"X.java",
+				"public class X {\n" + 
+				"	@A int field;\n" +
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:8[0 1 19 0 0 7 0 0]  19 = 0x13 (FIELD)
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #8 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test033_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {}\n",
+				
+				"X.java",
+				"public class X {\n" + 
+				"	java.util.List<@A String> field;\n" +
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:10[0 1 19 1 3 0 0 9 0 0]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #10 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(0)]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test034_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	@B(3) @A int field;\n" +
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #12 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #8 @B(\n" + 
+			"        #9 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test035_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {}\n",
+				
+				"X.java",
+				"public class X {\n" + 
+				"	java.util.Map<String, @A String> field;\n" +
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:10[0 1 19 1 3 1 0 9 0 0]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #10 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(1)]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test036_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {}\n",
+				
+				"X.java",
+				"public class X {\n" + 
+				"	java.util.List<String[][]@A[][]> field;\n" +
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:14[0 1 19 3 3 0 0 0 0 0 0 9 0 0]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #10 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(0), ARRAY, ARRAY]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test037_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	java.util.List<? extends @A Number> field;\n" +
+				"}",
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {}\n",
+		},
+		"");
+		// javac-b81: Bytes:12[0 1 19 2 3 0 2 0 0 9 0 0]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #10 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(0), WILDCARD]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test038_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"class AA { class BB<T> {}}" + 
+				"class X {\n" +
+				"  AA.@A BB field;\n" +
+				"}\n",
+
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+		},
+		"");
+		String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @A(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test038a_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"class AA { class BB<T> {}}" + 
+				"class X {\n" +
+				"  @B AA.@A BB[] @C[] field;\n" +
+				"}\n",
+
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A { }\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B { }\n",
+				
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C { }\n",
+		},
+		"");
+		
+	String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @B(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #9 @A(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #10 @C(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test039_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	@A int [] @B(3) [] field;\n" +
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #12 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #8 @B(\n" + 
+			"        #9 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test040_field_complex() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.util.Map;\n" +
+				"import java.util.List;\n" +
+				"public class X {\n" + 
+				"	@H String @E[] @F[] @G[] field;\n" + 
+				"	@A Map<@B String, @C List<@D Object>> field2;\n" + 
+				"	@A Map<@B String, @H String @E[] @F[] @G[]> field3;\n" + 
+				"}",
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"D.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface D {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"E.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface E {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"F.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface F {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"G.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface G {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"H.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface H {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"  // Field descriptor #6 [[[Ljava/lang/String;\n" + 
+			"  java.lang.String[][][] field;\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #11 @H(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY, ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #12 @F(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #8 @E(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n" + 
+			"      #9 @G(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"  \n" + 
+			"  // Field descriptor #14 Ljava/util/Map;\n" + 
+			"  // Signature: Ljava/util/Map<Ljava/lang/String;Ljava/util/List<Ljava/lang/Object;>;>;\n" + 
+			"  java.util.Map field2;\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #18 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n" + 
+			"      #19 @C(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(1)]\n" + 
+			"      )\n" + 
+			"      #20 @D(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(1), TYPE_ARGUMENT(0)]\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #17 @B(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(0)]\n" + 
+			"      )\n" + 
+			"  \n" + 
+			"  // Field descriptor #14 Ljava/util/Map;\n" + 
+			"  // Signature: Ljava/util/Map<Ljava/lang/String;[[[Ljava/lang/String;>;\n" + 
+			"  java.util.Map field3;\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #18 @A(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n" + 
+			"      #11 @H(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(1), ARRAY, ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #12 @F(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(1), ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #17 @B(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(0)]\n" + 
+			"      )\n" + 
+			"      #8 @E(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(1)]\n" + 
+			"      )\n" + 
+			"      #9 @G(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [TYPE_ARGUMENT(1), ARRAY, ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test041_field() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	java.lang.@H String @E[] @F[] @G[] field;\n" + 
+				"}",
+				"E.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface E {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"F.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface F {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"G.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface G {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"H.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface H {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #11 @H(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY, ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #12 @F(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #8 @E(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"      )\n" + 
+			"      #9 @G(\n" + 
+			"        target type = 0x13 FIELD\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test042_methodReturnType() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	@B(3) @A(value=\"test\") int foo() {\n" +
+				"		return 1;\n" +
+				"	}\n" + 
+				"}",
+		},
+		"");
+		// javac-b81:
+		// Bytes:13[0 1 20 0 0 11 0 1 0 12 115 0 13]
+		// Bytes:13[0 1 20 0 0 15 0 1 0 12 73 0 16]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #21 @A(\n" + 
+			"        #18 value=\"test\" (constant type)\n" + 
+			"        target type = 0x14 METHOD_RETURN\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #17 @B(\n" + 
+			"        #18 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x14 METHOD_RETURN\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test043_methodReceiver() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	void foo(@B(3) X this) {}\n" + 
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:13[0 1 21 0 0 10 0 1 0 11 73 0 12]
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #16 @B(\n" + 
+			"        #17 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x15 METHOD_RECEIVER\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test044_methodReceiver() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T> {\n" + 
+				"	void foo(X<@B(3) T> this) {}\n" + 
+				"}",
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:15[0 1 21 1 3 0 0 10 0 1 0 11 73 0 12]
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #18 @B(\n" + 
+			"        #19 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x15 METHOD_RECEIVER\n" + 
+			"        location = [TYPE_ARGUMENT(0)]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	
+	public void test045_methodParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	int foo(@B(3) String s) {\n" +
+				"		return s.length();\n" +
+				"	}\n" + 
+				"}",
+				
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:14[0 1 22 0 0 0 11 0 1 0 12 73 0 13]
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #25 @B(\n" + 
+			"        #26 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+			"        method parameter index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test046_methodParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	int foo(int i, double d, @B(3) String s) {\n" +
+				"		return s.length();\n" +
+				"	}\n" + 
+				"}",
+				
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+		},
+		"");
+		// javac-b81: Bytes:14[0 1 22 1 0 0 11 0 1 0 12 73 0 13]
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #29 @B(\n" + 
+			"        #30 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+			"        method parameter index = 2\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test047_methodParameterArray() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	int foo(String @A [] @B(3) [] s) {\n" +
+				"		return s.length;\n" +
+				"	}\n" + 
+				"}",
+		},
+		"");
+		// javac-b81:
+		// Bytes:9[0 1 22 0 0 0 11 0 0]
+		// Bytes:16[0 1 22 0 1 0 0 0 13 0 1 0 14 73 0 15]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #23 @A(\n" + 
+			"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+			"        method parameter index = 0\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #19 @B(\n" + 
+			"        #20 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+			"        method parameter index = 0\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test048_throws() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n"+
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n"+
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n"+
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"E.java",
+				"class E extends RuntimeException {\n" +
+				"	private static final long serialVersionUID = 1L;\n" +
+				"}\n",
+				"E1.java",
+				"class E1 extends RuntimeException {\n" +
+				"	private static final long serialVersionUID = 1L;\n" +
+				"}\n",
+				"E2.java",
+				"class E2 extends RuntimeException {\n" +
+				"	private static final long serialVersionUID = 1L;\n" +
+				"}\n",
+				"X.java",
+				"public class X {\n" +
+				"	void foo() throws @A(\"Hello, World!\") E, E1, @B @C('(') E2 {}\n" +
+				"}",
+		},
+		"");
+		// javac-b81:
+		// Bytes:28[0 2 23 0 0 0 0 14 0 1 0 15 115 0 16 23 0 2 0 0 17 0 1 0 15 67 0 18]
+		// Bytes:10[0 1 23 0 2 0 0 20 0 0]
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #25 @A(\n" + 
+			"        #26 value=\"Hello, World!\" (constant type)\n" + 
+			"        target type = 0x17 THROWS\n" + 
+			"        throws index = 0\n" + 
+			"      )\n" + 
+			"      #28 @C(\n" + 
+			"        #26 value=\'(\' (constant type)\n" + 
+			"        target type = 0x17 THROWS\n" + 
+			"        throws index = 2\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #23 @B(\n" + 
+			"        target type = 0x17 THROWS\n" + 
+			"        throws index = 2\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	
+	public void test049_codeblocks_localVariable() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		@B int j = 9;\n" + 
+				"		try {\n" + 
+				"			System.out.print(\"SUCCESS\" + j);\n" + 
+				"		} catch(@A Exception e) {\n" + 
+				"		}\n" + 
+				"		@B int k = 3;\n" + 
+				"		System.out.println(k);\n" + 
+				"	}\n" + 
+				"}",
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+		},
+		"SUCCESS93");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #56 @B(\n" + 
+			"        target type = 0x40 LOCAL_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 3, pc: 39] index: 1\n" + 
+			"      )\n" + 
+			"      #56 @B(\n" + 
+			"        target type = 0x40 LOCAL_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 31, pc: 39] index: 2\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test050_codeblocks_localVariable() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	String[][] bar() {\n" + 
+				"		return new String[][] {};" +
+				"	}\n" + 
+				"	void foo(String s) {\n" + 
+				"		@C int i;\n" + 
+				"		@A String [] @B(3)[] tab = bar();\n" + 
+				"		if (tab != null) {\n" + 
+				"			i = 0;\n" + 
+				"			System.out.println(i + tab.length);\n" + 
+				"		} else {\n" + 
+				"			System.out.println(tab.length);\n" + 
+				"		}\n" + 
+				"		i = 4;\n" + 
+				"		System.out.println(-i + tab.length);\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		// javac-b81:
+		// Bytes:34[0 2 64 0 1 0 34 0 12 0 2 0 0 19 0 0 64 0 1 0 5 0 41 0 3 2 0 0 0 0 0 20 0 0]
+		// Bytes:23[0 1 64 0 1 0 5 0 41 0 3 1 0 0 0 22 0 1 0 23 73 0 24]
+		// ECJ data varies a little here as it is splitting the range 
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #45 @B(\n" + 
+			"        #46 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x40 LOCAL_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 5, pc: 46] index: 3\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #49 @C(\n" + 
+			"        target type = 0x40 LOCAL_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 11, pc: 24] index: 2\n" + 
+			"          [pc: 34, pc: 46] index: 2\n" + 
+			"      )\n" + 
+			"      #50 @A(\n" + 
+			"        target type = 0x40 LOCAL_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 5, pc: 46] index: 3\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test051_codeblocks_resourceVariable() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"import java.io.*;\n"+
+				"public class X {\n" + 
+				"   public static void main(String[] argv) throws Exception {\n"+
+				"     try (@A BufferedReader br1 = new BufferedReader(new FileReader(\"a\"));\n"+
+				"          @B(99) BufferedReader br2 = new BufferedReader(new FileReader(\"b\"))) {\n"+
+				"       System.out.println(br1.readLine()+br2.readLine());\n" +
+				"     }\n" +
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #81 @B(\n" + 
+			"        #82 value=(int) 99 (constant type)\n" + 
+			"        target type = 0x41 RESOURCE_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 39, pc: 94] index: 4\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #85 @A(\n" + 
+			"        target type = 0x41 RESOURCE_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 21, pc: 135] index: 3\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test052_codeblocks_exceptionParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" + 
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		Exception test = new Exception() {\n" +
+				"			private static final long serialVersionUID = 1L;\n" +
+				"			@Override\n" +
+				"			public String toString() {\n" +
+				"				return \"SUCCESS\";\n" +
+				"			}\n" +
+				"		};\n" + 
+				"		try {\n" + 
+				"			System.out.println(test);\n" + 
+				"		} catch(@A Exception e) {\n" + 
+				"			e.printStackTrace();\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+		},
+		"SUCCESS");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #44 @A(\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test053_codeblocks_exceptionParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		@A Exception test = new Exception() {\n" +
+				"			private static final long serialVersionUID = 1L;\n" +
+				"			@Override\n" +
+				"			public String toString() {\n" +
+				"				return \"SUCCESS\";\n" +
+				"			}\n" +
+				"		};\n" + 
+				"		try {\n" + 
+				"			System.out.println(test);\n" + 
+				"		} catch(@A Exception e) {\n" + 
+				"			e.printStackTrace();\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+		},
+		"SUCCESS");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #44 @A(\n" + 
+			"        target type = 0x40 LOCAL_VARIABLE\n" + 
+			"        local variable entries:\n" + 
+			"          [pc: 8, pc: 24] index: 1\n" + 
+			"      )\n" + 
+			"      #44 @A(\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test054_codeblocks_exceptionParameter() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"			System.out.println(42);\n" + 
+				"		} catch(@B(1) RuntimeException e) {\n" + 
+				"			e.printStackTrace();\n" + 
+				"		} catch(@B(2) Throwable t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"42");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #44 @B(\n" + 
+			"        #45 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #44 @B(\n" + 
+			"        #45 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test055_codeblocks_exceptionParameterMultiCatch() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"class Exc1 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc2 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc3 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"			System.out.println(42);\n" +
+				// @B(1) is attached to the argument, the others are attached to the type reference in the union type reference
+				// During Parsing the @B(1) is moved from the argument to Exc1
+				"		} catch(@B(1) Exc1 | Exc2 | @B(2) Exc3 t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"42");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #45 @B(\n" + 
+			"        #46 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #45 @B(\n" + 
+			"        #46 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 2\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test056_codeblocks_instanceof() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	public void foo(Object o) {\n" + 
+				"		if (o instanceof @A String) {\n" +
+				"			String tab = (String) o;\n" +
+				"			System.out.println(tab);\n" +
+				"		}\n" + 
+				"		System.out.println(o);\n" +
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #38 @A(\n" + 
+			"        target type = 0x43 INSTANCEOF\n" + 
+			"        offset = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+		
+		expectedOutput = "     1  instanceof java.lang.String [16]\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test057_codeblocks_new() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new @B(3) Object();\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #35 @B(\n" + 
+			"        #36 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 8\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test058_codeblocks_new2() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+
+				"X.java",
+				"public class X {\n" + 
+				"	public void foo() {\n" + 
+				"       Outer o = new Outer();\n" +
+				"       o.new @B(1) Inner();\n" +
+				"	}\n" + 
+				"}\n" +
+				"class Outer { class Inner {}}\n"
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #30 @B(\n" + 
+			"        #31 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 8\n" +
+			"        location = [INNER_TYPE]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test057_codeblocks_new3_415821() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface X { }\n" +
+				"\n" +
+				"class Foo {}\n",
+				"C.java",
+				"class C { void m() { new @X Foo() {}; } }\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #21 @X(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "C.class", "C", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+		expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #28 @X(\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = -1\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "C$1.class", "C$1", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test057_codeblocks_new4_415821() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface X { }\n" +
+				"\n",
+				"C.java",
+				"class C { void m() { new @X Runnable() { public void run() {}}; } }\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #21 @X(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "C.class", "C", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+		expectedOutput =
+			"  RuntimeVisibleTypeAnnotations: \n" + 
+			"    #31 @X(\n" + 
+			"      target type = 0x10 CLASS_EXTENDS\n" + 
+			"      type index = 0\n" + 
+			"    )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "C$1.class", "C$1", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test059_codeblocks_new_newArray() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new @A String [1];\n" +
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #37 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"        location = [ARRAY]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test060_codeblocks_new_multiNewArray() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new @A String [2][3];\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #37 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY, ARRAY]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test060a_codeblocks_new_newArrayWithInitializer() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		X[][] x = new @A X @B [] @C[]{ { null }, { null } };\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface C {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #37 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #38 @B(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"      )\n" + 
+			"      #39 @C(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"        location = [ARRAY]\n" +
+			"      )\n" + 
+			"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test060b_codeblocks_new_multiNewArray() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		X[][] x = new @A X @B [1] @C[2];\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface C {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #36 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #37 @B(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"      )\n" + 
+			"      #38 @C(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY]\n" +
+			"      )\n" + 
+			"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test060c_codeblocks_new_multiNewArray() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		X [][][] x = new @A X @B[10] @C[10] @D[];\n" +
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface C {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+				"D.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface D {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #36 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 12\n" + 
+			"        location = [ARRAY, ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #37 @B(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 12\n" + 
+			"      )\n" + 
+			"      #38 @C(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 12\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"      #39 @D(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 12\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test060d_codeblocks_new_arraysWithNestedTypes() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new @B(1) Outer.@B(2) Inner @B(3) [2];\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}\n" +
+				"class Outer { class Inner {}}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"        location = [ARRAY, INNER_TYPE]\n" + 
+			"      )\n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test060e_codeblocks_new_arraysWithNestedTypes() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new @B(1) Outer.@B(2) Inner @B(3) [2] @B(4)[4];\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}\n" +
+				"class Outer { class Inner {}}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY, ARRAY, INNER_TYPE]\n" + 
+			"      )\n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"      )\n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 4 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test060f_codeblocks_new_arraysWithQualifiedNestedTypes() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"Z.java",
+				"public class Z {}",
+				"X.java",
+				"package org.foo.bar;\n" +
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new org.foo.bar.@B(1) Outer.@B(2) Inner @B(3) [2] @B(4)[4];\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}\n" +
+				"class Outer { class Inner {}}\n",
+				"B.java",
+				"package org.foo.bar;\n" +
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #37 @org.foo.bar.B(\n" + 
+			"        #38 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #37 @org.foo.bar.B(\n" + 
+			"        #38 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY, ARRAY, INNER_TYPE]\n" + 
+			"      )\n" + 
+			"      #37 @org.foo.bar.B(\n" + 
+			"        #38 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"      )\n" + 
+			"      #37 @org.foo.bar.B(\n" + 
+			"        #38 value=(int) 4 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 10\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "org" + File.separator + "foo" + File.separator + "bar" + File.separator + "X.class",
+				"org.foo.bar.X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test061_codeblocks_new_newArrayWithInitializer() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new @A String []{\"xyz\"};\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #37 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" + 
+			"        location = [ARRAY]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test062_codeblocks_newArray() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new String @A[1];\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #37 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" +
+			// no type path expected here
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test062_codeblocks_newArrayWithInitializer() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(String s) {\n" + 
+				"		System.out.println(\"xyz\");\n" +
+				"		Object o = new String @A[] { \"Hello\" };\n" + 
+				"		return true;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #39 @A(\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 9\n" +
+			// no type path expected here
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test063_codeblocks_new_instanceof() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public boolean foo(Object o) {\n" + 
+				"		boolean b = (o instanceof @C('_') Object[]);\n" + 
+				"		Object o1 = new @B(3) @A(\"new Object\") Object[] {};\n" + 
+				"		return b;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #24 @B(\n" + 
+			"        #25 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 6\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #28 @C(\n" + 
+			"        #25 value=\'_\' (constant type)\n" + 
+			"        target type = 0x43 INSTANCEOF\n" + 
+			"        offset = 1\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"      #30 @A(\n" + 
+			"        #25 value=\"new Object\" (constant type)\n" + 
+			"        target type = 0x44 NEW\n" + 
+			"        offset = 6\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+
+	public void test064_codeblocks_constructorReference() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.util.*;\n" +
+				"interface MR { X process(String input); }\n"+
+				"public class X<T> {\n" + 
+				"   public X(T t) {}\n" +
+				"   public static <T> String foo(String bar) { return bar; }\n"+
+				"	public void bar() {\n" +
+				"       System.out.println(\"abc\");\n" +
+				"       MR ref = @A X::new;\n" +
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #48 @A(\n" + 
+			"        target type = 0x45 CONSTRUCTOR_REFERENCE\n" + 
+			"        offset = 8\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+
+	public void test065_codeblocks_methodReference() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.util.*;\n" +
+				"interface MR { String process(String input); }\n"+
+				"public class X<T> {\n" + 
+				"   public static <T> String foo(String bar) { return bar; }\n"+
+				"	public void bar() {\n" +
+				"       System.out.println(\"abc\");\n" +
+				"       MR ref = @A X::foo;\n" +
+				"       ref.process(\"abc\");\n" +
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #47 @A(\n" + 
+			"        target type = 0x46 METHOD_REFERENCE\n" + 
+			"        offset = 8\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test066_codeblocks_methodReference() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"interface I {\n" +
+				"    Object copy(int [] ia);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = @B(1) int @B(2)[]::<String>clone;\n" +
+				"        i.copy(new int[10]); \n" +
+				"    }\n" +
+				"}\n",
+		
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #30 @B(\n" + 
+			"        #31 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x46 METHOD_REFERENCE\n" + 
+			"        offset = 0\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"      #30 @B(\n" + 
+			"        #31 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x46 METHOD_REFERENCE\n" + 
+			"        offset = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test067_codeblocks_constructorReferenceTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.util.*;\n" +
+				"interface MR { X process(String input); }\n" +
+				"public class X<T> {\n" + 
+				"   public X(T s) {};\n" +
+				"   public static <T> String foo(String bar) { return bar; }\n"+
+				"	public void bar() {\n" +
+				"       System.out.println(\"abc\");\n" +
+				"       MR ref = X::<@A String>new;\n" +
+				"       ref.process(\"abc\");\n" +
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #53 @A(\n" + 
+			"        target type = 0x4a CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT\n" + 
+			"        offset = 8\n" + 
+			"        type argument index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test068_codeblocks_methodReferenceTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.util.*;\n" +
+				"interface MR { String process(String input); }\n"+
+				"public class X<T> {\n" + 
+				"   public static <T> String foo(String bar) { return bar; }\n"+
+				"	public void bar() {\n" +
+				"       System.out.println(\"abc\");\n" +
+				"       MR ref = X::<@A String>foo;\n" +
+				"       ref.process(\"abc\");\n" +
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #47 @A(\n" + 
+			"        target type = 0x4b METHOD_REFERENCE_TYPE_ARGUMENT\n" + 
+			"        offset = 8\n" + 
+			"        type argument index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test069_codeblocks_cast() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	public void foo(Object o) {\n" + 
+				"		if (o instanceof String) {\n" +
+				"			String tab = (@A String) o;\n" +
+				"			System.out.println(tab);\n" +
+				"		}\n" + 
+				"		System.out.println(o);\n" +
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		// javac-b81: Bytes:11[0 1 71 0 7 0 0 0 16 0 0]
+		// relevant numbers '71 0 7 0' which mean 0x47 (CAST) at offset 7
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #38 @A(\n" + 
+			"        target type = 0x47 CAST\n" + 
+			"        offset = 8\n" + 
+			"        type argument index = 0\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test070_codeblocks_cast_complex() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"I.java",
+				"interface I {}\n",
+				"J.java",
+				"interface J {}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	public void foo(Object o) {\n" + 
+				"		if (o instanceof String[][]) {\n" +
+				"			String[][] tab = (@C('_') @B(3) String[] @A[]) o;\n" +
+				"			System.out.println(tab.length);\n" +
+				"		}\n" + 
+				"		System.out.println(o);\n" +
+				"	}\n" + 
+				"}",
+		},
+		"");
+		// javac-b81:
+		// Bytes:31[0 2 71 0 7 0 1 0 0 0 16 0 0 71 0 7 0 2 0 0 0 0 0 17 0 1 0 18 67 0 19]
+		// Bytes:20[0 1 71 0 7 0 2 0 0 0 0 0 21 0 1 0 18 73 0 22]
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #37 @B(\n" + 
+			"        #38 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x47 CAST\n" + 
+			"        offset = 8\n" + 
+			"        type argument index = 0\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #41 @C(\n" + 
+			"        #38 value=\'_\' (constant type)\n" + 
+			"        target type = 0x47 CAST\n" + 
+			"        offset = 8\n" + 
+			"        type argument index = 0\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #43 @A(\n" + 
+			"        target type = 0x47 CAST\n" + 
+			"        offset = 8\n" + 
+			"        type argument index = 0\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test070a_codeblocks_castWithIntersectionCast() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+			"import java.io.*;\n" +
+				"public class X {\n" + 
+				"   public void foo(Object o) {\n" +
+				"	  I i = (@B(1) I & J) o;\n" +
+				"	  J j = (I & @B(2) J) o;\n" +
+			    "   }\n" +
+				"}\n" +
+				"interface I {}\n" +
+				"interface J {}\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 1;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  // Method descriptor #15 (Ljava/lang/Object;)V\n" + 
+				"  // Stack: 1, Locals: 4\n" + 
+				"  public void foo(java.lang.Object o);\n" + 
+				"     0  aload_1 [o]\n" + 
+				"     1  checkcast I [16]\n" + 
+				"     4  checkcast J [18]\n" + 
+				"     7  astore_2 [i]\n" + 
+				"     8  aload_1 [o]\n" + 
+				"     9  checkcast I [16]\n" + 
+				"    12  checkcast J [18]\n" +
+				"    15  astore_3 [j]\n" + 
+				"    16  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 4]\n" + 
+				"        [pc: 8, line: 5]\n" + 
+				"        [pc: 16, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 17] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 17] local: o index: 1 type: java.lang.Object\n" + 
+				"        [pc: 8, pc: 17] local: i index: 2 type: I\n" + 
+				"        [pc: 16, pc: 17] local: j index: 3 type: J\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #27 @B(\n" + 
+				"        #28 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 1\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n" + 
+				"      #27 @B(\n" + 
+				"        #28 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 9\n" + 
+				"        type argument index = 1\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test070b_codeblocks_castWithIntersectionCast() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+			"import java.io.*;\n" +
+				"public class X {\n" + 
+				"   public void foo(Object o) {\n" +
+				"     System.out.println(123);\n" +
+				"	  I<String> i = (I<@B(1) String> & @B(2) J<String>) o;\n" +
+			    "   }\n" +
+				"}\n" +
+				"interface I<T> {}\n" +
+				"interface J<T> {}\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 1;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  public void foo(java.lang.Object o);\n" + 
+				"     0  getstatic java.lang.System.out : java.io.PrintStream [16]\n" + 
+				"     3  bipush 123\n" + 
+				"     5  invokevirtual java.io.PrintStream.println(int) : void [22]\n" + 
+				"     8  aload_1 [o]\n" + 
+				"     9  checkcast I [28]\n" + 
+				"    12  checkcast J [30]\n" + 
+				"    15  astore_2 [i]\n" + 
+				"    16  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 4]\n" + 
+				"        [pc: 8, line: 5]\n" + 
+				"        [pc: 16, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 17] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 17] local: o index: 1 type: java.lang.Object\n" + 
+				"        [pc: 16, pc: 17] local: i index: 2 type: I\n" + 
+				"      Local variable type table:\n" + 
+				"        [pc: 16, pc: 17] local: i index: 2 type: I<java.lang.String>\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #39 @B(\n" + 
+				"        #40 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 9\n" + 
+				"        type argument index = 0\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #39 @B(\n" + 
+				"        #40 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 9\n" + 
+				"        type argument index = 1\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test070c_codeblocks_castTwiceInExpression() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+			"import java.io.*;\n" +
+				"public class X {\n" + 
+				"   public void foo(Object o) {\n" +
+				"     System.out.println(123);\n" +
+				"	  I i = (@B(1) I)(@B(2) J) o;\n" +
+			    "   }\n" +
+				"}\n" +
+				"interface I {}\n" +
+				"interface J {}\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 1;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"     0  getstatic java.lang.System.out : java.io.PrintStream [16]\n" + 
+				"     3  bipush 123\n" + 
+				"     5  invokevirtual java.io.PrintStream.println(int) : void [22]\n" + 
+				"     8  aload_1 [o]\n" + 
+				"     9  checkcast J [28]\n" + 
+				"    12  checkcast I [30]\n" + 
+				"    15  astore_2 [i]\n" + 
+				"    16  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 4]\n" + 
+				"        [pc: 8, line: 5]\n" + 
+				"        [pc: 16, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 17] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 17] local: o index: 1 type: java.lang.Object\n" + 
+				"        [pc: 16, pc: 17] local: i index: 2 type: I\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #37 @B(\n" + 
+				"        #38 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 9\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n" + 
+				"      #37 @B(\n" + 
+				"        #38 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 12\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test070d_codeblocks_castDoubleIntersectionCastInExpression() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+			"import java.io.*;\n" +
+				"public class X {\n" + 
+				"   public void foo(Object o) {\n" +
+				"     System.out.println(123);\n" +
+				"	  I i = (@B(1) I & J)(K & @B(2) L) o;\n" +
+			    "   }\n" +
+				"}\n" +
+				"interface I {}\n" +
+				"interface J {}\n" +
+				"interface K {}\n" +
+				"interface L {}\n",
+				
+				"B.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 1;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+				"  public void foo(java.lang.Object o);\n" + 
+				"     0  getstatic java.lang.System.out : java.io.PrintStream [16]\n" + 
+				"     3  bipush 123\n" + 
+				"     5  invokevirtual java.io.PrintStream.println(int) : void [22]\n" + 
+				"     8  aload_1 [o]\n" + 
+				"     9  checkcast K [28]\n" + 
+				"    12  checkcast L [30]\n" + 
+				"    15  checkcast I [32]\n" + 
+				"    18  checkcast J [34]\n" + 
+				"    21  astore_2 [i]\n" + 
+				"    22  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 4]\n" + 
+				"        [pc: 8, line: 5]\n" + 
+				"        [pc: 22, line: 6]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 23] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 23] local: o index: 1 type: java.lang.Object\n" + 
+				"        [pc: 22, pc: 23] local: i index: 2 type: I\n" + 
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #41 @B(\n" + 
+				"        #42 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 9\n" + 
+				"        type argument index = 1\n" + 
+				"      )\n" + 
+				"      #41 @B(\n" + 
+				"        #42 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x47 CAST\n" + 
+				"        offset = 15\n" + 
+				"        type argument index = 0\n" + 
+				"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test071_codeblocks_constructorInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"X.java",
+				"public class X {\n" + 
+				"	<T> X(T t) {\n" + 
+				"	}\n" + 
+				"	public Object foo() {\n" + 
+				"		X x = new <@A @B(1) String>X(null);\n" + 
+				"		return x;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #27 @B(\n" + 
+			"        #28 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 5\n" + 
+			"        type argument index = 0\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #31 @A(\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 5\n" + 
+			"        type argument index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test072_codeblocks_constructorInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+				"X.java",
+				"public class X {\n" + 
+				"	<T, U> X(T t, U u) {\n" + 
+				"	}\n" + 
+				"	public Object foo() {\n" + 
+				"		X x = new <@A Integer, @A String @C [] @B(1)[]>X(null, null);\n" + 
+				"		return x;\n" + 
+				"	}\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #29 @B(\n" + 
+			"        #30 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 6\n" + 
+			"        type argument index = 1\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #33 @A(\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 6\n" + 
+			"        type argument index = 0\n" + 
+			"      )\n" + 
+			"      #33 @A(\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 6\n" + 
+			"        type argument index = 1\n" + 
+			"        location = [ARRAY, ARRAY]\n" + 
+			"      )\n" + 
+			"      #34 @C(\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 6\n" + 
+			"        type argument index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void test073_codeblocks_constructorInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T1, T2> {\n" + 
+				"	public void bar() {\n" + 
+				"       new <String, @A T2>X();\n"+
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		// Example bytes:11[0 1 73 0 0 0 0 0 13 0 0] this would be for offset 0
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #19 @A(\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 3\n" + 
+			"        type argument index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test074_codeblocks_constructorInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T1,T2> {\n" + 
+				"   public static void foo(int i) {}\n"+
+				"	public void bar() {\n" + 
+				"       new <java.util.List<@A String>, T2>X();\n"+
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		// Example bytes:11[0 1 73 0 0 0 0 0 13 0 0] this would be for offset 0
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #23 @A(\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 3\n" + 
+			"        type argument index = 0\n" + 
+			"        location = [TYPE_ARGUMENT(0)]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test075_codeblocks_constructorInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T> {\n" + 
+				"	public void bar() {\n" + 
+				"       new <@A T>X();\n"+
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		// Example bytes:11[0 1 73 0 0 0 0 0 13 0 0] this would be for offset 0
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #19 @A(\n" + 
+			"        target type = 0x48 CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 3\n" + 
+			"        type argument index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test076_codeblocks_methodInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"\n" +
+				"	static <T, U> T foo(T t, U u) {\n" +
+				"		return t;\n" +
+				"	}\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println(X.<@A @B(1) String[], @C('-') X>foo(new String[]{\"SUCCESS\"}, null)[0]);\n" +
+				"	}\n" +
+				"}\n",
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(CLASS)\n" + 
+				"@interface B {\n" + 
+				"	int value() default -1;\n" + 
+				"}",
+				"C.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface C {\n" + 
+				"	char value() default '-';\n" + 
+				"}\n",
+		},
+		"SUCCESS");
+		String expectedOutput =
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #48 @B(\n" + 
+			"        #49 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x49 METHOD_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 13\n" + 
+			"        type argument index = 0\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #52 @A(\n" + 
+			"        target type = 0x49 METHOD_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 13\n" + 
+			"        type argument index = 0\n" + 
+			"        location = [ARRAY]\n" + 
+			"      )\n" + 
+			"      #53 @C(\n" + 
+			"        #49 value=\'-\' (constant type)\n" + 
+			"        target type = 0x49 METHOD_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 13\n" + 
+			"        type argument index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test077_codeblocks_methodInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T1,T2> {\n" + 
+				"   public static void foo(int i) {}\n"+
+				"	public void bar() {\n" + 
+				"       X.<String, @A T2>foo(42);\n"+
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		// Example bytes:11[0 1 73 0 0 0 0 0 13 0 0] this would be for offset 0
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #24 @A(\n" + 
+			"        target type = 0x49 METHOD_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 2\n" + 
+			"        type argument index = 1\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test078_codeblocks_methodInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T1,T2> {\n" + 
+				"   public static void foo(int i) {}\n"+
+				"	public void bar() {\n" + 
+				"       X.<java.util.List<@A String>, T2>foo(42);\n"+
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+				
+		},
+		"");
+		// Example bytes:11[0 1 73 0 0 0 0 0 13 0 0] this would be for offset 0
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #24 @A(\n" + 
+			"        target type = 0x49 METHOD_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 2\n" + 
+			"        type argument index = 0\n" + 
+			"        location = [TYPE_ARGUMENT(0)]\n" +
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test079_codeblocks_methodInvocationTypeArgument() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X<T> {\n" + 
+				"   public static void foo(int i) {}\n"+
+				"	public void bar() {\n" + 
+				"       X.<@A T>foo(42);\n"+
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	String value() default \"default\";\n" + 
+				"}\n",
+		},
+		"");
+		// Example bytes:11[0 1 73 0 0 0 0 0 13 0 0] this would be for offset 0
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #24 @A(\n" + 
+			"        target type = 0x49 METHOD_INVOCATION_TYPE_ARGUMENT\n" + 
+			"        offset = 2\n" + 
+			"        type argument index = 0\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	
+	// Annotation should appear twice in this case
+	public void test080_multiuseAnnotations() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"public class X {\n" + 
+				"	 @B(1) int foo() { return 0; }\n" +
+				"}",
+				"B.java",
+				"import java.lang.annotation.*;\n" +   
+				"@Target({ElementType.METHOD, ElementType.TYPE_USE})\n" + 
+				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeVisibleAnnotations: \n" + 
+			"      #17 @B(\n" + 
+			"        #18 value=(int) 1 (constant type)\n" + 
+			"      )\n" + 
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #17 @B(\n" + 
+			"        #18 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x14 METHOD_RETURN\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test081_multiuseAnnotations() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.*;\n" + 
+				"@Target({ElementType.METHOD, ElementType.TYPE_USE})\n" + 
+				"@interface Annot {\n" + 
+				"	int value() default 0;\n" + 
+				"}\n" + 
+				"public class X {\n" + 
+				"	@Annot(4) public String foo() { return \"hello\"; }" +
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"    RuntimeInvisibleAnnotations: \n" + 
+			"      #17 @Annot(\n" + 
+			"        #18 value=(int) 4 (constant type)\n" + 
+			"      )\n" + 
+			"    RuntimeInvisibleTypeAnnotations: \n" + 
+			"      #17 @Annot(\n" + 
+			"        #18 value=(int) 4 (constant type)\n" + 
+			"        target type = 0x14 METHOD_RETURN\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	// When not annotated with any TYPE it assumes the Java7 set (i.e. not TYPE_USE/TYPE_PARAMETER)
+	public void test082_multiuseAnnotations() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"@interface Annot {\r\n" + 
+				"	int value() default 0;\r\n" + 
+				"}\r\n" + 
+				"public class X {\r\n" + 
+				"	@Annot(4)\r\n" + 
+				"	public void foo() {\r\n" + 
+				"	}\r\n" + 
+				"}",
+		},
+		"");
+		String expectedOutput =
+			"  // Method descriptor #6 ()V\n" + 
+			"  // Stack: 0, Locals: 1\n" + 
+			"  public void foo();\n" + 
+			"    0  return\n" + 
+			"      Line numbers:\n" + 
+			"        [pc: 0, line: 7]\n" + 
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+			"    RuntimeInvisibleAnnotations: \n" + 
+			"      #16 @Annot(\n" + 
+			"        #17 value=(int) 4 (constant type)\n" + 
+			"      )\n" + 
+			"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100_pqtr() throws Exception { // PQTR (ParameterizedQualifiedTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  java.util.@B(2) List<String> field2;\n" +
+					"}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 2 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test100a_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  java.util.@B(2) List<String>[] field3;\n" +
+					"}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 2 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" +
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100b_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  java.util.List<@B(3) String>[] field3;\n" +
+					"}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, TYPE_ARGUMENT(0)]\n" +
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void test100c_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  java.util.List<String> @B(3)[] field3;\n" +
+					"}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100d_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  java.util.@B(2) List<@B(5) String> @B(3)[]@B(4)[] field;\n" +
+					"}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 2 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY]\n" +
+					"      )\n" +
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n" +
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 4 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" +
+					"      )\n" +
+					"      #10 @B(\n" + 
+					"        #11 value=(int) 5 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, TYPE_ARGUMENT(0)]\n" +
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+
+	public void test100e_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  java.util.Map.@B(2) Entry<String,String> field;\n" +
+					"}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100f_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"Foo.java",
+					"class Foo {}\n",
+					
+					"Levels.java",
+					"package one.two.three;\n" +
+					"class Level1 { static class Level2 { class Level3 { class Level4 { class Level5<T> { } } } } }\n",
+					
+					"X.java",
+					"package one.two.three;\n" +
+					"class X {\n" +
+					"  one.two.three.Level1.Level2.@B(2) Level3.Level4.@B(3) Level5<String> instance;\n" +
+					"}\n",
+
+					"B.java",
+					"package one.two.three;\n" +
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @one.two.three.B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #10 @one.two.three.B(\n" + 
+				"        #11 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE, INNER_TYPE, INNER_TYPE]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "one" + File.separator + "two" + File.separator + "three" + File.separator + "X.class", "one.two.three.X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100g_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"Foo.java",
+					"class Foo {}\n",
+					
+					"Levels.java",
+					"package one.two.three;\n" +
+					"class Level1 { static class Level2 { class Level3 { class Level4 { class Level5<T> { } } } } }\n",
+					
+					"X.java",
+					"package one.two.three;\n" +
+					"class X {\n" +
+					"  one.two.three.Level1.Level2.@B(2) Level3.Level4.@B(3) Level5<String>[][] instance;\n" +
+					"}\n",
+
+					"B.java",
+					"package one.two.three;\n" +
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @one.two.three.B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #10 @one.two.three.B(\n" + 
+				"        #11 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE, INNER_TYPE, INNER_TYPE]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "one" + File.separator + "two" + File.separator + "three" + File.separator + "X.class", "one.two.three.X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100h_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  Level1.Level2.@B(2) Level3.Level4.@B(3) Level5<String>[][] instance;\n" +
+					"}\n",
+
+					"Levels.java",
+					"class Level1 { static class Level2 { class Level3 { class Level4 { class Level5<T> { } } } } }\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE, INNER_TYPE, INNER_TYPE]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100i_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  Level1.Level2.Level3.Level4.Level5<@B(1) String>[][] instance;\n" +
+					"}\n",
+
+					"Levels.java",
+					"class Level1 { static class Level2 { class Level3 { class Level4 { class Level5<T> { } } } } }\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE, INNER_TYPE, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100j_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  Level1.Level2.Level3<@B(1) String>.Level4.Level5<@B(2) String>[][] instance;\n" +
+					"}\n",
+
+					"Levels.java",
+					"class Level1 { static class Level2 { class Level3<Q> { class Level4 { class Level5<T> { } } } } }\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE, INNER_TYPE, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test100k_pqtr() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  Level1.@B(5) Level2.Level3<@B(1) String>.Level4.Level5<@B(2) String>[][] instance;\n" +
+					"}\n",
+
+					"Levels.java",
+					"class Level1 { static class Level2 { class Level3<Q> { class Level4 { class Level5<T> { } } } } }\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 5 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY, INNER_TYPE, INNER_TYPE, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test101a_qtr() throws Exception { // QTR (QualifiedTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    com.foo.@B(2) List field2;\n" +
+					"}\n",
+					
+					"List.java",
+					"package com.foo;\n"+
+					"public class List {}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 2 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	
+	public void test101b_qtr() throws Exception { // QTR (QualifiedTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"  java.util.Map.@B(2) Entry field;\n" +
+					"}\n",
+
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @B(\n" + 
+				"        #9 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test101c_qtr() throws Exception { // QTR (QualifiedTypeReference)
+		this.runConformTest(
+				new String[] {
+					"Runner.java",
+					"public class Runner {}\n",
+					
+					"B.java",
+					"package one.two.three;\n" +
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+
+					"X.java",
+					"package one.two.three;\n" +
+					"class X {\n" +
+					"    one.two.three.Level1.Level2.@B(2) Level3.Level4.@B(3) Level5 instance;\n" +
+					"}\n",
+
+					"Level1.java",
+					"package one.two.three;\n" +
+					"public class Level1 { static class Level2 { class Level3 { class Level4 { class Level5 { } } } } }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @one.two.three.B(\n" + 
+				"        #9 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE]\n" + 
+				"      )\n" + 
+				"      #8 @one.two.three.B(\n" + 
+				"        #9 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [INNER_TYPE, INNER_TYPE, INNER_TYPE]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "one" + File.separator + "two" + File.separator + "three" + File.separator + "X.class", "one.two.three.X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test102a_str() throws Exception { // STR (SingleTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    @B(1) X field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 1 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test102b_str() throws Exception { // STR (SingleTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    @B(1) int field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 1 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test103a_atr() throws Exception { // ATR (ArrayTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    @B(1) X[] field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 1 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" +
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test103b_atr() throws Exception { // ATR (ArrayTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    X @B(2)[] field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 2 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test103c_atr() throws Exception { // ATR (ArrayTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    X []@B(3)[] field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" +
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test103d_atr() throws Exception { // ATR (ArrayTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    X []@B(3)[][] field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" +
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test103e_atr() throws Exception { // ATR (ArrayTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"    @B(1) int []@B(3)[][] field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 1 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, ARRAY]\n" +
+					"      )\n" +
+					"      #8 @B(\n" + 
+					"        #9 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" +
+					"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test104a_pstr() throws Exception { // PSTR (ParameterizedSingleTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X<T1,T2,T3> {\n" +
+					"    @B(1) X<@B(2) String, @B(3) Integer, @B(4) Boolean> field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0)]\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(1)]\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 4 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(2)]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test104b_pstr() throws Exception { // PSTR (ParameterizedSingleTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X<T1> {\n" +
+					"    @B(1) X<@B(2) String> @B(3)[] field;\n" +
+					"}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, TYPE_ARGUMENT(0)]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test105a_aqtr() throws Exception { // AQTR (ArrayQualifiedTypeReference)
+		this.runConformTest(
+				new String[] {
+					"Y.java",
+					"class Y {}",
+					
+					"X.java",
+					"package one.two.three;\n" +
+					"class X<T1> {\n" +
+					"    one.two.three.@B(1) List[] field;\n" +
+					"}\n",
+					
+					"List.java",
+					"package one.two.three;\n" +
+					"class List {}\n",
+					
+					"B.java",
+					"package one.two.three;\n" +
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @one.two.three.B(\n" + 
+				"        #9 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "one" + File.separator + "two" + File.separator + "three" + File.separator +"X.class", 
+					"one.two.three.X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test105b_aqtr() throws Exception { // AQTR (ArrayQualifiedTypeReference)
+		this.runConformTest(
+				new String[] {
+					"Y.java",
+					"class Y {}",
+					
+					"X.java",
+					"package one.two.three;\n" +
+					"class X<T1> {\n" +
+					"    one.two.three.@B(2) List @B(3)[]@B(4)[] field;\n" +
+					"}\n",
+					
+					"List.java",
+					"package one.two.three;\n" +
+					"class List {}\n",
+					
+					"B.java",
+					"package one.two.three;\n" +
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #8 @one.two.three.B(\n" + 
+				"        #9 value=(int) 2 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY, ARRAY]\n" + 
+				"      )\n" +
+				"      #8 @one.two.three.B(\n" + 
+				"        #9 value=(int) 3 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" +
+				"      #8 @one.two.three.B(\n" + 
+				"        #9 value=(int) 4 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [ARRAY]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "one" + File.separator + "two" + File.separator + "three" + File.separator +"X.class", 
+					"one.two.three.X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test106a_wtr() throws Exception { // WTR (WildcardTypeReference)
+		this.runConformTest(
+				new String[] {					
+					"X.java",
+					"import java.util.List;\n" +
+					"class X<T1> {\n" +
+					"	 List<? extends @B(1) Number> field;\n" +
+					"}\n",
+					
+					"List.java",
+					"class List {}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), WILDCARD]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator +"X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test106b_wtr() throws Exception { // WTR (WildcardTypeReference)
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"import java.util.List;\n" +
+					"class X<T1> {\n" +
+					"	 List<? extends @B(1) Number[]> field;\n" +
+					"}\n",
+					
+					"List.java",
+					"class List {}\n",
+					
+					"B.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface B { int value() default -1; }\n",
+			},
+			"");
+			String expectedOutput =
+				"    RuntimeVisibleTypeAnnotations: \n" + 
+				"      #10 @B(\n" + 
+				"        #11 value=(int) 1 (constant type)\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"        location = [TYPE_ARGUMENT(0), WILDCARD, ARRAY]\n" + 
+				"      )\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=409244, [1.8][compiler] Type annotations on redundant casts dropped.
+	public void testAnnotatedRedundantCast() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"	 String s = (@NonNull String) \"Hello\";\n" +
+					"}\n",
+					
+					"NonNull.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface NonNull {}\n",
+			},
+			"");
+			String expectedOutput =
+							"  // Method descriptor #8 ()V\n" + 
+							"  // Stack: 2, Locals: 1\n" + 
+							"  X();\n" + 
+							"     0  aload_0 [this]\n" + 
+							"     1  invokespecial java.lang.Object() [10]\n" + 
+							"     4  aload_0 [this]\n" + 
+							"     5  ldc <String \"Hello\"> [12]\n" + 
+							"     7  checkcast java.lang.String [14]\n" + 
+							"    10  putfield X.s : java.lang.String [16]\n" + 
+							"    13  return\n" + 
+							"      Line numbers:\n" + 
+							"        [pc: 0, line: 1]\n" + 
+							"        [pc: 4, line: 2]\n" + 
+							"        [pc: 13, line: 1]\n" + 
+							"      Local variable table:\n" + 
+							"        [pc: 0, pc: 14] local: this index: 0 type: X\n" + 
+							"    RuntimeVisibleTypeAnnotations: \n" + 
+							"      #23 @NonNull(\n" + 
+							"        target type = 0x47 CAST\n" + 
+							"        offset = 7\n" + 
+							"        type argument index = 0\n" + 
+							"      )\n" + 
+							"}";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=409244, [1.8][compiler] Type annotations on redundant casts dropped.
+	public void testAnnotatedRedundantCast2() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"class X {\n" +
+					"	 String s = (String) \"Hello\";\n" +
+					"}\n",
+					
+					"NonNull.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface NonNull {}\n",
+			},
+			"");
+			String expectedOutput =
+							"  // Method descriptor #8 ()V\n" + 
+							"  // Stack: 2, Locals: 1\n" + 
+							"  X();\n" + 
+							"     0  aload_0 [this]\n" + 
+							"     1  invokespecial java.lang.Object() [10]\n" + 
+							"     4  aload_0 [this]\n" + 
+							"     5  ldc <String \"Hello\"> [12]\n" + 
+							"     7  putfield X.s : java.lang.String [14]\n" + 
+							"    10  return\n" + 
+							"      Line numbers:\n" + 
+							"        [pc: 0, line: 1]\n" + 
+							"        [pc: 4, line: 2]\n" + 
+							"        [pc: 10, line: 1]\n" + 
+							"      Local variable table:\n" + 
+							"        [pc: 0, pc: 11] local: this index: 0 type: X\n" + 
+							"}";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test055a_codeblocks_exceptionParameterNestedType() throws Exception {
+ 		this.runConformTest(
+ 			new String[] {
+ 				"X.java",
+ 				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"         foo();\n" +
+				"		} catch(@B(1) Outer.@B(2) MyException e) {\n" + 
+				"			e.printStackTrace();\n" + 
+ 				"		}\n" + 
+ 				"	}\n" + 
+				"   static void foo() throws Outer.MyException {}\n" +
+				"}\n" +
+				"class Outer {\n" +
+				"	class MyException extends Exception {\n" +
+				"		private static final long serialVersionUID = 1L;\n" +
+				"	}\n" +
+ 				"}",
+ 				
+				"B.java",
+ 				"import java.lang.annotation.*;\n" + 
+ 				"@Target(ElementType.TYPE_USE)\n" + 
+ 				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 0;\n" + 
+ 				"}\n",
+ 		},
+ 		"");
+ 		String expectedOutput =
+ 			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #30 @B(\n" + 
+			"        #31 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #30 @B(\n" + 
+			"        #31 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"        location = [INNER_TYPE]\n" + 
+			"      )\n" + 
+			"  \n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+ 	}
+
+	public void test055b_codeblocks_exceptionParameterMultiCatchNestedType() throws Exception {
+ 		this.runConformTest(
+ 			new String[] {
+ 				"X.java",
+ 				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"         foo();\n" +
+				"		} catch(@B(1) Outer.@B(2) MyException | @B(3) Outer2.@B(4) MyException2 e) {\n" + 
+				"			e.printStackTrace();\n" + 
+				"		}\n" + 
+ 				"	}\n" + 
+				"   static void foo() throws Outer.MyException, Outer2.MyException2 {}\n" +
+				"}\n" +
+				"class Outer {\n" +
+				"	class MyException extends Exception {\n" +
+				"		private static final long serialVersionUID = 1L;\n" +
+				"	}\n" +
+				"}\n" +
+				"class Outer2 {\n" +
+				"	class MyException2 extends Exception {\n" +
+				"		private static final long serialVersionUID = 1L;\n" +
+				"	}\n" +
+ 				"}",
+ 				"B.java",
+ 				"import java.lang.annotation.*;\n" + 
+ 				"@Target(ElementType.TYPE_USE)\n" + 
+ 				"@Retention(RetentionPolicy.RUNTIME)\n" + 
+ 				"@interface B {\n" + 
+				"	int value() default 0;\n" + 
+				"}\n",
+ 		},
+ 		"");
+ 		String expectedOutput =
+ 			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #34 @B(\n" + 
+			"        #35 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #34 @B(\n" + 
+			"        #35 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"        location = [INNER_TYPE]\n" + 
+			"      )\n" + 
+			"      #34 @B(\n" + 
+			"        #35 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 1\n" + 
+			"      )\n" + 
+			"      #34 @B(\n" +
+			"        #35 value=(int) 4 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 1\n" + 
+			"        location = [INNER_TYPE]\n" + 
+ 			"      )\n";
+ 		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+ 	}
+ 	
+	public void test055c_codeblocks_exceptionParameterMultiCatch() throws Exception {
+ 		this.runConformTest(
+ 			new String[] {
+ 				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"class Exc1 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc2 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc3 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+ 				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"			System.out.println(42);\n" +
+				"		} catch(Exc1 | @B(1) Exc2 | @B(2) Exc3 t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+ 				"	}\n" + 
+ 				"}",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+ 		},
+		"42");
+ 		String expectedOutput =
+ 			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #45 @B(\n" + 
+			"        #46 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 1\n" + 
+			"      )\n" + 
+			"      #45 @B(\n" + 
+			"        #46 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 2\n" + 
+ 			"      )\n";
+ 		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+ 	}
+ 
+	public void test055d_codeblocks_exceptionParameterMultiCatch() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"class Exc1 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc2 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc3 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"			System.out.println(42);\n" +
+				"		} catch(@A(1) @B(2) Exc1 | Exc2 | @A(3) @B(4) Exc3 t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+				
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"42");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #45 @A(\n" + 
+			"        #46 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #48 @B(\n" + 
+			"        #46 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #45 @A(\n" + 
+			"        #46 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 2\n" + 
+			"      )\n" + 
+			"      #48 @B(\n" + 
+			"        #46 value=(int) 4 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 2\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test055e_codeblocks_exceptionParameterMultiCatch() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"class Exc1 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc2 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc3 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"			System.out.println(42);\n" +
+				"		} catch(@A(1) @B(2) Exc1 | Exc2 | @A(3) @B(4) Exc3 t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				
+				"A.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface A {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+				
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"42");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #45 @A(\n" + 
+			"        #46 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #48 @B(\n" + 
+			"        #46 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #45 @A(\n" + 
+			"        #46 value=(int) 3 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 2\n" + 
+			"      )\n" + 
+			"      #48 @B(\n" + 
+			"        #46 value=(int) 4 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 2\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	
+	public void test055f_codeblocks_exceptionParameterComplex() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"class Exc1 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc2 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"class Exc3 extends RuntimeException {" +				
+				"    private static final long serialVersionUID = 1L;\n" +
+				"}\n"+
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		try {\n" + 
+				"			System.out.println(42);\n" +
+				"		} catch(@B(1) Exc1 | Exc2 | @B(2) Exc3 t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+				"		try {\n" + 
+				"			System.out.println(43);\n" +
+				"		} catch(@B(1) Exc1 t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+				"		try {\n" + 
+				"			System.out.println(44);\n" +
+				"		} catch(@B(1) Exc1 | @B(2) Exc2 t) {\n" + 
+				"			t.printStackTrace();\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				"B.java",
+				"import java.lang.annotation.Target;\n" + 
+				"import static java.lang.annotation.ElementType.*;\n" + 
+				"import java.lang.annotation.Retention;\n" + 
+				"import static java.lang.annotation.RetentionPolicy.*;\n" + 
+				"@Target(TYPE_USE)\n" + 
+				"@Retention(RUNTIME)\n" + 
+				"@interface B {\n" + 
+				"	int value() default 99;\n" + 
+				"}\n",
+		},
+		"42\n43\n44");
+		String expectedOutput =
+			"    RuntimeVisibleTypeAnnotations: \n" + 
+			"      #47 @B(\n" + 
+			"        #48 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 0\n" + 
+			"      )\n" + 
+			"      #47 @B(\n" + 
+			"        #48 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 2\n" + 
+			"      )\n" + 
+			"      #47 @B(\n" + 
+			"        #48 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 3\n" + 
+			"      )\n" + 
+			"      #47 @B(\n" + 
+			"        #48 value=(int) 1 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 4\n" + 
+			"      )\n" + 
+			"      #47 @B(\n" + 
+			"        #48 value=(int) 2 (constant type)\n" + 
+			"        target type = 0x42 EXCEPTION_PARAMETER\n" + 
+			"        exception table index = 5\n" + 
+			"      )\n";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	public void testBug415911() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" + 
+				"import java.lang.annotation.Target;\n" + 
+				"\n" + 
+				"@Target(ElementType.TYPE_USE)\n" + 
+				"@interface Marker {\n" + 
+				"}\n" + 
+				"\n" + 
+				"public class X {\n" + 
+				"    @Marker\n" + 
+				"    foo(String s) {\n" + 
+				"\n" + 
+				"    }\n" + 
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 10)\n" + 
+			"	foo(String s) {\n" + 
+			"	^^^^^^^^^^^^^\n" + 
+			"Return type for the method is missing\n" + 
+			"----------\n");
+	}
+
+	public void testTypeVariable() {
+		runNegativeTest(
+			new String[] {
+				"X.java",
+				"public class X<@Missing T> {\n" +
+				"}\n"
+			},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 1)\n" + 
+			"	public class X<@Missing T> {\n" + 
+			"	                ^^^^^^^\n" + 
+			"Missing cannot be resolved to a type\n" + 
+			"----------\n");
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=417660, [1.8][compiler] Incorrect parsing of Annotations with array dimensions in arguments
+	public void test417660() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.Documented;\n" +
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Retention;\n" +
+					"import java.lang.annotation.RetentionPolicy;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"public class X {\n" +
+					"  int bar(int [] @TakeType(int[].class)[] x) { \n" +
+					"	  return x[0][0]; \n" +
+					"  } \n" +
+					"  public static void main(String[] args) {\n" +
+					"	System.out.println(new X().bar(new int [][] { { 1234 }}));\n" +
+					"  }\n" +
+					"}\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@Retention(RetentionPolicy.RUNTIME)\n" +
+					"@Documented\n" +
+					"@interface TakeType {\n" +
+					"	Class value() default int[].class;\n" +
+					"}\n"
+				},
+				"1234");
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=417660, [1.8][compiler] Incorrect parsing of Annotations with array dimensions in arguments
+	public void test417660b() {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"import java.lang.annotation.Documented;\n" +
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Retention;\n" +
+					"import java.lang.annotation.RetentionPolicy;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"public class X {\n" +
+					"  int bar(int [][] @TakeType(int[].class)[][] x @TakeType(int[].class)[]) { \n" +
+					"	  return x[0][0][0][0][0]; \n" +
+					"  } \n" +
+					"  public static void main(String[] args) {\n" +
+					"	System.out.println(new X().bar(new int [][][][][] { { { { { 1234 } } } } }));\n" +
+					"  }\n" +
+					"}\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"@Retention(RetentionPolicy.RUNTIME)\n" +
+					"@Documented\n" +
+					"@interface TakeType {\n" +
+					"	Class value() default int[].class;\n" +
+					"}\n"
+				},
+				"1234");
+	}
+	
+	public void testAnnotatedExtendedDimensions() throws Exception {
+		this.runConformTest(
+				new String[] {
+					"X.java",
+					"public class X {\n" +
+					"	@NonNull String @Nullable [] f @NonNull [] = null;\n" +
+					"	static @NonNull String @Nullable [] foo(@NonNull String @Nullable [] p @NonNull []) @NonNull [] {\n" +
+					"		p = null;\n" +
+					"		@NonNull String @Nullable [] l @NonNull [] = null;\n" +
+					"       return p;\n" +
+					"	}\n" +
+					"}\n",
+					
+					"NonNull.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface NonNull {}\n",
+					
+					"Nullable.java",
+					"import java.lang.annotation.*;\n" + 
+					"@Target(ElementType.TYPE_USE)\n" + 
+					"@Retention(RetentionPolicy.RUNTIME)\n" + 
+					"@interface Nullable {}\n",
+			},
+			"");
+			String expectedOutput =
+					"  // Field descriptor #6 [[Ljava/lang/String;\n" + 
+					"  java.lang.String[][] f;\n" + 
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY]\n" + 
+					"      )\n" + 
+					"      #9 @Nullable(\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n" + 
+					"  \n" + 
+					"  // Method descriptor #11 ()V\n" + 
+					"  // Stack: 2, Locals: 1\n" + 
+					"  public X();\n" + 
+					"     0  aload_0 [this]\n" + 
+					"     1  invokespecial java.lang.Object() [13]\n" + 
+					"     4  aload_0 [this]\n" + 
+					"     5  aconst_null\n" + 
+					"     6  putfield X.f : java.lang.String[][] [15]\n" + 
+					"     9  return\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 1]\n" + 
+					"        [pc: 4, line: 2]\n" + 
+					"        [pc: 9, line: 1]\n" + 
+					"      Local variable table:\n" + 
+					"        [pc: 0, pc: 10] local: this index: 0 type: X\n" + 
+					"  \n" + 
+					"  // Method descriptor #22 ([[Ljava/lang/String;)[[Ljava/lang/String;\n" + 
+					"  // Stack: 1, Locals: 2\n" + 
+					"  static java.lang.String[][] foo(java.lang.String[][] p);\n" + 
+					"    0  aconst_null\n" + 
+					"    1  astore_0 [p]\n" + 
+					"    2  aconst_null\n" + 
+					"    3  astore_1 [l]\n" + 
+					"    4  aload_0 [p]\n" + 
+					"    5  areturn\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 4]\n" + 
+					"        [pc: 2, line: 5]\n" + 
+					"        [pc: 4, line: 6]\n" + 
+					"      Local variable table:\n" + 
+					"        [pc: 0, pc: 6] local: p index: 0 type: java.lang.String[][]\n" + 
+					"        [pc: 4, pc: 6] local: l index: 1 type: java.lang.String[][]\n" + 
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x40 LOCAL_VARIABLE\n" + 
+					"        local variable entries:\n" + 
+					"          [pc: 4, pc: 6] index: 1\n" + 
+					"        location = [ARRAY, ARRAY]\n" + 
+					"      )\n" + 
+					"      #9 @Nullable(\n" + 
+					"        target type = 0x40 LOCAL_VARIABLE\n" + 
+					"        local variable entries:\n" + 
+					"          [pc: 4, pc: 6] index: 1\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x40 LOCAL_VARIABLE\n" + 
+					"        local variable entries:\n" + 
+					"          [pc: 4, pc: 6] index: 1\n" + 
+					"      )\n" + 
+					"    RuntimeVisibleTypeAnnotations: \n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+					"        method parameter index = 0\n" + 
+					"        location = [ARRAY, ARRAY]\n" + 
+					"      )\n" + 
+					"      #9 @Nullable(\n" + 
+					"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+					"        method parameter index = 0\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+					"        method parameter index = 0\n" + 
+					"      )\n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x14 METHOD_RETURN\n" + 
+					"        location = [ARRAY, ARRAY]\n" + 
+					"      )\n" + 
+					"      #9 @Nullable(\n" + 
+					"        target type = 0x14 METHOD_RETURN\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"      #8 @NonNull(\n" + 
+					"        target type = 0x14 METHOD_RETURN\n" + 
+					"      )\n" + 
+					"}";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418347,  [1.8][compiler] Type annotations dropped during code generation.
+	public void testPQTRArray() throws Exception {
+		this.runConformTest(
+				new String[] {
+						"Outer.java",
+						"public class Outer<K>  {\n" +
+						"	class Inner<P> {\n" +
+						"	}\n" +
+						"	public @T(1) Outer<@T(2) String>.@T(3) Inner<@T(4) Integer> @T(5) [] omi @T(6) [];\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface T {\n" +
+						"	int value();\n" +
+						"}\n",
+			},
+			"");
+			String expectedOutput =
+					"  public Outer$Inner[][] omi;\n" + 
+					"    RuntimeInvisibleTypeAnnotations: \n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 1 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, INNER_TYPE]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 5 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 6 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 2 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, TYPE_ARGUMENT(0)]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 4 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+					"      )\n" + 
+					"  \n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "Outer.class", "Outer", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418347,  [1.8][compiler] Type annotations dropped during code generation.
+	public void testPQTRArray2() throws Exception {
+		this.runConformTest(
+				new String[] {
+						"Outer.java",
+						"public class Outer<K1, K2>  {\n" +
+						"	class Inner<P1, P2> {\n" +
+						"	}\n" +
+						"	public @T(1) Outer<@T(2) String, @T(3) Inner>.@T(4) Inner<@T(5) Integer, @T(6) Outer.@T(7) Inner> @T(7) [] omi @T(8) [];\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface T {\n" +
+						"	int value();\n" +
+						"}\n",
+			},
+			"");
+			String expectedOutput =
+					"  // Field descriptor #6 [[LOuter$Inner;\n" + 
+					"  // Signature: [[LOuter<Ljava/lang/String;LOuter$Inner;>.Inner<Ljava/lang/Integer;LOuter$Inner;>;\n" + 
+					"  public Outer$Inner[][] omi;\n" + 
+					"    RuntimeInvisibleTypeAnnotations: \n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 1 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 4 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, INNER_TYPE]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 7 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 8 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 2 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, TYPE_ARGUMENT(0)]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 3 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, TYPE_ARGUMENT(1), INNER_TYPE]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 5 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, INNER_TYPE, TYPE_ARGUMENT(0)]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 6 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, INNER_TYPE, TYPE_ARGUMENT(1)]\n" + 
+					"      )\n" + 
+					"      #10 @T(\n" + 
+					"        #11 value=(int) 7 (constant type)\n" + 
+					"        target type = 0x13 FIELD\n" + 
+					"        location = [ARRAY, ARRAY, INNER_TYPE, TYPE_ARGUMENT(1), INNER_TYPE]\n" + 
+					"      )\n" + 
+					"  \n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "Outer.class", "Outer", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418347,  [1.8][compiler] Type annotations dropped during code generation.
+	public void testConstructorResult() throws Exception {
+		this.runConformTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface T {\n" +
+						"}\n" +
+						"public class X {\n" +
+						"	@T X() {}\n" +
+						"	class Y {\n" +
+						"	 @T Y () {\n" +
+						"	}\n" +
+						"	}\n" +
+						"}\n",
+			},
+			"");
+			String expectedOutput =
+					"  // Method descriptor #6 ()V\n" + 
+					"  // Stack: 1, Locals: 1\n" + 
+					"  X();\n" + 
+					"    0  aload_0 [this]\n" + 
+					"    1  invokespecial java.lang.Object() [8]\n" + 
+					"    4  return\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 7]\n" + 
+					"      Local variable table:\n" + 
+					"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+					"    RuntimeInvisibleTypeAnnotations: \n" + 
+					"      #15 @T(\n" + 
+					"        target type = 0x14 METHOD_RETURN\n" + 
+					"      )\n" + 
+					"\n";
+			String expectedOutForY = 
+					"  // Method descriptor #8 (LX;)V\n" + 
+					"  // Stack: 2, Locals: 2\n" + 
+					"  X$Y(X arg0);\n" + 
+					"     0  aload_0 [this]\n" + 
+					"     1  aload_1 [arg0]\n" + 
+					"     2  putfield X$Y.this$0 : X [10]\n" + 
+					"     5  aload_0 [this]\n" + 
+					"     6  invokespecial java.lang.Object() [12]\n" + 
+					"     9  return\n" + 
+					"      Line numbers:\n" + 
+					"        [pc: 0, line: 9]\n" + 
+					"        [pc: 9, line: 10]\n" + 
+					"      Local variable table:\n" + 
+					"        [pc: 0, pc: 10] local: this index: 0 type: X.Y\n" + 
+					"    RuntimeInvisibleTypeAnnotations: \n" + 
+					"      #20 @T(\n" + 
+					"        target type = 0x14 METHOD_RETURN\n" + 
+					"      )\n" + 
+					"\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X$Y.class", "Y", expectedOutForY, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418347,  [1.8][compiler] Type annotations dropped during code generation.
+	public void test418347() throws Exception {
+		this.runConformTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.*;\n" +
+						"import static java.lang.annotation.ElementType.*;\n" +
+						"@Target({TYPE_USE}) @interface P { }\n" +
+						"@Target({TYPE_USE}) @interface O { }\n" +
+						"@Target({TYPE_USE}) @interface I { }\n" +
+						"public abstract class X<T> {\n" +
+						"	class Y<Q> {\n" +
+						"	}\n" +
+						"	void foo(@P Y<P> p) {}\n" +
+						"}\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeInvisibleTypeAnnotations: \n" + 
+					"      #24 @P(\n" + 
+					"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+					"        method parameter index = 0\n" + 
+					"        location = [INNER_TYPE]\n" + 
+					"      )\n" + 
+					"\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418347,  [1.8][compiler] Type annotations dropped during code generation.
+	public void test418347a() throws Exception {
+		this.runConformTest(
+				new String[] {
+						"X.java",
+						"import java.lang.annotation.*;\n" +
+						"import static java.lang.annotation.ElementType.*;\n" +
+						"@Target({TYPE_USE}) @interface P { }\n" +
+						"@Target({TYPE_USE}) @interface O { }\n" +
+						"@Target({TYPE_USE}) @interface I { }\n" +
+						"public abstract class X {\n" +
+						"	class Y {\n" +
+						"		class Z {}\n" +
+						"	}\n" +
+						"	void foo(@P X.@O Y.@I Z[] p) {}\n" +
+						"}\n",
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeInvisibleTypeAnnotations: \n" + 
+					"      #19 @P(\n" + 
+					"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+					"        method parameter index = 0\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"      #20 @O(\n" + 
+					"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+					"        method parameter index = 0\n" + 
+					"        location = [ARRAY, INNER_TYPE]\n" + 
+					"      )\n" + 
+					"      #21 @I(\n" + 
+					"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+					"        method parameter index = 0\n" + 
+					"        location = [ARRAY, INNER_TYPE, INNER_TYPE]\n" + 
+					"      )\n" + 
+					"\n";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418347,  [1.8][compiler] Type annotations dropped during code generation.
+	public void test418347b() throws Exception {
+		this.runConformTest(
+			new String[] {
+					"X.java",
+					"public abstract class X {\n" +
+					"	java.util.List [][] l = new java.util.ArrayList @pkg.NonNull [0] @pkg.NonNull[];     \n" +
+					"}\n",
+					"pkg/NonNull.java",
+					"package pkg;\n" +
+					"import java.lang.annotation.ElementType;\n" +
+					"import java.lang.annotation.Target;\n" +
+					"@Target(ElementType.TYPE_USE)\n" +
+					"public @interface NonNull {\n" +
+					"}\n"
+			},
+			"");
+			String expectedOutput =
+					"    RuntimeInvisibleTypeAnnotations: \n" + 
+					"      #21 @pkg.NonNull(\n" + 
+					"        target type = 0x44 NEW\n" + 
+					"        offset = 6\n" + 
+					"      )\n" + 
+					"      #21 @pkg.NonNull(\n" + 
+					"        target type = 0x44 NEW\n" + 
+					"        offset = 6\n" + 
+					"        location = [ARRAY]\n" + 
+					"      )\n" + 
+					"}";
+			checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=419331, [1.8][compiler] Weird error on forward reference to type annotations from type parameter declarations
+	// ENCODES WRONG BEHAVIOR - FIX TEST ALONG WITH FIX
+	public void testForwardReference() {
+		this.runNegativeTest(
+			new String[] {
+				"T.java",
+				"import java.lang.annotation.Annotation;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"\n" +
+				"@R(TC.class)\n" +
+				"@Target(ElementType.TYPE_PARAMETER)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"\n" +
+				"interface I<@T K> {\n" +
+				"}\n" +
+				"\n" +
+				"@Deprecated\n" +
+				"@interface TC {\n" +
+				"\n" +
+				"}\n" +
+				"\n" +
+				"@Target(ElementType.ANNOTATION_TYPE)\n" +
+				"@interface R {\n" +
+				"    Class<? extends Annotation> value();\n" +
+				"}\n",
+			},
+			"");
+	}
+	public void testHybridTargets() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target({ElementType.TYPE_USE, ElementType.PACKAGE})\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"@T\n" +
+				"public class X {\n" +
+				"    @T\n" +
+				"    X() {}\n" +
+				"    @T String x;\n" +
+				"    @T \n" +
+				"	int foo(@T int p) { \n" +
+				"      @T int l;\n" +
+				"	   return 0;\n" +
+				"   }\n" +
+				"}\n",
+			},
+			"");
+		String expectedOutput =
+				"  // Field descriptor #6 Ljava/lang/String;\n" + 
+				"  java.lang.String x;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @T(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #10 ()V\n" + 
+				"  // Stack: 1, Locals: 1\n" + 
+				"  X();\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [12]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 9]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @T(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #19 (I)I\n" + 
+				"  // Stack: 1, Locals: 2\n" + 
+				"  int foo(int p);\n" + 
+				"    0  iconst_0\n" + 
+				"    1  ireturn\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 14]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 2] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 2] local: p index: 1 type: int\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @T(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #8 @T(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"      )\n" + 
+				"\n" + 
+				"  RuntimeInvisibleAnnotations: \n" + 
+				"    #8 @T(\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void testHybridTargets2() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.Target;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"@Target({ ElementType.TYPE_USE, ElementType.METHOD })\n" +
+				"@interface SillyAnnotation {  }\n" +
+				"public class X {\n" +
+				"   @SillyAnnotation\n" +
+				"   X(@SillyAnnotation int x) {\n" +
+				"   }\n" +
+				"	@SillyAnnotation\n" +
+				"	void foo(@SillyAnnotation int x) {\n" +
+				"	}\n" +
+				"	@SillyAnnotation\n" +
+				"	String goo(@SillyAnnotation int x) {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"	@SillyAnnotation\n" +
+				"	X field;\n" +
+				"}\n"
+			},
+			"");
+		String expectedOutput =
+				"  // Field descriptor #6 LX;\n" + 
+				"  X field;\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"        target type = 0x13 FIELD\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #10 (I)V\n" + 
+				"  // Stack: 1, Locals: 2\n" + 
+				"  X(int x);\n" + 
+				"    0  aload_0 [this]\n" + 
+				"    1  invokespecial java.lang.Object() [12]\n" + 
+				"    4  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 7]\n" + 
+				"        [pc: 4, line: 8]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 5] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 5] local: x index: 1 type: int\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #10 (I)V\n" + 
+				"  // Stack: 0, Locals: 2\n" + 
+				"  void foo(int x);\n" + 
+				"    0  return\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 11]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 1] local: x index: 1 type: int\n" + 
+				"    RuntimeInvisibleAnnotations: \n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"      )\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"  \n" + 
+				"  // Method descriptor #23 (I)Ljava/lang/String;\n" + 
+				"  // Stack: 1, Locals: 2\n" + 
+				"  java.lang.String goo(int x);\n" + 
+				"    0  aconst_null\n" + 
+				"    1  areturn\n" + 
+				"      Line numbers:\n" + 
+				"        [pc: 0, line: 14]\n" + 
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 2] local: this index: 0 type: X\n" + 
+				"        [pc: 0, pc: 2] local: x index: 1 type: int\n" + 
+				"    RuntimeInvisibleAnnotations: \n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"      )\n" + 
+				"    RuntimeInvisibleTypeAnnotations: \n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"        target type = 0x16 METHOD_FORMAL_PARAMETER\n" + 
+				"        method parameter index = 0\n" + 
+				"      )\n" + 
+				"      #8 @SillyAnnotation(\n" + 
+				"        target type = 0x14 METHOD_RETURN\n" + 
+				"      )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}
+	public void testDeprecated() throws Exception {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Deprecated\n" +		
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface X {\n" +
+				"	int value() default 0;\n" +
+				"}\n"
+			},
+			"");
+		String expectedOutput =
+				"// Compiled from X.java (version 1.8 : 52.0, no super bit, deprecated)\n" + 
+				"abstract @interface X extends java.lang.annotation.Annotation {\n" + 
+				"  Constant pool:\n" + 
+				"    constant #1 class: #2 X\n" + 
+				"    constant #2 utf8: \"X\"\n" + 
+				"    constant #3 class: #4 java/lang/Object\n" + 
+				"    constant #4 utf8: \"java/lang/Object\"\n" + 
+				"    constant #5 class: #6 java/lang/annotation/Annotation\n" + 
+				"    constant #6 utf8: \"java/lang/annotation/Annotation\"\n" + 
+				"    constant #7 utf8: \"value\"\n" + 
+				"    constant #8 utf8: \"()I\"\n" + 
+				"    constant #9 utf8: \"AnnotationDefault\"\n" + 
+				"    constant #10 integer: 0\n" + 
+				"    constant #11 utf8: \"SourceFile\"\n" + 
+				"    constant #12 utf8: \"X.java\"\n" + 
+				"    constant #13 utf8: \"Deprecated\"\n" + 
+				"    constant #14 utf8: \"RuntimeVisibleAnnotations\"\n" + 
+				"    constant #15 utf8: \"Ljava/lang/Deprecated;\"\n" + 
+				"    constant #16 utf8: \"Ljava/lang/annotation/Target;\"\n" + 
+				"    constant #17 utf8: \"Ljava/lang/annotation/ElementType;\"\n" + 
+				"    constant #18 utf8: \"TYPE_USE\"\n" + 
+				"  \n" + 
+				"  // Method descriptor #8 ()I\n" + 
+				"  public abstract int value();\n" + 
+				"    Annotation Default: \n" + 
+				"      (int) 0 (constant type)\n" + 
+				"\n" + 
+				"  RuntimeVisibleAnnotations: \n" + 
+				"    #15 @java.lang.Deprecated(\n" + 
+				"    )\n" + 
+				"    #16 @java.lang.annotation.Target(\n" + 
+				"      #7 value=[\n" + 
+				"        java.lang.annotation.ElementType.TYPE_USE(enum type #17.#18)\n" + 
+				"        ]\n" + 
+				"    )\n" + 
+				"}";
+		checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM);
+	}	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=421148, [1.8][compiler] Verify error with annotated casts and unused locals. 
+	public void test421148() {
+		
+		Map customOptions = getCompilerOptions();
+		customOptions.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.OPTIMIZE_OUT);
+		runConformTest(
+			new String[] {
+				"X.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.TYPE_USE) @interface T {}\n" +
+				"public class X {\n" +
+				"	public static void main(String argv[]) {\n" +
+				"		Object o = (@T Object) new Object();    \n" +
+				"       System.out.println(\"OK\");\n" +
+				"	}\n" +
+				"}\n"
+			}, 
+			"OK",
+			customOptions);		
+	}		
+}
+
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
index e2752d0..9a65761 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/VarargsTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -2478,6 +2482,7 @@
 					"        public void remove() {\n" +
 					"            throw new UnsupportedOperationException();\n" +
 					"        }\n" +
+					ITERATOR_IMPL_JRE8.replaceAll("\\*", "T") +
 					"    }\n" +
 					"    public static void main(String[] args) {\n" +
 					"        new IteratorChain<Number>(null, null);\n" +
@@ -2486,7 +2491,7 @@
 				},
 				this.complianceLevel < ClassFileConstants.JDK1_7 ?
 				"----------\n" + 
-				"1. WARNING in X.java (at line 18)\n" + 
+				"1. WARNING in X.java (at line 20)\n" + 
 				"	new IteratorChain<Number>(null, null);\n" + 
 				"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
 				"Type safety: A generic array of Collection<? extends Number> is created for a varargs parameter\n" + 
@@ -2497,7 +2502,7 @@
 				"	                                                                                                       ^^^^^^^^^^^\n" + 
 				"Type safety: Potential heap pollution via varargs parameter collections\n" + 
 				"----------\n" + 
-				"2. WARNING in X.java (at line 18)\n" + 
+				"2. WARNING in X.java (at line 20)\n" + 
 				"	new IteratorChain<Number>(null, null);\n" + 
 				"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
 				"Type safety: A generic array of Collection<? extends Number> is created for a varargs parameter\n" + 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java
index b1cec88..bf7a1dc 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/dom/StandAloneASTParserTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * Copyright (c) 2010, 2013 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,12 +45,8 @@
 	public StandAloneASTParserTest(String name) {
 		super(name);
 	}
-	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
-	 * to alleviate deprecation warnings.
-	 * @deprecated
-	 */
-	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+	
+	private static final int JLS_LATEST = AST.JLS8;
 
 	public ASTNode runConversion(
 			int astLevel,
@@ -80,7 +76,7 @@
 				"		System.out.println(length);\n" + 
 				"	}\n" + 
 				"}";
-		ASTNode node = runConversion(JLS3_INTERNAL, contents, true, true, true, "p/X.java");
+		ASTNode node = runConversion(JLS_LATEST, contents, true, true, true, "p/X.java");
 		assertTrue("Should be a compilation unit", node instanceof CompilationUnit);
 		CompilationUnit unit = (CompilationUnit) node;
 		List types = unit.types();
@@ -113,7 +109,7 @@
 	}
 
 	public void test2() {
-		ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
+		ASTParser parser = ASTParser.newParser(JLS_LATEST);
 		parser.setEnvironment(null, null, null, true);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
@@ -142,7 +138,7 @@
 
 	public void test3() throws IOException {
 		File rootDir = new File(System.getProperty("java.io.tmpdir"));
-		ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
+		ASTParser parser = ASTParser.newParser(JLS_LATEST);
 		parser.setEnvironment(null, null, null, true);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
@@ -232,7 +228,7 @@
 	}
 
 	public void test4() {
-		ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
+		ASTParser parser = ASTParser.newParser(JLS_LATEST);
 		try {
 			parser.setEnvironment(null, null, new String[] {"UTF-8"}, true);
 			assertTrue("Should have failed", false);
@@ -242,7 +238,7 @@
 	}
 
 	public void test5() {
-		ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
+		ASTParser parser = ASTParser.newParser(JLS_LATEST);
 		try {
 			parser.setEnvironment(null, new String[] {}, new String[] {"UTF-8"}, true);
 			assertTrue("Should have failed", false);
@@ -253,7 +249,7 @@
 
 	public void test6() throws IOException {
 		File rootDir = new File(System.getProperty("java.io.tmpdir"));
-		ASTParser parser = ASTParser.newParser(JLS3_INTERNAL);
+		ASTParser parser = ASTParser.newParser(JLS_LATEST);
 		parser.setEnvironment(null, null, null, true);
 		parser.setResolveBindings(true);
 		parser.setStatementsRecovery(true);
@@ -397,7 +393,7 @@
 		}
 
 		try {
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(JLS_LATEST);
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
 			parser.setCompilerOptions(JavaCore.getOptions());
 			parser.createASTs(
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java
index 7886745..e9912b2 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/eval/NegativeCodeSnippetTest.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -152,12 +156,7 @@
 		evaluateWithExpectedImportProblem(buildCharArray(new String[] {
 			"new File(\"c:\\temp\")"}),
 			"{".toCharArray(),
-//{ObjectTeams: our grammar yields a slightly different error:
-/* orig:			
-			newProblem(IProblem.ParsingError, Error, 0, 0, 1)); // Syntax error on token "{", "Identifier" expected
-  :giro */			
 			newProblem(IProblem.ParsingErrorInvalidToken, Error, 0, 0, 1)); // Syntax error on token "{", "Identifier" expected
-// SH}		
 	} finally {
 		// Clean up
 		this.context.setImports(new char[0][]);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java
index eeffbcc..7b655f9 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/junit/extension/TestCase.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,24 +10,36 @@
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.junit.extension;
 
-import java.io.*;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
 import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.text.DateFormat;
 import java.text.NumberFormat;
-import java.util.*;
-
-import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.tests.util.Util;
-import org.eclipse.jdt.internal.compiler.batch.Main;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceTestCase;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Random;
+import java.util.Set;
+import java.util.StringTokenizer;
 
 import junit.framework.AssertionFailedError;
 import junit.framework.ComparisonFailure;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.eclipse.jdt.core.Flags;
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.compiler.batch.Main;
+import org.eclipse.test.internal.performance.PerformanceMeterFactory;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceTestCase;
+
 public class TestCase extends PerformanceTestCase {
 
 	// Filters
@@ -845,6 +857,21 @@
 	return buffer.toString();
 }
 
+/**
+ * This method is called by the Eclipse JUnit test runner when a test is re-run from the
+ * JUnit view's context menu (with "Keep JUnit running after a test run when debugging")
+ * enabled in the launch configuration).
+ */
+public static Test setUpTest(Test test) throws Exception {
+	// reset the PerformanceMeterFactory, so that the same scenario can be run again:
+	Field field = PerformanceMeterFactory.class.getDeclaredField("fScenarios");
+	field.setAccessible(true);
+	Set set = (Set) field.get(null);
+	set.clear();
+	
+	return test;
+}
+
 public void startMeasuring() {
 	// make it public to avoid compiler warning about synthetic access
 	super.startMeasuring();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
index 0678867..bae9601 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/AbstractCompilerTest.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -36,6 +40,7 @@
 	public static final int F_1_5 = 0x04;
 	public static final int F_1_6 = 0x08;
 	public static final int F_1_7 = 0x10;
+	public static final int F_1_8 = 0x20;
 
 	public static final boolean RUN_JAVAC = CompilerOptions.ENABLED.equals(System.getProperty("run.javac"));
 	private static final int UNINITIALIZED = -1;
@@ -74,6 +79,9 @@
 		if ((complianceLevels & AbstractCompilerTest.F_1_7) != 0) {
 			suite.addTest(buildUniqueComplianceTestSuite(evaluationTestClass, ClassFileConstants.JDK1_7));
 		}
+		if ((complianceLevels & AbstractCompilerTest.F_1_8) != 0) {
+			suite.addTest(buildUniqueComplianceTestSuite(evaluationTestClass, ClassFileConstants.JDK1_8));
+		}
 	}
 
 	/**
@@ -104,9 +112,16 @@
 		if ((complianceLevels & AbstractCompilerTest.F_1_7) != 0) {
 			suite.addTest(buildComplianceTestSuite(testClasses, setupClass, ClassFileConstants.JDK1_7));
 		}
+		if ((complianceLevels & AbstractCompilerTest.F_1_8) != 0) {
+			suite.addTest(buildComplianceTestSuite(testClasses, setupClass, ClassFileConstants.JDK1_8));
+		}
 		return suite;
 	}
 
+	 public static void setpossibleComplianceLevels(int complianceLevel) {
+         possibleComplianceLevels = complianceLevel;
+	 }
+
 	/**
 	 * Build a test suite for a compliance and a list of test suites.
 	 * Returned test suite has only one child: {@link RegressionTestSetup} test suite.
@@ -215,6 +230,14 @@
 				suite.addTest(buildUniqueComplianceTestSuite(evaluationTestClass, ClassFileConstants.JDK1_7));
 			}
 		}
+		int level18 = complianceLevels & AbstractCompilerTest.F_1_8;
+		if (level18 != 0) {
+			if (level18 < minimalCompliance) {
+				System.err.println("Cannot run "+evaluationTestClass.getName()+" at compliance "+CompilerOptions.versionFromJdkLevel(ClassFileConstants.JDK1_8)+"!");
+			} else {
+				suite.addTest(buildUniqueComplianceTestSuite(evaluationTestClass, ClassFileConstants.JDK1_8));
+			}
+		}
 		return suite;
 	}
 
@@ -259,6 +282,9 @@
 	 */
 	public static long highestComplianceLevels() {
 		int complianceLevels = AbstractCompilerTest.getPossibleComplianceLevels();
+		if ((complianceLevels & AbstractCompilerTest.F_1_8) != 0) {
+			return ClassFileConstants.JDK1_8;
+		}
 		if ((complianceLevels & AbstractCompilerTest.F_1_7) != 0) {
 			return ClassFileConstants.JDK1_7;
 		}
@@ -291,6 +317,8 @@
 					possibleComplianceLevels = F_1_6;
 				} else if (CompilerOptions.VERSION_1_7.equals(compliance)) {
 					possibleComplianceLevels = F_1_7;
+				} else if (CompilerOptions.VERSION_1_8.equals(compliance)) {
+					possibleComplianceLevels = F_1_8;
 				} else {
 					System.out.println("Invalid compliance specified (" + compliance + ")");
 					System.out.print("Use one of ");
@@ -298,7 +326,8 @@
 					System.out.print(CompilerOptions.VERSION_1_4 + ", ");
 					System.out.print(CompilerOptions.VERSION_1_5 + ", ");
 					System.out.print(CompilerOptions.VERSION_1_6 + ", ");
-					System.out.println(CompilerOptions.VERSION_1_7);
+					System.out.print(CompilerOptions.VERSION_1_7 + ", ");
+					System.out.println(CompilerOptions.VERSION_1_8);
 					System.out.println("Defaulting to all possible compliances");
 				}
 			}
@@ -325,6 +354,10 @@
 					if (canRun1_7) {
 						possibleComplianceLevels |= F_1_7;
 					}
+					boolean canRun1_8 = canRun1_7 && !CompilerOptions.VERSION_1_7.equals(specVersion);
+					if (canRun1_8) {
+						possibleComplianceLevels |= F_1_8;
+					}
 				} else if ("1.0".equals(specVersion)
 							|| CompilerOptions.VERSION_1_1.equals(specVersion)
 							|| CompilerOptions.VERSION_1_2.equals(specVersion)
@@ -337,6 +370,9 @@
 						possibleComplianceLevels |= F_1_6;
 						if (!CompilerOptions.VERSION_1_6.equals(specVersion)) {
 							possibleComplianceLevels |= F_1_7;
+							if (!CompilerOptions.VERSION_1_7.equals(specVersion)) {
+								possibleComplianceLevels |= F_1_8;
+							}
 						}
 					}
 				}
@@ -465,6 +501,10 @@
 			options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7);
 			options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
 			options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
+		} else if (this.complianceLevel == ClassFileConstants.JDK1_8) {
+			options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+			options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+			options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
 		}
 		return options;
 	}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java
index 52d132f..d1f7a8f 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/util/Util.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Nina Rinskaya
@@ -192,6 +196,9 @@
                 public boolean stopOnFirstError() {
                     return false;
                 }
+				public boolean ignoreAllErrors() {
+					return false;
+				}
             };
         CompilerOptions compilerOptions = new CompilerOptions(options);
         compilerOptions.performMethodsFullRecovery = false;
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8.jar b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8.jar
new file mode 100644
index 0000000..36b8c7b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8src.zip b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8src.zip
new file mode 100644
index 0000000..53e1adc
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/JCL/converterJclMin1.8src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/jclMin1.8.jar b/org.eclipse.jdt.core.tests.model/JCL/jclMin1.8.jar
new file mode 100644
index 0000000..2b78416
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/JCL/jclMin1.8.jar
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/JCL/jclMin1.8src.zip b/org.eclipse.jdt.core.tests.model/JCL/jclMin1.8src.zip
new file mode 100644
index 0000000..0757f3a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/JCL/jclMin1.8src.zip
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/pom.xml b/org.eclipse.jdt.core.tests.model/pom.xml
index 66de5e6..1a47e89 100644
--- a/org.eclipse.jdt.core.tests.model/pom.xml
+++ b/org.eclipse.jdt.core.tests.model/pom.xml
@@ -15,12 +15,12 @@
   <parent>
     <artifactId>tests-pom</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.4.0-SNAPSHOT</version>
+    <version>4.3.0-SNAPSHOT</version>
     <relativePath>../tests-pom/</relativePath>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.core.tests.model</artifactId>
-  <version>3.9.0-SNAPSHOT</version>
+  <version>3.8.2-SNAPSHOT</version>
   <packaging>eclipse-test-plugin</packaging>
 
   <properties>
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava8Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava8Tests.java
new file mode 100644
index 0000000..213da02
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunAllJava8Tests.java
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.core.tests.compiler.parser.ComplianceDiagnoseTest;
+import org.eclipse.jdt.core.tests.dom.ASTConverter15JLS8Test;
+import org.eclipse.jdt.core.tests.dom.ASTConverter18Test;
+import org.eclipse.jdt.core.tests.dom.ASTConverterAST8Test;
+import org.eclipse.jdt.core.tests.dom.ASTConverterBugsTestJLS8;
+import org.eclipse.jdt.core.tests.dom.ASTConverterTestAST8_2;
+import org.eclipse.jdt.core.tests.dom.ConverterTestSetup;
+import org.eclipse.jdt.core.tests.dom.TypeAnnotationsConverterTest;
+import org.eclipse.jdt.core.tests.dom.TypeBindingTests308;
+import org.eclipse.jdt.core.tests.formatter.FormatterJSR308Tests;
+import org.eclipse.jdt.core.tests.formatter.FormatterJSR335Tests;
+import org.eclipse.jdt.core.tests.model.JavaSearchBugs8Tests;
+import org.eclipse.jdt.core.tests.rewrite.describing.ASTRewritingTest;
+import org.eclipse.jdt.core.tests.util.AbstractCompilerTest;
+
+public class RunAllJava8Tests extends TestCase {
+	
+	public RunAllJava8Tests(String name) {
+		super(name);
+	}
+	public static Class[] getAllTestClasses() {
+		return new Class[] {
+			ComplianceDiagnoseTest.class,
+			FormatterJSR335Tests.class,
+			FormatterJSR308Tests.class,
+			JavaSearchBugs8Tests.class,
+/*{ObjectTeams: not included:
+			org.eclipse.jdt.compiler.apt.tests.AllTests.class,
+// SH}*/
+		};
+	}
+	
+	public static Class[] getConverterTestClasses() {
+		return new Class[] {
+				TypeAnnotationsConverterTest.class,
+				ASTConverterTestAST8_2.class,
+				ASTConverterAST8Test.class,
+				ASTConverterBugsTestJLS8.class,
+				ASTConverter15JLS8Test.class,
+				ASTConverter18Test.class,
+				ASTRewritingTest.class,
+				TypeBindingTests308.class,
+/*{ObjectTeams: not included:
+				Java8ElementsTests.class,
+// SH}*/
+		};
+	}
+
+	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(RunAllJava8Tests.class.getName());
+
+		Class[] testClasses = getAllTestClasses();
+		addTestsToSuite(ts, testClasses);
+		testClasses = getConverterTestClasses();
+		addTestsToSuite(ts, testClasses);
+
+		AbstractCompilerTest.setpossibleComplianceLevels(AbstractCompilerTest.F_1_8);
+		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/RunFormatterTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunFormatterTests.java
index da72556..705009a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunFormatterTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunFormatterTests.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - Contribution for bug 402173
+ *                       Contribution for bug 402892
  *******************************************************************************/
 package org.eclipse.jdt.core.tests;
 
@@ -54,6 +60,8 @@
 			allClasses.add(FormatterBugsTests.class);
 		}
 		allClasses.add(CommentsTestSuite.class);
+		allClasses.add(FormatterJSR335Tests.class);
+		allClasses.add(FormatterJSR308Tests.class);
 		allClasses.addAll(TEST_SUITES);
 
 		// Reset forgotten subsets of tests
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunOnlyJava8Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunOnlyJava8Tests.java
new file mode 100644
index 0000000..17d56dd
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/RunOnlyJava8Tests.java
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.core.tests.compiler.parser.ComplianceDiagnoseTest;
+import org.eclipse.jdt.core.tests.compiler.parser.LambdaExpressionSyntaxTest;
+import org.eclipse.jdt.core.tests.compiler.parser.ReferenceExpressionSyntaxTest;
+import org.eclipse.jdt.core.tests.compiler.parser.TypeAnnotationSyntaxTest;
+import org.eclipse.jdt.core.tests.compiler.regression.ExpressionContextTests;
+import org.eclipse.jdt.core.tests.compiler.regression.CompilerInvocationTests;
+import org.eclipse.jdt.core.tests.compiler.regression.FlowAnalysisTest8;
+import org.eclipse.jdt.core.tests.compiler.regression.GrammarCoverageTests308;
+import org.eclipse.jdt.core.tests.compiler.regression.InterfaceMethodsTest;
+import org.eclipse.jdt.core.tests.compiler.regression.Jsr335ClassFileTest;
+import org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest;
+import org.eclipse.jdt.core.tests.compiler.regression.NegativeLambdaExpressionsTest;
+import org.eclipse.jdt.core.tests.compiler.regression.NegativeTypeAnnotationTest;
+import org.eclipse.jdt.core.tests.compiler.regression.NullTypeAnnotationTest;
+import org.eclipse.jdt.core.tests.dom.ASTConverter15JLS8Test;
+import org.eclipse.jdt.core.tests.dom.ASTConverter18Test;
+import org.eclipse.jdt.core.tests.dom.ASTConverterAST8Test;
+import org.eclipse.jdt.core.tests.dom.ASTConverterBugsTestJLS8;
+import org.eclipse.jdt.core.tests.dom.ASTConverterTestAST8_2;
+import org.eclipse.jdt.core.tests.dom.ConverterTestSetup;
+import org.eclipse.jdt.core.tests.dom.TypeAnnotationsConverterTest;
+import org.eclipse.jdt.core.tests.formatter.FormatterJSR308Tests;
+import org.eclipse.jdt.core.tests.formatter.FormatterJSR335Tests;
+import org.eclipse.jdt.core.tests.model.JavaSearchBugs8Tests;
+import org.eclipse.jdt.core.tests.rewrite.describing.ASTRewritingTest;
+
+public class RunOnlyJava8Tests extends TestCase {
+	
+	public RunOnlyJava8Tests(String name) {
+		super(name);
+	}
+	public static Class[] getAllTestClasses() {
+		return new Class[] {
+			LambdaExpressionSyntaxTest.class,
+			NegativeLambdaExpressionsTest.class,
+			LambdaExpressionsTest.class,
+			Jsr335ClassFileTest.class,
+			NegativeTypeAnnotationTest.class,
+			TypeAnnotationSyntaxTest.class,
+			ReferenceExpressionSyntaxTest.class,
+			InterfaceMethodsTest.class,
+			ComplianceDiagnoseTest.class,
+			GrammarCoverageTests308.class,
+			NullTypeAnnotationTest.class,
+			CompilerInvocationTests.class,
+			ExpressionContextTests.class,
+			FlowAnalysisTest8.class,
+			FormatterJSR335Tests.class,
+			FormatterJSR308Tests.class,
+			JavaSearchBugs8Tests.class,
+		};
+	}
+	
+	public static Class[] getConverterTestClasses() {
+		return new Class[] {
+				TypeAnnotationsConverterTest.class,
+				ASTConverterTestAST8_2.class,
+				ASTConverterAST8Test.class,
+				ASTConverterBugsTestJLS8.class,
+				ASTConverter15JLS8Test.class,
+				ASTConverter18Test.class,
+				ASTRewritingTest.class,
+		};
+	}
+	public static Test suite() {
+		TestSuite ts = new TestSuite(RunOnlyJava8Tests.class.getName());
+
+		Class[] testClasses = getAllTestClasses();
+		addTestsToSuite(ts, testClasses);
+		testClasses = getConverterTestClasses();
+		ConverterTestSetup.TEST_SUITES = new ArrayList(Arrays.asList(testClasses));
+		addTestsToSuite(ts, testClasses);
+		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/APIDocumentationTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java
index 4347c7b..a636d27 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/APIDocumentationTests.java
@@ -56,7 +56,7 @@
 		}
 	
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
index 9b855c2..bbcdcfb 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS4Test.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * Copyright (c) 2011, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
@@ -40,7 +44,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS4);
+		this.ast = AST.newAST(getJLS4());
 	}
 
 	public ASTConverter15JLS4Test(String name) {
@@ -64,6 +68,13 @@
 		}
 	}
 
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
+
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=234609 BindingKey#toSignature() fails with key from createWilcardTypeBindingKey(..)
 	public void test234609() throws JavaModelException {
 
@@ -391,7 +402,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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";
@@ -411,7 +422,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertProblemsSize(compilationUnit, 0);
@@ -440,7 +451,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -464,7 +475,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -494,7 +505,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -525,7 +536,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1704,7 +1715,7 @@
 		checkSourceRange(type, "String[]", source);
 		assertTrue("not an array type", type.isArrayType());
 		ArrayType arrayType = (ArrayType) type;
-		checkSourceRange(arrayType.getComponentType(), "String", source);
+		checkSourceRange(componentType(arrayType), "String", source);
 		assertEquals("Wrong extra dimensions", 1, singleVariableDeclaration.getExtraDimensions());
 	}
 
@@ -1732,7 +1743,7 @@
 		checkSourceRange(type, "String[]", source);
 		assertTrue("not an array type", type.isArrayType());
 		ArrayType arrayType = (ArrayType) type;
-		checkSourceRange(arrayType.getComponentType(), "String", source);
+		checkSourceRange(componentType(arrayType), "String", source);
 		assertEquals("Wrong extra dimensions", 0, singleVariableDeclaration.getExtraDimensions());
 	}
 	/**
@@ -2229,7 +2240,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 0);
@@ -2423,11 +2434,11 @@
 		checkSourceRange(type, "Map<String, Double>[][]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		ArrayType arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "Map<String, Double>[]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "Map<String, Double>", source);
 	}
 
@@ -2450,11 +2461,11 @@
 		checkSourceRange(type, "java.util.Map<String, Double>[][]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		ArrayType arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "java.util.Map<String, Double>[]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "java.util.Map<String, Double>", source);
 	}
 
@@ -3259,7 +3270,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents.toCharArray());
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true);		
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true);		
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit compilationUnit = (CompilationUnit) node;
 		String expectedOutput = "Dead code";
@@ -4114,7 +4125,7 @@
     	assertEquals("wrong dimensions", 1, typeBinding.getDimensions());
     	ArrayType arrayType = (ArrayType) type;
     	assertEquals("Wrong dimension", 1, arrayType.getDimensions());
-    	type = arrayType.getComponentType();
+    	type = componentType(arrayType);
     	assertTrue("Not a simple type", type.isSimpleType());
     	checkSourceRange(type, "String", contents);
     	assertEquals("Wrong extra dimension", 1, singleVariableDeclaration.getExtraDimensions());
@@ -4498,7 +4509,7 @@
     	assertEquals("wrong dimensions", 1, typeBinding.getDimensions());
     	ArrayType arrayType = (ArrayType) type;
     	assertEquals("Wrong dimension", 1, arrayType.getDimensions());
-    	type = arrayType.getComponentType();
+    	type = componentType(arrayType);
     	assertTrue("Not a simple type", type.isSimpleType());
     	checkSourceRange(type, "String", contents);
     	assertEquals("Wrong extra dimension", 0, singleVariableDeclaration.getExtraDimensions());
@@ -5917,7 +5928,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.JLS4, sourceUnit, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true);
 		assertNotNull("No node", node);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
@@ -7484,7 +7495,7 @@
 		IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
 
 		assertNotNull("Should not be null", type);
-		ASTParser parser= ASTParser.newParser(AST.JLS4);
+		ASTParser parser= ASTParser.newParser(getJLS4());
 		parser.setProject(type.getJavaProject());
 		IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null);
 		if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
@@ -7512,7 +7523,7 @@
 		IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
 
 		assertNotNull("Should not be null", type);
-		ASTParser parser= ASTParser.newParser(AST.JLS4);
+		ASTParser parser= ASTParser.newParser(getJLS4());
 		parser.setSource(sourceUnit);
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setResolveBindings(true);
@@ -8094,7 +8105,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.JLS4, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true, true);
 		assertNotNull("Not a compilation unit", result);
 	}
 
@@ -8233,7 +8244,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.JLS4, sourceUnit, false);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -8263,7 +8274,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.JLS4, sourceUnit, false);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -8303,7 +8314,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS4(), 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";
@@ -8341,7 +8352,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9382,7 +9393,7 @@
 
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=192774
 	//Test ability to distinguish AST nodes of multiple similar annotations.
-	public void test0276() throws JavaModelException {
+	public void _test0276() throws JavaModelException {
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		String contents =
 			"@interface Annot {\n" +
@@ -9413,7 +9424,7 @@
 		}
 
 		CompilationUnitRequestor requestor = new CompilationUnitRequestor();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setResolveBindings(true);
 		parser.setProject(getJavaProject("Converter15"));
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -9589,7 +9600,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9643,7 +9654,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true, true, true);
+		ASTNode node = runConversion(getJLS4(), 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");
@@ -10718,7 +10729,7 @@
 			BindingKey.createTypeBindingKey(typeName)
 		};
 		final BindingRequestor requestor = new BindingRequestor();
-		final ASTParser parser = ASTParser.newParser(AST.JLS4);
+		final ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setResolveBindings(true);
 		parser.setProject(javaProject);
 		// this doesn't really do a parse; it's a type lookup
@@ -10753,7 +10764,7 @@
 			BindingKey.createTypeBindingKey(typeName)
 		};
 		final BindingRequestor requestor = new BindingRequestor();
-		final ASTParser parser = ASTParser.newParser(AST.JLS4);
+		final ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setResolveBindings(true);
 		parser.setProject(javaProject);
 		// this doesn't really do a parse; it's a type lookup
@@ -10791,7 +10802,7 @@
 			BindingKey.createTypeBindingKey(typeName)
 		};
 		final BindingRequestor requestor = new BindingRequestor();
-		final ASTParser parser = ASTParser.newParser(AST.JLS4);
+		final ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setResolveBindings(true);
 		parser.setProject(javaProject);
 		// this doesn't really do a parse; it's a type lookup
@@ -11182,7 +11193,7 @@
 		ITypeBinding binding = type.resolveBinding();
 		assertNotNull("No binding", binding);
 		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>[]", binding.getQualifiedName());
-		Type componentType = type.getComponentType();
+		Type componentType = componentType(type);
 		binding = componentType.resolveBinding();
 		assertNotNull("No binding", binding);
 		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName());
@@ -11214,7 +11225,7 @@
 		//IType type2 = sourceUnit2.getType("TestAnnotationWithStringDefault");//$NON-NLS-1$
 
 		assertNotNull("Should not be null", type);
-		ASTParser parser= ASTParser.newParser(AST.JLS4);
+		ASTParser parser= ASTParser.newParser(getJLS4());
 		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/ASTConverter15JLS8Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java
new file mode 100644
index 0000000..83eb5fc
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15JLS8Test.java
@@ -0,0 +1,11307 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.dom;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.BindingKey;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+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.Signature;
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.tests.util.Util;
+
+public class ASTConverter15JLS8Test extends ConverterTestSetup {
+
+	ICompilationUnit workingCopy;
+
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(AST.JLS8);
+	}
+
+	public ASTConverter15JLS8Test(String name) {
+		super(name);
+	}
+
+	static {
+//		TESTS_NUMBERS = new int[] { 350 };
+//		TESTS_RANGE = new int[] { 325, -1 };
+//		TESTS_NAMES = new String[] {"testBug348024"};
+	}
+	public static Test suite() {
+		return buildModelTestSuite(ASTConverter15JLS8Test.class);
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		if (this.workingCopy != null) {
+			this.workingCopy.discardWorkingCopy();
+			this.workingCopy = null;
+		}
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=234609 BindingKey#toSignature() fails with key from createWilcardTypeBindingKey(..)
+	public void test234609() throws JavaModelException {
+
+		String newContents = 	"package p;\n" +
+		"import java.util.HashMap;\n" + 
+		"public class X {\n" +
+		"  /*start*/HashMap<? extends Integer,? super String>/*end*/ s;" +
+		"}";
+
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+
+		Type node = (Type) buildAST(
+				newContents,
+				this.workingCopy);
+
+		ITypeBinding bindingFromAST = node.resolveBinding();
+		String recoveredBindingKey = bindingFromAST.getKey();
+
+		String genericTypeKey = BindingKey.createTypeBindingKey("java.util.HashMap");
+		String [] wildcardKeys = new String [] { BindingKey.createWildcardTypeBindingKey(genericTypeKey, Signature.C_EXTENDS, BindingKey.createTypeBindingKey("java.lang.Integer"), 0),
+				BindingKey.createWildcardTypeBindingKey(genericTypeKey, Signature.C_SUPER, BindingKey.createTypeBindingKey("java.lang.String"), 1)
+		};
+
+		String composedBindingKey = BindingKey.createParameterizedTypeBindingKey(genericTypeKey, wildcardKeys);
+
+		if (!composedBindingKey.equals(recoveredBindingKey))
+			fail("Composed binding key differs from Recovered binding key");
+
+
+		this.workingCopy.discardWorkingCopy();
+		this.workingCopy = null;
+
+		ITypeBinding [] bindingFromKey = createTypeBindings(
+						new String[] {
+							"/Converter15/src/p/X.java",
+							newContents
+						},
+						new String[] {
+							composedBindingKey
+						},
+						getJavaProject("Converter15")
+					);
+		
+		if (bindingFromKey.length != 1)
+			fail("Problem in going from key to binding\n");
+		if (!composedBindingKey.equals(bindingFromKey[0].getKey()))
+			fail ("Binding key mismatch");
+		String signature = new BindingKey(composedBindingKey).toSignature();
+		if (!signature.equals("Ljava.util.HashMap<+Ljava.lang.Integer;-Ljava.lang.String;>;"))
+			fail("Bad signature");
+
+		assertTrue("Equals", bindingFromKey[0].isEqualTo(bindingFromAST));
+		
+		// check existence of getGenericType() API.
+		ITypeBinding gType = bindingFromAST.getTypeArguments()[0].getGenericTypeOfWildcardType();
+		if (gType == null)
+			fail("Missing generic type");
+		if (!gType.getKey().equals("Ljava/util/HashMap<TK;TV;>;"))
+			fail("getKey() API is broken");
+		
+		// test for getRank API.
+		if (bindingFromAST.getTypeArguments()[0].getRank() != 0)
+			fail ("Wrong rank");
+		
+		if (bindingFromAST.getTypeArguments()[1].getRank() != 1)
+			fail ("Wrong rank");	
+	}
+
+	// Similar test as above - variation in wildcard type being unbounded.
+	public void test234609b() throws JavaModelException {
+
+		String newContents = 	"package p;\n" +
+		"import java.util.ArrayList;\n" + 
+		"public class X {\n" +
+		"  /*start*/ArrayList<?>/*end*/ s;" +
+		"}";
+
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+
+		Type node = (Type) buildAST(
+				newContents,
+				this.workingCopy);
+
+		ITypeBinding bindingFromAST = node.resolveBinding();
+		String recoveredBindingKey = bindingFromAST.getKey();
+
+		String genericTypeKey = BindingKey.createTypeBindingKey("java.util.ArrayList");
+		String [] wildcardKeys = new String [] { BindingKey.createWildcardTypeBindingKey(genericTypeKey, Signature.C_STAR, null, 0) };
+		
+		String composedBindingKey = BindingKey.createParameterizedTypeBindingKey(genericTypeKey, wildcardKeys);
+
+		if (!composedBindingKey.equals(recoveredBindingKey))
+			fail("Composed binding key differs from Recovered binding key");
+
+
+		this.workingCopy.discardWorkingCopy();
+		this.workingCopy = null;
+
+		ITypeBinding [] bindingFromKey = createTypeBindings(
+						new String[] {
+							"/Converter15/src/p/X.java",
+							newContents
+						},
+						new String[] {
+							composedBindingKey
+						},
+						getJavaProject("Converter15")
+					);
+		
+		if (bindingFromKey.length != 1)
+			fail("Problem in going from key to binding\n");
+		if (!composedBindingKey.equals(bindingFromKey[0].getKey()))
+			fail ("Binding key mismatch");
+		String signature = new BindingKey(composedBindingKey).toSignature();
+		if (!signature.equals("Ljava.util.ArrayList<*>;"))
+			fail("Bad signature");
+		assertTrue("Equals", bindingFromKey[0].isEqualTo(bindingFromAST));
+	}
+	
+	public void test0001() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0001", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Wrong number of types", 1, types.size());
+		AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) types.get(0);
+		assertEquals("wrong type", ASTNode.TYPE_DECLARATION, typeDeclaration.getNodeType());
+		TypeDeclaration typeDeclaration2 = (TypeDeclaration) typeDeclaration;
+		List modifiers = typeDeclaration2.modifiers();
+		assertEquals("Wrong number of modifiers", 1, modifiers.size());
+		Modifier modifier = (Modifier) modifiers.get(0);
+		checkSourceRange(modifier, "public", source);
+
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Wrong type", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		modifiers = fieldDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 3, modifiers.size());
+		modifier = (Modifier) modifiers.get(0);
+		checkSourceRange(modifier, "public", source);
+		modifier = (Modifier) modifiers.get(1);
+		checkSourceRange(modifier, "static", source);
+		modifier = (Modifier) modifiers.get(2);
+		checkSourceRange(modifier, "final", source);
+
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 2, modifiers.size());
+		modifier = (Modifier) modifiers.get(0);
+		checkSourceRange(modifier, "private", source);
+		modifier = (Modifier) modifiers.get(1);
+		checkSourceRange(modifier, "static", source);
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong number of parameters", 1, parameters.size());
+		SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		modifiers = variableDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 1, modifiers.size());
+		modifier = (Modifier) modifiers.get(0);
+		checkSourceRange(modifier, "final", source);
+
+		node = getASTNode(compilationUnit, 0, 2);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 2, modifiers.size());
+		modifier = (Modifier) modifiers.get(0);
+		checkSourceRange(modifier, "public", source);
+		modifier = (Modifier) modifiers.get(1);
+		checkSourceRange(modifier, "static", source);
+	}
+
+	public void test0002() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0002", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	public void test0003() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0003", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Wrong number of types", 3, types.size());
+		AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) types.get(2);
+		assertEquals("wrong type", ASTNode.TYPE_DECLARATION, typeDeclaration.getNodeType());
+		TypeDeclaration typeDeclaration2 = (TypeDeclaration) typeDeclaration;
+		List modifiers = typeDeclaration2.modifiers();
+		assertEquals("Wrong number of modifiers", 2, modifiers.size());
+		ASTNode modifier = (ASTNode) modifiers.get(0);
+		checkSourceRange(modifier, "@Author(@Name(first=\"Joe\", last=\"Hacker\"))", source);
+		assertEquals("wrong type", ASTNode.SINGLE_MEMBER_ANNOTATION, modifier.getNodeType());
+		SingleMemberAnnotation annotation = (SingleMemberAnnotation) modifier;
+		checkSourceRange(annotation.getTypeName(), "Author", source);
+		Expression value = annotation.getValue();
+		assertEquals("wrong type", ASTNode.NORMAL_ANNOTATION, value.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) value;
+		checkSourceRange(normalAnnotation.getTypeName(), "Name", source);
+		List values = normalAnnotation.values();
+		assertEquals("wrong size", 2, values.size());
+		MemberValuePair memberValuePair = (MemberValuePair) values.get(0);
+		checkSourceRange(memberValuePair, "first=\"Joe\"", source);
+		checkSourceRange(memberValuePair.getName(), "first", source);
+		checkSourceRange(memberValuePair.getValue(), "\"Joe\"", source);
+		memberValuePair = (MemberValuePair) values.get(1);
+		checkSourceRange(memberValuePair, "last=\"Hacker\"", source);
+		checkSourceRange(memberValuePair.getName(), "last", source);
+		checkSourceRange(memberValuePair.getValue(), "\"Hacker\"", source);
+		modifier = (ASTNode) modifiers.get(1);
+		checkSourceRange(modifier, "public", source);
+	}
+
+	public void test0004() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0004", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Wrong number of types", 3, types.size());
+		AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) types.get(2);
+		assertEquals("wrong type", ASTNode.TYPE_DECLARATION, typeDeclaration.getNodeType());
+		TypeDeclaration typeDeclaration2 = (TypeDeclaration) typeDeclaration;
+		List modifiers = typeDeclaration2.modifiers();
+		assertEquals("Wrong number of modifiers", 2, modifiers.size());
+		ASTNode modifier = (ASTNode) modifiers.get(1);
+		checkSourceRange(modifier, "@Author(@Name(first=\"Joe\", last=\"Hacker\"))", source);
+		assertEquals("wrong type", ASTNode.SINGLE_MEMBER_ANNOTATION, modifier.getNodeType());
+		SingleMemberAnnotation annotation = (SingleMemberAnnotation) modifier;
+		checkSourceRange(annotation.getTypeName(), "Author", source);
+		Expression value = annotation.getValue();
+		assertEquals("wrong type", ASTNode.NORMAL_ANNOTATION, value.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) value;
+		checkSourceRange(normalAnnotation.getTypeName(), "Name", source);
+		List values = normalAnnotation.values();
+		assertEquals("wrong size", 2, values.size());
+		MemberValuePair memberValuePair = (MemberValuePair) values.get(0);
+		checkSourceRange(memberValuePair, "first=\"Joe\"", source);
+		checkSourceRange(memberValuePair.getName(), "first", source);
+		checkSourceRange(memberValuePair.getValue(), "\"Joe\"", source);
+		memberValuePair = (MemberValuePair) values.get(1);
+		checkSourceRange(memberValuePair, "last=\"Hacker\"", source);
+		checkSourceRange(memberValuePair.getName(), "last", source);
+		checkSourceRange(memberValuePair.getValue(), "\"Hacker\"", source);
+		modifier = (ASTNode) modifiers.get(0);
+		checkSourceRange(modifier, "public", source);
+	}
+
+	public void test0005() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0005", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Wrong number of types", 4, types.size());
+		AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) types.get(3);
+		assertEquals("wrong type", ASTNode.TYPE_DECLARATION, typeDeclaration.getNodeType());
+		TypeDeclaration typeDeclaration2 = (TypeDeclaration) typeDeclaration;
+		List modifiers = typeDeclaration2.modifiers();
+		assertEquals("Wrong number of modifiers", 3, modifiers.size());
+		ASTNode modifier = (ASTNode) modifiers.get(0);
+		checkSourceRange(modifier, "@Retention", source);
+		assertEquals("wrong type", ASTNode.MARKER_ANNOTATION, modifier.getNodeType());
+		MarkerAnnotation markerAnnotation = (MarkerAnnotation) modifier;
+		checkSourceRange(markerAnnotation.getTypeName(), "Retention", source);
+		modifier = (ASTNode) modifiers.get(2);
+		checkSourceRange(modifier, "@Author(@Name(first=\"Joe\", last=\"Hacker\", age=32))", source);
+		assertEquals("wrong type", ASTNode.SINGLE_MEMBER_ANNOTATION, modifier.getNodeType());
+		SingleMemberAnnotation annotation = (SingleMemberAnnotation) modifier;
+		checkSourceRange(annotation.getTypeName(), "Author", source);
+		Expression value = annotation.getValue();
+		assertEquals("wrong type", ASTNode.NORMAL_ANNOTATION, value.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) value;
+		checkSourceRange(normalAnnotation.getTypeName(), "Name", source);
+		List values = normalAnnotation.values();
+		assertEquals("wrong size", 3, values.size());
+		MemberValuePair memberValuePair = (MemberValuePair) values.get(0);
+		checkSourceRange(memberValuePair, "first=\"Joe\"", source);
+		checkSourceRange(memberValuePair.getName(), "first", source);
+		checkSourceRange(memberValuePair.getValue(), "\"Joe\"", source);
+		memberValuePair = (MemberValuePair) values.get(1);
+		checkSourceRange(memberValuePair, "last=\"Hacker\"", source);
+		checkSourceRange(memberValuePair.getName(), "last", source);
+		checkSourceRange(memberValuePair.getValue(), "\"Hacker\"", source);
+		memberValuePair = (MemberValuePair) values.get(2);
+		checkSourceRange(memberValuePair, "age=32", source);
+		checkSourceRange(memberValuePair.getName(), "age", source);
+		checkSourceRange(memberValuePair.getValue(), "32", source);
+		modifier = (ASTNode) modifiers.get(1);
+		checkSourceRange(modifier, "public", source);
+
+		typeDeclaration = (AbstractTypeDeclaration) types.get(0);
+		assertEquals("wrong type", ASTNode.ANNOTATION_TYPE_DECLARATION, typeDeclaration.getNodeType());
+		AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) typeDeclaration;
+		List bodyDeclarations = annotationTypeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 3, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("wrong type", ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION, bodyDeclaration.getNodeType());
+		AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration = (AnnotationTypeMemberDeclaration) bodyDeclaration;
+		IMethodBinding methodBinding = annotationTypeMemberDeclaration.resolveBinding();
+		assertNotNull("No binding", methodBinding);
+		checkSourceRange(annotationTypeMemberDeclaration, "String first() default \"Joe\";", source);
+		Expression expression = annotationTypeMemberDeclaration.getDefault();
+		checkSourceRange(expression, "\"Joe\"", source);
+		bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(2);
+		assertEquals("wrong type", ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION, bodyDeclaration.getNodeType());
+		annotationTypeMemberDeclaration = (AnnotationTypeMemberDeclaration) bodyDeclaration;
+		checkSourceRange(annotationTypeMemberDeclaration, "int age();", source);
+		expression = annotationTypeMemberDeclaration.getDefault();
+		assertNull("Got a default", expression);
+	}
+
+	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);
+		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";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+		PackageDeclaration packageDeclaration = compilationUnit.getPackage();
+		assertNotNull("No package declaration", packageDeclaration);
+		checkSourceRange(packageDeclaration, "@Retention package test0006;", source);
+		List annotations = packageDeclaration.annotations();
+		assertEquals("Wrong size", 1, annotations.size());
+		Annotation annotation = (Annotation) annotations.get(0);
+		checkSourceRange(annotation, "@Retention", source);
+		assertEquals("Not a marker annotation", annotation.getNodeType(), ASTNode.MARKER_ANNOTATION);
+		MarkerAnnotation markerAnnotation = (MarkerAnnotation) annotation;
+		checkSourceRange(markerAnnotation.getTypeName(), "Retention", source);
+	}
+
+	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);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List imports = compilationUnit.imports();
+		assertEquals("Wrong size", 2, imports.size());
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		checkSourceRange(importDeclaration, "import java.util.*;", source);
+		assertFalse("is static", importDeclaration.isStatic());
+		importDeclaration = (ImportDeclaration) imports.get(1);
+		checkSourceRange(importDeclaration, "import static java.io.File.*;", source);
+		assertTrue("not static", importDeclaration.isStatic());
+	}
+
+	/** @deprecated using deprecated code */
+	public void test0008() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0008", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runConversion(AST.JLS2, sourceUnit, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List imports = compilationUnit.imports();
+		assertEquals("Wrong size", 2, imports.size());
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(1);
+		assertTrue("Not malformed", isMalformed(importDeclaration));
+	}
+
+	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);
+		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, 0);
+		assertTrue("Not a foreach statement", node.getNodeType() == ASTNode.ENHANCED_FOR_STATEMENT);
+		EnhancedForStatement enhancedForStatement = (EnhancedForStatement) node;
+		checkSourceRange(enhancedForStatement, "for (String s : args) {System.out.println(s);}", source);
+		SingleVariableDeclaration singleVariableDeclaration = enhancedForStatement.getParameter();
+		checkSourceRange(singleVariableDeclaration, "String s", source);
+		Type type = singleVariableDeclaration.getType();
+		checkSourceRange(type, "String", source);
+		SimpleName simpleName = singleVariableDeclaration.getName();
+		assertEquals("Wrong name", "s", simpleName.getIdentifier());
+		checkSourceRange(simpleName, "s", source);
+		Expression expression = enhancedForStatement.getExpression();
+		checkSourceRange(expression, "args", source);
+		Statement body = enhancedForStatement.getBody();
+		checkSourceRange(body, "{System.out.println(s);}", source);
+	}
+
+	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);
+		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, 1, 0, 0);
+		assertTrue("Not a foreach statement", node.getNodeType() == ASTNode.ENHANCED_FOR_STATEMENT);
+		EnhancedForStatement enhancedForStatement = (EnhancedForStatement) node;
+		checkSourceRange(enhancedForStatement, "for (@Foo final String s : args) {System.out.println(s);}", source);
+		SingleVariableDeclaration singleVariableDeclaration = enhancedForStatement.getParameter();
+		checkSourceRange(singleVariableDeclaration, "@Foo final String s", source);
+		SimpleName simpleName = singleVariableDeclaration.getName();
+		List modifiers = singleVariableDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		checkSourceRange((ASTNode) modifier, "@Foo", source);
+		modifier = (IExtendedModifier) modifiers.get(1);
+		checkSourceRange((ASTNode) modifier, "final", source);
+		Type type = singleVariableDeclaration.getType();
+		checkSourceRange(type, "String", source);
+		assertEquals("Wrong name", "s", simpleName.getIdentifier());
+		checkSourceRange(simpleName, "s", source);
+		Expression expression = enhancedForStatement.getExpression();
+		checkSourceRange(expression, "args", source);
+		Statement body = enhancedForStatement.getBody();
+		checkSourceRange(body, "{System.out.println(s);}", source);
+	}
+
+	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);
+		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, 1, 0, 0);
+		assertTrue("Not a foreach statement", node.getNodeType() == ASTNode.ENHANCED_FOR_STATEMENT);
+		EnhancedForStatement enhancedForStatement = (EnhancedForStatement) node;
+		checkSourceRange(enhancedForStatement, "for (@Foo final String s[] : args) {System.out.println(s);}", source);
+		SingleVariableDeclaration singleVariableDeclaration = enhancedForStatement.getParameter();
+		checkSourceRange(singleVariableDeclaration, "@Foo final String s[]", source);
+		SimpleName simpleName = singleVariableDeclaration.getName();
+		List modifiers = singleVariableDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		checkSourceRange((ASTNode) modifier, "@Foo", source);
+		modifier = (IExtendedModifier) modifiers.get(1);
+		checkSourceRange((ASTNode) modifier, "final", source);
+		assertEquals("Wrong dimension", 1, singleVariableDeclaration.getExtraDimensions());
+		Type type = singleVariableDeclaration.getType();
+		checkSourceRange(type, "String", source);
+		assertEquals("Wrong name", "s", simpleName.getIdentifier());
+		checkSourceRange(simpleName, "s", source);
+		Expression expression = enhancedForStatement.getExpression();
+		checkSourceRange(expression, "args", source);
+		Statement body = enhancedForStatement.getBody();
+		checkSourceRange(body, "{System.out.println(s);}", source);
+	}
+
+	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);
+		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, 1, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 1, parameters.size());
+		SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(0);
+		checkSourceRange(parameter, "@Foo final String[][]... args", source);
+		List modifiers = parameter.modifiers();
+		assertEquals("Wrong number of modifiers", 2, modifiers.size());
+		ASTNode modifier = (ASTNode) modifiers.get(0);
+		checkSourceRange(modifier, "@Foo", source);
+		modifier = (ASTNode) modifiers.get(1);
+		checkSourceRange(modifier, "final", source);
+		assertEquals("Wrong name", "args", parameter.getName().getIdentifier());
+		assertTrue("Not a variable argument", parameter.isVarargs());
+	}
+
+	public void test0013() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0013", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		SimpleName name = typeDeclaration.getName();
+		assertEquals("Wrong name", "Convertible", name.getIdentifier());
+		checkSourceRange(name, "Convertible", source);
+		List typeParameters = typeDeclaration.typeParameters();
+		assertEquals("Wrong size", 1, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		checkSourceRange(typeParameter, "T", source);
+		checkSourceRange(typeParameter.getName(), "T", source);
+		node = getASTNode(compilationUnit, 1);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION);
+		typeDeclaration = (TypeDeclaration) node;
+		name = typeDeclaration.getName();
+		assertEquals("Wrong name", "X", name.getIdentifier());
+		checkSourceRange(name, "X", source);
+		typeParameters = typeDeclaration.typeParameters();
+		assertEquals("Wrong size", 2, typeParameters.size());
+		typeParameter = (TypeParameter) typeParameters.get(0);
+		checkSourceRange(typeParameter.getName(), "A", source);
+		checkSourceRange(typeParameter, "A extends Convertible<B>", source);
+		typeParameter = (TypeParameter) typeParameters.get(1);
+		checkSourceRange(typeParameter.getName(), "B", source);
+		checkSourceRange(typeParameter, "B extends Convertible<A>", source);
+		List typeBounds = typeParameter.typeBounds();
+		assertEquals("Wrong size", 1, typeBounds.size());
+		Type typeBound = (Type) typeBounds.get(0);
+		checkSourceRange(typeBound, "Convertible<A>", source);
+		assertEquals("wrong type", ASTNode.PARAMETERIZED_TYPE, typeBound.getNodeType());
+		ParameterizedType parameterizedType = (ParameterizedType) typeBound;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "A", source);
+	}
+
+	public void test0014() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0014", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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, 1);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		SimpleName name = typeDeclaration.getName();
+		assertEquals("Wrong name", "X", name.getIdentifier());
+		checkSourceRange(name, "X", source);
+		List typeParameters = typeDeclaration.typeParameters();
+		assertEquals("Wrong size", 1, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		checkSourceRange(typeParameter.getName(), "A", source);
+		checkSourceRange(typeParameter, "A extends Convertible<Convertible<A>>", source);
+		List typeBounds = typeParameter.typeBounds();
+		assertEquals("Wrong size", 1, typeBounds.size());
+		Type typeBound = (Type) typeBounds.get(0);
+		checkSourceRange(typeBound, "Convertible<Convertible<A>>", source);
+		assertEquals("wrong type", ASTNode.PARAMETERIZED_TYPE, typeBound.getNodeType());
+		ParameterizedType parameterizedType = (ParameterizedType) typeBound;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "Convertible<A>", source);
+		assertEquals("wrong type", ASTNode.PARAMETERIZED_TYPE, typeArgument.getNodeType());
+		parameterizedType = (ParameterizedType) typeArgument;
+		typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "A", source);
+	}
+
+	public void test0015() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0015", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		SimpleName name = typeDeclaration.getName();
+		assertEquals("Wrong name", "X", name.getIdentifier());
+		checkSourceRange(name, "X", source);
+		List typeParameters = typeDeclaration.typeParameters();
+		assertEquals("Wrong size", 1, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		checkSourceRange(typeParameter.getName(), "A", source);
+		checkSourceRange(typeParameter, "A extends Object & java.io.Serializable & Comparable<?>", source);
+		List typeBounds = typeParameter.typeBounds();
+		assertEquals("Wrong size", 3, typeBounds.size());
+		Type typeBound = (Type) typeBounds.get(0);
+		checkSourceRange(typeBound, "Object", source);
+		typeBound = (Type) typeBounds.get(1);
+		checkSourceRange(typeBound, "java.io.Serializable", source);
+		typeBound = (Type) typeBounds.get(2);
+		checkSourceRange(typeBound, "Comparable<?>", source);
+	}
+
+	public void test0016() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0016", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		char[] source = sourceUnit.getSource().toCharArray();
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedProblems =
+			"Pair is a raw type. References to generic type Pair<A,B> should be parameterized\n" + 
+			"Pair is a raw type. References to generic type Pair<A,B> should be parameterized";
+		assertProblemsSize(compilationUnit, 2, expectedProblems);
+		ASTNode node = getASTNode(compilationUnit, 0, 5);
+		assertEquals("Wrong first character", '<', source[node.getStartPosition()]);
+	}
+
+	public void test0017() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0017", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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, 1, 0, 0);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1,  fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initializer  = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		ITypeBinding binding = initializer.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "Integer", source);
+		Type innerType = parameterizedType.getType();
+		assertTrue("Not a qualified type", innerType.getNodeType() == ASTNode.QUALIFIED_TYPE);
+		QualifiedType qualifiedType = (QualifiedType) innerType;
+		checkSourceRange(qualifiedType.getName(), "B", source);
+		Type qualifier = qualifiedType.getQualifier();
+		checkSourceRange(qualifier, "test0017.A<String>", source);
+		assertTrue("Not a parameterized type", qualifier.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType2 = (ParameterizedType) qualifier;
+		typeArguments = parameterizedType2.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "String", source);
+		innerType = parameterizedType2.getType();
+		assertTrue("Not a simple type", innerType.getNodeType() == ASTNode.SIMPLE_TYPE);
+		SimpleType simpleType = (SimpleType) innerType;
+		checkSourceRange(simpleType, "test0017.A", source);
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.getNodeType() == ASTNode.QUALIFIED_NAME);
+		QualifiedName qualifiedName = (QualifiedName) name;
+		checkSourceRange(qualifiedName.getQualifier(), "test0017", source);
+		checkSourceRange(qualifiedName.getName(), "A", source);
+	}
+
+	public void test0018() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0018", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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, 1, 0, 0);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "Float", source);
+		Type innerType = parameterizedType.getType();
+		assertTrue("Not a qualified type", innerType.getNodeType() == ASTNode.QUALIFIED_TYPE);
+		QualifiedType qualifiedType = (QualifiedType) innerType;
+		checkSourceRange(qualifiedType.getName(), "C", source);
+		Type qualifier = qualifiedType.getQualifier();
+		checkSourceRange(qualifier, "test0018.A<String>.B", source);
+		assertTrue("Not a qualified type", qualifier.getNodeType() == ASTNode.QUALIFIED_TYPE);
+		qualifiedType = (QualifiedType) qualifier;
+		checkSourceRange(qualifiedType.getName(), "B", source);
+		qualifier = qualifiedType.getQualifier();
+		checkSourceRange(qualifier, "test0018.A<String>", source);
+		assertTrue("Not a parameterized type", qualifier.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType2 = (ParameterizedType) qualifier;
+		typeArguments = parameterizedType2.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "String", source);
+		innerType = parameterizedType2.getType();
+		assertTrue("Not a simple type", innerType.getNodeType() == ASTNode.SIMPLE_TYPE);
+		SimpleType simpleType = (SimpleType) innerType;
+		checkSourceRange(simpleType, "test0018.A", source);
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.getNodeType() == ASTNode.QUALIFIED_NAME);
+		QualifiedName qualifiedName = (QualifiedName) name;
+		checkSourceRange(qualifiedName.getQualifier(), "test0018", source);
+		checkSourceRange(qualifiedName.getName(), "A", source);
+	}
+
+	public void test0019() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0019", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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, 1, 0, 0);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a qualified type", type.getNodeType() == ASTNode.QUALIFIED_TYPE);
+		QualifiedType qualifiedType = (QualifiedType) type;
+		checkSourceRange(qualifiedType.getName(), "C", source);
+		Type qualifier = qualifiedType.getQualifier();
+		checkSourceRange(qualifier, "test0019.A<String>.B<Integer>", source);
+		assertTrue("Not a parameterized type", qualifier.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType = (ParameterizedType) qualifier;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "Integer", source);
+		Type innerType = parameterizedType.getType();
+		assertTrue("Not a qualified type", innerType.getNodeType() == ASTNode.QUALIFIED_TYPE);
+		qualifiedType = (QualifiedType) innerType;
+		checkSourceRange(qualifiedType.getName(), "B", source);
+		qualifier = qualifiedType.getQualifier();
+		checkSourceRange(qualifier, "test0019.A<String>", source);
+		assertTrue("Not a parameterized type", qualifier.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType2 = (ParameterizedType) qualifier;
+		typeArguments = parameterizedType2.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "String", source);
+		innerType = parameterizedType2.getType();
+		assertTrue("Not a simple type", innerType.getNodeType() == ASTNode.SIMPLE_TYPE);
+		SimpleType simpleType = (SimpleType) innerType;
+		checkSourceRange(simpleType, "test0019.A", source);
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.getNodeType() == ASTNode.QUALIFIED_NAME);
+		QualifiedName qualifiedName = (QualifiedName) name;
+		checkSourceRange(qualifiedName.getQualifier(), "test0019", source);
+		checkSourceRange(qualifiedName.getName(), "A", source);
+	}
+
+	public void test0020() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0020", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		List parameters = declaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = singleVariableDeclaration.getType();
+		assertTrue("Not a parameterized type", type.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "?", source);
+	}
+
+	public void test0021() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0021", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		List parameters = declaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = singleVariableDeclaration.getType();
+		assertTrue("Not a parameterized type", type.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "? extends E", source);
+		assertTrue("Not a wildcard type", typeArgument.getNodeType() == ASTNode.WILDCARD_TYPE);
+		WildcardType wildcardType = (WildcardType) typeArgument;
+		Type bound = wildcardType.getBound();
+		checkSourceRange(bound, "E", source);
+		assertTrue("Not an upper bound", wildcardType.isUpperBound());
+	}
+
+	public void test0022() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0022", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		List parameters = declaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = singleVariableDeclaration.getType();
+		assertTrue("Not a parameterized type", type.getNodeType() == ASTNode.PARAMETERIZED_TYPE);
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "? super E", source);
+		assertTrue("Not a wildcard type", typeArgument.getNodeType() == ASTNode.WILDCARD_TYPE);
+		WildcardType wildcardType = (WildcardType) typeArgument;
+		Type bound = wildcardType.getBound();
+		checkSourceRange(bound, "E", source);
+		assertFalse("Is an upper bound", wildcardType.isUpperBound());
+	}
+
+	public void test0023() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0023", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		char[] source = sourceUnit.getSource().toCharArray();
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedProblems =
+			"Pair is a raw type. References to generic type Pair<A,B> should be parameterized\n" + 
+			"Pair is a raw type. References to generic type Pair<A,B> should be parameterized";
+		assertProblemsSize(compilationUnit, 2, expectedProblems);
+		ASTNode node = getASTNode(compilationUnit, 0, 5);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("Wrong name", "zip", methodDeclaration.getName().getIdentifier());
+		List typeParameters = methodDeclaration.typeParameters();
+		assertNotNull("No type parameters", typeParameters);
+		assertEquals("Wrong size", 1, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		checkSourceRange(typeParameter, "T", source);
+	}
+
+	public void test0024() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0024", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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, 1, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement declarationStatement = (VariableDeclarationStatement) node;
+		List fragments = declarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		List typeArguments = classInstanceCreation.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		Type type = (Type) typeArguments.get(0);
+		checkSourceRange(type, "String", source);
+	}
+
+	public void test0025() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0025", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(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, 0);
+		assertEquals("Not a constructor invocation", ASTNode.CONSTRUCTOR_INVOCATION, node.getNodeType());
+		ConstructorInvocation constructorInvocation = (ConstructorInvocation) node;
+		List typeArguments = constructorInvocation.typeArguments();
+		assertEquals("wrong size", 1, typeArguments.size());
+		Type type = (Type) typeArguments.get(0);
+		checkSourceRange(type, "E", source);
+	}
+
+	public void test0026() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0026", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		ITypeBinding typeBinding2 = enumDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding2);
+		List modifiers = enumDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 1, modifiers.size());
+		IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not a modifier", extendedModifier instanceof Modifier);
+		Modifier modifier = (Modifier) extendedModifier;
+		checkSourceRange(modifier, "public", source);
+		assertEquals("wrong name", "X", enumDeclaration.getName().getIdentifier());
+		List enumConstants = enumDeclaration.enumConstants();
+		assertEquals("wrong size", 4, enumConstants.size());
+		List bodyDeclarations = enumDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 2, bodyDeclarations.size());
+		EnumConstantDeclaration enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(0);
+		IMethodBinding methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "PLUS", source);
+		checkSourceRange(enumConstantDeclaration, "PLUS {\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x + y; }\n" +
+				"    }", source);
+		assertEquals("wrong size", 0, enumConstantDeclaration.arguments().size());
+		AnonymousClassDeclaration anonymousClassDeclaration = enumConstantDeclaration.getAnonymousClassDeclaration();
+		assertNotNull("No anonymous class", anonymousClassDeclaration);
+		checkSourceRange(anonymousClassDeclaration, "{\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x + y; }\n" +
+				"    }", source);
+		ITypeBinding typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not a enum type", typeBinding.isEnum());
+		bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		checkSourceRange(methodDeclaration.getName(), "eval", source);
+		checkSourceRange(methodDeclaration, "@Override\n        double eval(double x, double y) { return x + y; }", source);
+		assertEquals("wrong size", 0, enumConstantDeclaration.arguments().size());
+
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(1);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "MINUS", source);
+		checkSourceRange(enumConstantDeclaration, "MINUS {\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x - y; }\n" +
+				"    }", source);
+		anonymousClassDeclaration = enumConstantDeclaration.getAnonymousClassDeclaration();
+		typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not a enum type", typeBinding.isEnum());
+		assertNotNull("No anonymous class", anonymousClassDeclaration);
+		checkSourceRange(anonymousClassDeclaration, "{\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x - y; }\n" +
+				"    }", source);
+		bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		checkSourceRange(methodDeclaration.getName(), "eval", source);
+		checkSourceRange(methodDeclaration, "@Override\n        double eval(double x, double y) { return x - y; }", source);
+		assertEquals("wrong size", 0, enumConstantDeclaration.arguments().size());
+
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(2);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "TIMES", source);
+		checkSourceRange(enumConstantDeclaration, "TIMES {\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x * y; }\n" +
+				"    }", source);
+		anonymousClassDeclaration = enumConstantDeclaration.getAnonymousClassDeclaration();
+		assertNotNull("No anonymous class", anonymousClassDeclaration);
+		checkSourceRange(anonymousClassDeclaration, "{\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x * y; }\n" +
+				"    }", source);
+		typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not a enum type", typeBinding.isEnum());
+		bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		checkSourceRange(methodDeclaration.getName(), "eval", source);
+		checkSourceRange(methodDeclaration, "@Override\n        double eval(double x, double y) { return x * y; }", source);
+		assertEquals("wrong size", 0, enumConstantDeclaration.arguments().size());
+
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(3);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "DIVIDED_BY", source);
+		checkSourceRange(enumConstantDeclaration, "DIVIDED_BY {\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x / y; }\n" +
+				"    }", source);
+		anonymousClassDeclaration = enumConstantDeclaration.getAnonymousClassDeclaration();
+		assertNotNull("No anonymous class", anonymousClassDeclaration);
+		checkSourceRange(anonymousClassDeclaration, "{\n" +
+				"        @Override\n" +
+				"        double eval(double x, double y) { return x / y; }\n" +
+				"    }", source);
+		typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not a enum type", typeBinding.isEnum());
+		bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		checkSourceRange(methodDeclaration.getName(), "eval", source);
+		checkSourceRange(methodDeclaration, "@Override\n        double eval(double x, double y) { return x / y; }", source);
+		assertEquals("wrong size", 0, enumConstantDeclaration.arguments().size());
+	}
+
+	public void test0027() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0027", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		char[] source = sourceUnit.getSource().toCharArray();
+		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		List modifiers = enumDeclaration.modifiers();
+		assertEquals("Wrong number of modifiers", 1, modifiers.size());
+		IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not a modifier", extendedModifier instanceof Modifier);
+		Modifier modifier = (Modifier) extendedModifier;
+		checkSourceRange(modifier, "public", source);
+		assertEquals("wrong name", "X", enumDeclaration.getName().getIdentifier());
+		List enumConstants = enumDeclaration.enumConstants();
+		assertEquals("wrong size", 4, enumConstants.size());
+		EnumConstantDeclaration enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(0);
+		IMethodBinding methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "PENNY", source);
+		checkSourceRange(enumConstantDeclaration, "PENNY(1)", source);
+		List arguments = enumConstantDeclaration.arguments();
+		assertEquals("wrong size", 1, arguments.size());
+		Expression argument = (Expression) arguments.get(0);
+		checkSourceRange(argument, "1", source);
+		assertEquals("not an number literal", ASTNode.NUMBER_LITERAL, argument.getNodeType());
+		IVariableBinding binding = enumConstantDeclaration.resolveVariable();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong name", "PENNY", binding.getName());
+		ASTNode node2 = compilationUnit.findDeclaringNode(binding);
+		assertTrue("Different node", node2 == enumConstantDeclaration);
+
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(1);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "NICKEL", source);
+		checkSourceRange(enumConstantDeclaration, "NICKEL(5)", source);
+		arguments = enumConstantDeclaration.arguments();
+		assertEquals("wrong size", 1, arguments.size());
+		argument = (Expression) arguments.get(0);
+		checkSourceRange(argument, "5", source);
+		assertEquals("not an number literal", ASTNode.NUMBER_LITERAL, argument.getNodeType());
+		binding = enumConstantDeclaration.resolveVariable();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong name", "NICKEL", binding.getName());
+
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(2);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "DIME", source);
+		checkSourceRange(enumConstantDeclaration, "DIME(10)", source);
+		arguments = enumConstantDeclaration.arguments();
+		assertEquals("wrong size", 1, arguments.size());
+		argument = (Expression) arguments.get(0);
+		checkSourceRange(argument, "10", source);
+		assertEquals("not an number literal", ASTNode.NUMBER_LITERAL, argument.getNodeType());
+		binding = enumConstantDeclaration.resolveVariable();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong name", "DIME", binding.getName());
+
+
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(3);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		checkSourceRange(enumConstantDeclaration.getName(), "QUARTER", source);
+		checkSourceRange(enumConstantDeclaration, "QUARTER(25)", source);
+		arguments = enumConstantDeclaration.arguments();
+		assertEquals("wrong size", 1, arguments.size());
+		argument = (Expression) arguments.get(0);
+		checkSourceRange(argument, "25", source);
+		assertEquals("not an number literal", ASTNode.NUMBER_LITERAL, argument.getNodeType());
+		binding = enumConstantDeclaration.resolveVariable();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong name", "QUARTER", binding.getName());
+	}
+
+	public void test0028() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0028", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		checkSourceRange(methodDeclaration.getName(), "foo", source);
+		checkSourceRange(methodDeclaration, "void foo(String[] args) {\n" +
+				"    	if (args.length < 2) {\n" +
+				"    		System.out.println(\"Usage: X <double> <double>\");\n" +
+				"    		return;\n" +
+				"    	}\n" +
+				"        double x = Double.parseDouble(args[0]);\n" +
+				"        double y = Double.parseDouble(args[1]);\n" +
+				"\n" +
+				"        for (X op : X.values())\n" +
+				"            System.out.println(x + \" \" + op + \" \" + y + \" = \" + op.eval(x, y));\n" +
+				"	}", source);
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		checkSourceRange(methodDeclaration.getName(), "bar", source);
+		checkSourceRange(methodDeclaration, "abstract double bar(double x, double y);", source);
+	}
+
+	public void test0029() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0029", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=67790
+	 */
+	public void test0030() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0030", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Not a constructor invocation", ASTNode.CONSTRUCTOR_INVOCATION, node.getNodeType());
+		checkSourceRange(node, "<T>this();", source);
+	}
+
+	public void test0031() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0031", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	public void test0032() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0032", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List superInterfaces = typeDeclaration.superInterfaceTypes();
+		assertEquals("wrong size", 1, superInterfaces.size());
+		Type type = (Type) superInterfaces.get(0);
+		assertEquals("wrong type", ASTNode.PARAMETERIZED_TYPE, type.getNodeType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		Type type2 = parameterizedType.getType();
+		checkSourceRange(type2, "C", source);
+	}
+
+	public void test0033() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0033", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	public void test0034() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0034", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=70292
+	 */
+	public void test0035() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0035", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=67790
+	 */
+	public void test0036() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0036", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		checkSourceRange(expressionStatement, "this.<T>foo();", source);
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		checkSourceRange(methodInvocation, "this.<T>foo()", source);
+		List typeArguments = methodInvocation.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=68838
+	 */
+	public void test0037() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0037", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List typeParameters = typeDeclaration.typeParameters();
+		assertEquals("Wrong size", 2, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		IBinding binding = typeParameter.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+		ITypeBinding typeBinding = (ITypeBinding) binding;
+		assertEquals("Wrong name", "T", typeBinding.getName());
+		assertTrue("Not a type variable", typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+		assertEquals("Wrong key", "Ltest0037/X;:TT;", typeBinding.getKey());
+		SimpleName simpleName = typeParameter.getName();
+		assertEquals("Wrong name", "T", simpleName.getIdentifier());
+		IBinding binding2 = simpleName.resolveBinding();
+		assertNotNull("No binding", binding2);
+		assertEquals("Wrong type", IBinding.TYPE, binding2.getKind());
+		ITypeBinding typeBinding2 = (ITypeBinding) binding2;
+		assertEquals("Wrong name", "T", typeBinding2.getName());
+		ITypeBinding typeBinding3 = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding3);
+		assertEquals("Wrong type", IBinding.TYPE, typeBinding3.getKind());
+		assertEquals("Wrong name", "T", typeBinding3.getName());
+
+		typeParameter = (TypeParameter) typeParameters.get(1);
+		binding = typeParameter.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+		typeBinding = (ITypeBinding) binding;
+		assertEquals("Wrong name", "U", typeBinding.getName());
+		assertTrue("Not a type variable", typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+		assertEquals("Wrong key", "Ltest0037/X;:TU;", typeBinding.getKey());
+		simpleName = typeParameter.getName();
+		assertEquals("Wrong name", "U", simpleName.getIdentifier());
+		binding2 = simpleName.resolveBinding();
+		assertNotNull("No binding", binding2);
+		assertEquals("Wrong type", IBinding.TYPE, binding2.getKind());
+		typeBinding2 = (ITypeBinding) binding2;
+		assertEquals("Wrong name", "U", typeBinding2.getName());
+		typeBinding3 = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding3);
+		assertEquals("Wrong type", IBinding.TYPE, typeBinding3.getKind());
+		assertEquals("Wrong name", "U", typeBinding3.getName());
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=69066
+	 */
+	public void test0038() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0038", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type typeArgument = (Type) typeArguments.get(0);
+		checkSourceRange(typeArgument, "T", source);
+		ITypeBinding typeBinding = typeArgument.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong name", "T", typeBinding.getName());
+		ITypeBinding[] typeParameters = typeBinding.getTypeParameters();
+		assertEquals("Wrong size", 0, typeParameters.length);
+		assertEquals("Wrong isArray", false, typeBinding.isArray());
+		assertEquals("Wrong isAnnotation", false, typeBinding.isAnnotation());
+		assertEquals("Wrong isAnonymous", false, typeBinding.isAnonymous());
+		assertEquals("Wrong isClass", false, typeBinding.isClass());
+		assertEquals("Wrong isEnum", false, typeBinding.isEnum());
+		assertEquals("Wrong isInterface", false, typeBinding.isInterface());
+		assertEquals("Wrong isGenericType", false, typeBinding.isGenericType());
+		assertEquals("Wrong isLocal", false, typeBinding.isLocal());
+		assertEquals("Wrong isMember", false, typeBinding.isMember());
+		assertEquals("Wrong isNested", false, typeBinding.isNested());
+		assertEquals("Wrong isNullType", false, typeBinding.isNullType());
+		assertEquals("Wrong isParameterizedType", false, typeBinding.isParameterizedType());
+		assertEquals("Wrong isPrimitive", false, typeBinding.isPrimitive());
+		assertEquals("Wrong isRawType", false, typeBinding.isRawType());
+		assertEquals("Wrong isTopLevel", false, typeBinding.isTopLevel());
+		assertEquals("Wrong isUpperbound", false, typeBinding.isUpperbound());
+		assertEquals("Wrong isTypeVariable", true, typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+		assertEquals("Wrong isWildcardType", false, typeBinding.isWildcardType());
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		assertEquals("Wrong name", "X<T>", typeBinding2.getName());
+		assertEquals("Wrong isArray", false, typeBinding2.isArray());
+		assertEquals("Wrong isAnnotation", false, typeBinding2.isAnnotation());
+		assertEquals("Wrong isAnonymous", false, typeBinding2.isAnonymous());
+		assertEquals("Wrong isClass", true, typeBinding2.isClass());
+		assertEquals("Wrong isEnum", false, typeBinding2.isEnum());
+		assertEquals("Wrong isInterface", false, typeBinding2.isInterface());
+		assertEquals("Wrong isGenericType", false, typeBinding2.isGenericType());
+		assertEquals("Wrong isLocal", false, typeBinding2.isLocal());
+		assertEquals("Wrong isMember", false, typeBinding2.isMember());
+		assertEquals("Wrong isNested", false, typeBinding2.isNested());
+		assertEquals("Wrong isNullType", false, typeBinding2.isNullType());
+		assertEquals("Wrong isParameterizedType", true, typeBinding2.isParameterizedType());
+		assertEquals("Wrong isPrimitive", false, typeBinding2.isPrimitive());
+		assertEquals("Wrong isRawType", false, typeBinding2.isRawType());
+		assertEquals("Wrong isTopLevel", true, typeBinding2.isTopLevel());
+		assertEquals("Wrong isUpperbound", false, typeBinding2.isUpperbound());
+		assertEquals("Wrong isTypeVariable", false, typeBinding2.isTypeVariable());
+		assertEquals("Wrong isWildcardType", false, typeBinding2.isWildcardType());
+		typeParameters = typeBinding2.getTypeParameters();
+		assertEquals("Wrong size", 0, typeParameters.length);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72233
+	 */
+	public void test0039() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0039", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72248
+	 */
+	public void test0040() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0040", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List typeParameters = methodDeclaration.typeParameters();
+		assertEquals("wrong size", 1, typeParameters.size());
+		TypeParameter parameter = (TypeParameter) typeParameters.get(0);
+		IBinding binding = parameter.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind());
+		assertEquals("wrong key", "Ltest0040/X;.foo<T:Ljava/lang/Object;>()TT;:TT;", binding.getKey());
+		Type returnType = methodDeclaration.getReturnType2();
+		IBinding binding2 = returnType.resolveBinding();
+		assertNotNull("No binding", binding2);
+		assertEquals("wrong type", IBinding.TYPE, binding2.getKind());
+		assertEquals("wrong key", "Ltest0040/X;.foo<T:Ljava/lang/Object;>()TT;:TT;", binding2.getKey());
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72477
+	 */
+	public void test0041() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0041", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=73048
+	 */
+	public void test0042() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0042", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List typeParameters = methodDeclaration.typeParameters();
+		assertEquals("wrong size", 1, typeParameters.size());
+		TypeParameter parameter = (TypeParameter) typeParameters.get(0);
+		IBinding binding = parameter.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind());
+		assertEquals("wrong key", "Ltest0042/X;.foo<T:Ljava/lang/Object;>()[TT;:TT;", binding.getKey());
+		Type returnType = methodDeclaration.getReturnType2();
+		IBinding binding2 = returnType.resolveBinding();
+		assertNotNull("No binding", binding2);
+		assertEquals("wrong type", IBinding.TYPE, binding2.getKind());
+		assertEquals("wrong key", "[Ltest0042/X;.foo<T:Ljava/lang/Object;>()[TT;:TT;", binding2.getKey());
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72882
+	 */
+	public void test0043() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0043", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List typeParameters = typeDeclaration.typeParameters();
+		assertEquals("Wrong size", 1, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		IBinding binding = typeParameter.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+		ITypeBinding typeBinding = (ITypeBinding) binding;
+		assertEquals("Wrong qualified name", "T", typeBinding.getQualifiedName());
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72891
+	 */
+	public void test0044() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0044", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List typeParameters = methodDeclaration.typeParameters();
+		assertEquals("wrong size", 1, typeParameters.size());
+		TypeParameter parameter = (TypeParameter) typeParameters.get(0);
+		IBinding binding = parameter.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind());
+		assertEquals("wrong key", "Ltest0044/X;.foo<Z:Ljava/lang/Object;>(TZ;)V:TZ;", binding.getKey());
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull("no binding", methodBinding);
+		assertFalse("Wrong isConstructor", methodBinding.isConstructor());
+		assertFalse("Wrong isDefaultConstructor", methodBinding.isDefaultConstructor());
+		assertFalse("Wrong isDeprecated", methodBinding.isDeprecated());
+		assertTrue("Wrong isGenericMethod", methodBinding.isGenericMethod());
+		assertFalse("Wrong isParameterizedMethod", methodBinding.isParameterizedMethod());
+		assertFalse("Wrong isRawMethod", methodBinding.isRawMethod());
+		assertFalse("Wrong isSynthetic", methodBinding.isSynthetic());
+		assertFalse("Wrong isVarargs", methodBinding.isVarargs());
+		ITypeBinding[] typeParametersBindings = methodBinding.getTypeParameters();
+		assertNotNull("No type parameters", typeParametersBindings);
+		assertEquals("Wrong size", 1, typeParametersBindings.length);
+		ITypeBinding typeBinding = typeParametersBindings[0];
+		assertTrue("Not a type variable", typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+		assertEquals("Wrong fully qualified name", "Z", typeBinding.getQualifiedName());
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72891
+	 */
+	public void test0045() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0045", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 1, 0, 1);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not a expression statement", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = methodInvocation.resolveMethodBinding();
+		assertTrue("Not parameterized", methodBinding.isParameterizedMethod());
+		ITypeBinding[] typeArguments = methodBinding.getTypeArguments();
+		assertNotNull("No type arguments", typeArguments);
+		assertEquals("Wrong size", 1, typeArguments.length);
+		assertEquals("Wrong qualified name", "java.lang.String", typeArguments[0].getQualifiedName());
+		IMethodBinding genericMethod = methodBinding.getMethodDeclaration();
+		assertNotNull("No generic method", genericMethod);
+		assertFalse("Not a parameterized method", genericMethod.isParameterizedMethod());
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72889
+	 */
+	public void test0046() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0046", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		Type superclassType = typeDeclaration.getSuperclassType();
+		ITypeBinding typeBinding = superclassType.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		String key1 = typeBinding.getKey();
+		node = getASTNode(compilationUnit, 1, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		String key2 = typeBinding.getKey();
+		assertFalse("Same keys", key1.equals(key2));
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=72859
+	 */
+	public void test0047() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0047", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=73561
+	 */
+	public void test0048() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0048", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		List enumConstants = enumDeclaration.enumConstants();
+		assertEquals("wrong size", 2, enumConstants.size());
+		EnumConstantDeclaration enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(0);
+		IMethodBinding methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration, "GREEN(0, 1)", source);
+		checkSourceRange(enumConstantDeclaration.getName(), "GREEN", source);
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(1);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "RED", source);
+		checkSourceRange(enumConstantDeclaration, "RED()", source);
+	}
+
+	/**
+	 * Test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=73561
+	 */
+	public void test0049() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0049", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		List enumConstants = enumDeclaration.enumConstants();
+		assertEquals("wrong size", 2, enumConstants.size());
+		EnumConstantDeclaration enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(0);
+		IMethodBinding methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration, "GREEN(0, 1)", source);
+		checkSourceRange(enumConstantDeclaration.getName(), "GREEN", source);
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(1);
+		methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		checkSourceRange(enumConstantDeclaration.getName(), "RED", source);
+		checkSourceRange(enumConstantDeclaration, "RED", source);
+	}
+
+	/**
+	 * Ellipsis
+	 */
+	public void test0050() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0050", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		final String expectedOutput = "Extended dimensions are illegal for a variable argument";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		assertTrue("Not a varargs", singleVariableDeclaration.isVarargs());
+		final Type type = singleVariableDeclaration.getType();
+		checkSourceRange(type, "String[]", source);
+		assertTrue("not an array type", type.isArrayType());
+		ArrayType arrayType = (ArrayType) type;
+		checkSourceRange(arrayType.getElementType(), "String", source);
+		assertEquals("Wrong extra dimensions", 1, singleVariableDeclaration.getExtraDimensions());
+	}
+
+	/**
+	 * Ellipsis
+	 */
+	public void test0051() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0051", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertTrue("Not a varargs", methodBinding.isVarargs());
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		assertTrue("Not a varargs", singleVariableDeclaration.isVarargs());
+		final Type type = singleVariableDeclaration.getType();
+		checkSourceRange(type, "String[]", source);
+		assertTrue("not an array type", type.isArrayType());
+		ArrayType arrayType = (ArrayType) type;
+		checkSourceRange(arrayType.getElementType(), "String", source);
+		assertEquals("Wrong extra dimensions", 0, singleVariableDeclaration.getExtraDimensions());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=76103
+	 */
+	public void test0052() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0052", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=76100
+	 */
+	public void test0053() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0053", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an annotation type declaration", ASTNode.ANNOTATION_TYPE_DECLARATION, node.getNodeType());
+		AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) node;
+		assertNotNull("No javadoc", annotationTypeDeclaration.getJavadoc());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=76100
+	 */
+	public void test0054() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0054", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an annotation type declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		assertNotNull("No javadoc", enumDeclaration.getJavadoc());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=76100
+	 */
+	public void test0055() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0055", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an annotation type declaration", ASTNode.ANNOTATION_TYPE_DECLARATION, node.getNodeType());
+		AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) node;
+		assertNotNull("No javadoc", annotationTypeDeclaration.getJavadoc());
+	}
+
+	/**
+	 *
+	 */
+	public void test0056() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0056", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		final String expectedOutput = "Zork1 cannot be resolved to a type";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77175
+	 */
+	public void test0057() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0057", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		ITypeBinding typeBinding = enumDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not an enum type", typeBinding.isEnum());
+		assertTrue("Not a top level type", typeBinding.isTopLevel());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77249
+	 */
+	public void test0058() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0058", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, false, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertTrue("Not public type declaration", Modifier.isPublic(typeDeclaration.getModifiers()));
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77772
+	 */
+	public void test0059() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0059", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+	}
+
+	/*
+	 * Ensures that the type parameters of a method are included in its binding key.
+	 * (regression test for 73970 [1.5][dom] overloaded parameterized methods have same method binding key)
+	 */
+	public void test0060() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"/*start*/public class X {\n" +
+			"  <T> void foo(T t) {\n" +
+			"  }\n" +
+			"  <T extends X> void foo(T t) {\n" +
+			"  }\n" +
+			"  <T extends Class> void foo(T t) {\n" +
+			"  }\n" +
+			"  <T extends Exception & Runnable> void foo(T t) {\n" +
+			"  }\n" +
+			"}/*end*/",
+			this.workingCopy,
+			false);
+		MethodDeclaration[] methods = ((TypeDeclaration) node).getMethods();
+		int length = methods.length;
+		String[] keys = new String[length];
+		for (int i = 0; i < length; i++)
+			keys[i] = methods[i].resolveBinding().getKey();
+		assertBindingKeysEqual(
+			"Lp/X;.foo<T:Ljava/lang/Object;>(TT;)V\n" +
+			"Lp/X;.foo<T:Lp/X;>(TT;)V\n" +
+			"Lp/X;.foo<T:Ljava/lang/Class;>(TT;)V\n" +
+			"Lp/X;.foo<T:Ljava/lang/Exception;:Ljava/lang/Runnable;>(TT;)V",
+			keys);
+	}
+
+	/*
+	 * Ensures that the type parameters of a generic type are included in its binding key.
+	 * (regression test for 77808 [1.5][dom] type bindings for raw List and List<E> have same key)
+	 */
+	public void test0061() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"/*start*/public class X<T> {\n" +
+			"}/*end*/",
+			this.workingCopy);
+		IBinding binding = ((TypeDeclaration) node).resolveBinding();
+		assertBindingKeyEquals(
+			"Lp/X<TT;>;",
+			binding.getKey());
+	}
+
+	/*
+	 * Ensures that the type arguments of a parameterized type are included in its binding key.
+	 */
+	public void test0062() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"public class X<T> {\n" +
+			"  /*start*/X<Class>/*end*/ f;\n" +
+			"}",
+			this.workingCopy,
+			false);
+		IBinding binding = ((Type) node).resolveBinding();
+		assertBindingKeyEquals(
+			"Lp/X<Ljava/lang/Class<>;>;",
+			binding.getKey());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
+	 */
+	public void test0063() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0063", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Wrong node", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name", "test0063.X", typeBinding.getQualifiedName());
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Wrong node", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		typeBinding = expression.resolveTypeBinding();
+		assertTrue("Not parameterized", typeBinding.isParameterizedType());
+		assertEquals("Wrong qualified name", "test0063.X<java.lang.String>", typeBinding.getQualifiedName());
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Wrong node", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration declaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = declaration.getType();
+		typeBinding = type.resolveBinding();
+		assertEquals("Wrong qualified name", "java.util.List<? extends test0063.X<?>>", typeBinding.getQualifiedName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
+	 */
+	public void test0064() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0064", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Wrong node", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name", "test0064.X", typeBinding.getQualifiedName());
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Wrong node", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		typeBinding = expression.resolveTypeBinding();
+		assertTrue("Not parameterized", typeBinding.isParameterizedType());
+		assertEquals("Wrong qualified name", "test0064.X<java.lang.String,java.lang.Integer>", typeBinding.getQualifiedName());
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Wrong node", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration declaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = declaration.getType();
+		typeBinding = type.resolveBinding();
+		assertEquals("Wrong qualified name", "java.util.List<? extends test0064.X<?,?>>", typeBinding.getQualifiedName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
+	 */
+	public void test0065() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0065", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Wrong node", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name", "test0065.X", typeBinding.getQualifiedName());
+		ITypeBinding genericType = typeBinding.getTypeDeclaration();
+		assertEquals("Wrong qualified name", "test0065.X", genericType.getQualifiedName());
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Wrong node", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		typeBinding = expression.resolveTypeBinding();
+		assertTrue("Not parameterized", typeBinding.isParameterizedType());
+		assertEquals("Wrong qualified name", "test0065.X<java.lang.String,java.util.List<?>>", typeBinding.getQualifiedName());
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Wrong node", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration declaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = declaration.getType();
+		typeBinding = type.resolveBinding();
+		assertEquals("Wrong qualified name", "java.util.List<? extends test0065.X<?,?>>", typeBinding.getQualifiedName());
+	}
+
+	/*
+	 * Ensures that a raw type doesn't include the type parameters in its binding key.
+	 * (regression test for 77808 [1.5][dom] type bindings for raw List and List<E> have same key)
+	 */
+	public void test0066() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"public class X<T> {\n" +
+			"  /*start*/X/*end*/ field;" +
+			"}",
+			this.workingCopy,
+			false);
+		IBinding binding = ((Type) node).resolveBinding();
+		assertBindingKeyEquals(
+			"Lp/X<>;",
+			binding.getKey());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78649
+	 */
+	public void test0067() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0067", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Wrong node", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = singleVariableDeclaration.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type type2 = (Type) typeArguments.get(0);
+		assertTrue("Not a wildcard type", type2.isWildcardType());
+		WildcardType wildcardType = (WildcardType) type2;
+		assertTrue("Not an upperbound type", wildcardType.isUpperBound());
+		ITypeBinding typeBinding = wildcardType.resolveBinding();
+		assertTrue("Not an upperbound type binding", typeBinding.isUpperbound());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78649
+	 */
+	public void test0068() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0068", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Wrong node", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = singleVariableDeclaration.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		List typeArguments = parameterizedType.typeArguments();
+		assertEquals("Wrong size", 1, typeArguments.size());
+		Type type2 = (Type) typeArguments.get(0);
+		assertTrue("Not a wildcard type", type2.isWildcardType());
+		WildcardType wildcardType = (WildcardType) type2;
+		assertFalse("An upperbound type", wildcardType.isUpperBound());
+		ITypeBinding typeBinding = wildcardType.resolveBinding();
+		assertFalse("An upperbound type binding", typeBinding.isUpperbound());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
+	 */
+	public void test0069() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0069", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		assertNotNull("No binding", parameterizedType.resolveBinding());
+		Type type2 = parameterizedType.getType();
+		assertTrue("Not a qualified type", type2.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type2;
+		ITypeBinding typeBinding = qualifiedType.resolveBinding();
+        assertNotNull("No binding", typeBinding);
+        assertEquals("Wrong name 1", "test0069.Outer<java.lang.String>.Inner<java.lang.Integer>", typeBinding.getQualifiedName());
+		SimpleName simpleName = qualifiedType.getName();
+        IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", simpleName.resolveBinding());
+        assertEquals("Wrong name 2", "test0069.Outer<java.lang.String>.Inner<java.lang.Integer>", typeBinding.getQualifiedName());
+		Type type3 = qualifiedType.getQualifier();
+		assertTrue("Not a parameterized type", type3.isParameterizedType());
+		ParameterizedType parameterizedType2 = (ParameterizedType) type3;
+        typeBinding = parameterizedType2.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+        assertEquals("Wrong name 3", "test0069.Outer<java.lang.String>", typeBinding.getQualifiedName());
+		Type type4 = parameterizedType2.getType();
+		assertTrue("Not a simple type", type4.isSimpleType());
+		SimpleType simpleType = (SimpleType) type4;
+		assertNotNull("No binding", simpleType.resolveBinding());
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.isQualifiedName());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		assertNotNull("No binding", qualifiedName.resolveBinding());
+		Name name2 = qualifiedName.getQualifier();
+		assertTrue("Not a simpleName", name2.isSimpleName());
+		SimpleName simpleName2 = (SimpleName) name2;
+		binding = simpleName2.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("wrong type", IBinding.PACKAGE, binding.getKind());
+		SimpleName simpleName3 = qualifiedName.getName();
+		assertNotNull("No binding", simpleName3.resolveBinding());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
+	 */
+	public void test0070() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0070", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		assertNotNull("No binding", parameterizedType.resolveBinding());
+		Type type2 = parameterizedType.getType();
+		assertTrue("Not a qualified type", type2.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type2;
+		ITypeBinding typeBinding = qualifiedType.resolveBinding();
+        assertNotNull("No binding", typeBinding);
+        assertEquals("Wrong name 1", "test0070.Outer<java.lang.String>.Inner<java.lang.Number>", typeBinding.getQualifiedName());
+		SimpleName simpleName = qualifiedType.getName();
+        typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+        assertEquals("Wrong name 2", "test0070.Outer<java.lang.String>.Inner<java.lang.Number>", typeBinding.getQualifiedName());
+		Type type3 = qualifiedType.getQualifier();
+		assertTrue("Not a parameterized type", type3.isParameterizedType());
+		ParameterizedType parameterizedType2 = (ParameterizedType) type3;
+        typeBinding = parameterizedType2.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+        assertEquals("Wrong name 3", "test0070.Outer<java.lang.String>", typeBinding.getQualifiedName());
+		Type type4 = parameterizedType2.getType();
+		assertTrue("Not a simple type", type4.isSimpleType());
+		SimpleType simpleType = (SimpleType) type4;
+		typeBinding = simpleType.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+        assertEquals("Wrong name 3", "test0070.Outer<java.lang.String>", typeBinding.getQualifiedName());
+		Name name = simpleType.getName();
+		assertTrue("Not a simpleName", name.isSimpleName());
+		SimpleName simpleName2 = (SimpleName) name;
+		typeBinding = simpleName2.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+        assertEquals("Wrong name 3", "test0070.Outer", typeBinding.getQualifiedName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78930
+	 */
+	public void test0071() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0071", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List typeParameters = methodDeclaration.typeParameters();
+		assertEquals("wrong size", 1, typeParameters.size());
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		ITypeBinding[] typeBindings = methodBinding.getTypeParameters();
+		assertEquals("wrong size", 1, typeBindings.length);
+		ITypeBinding typeBinding = typeBindings[0];
+		IJavaElement javaElement = typeBinding.getJavaElement();
+		assertNotNull("No java element", javaElement);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77645
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		assertProblemsSize(unit, 0);
+		unit.accept(new ASTVisitor() {
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SingleVariableDeclaration)
+			 */
+			public boolean visit(SingleVariableDeclaration node) {
+				IVariableBinding binding = node.resolveBinding();
+				assertNotNull("No method", binding.getDeclaringMethod());
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.VariableDeclarationFragment)
+			 */
+			public boolean visit(VariableDeclarationFragment node) {
+				IVariableBinding binding = node.resolveBinding();
+				ASTNode parent = node.getParent();
+				if (parent != null && binding != null) {
+					final IMethodBinding declaringMethod = binding.getDeclaringMethod();
+					final String variableBindingName = binding.getName();
+					switch(parent.getNodeType()) {
+						case ASTNode.FIELD_DECLARATION :
+							assertNull("Got a method", declaringMethod);
+							break;
+						default :
+							if (variableBindingName.equals("var1")
+									|| variableBindingName.equals("var2")) {
+								assertNull("Got a method", declaringMethod);
+							} else {
+								assertNotNull("No method", declaringMethod);
+								String methodName = declaringMethod.getName();
+								if (variableBindingName.equals("var4")) {
+									assertEquals("Wrong method", "foo", methodName);
+								} else if (variableBindingName.equals("var5")) {
+									assertEquals("Wrong method", "foo2", methodName);
+								} else if (variableBindingName.equals("var7")) {
+									assertEquals("Wrong method", "foo3", methodName);
+								} else if (variableBindingName.equals("var8")) {
+									assertEquals("Wrong method", "X", methodName);
+								} else if (variableBindingName.equals("var9")) {
+									assertEquals("Wrong method", "bar3", methodName);
+								} else if (variableBindingName.equals("var10")) {
+									assertEquals("Wrong method", "bar3", methodName);
+								} else if (variableBindingName.equals("var11")) {
+									assertEquals("Wrong method", "bar3", methodName);
+								} else if (variableBindingName.equals("var12")) {
+									assertEquals("Wrong method", "X", methodName);
+								}
+							}
+					}
+				}
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.FieldAccess)
+			 */
+			public boolean visit(FieldAccess node) {
+				IVariableBinding binding = node.resolveFieldBinding();
+				assertNull("No method", binding.getDeclaringMethod());
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(org.eclipse.jdt.core.dom.SuperFieldAccess)
+			 */
+			public boolean visit(SuperFieldAccess node) {
+				IVariableBinding binding = node.resolveFieldBinding();
+				assertNull("No method", binding.getDeclaringMethod());
+				return false;
+			}
+		});
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77806
+	 */
+	public void test0073() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0073", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		assertNotNull("No binding", type.resolveBinding());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		ITypeBinding binding = parameterizedType.resolveBinding();
+		assertNotNull("No binding", binding);
+		Type type2 = parameterizedType.getType();
+		assertTrue("Not a simple type", type2.isSimpleType());
+		ITypeBinding binding2 = type2.resolveBinding();
+		assertNotNull("No binding", binding2);
+		SimpleType simpleType = (SimpleType) type2;
+		Name name = simpleType.getName();
+		assertTrue("Not a simpleName", name.isSimpleName());
+		SimpleName simpleName = (SimpleName) name;
+		ITypeBinding binding3 = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", binding3);
+		assertTrue("Different binding", binding3.isEqualTo(binding));
+		assertTrue("Different binding", binding2.isEqualTo(binding));
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
+	 */
+	public void test0074() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0074", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		assertNotNull("No binding", type.resolveBinding());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		Type type2 = parameterizedType.getType();
+		assertTrue("Not a simple type", type2.isSimpleType());
+		final ITypeBinding binding = type2.resolveBinding();
+		assertNotNull("No binding", binding);
+		SimpleType simpleType = (SimpleType) type2;
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.isQualifiedName());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		SimpleName simpleName = qualifiedName.getName();
+		ITypeBinding binding2 = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", binding2);
+		assertTrue("Different binding", binding2.isEqualTo(binding));
+        assertEquals("wrong name", "java.util.List<java.lang.String>", binding2.getQualifiedName());
+		Name name2 = qualifiedName.getQualifier();
+		assertTrue("Not a qualified name", name2.isQualifiedName());
+		QualifiedName qualifiedName2 = (QualifiedName) name2;
+		IBinding binding3 = qualifiedName2.resolveBinding();
+		assertNotNull("No binding", binding3);
+		assertEquals("wrong kind", IBinding.PACKAGE, binding3.getKind());
+        assertEquals("wrong name2", "java.util", binding3.getName());
+        simpleName = qualifiedName2.getName();
+        binding3 = simpleName.resolveBinding();
+        assertNotNull("No binding", binding3);
+        assertEquals("wrong kind", IBinding.PACKAGE, binding3.getKind());
+        assertEquals("wrong name2", "java.util", binding3.getName());
+        name2 = qualifiedName2.getQualifier();
+        assertTrue("Not a simple name", name2.isSimpleName());
+        simpleName = (SimpleName) name2;
+        binding3 = simpleName.resolveBinding();
+        assertNotNull("No binding", binding3);
+        assertEquals("wrong kind", IBinding.PACKAGE, binding3.getKind());
+        assertEquals("wrong name2", "java", binding3.getName());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79271
+	 */
+	public void test0075() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"import java.util.ArrayList;\n" +
+			"public class X {\n" +
+			"  /*start*/ArrayList<Integer>/*end*/ field;" +
+			"}",
+			this.workingCopy);
+		ITypeBinding binding = ((Type) node).resolveBinding();
+		ITypeBinding genericType = binding.getTypeDeclaration();
+		assertFalse("Equals", binding.isEqualTo(genericType));
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79362
+	 */
+	public void test0076() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0076", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedOutput = "Type mismatch: cannot convert from Map[] to Map<String,Double>[][]";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Wrong type", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "Map<String, Double>[][]", source);
+		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
+		ArrayType arrayType = (ArrayType) type;
+		type = arrayType.getElementType();
+		checkSourceRange(type, "Map<String, Double>", source);
+		assertEquals("wrong type", ASTNode.PARAMETERIZED_TYPE, type.getNodeType());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79362
+	 */
+	public void test0077() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0077", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedOutput = "Type mismatch: cannot convert from Map[] to Map<String,Double>[][]";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Wrong type", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "java.util.Map<String, Double>[][]", source);
+		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
+		ArrayType arrayType = (ArrayType) type;
+		type = arrayType.getElementType();
+		checkSourceRange(type, "java.util.Map<String, Double>", source);
+		assertEquals("wrong type", ASTNode.PARAMETERIZED_TYPE, type.getNodeType());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
+	 */
+	public void test0078() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"public class X<T> {\n" +
+			"  String foo(int i) { return /*start*/Integer.toString(i)/*end*/;}" +
+			"}",
+			this.workingCopy);
+		IMethodBinding methodBinding = ((MethodInvocation) node).resolveMethodBinding();
+		assertFalse("Is a raw method", methodBinding.isRawMethod());
+		assertFalse("Is a parameterized method", methodBinding.isParameterizedMethod());
+		assertFalse("Is a generic method", methodBinding.isGenericMethod());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
+	 */
+	public void test0079() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"public class X {\n" +
+			"	\n" +
+			"	/*start*/<T extends A> T foo(T t) {\n" +
+			"		return t;\n" +
+			"	}/*end*/\n" +
+			"	public static void main(String[] args) {\n" +
+			"		new X().bar();\n" +
+			"	}\n" +
+			"	void bar() {\n" +
+			"		B b = foo(new B());\n" +
+			"	}\n" +
+			"}\n" +
+			"\n" +
+			"class A {}\n" +
+			"class B extends A {}\n",
+			this.workingCopy);
+		IMethodBinding methodBinding = ((MethodDeclaration) node).resolveBinding();
+		assertFalse("Is a raw method", methodBinding.isRawMethod());
+		assertFalse("Is a parameterized method", methodBinding.isParameterizedMethod());
+		assertTrue("Not a generic method", methodBinding.isGenericMethod());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
+	 */
+	public void test0080() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"public class X {\n" +
+			"	\n" +
+			"	<T extends A> T foo(T t) {\n" +
+			"		return t;\n" +
+			"	}\n" +
+			"	public static void main(String[] args) {\n" +
+			"		new X().bar();\n" +
+			"	}\n" +
+			"	void bar() {\n" +
+			"		B b = /*start*/foo(new B())/*end*/;\n" +
+			"	}\n" +
+			"}\n" +
+			"\n" +
+			"class A {}\n" +
+			"class B extends A {}\n",
+			this.workingCopy);
+		IMethodBinding methodBinding = ((MethodInvocation) node).resolveMethodBinding();
+		assertFalse("Is a raw method", methodBinding.isRawMethod());
+		assertTrue("Not a parameterized method", methodBinding.isParameterizedMethod());
+		assertFalse("Is a generic method", methodBinding.isGenericMethod());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79460
+	 */
+	public void test0081() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0081", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedOutput =
+			"Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+			"Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+			"Type safety: The method foo(Object) belongs to the raw type Y. References to generic type Y<T> should be parameterized\n" +
+			"Y is a raw type. References to generic type Y<T> should be parameterized";
+		assertProblemsSize(compilationUnit, 4, expectedOutput);
+		ASTNode node = getASTNode(compilationUnit, 1, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = methodInvocation.resolveMethodBinding();
+		assertEquals("Wrong name", "foo", methodBinding.getName());
+		assertTrue("Not a raw method", methodBinding.isRawMethod());
+		assertFalse("Is a parameterized method", methodBinding.isParameterizedMethod());
+		assertFalse("Is a generic method", methodBinding.isGenericMethod());
+		assertFalse("Doesn't override itself", methodBinding.overrides(methodBinding));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78183
+	 */
+	public void test0082() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0082", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedOutput =
+			"Gen is a raw type. References to generic type Gen<X> should be parameterized\n" +
+			"Gen.Inn is a raw type. References to generic type Gen<X>.Inn should be parameterized";
+		assertProblemsSize(compilationUnit, 2, expectedOutput);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong name", "Gen", typeBinding.getName());
+		assertEquals("Wrong name", "test0082.Gen", typeBinding.getQualifiedName());
+		assertTrue("Not a class", typeBinding.isClass());
+		assertTrue("Not a generic type", typeBinding.isGenericType());
+		assertTrue("Not a top level", typeBinding.isTopLevel());
+
+		node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a member type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		typeDeclaration = (TypeDeclaration) node;
+		typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong name", "Inn", typeBinding.getName());
+		assertEquals("Wrong name", "test0082.Gen.Inn", typeBinding.getQualifiedName());
+		assertTrue("Not a class", typeBinding.isClass());
+		assertTrue("Not a member", typeBinding.isMember());
+		assertTrue("Not a nested class", typeBinding.isNested());
+
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		typeBinding = fieldDeclaration.getType().resolveBinding();
+		assertEquals("Wrong name", "Gen<String>", typeBinding.getName());
+		assertEquals("Wrong name", "test0082.Gen<java.lang.String>", typeBinding.getQualifiedName());
+		assertTrue("Not a class", typeBinding.isClass());
+		assertTrue("Not a parameterized type", typeBinding.isParameterizedType());
+		assertTrue("Not a toplevel", typeBinding.isTopLevel());
+
+		node = getASTNode(compilationUnit, 0, 2);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		typeBinding = fieldDeclaration.getType().resolveBinding();
+		assertEquals("Wrong name", "Inn", typeBinding.getName());
+		assertEquals("Wrong name", "test0082.Gen<java.lang.String>.Inn", typeBinding.getQualifiedName());
+		assertTrue("Not a class", typeBinding.isClass());
+		assertTrue("Not a member", typeBinding.isMember());
+		assertTrue("Not a nested class", typeBinding.isNested());
+		assertFalse("Is parameterized", typeBinding.isParameterizedType());
+
+		node = getASTNode(compilationUnit, 0, 3);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		typeBinding = fieldDeclaration.getType().resolveBinding();
+		assertEquals("Wrong name", "Gen", typeBinding.getName());
+		assertEquals("Wrong name", "test0082.Gen", typeBinding.getQualifiedName());
+		assertTrue("Not a class", typeBinding.isClass());
+		assertTrue("Not a raw type", typeBinding.isRawType());
+		assertTrue("Not a toplevel", typeBinding.isTopLevel());
+
+		node = getASTNode(compilationUnit, 0, 4);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		typeBinding = fieldDeclaration.getType().resolveBinding();
+		assertEquals("Wrong name", "Inn", typeBinding.getName());
+		assertEquals("Wrong name", "test0082.Gen.Inn", typeBinding.getQualifiedName());
+		assertTrue("Not a class", typeBinding.isClass());
+		assertTrue("Not a member", typeBinding.isMember());
+		assertTrue("Not a nested type", typeBinding.isNested());
+		assertFalse("Is parameterized", typeBinding.isParameterizedType());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79544
+	 */
+	public void test0083() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0083", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		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 field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		ITypeBinding typeBinding = fieldDeclaration.getType().resolveBinding();
+
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		ITypeBinding typeBinding2 = fieldDeclaration.getType().resolveBinding();
+
+		node = getASTNode(compilationUnit, 0, 2);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		ITypeBinding typeBinding3 = fieldDeclaration.getType().resolveBinding();
+
+		node = getASTNode(compilationUnit, 0, 3);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		ITypeBinding typeBinding4 = fieldDeclaration.getType().resolveBinding();
+
+		assertFalse("Binding are equals", typeBinding.isEqualTo(typeBinding2));
+		assertFalse("Binding are equals", typeBinding.isEqualTo(typeBinding3));
+		assertFalse("Binding are equals", typeBinding.isEqualTo(typeBinding4));
+		assertFalse("Binding are equals", typeBinding2.isEqualTo(typeBinding3));
+		assertFalse("Binding are equals", typeBinding2.isEqualTo(typeBinding4));
+		assertFalse("Binding are equals", typeBinding3.isEqualTo(typeBinding4));
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79612
+	 */
+	public void test0084() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0084", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		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 field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		ITypeBinding typeBinding = fieldDeclaration.getType().resolveBinding();
+
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		ITypeBinding typeBinding2 = fieldDeclaration.getType().resolveBinding();
+
+		assertFalse("Binding are equals", typeBinding.isEqualTo(typeBinding2));
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79609
+	 */
+	public void test0085() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0085", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		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 method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List typeParameters = methodDeclaration.typeParameters();
+		assertEquals("wrong size", 1, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		IBinding binding = typeParameter.resolveBinding();
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind());
+		ITypeBinding typeBinding = (ITypeBinding) binding;
+
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		typeParameters = methodDeclaration.typeParameters();
+		assertEquals("wrong size", 1, typeParameters.size());
+		typeParameter = (TypeParameter) typeParameters.get(0);
+		binding = typeParameter.resolveBinding();
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind());
+		ITypeBinding typeBinding2 = (ITypeBinding) binding;
+
+		assertFalse("Binding are equals", typeBinding.isEqualTo(typeBinding2));
+	}
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79512
+	 */
+	public void test0086() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"public class X {\n" +
+			"	\n" +
+			"public Object foo() {\n" +
+			"		return /*start*/X.class/*end*/;\n" +
+			"	}" +
+			"}\n" +
+			"\n" +
+			"class A {}\n" +
+			"class B extends A {}\n",
+			this.workingCopy);
+		TypeLiteral typeLiteral = (TypeLiteral) node;
+		ITypeBinding typeBinding = typeLiteral.resolveTypeBinding();
+		assertEquals("Wrong name", "java.lang.Class<p.X>", typeBinding.getQualifiedName());
+		assertEquals("Wrong name", "Class<X>", typeBinding.getName());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79775
+	 */
+	public void test0087() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		buildAST(
+			"package p;\n" +
+			"public class X<T1> {\n" +
+			"	public <M1> X() {\n" +
+			"	}\n" +
+			"	class Y<T2> {\n" +
+			"		public <M2> Y() {\n" +
+			"		}\n" +
+			"	}\n" +
+			"	void foo() {\n" +
+			"		new <Object>X<Object>().new <Object>Y<Object>();\n" +
+			"	}\n" +
+			"}\n",
+			this.workingCopy);
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=79690
+	 */
+	public void test0088() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0088", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertEquals("Wrong name", "E", typeBinding.getName());
+		assertTrue("Not a type variable", typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+		ASTNode node2 = compilationUnit.findDeclaringNode(typeBinding);
+		assertNotNull("No declaring node", node2);
+		ASTNode node3 = compilationUnit.findDeclaringNode(typeBinding.getKey());
+		assertNotNull("No declaring node", node3);
+		assertTrue("Nodes don't match", node2.subtreeMatch(new ASTMatcher(), node3));
+		node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List typeParameters = methodDeclaration.typeParameters();
+		assertEquals("Wrong size", 1, typeParameters.size());
+		TypeParameter typeParameter = (TypeParameter) typeParameters.get(0);
+		assertTrue("Nodes don't match", typeParameter.subtreeMatch(new ASTMatcher(), node3));
+		assertTrue("Nodes don't match", typeParameter.subtreeMatch(new ASTMatcher(), node2));
+	}
+
+	/*
+	 * Ensures that a parameterized method binding (with a wildcard parameter) doesn't throw a NPE when computing its binding key.
+	 * (regression test for 79967 NPE in WildcardBinding.signature with Mark Occurrences in Collections.class)
+	 */
+	public void test0089() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"public class X<T> {\n" +
+			"  void foo() {\n" +
+			"  }\n" +
+			"  void bar(X<?> x) {\n" +
+			"    /*start*/x.foo()/*end*/;\n"+
+			"  }\n" +
+			"}",
+			this.workingCopy);
+		IBinding binding = ((MethodInvocation) node).resolveMethodBinding();
+		assertBindingKeyEquals(
+			"Lp/X<!Lp/X;{0}*75;>;.foo()V",
+			binding.getKey());
+	}
+
+	/*
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=80021
+	 */
+	public void test0090() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode result = buildAST(
+			"package p;\n" +
+			"public class X {\n" +
+			"	public void foo() {}\n" +
+			"	public void bar(X x, int f) {\n" +
+			"		x.foo();\n" +
+			"	}\n" +
+			"}",
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		compilationUnit.accept(new ASTVisitor() {
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SingleVariableDeclaration)
+			 */
+			public boolean visit(SingleVariableDeclaration node) {
+				IVariableBinding binding = node.resolveBinding();
+				assertNotNull("No binding", binding);
+				IJavaElement javaElement = binding.getJavaElement();
+				assertNotNull("No java element", javaElement);
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.VariableDeclarationFragment)
+			 */
+			public boolean visit(VariableDeclarationFragment node) {
+				IVariableBinding binding = node.resolveBinding();
+				assertNotNull("No binding", binding);
+				IJavaElement javaElement = binding.getJavaElement();
+				assertNotNull("No java element", javaElement);
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.FieldAccess)
+			 */
+			public boolean visit(FieldAccess node) {
+				IVariableBinding binding = node.resolveFieldBinding();
+				assertNotNull("No binding", binding);
+				IJavaElement javaElement = binding.getJavaElement();
+				assertNotNull("No java element", javaElement);
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(org.eclipse.jdt.core.dom.SuperFieldAccess)
+			 */
+			public boolean visit(SuperFieldAccess node) {
+				IVariableBinding binding = node.resolveFieldBinding();
+				assertNotNull("No binding", binding);
+				IJavaElement javaElement = binding.getJavaElement();
+				assertNotNull("No java element", javaElement);
+				return false;
+			}
+		});
+	}
+
+	/*
+	 * Check bindings for annotation type declaration
+	 */
+	public void test0091() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"@interface X {\n" +
+			"	int id() default 0;\n" +
+			"}",
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an annotation type declaration", ASTNode.ANNOTATION_TYPE_DECLARATION, node.getNodeType());
+		AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) node;
+		ITypeBinding binding = annotationTypeDeclaration.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertTrue("Not an annotation", binding.isAnnotation());
+		assertEquals("Wrong name", "X", binding.getName());
+		node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not an annotation type member declaration", ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION, node.getNodeType());
+		AnnotationTypeMemberDeclaration memberDeclaration = (AnnotationTypeMemberDeclaration) node;
+		IMethodBinding methodBinding = memberDeclaration.resolveBinding();
+		assertNotNull("No binding", methodBinding);
+		assertEquals("Wrong name", "id", methodBinding.getName());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=80960
+	 */
+	public void test0092() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"import java.util.*;\n" +
+			"public class X {\n" +
+			"  public enum Rank { DEUCE, THREE, FOUR, FIVE, SIX,\n" +
+			"    SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE }\n" +
+			"\n" +
+			"  //public enum Suit { CLUBS, DIAMONDS, HEARTS, SPADES }\n" +
+			"  public enum Suit{\n" +
+			"\n" +
+			"  private X(int rank, int suit) {  \n" +
+			"  }\n" +
+			"  \n" +
+			"  private static final List<X> protoDeck = new ArrayList<X>();\n" +
+			"  \n" +
+			"  public static ArrayList<X> newDeck() {\n" +
+			"      return new ArrayList<X>(protoDeck); // Return copy of prototype deck\n" +
+			"  }\n" +
+			"}",
+			this.workingCopy,
+			false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=81023
+	 */
+	public void test0093() throws JavaModelException {
+		String contents =
+			"public class Test {\n" +
+			"    public <U> Test(U u) {\n" +
+			"    }\n" +
+			"\n" +
+			"    void bar() {\n" +
+			"        new <String> Test(null) {};\n" +
+			"    }\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/Test.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		node = getASTNode(compilationUnit, 0, 1, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		checkSourceRange(expression, "new <String> Test(null) {}", contents.toCharArray());
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		IJavaElement element = typeBinding.getJavaElement();
+		assertNotNull("No java element", element);
+	}
+
+
+	public void test0094() throws JavaModelException {
+		String contents =
+			"import java.lang.annotation.Target;\n" +
+			"import java.lang.annotation.Retention;\n" +
+			"\n" +
+			"@Retention(RetentionPolicy.SOURCE)\n" +
+			"@Target(ElementType.METHOD)\n" +
+			"@interface ThrowAwayMethod {\n" +
+			"\n" +
+			"	/**\n" +
+			"	 * Comment for <code>test</code>\n" +
+			"	 */\n" +
+			"	protected final Test test;\n" +
+			"\n" +
+			"	/**\n" +
+			"	 * @param test\n" +
+			"	 */\n" +
+			"	ThrowAwayMethod(Test test) {\n" +
+			"		this.test= test;\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/ThrowAwayMethod.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy,
+			false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+	}
+
+	/*
+	 * Ensures that resolving a generic method with a non existing parameter type doesn't throw a NPE when computing its binding key.
+	 * (regression test for 81134 [dom] [5.0] NPE when creating AST
+	 */
+	public void test0095() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"public class X {\n" +
+			"   /*start*/<T> void foo(NonExisting arg) {\n" +
+			"   }/*end*/\n" +
+			"}",
+			this.workingCopy,
+			false,
+			false,
+			true);
+		IMethodBinding methodBinding = ((MethodDeclaration) node).resolveBinding();
+		assertNotNull("No binding", methodBinding);
+		assertEquals("LX;.foo<T:Ljava/lang/Object;>(LNonExisting;)V", methodBinding.getKey());
+		assertFalse("Method should not be flagged as recovered", methodBinding.isRecovered());
+		assertTrue("Method argument type should be flagged as recovered", methodBinding.getParameterTypes()[0].isRecovered());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82140
+	 */
+	public void test0096() throws JavaModelException {
+		String contents =
+			"public @interface An1 {\n" +
+			"	String value();\n" +
+			"	String item() default \"Hello\";\n" +
+			"\n" +
+			"}\n" +
+			"\n" +
+			"@An1(value=\"X\") class A {\n" +
+			"	\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/An1.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		node = getASTNode(compilationUnit, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertEquals("Wrong name", "A", typeDeclaration.getName().getIdentifier());
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier instanceof Annotation);
+		checkSourceRange((Annotation) modifier, "@An1(value=\"X\")", contents.toCharArray());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82140
+	 */
+	public void test0097() throws JavaModelException {
+		String contents =
+			"@interface An1 {}\n" +
+			"@interface An2 {}\n" +
+			"@interface An3 {}\n" +
+			"@An2 class X {\n" +
+			"	@An1 Object o;\n" +
+			"	@An3 void foo() {\n" +
+			"		\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 3);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier instanceof Annotation);
+		checkSourceRange((Annotation) modifier, "@An2", contents.toCharArray());
+
+		node = getASTNode(compilationUnit, 3, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		modifiers = fieldDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+		modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier instanceof Annotation);
+		checkSourceRange((Annotation) modifier, "@An1", contents.toCharArray());
+
+		node = getASTNode(compilationUnit, 3, 1);
+		assertEquals("Not a field declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+		modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier instanceof Annotation);
+		checkSourceRange((Annotation) modifier, "@An3", contents.toCharArray());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82140
+	 */
+	public void test0098() throws JavaModelException {
+		String contents =
+			"class X {\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 0, modifiers.size());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82141
+	 */
+	public void test0099() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	@Override @Annot(value=\"Hello\") public String toString() {\n" +
+			"		return super.toString();\n" +
+			"	}\n" +
+			"	@Annot(\"Hello\") void bar() {\n" +
+			"	}\n" +
+			"	@interface Annot {\n" +
+			"		String value();\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong size", 3, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Wrong type", modifier instanceof Annotation);
+		Annotation annotation = (Annotation) modifier;
+		ITypeBinding binding = annotation.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+
+		modifier = (IExtendedModifier) modifiers.get(1);
+		assertTrue("Wrong type", modifier instanceof Annotation);
+		annotation = (Annotation) modifier;
+		binding = annotation.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", ASTNode.NORMAL_ANNOTATION, annotation.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
+		List values = normalAnnotation.values();
+		assertEquals("wrong size", 1, values.size());
+		MemberValuePair valuePair = (MemberValuePair) values.get(0);
+		SimpleName name = valuePair.getName();
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding", binding2);
+		ITypeBinding typeBinding = name.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+		modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Wrong type", modifier instanceof Annotation);
+		annotation = (Annotation) modifier;
+		binding = annotation.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82216
+	 */
+	public void test0100() throws JavaModelException {
+		String contents =
+			"public enum E {\n" +
+			"	A, B, C;\n" +
+			"	public static final E D = B;\n" +
+			"	public static final String F = \"Hello\";\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/E.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0);
+		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		List enumConstants = enumDeclaration.enumConstants();
+		assertEquals("wrong size", 3, enumConstants.size());
+		EnumConstantDeclaration enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(0);
+		IMethodBinding methodBinding = enumConstantDeclaration.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a constructor", methodBinding.isConstructor());
+		IVariableBinding variableBinding = enumConstantDeclaration.resolveVariable();
+		assertNotNull("no binding", variableBinding);
+		assertNull("is constant", variableBinding.getConstantValue());
+		assertTrue("Not an enum constant", variableBinding.isEnumConstant());
+
+		node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		assertEquals("wrong name", "D", fragment.getName().getIdentifier());
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("no binding", variableBinding);
+		assertFalse("An enum constant", variableBinding.isEnumConstant());
+
+		node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		assertEquals("wrong name", "F", fragment.getName().getIdentifier());
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("no binding", variableBinding);
+		assertNotNull("is constant", variableBinding.getConstantValue());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=68823
+	 */
+	public void test0101() throws JavaModelException {
+		String contents =
+			"public class X{\n" +
+			"	public void foo() {\n" +
+			"		assert (true): (\"hello\");\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		this.workingCopy.getBuffer().setContents(contents.toCharArray());
+		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true);		
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		String expectedOutput = "Dead code";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+		
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Not an assert statement", ASTNode.ASSERT_STATEMENT, node.getNodeType());
+		AssertStatement assertStatement = (AssertStatement) node;
+		final char[] source = contents.toCharArray();
+		checkSourceRange(assertStatement.getExpression(), "(true)", source);
+		checkSourceRange(assertStatement.getMessage(), "(\"hello\")", source);
+		checkSourceRange(assertStatement, "assert (true): (\"hello\");", source);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82670
+	 */
+	public void test0102() throws JavaModelException {
+		String contents =
+			"import java.util.HashMap;\n" +
+			"\n" +
+			"public class X {\n" +
+			"    Object o= new HashMap<?, ?>[0];\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		checkSourceRange(fragment, "o= new HashMap<?, ?>[0]", contents.toCharArray());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82985
+	 */
+	public void test0103() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0103", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List imports = compilationUnit.imports();
+		assertEquals("Wrong size", 2, imports.size());
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		IBinding binding = importDeclaration.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.VARIABLE, binding.getKind());
+		Name name = importDeclaration.getName();
+		binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.VARIABLE, binding.getKind());
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		SimpleName simpleName = qualifiedName.getName();
+		binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.VARIABLE, binding.getKind());
+
+		Name name2 = qualifiedName.getQualifier();
+		binding = name2.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name2.getNodeType());
+		qualifiedName = (QualifiedName) name2;
+		simpleName = qualifiedName.getName();
+		binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+
+		Name name3 = qualifiedName.getQualifier();
+		binding = name3.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind());
+
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name3.getNodeType());
+
+		importDeclaration = (ImportDeclaration) imports.get(1);
+		binding = importDeclaration.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertFalse("Not a single name import", importDeclaration.isOnDemand());
+		name = importDeclaration.getName();
+		binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.METHOD, binding.getKind());
+
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		qualifiedName = (QualifiedName) name;
+		simpleName = qualifiedName.getName();
+		binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.METHOD, binding.getKind());
+
+		name2 = qualifiedName.getQualifier();
+		binding = name2.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name2.getNodeType());
+		qualifiedName = (QualifiedName) name2;
+		simpleName = qualifiedName.getName();
+		binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+
+		name2 = qualifiedName.getQualifier();
+		binding = name2.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind());
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name2.getNodeType());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82985
+	 */
+	public void test0104() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0104", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List imports = compilationUnit.imports();
+		assertEquals("Wrong size", 1, imports.size());
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		IBinding binding = importDeclaration.resolveBinding();
+		assertNotNull("No binding", binding);
+		int kind = binding.getKind();
+		assertTrue("Wrong type", kind == IBinding.VARIABLE || kind == IBinding.METHOD);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=83011
+	 */
+	public void test0105() throws JavaModelException {
+		String contents =
+			"@interface Ann {}\n" +
+			"\n" +
+			"@Ann public class X {}\n";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 2, modifiers.size());
+		IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not a marker annotation", extendedModifier instanceof MarkerAnnotation);
+		MarkerAnnotation markerAnnotation = (MarkerAnnotation) extendedModifier;
+		ITypeBinding binding = markerAnnotation.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		Name name = markerAnnotation.getTypeName();
+		binding = name.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=83011
+	 */
+	public void test0106() throws JavaModelException {
+		String contents =
+			"package p;\n" +
+			"@interface Ann {}\n" +
+			"\n" +
+			"@p.Ann public class X {}\n";
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 2, modifiers.size());
+		IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not a marker annotation", extendedModifier instanceof MarkerAnnotation);
+		MarkerAnnotation markerAnnotation = (MarkerAnnotation) extendedModifier;
+		ITypeBinding typeBinding = markerAnnotation.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+		Name name = markerAnnotation.getTypeName();
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong kind of binding", IBinding.TYPE, binding.getKind());
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		SimpleName simpleName = qualifiedName.getName();
+		binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		name = qualifiedName.getQualifier();
+		binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong kind of binding", IBinding.PACKAGE, binding.getKind());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=83013
+	 */
+	public void test0107() throws JavaModelException {
+		String contents =
+			"@interface A {\n" +
+			"    String value() default \"\";\n" +
+			"}\n" +
+			"@interface Main {\n" +
+			"   A child() default @A(\"Void\");\n" +
+			"}\n" +
+			"@Main(child=@A(\"\")) @A class X {}\n";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 2);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		checkSourceRange(node, "@Main(child=@A(\"\")) @A class X {}", contents.toCharArray());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=83228
+	 */
+	public void test0108() throws JavaModelException {
+		String contents =
+			"class X<E> {\n" +
+			"    enum Numbers {\n" +
+			"        ONE {\n" +
+			"            Numbers getSquare() {\n" +
+			"                return ONE;\n" +
+			"            }\n" +
+			"        };\n" +
+			"        abstract Numbers getSquare();\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0);
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+
+		List bodyDeclarations = enumDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclarations.get(0);
+		Type returnType = methodDeclaration.getReturnType2();
+		ITypeBinding typeBinding = returnType.resolveBinding();
+
+		List enumConstants = enumDeclaration.enumConstants();
+		assertEquals("Wrong size", 1, enumConstants.size());
+		EnumConstantDeclaration constantDeclaration = (EnumConstantDeclaration) enumConstants.get(0);
+		AnonymousClassDeclaration anonymousClassDeclaration = constantDeclaration.getAnonymousClassDeclaration();
+		assertNotNull("No anonymous", anonymousClassDeclaration);
+		bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Type type = methodDeclaration.getReturnType2();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType());
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		SimpleName simpleName = (SimpleName) name;
+		ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+
+		assertTrue("Not equals", typeBinding.isEqualTo(typeBinding2));
+		assertTrue("Not identical", typeBinding == typeBinding2);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=883297
+	 */
+	public void test0109() throws JavaModelException {
+		String contents =
+			"@Annot(value=\"Hello\", count=-1)\n" +
+			"@interface Annot {\n" +
+			"    String value();\n" +
+			"    int count();\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/Annot.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0);
+		AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) node;
+		ITypeBinding typeBinding = annotationTypeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("Wrong size", 2, methods.length);
+	}
+
+	/*
+	 * Ensures that the type declaration of a top level type binding is correct.
+	 */
+	public void test0110() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		TypeDeclaration type = (TypeDeclaration) buildAST(
+			"/*start*/public class X {\n" +
+			"}/*end*/",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getTypeDeclaration();
+		assertBindingEquals(
+			"LX;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the type declaration of a generic type binding is correct.
+	 */
+	public void test0111() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		TypeDeclaration type = (TypeDeclaration) buildAST(
+			"/*start*/public class X<E> {\n" +
+			"}/*end*/",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getTypeDeclaration();
+		assertBindingEquals(
+			"LX<TE;>;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the type declaration of a parameterized type binding is correct.
+	 */
+	public void test0112() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"public class X<E> {\n" +
+			"  /*start*/X<String>/*end*/ field;\n" +
+			"}",
+			this.workingCopy,
+			false);
+		ITypeBinding binding = type.resolveBinding().getTypeDeclaration();
+		assertBindingEquals(
+			"LX<TE;>;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the type declaration of a raw type binding is correct.
+	 */
+	public void test0113() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"public class X<E> {\n" +
+			"  /*start*/X/*end*/ field;\n" +
+			"}",
+			this.workingCopy,
+			false);
+		ITypeBinding binding = type.resolveBinding().getTypeDeclaration();
+		assertBindingEquals(
+			"LX<TE;>;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the type declaration of a wildcard type binding is correct.
+	 */
+	public void test0114() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"public class X<E> {\n" +
+			"  X</*start*/? extends String/*end*/> field;\n" +
+			"}",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getTypeDeclaration();
+		assertBindingEquals(
+			"LX;{0}+Ljava/lang/String;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the type declaration of a type variable binding is correct.
+	 */
+	public void test0115() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		TypeParameter type = (TypeParameter) buildAST(
+			"public class X</*start*/E/*end*/> {\n" +
+			"}",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getTypeDeclaration();
+		assertBindingEquals(
+			"LX;:TE;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the erasure of a top level type binding is correct.
+	 */
+	public void test0116() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		TypeDeclaration type = (TypeDeclaration) buildAST(
+			"/*start*/public class X {\n" +
+			"}/*end*/",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getErasure();
+		assertBindingEquals(
+			"LX;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the erasure of a generic type binding is correct.
+	 */
+	public void test0117() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		TypeDeclaration type = (TypeDeclaration) buildAST(
+			"/*start*/public class X<E> {\n" +
+			"}/*end*/",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getErasure();
+		assertBindingEquals(
+			"LX<TE;>;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the erasure of a parameterized type binding is correct.
+	 */
+	public void test0118() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"public class X<E> {\n" +
+			"  /*start*/X<String>/*end*/ field;\n" +
+			"}",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getErasure();
+		assertBindingEquals(
+			"LX<TE;>;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the erasure of a raw type binding is correct.
+	 */
+	public void test0119() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"public class X<E> {\n" +
+			"  /*start*/X/*end*/ field;\n" +
+			"}",
+			this.workingCopy,
+			false);
+		ITypeBinding binding = type.resolveBinding().getErasure();
+		assertBindingEquals(
+			"LX<TE;>;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the erasure of a wildcard type binding is correct.
+	 */
+	public void test0120() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"public class X<E> {\n" +
+			"  X</*start*/? extends String/*end*/> field;\n" +
+			"}",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getErasure();
+		assertBindingEquals(
+			"Ljava/lang/String;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the erasure of a type variable binding is correct.
+	 */
+	public void test0121() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		TypeParameter type = (TypeParameter) buildAST(
+			"public class X</*start*/E/*end*/> {\n" +
+			"}",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding().getErasure();
+		assertBindingEquals(
+			"Ljava/lang/Object;",
+			binding);
+	}
+
+	/*
+	 * Ensures that the declaration of a non generic method binding is correct.
+	 */
+	public void test0122() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		MethodDeclaration method = (MethodDeclaration) buildAST(
+			"public class X {\n" +
+			"  /*start*/void foo() {\n" +
+			"  }/*end*/\n" +
+			"}",
+			this.workingCopy);
+		IMethodBinding binding = method.resolveBinding().getMethodDeclaration();
+		assertBindingEquals(
+			"LX;.foo()V",
+			binding);
+	}
+
+	/*
+	 * Ensures that the declaration of a generic method binding is correct.
+	 */
+	public void test0123() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		MethodDeclaration method = (MethodDeclaration) buildAST(
+			"public class X {\n" +
+			"  /*start*/<E> void foo() {\n" +
+			"  }/*end*/\n" +
+			"}",
+			this.workingCopy);
+		IMethodBinding binding = method.resolveBinding().getMethodDeclaration();
+		assertBindingEquals(
+			"LX;.foo<E:Ljava/lang/Object;>()V",
+			binding);
+	}
+
+	/*
+	 * Ensures that the declaration of a parameterized method binding is correct.
+	 */
+	public void test0124() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		MethodInvocation method = (MethodInvocation) buildAST(
+			"public class X {\n" +
+			"  <E> void foo() {\n" +
+			"  }\n" +
+			"  void bar() {\n" +
+			"    /*start*/this.<String>foo()/*end*/;\n" +
+			"  }\n" +
+			"}",
+			this.workingCopy);
+		IMethodBinding binding = method.resolveMethodBinding().getMethodDeclaration();
+		assertBindingEquals(
+			"LX;.foo<E:Ljava/lang/Object;>()V",
+			binding);
+	}
+
+	/*
+	 * Ensures that the declaration of a raw method binding is correct.
+	 */
+	public void test0125() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		MethodInvocation method = (MethodInvocation) buildAST(
+			"public class X {\n" +
+			"  <E> void foo() {\n" +
+			"  }\n" +
+			"  void bar() {\n" +
+			"    /*start*/this.foo()/*end*/;\n" +
+			"  }\n" +
+			"}",
+			this.workingCopy);
+		IMethodBinding binding = method.resolveMethodBinding().getMethodDeclaration();
+		assertBindingEquals(
+			"LX;.foo<E:Ljava/lang/Object;>()V",
+			binding);
+	}
+
+	/*
+	 * Ensures that the key for a parameterized type binding with an extends wildcard bounded to a type variable
+	 * is correct.
+	 */
+	public void test0126() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"public class X<E> {\n" +
+			"  /*start*/Class<? extends E>/*end*/ field;\n" +
+			"}",
+			this.workingCopy);
+		ITypeBinding binding = type.resolveBinding();
+		assertBindingEquals(
+			"Ljava/lang/Class<Ljava/lang/Class;{0}+LX;:TE;>;",
+			binding);
+	}
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=83817
+    public void test0127() throws CoreException {
+        this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+        ASTNode node = buildAST(
+            "class X<T> {\n" +
+            "    public void method(Number num) {}\n" +
+            "}\n" +
+            "\n" +
+            "class Z {\n" +
+            "	void test() {\n" +
+            "		new X<String>().method(0);\n" +
+            "		new X<Integer>().method(1);\n" +
+            "	}\n" +
+            "}",
+            this.workingCopy);
+        assertNotNull("No node", node);
+        assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+        CompilationUnit compilationUnit = (CompilationUnit) node;
+        assertProblemsSize(compilationUnit, 0);
+        node = getASTNode(compilationUnit, 1, 0, 0);
+        assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+        ExpressionStatement statement = (ExpressionStatement) node;
+        Expression expression = statement.getExpression();
+        assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+        MethodInvocation methodInvocation = (MethodInvocation) expression;
+        IMethodBinding methodBinding = methodInvocation.resolveMethodBinding();
+        node = getASTNode(compilationUnit, 1, 0, 1);
+        assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+        statement = (ExpressionStatement) node;
+        expression = statement.getExpression();
+        assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+        methodInvocation = (MethodInvocation) expression;
+        IMethodBinding methodBinding2 = methodInvocation.resolveMethodBinding();
+        assertFalse("Keys are equals", methodBinding.getKey().equals(methodBinding2.getKey()));
+        assertFalse("bindings are equals", methodBinding.isEqualTo(methodBinding2));
+    }
+
+   // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84064
+    public void test0128() throws CoreException {
+        this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+        final String contents =
+        	"class X {\n" +
+            "	static X x;\n" +
+            "\n" +
+            "	static class G extends E {\n" +
+            "		public G() {\n" +
+            "			x.<String> super();\n" +
+            "		}\n" +
+            "	}\n" +
+            "\n" +
+            "	class E {\n" +
+            "		public <T> E() {\n" +
+            "		}\n" +
+            "	}\n" +
+            "}";
+        final char[] source = contents.toCharArray();
+        ASTNode node = buildAST(
+            contents,
+            this.workingCopy);
+        assertNotNull("No node", node);
+        assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+        CompilationUnit compilationUnit = (CompilationUnit) node;
+        assertProblemsSize(compilationUnit, 0);
+        node = getASTNode(compilationUnit, 0, 1, 0);
+        assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+        MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+        assertTrue("Not a constructor", methodDeclaration.isConstructor());
+        Block body = methodDeclaration.getBody();
+        assertNotNull("No body", body);
+        List statements = body.statements();
+        assertEquals("Wrong size", 1, statements.size());
+        Statement statement = (Statement) statements.get(0);
+        assertEquals("Not a super constructor invocation", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, statement.getNodeType());
+        SuperConstructorInvocation constructorInvocation = (SuperConstructorInvocation) statement;
+        checkSourceRange(constructorInvocation, "x.<String> super();", source);
+    }
+
+   // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84064
+    public void test0129() throws CoreException {
+        this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+        final String contents =
+        	"class X {\n" +
+        	"	static X x;\n" +
+        	"	static class G extends E {\n" +
+        	"		public <T> G() {\n" +
+        	"			x.<String> this();\n" +
+        	"		}\n" +
+        	"	}\n" +
+        	"	static class E {\n" +
+        	"		public <T> E() {\n" +
+        	"		}\n" +
+        	"	}\n" +
+        	"}";
+        final char[] source = contents.toCharArray();
+        ASTNode node = buildAST(
+            contents,
+            this.workingCopy,
+            false);
+        assertNotNull("No node", node);
+        assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+        CompilationUnit compilationUnit = (CompilationUnit) node;
+        String expectedProblem = "Illegal enclosing instance specification for type X.G";
+        assertProblemsSize(compilationUnit, 1, expectedProblem);
+        node = getASTNode(compilationUnit, 0, 1, 0);
+        assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+        MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+        assertTrue("Not a constructor", methodDeclaration.isConstructor());
+        Block body = methodDeclaration.getBody();
+        assertNotNull("No body", body);
+        List statements = body.statements();
+        assertEquals("Wrong size", 1, statements.size());
+        Statement statement = (Statement) statements.get(0);
+        assertEquals("Not a constructor invocation", ASTNode.CONSTRUCTOR_INVOCATION, statement.getNodeType());
+        ConstructorInvocation constructorInvocation = (ConstructorInvocation) statement;
+        checkSourceRange(constructorInvocation, "x.<String> this();", source, true/*expectMalformed*/);
+        assertTrue("Node is not malformed", isMalformed(constructorInvocation));
+    }
+
+   // https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
+    public void test0130() throws CoreException {
+        this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+        final String contents =
+        	"class Outer<A> {\n" +
+        	"	class Inner {\n" +
+        	"		class InnerInner<C> {\n" +
+        	"		}\n" +
+        	"	}\n" +
+        	"}\n" +
+        	"\n" +
+        	"public class X {\n" +
+        	"	void foo() {\n" +
+        	"		Outer<String>.Inner.InnerInner<Integer> in = new Outer<String>().new Inner(). new InnerInner<Integer>();\n" +
+        	"	}\n" +
+        	"}";
+        ASTNode node = buildAST(
+            contents,
+            this.workingCopy);
+        assertNotNull("No node", node);
+        assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+        CompilationUnit compilationUnit = (CompilationUnit) node;
+        assertProblemsSize(compilationUnit, 0);
+        node = getASTNode(compilationUnit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		ITypeBinding typeBinding = parameterizedType.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 1", "Outer<java.lang.String>.Inner.InnerInner<java.lang.Integer>", typeBinding.getQualifiedName());
+		type = parameterizedType.getType();
+		assertTrue("Not a qualified type", type.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type;
+		typeBinding = qualifiedType.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 2", "Outer<java.lang.String>.Inner.InnerInner<java.lang.Integer>", typeBinding.getQualifiedName());
+		SimpleName simpleName = qualifiedType.getName();
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 3", "Outer<java.lang.String>.Inner.InnerInner<java.lang.Integer>", typeBinding.getQualifiedName());
+		type = qualifiedType.getQualifier();
+		assertTrue("Not a qualified type", type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		typeBinding = qualifiedType.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 4", "Outer<java.lang.String>.Inner", typeBinding.getQualifiedName());
+		simpleName = qualifiedType.getName();
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 5", "Outer.Inner", typeBinding.getQualifiedName());
+		type = qualifiedType.getQualifier();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		parameterizedType = (ParameterizedType) type;
+		typeBinding = parameterizedType.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 6", "Outer<java.lang.String>", typeBinding.getQualifiedName());
+		type = parameterizedType.getType();
+		assertTrue("Not a simple type", type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		typeBinding = simpleType.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 7", "Outer<java.lang.String>", typeBinding.getQualifiedName());
+		Name name = simpleType.getName();
+		assertTrue("Not a simple name", name.isSimpleName());
+		simpleName = (SimpleName) name;
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong qualified name 8", "Outer", typeBinding.getQualifiedName());
+   }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84140
+    public void test0131() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+			"	public void bar(String... args){\n" +
+			"	}\n" +
+			"}";
+     	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+	   	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+    	MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+    	List parameters = methodDeclaration.parameters();
+    	assertEquals("Wrong size", 1, parameters.size());
+    	SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+    	assertTrue("Not a var args", singleVariableDeclaration.isVarargs());
+	   	Type type = singleVariableDeclaration.getType();
+    	checkSourceRange(type, "String", contents);
+     	assertTrue("Not a simple type", type.isSimpleType());
+    	checkSourceRange(type, "String", contents);
+    	ITypeBinding typeBinding = type.resolveBinding();
+    	assertNotNull("No binding", typeBinding);
+    	assertFalse("An array", typeBinding.isArray());
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		ITypeBinding[] parameterTypes = methodBinding.getParameterTypes();
+		ITypeBinding parameterType = parameterTypes[0];
+    	assertTrue("Not an array binding", parameterType.isArray());
+    	assertTrue("Not equals", parameterType.getComponentType() == parameterType.getElementType());
+    	assertEquals("wrong dimension", 1, parameterType.getDimensions());
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84140
+    public void test0132() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+    		"	public void bar(String[]... args[]){\n" +
+    		"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 1, "Extended dimensions are illegal for a variable argument");
+    	node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+    	MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+    	List parameters = methodDeclaration.parameters();
+    	assertEquals("Wrong size", 1, parameters.size());
+    	SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+    	assertTrue("Not a var args", singleVariableDeclaration.isVarargs());
+		assertTrue("Not a malformed node", isMalformed(singleVariableDeclaration));
+    	Type type = singleVariableDeclaration.getType();
+    	checkSourceRange(type, "String[]", contents);
+    	assertTrue("Not an array type", type.isArrayType());
+    	ITypeBinding typeBinding = type.resolveBinding();
+    	assertNotNull("No binding", typeBinding);
+    	assertTrue("Not an array", typeBinding.isArray());
+    	assertEquals("wrong dimensions", 1, typeBinding.getDimensions());
+    	ArrayType arrayType = (ArrayType) type;
+    	assertEquals("Wrong dimension", 1, arrayType.getDimensions());
+    	type = arrayType.getElementType();
+    	assertTrue("Not a simple type", type.isSimpleType());
+    	checkSourceRange(type, "String", contents);
+    	assertEquals("Wrong extra dimension", 1, singleVariableDeclaration.getExtraDimensions());
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		ITypeBinding[] parameterTypes = methodBinding.getParameterTypes();
+		ITypeBinding parameterType = parameterTypes[0];
+    	assertTrue("Not an array binding", parameterType.isArray());
+       	assertEquals("wrong dimension", 3, parameterType.getDimensions());
+       	ITypeBinding componentType = parameterType.getComponentType();
+       	assertEquals("wrong dimension", 2, componentType.getDimensions());
+       	assertTrue("Not equal", parameterType.getElementType() == componentType.getElementType());
+       	ITypeBinding componentType2 = componentType.getComponentType();
+       	assertEquals("wrong dimension", 1, componentType2.getDimensions());
+       	assertTrue("Not equal", parameterType.getElementType() == componentType2.getElementType());
+     }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84181
+    public void test0133() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"import java.util.Vector;\n" +
+    		"\n" +
+    		"public class X {\n" +
+    		"  void k() {\n" +
+    		"    Vector v2 = /*start*/new Vector()/*end*/;\n" +
+    		"    Vector v3 = new Vector();\n" +
+    		"\n" +
+    		"    v3.add(\"fff\");\n" +
+    		"    v2.add(v3);\n" +
+    		"   }\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a class instance creation unit", ASTNode.CLASS_INSTANCE_CREATION, node.getNodeType());
+    	ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) node;
+    	ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+    	assertEquals("wrong qualified name", "java.util.Vector", typeBinding.getQualifiedName());
+    	assertTrue("Not a raw type", typeBinding.isRawType());
+    	assertFalse("From source", typeBinding.isFromSource());
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84181
+    public void test0134() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"import java.util.Vector;\n" +
+    		"\n" +
+    		"public class X {\n" +
+    		"  void k() {\n" +
+    		"    Vector v2 = /*start*/new Vector<String>()/*end*/;\n" +
+    		"\n" +
+    		"    v2.add(\"\");\n" +
+    		"   }\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a class instance creation unit", ASTNode.CLASS_INSTANCE_CREATION, node.getNodeType());
+    	ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) node;
+    	ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+    	assertEquals("wrong qualified name", "java.util.Vector<java.lang.String>", typeBinding.getQualifiedName());
+    	assertTrue("Not a parameterized type", typeBinding.isParameterizedType());
+    	assertFalse("From source", typeBinding.isFromSource());
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
+    public void test0135() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"class X {\n" +
+    		"	public static X instance= new X();\n" +
+    		"\n" +
+    		"	int s;\n" +
+    		"\n" +
+    		"	int f() {\n" +
+    		"		System.out.println(X.instance.s + 1);\n" +
+    		"		return 1;\n" +
+    		"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	compilationUnit.accept(new ASTVisitor() {
+    		public boolean visit(QualifiedName qualifiedName) {
+    			ITypeBinding typeBinding = qualifiedName.resolveTypeBinding();
+    			assertNotNull("No binding", typeBinding);
+    			return true;
+    		}
+    	});
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=78934
+    public void test0136() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"class X {\n" +
+    		"	public static X instance= new X();\n" +
+    		"	public X instance2 = new X();\n" +
+    		"	int s;\n" +
+    		"	int f() {\n" +
+    		"		System.out.println(X.instance.instance2.s + 1);\n" +
+    		"		return 1;\n" +
+    		"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	compilationUnit.accept(new ASTVisitor() {
+    		public boolean visit(QualifiedName qualifiedName) {
+    			ITypeBinding typeBinding = qualifiedName.resolveTypeBinding();
+    			assertNotNull("No binding", typeBinding);
+    			return true;
+    		}
+    	});
+    }
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=79696
+	 */
+	public void test0137() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0137", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Wrong node", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		type = parameterizedType.getType();
+		assertTrue("Not a parameterized type", type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.isQualifiedName());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		name = qualifiedName.getQualifier();
+		assertTrue("Not a simple name", name.isSimpleName());
+		ITypeBinding typeBinding = name.resolveTypeBinding();
+		assertEquals("Wrong name", "test0137.Source", typeBinding.getQualifiedName());
+	}
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=81544
+	public void test0138() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+    		"class X {\n" +
+    		"	java.util.List<URL> method(java.util.List<URL> list) {\n" +
+    		"		java.util.List<URL> url= new java.util.List<URL>();\n" +
+    		"		return url;\n" +
+    		"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+			contents,
+			this.workingCopy,
+			false,
+			false,
+			true);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 5,
+    			"URL cannot be resolved to a type\n" +
+    			"URL cannot be resolved to a type\n" +
+    			"URL cannot be resolved to a type\n" +
+    			"Cannot instantiate the type List<URL>\n" +
+    			"URL cannot be resolved to a type");
+    	compilationUnit.accept(new ASTVisitor() {
+    		public boolean visit(ParameterizedType type) {
+    			checkSourceRange(type, "java.util.List<URL>", contents);
+    			ITypeBinding typeBinding = type.resolveBinding();
+    			assertNotNull("No binding", typeBinding);
+    			return true;
+    		}
+    	});
+    }
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=84358
+	 */
+	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$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false, true);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 1, "The type test0139a.C is not visible");
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Wrong node", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("Not a parameterized type", type.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) type;
+		type = parameterizedType.getType();
+		assertTrue("Not a parameterized type", type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.isQualifiedName());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		IBinding binding = qualifiedName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind());
+		ITypeBinding typeBinding = (ITypeBinding) binding;
+		assertEquals("wrong qualified name", "test0139a.C", typeBinding.getQualifiedName());
+		SimpleName simpleName = qualifiedName.getName();
+		binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind());
+		typeBinding = (ITypeBinding) binding;
+		assertEquals("wrong qualified name", "test0139a.C", typeBinding.getQualifiedName());
+		name = qualifiedName.getQualifier();
+		assertEquals("Not a simpleName", ASTNode.SIMPLE_NAME, name.getNodeType());
+		binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("wrong type", IBinding.PACKAGE, binding.getKind());
+		IPackageBinding packageBinding = (IPackageBinding) binding;
+		assertEquals("wrong name", "test0139a", packageBinding.getName());
+		assertEquals("Wrong modifier", Modifier.NONE, packageBinding.getModifiers());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=85115
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=85215
+	 */
+	public void test0140() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0140", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertNotNull("No node", node);
+		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		List modifiers = enumDeclaration.modifiers();
+		assertEquals("Wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Wrong type", modifier instanceof MarkerAnnotation);
+		MarkerAnnotation markerAnnotation = (MarkerAnnotation) modifier;
+		ITypeBinding typeBinding = markerAnnotation.resolveTypeBinding();
+		assertTrue("Not an annotation", typeBinding.isAnnotation());
+		assertTrue("Not a top level type", typeBinding.isTopLevel());
+
+		sourceUnit = getCompilationUnit("Converter15" , "src", "test0140", "Annot.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0);
+		assertNotNull("No node", node);
+		assertEquals("Not an annotation declaration", ASTNode.ANNOTATION_TYPE_DECLARATION, node.getNodeType());
+		AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) node;
+		modifiers = annotationTypeDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+		typeBinding = annotationTypeDeclaration.resolveBinding();
+		int modifierValue = typeBinding.getModifiers();
+		assertEquals("Type is not public", Modifier.PUBLIC, modifierValue);
+	}
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=83100
+	public void test0141() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+    		"public class X<T> {\n" +
+    		"	int x;\n" +
+ 			"	public static void main(String[] args) {\n" +
+			"		System.out.println(new X<String>().x);\n" +
+			"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertFalse("Not a parameter", variableBinding.isParameter());
+		node = getASTNode(compilationUnit, 0, 1, 0);
+    	assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+    	assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		Expression expression2 = (Expression) arguments.get(0);
+    	assertEquals("Not a field access", ASTNode.FIELD_ACCESS, expression2.getNodeType());
+		FieldAccess fieldAccess = (FieldAccess) expression2;
+		IVariableBinding variableBinding2 = fieldAccess.resolveFieldBinding();
+		assertFalse("Not a parameter", variableBinding2.isParameter());
+		assertFalse("Bindings are not equals", variableBinding.isEqualTo(variableBinding2));
+		IVariableBinding variableBinding3 = variableBinding2.getVariableDeclaration();
+		assertTrue("Bindings are equals", variableBinding.isEqualTo(variableBinding3));
+		node = compilationUnit.findDeclaringNode(variableBinding2);
+		assertNotNull("No declaring node", node);
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=83100
+	public void test0142() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+    		"public class X<T> {\n" +
+ 			"	public static void main(String[] args) {\n" +
+   			"		int x = 0;\n" +
+ 			"		System.out.println(x);\n" +
+			"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+    	assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		assertEquals("Wrong name", "x", fragment.getName().getIdentifier());
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		IVariableBinding variableBinding2 = variableBinding.getVariableDeclaration();
+		assertFalse("Not a parameter", variableBinding.isParameter());
+		assertFalse("Not a parameter", variableBinding2.isParameter());
+		assertTrue("Bindings are equals", variableBinding.isEqualTo(variableBinding2));
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84140
+    public void test0143() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+    		"	public void bar(String[]... args){\n" +
+    		"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+    	MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+    	List parameters = methodDeclaration.parameters();
+    	assertEquals("Wrong size", 1, parameters.size());
+    	SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+    	assertTrue("Not a var args", singleVariableDeclaration.isVarargs());
+    	Type type = singleVariableDeclaration.getType();
+    	checkSourceRange(type, "String[]", contents);
+    	assertTrue("Not an array type", type.isArrayType());
+    	ITypeBinding typeBinding = type.resolveBinding();
+    	assertNotNull("No binding", typeBinding);
+    	assertTrue("Not an array", typeBinding.isArray());
+    	assertEquals("wrong dimensions", 1, typeBinding.getDimensions());
+    	ArrayType arrayType = (ArrayType) type;
+    	assertEquals("Wrong dimension", 1, arrayType.getDimensions());
+    	type = arrayType.getElementType();
+    	assertTrue("Not a simple type", type.isSimpleType());
+    	checkSourceRange(type, "String", contents);
+    	assertEquals("Wrong extra dimension", 0, singleVariableDeclaration.getExtraDimensions());
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		ITypeBinding[] parameterTypes = methodBinding.getParameterTypes();
+		ITypeBinding parameterType = parameterTypes[0];
+    	assertTrue("Not an array binding", parameterType.isArray());
+    	assertEquals("wrong dimension", 2, parameterType.getDimensions());
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=87171
+    public void test0144() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X<T> {\n" +
+    		"	void foo(T t) {\n" +
+    		"		System.out.println(t);\n" +
+    		"	}\n" +
+    		"}\n" +
+    		"\n" +
+    		"class Use {\n" +
+    		"	public static void main(String[] args) {\n" +
+    		"		X<String> i= new X<String>();\n" +
+    		"		i.foo(\"Eclipse\");\n" +
+    		"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 1, 0, 1);
+    	assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+    	assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = methodInvocation.resolveMethodBinding();
+		node = compilationUnit.findDeclaringNode(methodBinding);
+		assertNotNull("No declaring node", node);
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=87350
+    public void test0145() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public enum X {\n" +
+    		"    RED, GREEN(), BLUE(17), PINK(1) {/*anon*};\n" +
+    		"    Color() {}\n" +
+    		"    Color(int i) {}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+		String expectedErrors = "The constructor X(int) is undefined\n" +
+			"The constructor X(int) is undefined\n" +
+			"Unexpected end of comment";
+    	assertProblemsSize(compilationUnit, 3, expectedErrors);
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=87481
+    public void test0146() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"import java.util.Iterator;\n" +
+    		"public class X {\n" +
+    		"    void doit() {\n" +
+    		"			Iterator iter= (Iterator) null;\n" +
+    		"			System.out.println(iter);\n" +
+    		"    }\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	String expectedProblems =
+    		"Iterator is a raw type. References to generic type Iterator<E> should be parameterized\n" +
+    		"Iterator is a raw type. References to generic type Iterator<E> should be parameterized";
+    	assertProblemsSize(compilationUnit, 2, expectedProblems);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertNotNull("No initializer", expression);
+		assertEquals("Not a cast expression", ASTNode.CAST_EXPRESSION, expression.getNodeType());
+		CastExpression castExpression = (CastExpression) expression;
+		Type type = castExpression.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertEquals("Wrong type", "java.util.Iterator", typeBinding.getQualifiedName());
+		assertTrue("Not a raw type", typeBinding.isRawType());
+		assertFalse("Is a generic type", typeBinding.isGenericType());
+		assertFalse("Is a parameterized type", typeBinding.isParameterizedType());
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=87498
+    public void test0147() throws CoreException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0147", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=87350
+    public void test0148() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public enum X {\n" +
+    		"    RED, GREEN(), BLUE(17), PINK(1) {/*anon*};\n" +
+    		"    Color() {}\n" +
+    		"    Color(int i) {}\n";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+		String expectedErrors = "The constructor X(int) is undefined\n" +
+			"The constructor X(int) is undefined\n" +
+			"Unexpected end of comment";
+    	assertProblemsSize(compilationUnit, 3, expectedErrors);
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=88252
+    public void test0149() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		" interface Jpf {\n" +
+    		" 	@interface Action {\n" +
+    		" 		ValidatableProperty[] validatableProperties();\n" +
+    		" 	}\n" +
+    		" 	\n" +
+    		" 	@interface ValidatableProperty {\n" +
+    		" 		String propertyName();\n" +
+    		" 		 ValidationLocaleRules[] localeRules();\n" +
+    		" 	}\n" +
+    		" 	\n" +
+    		" 	@interface ValidationLocaleRules {\n" +
+    		" 		  ValidateMinLength validateMinLength();\n" +
+    		" 	}\n" +
+    		" 	\n" +
+    		" 	@interface ValidateMinLength {\n" +
+    		" 		String chars();\n" +
+    		" 	}\n" +
+    		"}\n" +
+    		" \n" +
+    		" public class X {\n" +
+    		" \n" +
+    		" @Jpf.Action(\n" +
+    		"      validatableProperties={@Jpf.ValidatableProperty(propertyName=\"fooField\",\n" +
+    		"        localeRules={@Jpf.ValidationLocaleRules(\n" +
+    		"            validateMinLength=@Jpf.ValidateMinLength(chars=\"12\")\n" +
+    		"        )}\n" +
+    		"      )}\n" +
+    		"    )\n" +
+    		"    public String actionForValidationRuleTest()    {\n" +
+    		"        return null;\n" +
+    		"    }\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 1, 0);
+   		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+  		assertTrue("Not a normal annotation", modifier instanceof NormalAnnotation);
+		NormalAnnotation annotation = (NormalAnnotation) modifier;
+		List values = annotation.values();
+		assertEquals("wrong size", 1, values.size());
+		MemberValuePair memberValuePair = (MemberValuePair) values.get(0);
+		Expression expression = memberValuePair.getValue();
+   		assertEquals("Not an array initializer", ASTNode.ARRAY_INITIALIZER, expression.getNodeType());
+		ArrayInitializer arrayInitializer = (ArrayInitializer) expression;
+		List expressions = arrayInitializer.expressions();
+		assertEquals("wrong size", 1, expressions.size());
+		Expression expression2 = (Expression) expressions.get(0);
+  		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, expression2.getNodeType());
+		NormalAnnotation annotation2 = (NormalAnnotation) expression2;
+		values = annotation2.values();
+		assertEquals("wrong size", 2, values.size());
+		MemberValuePair memberValuePair2 = (MemberValuePair) values.get(1);
+		Expression expression3 = memberValuePair2.getValue();
+   		assertEquals("Not an array initializer", ASTNode.ARRAY_INITIALIZER, expression3.getNodeType());
+		arrayInitializer = (ArrayInitializer) expression3;
+		expressions = arrayInitializer.expressions();
+		assertEquals("wrong size", 1, expressions.size());
+		Expression expression4 = (Expression) expressions.get(0);
+   		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, expression4.getNodeType());
+		NormalAnnotation annotation3 = (NormalAnnotation) expression4;
+		values = annotation3.values();
+		assertEquals("wrong size", 1, values.size());
+		MemberValuePair memberValuePair3 = (MemberValuePair) values.get(0);
+		Expression expression5 = memberValuePair3.getValue();
+   		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, expression5.getNodeType());
+		NormalAnnotation annotation4 = (NormalAnnotation) expression5;
+		checkSourceRange(annotation4, "@Jpf.ValidateMinLength(chars=\"12\")", contents);
+		checkSourceRange(memberValuePair3, "validateMinLength=@Jpf.ValidateMinLength(chars=\"12\")", contents);
+   }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=88224
+    public void test0150() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+    		"	void foo() {\n" +
+    		"		class Local {\n" +
+    		"			static enum E {\n" +
+    		"				C, B;\n" +
+    		"			}\n" +
+    		"		}\n" +
+    		"	}\n" +
+    		"	void bar() {\n" +
+    		"	}\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+        final String expectedErrors = "The member enum E can only be defined inside a top-level class or interface or in a static context";
+    	assertProblemsSize(compilationUnit, 1, expectedErrors);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+   		assertEquals("Not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, node.getNodeType());
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDeclaration = typeDeclarationStatement.getDeclaration();
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+   		assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, bodyDeclaration.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) bodyDeclaration;
+		List enumConstants = enumDeclaration.enumConstants();
+		assertEquals("Wrong size", 2, enumConstants.size());
+		EnumConstantDeclaration enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(0);
+		checkSourceRange(enumConstantDeclaration, "C", contents);
+		enumConstantDeclaration = (EnumConstantDeclaration) enumConstants.get(1);
+		checkSourceRange(enumConstantDeclaration, "B", contents);
+   }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
+    public void test0151() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+	   		"public enum X {\n" +
+    		"	RED, GREEN(), BLUE(17);\n" +
+    		"	X() {}\n" +
+    		"	X(int i) {}\n" +
+    		"	public static void main(String[] args) {\n" +
+    		"		for (X x : X.values()) {\n" +
+    		"			switch(x) {\n" +
+    		"				case RED :\n" +
+    		"					System.out.println(\"ROUGE\");\n" +
+    		"					break;\n" +
+    		"				case GREEN :\n" +
+    		"					System.out.println(\"VERT\");\n" +
+    		"					break;\n" +
+    		"				case BLUE :\n" +
+    		"					System.out.println(\"BLEU\");\n" +
+    		"					break;\n" +
+    		"			}\n" +
+    		"		}\n" +
+    		"   }\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0);
+    	assertEquals("Not an enum declaration", ASTNode.ENUM_DECLARATION, node.getNodeType());
+		EnumDeclaration enumDeclaration = (EnumDeclaration) node;
+		List bodyDeclarations = enumDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 3, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(2);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		assertNotNull("No body", block);
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size());
+		Statement statement = (Statement) statements.get(0);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, statement.getNodeType());
+		EnhancedForStatement forStatement = (EnhancedForStatement) statement;
+		Statement statement2 = forStatement.getBody();
+    	assertEquals("Not a block", ASTNode.BLOCK, statement2.getNodeType());
+		Block block2 = (Block) statement2;
+		statements = block2.statements();
+		assertEquals("Wrong size", 1, statements.size());
+		statement = (Statement) statements.get(0);
+    	assertEquals("Not a switch statement", ASTNode.SWITCH_STATEMENT, statement.getNodeType());
+		SwitchStatement switchStatement = (SwitchStatement) statement;
+		statements = switchStatement.statements();
+		assertEquals("Wrong size", 9, statements.size());
+		statement = (Statement) statements.get(0);
+    	assertEquals("Not a switch case statement", ASTNode.SWITCH_CASE, statement.getNodeType());
+		SwitchCase switchCase = (SwitchCase) statement;
+		Expression expression = switchCase.getExpression();
+		assertNull("Got a constant", expression.resolveConstantExpressionValue());
+   }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
+    public void test0152() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+	   		"public class X {\n" +
+	   		"	public static final int CONST1 = 1;\n" +
+	   		"	public static final int CONST2 = 2;\n" +
+    		"	public static void main(String[] args) {\n" +
+    		"		int[] intTab = new int[] {2, 3};\n" +
+    		"		for (int i : intTab) {\n" +
+    		"			switch(i) {\n" +
+    		"				case CONST1 :\n" +
+    		"					System.out.println(\"1\");\n" +
+    		"					break;\n" +
+    		"				case CONST2 :\n" +
+    		"					System.out.println(\"2\");\n" +
+    		"					break;\n" +
+    		"				default :\n" +
+    		"					System.out.println(\"default\");\n" +
+    		"					break;\n" +
+    		"			}\n" +
+    		"		}\n" +
+    		"   }\n" +
+    		"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0);
+    	assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 3, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(2);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		assertNotNull("No body", block);
+		List statements = block.statements();
+		assertEquals("Wrong size", 2, statements.size());
+		Statement statement = (Statement) statements.get(1);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, statement.getNodeType());
+		EnhancedForStatement forStatement = (EnhancedForStatement) statement;
+		Statement statement2 = forStatement.getBody();
+    	assertEquals("Not a block", ASTNode.BLOCK, statement2.getNodeType());
+		Block block2 = (Block) statement2;
+		statements = block2.statements();
+		assertEquals("Wrong size", 1, statements.size());
+		statement = (Statement) statements.get(0);
+    	assertEquals("Not a switch statement", ASTNode.SWITCH_STATEMENT, statement.getNodeType());
+		SwitchStatement switchStatement = (SwitchStatement) statement;
+		statements = switchStatement.statements();
+		assertEquals("Wrong size", 9, statements.size());
+		statement = (Statement) statements.get(0);
+    	assertEquals("Not a switch case statement", ASTNode.SWITCH_CASE, statement.getNodeType());
+		SwitchCase switchCase = (SwitchCase) statement;
+		Expression expression = switchCase.getExpression();
+		Object constant = expression.resolveConstantExpressionValue();
+		assertNotNull("No constant", constant);
+		assertEquals("Wrong value", "1", String.valueOf(constant));
+   }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=88841
+    public void test0153() throws CoreException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0153", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
+    public void test0154() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	public static void main(String[] s) {\n" +
+				"		test(/*start*/1/*end*/);\n" +
+				"	}\n" +
+				"	public static void test(Integer i) {}\n" +
+				"}";
+    	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a number literal", ASTNode.NUMBER_LITERAL, node.getNodeType());
+		NumberLiteral literal = (NumberLiteral) node;
+		assertTrue("Not boxed", literal.resolveBoxing());
+		assertFalse("Is unboxed", literal.resolveUnboxing());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
+    public void test0155() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	public static int bar() {return 1;}\n" +
+				"	public static void main(String[] s) {\n" +
+				"		test(/*start*/bar()/*end*/);\n" +
+				"	}\n" +
+				"	public static void test(Integer i) {}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, node.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) node;
+		assertTrue("Not boxed", methodInvocation.resolveBoxing());
+		assertFalse("Is unboxed", methodInvocation.resolveUnboxing());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
+    public void test0156() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	public static void main(String[] s) {\n" +
+				"		test(/*start*/new Integer(1)/*end*/);\n" +
+				"	}\n" +
+				"	public static void test(int i) {}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, node.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) node;
+		assertFalse("Is boxed", classInstanceCreation.resolveBoxing());
+		assertTrue("Not unboxed", classInstanceCreation.resolveUnboxing());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
+    public void test0157() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	public static void main(String[] s) {\n" +
+				"		test(/*start*/null/*end*/);\n" +
+				"	}\n" +
+				"	public static void test(Object o) {}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a null literal", ASTNode.NULL_LITERAL, node.getNodeType());
+		NullLiteral nullLiteral = (NullLiteral) node;
+		assertNull("Got a constant", nullLiteral.resolveConstantExpressionValue());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=88548
+    public void test0158() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	private static final String CONST = \"Hello World\";\n" +
+				"	public static void main(String[] s) {\n" +
+				"		System.out.println(/*start*/CONST/*end*/);\n" +
+				"	}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, node.getNodeType());
+		SimpleName name = (SimpleName) node;
+		assertNotNull("No constant", name.resolveConstantExpressionValue());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
+    public void test0159() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	public static void main(String[] s) {\n" +
+				"		test(/*start*/new Integer(1)/*end*/);\n" +
+				"	}\n" +
+				"	public static void test(Integer i) {}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, node.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) node;
+		assertFalse("Is boxed", classInstanceCreation.resolveBoxing());
+		assertFalse("Is unboxed", classInstanceCreation.resolveUnboxing());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
+    public void test0160() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	public static void main(String[] s) {\n" +
+				"		Y.test(1, new Integer(2), -3);\n" +
+				"	}\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	public static void test(int ... i) {}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+    	assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+    	assertEquals("Not method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong size", 3, arguments.size());
+		Expression argument = (Expression) arguments.get(0);
+		assertFalse("Is boxed", argument.resolveBoxing());
+		assertFalse("Is unboxed", argument.resolveUnboxing());
+		argument = (Expression) arguments.get(1);
+		assertFalse("Is boxed", argument.resolveBoxing());
+		assertTrue("Not unboxed", argument.resolveUnboxing());
+		argument = (Expression) arguments.get(2);
+		assertFalse("Is boxed", argument.resolveBoxing());
+		assertFalse("Is unboxed", argument.resolveUnboxing());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
+    public void test0161() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"	public static void main(String[] s) {\n" +
+				"		new Y().test(new Integer(1), 1);\n" +
+				"		new Y().test(1, new Integer(1));\n" +
+				"	}\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	void test(Integer i, int j) { System.out.print(1); }\n" +
+				"	void test(int i, Integer j) { System.out.print(2); }\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+    	assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+    	assertEquals("Not method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong size", 2, arguments.size());
+		Expression argument = (Expression) arguments.get(0);
+		assertFalse("Is boxed", argument.resolveBoxing());
+		assertFalse("Is unboxed", argument.resolveUnboxing());
+		argument = (Expression) arguments.get(1);
+		assertFalse("Is boxed", argument.resolveBoxing());
+		assertFalse("Is unboxed", argument.resolveUnboxing());
+		getASTNode(compilationUnit, 0, 0, 1);
+    	assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		expressionStatement = (ExpressionStatement) node;
+		expression = expressionStatement.getExpression();
+    	assertEquals("Not method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		methodInvocation = (MethodInvocation) expression;
+		arguments = methodInvocation.arguments();
+		assertEquals("Wrong size", 2, arguments.size());
+		argument = (Expression) arguments.get(0);
+		assertFalse("Is boxed", argument.resolveBoxing());
+		assertFalse("Is unboxed", argument.resolveUnboxing());
+		argument = (Expression) arguments.get(1);
+		assertFalse("Is boxed", argument.resolveBoxing());
+		assertFalse("Is unboxed", argument.resolveUnboxing());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=87173
+    public void test0162() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"public class X {\n" +
+				"	public static void main(String[] s) {\n" +
+				"		int i = Y.test();\n" +
+				"		System.out.print(i);\n" +
+				"	}\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	public static Byte test() { return new Byte((byte) 1); }\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+    	assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertFalse("Is boxed", expression.resolveBoxing());
+		assertTrue("Not unboxed", expression.resolveUnboxing());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
+    public void test0163() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"public class X<T>{\n" +
+				"  void f(T t){}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = singleVariableDeclaration.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertTrue("Not a type variable", typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+		final ITypeBinding declaringClass = typeBinding.getDeclaringClass();
+		assertNotNull("No declaring class", declaringClass);
+		assertTrue("Not a generic class", declaringClass.isGenericType());
+		assertEquals("Wrong name", "X", declaringClass.getName());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
+    public void test0164() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"class X {\n" +
+				"  <U> void foo(U u) {}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("Wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Type type = singleVariableDeclaration.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertTrue("Not a type variable", typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+		final IMethodBinding methodBinding = typeBinding.getDeclaringMethod();
+		assertNotNull("No declaring method", methodBinding);
+		assertEquals("Wrong name", "foo", methodBinding.getName());
+		assertTrue("Not a generic method", methodBinding.isGenericMethod());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
+    public void test0165() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"class X {\n" +
+				"   <U> void foo(U u) {\n" +
+				"		class C {}\n" +
+				"	}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+    	assertEquals("Not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, node.getNodeType());
+		TypeDeclarationStatement statement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDeclaration = statement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not a local type", typeBinding.isLocal());
+		ITypeBinding declaringClass = typeBinding.getDeclaringClass();
+		assertNotNull("No declaring class", declaringClass);
+		IMethodBinding declaringMethod = typeBinding.getDeclaringMethod();
+		assertNotNull("No declaring method", declaringMethod);
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=86580
+    public void test0166() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"class X {\n" +
+				"   {\n" +
+				"		class C {}\n" +
+				"	}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+    	assertNotNull("No node", node);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+    	assertEquals("Not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, node.getNodeType());
+		TypeDeclarationStatement statement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDeclaration = statement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not a local type", typeBinding.isLocal());
+		ITypeBinding declaringClass = typeBinding.getDeclaringClass();
+		assertNotNull("No declaring class", declaringClass);
+		IMethodBinding declaringMethod = typeBinding.getDeclaringMethod();
+		assertNull("No declaring method", declaringMethod);
+    }
+
+    // https://bugs.eclipse.org/bugs/show_bug.cgi?id=88841
+    public void test0167() throws CoreException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0167", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 1, 0);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 4, parameters.size());
+		SingleVariableDeclaration param = (SingleVariableDeclaration)parameters.get(3);
+		Type t = param.getType();
+		String typeName = ((SimpleType)t).getName().getFullyQualifiedName();
+
+		IType[] types = sourceUnit.getTypes();
+		assertEquals("wrong size", 2, types.length);
+		IType mainType = types[1];
+		String[][] typeMatches = mainType.resolveType( typeName );
+		assertNotNull(typeMatches);
+		assertEquals("wrong size", 1, typeMatches.length);
+		String[] typesNames = typeMatches[0];
+		assertEquals("wrong size", 2, typesNames.length);
+		assertEquals("Wrong part 1", "java.lang", typesNames[0]);
+		assertEquals("Wrong part 2", "Object", typesNames[1]);
+    }
+
+	public void test0168() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		final String contents =
+				"import java.util.List;\n" +
+				"public class X {\n" +
+				"	void f() {\n" +
+				"		List<?> list = null;\n" +
+				"		System.out.println(list);\n" +
+				"    }\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+				this.workingCopy);
+		assertNotNull("No node", node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 1);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		Expression argument = (Expression) arguments.get(0);
+		ITypeBinding typeBinding = argument.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding);
+		assertTrue("Not a parameterized binding", typeBinding.isParameterizedType());
+		ITypeBinding[] typeArguments = typeBinding.getTypeArguments();
+		assertEquals("Wrong size", 1, typeArguments.length);
+		final ITypeBinding typeBinding2 = typeArguments[0];
+		assertTrue("Not a capture binding", typeBinding2.isCapture());
+		assertTrue("Not from source", typeBinding2.isFromSource());
+		assertNotNull("No wildcard", typeBinding2.getWildcard());
+	}
+
+	public void test0169() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+				"public class X {\n" +
+				"    static class BB<T, S> { }\n" +
+				"    static class BD<T> extends BB<T, T> { }\n" +
+				"    void f() {\n" +
+				"        BB<? extends Number, ? super Integer> bb = null;\n" +
+				"        Object o = (BD<Number>) bb;\n" +
+				"    }\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertNotNull("No node", node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 1, "Type safety: Unchecked cast from X.BB<capture#1-of ? extends Number,capture#2-of ? super Integer> to X.BD<Number>");
+		node = getASTNode(compilationUnit, 0, 2, 1);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+	   	assertEquals("Not a cast expression", ASTNode.CAST_EXPRESSION, expression.getNodeType());
+		CastExpression castExpression = (CastExpression) expression;
+		Expression expression2 = castExpression.getExpression();
+		ITypeBinding typeBinding = expression2.resolveTypeBinding();
+		assertTrue("Not a parameterized type", typeBinding.isParameterizedType());
+		ITypeBinding[] typeArguments = typeBinding.getTypeArguments();
+		assertEquals("Wrong size", 2, typeArguments.length);
+		final ITypeBinding typeBinding2 = typeArguments[0];
+		assertTrue("Not a capture binding", typeBinding2.isCapture());
+		ITypeBinding wildcardBinding = typeBinding2.getWildcard();
+		assertNotNull("No wildcard binding", wildcardBinding);
+		assertTrue("Not from source", typeBinding2.isFromSource());
+		assertTrue("Not a wildcard", wildcardBinding.isWildcardType());
+	}
+
+	public void test0170() throws CoreException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+				"public class X {\n" +
+				"    static class BB<T, S> { }\n" +
+				"    static class BD<T> extends BB<T, T> { }\n" +
+				"    static BB<? extends Number, ? super Integer> bb = null;\n" +
+				"    public static void main(String[] args) {\n" +
+				"        System.out.println(/*start*/X.bb/*end*/);\n" +
+				"    }\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertNotNull("No node", node);
+	   	assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, node.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) node;
+		ITypeBinding typeBinding = qualifiedName.resolveTypeBinding();
+		assertTrue("Not a parameterized type", typeBinding.isParameterizedType());
+		ITypeBinding[] typeArguments = typeBinding.getTypeArguments();
+		assertEquals("Wrong size", 2, typeArguments.length);
+		final ITypeBinding typeBinding2 = typeArguments[0];
+		assertTrue("Not a capture binding", typeBinding2.isCapture());
+		ITypeBinding wildcardBinding = typeBinding2.getWildcard();
+		assertNotNull("No wildcard binding", wildcardBinding);
+		assertTrue("Not from source", typeBinding2.isFromSource());
+		assertTrue("Not a wildcard", wildcardBinding.isWildcardType());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92361
+	 */
+	public void test0171() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"public class X {\n" +
+				"\n" +
+				"    java.util.List<? extends Runnable> list;\n" +
+				"    Object o= /*start*/list/*end*/;\n" +
+				"}\n";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, node.getNodeType());
+		ITypeBinding type = ((SimpleName)node).resolveTypeBinding();
+		assertNull("Unexpected element", type.getTypeArguments()[0].getJavaElement());
+	}
+
+	/*
+	 * Ensures that 2 different capture bindings are not "isEqualTo(...)".
+	 * (regression test for bug 92888 ITypeBinding#isEqualTo(..) is wrong for capture bindings)
+	 */
+	public void test0172() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X<T> {\n" +
+			"  private static X<? super Number> num() {\n" +
+			"		return null;\n" +
+			"	}\n" +
+			"  void add(T t) {\n" +
+			"  }\n" +
+			"  void foo() {\n" +
+			"    Number n= null;\n" +
+			"    /*start1*/num().add(null)/*end1*/;\n" +
+			"    /*start2*/num().add(n)/*end2*/;\n" +
+			"  }\n" +
+			"}\n";
+	   	IBinding[] bindings = resolveBindings(contents, this.workingCopy);
+	   	assertTrue("2 different capture bindings should not be equals", !bindings[0].isEqualTo(bindings[1]));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=93093
+	 */
+	public void test0173() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"import java.util.Vector;\n" +
+				"\n" +
+				"@SuppressWarnings(\"null\")\n" +
+				"public class X {\n" +
+				"	void test1() {\n" +
+				"		Vector<? extends Number[]> v = null;\n" +
+				"		 /*start*/v.get(0)/*end*/;\n" +
+				"	}\n" +
+				"}\n";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+		ITypeBinding type = ((Expression)node).resolveTypeBinding();
+		assertTrue("Should be one bound", type.getTypeBounds().length == 1);
+		assertEquals("Invalid bound", "[Ljava.lang.Number;", type.getTypeBounds()[0].getBinaryName());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92982
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=88202
+	 */
+	public void test0174() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"import java.util.*;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	void test1() {\n" +
+				"		List<? extends Collection> l = null;\n" +
+				"		 /*start*/l.get(0)/*end*/;\n" +
+				"	}\n" +
+				"}\n";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+		ITypeBinding type = ((Expression)node).resolveTypeBinding();
+		assertTrue("Should be one bound", type.getTypeBounds().length == 1);
+		assertEquals("Invalid bound", "java.util.Collection", type.getTypeBounds()[0].getBinaryName());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=88202
+	 */
+	public void test0175() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"import java.util.*;\n" +
+				"\n" +
+				"@SuppressWarnings(\"null\")\n" +
+				"public class X {\n" +
+				"	void test1() {\n" +
+				"		List<?> l = null;\n" +
+				"		 /*start*/l.get(0)/*end*/;\n" +
+				"	}\n" +
+				"}\n";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+		ITypeBinding type = ((Expression)node).resolveTypeBinding();
+		assertTrue("Should be no bound", type.getTypeBounds().length == 0);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92982
+	 */
+	public void test0176() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+				"import java.util.*;\n" +
+				"\n" +
+				"public class X<T extends Collection> {\n" +
+				"	void test1() {\n" +
+				"		List<T> l = null;\n" +
+				"		 /*start*/l.get(0)/*end*/;\n" +
+				"	}\n" +
+				"}\n";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+		ITypeBinding type = ((Expression)node).resolveTypeBinding();
+		assertTrue("Should be one bound", type.getTypeBounds().length == 1);
+		assertEquals("Invalid bound", "java.util.Collection", type.getTypeBounds()[0].getBinaryName());
+	}
+
+	/*
+	 * Ensure that the declaring class of a capture binding is correct
+	 * (https://bugs.eclipse.org/bugs/show_bug.cgi?id=93275)
+	 */
+    public void test0177() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"public class X<T> {\n" +
+				"    Object foo(X<?> list) {\n" +
+				"       return /*start*/list.get()/*end*/;\n" +
+				"    }\n" +
+				"    T get() {\n" +
+				"    	return null;\n" +
+				"    }\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+		MethodInvocation methodInvocation = (MethodInvocation) node;
+		ITypeBinding capture = methodInvocation.resolveTypeBinding();
+		ITypeBinding declaringClass = capture.getDeclaringClass();
+		assertBindingEquals("LX<TT;>;", declaringClass);
+    }
+
+   	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=93075
+	 */
+    public void test0178() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"import java.util.Vector;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	void foo() {\n" +
+				"		Vector< ? super java.util.Collection<? super java.lang.Number> > lhs= null;		\n" +
+				"	}\n" +
+				"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+	   	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+	   	CompilationUnit unit = (CompilationUnit) node;
+	   	node = getASTNode(unit, 0, 0, 0);
+	   	assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+	   	VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+	   	Type type = statement.getType();
+	   	checkSourceRange(type, "Vector< ? super java.util.Collection<? super java.lang.Number> >", contents);
+	   	assertEquals("Not a parameterized type", ASTNode.PARAMETERIZED_TYPE, type.getNodeType());
+	   	ParameterizedType parameterizedType = (ParameterizedType) type;
+	   	List typeArguments = parameterizedType.typeArguments();
+	   	assertEquals("Wrong size", 1, typeArguments.size());
+	   	Type typeArgument = (Type) typeArguments.get(0);
+	   	assertEquals("Not a wildcard type", ASTNode.WILDCARD_TYPE, typeArgument.getNodeType());
+	   	WildcardType wildcardType = (WildcardType) typeArgument;
+	   	checkSourceRange(wildcardType, "? super java.util.Collection<? super java.lang.Number>", contents);
+	   	Type bound = wildcardType.getBound();
+	   	assertEquals("Not a parameterized type", ASTNode.PARAMETERIZED_TYPE, bound.getNodeType());
+	   	ParameterizedType parameterizedType2 = (ParameterizedType) bound;
+	   	checkSourceRange(bound, "java.util.Collection<? super java.lang.Number>", contents);
+	   	typeArguments = parameterizedType2.typeArguments();
+	   	assertEquals("Wrong size", 1, typeArguments.size());
+	   	typeArgument = (Type) typeArguments.get(0);
+	   	assertEquals("Not a wildcard type", ASTNode.WILDCARD_TYPE, typeArgument.getNodeType());
+	   	wildcardType = (WildcardType) typeArgument;
+	   	checkSourceRange(wildcardType, "? super java.lang.Number", contents);
+    }
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=93075
+	 */
+    public void test0179() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"@interface Test {}\n" +
+				"public enum X\n" +
+				"{\n" +
+				"     /*start*/@Test HISTORY/*end*/\n" +
+				"}";
+	   	ASTNode node = buildAST(
+			contents,
+    		this.workingCopy);
+	   	assertEquals("Not an enum constant declaration", ASTNode.ENUM_CONSTANT_DECLARATION, node.getNodeType());
+		EnumConstantDeclaration constantDeclaration = (EnumConstantDeclaration) node;
+		List modifiers = constantDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+	   	assertTrue("Not a marker annotation", modifier instanceof MarkerAnnotation);
+    }
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92360
+	 */
+    public void test0180() throws CoreException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+   		String contents =
+				"import java.util.List;\n" +
+				"public class X {\n" +
+				"    List</*start*/? extends Runnable/*end*/> list;\n" +
+				"}";
+	   	ASTNode node = buildAST(
+			contents,
+    		this.workingCopy);
+	   	assertEquals("Not a wildcard type", ASTNode.WILDCARD_TYPE, node.getNodeType());
+		WildcardType wildcardType = (WildcardType) node;
+		ITypeBinding typeBinding = wildcardType.resolveBinding();
+		assertTrue("Not a wildcard type", typeBinding.isWildcardType());
+		assertFalse("Not an class", typeBinding.isClass());
+    }
+
+	/*
+	 * Ensures that 2 different parameterized type bindings are not "isEqualTo(...)".
+	 * (regression test for bug 93408 ITypeBinding#isEqualTo(..) does not resolve type variables)
+	 */
+	public void test0181() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X<E> {\n" +
+			"	/*start1*/Y<E>/*end1*/ y;\n" +
+			"	static class Other<E> {\n" +
+			"		/*start2*/Y<E>/*end2*/ y;\n" +
+			"	}\n" +
+			"}\n" +
+			"class Y<E> {\n" +
+			"}";
+	   	IBinding[] bindings = resolveBindings(contents, this.workingCopy);
+	   	assertTrue("2 different parameterized type bindings should not be equals", !bindings[0].isEqualTo(bindings[1]));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=95911
+	 */
+	public void test0182() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+			"import java.util.Map;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	public void foo() {\n" +
+			"		Map<String, Number> map= new Map<String, Number>() {\n" +
+			"		};\n" +
+			"	}\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	node = getASTNode(compilationUnit, 0, 0, 0);
+    	assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+    	VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+    	List fragments = statement.fragments();
+    	assertEquals("Wrong size", 1, fragments.size());
+    	VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+    	String expectedSource = "map= new Map<String, Number>() {\n" +
+			"		}";
+    	checkSourceRange(fragment, expectedSource, contents);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=95911
+	 */
+	public void test0183() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+			"import java.util.Map;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	Map<String, Number> map= new Map<String, Number>() {\n" +
+			"	};\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+    	FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+    	List fragments = fieldDeclaration.fragments();
+    	assertEquals("Wrong size", 1, fragments.size());
+    	VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+    	String expectedSource = "map= new Map<String, Number>() {\n" +
+			"	}";
+    	checkSourceRange(fragment, expectedSource, contents);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=97841
+	 */
+	public void test0184() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+			"public class X {\n" +
+			"	java.util.Map<String, Number> map= new java.util.Map<String, Number>() {\n" +
+			"	};\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+    	FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+    	List fragments = fieldDeclaration.fragments();
+    	assertEquals("Wrong size", 1, fragments.size());
+    	VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+    	Expression initializer = fragment.getInitializer();
+    	assertNotNull("No initializer", initializer);
+    	ITypeBinding binding = initializer.resolveTypeBinding();
+    	assertNotNull("No binding", binding);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=98086
+	 */
+	public void test0185() throws JavaModelException {
+		final ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0185", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		assertEquals("Wrong setting", JavaCore.WARNING, sourceUnit.getJavaProject().getOption(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, true));
+		final ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		final CompilationUnit compilationUnit = (CompilationUnit) result;
+	   	assertProblemsSize(compilationUnit, 0);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=98086
+	 */
+	public void test0186() throws JavaModelException {
+		final ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0186", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		assertEquals("Wrong setting", JavaCore.WARNING, sourceUnit.getJavaProject().getOption(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION, true));
+		final ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		final CompilationUnit compilationUnit = (CompilationUnit) result;
+	   	assertProblemsSize(compilationUnit, 2, "Type safety: The expression of type ArrayList needs unchecked conversion to conform to List<String>\n" +
+	   			"ArrayList is a raw type. References to generic type ArrayList<T> should be parameterized");
+	}
+
+	/*
+	 * Ensures that the binding key of a parameterized type can be computed when it contains a reference to a type variable.
+	 * (regression test for bug 98259 NPE computing ITypeBinding#getKey())
+	 */
+	public void test0187() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+			"public class X {\n" +
+			"	<T> /*start*/Y<T>/*end*/ foo() {\n" +
+			"      return null;" +
+			"	};\n" +
+			"}\n" +
+			"class Y<E> {\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	ParameterizedType type = (ParameterizedType) node;
+    	assertBindingEquals(
+    		"LX~Y<LX;:1TT;>;",
+    		type.resolveBinding());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=98473
+	 */
+	public void test0188() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+			"import java.util.List;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	class Counter<T, /*start*/L extends List<T>/*end*/> {\n" +
+			"		private L _attribute;\n" +
+			"	}\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	assertEquals("Not a type parameter", ASTNode.TYPE_PARAMETER, node.getNodeType());
+    	ITypeBinding typeBinding = ((TypeParameter) node).resolveBinding();
+    	assertNotNull("No binding", typeBinding);
+    	assertFalse("Cannot be top level", typeBinding.isTopLevel());
+    	assertFalse("A class", typeBinding.isClass());
+    	assertFalse("An interface", typeBinding.isInterface());
+    	assertTrue("Not a type variable", typeBinding.isTypeVariable());
+		assertTrue("Not from source", typeBinding.isFromSource());
+	}
+
+	public void test0189() throws CoreException, IOException {
+		try {
+			IJavaProject project = createJavaProject("P1", new String[] {""}, new String[] {"CONVERTER_JCL15_LIB"}, "", "1.5");
+			addLibrary(project, "lib.jar", "src.zip", new String[] {
+				"/P1/p/I1.java",
+				"package p;\n" +
+				"public class I1<E> {\n" +
+				"}",
+				"/P1/p/I2.java",
+				"package p;\n" +
+				"public interface I2<K, V> {\n" +
+				"	interface I3<K,V> {}\n" +
+				"	I1<I2.I3<K, V>> foo();\n" +
+				"}",
+				"/P1/p/X.java",
+				"package p;\n" +
+				"public class X<K,V>  implements I2<K,V> {\n" +
+				"	public I1<I2.I3<K,V>> foo() {\n" +
+				"		return null;\n" +
+				"	}	\n" +
+				"}"
+			}, "1.5");
+			this.workingCopy = getWorkingCopy("/P1/p1/Y.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				"package p1;\n" +
+				"import p.*;\n" +
+				"public abstract class Y implements I2 {\n" +
+				"	public I1 foo() {\n" +
+				"		return /*start*/bar().foo()/*end*/;\n" +
+				"	}\n" +
+				"	private X bar() {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}",
+				this.workingCopy,
+				false);
+			MethodInvocation method = (MethodInvocation) node;
+			IMethodBinding methodBinding = method.resolveMethodBinding();
+			assertBindingEquals(
+				"Lp/X;.foo()Lp/I1<Lp/I2$I3<TK;TV;>;>;",
+				methodBinding.getMethodDeclaration());
+		} finally {
+			deleteProject("P1");
+		}
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=99355
+	public void test0190() throws CoreException, IOException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	final String contents =
+			"class Container<T> {\n" +
+			"	private final T m_t;\n" +
+			"\n" +
+			"	public Container(T t) {\n" +
+			"		m_t = t;\n" +
+			"	}\n" +
+			"\n" +
+			"	T get() {\n" +
+			"		return m_t;\n" +
+			"	}\n" +
+			"}\n" +
+			"\n" +
+			"class GenericContainer {\n" +
+			"	private final Container<?> m_c;\n" +
+			"\n" +
+			"	public GenericContainer(Container<?> c) {\n" +
+			"		m_c = c;\n" +
+			"	}\n" +
+			"\n" +
+			"	public Container<?> getC() {\n" +
+			"		return m_c;\n" +
+			"	}\n" +
+			"}\n" +
+			"\n" +
+			"public class X {\n" +
+			"	GenericContainer createContainer() {\n" +
+			"		final Container<String> innerContainer = new Container<String>(\"hello\");\n" +
+			"		final Container<Container<String>> outerContainer = new Container<Container<String>>(\n" +
+			"				innerContainer);\n" +
+			"		return new GenericContainer(outerContainer);\n" +
+			"	}\n" +
+			"\n" +
+			"	void method() {\n" +
+			"		final GenericContainer createContainer = createContainer();\n" +
+			"		/*start*/@SuppressWarnings(\"unchecked\")\n" +
+			"		final Container<Container<String>> c = (Container<Container<String>>) createContainer.getC();/*end*/\n" +
+			"		final Container<String> container = c.get();\n" +
+			"		final String string = container.get();\n" +
+			"	}\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+    	VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+    	List modifiers = statement.modifiers();
+    	assertEquals("Wrong size", 2, modifiers.size());
+	}
+
+	// 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);
+		assertNotNull("No node", node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Type safety: Unchecked cast from Collection<capture#1-of ? extends Number> to Vector<Object>");
+		node = getASTNode(unit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		assertEquals("Not a cast expression", ASTNode.CAST_EXPRESSION, initializer.getNodeType());
+		CastExpression castExpression = (CastExpression) initializer;
+		Type type = castExpression.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		Expression expression = castExpression.getExpression();
+		ITypeBinding typeBinding2 = expression.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding2);
+		assertTrue("Not cast compatible", typeBinding2.isCastCompatible(typeBinding));
+	}
+
+	// Wrong ParameterizedTypeBinding yields null type declaration result
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=100584
+	public void test0192() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X<E> {\n" +
+			"	public static class InnerClass {\n" +
+			"		static class InnerInnerClass {\n" +
+			"			/*start*/X.WrongInnerClass/*end*/.InnerInnerClass m;\n" +
+			"		}\n" +
+			"	}\n" +
+			"}";
+	   	IBinding[] bindings = resolveBindings(contents, this.workingCopy, false/*don't report errors*/);
+	   	if (bindings[0] != null) {
+	   		// should not get here if patch 100584 applied
+		   	try {
+		   		bindings[0].toString();
+		   		fail("should get an exception if bug 100584 present");
+		   		// which means that the code would now return a non null,
+		   		// erroneous binding, yet able to respond to toString
+		   	} catch (Throwable t) {/* absorb quietly */}
+	   	}
+	   	assertTrue("should yield a null, not a malformed binding",
+	   			bindings[0] == null);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=104492
+	public void test0193() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        byte[] b1 = new byte[0];\n" +
+			"        byte[] b2 = new byte[0];\n" +
+			"        for (byte[] bs : new byte[][] { b1, b2 }) {}\n" +
+			"    }\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit unit = (CompilationUnit) node;
+    	node = getASTNode(unit, 0, 0, 2);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType());
+    	EnhancedForStatement forStatement = (EnhancedForStatement) node;
+    	SingleVariableDeclaration singleVariableDeclaration = forStatement.getParameter();
+    	assertEquals("Should be 0", 0, singleVariableDeclaration.getExtraDimensions());
+    	Type type = singleVariableDeclaration.getType();
+    	assertEquals("Not an array type", ASTNode.ARRAY_TYPE, type.getNodeType());
+    	ArrayType arrayType = (ArrayType) type;
+    	assertEquals("Should be 1", 1, arrayType.getDimensions());
+    }
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=104492
+	public void test0194() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        byte[] b1 = new byte[0];\n" +
+			"        byte[] b2 = new byte[0];\n" +
+			"        for (byte[] bs/*comment*/ [ /*comment*/ ]: new byte[][][] { new byte[][] { b1, b2 }}) {}\n" +
+			"    }\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit unit = (CompilationUnit) node;
+    	node = getASTNode(unit, 0, 0, 2);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType());
+    	EnhancedForStatement forStatement = (EnhancedForStatement) node;
+    	SingleVariableDeclaration singleVariableDeclaration = forStatement.getParameter();
+    	assertEquals("Should be 1", 1, singleVariableDeclaration.getExtraDimensions());
+    	Type type = singleVariableDeclaration.getType();
+    	assertEquals("Not an array type", ASTNode.ARRAY_TYPE, type.getNodeType());
+    	ArrayType arrayType = (ArrayType) type;
+    	assertEquals("Should be 1", 1, arrayType.getDimensions());
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=106834
+	public void test0195() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X {\n" +
+			"	<S extends Number, T> void take(S e, T f) {}\n" +
+			"	<S extends Number, T> void take(T e, S f) {}\n" +
+			"	<S extends Number, T extends S> void take(T e, S f) {}\n" +
+			"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit unit = (CompilationUnit) node;
+    	node = getASTNode(unit, 0, 0);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+    	MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+    	IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+
+    	node = getASTNode(unit, 0, 1);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+    	MethodDeclaration methodDeclaration2 = (MethodDeclaration) node;
+    	IMethodBinding methodBinding2 = methodDeclaration2.resolveBinding();
+
+    	node = getASTNode(unit, 0, 2);
+    	assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+    	MethodDeclaration methodDeclaration3 = (MethodDeclaration) node;
+    	IMethodBinding methodBinding3 = methodDeclaration3.resolveBinding();
+
+    	assertFalse("Bindings are equals", methodBinding.isEqualTo(methodBinding2));
+    	assertFalse("Bindings are equals", methodBinding2.isEqualTo(methodBinding));
+    	assertFalse("Bindings are equals", methodBinding3.isEqualTo(methodBinding));
+    	assertFalse("Bindings are equals", methodBinding3.isEqualTo(methodBinding2));
+    	assertFalse("Bindings are equals", methodBinding2.isEqualTo(methodBinding3));
+    	assertFalse("Bindings are equals", methodBinding.isEqualTo(methodBinding3));
+    	assertTrue("Bindings are not equals", methodBinding3.isEqualTo(methodBinding3));
+    	assertTrue("Bindings are not equals", methodBinding2.isEqualTo(methodBinding2));
+    	assertTrue("Bindings are not equals", methodBinding.isEqualTo(methodBinding));
+    }
+
+	/*
+	 * Ensures that the signature of and IBinding representing a local type ends with the local type's simple name.
+	 * (regression test for bug 104879 BindingKey#internalToSignature() returns invalid signature for local type
+	 */
+	public void test0196() throws JavaModelException {
+	   	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"public class X {\n" +
+			"  void foo() {\n" +
+			"    /*start*/class Y {\n" +
+			"    }/*end*/\n" +
+			"  }\n" +
+			"}",
+			this.workingCopy);
+		IBinding binding = ((TypeDeclarationStatement) node).resolveBinding();
+		assertNotNull("No binding", binding);
+
+		String key = binding.getKey();
+		String signature = new BindingKey(key).toSignature();
+		String simpleName = Signature.getSimpleName(Signature.toString(signature));
+		assertEquals("Unexpected simple name", "Y", simpleName);
+	}
+
+
+	/*
+	 * Ensures that creating an AST with binding resolution where there is a problem in a binary
+	 * doesn't throw an NPE
+	 * (regression test for bug 100606 NPE during reconcile)
+	 */
+	public void test0197() throws CoreException {
+		try {
+			createJavaProject("P", new String[] {"src" }, new String[] {"CONVERTER_JCL15_LIB", "/P/lib"}, "bin", "1.5");
+			IFolder folder = createFolder("/P/lib");
+			String classesPath = folder.getLocation().toOSString();
+			Map options = new HashMap();
+			String[] pathsAndContents = new String[] {
+				"p/Bin.java",
+				"package p;\n" +
+				"public class Bin {\n" +
+				"}",
+				"p/BinSub.java",
+				"package p;\n" +
+				"public class BinSub extends Bin {\n" +
+				"}",
+			};
+			Util.compile(pathsAndContents, options, classesPath);
+			folder.refreshLocal(IResource.DEPTH_INFINITE, null);
+//			folder.getFolder("p").getFile("Bin.class").delete(false, null);
+			Util.delete(folder.getFolder("p").getFile("Bin.class"));
+	    	this.workingCopy = getWorkingCopy("/P/src/X.java", true/*resolve*/);
+	    	String contents =
+				"public class X {\n" +
+				"	void bar() throws p.BinSub {\n" +
+				"	}\n" +
+				"	</*start*/T/*end*/> void foo() {\n" +
+				"	}\n" +
+				"}";
+		   	IBinding[] bindings = resolveBindings(contents, this.workingCopy, false/*don't report errors*/);
+		   	assertBindingsEqual(
+		   		"LX;.foo<T:Ljava/lang/Object;>()V:TT;",
+		   		bindings);
+		} finally {
+			deleteProject("P");
+		}
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=110773
+	 */
+	public void test0198() throws CoreException {
+	   	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"public class X<E> {\n" +
+			"    class B { }\n" +
+			"    {\n" +
+			"        X<String>.B b;\n" +
+			"    }\n" +
+			"}",
+			this.workingCopy,
+			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 1);
+    	assertEquals("Not a initializer", ASTNode.INITIALIZER, node.getNodeType());
+    	Initializer initializer = (Initializer) node;
+    	Block block = initializer.getBody();
+    	assertNotNull("No block", block);
+    	List statements = block.statements();
+    	assertEquals("Wrong size", 1, statements.size());
+    	Statement statement = (Statement) statements.get(0);
+    	assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement.getNodeType());
+    	VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement;
+    	Type type = variableDeclarationStatement.getType();
+    	ITypeBinding typeBinding = type.resolveBinding();
+    	node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+    	TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+    	ITypeBinding typeBinding2 = typeDeclaration.resolveBinding();
+    	assertTrue("Not a member type", typeDeclaration.isMemberTypeDeclaration());
+    	assertFalse("Binding should not be equals", typeBinding.isEqualTo(typeBinding2));
+    	assertFalse("Binding should not be equals", typeBinding2.isEqualTo(typeBinding));
+    	ITypeBinding typeBinding3 = typeBinding.getTypeDeclaration();
+    	assertFalse("Binding should not be equals", typeBinding.isEqualTo(typeBinding3));
+    	assertFalse("Binding should not be equals", typeBinding3.isEqualTo(typeBinding));
+    }
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
+	 */
+	public void test0199() throws CoreException {
+	   	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		final String source = "public class X {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        byte[] b1 = new byte[0];\n" +
+			"        byte[] b2 = new byte[0];\n" +
+			"        for (byte[] bs : new byte[][] { b1, b2 }) {\n" +
+			"			System.out.println(bs);\n" +
+			"        }\n" +
+			"    }\n" +
+			"}";
+		ASTNode node = buildAST(
+			source,
+			this.workingCopy,
+			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 0, 2);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType());
+    	EnhancedForStatement forStatement = (EnhancedForStatement) node;
+    	final SingleVariableDeclaration parameter = forStatement.getParameter();
+    	final Type type = parameter.getType();
+    	checkSourceRange(type, "byte[]", source);
+    	checkSourceRange(parameter, "byte[] bs", source);
+    	assertTrue("not an array type", type.isArrayType());
+    	ArrayType arrayType = (ArrayType) type;
+    	Type elementType = arrayType.getElementType();
+    	assertTrue("not a primitive type", elementType.isPrimitiveType());
+    	checkSourceRange(elementType, "byte", source);
+    }
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
+	 */
+	public void test0200() throws CoreException {
+	   	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		final String source = "public class X {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        byte[] b1 = new byte[0];\n" +
+			"        byte[] b2 = new byte[0];\n" +
+			"        for (final byte[] bs : new byte[][] { b1, b2 }) {\n" +
+			"			System.out.println(bs);\n" +
+			"        }\n" +
+			"    }\n" +
+			"}";
+		ASTNode node = buildAST(
+			source,
+			this.workingCopy,
+			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 0, 2);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType());
+    	EnhancedForStatement forStatement = (EnhancedForStatement) node;
+    	final SingleVariableDeclaration parameter = forStatement.getParameter();
+    	final Type type = parameter.getType();
+    	checkSourceRange(type, "byte[]", source);
+    	checkSourceRange(parameter, "final byte[] bs", source);
+    }
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
+	 */
+	public void test0201() throws CoreException {
+	   	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		final String source = "public class X {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        byte[] b1 = new byte[0];\n" +
+			"        byte[] b2 = new byte[0];\n" +
+			"        for (final byte bs[] : new byte[][] { b1, b2 }) {\n" +
+			"			System.out.println(bs);\n" +
+			"        }\n" +
+			"    }\n" +
+			"}";
+		ASTNode node = buildAST(
+			source,
+			this.workingCopy,
+			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 0, 2);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType());
+    	EnhancedForStatement forStatement = (EnhancedForStatement) node;
+    	final SingleVariableDeclaration parameter = forStatement.getParameter();
+    	final Type type = parameter.getType();
+    	assertEquals("Wrong extended dimension", 1, parameter.getExtraDimensions());
+    	checkSourceRange(type, "byte", source);
+    	checkSourceRange(parameter, "final byte bs[]", source);
+    	assertTrue("not a primitive type", type.isPrimitiveType());
+    }
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=110657
+	 */
+	public void test0202() throws CoreException {
+	   	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		final String source = "public class X {\n" +
+			"    public static void main(String[] args) {\n" +
+			"        byte[] b1 = new byte[0];\n" +
+			"        byte[] b2 = new byte[0];\n" +
+			"        for (@Ann final byte bs[] : new byte[][] { b1, b2 }) {\n" +
+			"			System.out.println(bs);\n" +
+			"        }\n" +
+			"    }\n" +
+			"}\n" +
+			"@interface Ann {}";
+		ASTNode node = buildAST(
+			source,
+			this.workingCopy,
+			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 0, 2);
+    	assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, node.getNodeType());
+    	EnhancedForStatement forStatement = (EnhancedForStatement) node;
+    	final SingleVariableDeclaration parameter = forStatement.getParameter();
+    	final Type type = parameter.getType();
+    	assertEquals("Wrong extended dimension", 1, parameter.getExtraDimensions());
+    	checkSourceRange(type, "byte", source);
+    	checkSourceRange(parameter, "@Ann final byte bs[]", source);
+    	assertTrue("not a primitive type", type.isPrimitiveType());
+    	List modifiers = parameter.modifiers();
+    	assertEquals("Wrong size", 2, modifiers.size());
+    	final ASTNode modifier1 = ((ASTNode) modifiers.get(0));
+		assertEquals("Not an annotation", ASTNode.MARKER_ANNOTATION, modifier1.getNodeType());
+    	final ASTNode modifier2 = ((ASTNode) modifiers.get(1));
+		assertEquals("Not a modifier", ASTNode.MODIFIER, modifier2.getNodeType());
+		checkSourceRange(modifier1, "@Ann", source);
+		checkSourceRange(modifier2, "final", source);
+    }
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=80472
+	 */
+	public void test0203() throws CoreException {
+	   	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		final String source = "class X<T> {\n" +
+				"        X<T> list= this;\n" +
+				"        X<? super T> list2= this;\n" +
+				"}";
+		ASTNode node = buildAST(
+			source,
+			this.workingCopy,
+			false);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    	CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 0);
+    	node = getASTNode(compilationUnit, 0, 0);
+    	assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+    	FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+    	List fragments = fieldDeclaration.fragments();
+    	assertEquals("Wrong size", 1, fragments.size());
+    	VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+    	Expression initializer = fragment.getInitializer();
+    	ITypeBinding typeBinding = initializer.resolveTypeBinding();
+    	assertTrue("Not a parameterized binding", typeBinding.isParameterizedType());
+
+    	node = getASTNode(compilationUnit, 0, 1);
+    	assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+    	fieldDeclaration = (FieldDeclaration) node;
+    	fragments = fieldDeclaration.fragments();
+    	assertEquals("Wrong size", 1, fragments.size());
+    	fragment = (VariableDeclarationFragment) fragments.get(0);
+    	initializer = fragment.getInitializer();
+    	typeBinding = initializer.resolveTypeBinding();
+    	assertTrue("Not a parameterized binding", typeBinding.isParameterizedType());
+	}
+
+	/*
+	 * Ensures that the key of parameterized type binding with a raw enclosing type is correct
+	 * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=83064)
+	 */
+	public void test0204() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X<T> {\n" +
+    		"	static class Y {\n" +
+    		"		/*start*/Y/*end*/ y;\n" +
+    		"	}\n" +
+    		"}";
+	   	IBinding[] bindings = resolveBindings(contents, this.workingCopy);
+	   	assertBindingsEqual(
+	   		"LX<>.Y;",
+	   		bindings);
+	}
+
+	/*
+	 * Ensures that the declaration method binding and the reference method bindings are the same
+	 * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=83064)
+	 */
+	public void test0205() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X<E> {\n" +
+    		"    @I(12)\n" +
+    		"    @interface I {\n" +
+    		"        @I(/*start1*/value/*end1*/=13)\n" +
+    		"        int /*start2*/value/*end2*/();\n" +
+    		"    }\n" +
+    		"}";
+	   	IBinding[] bindings = resolveBindings(contents, this.workingCopy);
+	   	assertFalse("Declaration and reference keys should not be the same", bindings[0].getKey().equals(bindings[1].getKey()));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=120263
+	 */
+	public void test0206() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+    		"        public @interface Annot {\n" +
+    		"        }\n" +
+    		"        @Annot(newAttrib= {1, 2})\n" +
+    		"        public void foo() {\n" +
+    		"        }\n" +
+    		"}";
+    	ASTNode node = buildAST(
+    			contents,
+    			this.workingCopy,
+    			false);
+		assertNotNull("No node", node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+    	assertProblemsSize(compilationUnit, 1, "The attribute newAttrib is undefined for the annotation type X.Annot");
+    	node = getASTNode(compilationUnit, 0, 1);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong size", 2, modifiers.size());
+		IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not a normal annotation", extendedModifier instanceof NormalAnnotation);
+		NormalAnnotation annotation = (NormalAnnotation) extendedModifier;
+		List values = annotation.values();
+		assertEquals("Wrong size", 1, values.size());
+		MemberValuePair memberValuePair = (MemberValuePair) values.get(0);
+		Expression value = memberValuePair.getValue();
+		assertEquals("Not an array initializer", ASTNode.ARRAY_INITIALIZER, value.getNodeType());
+		ArrayInitializer arrayInitializer = (ArrayInitializer) value;
+		ITypeBinding typeBinding = arrayInitializer.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=124716
+	 */
+	public void test0207() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"    void m() {\n" +
+			"        new Object() {};\n" +
+			"    }\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy);
+		assertNotNull("No node", node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		Expression expression = ((ExpressionStatement) node).getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("Should not be null", binding);
+		IAnnotationBinding[] annotations = binding.getAnnotations();
+		assertNotNull("Should not be null", annotations);
+		assertEquals("Should be empty", 0, annotations.length);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=125807
+	 */
+	public void test0208() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"/*start*/@Override(x= 1)/*end*/\n" +
+			"public class X { }";
+		NormalAnnotation normalAnnotation = (NormalAnnotation) buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				true,
+				false);
+		IAnnotationBinding annotationBinding = normalAnnotation.resolveAnnotationBinding();
+		IMemberValuePairBinding[] pairs = annotationBinding.getDeclaredMemberValuePairs();
+		assertEquals("Wrong size", 0, pairs.length);
+		List values = normalAnnotation.values();
+		assertEquals("Wrong size", 1, values.size());
+		MemberValuePair pair = (MemberValuePair) values.get(0);
+		assertNotNull("no value", pair.getValue());
+	}
+
+	public void test0209() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test/V.java", true/*resolve*/);
+		String contents =
+			"package test;\n" +
+			"import pack.*;\n" +
+			"public class V {\n" +
+			"	void bar() {\n" +
+			"	}\n" +
+			"	void foo() {\n" +
+			"		@A3(\n" +
+			"			annot = @A2(\n" +
+			"				annot = @A1(value = E.CV, list = new E[] { E.CAV, E.CAV}, clazz = E.class),\n" +
+			"				value = E.CV,\n" +
+			"				list = new E[] { E.CAV, E.CAV},\n" +
+			"				clazz = E.class),\n" +
+			"			value = E.CV,\n" +
+			"			list = new E[] { E.CAV, E.CAV},\n" +
+			"			clazz = E.class)\n" +
+			"		int x = 0;\n" +
+			"		System.out.println(x);\n" +
+			"		System.out.println(x + 1);\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertNotNull("No node", node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		String problems =
+			"The value for annotation attribute A1.list must be an array initializer\n" +
+			"The value for annotation attribute A2.list must be an array initializer\n" +
+			"The value for annotation attribute A3.list must be an array initializer";
+		assertProblemsSize(compilationUnit, 3, problems);
+		List imports = compilationUnit.imports();
+		assertEquals("wrong size", 1, imports.size());
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		Name name = importDeclaration.getName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		SimpleName simpleName = (SimpleName) name;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind());
+	}
+	public void test0210() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", false);
+		String contents =
+			"public class X {\n" +
+			"	void foo(Object r) {\n" +
+			"		if (r instanceof Future<?>) {\n" +
+			"			System.out.println(\"TRUE\");\n" +
+			"		} else {\n" +
+			"			System.out.println(\"FALSE\");\n" +
+			"		}\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertNotNull("No node", node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Not an if statement", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		checkSourceRange(expression, "r instanceof Future<?>", contents);
+		assertEquals("Not an instanceof expression", ASTNode.INSTANCEOF_EXPRESSION, expression.getNodeType());
+		InstanceofExpression instanceofExpression = (InstanceofExpression) expression;
+		Type type = instanceofExpression.getRightOperand();
+		checkSourceRange(type, "Future<?>", contents);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=129096
+	 */
+	public void test0211() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	void foo(java.util.List<?> tab[]) {\n" +
+			"    }\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy,
+			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		List parameters = declaration.parameters();
+		assertEquals("wrong number", 1, parameters.size());
+		SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		checkSourceRange(variableDeclaration, "java.util.List<?> tab[]", contents);
+		checkSourceRange(variableDeclaration.getType(), "java.util.List<?>", contents);
+		checkSourceRange(variableDeclaration.getName(), "tab", contents);
+		assertEquals("wrong number of extra dimensions", 1, variableDeclaration.getExtraDimensions());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=129096
+	 */
+	public void test0212() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	void foo(java.util.List<?> tab[][]) {\n" +
+			"    }\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy,
+			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		List parameters = declaration.parameters();
+		assertEquals("wrong number", 1, parameters.size());
+		SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		checkSourceRange(variableDeclaration, "java.util.List<?> tab[][]", contents);
+		checkSourceRange(variableDeclaration.getType(), "java.util.List<?>", contents);
+		checkSourceRange(variableDeclaration.getName(), "tab", contents);
+		assertEquals("wrong number of extra dimensions", 2, variableDeclaration.getExtraDimensions());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=130528
+	 */
+	public void test0213() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"    int test(String[] strings) {\n" +
+			"        return strings.length;\n" +
+			"    }\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy,
+			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, expression.getNodeType());
+		QualifiedName name = (QualifiedName) expression;
+		SimpleName simpleName = name.getName();
+		checkSourceRange(simpleName, "length", contents);
+		IBinding binding = simpleName.resolveBinding();
+		assertEquals("Not a field", IBinding.VARIABLE, binding.getKind());
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("No annotations", 0, variableBinding.getAnnotations().length);
+	}
+
+	/*
+	 * Check unique instance of generic method bindings
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=104293
+	 */
+	public void test0214() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X {\n" +
+			"	\n" +
+			"	<T extends A> T foo(T t) {\n" +
+			"		return t;\n" +
+			"	}\n" +
+			"	public static void main(String[] args) {\n" +
+			"		new X().bar();\n" +
+			"	}\n" +
+			"	void bar() {\n" +
+			"		B b1 = foo(new B());\n" +
+			"		B b2 = foo(new B());\n" +
+			"	}\n" +
+			"}\n" +
+			"\n" +
+			"class A {}\n" +
+			"class B extends A {}\n";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 2, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 2, 1);
+		assertEquals("Not a compilation unit", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		statement = (VariableDeclarationStatement) node;
+		fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment= (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding2 = invocation.resolveMethodBinding();
+
+		assertTrue("Not identical", methodBinding == methodBinding2);
+	}
+
+	/*
+	 * Check unique instance of generic method bindings
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=104293
+	 */
+	public void test0215() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"public class X {\n" +
+			"	static <T> T identity(T t) { return t; }\n" +
+			"\n" +
+			"	public static void main(String[] args) {\n" +
+			"		String s = \"aaa\";\n" +
+			"		identity(s);\n" +
+			"		identity(s);\n" +
+			"		identity(s);\n" +
+			"\n" +
+			"		Object o = new Object();\n" +
+			"		identity(o);\n" +
+			"		identity(o);\n" +
+			"		identity(o);\n" +
+			"\n" +
+			"		Throwable t = null;\n" +
+			"		identity(t);\n" +
+			"		identity(t);\n" +
+			"		identity(t);\n" +
+			"\n" +
+			"		Exception e = null;\n" +
+			"		identity(e);\n" +
+			"		identity(e);\n" +
+			"		identity(e);\n" +
+			"\n" +
+			"		NullPointerException npe = null;\n" +
+			"		identity(npe);\n" +
+			"		identity(npe);\n" +
+			"		identity(npe);\n" +
+			"\n" +
+			"		Cloneable c = null;\n" +
+			"		identity(c);\n" +
+			"		identity(c);\n" +
+			"		identity(c);\n" +
+			"	}\n" +
+			"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 1, 1);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 2);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding2 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 3);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding3 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 5);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding4 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 6);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding5 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 9);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding6 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 10);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding7 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 11);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding8 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 13);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding9 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 14);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding10 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 15);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding11 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 17);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding12 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 18);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding13 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 19);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding14 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 21);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding15 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 22);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding16 = invocation.resolveMethodBinding();
+
+		node = getASTNode(unit, 0, 1, 23);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding17 = invocation.resolveMethodBinding();
+
+		assertTrue("method bindings are not equals", methodBinding == methodBinding2);
+		assertTrue("method bindings are not equals", methodBinding2 == methodBinding3);
+		assertTrue("method bindings are not equals", methodBinding4 == methodBinding5);
+		assertTrue("method bindings are not equals", methodBinding6 == methodBinding7);
+		assertTrue("method bindings are not equals", methodBinding7 == methodBinding8);
+		assertTrue("method bindings are not equals", methodBinding9 == methodBinding10);
+		assertTrue("method bindings are not equals", methodBinding9 == methodBinding11);
+		assertTrue("method bindings are not equals", methodBinding12 == methodBinding13);
+		assertTrue("method bindings are not equals", methodBinding14 == methodBinding13);
+		assertTrue("method bindings are not equals", methodBinding15 == methodBinding16);
+		assertTrue("method bindings are not equals", methodBinding17 == methodBinding16);
+	}
+
+	/*
+	 * Check unique instance of generic method bindings
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=104293
+	 */
+	public void test0216() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"class Y<T> {\n" +
+			"	<T> Class foo(T t) {\n" +
+			"		return t.getClass();\n" +
+			"	}\n" +
+			"}\n" +
+			"public class X { \n" +
+			"	 \n" +
+			"	public static void main(String[] args) { \n" +
+			"		Class c = new Y().foo(null);\n" +
+			"		Class c2 = new Y().foo(null);\n" +
+			"	} \n" +
+			"}\n" +
+			"";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedOutput =
+			"Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+			"Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+			"Type safety: The method foo(Object) belongs to the raw type Y. References to generic type Y<T> should be parameterized\n" +
+			"Y is a raw type. References to generic type Y<T> should be parameterized\n" +
+			"Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+			"Type safety: The method foo(Object) belongs to the raw type Y. References to generic type Y<T> should be parameterized\n" +
+			"Y is a raw type. References to generic type Y<T> should be parameterized";
+		assertProblemsSize(unit, 7, expectedOutput);
+		node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = invocation.resolveMethodBinding();
+		assertTrue("Not a raw method", methodBinding.isRawMethod());
+
+		node = getASTNode(unit, 1, 0, 1);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		statement = (VariableDeclarationStatement) node;
+		fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment= (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding2 = invocation.resolveMethodBinding();
+		assertTrue("Not a raw method", methodBinding2.isRawMethod());
+
+		assertTrue("Method bindings are not identical", methodBinding == methodBinding2);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=110799
+	 */
+	public void test0217() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"class Generic<E> {\n" +
+			"}\n" +
+			"public class X {\n" +
+			"    Generic raw;\n" +
+			"    java.util.Collection rawCollection;\n" +
+			"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedOutput =
+			"Generic is a raw type. References to generic type Generic<E> should be parameterized\n" +
+			"Collection is a raw type. References to generic type Collection<T> should be parameterized";
+		assertProblemsSize(unit, 2, expectedOutput);
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertTrue("isRaw", typeBinding.isRawType());
+
+		node = getASTNode(unit, 1, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		type = fieldDeclaration.getType();
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		assertTrue("isRaw", typeBinding2.isRawType());
+
+		ITypeBinding[] typeParameters = typeBinding.getTypeParameters();
+		assertEquals("Wrong size", 0, typeParameters.length);
+
+		ITypeBinding[] typeArguments = typeBinding.getTypeArguments();
+		assertEquals("Wrong size", 0, typeArguments.length);
+
+		typeParameters = typeBinding2.getTypeParameters();
+		assertEquals("Wrong size", 0, typeParameters.length);
+
+		typeArguments = typeBinding2.getTypeArguments();
+		assertEquals("Wrong size", 0, typeArguments.length);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=140318
+	 */
+	public void test0218() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+			"import java.util.List;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	/**\n" +
+			"	 * @category fo\n" +
+			"	 */\n" +
+			"	@Test private int fXoo;\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Test cannot be resolved to a type");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration declaration = (FieldDeclaration) node;
+		List modifiers = declaration.modifiers();
+		assertEquals("wrong size", 2, modifiers.size());
+		assertEquals("Not a marker annotation", ASTNode.MARKER_ANNOTATION, ((ASTNode) modifiers.get(0)).getNodeType());
+		MarkerAnnotation annotation = (MarkerAnnotation) modifiers.get(0);
+		Name name = annotation.getTypeName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		ITypeBinding binding = name.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding", binding2);
+		IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding();
+		assertNotNull("No binding", annotationBinding);
+		assertEquals("LX;.fXoo)I@LTest;", annotationBinding.getKey());
+		assertTrue("Annotation should not flagged as recovered", annotationBinding.isRecovered());
+		assertTrue("Annotation type should be flagged as recovered", annotationBinding.getAnnotationType().isRecovered());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=140318
+	 */
+	public void test0219() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.List;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	/**\n" +
+			"	 * @category fo\n" +
+			"	 */\n" +
+			"	@Test private int fXoo;\n" +
+			"}\n" +
+			"class Test {}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Type mismatch: cannot convert from Test to Annotation");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration declaration = (FieldDeclaration) node;
+		List modifiers = declaration.modifiers();
+		assertEquals("wrong size", 2, modifiers.size());
+		assertEquals("Not a marker annotation", ASTNode.MARKER_ANNOTATION, ((ASTNode) modifiers.get(0)).getNodeType());
+		MarkerAnnotation annotation = (MarkerAnnotation) modifiers.get(0);
+		Name name = annotation.getTypeName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		ITypeBinding binding = name.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding", binding2);
+		IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding();
+		assertNull("Got a binding", annotationBinding);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=142793
+	 * updated for https://bugs.eclipse.org/bugs/show_bug.cgi?id=143001
+	 */
+	public void test0220() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+			"        void bar(String[] c) {\n" +
+			"                for(String s: c) {\n" +
+			"                        try {\n" +
+			"                        }\n" +
+			"                }\n" +
+			"        }\n" +
+			"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false,
+    			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Syntax error, insert \"Finally\" to complete BlockStatements");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block body = methodDeclaration.getBody();
+		assertNotNull("No body", body);
+		List statements = body.statements();
+		assertEquals("Wrong size", 1, statements.size());
+		assertTrue("Recovered", !isRecovered(body));
+		assertFalse("Malformed", isMalformed(body));
+
+		Statement statement = (Statement)statements.get(0);
+		assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, statement.getNodeType());
+		EnhancedForStatement enhancedForStatement = (EnhancedForStatement) statement;
+		Statement forBody = enhancedForStatement.getBody();
+		assertNotNull("No body", forBody);
+		assertEquals("Not a block", ASTNode.BLOCK, forBody.getNodeType());
+
+		statements = ((Block)forBody).statements();
+		assertEquals("Wrong size", 1, statements.size());
+		statement = (Statement)statements.get(0);
+		assertEquals("Not an try statement", ASTNode.TRY_STATEMENT, statement.getNodeType());
+		TryStatement tryStatement = (TryStatement) statement;
+		Block finallyBlock = tryStatement.getFinally();
+		assertNotNull("No finally block", finallyBlock);
+		assertTrue("Not recovered", isRecovered(finallyBlock));
+
+
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=147875
+	 */
+	public void test0221() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"import p1.p2.MyEnum;\n" +
+    		"public class X {\n" +
+			"	MyEnum foo() {\n" +
+			"		return null;\n" +
+			"	}\n" +
+			"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false,
+    			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=148797
+	 */
+	public void test0222() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+    		"   public void a() {\n" +
+    		"      Object a = null;\n" +
+    		"      for (Object o : a.getClass()()) {\n" +
+    		"      }\n" +
+    		"   }\n" +
+    		"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false,
+    			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 2, "Syntax error on token \")\", invalid Name\n" +
+				"Syntax error, insert \")\" to complete EnhancedForStatementHeader");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block body = methodDeclaration.getBody();
+		assertNotNull("No body", body);
+		List statements = body.statements();
+		assertEquals("Wrong size", 2, statements.size());
+		Statement statement = (Statement) statements.get(1);
+		assertEquals("Not an enhanced for statement", ASTNode.ENHANCED_FOR_STATEMENT, statement.getNodeType());
+		EnhancedForStatement forStatement = (EnhancedForStatement) statement;
+		Expression expression = forStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
+	 */
+	public void test0223() throws JavaModelException {
+			this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"    @Zork\n" +
+			"    public void foo( ) {\n" +
+			"    }\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Zork cannot be resolved to a type");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		IAnnotationBinding[] annotations = methodBinding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+		assertNotNull("No binding", annotations[0]);
+		assertEquals("LX;.foo()V@LZork;", annotations[0].getKey());
+		assertTrue("Annotation should be flagged as recovered", annotations[0].isRecovered());
+		assertTrue("Annotation type should be flagged as recovered", annotations[0].getAnnotationType().isRecovered());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
+	 */
+	public void test0224() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"@Zork\n" +
+    		"public class X {\n" +
+    		"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Zork cannot be resolved to a type");
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+		assertNotNull("No binding", annotations[0]);
+		assertEquals("LX;@LZork;", annotations[0].getKey());
+		assertTrue("Annotation should be flagged as recovered", annotations[0].isRecovered());
+		assertTrue("Annotation type should be flagged as recovered", annotations[0].getAnnotationType().isRecovered());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
+	 */
+	public void test0225() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"public class X {\n" +
+    		"    public void foo(@Zork String s) {\n" +
+    		"    }\n" +
+    		"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false,
+    			false,
+    			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Zork cannot be resolved to a type");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 1, parameters.size());
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		IVariableBinding variableBinding = singleVariableDeclaration.resolveBinding();
+		IAnnotationBinding[] bindings = variableBinding.getAnnotations();
+		assertEquals("Wrong size", 1, bindings.length);
+		assertNotNull("No binding", bindings[0]);
+		assertEquals("@LZork;", bindings[0].getKey());
+		assertTrue("Annotation should be flagged as recovered", bindings[0].isRecovered());
+		assertTrue("Annotation type should be flagged as recovered", bindings[0].getAnnotationType().isRecovered());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=153303
+	 */
+	public void test0226() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/p/package-info.java", true/*resolve*/);
+    	String contents =
+    		"@Zork package p;";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Zork cannot be resolved to a type");
+		PackageDeclaration packageDeclaration = unit.getPackage();
+		IPackageBinding packageBinding = packageDeclaration.resolveBinding();
+		IAnnotationBinding[] annotations = packageBinding.getAnnotations();
+		assertEquals("Wrong size", 0, annotations.length);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=155115
+	public void test0227() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"import anno.Anno;\n" +
+    		"import binary.B;\n" +
+    		"import intf.IFoo;\n" +
+    		"\n" +
+    		"public class X extends B {\n" +
+    		"	@Anno(clz=IFoo.IBar.class)\n" +
+    			// the annotation we chase up is not this one, but the one
+    			// carried by B#f
+    		"	public void f() {}\n" +
+    		"   IFoo.IBar m;\n" +
+    		"}";
+    	class TestASTRequestor extends ASTRequestor {
+    		public ArrayList asts = new ArrayList();
+    		public void acceptAST(ICompilationUnit source, CompilationUnit compilationUnit) {
+    			this.asts.add(compilationUnit);
+    		}
+    		public void acceptBinding(String bindingKey, IBinding binding) {
+    		}
+    	}
+    	this.workingCopy.getBuffer().setContents(contents);
+    	this.workingCopy.save(null, true);
+    	TestASTRequestor requestor = new TestASTRequestor();
+    	resolveASTs(new ICompilationUnit[] { this.workingCopy } , new String[0], requestor, getJavaProject("Converter15"), null);
+    	ArrayList asts = requestor.asts;
+		assertEquals("Wrong size", 1, asts.size());
+		CompilationUnit compilationUnit = (CompilationUnit) asts.get(0);
+		assertNotNull("No compilation unit", compilationUnit);
+		List types = compilationUnit.types();
+		assertEquals("Wrong size", 1, types.size());
+		AbstractTypeDeclaration abstractTypeDeclaration = (AbstractTypeDeclaration) types.get(0);
+		assertEquals("Wrong type", ASTNode.TYPE_DECLARATION, abstractTypeDeclaration.getNodeType());
+		TypeDeclaration declaration = (TypeDeclaration) abstractTypeDeclaration;
+		Type superclass = declaration.getSuperclassType();
+		assertNotNull("No superclass", superclass);
+		ITypeBinding typeBinding = superclass.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertNotNull("No methods", methods);
+		assertEquals("Wrong size", 2, methods.length);
+		IMethodBinding methodBinding = null;
+		for(int i = 0; i < 2; i++) {
+			methodBinding = methods[i];
+			if (methodBinding.getName().equals("f")) {
+				break;
+			}
+		}
+		assertEquals("Wrong name", "f", methodBinding.getName());
+		IAnnotationBinding[] annotationBindings = methodBinding.getAnnotations();
+		assertNotNull("No annotations", annotationBindings);
+		assertEquals("Wrong size", 1, annotationBindings.length);
+		IAnnotationBinding annotationBinding = annotationBindings[0];
+		IMemberValuePairBinding[] pairs = annotationBinding.getAllMemberValuePairs();
+		assertNotNull("no pairs", pairs);
+		assertEquals("Wrong size", 1, pairs.length);
+		IMemberValuePairBinding memberValuePairBinding = pairs[0];
+		assertEquals("Wrong kind", IBinding.MEMBER_VALUE_PAIR, memberValuePairBinding.getKind());
+		Object value = memberValuePairBinding.getValue();
+		assertNotNull("No value", value);
+		assertTrue("Not a type binding", value instanceof ITypeBinding);
+		assertEquals("Wrong qualified name", "intf.IFoo.IBar",
+				((ITypeBinding) value).getQualifiedName());
+		IVariableBinding[] fields =
+			declaration.resolveBinding().getDeclaredFields();
+		assertTrue("Bad field definition", fields != null && fields.length == 1);
+		assertEquals("Type binding mismatch", value, fields[0].getType());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=157403
+	 */
+	public void test0228() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+    		"@interface Ann {\n" +
+    		"  int foo();\n" +
+    		"}\n" +
+    		"@Ann(foo = bar())\n" +
+    		"public class X {\n" +
+    		"	public static int bar() {\n" +
+    		" 		return 0;\n" +
+    		"	}\n" +
+    		"}";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "The method bar() is undefined for the type X");
+		List types = unit.types();
+		assertEquals("wrong size", 2, types.size());
+		AbstractTypeDeclaration typeDeclaration = (AbstractTypeDeclaration) types.get(1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, typeDeclaration.getNodeType());
+		TypeDeclaration declaration = (TypeDeclaration) typeDeclaration;
+		List modifiers = declaration.modifiers();
+		assertEquals("wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("not an annotation", modifier.isAnnotation());
+		Annotation annotation = (Annotation) modifier;
+		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, annotation.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
+		List values = normalAnnotation.values();
+		assertEquals("wrong size", 1, values.size());
+		MemberValuePair pair = (MemberValuePair) values.get(0);
+		IBinding binding = pair.getName().resolveBinding();
+		assertNotNull("No binding", binding);
+		binding = pair.getValue().resolveTypeBinding();
+		assertNull("Got a binding", binding);
+		binding = pair.resolveMemberValuePairBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=160089
+	 */
+	public void test0229() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+    	String contents =
+     		"import java.util.List;\n" +
+     		"import java.util.Collection;\n" +
+     		"public class X {\n" +
+     		"	public static List<String> bar;\n" +
+     		"   @SuppressWarnings(\"rawtypes\")\n" +
+     		"	public static Collection bar2;\n" +
+    		"}";
+    	this.workingCopy.getBuffer().setContents(contents);
+    	this.workingCopy.save(null, true);
+    	final ASTNode[] asts = new ASTNode[1];
+       	final IBinding[] bindings = new IBinding[1];
+       	final String key = BindingKey.createParameterizedTypeBindingKey(
+       	     "Ljava/util/Collection<TE;>;", new String[] {});
+    	resolveASTs(
+			new ICompilationUnit[] {
+				this.workingCopy
+			},
+			new String[] {
+				key
+			},
+			new ASTRequestor() {
+                public void acceptAST(ICompilationUnit source, CompilationUnit localAst) {
+                	asts[0] = localAst;
+                }
+                public void acceptBinding(String bindingKey, IBinding binding) {
+                	if (key.equals(bindingKey)) {
+                		bindings[0] = binding;
+                 	}
+                }
+			},
+			getJavaProject("Converter15"),
+			null);
+    	ASTNode node = asts[0];
+    	assertNotNull("Should not be null", node);
+    	assertNotNull("Should not be null", bindings[0]);
+    	assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+    	assertEquals("Not a compilation unit", ASTNode.FIELD_DECLARATION, node.getNodeType());
+    	FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+    	Type type = fieldDeclaration.getType();
+    	ITypeBinding typeBinding = type.resolveBinding();
+		node = getASTNode(unit, 0, 1);
+    	assertEquals("Not a compilation unit", ASTNode.FIELD_DECLARATION, node.getNodeType());
+    	fieldDeclaration = (FieldDeclaration) node;
+    	type = fieldDeclaration.getType();
+    	ITypeBinding typeBinding2 = type.resolveBinding();
+    	final ITypeBinding collectionTypeBinding = (ITypeBinding) bindings[0];
+    	assertTrue("Not a raw type", collectionTypeBinding.isRawType());
+    	assertTrue("Not assignement compatible", typeBinding.isAssignmentCompatible(typeBinding2));
+    	assertTrue("Not assignement compatible", typeBinding.isAssignmentCompatible(collectionTypeBinding));
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=156352
+	 */
+	public void test0230() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0230", "Test3.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
+
+		assertNotNull("Should not be null", type);
+		ASTParser parser= ASTParser.newParser(AST.JLS8);
+		parser.setProject(type.getJavaProject());
+		IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null);
+		if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
+			ITypeBinding typeBinding= (ITypeBinding) bindings[0];
+			StringBuffer buffer = new StringBuffer();
+			while (typeBinding != null) {
+				buffer.append(typeBinding.getAnnotations().length);
+				typeBinding= typeBinding.getSuperclass();
+			}
+			// the right outcome would be "020", but depending on the strategy when exactly
+			// annotations are resolved the annotations on Test2 are (not) present when
+			// traversing the super-class chain.
+			// The patch in https://bugs.eclipse.org/186342#c196 produced "020" but
+			// the previous behavior ("000") was restored in https://bugs.eclipse.org/365387
+			// (see the change in SourceTypeBinding.resolveTypesFor(..))
+			assertEquals("Wrong number of annotations", "000", String.valueOf(buffer));
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=156352
+	 */
+	public void test0231() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0231", "Test3.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType type = sourceUnit.getType("Test3");//$NON-NLS-1$
+
+		assertNotNull("Should not be null", type);
+		ASTParser parser= ASTParser.newParser(AST.JLS8);
+		parser.setSource(sourceUnit);
+		parser.setKind(ASTParser.K_COMPILATION_UNIT);
+		parser.setResolveBindings(true);
+		CompilationUnit unit = (CompilationUnit) parser.createAST(null);
+		List types = unit.types();
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		StringBuffer buffer = new StringBuffer();
+		while (typeBinding != null) {
+			buffer.append(typeBinding.getAnnotations().length);
+			typeBinding= typeBinding.getSuperclass();
+		}
+		assertEquals("Wrong number of annotations", "020", String.valueOf(buffer));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=167958
+	 */
+	public void test0232() throws JavaModelException {
+		/*
+			package test0232;
+			import static java.lang.annotation.ElementType.*;
+			import static java.lang.annotation.RetentionPolicy.*;
+			import java.lang.annotation.Retention;
+			import java.lang.annotation.Target;
+
+			@Target(TYPE)
+			@Retention(RUNTIME)
+			@interface Annot {
+			}
+			package test0232;
+			@Annot
+			public class X {
+			}
+		 */
+		String contents =
+			"import test0232.X;\n" +
+			"public class A {\n" +
+			"    X test() {\n" +
+			"        return null;\n" +
+			"    }\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/A.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy,
+			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		Type type = declaration.getReturnType2();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertTrue("Not a binary type binding", !typeBinding.isFromSource());
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertNotNull("No annotations", annotations);
+		assertEquals("Wrong size", 1, annotations.length);
+		IAnnotationBinding annotationBinding = annotations[0];
+		assertEquals("Wrong name", "Annot", annotationBinding.getName());
+		ITypeBinding binding = annotationBinding.getAnnotationType();
+		assertEquals("Wrong name", "test0232.Annot", binding.getQualifiedName());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=167958
+	 */
+	public void test0233() throws JavaModelException {
+		/*
+			package test0233;
+
+			import static java.lang.annotation.ElementType.*;
+			import static java.lang.annotation.RetentionPolicy.*;
+
+			import java.lang.annotation.Retention;
+			import java.lang.annotation.Target;
+
+			@Target(TYPE)
+			@Retention(CLASS)
+			@interface Annot {
+				String message() default "";
+			}
+
+			package test0233;
+
+			@Annot(message="Hello, World!")
+			public class X {
+			}
+		 */
+		String contents =
+			"import test0233.X;\n" +
+			"public class A {\n" +
+			"    X test() {\n" +
+			"        return null;\n" +
+			"    }\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/A.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy,
+			true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		Type type = declaration.getReturnType2();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertTrue("Not a binary type binding", !typeBinding.isFromSource());
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertNotNull("No annotations", annotations);
+		assertEquals("Wrong size", 1, annotations.length);
+		IAnnotationBinding annotationBinding = annotations[0];
+		assertEquals("Wrong name", "Annot", annotationBinding.getName());
+		ITypeBinding binding = annotationBinding.getAnnotationType();
+		assertEquals("Wrong name", "test0233.Annot", binding.getQualifiedName());
+		IMemberValuePairBinding[] pairs = annotationBinding.getAllMemberValuePairs();
+		assertEquals("Wrong number", 1, pairs.length);
+		assertEquals("Wrong key", "message", pairs[0].getName());
+		assertEquals("Wrong value", "Hello, World!", pairs[0].getValue());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=169744
+	 */
+	public void test0234() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"class B {\n" +
+			"	<T> int m() {\n" +
+			"		return 0;\n" +
+			"	}\n" +
+			"}\n" +
+			"public class X<T> extends B {\n" +
+			"	int i = super.<T> m();\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		checkSourceRange(expression, "super.<T> m()", contents);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=172633
+	 */
+	public void test0235() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0235/X.java", true/*resolve*/);
+		String contents =
+			"package test0235;\n" +
+			"public class X implements I {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedProblems = "The hierarchy of the type X is inconsistent\n" +
+		"The type test0235.Zork cannot be resolved. It is indirectly referenced from required .class files";
+		assertProblemsSize(unit, 2, expectedProblems);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		ITypeBinding[] interfaces = typeBinding.getInterfaces();
+		assertNotNull("No interfaces", interfaces);
+		assertEquals("Wrong size", 1, interfaces.length);
+		assertNotNull("Should not be null", interfaces[0]);
+		ITypeBinding typeBinding2 = interfaces[0];
+		interfaces = typeBinding2.getInterfaces();
+		assertNotNull("No interfaces", interfaces);
+		assertEquals("Wrong size", 1, interfaces.length);
+		assertNotNull("No binding", interfaces[0]);
+		assertEquals("Ltest0235/Zork;", interfaces[0].getKey());
+		assertFalse("I should not be flagged as recovered", typeBinding2.isRecovered());
+		assertTrue("Zork should be flagged as recovered", interfaces[0].isRecovered());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=172633
+	 */
+	public void test0236() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X implements Runnable, Zork {\n" +
+			"	public void run() {}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedProblems = "Zork cannot be resolved to a type";
+		assertProblemsSize(unit, 1, expectedProblems);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		ITypeBinding[] interfaces = typeBinding.getInterfaces();
+		assertNotNull("No interfaces", interfaces);
+		assertEquals("Wrong size", 2, interfaces.length);
+		assertEquals("Ljava/lang/Runnable;", interfaces[0].getKey());
+		assertFalse("Runnable should not be flagged as recovered", interfaces[0].isRecovered());
+		assertEquals("LZork;", interfaces[1].getKey());
+		assertTrue("Zork should be flagged as recovered", interfaces[1].isRecovered());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
+	 */
+	public void test0237() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0237/X.java", true/*resolve*/);
+		String contents =
+			"package test0237;\n" +
+			"public class X {\n" +
+			"	Zork foo() {}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedProblems = "Zork cannot be resolved to a type";
+		assertProblemsSize(unit, 1, expectedProblems);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		IMethodBinding[] methodBindings = typeBinding.getDeclaredMethods();
+		assertNotNull("No method bindings", methodBindings);
+		assertEquals("wrong size", 2, methodBindings.length);
+		assertEquals("Ltest0237/X;.()V", methodBindings[0].getKey());
+		assertEquals("Ltest0237/X;.foo()LZork;", methodBindings[1].getKey());
+		assertFalse("#foo() should not be flagged as recovered", methodBindings[1].isRecovered());
+		assertTrue("Zork should be flagged as recovered", methodBindings[1].getReturnType().isRecovered());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
+	 */
+	public void test0238() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0238/X.java", true/*resolve*/);
+		String contents =
+			"package test0238;\n" +
+			"public class X extends A {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		typeBinding = typeBinding.getSuperclass();
+		IMethodBinding[] methodBindings = typeBinding.getDeclaredMethods();
+		assertNotNull("No method bindings", methodBindings);
+		assertEquals("wrong size", 1, methodBindings.length);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
+	 */
+	public void test0238_2() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0238/X.java", true/*resolve*/);
+		String contents =
+			"package test0238;\n" +
+			"public class X extends A {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		typeBinding = typeBinding.getSuperclass();
+		IMethodBinding[] methodBindings = typeBinding.getDeclaredMethods();
+		assertNotNull("No method bindings", methodBindings);
+		assertEquals("wrong size", 2, methodBindings.length);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
+	 */
+	public void test0239() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0239/X.java", true/*resolve*/);
+		String contents =
+			"package test0239;\n" +
+			"public class X extends A {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		typeBinding = typeBinding.getSuperclass();
+		IVariableBinding[] variableBindings = typeBinding.getDeclaredFields();
+		assertNotNull("No variable bindings", variableBindings);
+		assertEquals("wrong size", 0, variableBindings.length);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=173338
+	 */
+	public void test0239_2() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0239/X.java", true/*resolve*/);
+		String contents =
+			"package test0239;\n" +
+			"public class X extends A {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				true,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		typeBinding = typeBinding.getSuperclass();
+		IVariableBinding[] variableBindings = typeBinding.getDeclaredFields();
+		assertNotNull("No variable bindings", variableBindings);
+		assertEquals("wrong size", 1, variableBindings.length);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
+	 */
+	public void test0240() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X<T> {}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		ITypeBinding[] typeParameters = typeBinding.getTypeParameters();
+		assertEquals("Wrong size", 1, typeParameters.length);
+		ITypeBinding typeParameter = typeParameters[0];
+		assertTrue("Not a type variable", typeParameter.isTypeVariable());
+		assertEquals("Wrong binary name", "X$T", typeParameter.getBinaryName());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
+	 */
+	public void test0241() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	<T> void foo() {}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull("No binding", methodBinding);
+		ITypeBinding[] typeParameters = methodBinding.getTypeParameters();
+		assertEquals("Wrong size", 1, typeParameters.length);
+		ITypeBinding typeParameter = typeParameters[0];
+		assertTrue("Not a type variable", typeParameter.isTypeVariable());
+		assertEquals("Wrong binary name", "X$()V$T", typeParameter.getBinaryName());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
+	 */
+	public void test0242() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	<T> X() {}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull("No binding", methodBinding);
+		ITypeBinding[] typeParameters = methodBinding.getTypeParameters();
+		assertEquals("Wrong size", 1, typeParameters.length);
+		ITypeBinding typeParameter = typeParameters[0];
+		assertTrue("Not a type variable", typeParameter.isTypeVariable());
+		assertEquals("Wrong binary name", "X$()V$T", typeParameter.getBinaryName());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=107001
+	 */
+	public void test0243() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/*resolve*/);
+		String contents =
+			"package p;\n" +
+			"public class X<U,V> {\n" +
+			"	<T> X(Integer i) {}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull("No binding", methodBinding);
+		ITypeBinding[] typeParameters = methodBinding.getTypeParameters();
+		assertEquals("Wrong size", 1, typeParameters.length);
+		ITypeBinding typeParameter = typeParameters[0];
+		assertTrue("Not a type variable", typeParameter.isTypeVariable());
+		assertEquals("Wrong binary name", "p.X$(Ljava/lang/Integer;)V$T", typeParameter.getBinaryName());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173849
+	public void test0244() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.java", true/*resolve*/);
+		String contents =
+			"package xy;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	protected class Inner {\n" +
+			"	}\n" +
+			"\n" +
+			"	Inner[] i;\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		IJavaElement element = typeBinding.getJavaElement();
+		assertNotNull("No element", element);
+		assertTrue("Doesn't exist", element.exists());
+		assertEquals("Wrong handle identifier", "=Converter15/src<xy{X.java[X[Inner", element.getHandleIdentifier());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173849
+	public void test0245() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.java", true/*resolve*/);
+		String contents =
+			"package xy;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	protected class Inner {\n" +
+			"	}\n" +
+			"\n" +
+			"	Inner i;\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		IJavaElement element = typeBinding.getJavaElement();
+		assertNotNull("No element", element);
+		assertTrue("Doesn't exist", element.exists());
+		assertEquals("Wrong handle identifier", "=Converter15/src<xy{X.java[X[Inner", element.getHandleIdentifier());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173849
+	public void test0246() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/xy/X.java", true/*resolve*/);
+		String contents =
+			"package xy;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	protected class Inner {\n" +
+			"	}\n" +
+			"\n" +
+			"	Inner[][] i;\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		IJavaElement element = typeBinding.getJavaElement();
+		assertNotNull("No element", element);
+		assertTrue("Doesn't exist", element.exists());
+		assertEquals("Wrong handle identifier", "=Converter15/src<xy{X.java[X[Inner", element.getHandleIdentifier());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=156352
+	 */
+	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);
+		assertNotNull("Not a compilation unit", result);
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=175409
+	public void test0248() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.Arrays;\n" +
+			"import java.util.List;\n" +
+			"public class X {\n" +
+			"	public <T> void find(T a, List<T> b) {\n" +
+			"		}\n" +
+			"	public void foo() {\n" +
+			"		find(x, Arrays.asList(\"a\"));\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedError = "x cannot be resolved to a variable";
+		assertProblemsSize(unit, 1, expectedError);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = invocation.resolveMethodBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a parameterized method", methodBinding.isParameterizedMethod());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174436
+	public void test0249() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.Collections;\n" +
+			"import java.util.Map;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	void caller() {\n" +
+			"		Map<String, String> explicitEmptyMap = Collections.<String, String> emptyMap();\n" +
+			"		method(explicitEmptyMap);\n" +
+			"		Map<String, String> emptyMap = Collections.emptyMap();\n" +
+			"		method(emptyMap);\n" +
+			"	}\n" +
+			"\n" +
+			"	void method(Map<String, String> map) {\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement= (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		assertFalse("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+
+		node = getASTNode(unit, 0, 0, 2);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		statement= (VariableDeclarationStatement) node;
+		fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		methodInvocation = (MethodInvocation) expression;
+		assertTrue("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=174436
+	public void test0250() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.Map;\n" +
+			"\n" +
+			"class A {\n" +
+			"	public <K,V> Map<K,V> foo() {\n" +
+			"		return null;\n" +
+			"	}\n" +
+			"}\n" +
+			"public class X extends A {\n" +
+			"	void caller() {\n" +
+			"		Map<String, String> explicitEmptyMap = super.<String, String> foo();\n" +
+			"		method(explicitEmptyMap);\n" +
+			"		Map<String, String> emptyMap = super.foo();\n" +
+			"		method(emptyMap);\n" +
+			"	}\n" +
+			"\n" +
+			"	void method(Map<String, String> map) {\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement= (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a super method invocation", ASTNode.SUPER_METHOD_INVOCATION, expression.getNodeType());
+		SuperMethodInvocation methodInvocation = (SuperMethodInvocation) expression;
+		assertFalse("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+
+		node = getASTNode(unit, 1, 0, 2);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		statement= (VariableDeclarationStatement) node;
+		fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a super method invocation", ASTNode.SUPER_METHOD_INVOCATION, expression.getNodeType());
+		methodInvocation = (SuperMethodInvocation) expression;
+		assertTrue("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+	}
+
+	//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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement= (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		assertFalse("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+
+		node = getASTNode(unit, 0, 0, 2);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		statement= (VariableDeclarationStatement) node;
+		fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		methodInvocation = (MethodInvocation) expression;
+		assertFalse("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+	}
+
+	//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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement= (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a super method invocation", ASTNode.SUPER_METHOD_INVOCATION, expression.getNodeType());
+		SuperMethodInvocation methodInvocation = (SuperMethodInvocation) expression;
+		assertFalse("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+
+		node = getASTNode(unit, 1, 0, 2);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		statement= (VariableDeclarationStatement) node;
+		fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a super method invocation", ASTNode.SUPER_METHOD_INVOCATION, expression.getNodeType());
+		methodInvocation = (SuperMethodInvocation) expression;
+		assertFalse("Wrong value", methodInvocation.isResolvedTypeInferredFromExpectedType());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0253() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	protected Object foo() {\n" +
+			"		List<String> c = null;\n" +
+			"		return c;\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		this.workingCopy.getBuffer().setContents(contents);
+		ASTNode node = runConversion(AST.JLS8, 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";
+		assertProblemsSize(unit, 1, expectedError);
+		assertTrue("No binding recovery", unit.getAST().hasBindingsRecovery());
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("No fragments", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertFalse("A recovered binding", variableBinding.isRecovered());
+		ITypeBinding typeBinding = variableBinding.getType();
+		assertNotNull("No binding", typeBinding);
+		assertTrue("Not a recovered binding", typeBinding.isRecovered());
+		assertEquals("Wrong name", "List<String>", typeBinding.getName());
+		assertEquals("Wrong dimension", 0, typeBinding.getDimensions());
+		assertEquals("LList<Ljava/lang/String;>;", typeBinding.getKey());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0254() throws JavaModelException {
+		String contents =
+			"import java.util.List;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	protected Object foo() {\n" +
+			"		List<String> c = null;\n" +
+			"		return c;\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		this.workingCopy.getBuffer().setContents(contents);
+		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		assertTrue("No binding recovery", unit.getAST().hasBindingsRecovery());
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("No fragments", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertFalse("A recovered binding", variableBinding.isRecovered());
+		ITypeBinding typeBinding = variableBinding.getType();
+		assertNotNull("No binding", typeBinding);
+		assertFalse("A recovered binding", typeBinding.isRecovered());
+		assertEquals("Wrong name", "List<String>", typeBinding.getName());
+		assertEquals("Wrong dimension", 0, typeBinding.getDimensions());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=130001
+	 */
+	public void test0255() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				ICompilationUnit.FORCE_PROBLEM_DETECTION | ICompilationUnit.ENABLE_BINDINGS_RECOVERY | ICompilationUnit.ENABLE_STATEMENTS_RECOVERY);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertTrue("No statement recovery", unit.getAST().hasStatementsRecovery());
+		assertTrue("No binding recovery", unit.getAST().hasBindingsRecovery());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=130001
+	 */
+	public void test0256() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				ICompilationUnit.ENABLE_STATEMENTS_RECOVERY);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertTrue("No statement recovery", unit.getAST().hasStatementsRecovery());
+		assertFalse("Has binding recovery", unit.getAST().hasBindingsRecovery());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=130001
+	 */
+	public void test0257() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				0);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertFalse("Has statement recovery", unit.getAST().hasStatementsRecovery());
+		assertFalse("Has binding recovery", unit.getAST().hasBindingsRecovery());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=179042
+	 */
+	public void test0258() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"@interface Annot {\n" +
+			"	public int id() default 0;\n" +
+			"}\n" +
+			"@Annot(id=4)\n" +
+			"public class X {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				0);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1);
+		assertEquals("Not a type declaration unit", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier.isAnnotation());
+		Annotation annotation = (Annotation) modifier;
+		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, annotation.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
+		IAnnotationBinding annotationBinding = normalAnnotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 0, annotationBinding.getAnnotations().length);
+		IJavaElement javaElement = annotationBinding.getJavaElement();
+		assertNotNull("No java element", javaElement);
+		assertEquals("Wrong kind", IBinding.ANNOTATION, annotationBinding.getKind());
+		assertEquals("Unexpected key", "LX;@LX~Annot;", annotationBinding.getKey());
+		assertEquals("Wrong modifier", Modifier.NONE, annotationBinding.getModifiers());
+		assertFalse("A deprecated annotation", annotationBinding.isDeprecated());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=179042
+	 */
+	public void test0259() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"@Deprecated\n" +
+			"@interface Annot {\n" +
+			"	public int id() default 0;\n" +
+			"}\n" +
+			"@Annot(id=4)\n" +
+			"public class X {\n" +
+			"}\n" +
+			"@Annot(id=4) class Y {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				0);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1);
+		assertEquals("Not a type declaration unit", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier.isAnnotation());
+		Annotation annotation = (Annotation) modifier;
+		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, annotation.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
+		IAnnotationBinding annotationBinding = normalAnnotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 0, annotationBinding.getAnnotations().length);
+		IJavaElement javaElement = annotationBinding.getJavaElement();
+		assertNotNull("No java element", javaElement);
+		assertEquals("Wrong kind", IBinding.ANNOTATION, annotationBinding.getKind());
+		assertEquals("Unexpected key", "LX;@LX~Annot;", annotationBinding.getKey());
+		assertEquals("Wrong modifier", Modifier.NONE, annotationBinding.getModifiers());
+		assertTrue("Not a deprecated annotation", annotationBinding.isDeprecated());
+		IMemberValuePairBinding[] allMemberValuePairs = annotationBinding.getAllMemberValuePairs();
+		assertEquals("Wrong size", 1, allMemberValuePairs.length);
+		assertFalse("Not a recovered binding", annotationBinding.isRecovered());
+		assertFalse("Not a synthetic binding", annotationBinding.isSynthetic());
+
+		node = getASTNode(unit, 2);
+		assertEquals("Not a type declaration unit", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		typeDeclaration = (TypeDeclaration) node;
+		modifiers = typeDeclaration.modifiers();
+		assertEquals("wrong size", 1, modifiers.size());
+		modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier.isAnnotation());
+		annotation = (Annotation) modifier;
+		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, annotation.getNodeType());
+		normalAnnotation = (NormalAnnotation) annotation;
+		IAnnotationBinding annotationBinding2 = normalAnnotation.resolveAnnotationBinding();
+
+		assertTrue("Should be equal", annotationBinding2.isEqualTo(annotationBinding));
+		assertTrue("Should be equal", annotationBinding.isEqualTo(annotationBinding2));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=179042
+	 */
+	public void test0260() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"@interface Annot {\n" +
+			"	public int id() default 0;\n" +
+			"	public String name() default \"\";\n" +
+			"}\n" +
+			"@Annot(id=4)\n" +
+			"public class X {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				0);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1);
+		assertEquals("Not a type declaration unit", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier.isAnnotation());
+		Annotation annotation = (Annotation) modifier;
+		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, annotation.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
+		IAnnotationBinding annotationBinding = normalAnnotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 0, annotationBinding.getAnnotations().length);
+		IJavaElement javaElement = annotationBinding.getJavaElement();
+		assertNotNull("No java element", javaElement);
+		assertEquals("Wrong kind", IBinding.ANNOTATION, annotationBinding.getKind());
+		assertEquals("Unexpected key", "LX;@LX~Annot;", annotationBinding.getKey());
+		assertEquals("Wrong modifier", Modifier.NONE, annotationBinding.getModifiers());
+		assertFalse("Not a deprecated annotation", annotationBinding.isDeprecated());
+		IMemberValuePairBinding[] declaredMemberValuePairs = annotationBinding.getDeclaredMemberValuePairs();
+		assertEquals("Wrong size", 1, declaredMemberValuePairs.length);
+		IMemberValuePairBinding[] allMemberValuePairs = annotationBinding.getAllMemberValuePairs();
+		assertEquals("Wrong size", 2, allMemberValuePairs.length);
+		assertFalse("Not a recovered binding", annotationBinding.isRecovered());
+		assertFalse("Not a synthetic binding", annotationBinding.isSynthetic());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=179065
+	 */
+	public void test0261() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"@interface Annot {\n" +
+			"	public boolean booleanValue() default true;\n" +
+			"\n" +
+			"	public byte byteValue() default 0;\n" +
+			"\n" +
+			"	public char charValue() default \' \';\n" +
+			"\n" +
+			"	public double doubleValue() default 0.0;\n" +
+			"\n" +
+			"	public float floatValue() default 0.0f;\n" +
+			"\n" +
+			"	public int intValue() default 1;\n" +
+			"\n" +
+			"	public long longValue() default Long.MAX_VALUE;\n" +
+			"\n" +
+			"	public short shortValue() default 127;\n" +
+			"\n" +
+			"	public String stringValue() default \"\";\n" +
+			"\n" +
+			"	public E enumValue() default E.A;\n" +
+			"\n" +
+			"	public Class classValue() default String.class;\n" +
+			"\n" +
+			"	@Deprecated public Ann annotationValue() default @Ann();\n" +
+			"\n" +
+			"	public boolean[] booleanArrayValue() default { true, false };\n" +
+			"\n" +
+			"	public byte[] byteArrayValue() default { 0, 1 };\n" +
+			"\n" +
+			"	public char[] charArrayValue() default { \'#\' };\n" +
+			"\n" +
+			"	@Deprecated public double[] doubleArrayValue() default { 2.0 };\n" +
+			"\n" +
+			"	public float[] floatArrayValue() default { 1.0f };\n" +
+			"\n" +
+			"	public int[] intArrayValue() default { 0, 1 };\n" +
+			"\n" +
+			"	public long[] longArrayValue() default { Long.MIN_VALUE };\n" +
+			"\n" +
+			"	public short[] shortArrayValue() default { 127 };\n" +
+			"\n" +
+			"	public String[] stringArrayValue() default { \"Hello\", \"World\" };\n" +
+			"\n" +
+			"	public E[] enumArrayValue() default { E.A, E.B };\n" +
+			"\n" +
+			"	public Class[] classArrayValue() default { Object.class, Annot.class };\n" +
+			"\n" +
+			"	public Ann[] annotationArrayValue() default {};\n" +
+			"}\n" +
+			"\n" +
+			"enum E {\n" +
+			"	A, B, C, D\n" +
+			"}\n" +
+			"\n" +
+			"@interface Ann {}\n" +
+			"\n" +
+			"@Annot(\n" +
+			"	booleanValue = true,\n" +
+			"	byteValue = (byte) 1,\n" +
+			"	charValue = \' \',\n" +
+			"	doubleValue = 4.0,\n" +
+			"	floatValue = 3.0f,\n" +
+			"	intValue = 1,\n" +
+			"	longValue = 65535L,\n" +
+			"	shortValue = (short) 128,\n" +
+			"	stringValue = \"SUCCESS\",\n" +
+			"	enumValue = E.B,\n" +
+			"	classValue = Object.class,\n" +
+			"	annotationValue = @Ann())\n" +
+			"public class X {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				0);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedProblems =
+			"Class is a raw type. References to generic type Class<T> should be parameterized\n" +
+			"Class is a raw type. References to generic type Class<T> should be parameterized";
+		assertProblemsSize(unit, 2, expectedProblems);
+		node = getASTNode(unit, 3);
+		assertEquals("Not a type declaration unit", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier.isAnnotation());
+		Annotation annotation = (Annotation) modifier;
+		assertEquals("Not a normal annotation", ASTNode.NORMAL_ANNOTATION, annotation.getNodeType());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
+		IAnnotationBinding annotationBinding = normalAnnotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 0, annotationBinding.getAnnotations().length);
+		IJavaElement javaElement = annotationBinding.getJavaElement();
+		assertNotNull("No java element", javaElement);
+		assertEquals("Wrong kind", IBinding.ANNOTATION, annotationBinding.getKind());
+		assertEquals("Unexpected key", "LX;@LX~Annot;", annotationBinding.getKey());
+		assertEquals("Wrong modifier", Modifier.NONE, annotationBinding.getModifiers());
+		assertFalse("Not a deprecated annotation", annotationBinding.isDeprecated());
+		IMemberValuePairBinding[] declaredMemberValuePairs = annotationBinding.getDeclaredMemberValuePairs();
+		assertEquals("Wrong size", 12, declaredMemberValuePairs.length);
+
+		IMemberValuePairBinding pairBinding = declaredMemberValuePairs[0];
+		assertEquals("Wrong name", "booleanValue", pairBinding.getName());
+		Object value = pairBinding.getValue();
+		assertTrue("Not a Boolean", value instanceof Boolean);
+		assertEquals("Wrong value", Boolean.TRUE, value);
+		assertTrue("Not the default value", pairBinding.isDefault());
+		IMethodBinding methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "booleanValue", methodBinding.getName());
+		Object defaultValue = methodBinding.getDefaultValue();
+		assertTrue("Different values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[1];
+		assertEquals("Wrong name", "byteValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not a Byte", value instanceof Byte);
+		assertEquals("Wrong value", new Byte((byte) 1), value);
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "byteValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[2];
+		assertEquals("Wrong name", "charValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not a Character", value instanceof Character);
+		assertEquals("Wrong value", new Character(' '), value);
+		assertTrue("Not the default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "charValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertTrue("Different values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[3];
+		assertEquals("Wrong name", "doubleValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not a Double", value instanceof Double);
+		assertEquals("Wrong value", new Double(4.0), value);
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "doubleValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[4];
+		assertEquals("Wrong name", "floatValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not a Float", value instanceof Float);
+		assertEquals("Wrong value", new Float(3.0f), value);
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "floatValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[5];
+		assertEquals("Wrong name", "intValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not an Integer", value instanceof Integer);
+		assertEquals("Wrong value", new Integer(1), value);
+		assertTrue("Not the default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "intValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertTrue("Different values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[6];
+		assertEquals("Wrong name", "longValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not a Long", value instanceof Long);
+		assertEquals("Wrong value", new Long(65535L), value);
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "longValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[7];
+		assertEquals("Wrong name", "shortValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not a Short", value instanceof Short);
+		assertEquals("Wrong value", new Short((short) 128), value);
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "shortValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[8];
+		assertEquals("Wrong name", "stringValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not a String", value instanceof String);
+		assertEquals("Wrong value", "SUCCESS", value);
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "stringValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[9];
+		assertEquals("Wrong name", "enumValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not an IVariableBinding", value instanceof IVariableBinding);
+		IVariableBinding variableBinding = (IVariableBinding) value;
+		assertEquals("Wrong value", "B", variableBinding.getName());
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "enumValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[10];
+		assertEquals("Wrong name", "classValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not an ITypeBinding", value instanceof ITypeBinding);
+		ITypeBinding typeBinding = (ITypeBinding) value;
+		assertEquals("Wrong value", "java.lang.Object", typeBinding.getQualifiedName());
+		assertFalse("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "classValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertFalse("Same values", value.equals(defaultValue));
+		assertFalse("Is deprecated", pairBinding.isDeprecated());
+
+		pairBinding = declaredMemberValuePairs[11];
+		assertEquals("Wrong name", "annotationValue", pairBinding.getName());
+		value = pairBinding.getValue();
+		assertTrue("Not an IAnnotationBinding", value instanceof IAnnotationBinding);
+		IAnnotationBinding annotationBinding2 = (IAnnotationBinding) value;
+		assertEquals("Wrong value", "Ann", annotationBinding2.getName());
+		assertTrue("The default value", pairBinding.isDefault());
+		methodBinding = pairBinding.getMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong name", "annotationValue", methodBinding.getName());
+		defaultValue = methodBinding.getDefaultValue();
+		assertTrue("not a IBinding", defaultValue instanceof IBinding);
+		assertTrue("Same values", annotationBinding2.isEqualTo((IBinding) defaultValue));
+		assertTrue("Not deprecated", pairBinding.isDeprecated());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=166963
+	 */
+	public void test0262() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	public X(String s) {\n" +
+			"	}\n" +
+			"	public X() {\n" +
+			"		String s = \"\";\n" +
+			"		System.out.println();\n" +
+			"		this(zork);\n" +
+			"		Zork.this.this();\n" +
+			"		<Zork>this(s);\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				0);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedErrors = "Constructor call must be the first statement in a constructor\n" +
+		"zork cannot be resolved to a variable\n" +
+		"Constructor call must be the first statement in a constructor\n" +
+		"Zork cannot be resolved to a type\n" +
+		"Zork cannot be resolved to a type\n" +
+		"Constructor call must be the first statement in a constructor";
+		assertProblemsSize(unit, 6, expectedErrors);
+		node = getASTNode(unit, 0, 1, 4);
+		assertEquals("Not a constructor invocation", ASTNode.CONSTRUCTOR_INVOCATION, node.getNodeType());
+		ConstructorInvocation constructorInvocation = (ConstructorInvocation) node;
+		assertNull("Got a binding", constructorInvocation.resolveConstructorBinding());
+		List arguments = constructorInvocation.arguments();
+		assertEquals("wrong size", 1, arguments.size());
+		Expression expression = (Expression) arguments.get(0);
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong type", "java.lang.String", typeBinding.getQualifiedName());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=183468
+	 */
+	public void test0263() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"@interface Annot {\n" +
+			"	int[] array();\n" +
+			"}\n" +
+			"@Annot(array=1)\n" +
+			"public class X {\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 2, modifiers.size());
+		IExtendedModifier modifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", modifier.isAnnotation());
+		Annotation annotation = (Annotation) modifier;
+		assertTrue("Not a normal annotation", annotation.isNormalAnnotation());
+		NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
+		List values = normalAnnotation.values();
+		assertEquals("Wrong size", 1, values.size());
+		MemberValuePair pair = (MemberValuePair) values.get(0);
+		IMemberValuePairBinding memberValuePairBinding = pair.resolveMemberValuePairBinding();
+		assertFalse("Is default value", memberValuePairBinding.isDefault());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=175409
+	public void test0264() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.*;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	private <T> T find(T a, List<T> b) {\n" +
+			"		return null;\n" +
+			"	}\n" +
+			"	public void foo1() {\n" +
+			"		// T x;\n" +
+			"		find(x, Arrays.asList(\"a\")); // closestMatch: #find(String,List<String>)\n" +
+			"		find(x, 0); // closestMatch: #find(Object,List<Object>)\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedErrors =
+			"x cannot be resolved to a variable\n" +
+			"x cannot be resolved to a variable";
+		assertProblemsSize(unit, 2, expectedErrors);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = invocation.resolveMethodBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a parameterized method", methodBinding.isParameterizedMethod());
+		node = getASTNode(unit, 0, 1, 1);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		invocation = (MethodInvocation) expression;
+		methodBinding = invocation.resolveMethodBinding();
+		assertNotNull("No binding", methodBinding);
+		assertFalse("Not a parameterized method", methodBinding.isParameterizedMethod());
+		assertTrue("Not a raw method", methodBinding.isRawMethod());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=175409
+	public void test0265() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.*;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	<T> X(T a, List<T> b) {\n" +
+			"	}\n" +
+			"\n" +
+			"	public void foo1() {\n" +
+			"		// T x;\n" +
+			"		new X(x, Arrays.asList(\"a\")); // closestMatch:#X(String,List<String>)\n" +
+			"		new X(x, 0); // closestMatch: #X(Object,List<Object>)\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedErrors =
+			"x cannot be resolved to a variable\n" +
+			"x cannot be resolved to a variable";
+		assertProblemsSize(unit, 2, expectedErrors);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a parameterized method", methodBinding.isParameterizedMethod());
+		node = getASTNode(unit, 0, 1, 1);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		classInstanceCreation = (ClassInstanceCreation) expression;
+		methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertFalse("Not a parameterized method", methodBinding.isParameterizedMethod());
+		assertTrue("Not a raw method", methodBinding.isRawMethod());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=175409
+	public void test0266() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.*;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	class M {\n" +
+			"		<T> M(T a, List<T> b) {\n" +
+			"		}\n" +
+			"	}\n" +
+			"	public void foo1() {\n" +
+			"		// T x;\n" +
+			"		this.new M(x, Arrays.asList(\"a\")); // closestMatch: #X(String,List<String>)\n" +
+			"		this.new M(x, 0); // closestMatch: #X(Object,List<Object>)\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedErrors =
+			"x cannot be resolved to a variable\n" +
+			"x cannot be resolved to a variable";
+		assertProblemsSize(unit, 2, expectedErrors);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a parameterized method", methodBinding.isParameterizedMethod());
+		node = getASTNode(unit, 0, 1, 1);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		classInstanceCreation = (ClassInstanceCreation) expression;
+		methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertFalse("Not a parameterized method", methodBinding.isParameterizedMethod());
+		assertTrue("Not a raw method", methodBinding.isRawMethod());
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=175409
+	public void test0267() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.*;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	class M {\n" +
+			"		<T> M(T a, List<T> b) {\n" +
+			"		}\n" +
+			"	}\n" +
+			"	public void foo1() {\n" +
+			"		// T x;\n" +
+			"		this.new M(x, Arrays.asList(\"a\")) {\n" +
+			"		}; // closestMatch:#X(String,List<String>)\n" +
+			"		this.new M(x, 0) {\n" +
+			"		}; // closestMatch: #X(Object,List<Object>)\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedErrors =
+			"x cannot be resolved to a variable\n" +
+			"x cannot be resolved to a variable";
+		assertProblemsSize(unit, 2, expectedErrors);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a parameterized method", methodBinding.isParameterizedMethod());
+		node = getASTNode(unit, 0, 1, 1);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		statement = (ExpressionStatement) node;
+		expression = statement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		classInstanceCreation = (ClassInstanceCreation) expression;
+		methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertFalse("Not a parameterized method", methodBinding.isParameterizedMethod());
+		assertTrue("Not a raw method", methodBinding.isRawMethod());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=175409
+	public void test0268() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.*;\n" +
+			"\n" +
+			"class Super {\n" +
+			"	<T> Super(T a, List<T> b) {\n" +
+			"	}\n" +
+			"}\n" +
+			"public class X extends Super {\n" +
+			"	public X() {\n" +
+			"		// T x;\n" +
+			"		super(x, Arrays.asList(\"a\")); // closestMatch:#X(String,List<String>)\n" +
+			"	}\n" +
+			"	public X(boolean b) {\n" +
+			"		// T x;\n" +
+			"		super(x, 0); // closestMatch: #X(Object,List<Object>)\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedErrors =
+			"x cannot be resolved to a variable\n" +
+			"x cannot be resolved to a variable";
+		assertProblemsSize(unit, 2, expectedErrors);
+		node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not a super constructor invocation", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType());
+		SuperConstructorInvocation invocation = (SuperConstructorInvocation) node;
+		IMethodBinding methodBinding = invocation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not a parameterized method", methodBinding.isParameterizedMethod());
+		node = getASTNode(unit, 1, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType());
+		invocation = (SuperConstructorInvocation) node;
+		methodBinding = invocation.resolveConstructorBinding();
+		assertNotNull("No binding", methodBinding);
+		assertFalse("Not a parameterized method", methodBinding.isParameterizedMethod());
+		assertTrue("Not a raw method", methodBinding.isRawMethod());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=175409
+	public void test0269() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.*;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	<T extends Comparable<T>> void find(T a, String[] b, List<T> c) {\n" +
+			"	}\n" +
+			"	void foo(String[] s) {\n" +
+			"		find(x, Arrays.asList(\"a\"), s);\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		String expectedError = "x cannot be resolved to a variable";
+		assertProblemsSize(unit, 1, expectedError);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation invocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = invocation.resolveMethodBinding();
+		assertNotNull("No binding", methodBinding);
+		assertFalse("Not a parameterized method", methodBinding.isParameterizedMethod());
+		assertTrue("Not a parameterized method", methodBinding.isRawMethod());
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=180966
+	public void _test0270() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/foo/X.java", true/*resolve*/);
+		String contents =
+			"package foo;\n" +
+			"\n" +
+			"class GenericBase<T> {\n" +
+			"        public void someMethod() {}\n" +
+			"}\n" +
+			"public class X extends GenericBase<String> {\n" +
+			"        @Override\n" +
+			"        public void someMethod() {}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = declaration.resolveBinding();
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		declaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = declaration.resolveBinding();
+		assertTrue("Doesn't override", methodBinding2.overrides(methodBinding));
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=180966
+	public void _test0271() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/foo/X.java", true/*resolve*/);
+		String contents =
+			"package foo;\n" +
+			"\n" +
+			"class GenericBase<T> {\n" +
+			"        public void someMethod() {}\n" +
+			"}\n" +
+			"public class X extends GenericBase<String> {\n" +
+			"        @Override\n" +
+			"        public void someMethod() {}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = declaration.resolveBinding();
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		declaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = declaration.resolveBinding();
+		IMethodBinding[] declaredMethods = methodBinding.getDeclaringClass().getSuperclass().getDeclaredMethods();
+		IMethodBinding methodBinding3 = null;
+		loop: for (int i = 0, max = declaredMethods.length; i < max; i++) {
+			if (declaredMethods[i].getName().equals(methodBinding.getName())) {
+				methodBinding3 = declaredMethods[i];
+				break loop;
+			}
+		}
+		assertNotNull("Super method not found", methodBinding3);
+		assertTrue("Should be the same", methodBinding3.isEqualTo(methodBinding2));
+		assertTrue("Doesn't override", methodBinding.overrides(methodBinding3));
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=186189
+	public void test0272() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import java.util.List;\n" +
+			"\n" +
+			"public class X {\n" +
+			"	<T> T foo(T t) {\n" +
+			"		return null;\n" +
+			"	}\n" +
+			"	Object bar() {\n" +
+			"		return new Object() {\n" +
+			"			void bar(List<?> l) {\n" +
+			"				foo(l.get(0));\n" +
+			"			}\n" +
+			"		};\n" +
+			"	}\n" +
+			"	\n" +
+			"	public static void main(String args[]) {\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement statement = (ReturnStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block body = methodDeclaration.getBody();
+		assertNotNull("No block", body);
+		List statements = body.statements();
+		assertEquals("Wrong size", 1, statements.size());
+		Statement statement2 = (Statement) statements.get(0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, statement2.getNodeType());
+		Expression expression2 = ((ExpressionStatement) statement2).getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		ITypeBinding typeBinding = ((MethodInvocation) expression2).resolveTypeBinding();
+		assertTrue("Not a capture", typeBinding.isCapture());
+		assertNull("No binary type", typeBinding.getBinaryName());
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=185129
+	public void test0273() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"import test0273.B;\n" +
+			"import test0273.A;\n" +
+			"public class X {\n" +
+			"	Object foo() {\n" +
+			"		return new B(new A());\n" +
+			"	}\n" +
+			"	void bar(String s) {\n" +
+			"		System.out.println(s);\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191908
+	public void test0274() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	@Deprecated\n" +
+			"	public static int x= 5, y= 10;\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 2, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding binding = fragment.resolveBinding();
+		assertTrue("Not deprecated", binding.isDeprecated());
+		fragment = (VariableDeclarationFragment) fragments.get(1);
+		binding = fragment.resolveBinding();
+		assertTrue("Not deprecated", binding.isDeprecated());
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191908
+	public void test0275() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	public void foo() {\n" +
+			"		@Deprecated\n" +
+			"		int x= 5, y= 10;\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 2, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding binding = fragment.resolveBinding();
+		IAnnotationBinding[] annotations = binding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+		fragment = (VariableDeclarationFragment) fragments.get(1);
+		binding = fragment.resolveBinding();
+		annotations = binding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=192774
+	//Test ability to distinguish AST nodes of multiple similar annotations.
+	public void _test0276() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"@interface Annot {\n" +
+			"  public int value();\n" +
+			"}\n" +
+			"\n" +
+			"public class X {\n" +
+			"  @Annot(1) String foo1() { return null; }\n" +
+			"  @Annot(1) String foo2() { return null; }\n" +
+			"}";
+		this.workingCopy.getBuffer().setContents(contents);
+
+		class CompilationUnitRequestor extends ASTRequestor {
+			public void acceptAST(ICompilationUnit source, CompilationUnit node) {
+				MethodDeclaration methodDeclaration = (MethodDeclaration)getASTNode(node, 1, 0);
+				IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+				IAnnotationBinding annoBinding = methodBinding.getAnnotations()[0];
+				ASTNode annoNode = node.findDeclaringNode(annoBinding);
+				int position1 = annoNode.getStartPosition();
+
+				methodDeclaration = (MethodDeclaration)getASTNode(node, 1, 1);
+				methodBinding = methodDeclaration.resolveBinding();
+				IAnnotationBinding annoBinding2 = methodBinding.getAnnotations()[0];
+				annoNode = node.findDeclaringNode(annoBinding2);
+				int position2 = annoNode.getStartPosition();
+				assertTrue("Anno 2 position <= anno 1 position", position2 > position1);
+			}
+		}
+
+		CompilationUnitRequestor requestor = new CompilationUnitRequestor();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setResolveBindings(true);
+		parser.setProject(getJavaProject("Converter15"));
+		parser.setKind(ASTParser.K_COMPILATION_UNIT);
+		parser.createASTs(new ICompilationUnit[]{this.workingCopy}, new String[0], requestor, null);
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191908
+	public void test0277() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	public static void method() {\n" +
+			"	}\n" +
+			"}\n" +
+			"class Y extends X {\n" +
+			"	public static void method() {\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding1 = methodDeclaration.resolveBinding();
+
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+
+		assertFalse("Overrides", methodBinding2.overrides(methodBinding1));
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191908
+	public void test0278() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	public void method() {\n" +
+			"	}\n" +
+			"}\n" +
+			"class Y extends X {\n" +
+			"	public static void method() {\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "This static method cannot hide the instance method from X");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding1 = methodDeclaration.resolveBinding();
+
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+
+		assertFalse("Overrides", methodBinding2.overrides(methodBinding1));
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191908
+	public void test0279() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	public static void method() {\n" +
+			"	}\n" +
+			"}\n" +
+			"class Y extends X {\n" +
+			"	public void method() {\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "This instance method cannot override the static method from X");
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding1 = methodDeclaration.resolveBinding();
+
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+
+		assertFalse("Overrides", methodBinding2.overrides(methodBinding1));
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=191908
+	public void test0280() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"public class X {\n" +
+			"	public void method() {\n" +
+			"	}\n" +
+			"}\n" +
+			"class Y extends X {\n" +
+			"	@Override\n" +
+			"	public void method() {\n" +
+			"	}\n" +
+			"}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding1 = methodDeclaration.resolveBinding();
+
+		node = getASTNode(unit, 1, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+
+		assertTrue("Doesn't overrides", methodBinding2.overrides(methodBinding1));
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=198085
+	public void test0281() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		String contents =
+			"@Invalid\n" +
+			"@Deprecated\n" +
+			"public class X {}";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false,
+				false,
+				true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 1, "Invalid cannot be resolved to a type");
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertEquals("wrong size", 2, annotations.length);
+		assertEquals("LX;@LInvalid;", annotations[0].getKey());
+		assertTrue("Annotation should be flagged as recovered", annotations[0].isRecovered());
+		assertTrue("Annotation type should be flagged as recovered", annotations[0].getAnnotationType().isRecovered());
+		assertEquals("LX;@Ljava/lang/Deprecated;", annotations[1].getKey());
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=190622
+	public void test0282() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	public @interface Moo {\n" +
+			"		Class<?> value();\n" +
+			"	}\n" +
+			"	@Moo(Bar.Baz.class)\n" +
+			"	public static class Bar {\n" +
+			"		public static class Baz {\n" +
+			"		}\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		this.workingCopy.getBuffer().setContents(contents);
+		ASTNode node = runConversion(AST.JLS8, this.workingCopy, true, true, true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		final List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 3, modifiers.size());
+		IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", extendedModifier instanceof SingleMemberAnnotation);
+		SingleMemberAnnotation annotation = (SingleMemberAnnotation) extendedModifier;
+		final Expression value = annotation.getValue();
+		assertEquals("Not a type literal", ASTNode.TYPE_LITERAL, value.getNodeType());
+		TypeLiteral typeLiteral = (TypeLiteral) value;
+		final Type type = typeLiteral.getType();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType());
+		SimpleType simpleType = (SimpleType) type;
+		final Name name = simpleType.getName();
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		final IBinding binding = qualifiedName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong value", "Bar.Baz", qualifiedName.getFullyQualifiedName());
+		final SimpleName simpleName = qualifiedName.getName();
+		final IBinding binding2 = simpleName.resolveBinding();
+		assertNotNull("No binding2", binding2);
+		assertFalse("Not a recovered binding", binding2.isRecovered());
+		final Name qualifier = qualifiedName.getQualifier();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, qualifier.getNodeType());
+		SimpleName simpleName2 = (SimpleName) qualifier;
+		final IBinding binding3 = simpleName2.resolveBinding();
+		assertNotNull("No binding3", binding3);
+		assertFalse("Not a recovered binding", binding3.isRecovered());
+		final IJavaElement javaElement = binding3.getJavaElement();
+		assertNotNull("No java element", javaElement);
+		assertEquals("Not a type", IJavaElement.TYPE, javaElement.getElementType());
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=201104
+	public void test0283() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	public @interface Moo {\n" +
+			"		Class<?> value();\n" +
+			"	}\n" +
+			"	@Moo(Bar2.Baz.class)\n" +
+			"	public static class Bar {\n" +
+			"		public static class Baz {\n" +
+			"		}\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		this.workingCopy.getBuffer().setContents(contents);
+		ASTNode node = runConversion(AST.JLS8, 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");
+		node = getASTNode(unit, 0, 1);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		final List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 3, modifiers.size());
+		IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0);
+		assertTrue("Not an annotation", extendedModifier instanceof SingleMemberAnnotation);
+		SingleMemberAnnotation annotation = (SingleMemberAnnotation) extendedModifier;
+		final Expression value = annotation.getValue();
+		assertEquals("Not a type literal", ASTNode.TYPE_LITERAL, value.getNodeType());
+		TypeLiteral typeLiteral = (TypeLiteral) value;
+		final Type type = typeLiteral.getType();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType());
+		SimpleType simpleType = (SimpleType) type;
+		final Name name = simpleType.getName();
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		final IBinding binding = qualifiedName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong value", "Bar2.Baz", qualifiedName.getFullyQualifiedName());
+		final Name qualifier = qualifiedName.getQualifier();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, qualifier.getNodeType());
+		SimpleName simpleName2 = (SimpleName) qualifier;
+		final IBinding binding3 = simpleName2.resolveBinding();
+		assertNotNull("No binding3", binding3);
+		assertTrue("Not a recovered binding", binding3.isRecovered());
+		final IJavaElement javaElement = binding3.getJavaElement();
+		assertNotNull("No java element", javaElement);
+		assertEquals("Not a compilation unit", IJavaElement.TYPE, javaElement.getElementType());
+		assertNotNull("No parent", javaElement.getParent());
+	}
+
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=203342
+	 */
+	public void test0284() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	public static final double VAR = 0x0.0000000000001P-1022;\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		final List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		final Expression initializer = fragment.getInitializer();
+		assertEquals("Not a number literal", ASTNode.NUMBER_LITERAL, initializer.getNodeType());
+		checkSourceRange(initializer, "0x0.0000000000001P-1022", contents);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=223488
+	 */
+	public void test0285() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X.java", true/* resolve */);
+		PackageDeclaration packageDeclaration = (PackageDeclaration) buildAST(
+			"/*start*/package p;/*end*/\n" +
+			"public class X {\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/);
+		IPackageBinding packageBinding = packageDeclaration.resolveBinding();
+		try {
+			startLogListening();
+			packageBinding.getAnnotations();
+			assertLogEquals("");
+		} finally {
+			stopLogListening();
+		}
+	}
+
+	/**
+	 * @bug 187430: Unresolved types surfacing through DOM AST for annotation default values
+	 * @test That the qualified name of the default value does not contain any '$' character
+	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=187430"
+	 */
+	public void testBug187430() throws JavaModelException {
+    	this.workingCopy = getWorkingCopy("/Converter15/src/b187430/Test.java", true/*resolve*/);
+    	String contents =
+    		"package b187430;\n" +
+    		"@C\n" +
+    		"public class Test {}\n";
+	   	ASTNode node = buildAST(
+				contents,
+    			this.workingCopy,
+    			false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0, "");
+		List types = unit.types();
+		assertEquals("Wrong size", 1, types.size());
+		AbstractTypeDeclaration abstractTypeDeclaration = (AbstractTypeDeclaration) types.get(0);
+		assertEquals("Wrong type", ASTNode.TYPE_DECLARATION, abstractTypeDeclaration.getNodeType());
+		TypeDeclaration declaration = (TypeDeclaration) abstractTypeDeclaration;
+		ITypeBinding typeBinding = declaration.resolveBinding();
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+		IMemberValuePairBinding[] allMemberValuePairs = annotations[0].getAllMemberValuePairs();
+		assertEquals("Expected 'intval' and 'classval' member pair values", 2, allMemberValuePairs.length);
+		IMethodBinding methodBinding = allMemberValuePairs[0].getMethodBinding();
+		Object defaultValue = methodBinding.getDefaultValue();
+		ITypeBinding iTypeBinding = (ITypeBinding) defaultValue;
+		assertEquals("Unexpected default value", "b187430.A.B", iTypeBinding.getQualifiedName());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228691
+	 */
+	public void test0286() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0286/X.java", true/*resolve*/);
+		String contents =
+			"package test0286;\n" +
+			"public class X {\n" +
+			"	int i;\n" +
+			"	Integer integer;\n" +
+			"}\n";
+		ASTNode node = buildAST(
+				contents,
+				this.workingCopy,
+				false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		ASTNode node2 = getASTNode(unit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node2.getNodeType());
+		FieldDeclaration declaration = (FieldDeclaration) node2;
+		ITypeBinding typeBinding = declaration.getType().resolveBinding();
+		node2 = getASTNode(unit, 0, 1);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node2.getNodeType());
+		declaration = (FieldDeclaration) node2;
+		ITypeBinding typeBinding2 = declaration.getType().resolveBinding();
+		assertEquals("Wrong type", "int", typeBinding.getName());
+		assertEquals("Wrong type", "Integer", typeBinding2.getName());
+		assertTrue("Not assignmentCompatible: Integer -> int", typeBinding2.isAssignmentCompatible(typeBinding));
+		assertTrue("Not assignmentCompatible: int -> Integer", typeBinding.isAssignmentCompatible(typeBinding2));
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0287() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0287/A.java", true/*resolve*/);
+		MemberValuePair pair = (MemberValuePair) buildAST(
+			"package test0287;\n" +
+			"@ABC (/*start*/name1=\"\"/*end*/)\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IMemberValuePairBinding resolveMemberValuePairBinding = pair.resolveMemberValuePairBinding();
+		assertNull("Got a binding", resolveMemberValuePairBinding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0288() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0288/A.java", true/*resolve*/);
+		MemberValuePair pair = (MemberValuePair) buildAST(
+			"package test0288;\n" +
+			"@ABC (/*start*/name1=\"\"/*end*/)\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		IMemberValuePairBinding resolveMemberValuePairBinding = pair.resolveMemberValuePairBinding();
+		assertNull("Got a binding", resolveMemberValuePairBinding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0289() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0289/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0289;\n" +
+			"/*start*/@ABC (name1=\"\")/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertNull("No binding", resolveAnnotationBinding);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0290() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0290/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0290;\n" +
+			"/*start*/@ABC (name1=\"\")/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertTrue("Not recovered", resolveAnnotationBinding.isRecovered());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0291() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0291/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0291;\n" +
+			"/*start*/@ABC (name1=\"\")/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 0, resolveAnnotationBinding.getAllMemberValuePairs().length);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0292() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0292/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0292;\n" +
+			"@interface ABC {\n" +
+			"	String name1() default \"\";\n" +
+			"}\n" +
+			"/*start*/@ABC(name1=\"\", id=0)/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertFalse("Recovered", resolveAnnotationBinding.isRecovered());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0293() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0293/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0293;\n" +
+			"@interface ABC {\n" +
+			"	String name1() default \"\";\n" +
+			"}\n" +
+			"/*start*/@ABC(name1=\"\", id=0)/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 1, resolveAnnotationBinding.getAllMemberValuePairs().length);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0294() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0294/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0294;\n" +
+			"@interface ABC {\n" +
+			"	String name1() default \"\";\n" +
+			"}\n" +
+			"/*start*/@ABC(name1=\"\", id=0)/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 1, resolveAnnotationBinding.getDeclaredMemberValuePairs().length);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0295() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0295/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0295;\n" +
+			"@interface ABC {\n" +
+			"	String name1() default \"\";\n" +
+			"}\n" +
+			"/*start*/@ABC(id=0)/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 1, resolveAnnotationBinding.getAllMemberValuePairs().length);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0296() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0296/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0296;\n" +
+			"@interface ABC {\n" +
+			"	String name1() default \"\";\n" +
+			"}\n" +
+			"/*start*/@ABC(id=0)/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 1, resolveAnnotationBinding.getAllMemberValuePairs().length);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=228651
+	 */
+	public void test0297() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0297/A.java", true/*resolve*/);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+			"package test0297;\n" +
+			"@interface ABC {\n" +
+			"	String name1() default \"\";\n" +
+			"}\n" +
+			"/*start*/@ABC(name1=\"\", id=0)/*end*/\n" +
+			"public class A {}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		IAnnotationBinding resolveAnnotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("Wrong size", 1, resolveAnnotationBinding.getDeclaredMemberValuePairs().length);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0298() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0298/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"package test0298;\n" +
+			"import java.util.List;\n" +
+			"public interface X {\n" +
+			"	/*start*/List<IEntity>/*end*/ foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		ITypeBinding binding = type.resolveBinding();
+		assertNull("Got a binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0299() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0299/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"package test0299;\n" +
+			"public interface X {\n" +
+			"	/*start*/List<IEntity>/*end*/ foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		ITypeBinding binding = type.resolveBinding();
+		assertNull("Got a binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0300() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0300/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"package test0300;\n" +
+			"public interface X {\n" +
+			"	/*start*/ArrayList<IEntity>/*end*/ foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		ITypeBinding binding = type.resolveBinding();
+		assertNull("Got a binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0301() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0301/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"package test03018;\n" +
+			"import java.util.List;\n" +
+			"public interface X {\n" +
+			"	/*start*/List<IEntity>/*end*/ foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0302() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0302/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"package test0302;\n" +
+			"public interface X {\n" +
+			"	/*start*/List<IEntity>/*end*/ foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0303() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0303/X.java", true/*resolve*/);
+		ParameterizedType type = (ParameterizedType) buildAST(
+			"package test0303;\n" +
+			"public interface X {\n" +
+			"	/*start*/ArrayList<IEntity>/*end*/ foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0304() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0304/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"package test0304;\n" +
+			"public interface X {\n" +
+			"	ArrayList</*start*/IEntity/*end*/> foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0305() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0305/X.java", true/*resolve*/);
+		Type type = (Type) buildAST(
+			"package test0305;\n" +
+			"public interface X {\n" +
+			"	ArrayList</*start*/IEntity/*end*/> foo();\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		ITypeBinding binding = type.resolveBinding();
+		assertNull("Got a binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0306() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0306/X.java", true/*resolve*/);
+		VariableDeclarationStatement statement= (VariableDeclarationStatement) buildAST(
+			"package test0306;\n" +
+			"public class X {\n" +
+			"	void foo() {\n" +
+			"		/*start*/ArrayList<IEntity> list;/*end*/\n" +
+			"	}\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		List fragments = statement.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding binding = fragment.resolveBinding();
+		assertNull("Got a binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0307() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0307/X.java", true/*resolve*/);
+		VariableDeclarationStatement statement= (VariableDeclarationStatement) buildAST(
+			"package test0307;\n" +
+			"public class X {\n" +
+			"	void foo() {\n" +
+			"		/*start*/ArrayList<IEntity> list;/*end*/\n" +
+			"	}\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		List fragments = statement.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding binding = fragment.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0308() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0308/X.java", true/*resolve*/);
+		MethodDeclaration declaration= (MethodDeclaration) buildAST(
+			"package test0308;\n" +
+			"public class X {\n" +
+			"	/*start*/ArrayList<IEntity> foo() {\n" +
+			"		 return null;\n" +
+			"	}/*end*/\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		IMethodBinding binding = declaration.resolveBinding();
+		assertNull("Got a binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0309() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0309/X.java", true/*resolve*/);
+		MethodDeclaration declaration= (MethodDeclaration) buildAST(
+			"package test0309;\n" +
+			"public class X {\n" +
+			"	/*start*/ArrayList<IEntity> foo() {\n" +
+			"		 return null;\n" +
+			"	}/*end*/\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IMethodBinding binding = declaration.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0310() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0310/X.java", true/*resolve*/);
+		MethodDeclaration declaration= (MethodDeclaration) buildAST(
+			"package test0310;\n" +
+			"public class X {\n" +
+			"	/*start*/void foo(ArrayList<IEntity> list) {\n" +
+			"	}/*end*/\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			false);
+		IMethodBinding binding = declaration.resolveBinding();
+		assertNull("Got a binding", binding);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=230127
+	 */
+	public void test0311() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0311/X.java", true/*resolve*/);
+		MethodDeclaration declaration= (MethodDeclaration) buildAST(
+			"package test0311;\n" +
+			"public class X {\n" +
+			"	/*start*/void foo(ArrayList<IEntity> list) {\n" +
+			"	}/*end*/\n" +
+			"}",
+			this.workingCopy,
+			false/*don't report errors*/,
+			true,
+			true);
+		IMethodBinding binding = declaration.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/*
+	 * Ensures that requesting a type binding with a non-existing parameterized type doesn't throw an OutOfMemoryError
+	 * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=233625 )
+	 */
+	public void test0312() throws JavaModelException {
+		String[] bindingKeys =  new String[] {"Ljava/util/Map<Ljava/lang/Class<Ljava/lang/Class;*>;Ljava/util/List<LUnknown;>;>;"};
+		BindingRequestor requestor = new BindingRequestor();
+		resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null);
+		assertBindingsEqual(
+				"<null>",
+				requestor.getBindings(bindingKeys));
+	}
+
+	/*
+	 * Ensures that requesting a method binding with a non-existing parameterized type doesn't throw an OutOfMemoryError
+	 * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=233625 )
+	 */
+	public void test0313() throws JavaModelException {
+		String[] bindingKeys =  new String[] {"Ljava/util/Collections;.emptyMap<K:Ljava/lang/Object;V:Ljava/lang/Object;>()Ljava/util/Map<TK;TV;>;%<Ljava/lang/Class<Ljava/lang/Class;*>;Ljava/util/List<LUnknown;>;>"};
+		BindingRequestor requestor = new BindingRequestor();
+		resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null);
+		assertBindingsEqual(
+				"<null>",
+				requestor.getBindings(bindingKeys));
+	}
+
+	/*
+	 * Ensures that requesting a type binding with a non-existing parameterized type returns null
+	 * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=233625 )
+	 */
+	public void test0314() throws JavaModelException {
+		String[] bindingKeys =  new String[] {"Ljava/util/List<LZork;>.Map<Ljava/lang/Object;Ljava/lang/Number;>;"};
+		BindingRequestor requestor = new BindingRequestor();
+		resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null);
+		assertBindingsEqual(
+				"<null>",
+				requestor.getBindings(bindingKeys));
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=120082
+	 */
+	public void test0315() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/pack1/E.java", true/*resolve*/);
+		ASTNode node = buildAST(
+				"package pack1;\n" +
+				"public class E<X> {\n" +
+				"	public static <T> E<T> bar(T t) {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"\n" +
+				"	public void foo(E<?> e) {\n" +
+				"		/*start*/bar(e)/*end*/;\n" +
+				"	}\n" +
+				"}",
+				this.workingCopy);
+		IBinding binding = ((MethodInvocation) node).resolveTypeBinding();
+		assertBindingKeyEquals(
+				"Lpack1/E<Lpack1/E<!Lpack1/E;{0}*122;>;>;",
+				binding.getKey());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=239439
+	 */
+	public void test0316() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0316/X.java", true/*resolve*/);
+		ClassInstanceCreation expression = (ClassInstanceCreation) buildAST(
+				"package test0316;\n" +
+				"class AbstractClass {\n" + 
+				"	XXList<Class> statements = null;\n" + 
+				"}\n" + 
+				"import java.util.ArrayList;\n" +
+				"public class X extends AbstractClass {\n" + 
+				"	public List<Class> compute() {\n" + 
+				"		statements = /*start*/new ArrayList<Class>()/*end*/;\n" + 
+				"		return statements;\n" + 
+				"	}\n" + 
+				"}",
+				this.workingCopy,
+				false,
+				true,
+				true);
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=239439
+	 */
+	public void test0317() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0317/X.java", true/*resolve*/);
+		ClassInstanceCreation expression = (ClassInstanceCreation) buildAST(
+				"package test0317;\n" +
+				"import java.util.ArrayList;\n" + 
+				"import java.util.List;\n" + 
+				"public class X {\n" + 
+				"	XXList<Class> statements = null;\n" + 
+				"	public List<Class> compute() {\n" + 
+				"		statements = /*start*/new ArrayList<Class>()/*end*/;\n" + 
+				"		return statements;\n" + 
+				"	}\n" + 
+				"}",
+				this.workingCopy,
+				false,
+				true,
+				true);
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=218500
+	 */
+	public void test0318() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0317/X.java", true/*resolve*/);
+		SimpleType type = (SimpleType) buildAST(
+				"class X {\n" + 
+				"	{\n" + 
+				"		abstract class B<T> {\n" + 
+				"			abstract class A {}\n" + 
+				"			public void foo() {\n" + 
+				"				new /*start*/A/*end*/() {};\n" + 
+				"			}\n" + 
+				"		}\n" + 
+				"	}\n" + 
+				"}",
+				this.workingCopy,
+				false,
+				true,
+				true);
+		ITypeBinding typeBinding = type.getName().resolveTypeBinding();
+		assertEquals("Not an empty name", 0, typeBinding.getQualifiedName().length());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=212034
+	 */
+	public void test0319() throws JavaModelException {
+		String contents =
+			"package test0319;\n" +
+			"public class Test {\n" +
+			"	/*start*/@Deprecated\n" +
+			"	@Invalid\n" +
+			"	public void foo() {}/*end*/" +
+			"}\n";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0319/Test.java",
+				contents,
+				true/*resolve*/
+			);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) buildAST(contents, this.workingCopy, false, false, false);
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		IAnnotationBinding[] annotations = methodBinding.getAnnotations();
+		assertEquals("Got more than one annotation binding", 1, annotations.length);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=212034
+	 */
+	public void test0320() throws JavaModelException {
+		String contents =
+			"package test0320;\n" +
+			"public class Test {\n" +
+			"	/*start*/@Deprecated\n" +
+			"	@Invalid\n" +
+			"	public int i;/*end*/" +
+			"}\n";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0320/Test.java",
+				contents,
+				true/*resolve*/
+			);
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) buildAST(contents, this.workingCopy, false, false, false);
+		List fragments = fieldDeclaration.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		IAnnotationBinding[] annotations = variableBinding.getAnnotations();
+		assertEquals("Got more than one annotation binding", 1, annotations.length);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=103643
+	 */
+	public void _test0321() throws JavaModelException {
+		String contents =
+			"package test0321;\n" +
+			"import java.util.*;\n" +
+			"class X {\n" + 
+			"	<T extends Collection<? extends Number>> T getLonger(T t1, T t2) {\n" + 
+			"		return t1.size() > t2.size() ? t1 : t2;\n" + 
+			"	}\n" + 
+			"	void m(HashSet<? extends Double> list, ArrayList<? extends Integer> set) {\n" + 
+			"		/*start*/getLonger(list, set)/*end*/;\n" + 
+			"	}\n" + 
+			"}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0321/X.java",
+				contents,
+				true/*resolve*/
+			);
+		MethodInvocation invocation = (MethodInvocation) buildAST(contents, this.workingCopy, true, true, true);
+		IMethodBinding methodBinding = invocation.resolveMethodBinding();
+		System.out.println(methodBinding.getReturnType().getQualifiedName());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=242933
+	 */
+	public void test0322() throws JavaModelException {
+		String contents =
+			"package test0322;\n" +
+			"@interface Range {\n" + 
+			"	long min() default -9223372036854775808L;\n" + 
+			"	long max() default 9223372036854775807L;\n" + 
+			"	String message() default \"\";\n" + 
+			"}\n" + 
+			"public class X {\n" + 
+			"	private int id;\n" + 
+			"	/*start*/@Range(max=9999999999999999)/*end*/\n" + 
+			"	public long getId() {\n" + 
+			"		return id;\n" + 
+			"	}\n" + 
+			"}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0322/X.java",
+				contents,
+				true/*resolve*/
+			);
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(contents, this.workingCopy, false, true, true);
+		IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding();
+		IMemberValuePairBinding[] memberValuePairBindings = annotationBinding.getDeclaredMemberValuePairs();
+		IMemberValuePairBinding pairBinding = memberValuePairBindings[0];
+		assertNull("Got a value", pairBinding.getValue());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=245563
+	 */
+	public void test0323() throws JavaModelException {
+		String contents =
+			"class X {\n" + 
+			"	{\n" + 
+			"		for(Object obj:\n" +
+			"			new Object[]{\n" +
+			"				new Object(){\n" + 
+			"					int field=method(\n" +
+			"					});\n" + 
+			"				}\n" +
+			"			});\n" + 
+			"	}\n" + 
+			"	int method(int...args){\n" +
+			"		return args.length;\n" +
+			"	}\n" + 
+			"}\n" + 
+			"";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0322/X.java",
+				contents,
+				true/*resolve*/
+			);
+		assertNotNull("No node", buildAST(contents, this.workingCopy, false, true, true));
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=270367
+	public void test0324() throws JavaModelException {
+		String contents = "package test0324;\n"
+			+ "public class X {\n"
+			+ "  public void someMethod() {\n"
+			+ "     int i = /*start*/(new Integer(getId())).intValue()/*end*/;\n"
+			+ "  }\n"
+			+ "  public String getId() {\n"
+			+ "     return null;\n"
+			+ "  }\n"
+			+ "}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0324/X.java", contents, true/*resolve*/
+		);
+		MethodInvocation methodCall = (MethodInvocation) buildAST(contents, this.workingCopy, false, true, true);
+		ParenthesizedExpression intValueReceiver = (ParenthesizedExpression) methodCall.getExpression();
+		ParenthesizedExpression newParenthesizedExpression = (ParenthesizedExpression) ASTNode.copySubtree(
+				intValueReceiver.getAST(), intValueReceiver);
+		replaceNodeInParent(methodCall, newParenthesizedExpression);
+		
+		// copied node
+		ClassInstanceCreation constructorCall = (ClassInstanceCreation) newParenthesizedExpression.getExpression();
+		constructorCall.resolveTypeBinding();
+		IMethodBinding constructorBinding = constructorCall.resolveConstructorBinding();
+		assertNull("Not null constructor binding", constructorBinding);
+
+		// original node
+		constructorCall = (ClassInstanceCreation) intValueReceiver.getExpression();
+		constructorCall.resolveTypeBinding(); // This should not throw a NPE
+		constructorBinding = constructorCall.resolveConstructorBinding();
+		assertNotNull("Null constructor binding", constructorBinding);
+	}
+
+	// Utility method to replace "node" by "replacement"
+	private void replaceNodeInParent(Expression node, Expression replacement) {
+		StructuralPropertyDescriptor loc = node.getLocationInParent();
+		if (loc.isChildProperty()) {
+			node.getParent().setStructuralProperty(loc, replacement);
+		}
+		else {
+			List l = (List) node.getParent().getStructuralProperty(loc);
+			for (int i = 0; i < l.size(); i++) {
+				if (node.equals(l.get(i))) {
+					l.set(i, replacement);
+					break;
+				}
+			}
+		}
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0325() throws JavaModelException {
+		String contents =
+			"package test0325;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0325/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getJavaProject().findType("test0325.X").getAnnotations();
+		assertAnnotationsEqual("@test0325.SecondaryTables({@test0325.SecondaryTable(name=\"FOO\"), @test0325.SecondaryTable(name=\"BAR\")})\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0326() throws JavaModelException {
+		String contents =
+			"package test0326;\n" +
+			"@SecondaryTables({@SecondaryTable(name=\"FOO\"), @SecondaryTable(name=\"BAR\")})\n" +
+			"public class X {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0326/X.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getType("X").getAnnotations();
+		assertAnnotationsEqual("@SecondaryTables({@SecondaryTable(name=\"FOO\"), @SecondaryTable(name=\"BAR\")})\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0327() throws JavaModelException {
+		String contents =
+			"package test0327;\n" +
+			"@SecondaryTables({@SecondaryTable(name=\"FOO\"), @SecondaryTable(name=\"BAR\")})\n" +
+			"public class X {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0327/X.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getType("X").getAnnotations();
+		assertAnnotationsEqual("@SecondaryTables({@SecondaryTable(name=\"FOO\"), @SecondaryTable(name=\"BAR\")})\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0328() throws JavaModelException {
+		String contents =
+			"package test0328;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0328/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getJavaProject().findType("test0328.X").getAnnotations();
+		assertAnnotationsEqual("@test0328.JoinTable(name=\"EMP_PROJ\", joinColumns={@test0328.JoinColumn(name=\"EMP_ID\", referencedColumnName=\"EMP_ID\")}, inverseJoinColumns={@test0328.JoinColumn(name=\"PROJ_ID\", referencedColumnName=\"PROJ_ID\")})\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0329() throws JavaModelException {
+		String contents =
+			"package test0329;\n" + 
+			"@JoinTable(\n" + 
+			"	name=\"EMP_PROJ\",\n" + 
+			"	joinColumns = {\n" + 
+			"			@JoinColumn(name = \"EMP_ID\", referencedColumnName = \"EMP_ID\")\n" + 
+			"	},\n" + 
+			"	inverseJoinColumns = {\n" + 
+			"			@JoinColumn(name = \"PROJ_ID\", referencedColumnName = \"PROJ_ID\")\n" + 
+			"	}\n" +
+			")\n" + 
+			"public class X {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0329/X.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getType("X").getAnnotations();
+		assertAnnotationsEqual("@JoinTable(name=\"EMP_PROJ\", joinColumns={@JoinColumn(name=\"EMP_ID\", referencedColumnName=\"EMP_ID\")}, inverseJoinColumns={@JoinColumn(name=\"PROJ_ID\", referencedColumnName=\"PROJ_ID\")})\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0330() throws JavaModelException {
+		String contents =
+			"package test0330;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0330/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getJavaProject().findType("test0330.X").getAnnotations();
+		assertAnnotationsEqual("@test0330.JoinTable(name=\"EMP_PROJ\", joinColumns=@test0330.JoinColumn(name=\"EMP_ID\", referencedColumnName=\"EMP_ID\"), inverseJoinColumns=@test0330.JoinColumn(name=\"PROJ_ID\", referencedColumnName=\"PROJ_ID\"))\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0331() throws JavaModelException {
+		String contents =
+			"package test0331;\n" + 
+			"@JoinTable(\n" + 
+			"	name=\"EMP_PROJ\",\n" + 
+			"	joinColumns = @JoinColumn(name = \"EMP_ID\", referencedColumnName = \"EMP_ID\"),\n" + 
+			"	inverseJoinColumns = @JoinColumn(name = \"PROJ_ID\", referencedColumnName = \"PROJ_ID\")\n" +
+			")\n" + 
+			"public class X {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0331/X.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getType("X").getAnnotations();
+		assertAnnotationsEqual("@JoinTable(name=\"EMP_PROJ\", joinColumns=@JoinColumn(name=\"EMP_ID\", referencedColumnName=\"EMP_ID\"), inverseJoinColumns=@JoinColumn(name=\"PROJ_ID\", referencedColumnName=\"PROJ_ID\"))\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0332() throws JavaModelException {
+		String contents =
+			"package test0332;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0332/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getJavaProject().findType("test0332.X").getAnnotations();
+		assertAnnotationsEqual("@test0332.JoinTable(name=\"EMP_PROJ\", joinColumns=@test0332.JoinColumn(name=\"EMP_ID\", referencedColumnClass=java.lang.Object.class), inverseJoinColumns=@test0332.JoinColumn(name=\"PROJ_ID\", referencedColumnClass=java.lang.Class.class), getLocalClass=java.lang.String.class)\n", annotations);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=271561
+	 */
+	public void test0333() throws JavaModelException {
+		String contents =
+			"package test0333;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0333/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IAnnotation[] annotations = this.workingCopy.getJavaProject().findType("test0333.X").getAnnotations();
+		assertAnnotationsEqual("@test0333.JoinTable(name=\"EMP_PROJ\", joinColumns=@test0333.JoinColumn(name=\"EMP_ID\", referencedColumnClass=java.lang.Class.class), inverseJoinColumns=@test0333.JoinColumn(name=\"PROJ_ID\", referencedColumnClass=java.lang.Class.class), getLocalClass=java.lang.String.class)\n", annotations);
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=286407
+	public void test0334() throws CoreException, IOException {
+		String contents =
+			"package test0334;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0334/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IJavaProject javaProject = this.workingCopy.getJavaProject();
+		String typeName = "test0334.MyAnnotation";
+		class BindingRequestor extends ASTRequestor {
+			ITypeBinding _result = null;
+			public void acceptBinding(String bindingKey, IBinding binding) {
+				if (this._result == null && binding != null && binding.getKind() == IBinding.TYPE)
+					this._result = (ITypeBinding) binding;
+			}
+		}
+		String[] keys = new String[] {
+			BindingKey.createTypeBindingKey(typeName)
+		};
+		final BindingRequestor requestor = new BindingRequestor();
+		final ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setResolveBindings(true);
+		parser.setProject(javaProject);
+		// this doesn't really do a parse; it's a type lookup
+		parser.createASTs(new ICompilationUnit[] {}, keys, requestor, null);
+		ITypeBinding typeBinding = requestor._result;
+		assertFalse("Is from source", typeBinding.isFromSource());
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertEquals("Wrong number", 1, annotations.length);
+		IMemberValuePairBinding[] allMemberValuePairs = annotations[0].getAllMemberValuePairs();
+		assertEquals("Wrong number", 1, allMemberValuePairs.length);
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=286407
+	public void test0335() throws CoreException, IOException {
+		String contents =
+			"package test0335;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0335/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IJavaProject javaProject = this.workingCopy.getJavaProject();
+		String typeName = "test0335.MyAnnotation";
+		class BindingRequestor extends ASTRequestor {
+			ITypeBinding _result = null;
+			public void acceptBinding(String bindingKey, IBinding binding) {
+				if (this._result == null && binding != null && binding.getKind() == IBinding.TYPE)
+					this._result = (ITypeBinding) binding;
+			}
+		}
+		String[] keys = new String[] {
+			BindingKey.createTypeBindingKey(typeName)
+		};
+		final BindingRequestor requestor = new BindingRequestor();
+		final ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setResolveBindings(true);
+		parser.setProject(javaProject);
+		// this doesn't really do a parse; it's a type lookup
+		parser.createASTs(new ICompilationUnit[] {}, keys, requestor, null);
+		ITypeBinding typeBinding = requestor._result;
+		assertFalse("Is from source", typeBinding.isFromSource());
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertEquals("Wrong number", 1, annotations.length);
+		IMemberValuePairBinding[] allMemberValuePairs = annotations[0].getAllMemberValuePairs();
+		assertEquals("Wrong number", 1, allMemberValuePairs.length);
+		IMemberValuePairBinding memberValuePair = allMemberValuePairs[0];
+		IVariableBinding variableBinding = (IVariableBinding) memberValuePair.getValue();
+		assertEquals("Wrong field", "RUNTIME", variableBinding.getName());
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=286407
+	public void test0336() throws CoreException, IOException {
+		String contents =
+			"package test0336;\n" +
+			"public class Y {}";
+		this.workingCopy = getWorkingCopy(
+				"/Converter15/src/test0336/Y.java",
+				contents,
+				true/*resolve*/
+			);
+		IJavaProject javaProject = this.workingCopy.getJavaProject();
+		String typeName = "test0336.MyAnnotation";
+		class BindingRequestor extends ASTRequestor {
+			ITypeBinding _result = null;
+			public void acceptBinding(String bindingKey, IBinding binding) {
+				if (this._result == null && binding != null && binding.getKind() == IBinding.TYPE)
+					this._result = (ITypeBinding) binding;
+			}
+		}
+		String[] keys = new String[] {
+			BindingKey.createTypeBindingKey(typeName)
+		};
+		final BindingRequestor requestor = new BindingRequestor();
+		final ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setResolveBindings(true);
+		parser.setProject(javaProject);
+		// this doesn't really do a parse; it's a type lookup
+		parser.createASTs(new ICompilationUnit[] {}, keys, requestor, null);
+		ITypeBinding typeBinding = requestor._result;
+		assertFalse("Is from source", typeBinding.isFromSource());
+		IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+		assertEquals("Wrong number", 1, annotations.length);
+		IMemberValuePairBinding[] allMemberValuePairs = annotations[0].getAllMemberValuePairs();
+		assertEquals("Wrong number", 1, allMemberValuePairs.length);
+		IMemberValuePairBinding memberValuePair = allMemberValuePairs[0];
+		IVariableBinding variableBinding = (IVariableBinding) memberValuePair.getValue();
+		assertEquals("Wrong field", "CLASS", variableBinding.getName());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=287701
+	 */
+	public void test0337() throws JavaModelException {
+		String contents =
+			"public class X {\n" + 
+			"        void m() {\n" + 
+			"                int x= 1      ;\n" + 
+			"                int y= - 1  , z=0   ;\n" + 
+			"                // Assignment nodes too long:\n" + 
+			"                int a= x = 2      ;\n" + 
+			"                System.out.print(    x=1     );\n" + 
+			"                java.util.Arrays.asList(    x = 1    /*bla*/  , x= 2\n" + 
+			"                        // comment      \n" + 
+			"                );\n" + 
+			"        }\n" + 
+			"}\n" + 
+			"";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			true,
+			true);
+		ASTNode node = getASTNode(unit, 0, 0, 2);
+		checkSourceRange(node, "int a= x = 2      ;", contents);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) ((VariableDeclarationStatement) node).fragments().get(0);
+		checkSourceRange(fragment, "a= x = 2", contents);
+		node = getASTNode(unit, 0, 0, 3);
+		Expression expression = (Expression) ((MethodInvocation) ((ExpressionStatement) node).getExpression()).arguments().get(0);
+		checkSourceRange(expression, "x=1", contents);
+		node = getASTNode(unit, 0, 0, 4);
+		List arguments = ((MethodInvocation) ((ExpressionStatement) node).getExpression()).arguments();
+		ASTNode node2 = (ASTNode) arguments.get(0);
+		checkSourceRange(node2, "x = 1", contents);
+		checkSourceRange((ASTNode) arguments.get(1), "x= 2", contents);
+		int extendedLength = unit.getExtendedLength(node2);
+		int extendedStartPosition = unit.getExtendedStartPosition(node2);
+		checkSourceRange(extendedStartPosition, extendedLength, "x = 1    /*bla*/", contents);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=290877
+	 */
+	public void test0338() throws JavaModelException {
+		String contents =
+			"/**\n" + 
+			" * The first enum value for my enum.\n" + 
+			" *\n" + 
+			" * @enum myEnum\n" + 
+			" */\n" + 
+			"public class X {}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			true,
+			true);
+		TypeDeclaration node = (TypeDeclaration) getASTNode(unit, 0);
+		Javadoc javadoc = node.getJavadoc();
+		List tags = javadoc.tags();
+		assertEquals("Wrong size", "@enum", ((TagElement) tags.get(1)).getTagName());
+		checkSourceRange((TagElement) tags.get(1), "@enum myEnum", contents);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=290877
+	 */
+	public void test0339() throws JavaModelException {
+		String contents =
+			"/**\n" + 
+			" * Use const as a tag element name.\n" + 
+			" *\n" + 
+			" * @const new constant\n" + 
+			" */\n" + 
+			"public class X {}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			true,
+			true);
+		TypeDeclaration node = (TypeDeclaration) getASTNode(unit, 0);
+		Javadoc javadoc = node.getJavadoc();
+		List tags = javadoc.tags();
+		assertEquals("Wrong size", "@const", ((TagElement) tags.get(1)).getTagName());
+		checkSourceRange((TagElement) tags.get(1), "@const new constant", contents);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=290877
+	 */
+	public void test0340() throws JavaModelException {
+		String contents =
+			"/**\n" + 
+			" * Use the goto as a tag element name.\n" + 
+			" *\n" + 
+			" * @goto new position\n" + 
+			" */\n" + 
+			"public class X {}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			true,
+			true);
+		TypeDeclaration node = (TypeDeclaration) getASTNode(unit, 0);
+		Javadoc javadoc = node.getJavadoc();
+		List tags = javadoc.tags();
+		assertEquals("Wrong size", "@goto", ((TagElement) tags.get(1)).getTagName());
+		checkSourceRange((TagElement) tags.get(1), "@goto new position", contents);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=300734
+	public void test341() throws JavaModelException {
+		String contents =
+			"public class Bug300734 {\n" +
+			"	public void foo(String x) {\n" +
+			"		x.getClass();\n" +
+			"       x.getClass();\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/Bug300734.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			false,
+			true);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(unit, 0, 0);
+		IMethodBinding methodBinding1 = ((MethodInvocation) ((ExpressionStatement) methodDeclaration.getBody().statements().get(0)).getExpression()).resolveMethodBinding();
+		IMethodBinding methodBinding2 = ((MethodInvocation) ((ExpressionStatement) methodDeclaration.getBody().statements().get(1)).getExpression()).resolveMethodBinding();
+		assertTrue("Bindings differ", methodBinding1 == methodBinding2);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=304122
+	public void test342() throws JavaModelException {
+		String contents =
+			"@Deprecated\n" +
+			"public class X<T> {\n" +
+			"	X<String> field;\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			true,
+			true);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) getASTNode(unit, 0);
+		ITypeBinding binding = typeDeclaration.resolveBinding();
+		IAnnotationBinding[] annotations = binding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) getASTNode(unit, 0, 0);
+		binding = fieldDeclaration.getType().resolveBinding();
+		annotations = binding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=304122
+	public void test343() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	@Deprecated\n" +
+			"	<T> Object foo(T t) {\n" +
+			"		return t;\n" +
+			"	}\n" +
+			"	public static Object bar() {\n" +
+			"		return new X().<String>foo(\"Hello\");\n" +
+			"	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			true,
+			true);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(unit, 0, 0);
+		IMethodBinding binding = methodDeclaration.resolveBinding();
+		IAnnotationBinding[] annotations = binding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+		methodDeclaration = (MethodDeclaration) getASTNode(unit, 0, 1);
+		ReturnStatement statement = (ReturnStatement) methodDeclaration.getBody().statements().get(0);
+		MethodInvocation expression = (MethodInvocation) statement.getExpression();
+		binding = expression.resolveMethodBinding();
+		annotations = binding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+		binding = binding.getMethodDeclaration();
+		annotations = binding.getAnnotations();
+		assertEquals("Wrong size", 1, annotations.length);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=223225
+	public void test344() throws JavaModelException {
+		String contents =
+			"public class X {\n" + 
+			"    private @interface Strings {\n" + 
+			"        String[] value() default \"default element\";\n" + 
+			"    }\n" + 
+			"    private @interface Annot {\n" + 
+			"        String[] value();\n" + 
+			"    }\n" + 
+			"    private @interface Annot2 {\n" + 
+			"        String value();\n" + 
+			"    }\n" + 
+			"    private @interface Annot3 {\n" + 
+			"        Class<?> value();\n" + 
+			"    }\n" + 
+			"    @Strings\n" + 
+			"    public void marker() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Strings(\"single element\")\n" + 
+			"    public void single() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Strings(value = \"single element\")\n" + 
+			"    public void singleValue() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Strings({\"single element\"})\n" + 
+			"    public void singleArray() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Strings(value = {\"single element\"})\n" + 
+			"    public void singleArrayValue() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Strings({\"one\", \"two\", \"three\"})\n" + 
+			"    public void multi() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Strings(value = {\"one\", \"two\", \"three\"})\n" + 
+			"    public void multiValue() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Annot(\"test\")\n" + 
+			"    public void singleValue2() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"    @Annot2(\"test\")\n" +
+			"    @Annot3(Object.class)\n" + 
+			"    public void singleValue3() {\n" + 
+			"        // nothing\n" + 
+			"    }\n" + 
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit= (CompilationUnit) buildAST(
+			contents,
+			this.workingCopy,
+			true,
+			true,
+			true);
+		class MyVisitor extends ASTVisitor {
+			List memberPairBindings = new ArrayList();
+			private boolean checkAnnotationBinding(Annotation annotation) {
+				final IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding();
+				final IMemberValuePairBinding[] allMemberValuePairs = annotationBinding.getAllMemberValuePairs();
+				assertEquals("Wrong size", 1, allMemberValuePairs.length);
+				IMemberValuePairBinding memberValuePairBinding = allMemberValuePairs[0];
+				final Object value = memberValuePairBinding.getValue();
+				if ("Strings".equals(annotationBinding.getName())) {
+					assertTrue("Not an array", value.getClass().isArray());
+				}
+				this.memberPairBindings.add(memberValuePairBinding);
+				return false;
+			}
+			public boolean visit(MarkerAnnotation node) {
+				return checkAnnotationBinding(node);
+			}
+			public boolean visit(SingleMemberAnnotation node) {
+				return checkAnnotationBinding(node);
+			}
+			public boolean visit(NormalAnnotation node) {
+				return checkAnnotationBinding(node);
+			}
+			public List allMemberValuePairs() {
+				return this.memberPairBindings;
+			}
+		}
+		MyVisitor visitor = new MyVisitor();
+		unit.accept(visitor);
+		List allMemberValuePairsBindings = visitor.allMemberValuePairs();
+		AnnotationTypeDeclaration annotationTypeDeclaration = (AnnotationTypeDeclaration) ((AbstractTypeDeclaration) unit.types().get(0)).bodyDeclarations().get(0);
+		AnnotationTypeMemberDeclaration annotationTypeMemberDeclaration = (AnnotationTypeMemberDeclaration) annotationTypeDeclaration.bodyDeclarations().get(0);
+		IMethodBinding binding = annotationTypeMemberDeclaration.resolveBinding();
+		Object defaultValue = binding.getDefaultValue();
+		assertTrue("Not an array", !defaultValue.getClass().isArray());
+		unit = (CompilationUnit) buildAST(
+				contents,
+				this.workingCopy,
+				true,
+				true,
+				true);
+		visitor = new MyVisitor();
+		unit.accept(visitor);
+		List allMemberValuePairsBindings2 = visitor.allMemberValuePairs();
+		final int size = allMemberValuePairsBindings.size();
+		assertEquals("Wrong size", 10, size);
+		assertEquals("Wrong size", 10, allMemberValuePairsBindings2.size());
+		StringBuffer buffer = new StringBuffer();
+		StringBuffer buffer2 = new StringBuffer();
+		for (int i = 0; i < size; i++) {
+			final IMemberValuePairBinding firstMemberValuePairBinding = (IMemberValuePairBinding) allMemberValuePairsBindings.get(i);
+			final IMemberValuePairBinding secondMemberValuePairBinding = (IMemberValuePairBinding) allMemberValuePairsBindings2.get(i);
+			final boolean isEqualTo = firstMemberValuePairBinding.isEqualTo(secondMemberValuePairBinding);
+			assertTrue("not equals: " + i, isEqualTo);
+			buffer.append(firstMemberValuePairBinding);
+			buffer2.append(secondMemberValuePairBinding);
+		}
+		assertTrue("Different output", buffer.toString().equals(buffer2.toString()));
+		annotationTypeDeclaration = (AnnotationTypeDeclaration) ((AbstractTypeDeclaration) unit.types().get(0)).bodyDeclarations().get(1);
+		annotationTypeMemberDeclaration = (AnnotationTypeMemberDeclaration) annotationTypeDeclaration.bodyDeclarations().get(0);
+		binding = annotationTypeMemberDeclaration.resolveBinding();
+		defaultValue = binding.getDefaultValue();
+		assertNull("Got a default value", defaultValue);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=327931
+	 */
+	public void test0345() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0345/X.java", true/*resolve*/);
+		String contents =
+				"package test0345;\n" + 
+				"public class X extends A {\n" + 
+				"	/*start*/@Test(groups = NAME)/*end*/ int i;\n" + 
+				"}";
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+				contents,
+				this.workingCopy);
+		assertNotNull("No annotation", annotation);
+		List values = annotation.values();
+		MemberValuePair pair = (MemberValuePair) values.get(0);
+		SimpleName value = (SimpleName) pair.getValue();
+		String constantValue = (String) value.resolveConstantExpressionValue();
+		assertEquals("Wrong constant value", "a", constantValue);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=327931
+	 */
+	public void test0346() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0346/X.java", true/*resolve*/);
+		String contents =
+				"package test0346;\n" + 
+				"public class X extends A {\n" + 
+				"	/*start*/@Test(groups = NAME)/*end*/ int i;\n" + 
+				"}";
+		NormalAnnotation annotation = (NormalAnnotation) buildAST(
+				contents,
+				this.workingCopy);
+		assertNotNull("No annotation", annotation);
+		List values = annotation.values();
+		MemberValuePair pair = (MemberValuePair) values.get(0);
+		SimpleName value = (SimpleName) pair.getValue();
+		String constantValue = (String) value.resolveConstantExpressionValue();
+		assertEquals("Wrong constant value", "a", constantValue);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=333360
+	 */
+	public void test0347() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/test0347/X.java", true/*resolve*/);
+		String contents =
+				"package test0347;\n" + 
+				"public class X implements One</*start*/Outer<Integer>.Inner<Double>[]/*end*/> {\n" + 
+				"}\n" + 
+				"interface One<T> {}\n" + 
+				"class Outer<T> {\n" + 
+				"	public class Inner<S> {}\n" + 
+				"}";
+		ArrayType type = (ArrayType) buildAST(
+				contents,
+				this.workingCopy);
+		assertNotNull("No annotation", type);
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>[]", binding.getQualifiedName());
+		Type componentType = type.getElementType();
+		binding = componentType.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName());
+		assertTrue("Not parameterized", componentType.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) componentType;
+		Type type2 = parameterizedType.getType();
+		assertTrue("Not qualified", type2.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type2;
+		binding = qualifiedType.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName());
+		Type qualifier = qualifiedType.getQualifier();
+		assertTrue("Not parameterized", qualifier.isParameterizedType());
+		binding = qualifier.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>", binding.getQualifiedName());
+		parameterizedType = (ParameterizedType) qualifier;
+		type2 = parameterizedType.getType();
+		assertTrue("Not simple type", type2.isSimpleType());
+		binding = type2.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>", binding.getQualifiedName());
+	}
+	// issues with annotation default values
+	public void _test0348() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "test0348", "AnnotatedInterfaceWithStringDefault.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType type = sourceUnit.getType("AnnotatedInterfaceWithStringDefault");//$NON-NLS-1$
+		//ICompilationUnit sourceUnit2 = getCompilationUnit("Converter15" , "src", "test0348", "TestAnnotationWithStringDefault.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		//IType type2 = sourceUnit2.getType("TestAnnotationWithStringDefault");//$NON-NLS-1$
+
+		assertNotNull("Should not be null", type);
+		ASTParser parser= ASTParser.newParser(AST.JLS8);
+		parser.setProject(type.getJavaProject());
+		IBinding[] bindings= parser.createBindings(new IJavaElement[] { type }, null);
+		if (bindings.length == 1 && bindings[0] instanceof ITypeBinding) {
+			ITypeBinding typeBinding= (ITypeBinding) bindings[0];
+			IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+			for (int i = 0, max = annotations.length; i < max; i++) {
+				IAnnotationBinding annotation = annotations[i];
+				IMemberValuePairBinding[] allMemberValuePairs = annotation.getAllMemberValuePairs();
+				for (int j = 0, max2 = allMemberValuePairs.length; j < max2; j++) {
+					IMemberValuePairBinding memberValuePair = allMemberValuePairs[j];
+					Object defaultValue = memberValuePair.getValue();
+					System.out.println(defaultValue);
+					assertNotNull("no default value", defaultValue);
+				}
+			}
+		}
+	}
+	
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=334119
+	 * Ensures that dollar in a type name is not confused as the starting of member type
+	 */
+	public void test0348a() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X$Y.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"/*start*/public class X$Y {\n" +
+			"}/*end*/",
+			this.workingCopy,
+			false);
+		IBinding binding = ((TypeDeclaration) node).resolveBinding();
+		assertBindingKeyEquals(
+				"Lp/X$Y;",	// should not be Lp/X$Y-X$Y;
+			binding.getKey());
+	}
+	
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=334119
+	 * Ensures that dollar in a type name is not confused as the starting of member type
+	 */
+	public void test0348b() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter15/src/p/X$.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			"package p;\n" +
+			"/*start*/public class X$ {\n" +
+			"}/*end*/",
+			this.workingCopy,
+			false);
+		IBinding binding = ((TypeDeclaration) node).resolveBinding();
+		assertBindingKeyEquals(
+				"Lp/X$;",	// should not be Lp/X$~X$;
+			binding.getKey());
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=339864
+	 */
+	public void test0349() throws JavaModelException {
+		String contents =
+			"import java.util.*;\n" +
+			"public class X {\n" + 
+			"	public static Object foo() {\n" + 
+			"		List<String> l = new ArrayList<>();\n" +
+			"		return l;\n" +
+			"	}\n" + 
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
+		CompilationUnit unit = (CompilationUnit) buildAST(
+			getJLS3(),
+			contents,
+			this.workingCopy,
+			false,
+			true,
+			true);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) getASTNode(unit, 0, 0, 0);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) ((VariableDeclarationFragment) statement.fragments().get(0)).getInitializer();
+		assertTrue("Should be malformed", isMalformed(classInstanceCreation.getType()));
+	}
+	/*
+	 * 3.7 maintenance - Fixed bug 348024: Empty AST for class with static inner class in a package with package-info.java
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=348024
+	 */
+	public void testBug348024() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter15" , "src", "testBug348024", "TestClass.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Wrong number of types", 1, types.size());
+		assertEquals("Wrong number of body declarations", 3, ((TypeDeclaration) types.get(0)).bodyDeclarations().size());
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
index d7db3ac..a08fd78 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for 
@@ -74,6 +78,13 @@
 		}
 	}
 
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
+
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=234609 BindingKey#toSignature() fails with key from createWilcardTypeBindingKey(..)
 	public void test234609() throws JavaModelException {
 
@@ -1714,7 +1725,7 @@
 		checkSourceRange(type, "String[]", source);
 		assertTrue("not an array type", type.isArrayType());
 		ArrayType arrayType = (ArrayType) type;
-		checkSourceRange(arrayType.getComponentType(), "String", source);
+		checkSourceRange(componentType(arrayType), "String", source);
 		assertEquals("Wrong extra dimensions", 1, singleVariableDeclaration.getExtraDimensions());
 	}
 
@@ -1742,7 +1753,7 @@
 		checkSourceRange(type, "String[]", source);
 		assertTrue("not an array type", type.isArrayType());
 		ArrayType arrayType = (ArrayType) type;
-		checkSourceRange(arrayType.getComponentType(), "String", source);
+		checkSourceRange(componentType(arrayType), "String", source);
 		assertEquals("Wrong extra dimensions", 0, singleVariableDeclaration.getExtraDimensions());
 	}
 	/**
@@ -2433,11 +2444,11 @@
 		checkSourceRange(type, "Map<String, Double>[][]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		ArrayType arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "Map<String, Double>[]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "Map<String, Double>", source);
 	}
 
@@ -2460,11 +2471,11 @@
 		checkSourceRange(type, "java.util.Map<String, Double>[][]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		ArrayType arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "java.util.Map<String, Double>[]", source);
 		assertEquals("wrong type", ASTNode.ARRAY_TYPE, type.getNodeType());
 		arrayType = (ArrayType) type;
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		checkSourceRange(type, "java.util.Map<String, Double>", source);
 	}
 
@@ -4124,7 +4135,7 @@
     	assertEquals("wrong dimensions", 1, typeBinding.getDimensions());
     	ArrayType arrayType = (ArrayType) type;
     	assertEquals("Wrong dimension", 1, arrayType.getDimensions());
-    	type = arrayType.getComponentType();
+    	type = componentType(arrayType);
     	assertTrue("Not a simple type", type.isSimpleType());
     	checkSourceRange(type, "String", contents);
     	assertEquals("Wrong extra dimension", 1, singleVariableDeclaration.getExtraDimensions());
@@ -4508,7 +4519,7 @@
     	assertEquals("wrong dimensions", 1, typeBinding.getDimensions());
     	ArrayType arrayType = (ArrayType) type;
     	assertEquals("Wrong dimension", 1, arrayType.getDimensions());
-    	type = arrayType.getComponentType();
+    	type = componentType(arrayType);
     	assertTrue("Not a simple type", type.isSimpleType());
     	checkSourceRange(type, "String", contents);
     	assertEquals("Wrong extra dimension", 0, singleVariableDeclaration.getExtraDimensions());
@@ -9393,7 +9404,7 @@
 
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=192774
 	//Test ability to distinguish AST nodes of multiple similar annotations.
-	public void test0276() throws JavaModelException {
+	public void _test0276() throws JavaModelException {
 		this.workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/);
 		String contents =
 			"@interface Annot {\n" +
@@ -11193,7 +11204,7 @@
 		ITypeBinding binding = type.resolveBinding();
 		assertNotNull("No binding", binding);
 		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>[]", binding.getQualifiedName());
-		Type componentType = type.getComponentType();
+		Type componentType = componentType(type);
 		binding = componentType.resolveBinding();
 		assertNotNull("No binding", binding);
 		assertEquals("Wrong qualified name", "test0347.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName());
@@ -11319,7 +11330,7 @@
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
 		CompilationUnit unit = (CompilationUnit) result;
 		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(unit, 0, 0);
-		Type componentType = ((ArrayType)methodDeclaration.getReturnType2()).getComponentType();
+		Type componentType = componentType(((ArrayType)methodDeclaration.getReturnType2()));
 		ITypeBinding typeBinding = componentType.resolveBinding();
 		assertEquals("Wrong fully qualified name", "test0351.I1", typeBinding.getQualifiedName());
 	}
@@ -11527,4 +11538,36 @@
 			deleteProject(jp);
 		}
 	}
-}
\ No newline at end of file
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=404489
+	public void testBug404489() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter18" , "src", "test404489.bug", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runConversion(this.ast.apiLevel(), sourceUnit, true);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		TypeDeclaration typeDeclaration =  (TypeDeclaration) compilationUnit.types().get(0);
+
+		node = (ASTNode) typeDeclaration.bodyDeclarations().get(2);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());		
+		MethodDeclaration methodDecl = (MethodDeclaration) node;
+		Type type = methodDecl.getReturnType2();
+		assertTrue(type.isQualifiedType());
+		assertTrue(isMalformed(type));
+
+		// parameter
+		SingleVariableDeclaration param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+		type = param.getType();
+		assertTrue(type.isQualifiedType());
+		assertTrue(isMalformed(type));
+		
+		node = (ASTNode) typeDeclaration.bodyDeclarations().get(3);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());		
+		FieldDeclaration field = (FieldDeclaration) node;
+		type = field.getType();
+		assertTrue(type.isQualifiedType());
+		assertTrue(type.isQualifiedType());
+		assertTrue(isMalformed(type));
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java
index 1ce0d50..8f9b890 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter17Test.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -32,18 +36,24 @@
 import org.eclipse.jdt.core.dom.ClassInstanceCreation;
 import org.eclipse.jdt.core.dom.CompilationUnit;
 import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
 import org.eclipse.jdt.core.dom.FieldDeclaration;
 import org.eclipse.jdt.core.dom.IAnnotationBinding;
 import org.eclipse.jdt.core.dom.IBinding;
 import org.eclipse.jdt.core.dom.IMethodBinding;
 import org.eclipse.jdt.core.dom.ITypeBinding;
 import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
 import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.NullLiteral;
 import org.eclipse.jdt.core.dom.NumberLiteral;
+import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.SimpleName;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.SwitchStatement;
 import org.eclipse.jdt.core.dom.TryStatement;
 import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
 import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
 import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
 
@@ -53,7 +63,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS4);
+		this.ast = AST.newAST(getJLS4());
 	}
 
 	public ASTConverter17Test(String name) {
@@ -204,7 +214,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -268,7 +278,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", false/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, false);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -301,7 +311,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", false/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, false);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -334,7 +344,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", false/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, false);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -368,7 +378,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", false/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, false);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, false);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -426,7 +436,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -448,7 +458,7 @@
 	 * Binary literals with underscores
 	 */
 	public void test0012() throws JavaModelException {
-		AST localAst= AST.newAST(AST.JLS4);
+		AST localAst= AST.newAST(getJLS4());
 		NumberLiteral literal= localAst.newNumberLiteral();
 		try {
 			literal.setToken("0b1010");
@@ -474,7 +484,7 @@
 				"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -500,7 +510,7 @@
 				"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		node = getASTNode(unit, 0, 0);
@@ -559,7 +569,7 @@
 				"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		IProblem[] problems = unit.getProblems();
@@ -720,7 +730,7 @@
 			"}";
 		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", true/*resolve*/);
 		this.workingCopy.getBuffer().setContents(contents);
-		ASTNode node = runConversion(AST.JLS4, this.workingCopy, true);
+		ASTNode node = runConversion(getJLS4(), this.workingCopy, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -787,4 +797,195 @@
 		IMethodBinding[] methods = binding.getDeclaredMethods();
 		assertEquals("Wrong size", 2, methods.length);
 	}
+	/**
+     * https://bugs.eclipse.org/bugs/show_bug.cgi?id=402673
+     *
+     * @throws JavaModelException
+     */
+    public void test402673a() throws JavaModelException {
+            String contents = "package test402673;"
+                    + "public class X {\n"
+                    + "    Runnable r = () -> System.out.println(\"hi\");\n"
+                    +"}\n";
+        	this.workingCopy = getWorkingCopy("/Converter/src/test402673/X.java", true/* resolve */);
+        	this.workingCopy.getBuffer().setContents(contents);
+        	ASTNode node = runConversion(this.workingCopy, true);
+        	assertTrue(node != null);
+    		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    		CompilationUnit unit = (CompilationUnit) node;
+    		assertProblemsSize(unit, 1, "Lambda expressions are allowed only at source level 1.8 or above");
+    		TypeDeclaration type = (TypeDeclaration) getASTNode(unit, 0);
+    		assertTrue((type.getFlags() & ASTNode.MALFORMED) != 0);
+    		node = getASTNode(unit, 0, 0);
+    		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+    		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+    		final List fragments = fieldDeclaration.fragments();
+    		assertEquals("Wrong size", 1, fragments.size());
+    		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+    		final Expression initializer = fragment.getInitializer();
+    		assertEquals("Not a null literal", ASTNode.NULL_LITERAL, initializer.getNodeType());
+    		NullLiteral nullLiteral = (NullLiteral) initializer;
+    		assertTrue((nullLiteral.getFlags() & ASTNode.MALFORMED) != 0);
+    }
+    /**
+     * https://bugs.eclipse.org/bugs/show_bug.cgi?id=402673
+     *
+     * @throws JavaModelException
+     */
+    public void test402673b() throws JavaModelException {
+            String contents = "package test402673;"
+                    + "public class X {\n"
+            		+ "    public void foo() {\n"
+                    + "        Runnable r = () -> System.out.println(\"hi\");\n"
+                    +"    }\n"
+                    +"}\n";
+        	this.workingCopy = getWorkingCopy("/Converter/src/test402673/X.java", true/* resolve */);
+        	this.workingCopy.getBuffer().setContents(contents);
+        	ASTNode node = runConversion(this.workingCopy, true);
+        	assertTrue(node != null);
+    		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+    		CompilationUnit unit = (CompilationUnit) node;
+    		assertProblemsSize(unit, 1, "Lambda expressions are allowed only at source level 1.8 or above");
+    		node = getASTNode(unit, 0, 0);
+    		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+    		MethodDeclaration methodDecl = (MethodDeclaration) node;
+    		assertTrue((methodDecl.getFlags() & ASTNode.MALFORMED) == 1);
+    		node = getASTNode(unit, 0, 0, 0);
+    		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+    		VariableDeclarationStatement variableDecl = (VariableDeclarationStatement) node;
+    		final List fragments = variableDecl.fragments();
+    		assertEquals("Wrong size", 1, fragments.size());
+    		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+    		final Expression initializer = fragment.getInitializer();
+    		assertEquals("Not a null literal", ASTNode.NULL_LITERAL, initializer.getNodeType());
+    		NullLiteral nullLiteral = (NullLiteral) initializer;
+    		assertTrue((nullLiteral.getFlags() & ASTNode.MALFORMED) != 0);
+    }
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=402674
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test403444() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test403444/X.java",
+				true/* resolve */);
+		String contents = "package test403444;" +
+				"public class X {\n" +
+				"  public static interface StringToInt {\n" +
+				"   	int stoi(String s);\n" +
+				"  }\n" +
+				"  public static interface ReduceInt {\n" +
+				"      int reduce(int a, int b);\n" +
+				"  }\n" +
+				"  void foo(StringToInt s) { }\n" +
+				"  void bar(ReduceInt r) { }\n" +
+				"  void bar() {\n" +
+				"      foo(s -> s.length());\n" +
+				"      foo((s) -> s.length());\n" +
+				"      foo((String s) -> s.length()); //SingleVariableDeclaration is OK\n" +
+				"      bar((x, y) -> x+y);\n" +
+				"      bar((int x, int y) -> x+y); //SingleVariableDeclarations are OK\n" +
+				"  }\n" +
+				"}\n";
+		
+		
+    	this.workingCopy = getWorkingCopy("/Converter/src/test403444/X.java", true/* resolve */);
+    	this.workingCopy.getBuffer().setContents(contents);
+    	ASTNode node = runConversion(this.workingCopy, true);
+    	assertTrue(node != null);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		
+		String error = "Lambda expressions are allowed only at source level 1.8 or above\n"
+				+ "Lambda expressions are allowed only at source level 1.8 or above\n"
+				+ "Lambda expressions are allowed only at source level 1.8 or above\n"
+				+ "Lambda expressions are allowed only at source level 1.8 or above\n"
+				+ "Lambda expressions are allowed only at source level 1.8 or above";
+		assertProblemsSize(unit, 5, error);
+
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(unit, 0);
+		MethodDeclaration methoddecl = (MethodDeclaration)typedeclaration.bodyDeclarations().get(4);
+		List statements = methoddecl.getBody().statements();
+		int sCount = 0;
+		
+		ExpressionStatement statement = (ExpressionStatement)statements.get(sCount++);
+		MethodInvocation methodInvocation = (MethodInvocation)statement.getExpression();
+		Expression expression = (Expression) methodInvocation.arguments().get(0);
+		assertTrue(expression instanceof NullLiteral);
+		ITypeBinding binding = expression.resolveTypeBinding();
+		assertNull(binding);	
+		
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		expression = (Expression) methodInvocation.arguments().get(0);
+		assertTrue(expression instanceof NullLiteral);
+		binding = expression.resolveTypeBinding();
+		assertNull(binding);	
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		expression = (Expression) methodInvocation.arguments().get(0);
+		assertTrue(expression instanceof NullLiteral);
+		binding = expression.resolveTypeBinding();
+		assertNull(binding);	
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		expression = (Expression) methodInvocation.arguments().get(0);
+		assertTrue(expression instanceof NullLiteral);
+		binding = expression.resolveTypeBinding();
+		assertNull(binding);	
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		expression = (Expression) methodInvocation.arguments().get(0);
+		assertTrue(expression instanceof NullLiteral);
+		binding = expression.resolveTypeBinding();
+		assertNull(binding);	
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399791
+	 */
+	public void test0021() throws JavaModelException {
+		String contents =
+				"public interface X {\n" +
+				"	static void foo(){}\n" +
+				"   default void foo(int i){}\n" +
+				"}\n";
+			this.workingCopy = getWorkingCopy("/Converter17/src/X.java", false);
+			ASTNode node = buildAST(contents, this.workingCopy, false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+			node = (ASTNode) type.bodyDeclarations().get(0);
+			assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration method = (MethodDeclaration) node;
+			assertEquals("Method should be malformed", ASTNode.MALFORMED, (method.getFlags() & ASTNode.MALFORMED));
+
+			method = (MethodDeclaration) type.bodyDeclarations().get(1);
+			assertEquals("Method should be malformed", ASTNode.MALFORMED, (method.getFlags() & ASTNode.MALFORMED));
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=405934
+	 *
+	 * @deprecated as it uses deprecated methods
+	 */
+	public void test0022() throws JavaModelException {
+		String contents =
+				"public class X {\n" +
+				"	void foo() throws  @NonNull EOFException, java.io.@NonNull FileNotFoundException {}\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter17/src/X.java", false);
+		ASTNode node = buildAST(contents, this.workingCopy, false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		SimpleName exception1 = (SimpleName) method.thrownExceptions().get(0);
+		assertEquals("QualifiedName should be malformed", ASTNode.MALFORMED, (exception1.getFlags() & ASTNode.MALFORMED));
+		QualifiedName exception2 = (QualifiedName) method.thrownExceptions().get(1);
+		assertEquals("QualifiedName should be malformed", ASTNode.MALFORMED, (exception2.getFlags() & ASTNode.MALFORMED));
+	}
 }
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
new file mode 100644
index 0000000..5dfb444
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter18Test.java
@@ -0,0 +1,3400 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.dom;
+
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.AnnotatableType;
+import org.eclipse.jdt.core.dom.ArrayCreation;
+import org.eclipse.jdt.core.dom.ArrayType;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Dimension;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+
+public class ASTConverter18Test extends ConverterTestSetup {
+
+	ICompilationUnit workingCopy;
+
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(AST.JLS8);
+	}
+
+	public ASTConverter18Test(String name) {
+		super(name);
+	}
+
+	static {
+//		TESTS_NUMBERS = new int[] { 19 };
+//		TESTS_RANGE = new int[] { 1, -1 };
+//		TESTS_NAMES = new String[] {"test0001"};
+	}
+	public static Test suite() {
+		return buildModelTestSuite(ASTConverter18Test.class);
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		if (this.workingCopy != null) {
+			this.workingCopy.discardWorkingCopy();
+			this.workingCopy = null;
+		}
+	}
+
+	/*
+	 * Type Annotations on Variable Arguments
+	 */
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391898
+	public void test0001() throws JavaModelException {
+		String contents =
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"public class X {\n" +
+			"	public void foo(int @Marker... args) {\n" +
+			"	}\n" +
+			" 	public void bar(@Marker int @Marker... args) {\n" +
+			" 	}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 1, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 1, parameters.size());
+		SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(0);
+		List annotations = parameter.varargsAnnotations();
+		assertEquals("Wrong number of annotations", 1, annotations.size());
+		ASTNode annotation = (ASTNode) annotations.get(0);
+		checkSourceRange(annotation, "@Marker", contents);
+		node = getASTNode(compilationUnit,1,1);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		parameters = methodDeclaration.parameters();
+		assertEquals("Wrong number of parameters", 1, parameters.size());
+		parameter = (SingleVariableDeclaration) parameters.get(0);
+		annotations = parameter.varargsAnnotations();
+		assertEquals("Wrong number of annotations", 1, annotations.size());
+		annotation = (ASTNode) annotations.get(0);
+		checkSourceRange(annotation, "@Marker", contents);
+	}
+	/*
+	 * Type Annotations on Variable Argument of ArrayType
+	 */
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=413569
+	public void test413569() throws JavaModelException {
+		String contents =
+			"import java.lang.annotation.*;\n" +
+			"public class X {\n" +
+			"	@Target(ElementType.TYPE_USE) static @interface A {}\n" + 
+			"	@Target(ElementType.TYPE_USE) static @interface B {}\n" + 
+			"	@Target(ElementType.TYPE_USE) static @interface C { Class<?> value() default Object.class; }\n" + 
+			"	@Target(ElementType.TYPE_USE) static @interface D { Class<?> d(); }\n" + 
+			"	void foo(@A int @B()[] @C(int[].class) [] @D(d=String[].class)... arg) {}\n" +
+			"}";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 4);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 1, parameters.size());
+		SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(0);
+		
+		ArrayType type = (ArrayType) parameter.getType();
+		List dimensions = type.dimensions();
+		assertEquals(2, dimensions.size());
+		
+		Dimension dimension = (Dimension) dimensions.get(0);
+		List annotations = dimension.annotations();
+		assertEquals("Wrong number of annotations", 1, annotations.size());
+		Annotation annotation = (Annotation) annotations.get(0);
+		checkSourceRange(annotation, "@B()", contents);
+		
+		dimension = (Dimension) dimensions.get(1);
+		annotations = dimension.annotations();
+		assertEquals("Wrong number of annotations", 1, annotations.size());
+		annotation = (Annotation) annotations.get(0);
+		checkSourceRange(annotation, "@C(int[].class)", contents);
+		
+		annotations = parameter.varargsAnnotations();
+		assertEquals("Wrong number of annotations", 1, annotations.size());
+		annotation = (Annotation) annotations.get(0);
+		checkSourceRange(annotation, "@D(d=String[].class)", contents);
+		
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886 tests annotations on
+	 * QTR in multiple scenarios of occurrence.
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test0002() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0002/X.java",
+				true/* resolve */);
+		String contents = "package test0002;\n"
+				+ "import java.lang.annotation.Target;\n"
+				+ "public class X {\n"
+				+ "	public static void main(String[] args) {\n"
+				+ "		Outer outer = new Outer();\n"
+				+ "		Object myObject = new Object();\n"
+				+ "		String myString;\n"
+				+ "		myString = (java.lang.@Marker String) myObject;\n"
+				+ "		Outer.Inner first = outer.new Inner();\n"
+				+ "		Outer. @Marker2 Inner second = outer.new Inner() ;\n"
+				+ "		Outer.Inner. @Marker1 Deeper deeper = second.new Deeper();\n"
+				+ "		Outer.@Marker1 Inner.@Marker2 Deeper deeper2 =  second.new Deeper();\n"
+				+ "	}\n" + "}\n" + "class Outer {\n"
+				+ "	public class Inner {\n" + "		public class Deeper {\n"
+				+ "		}\n" + "	}\n" + "}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker1 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker2 {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents,
+				this.workingCopy);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(cu, 0, 0);
+		List statements = methodDeclaration.getBody().statements();
+		int sCount = 3;
+
+		// case 1 - annotation just before the last field
+		ExpressionStatement expressionStatement = (ExpressionStatement) statements.get(sCount++);
+		Assignment assignment = (Assignment) expressionStatement.getExpression();
+		assertNotNull(assignment);
+		CastExpression castExpression = (CastExpression) assignment.getRightHandSide();
+		assertNotNull(castExpression);
+		PackageQualifiedType packageQualifiedType = (PackageQualifiedType) castExpression.getType();
+		assertNotNull(packageQualifiedType);
+		assertEquals("java.lang.@Marker String", packageQualifiedType.toString());
+		List annotations = packageQualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		assertEquals("@Marker", annotations.get(0).toString());
+
+		// case 2 - QualifiedType without annotations.
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+		Type type = variableDeclarationStatement.getType();
+		assertTrue(type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		assertEquals("Outer.Inner", simpleType.toString());
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 0);
+
+		// case 3 - Qaulified Type with outer without annotations and inner with
+		// annotations.
+		variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+		type = variableDeclarationStatement.getType();
+		assertTrue(type.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type;
+		assertNotNull(qualifiedType);
+		assertEquals("Outer.@Marker2 Inner", qualifiedType.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		assertEquals("@Marker2", annotations.get(0).toString());
+
+		// case 4 - Multiple levels with annotations at the last only.
+		variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+		type = variableDeclarationStatement.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertNotNull(qualifiedType);
+		assertEquals("Outer.Inner.@Marker1 Deeper", qualifiedType.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		assertEquals("@Marker1", annotations.get(0).toString());
+
+		// case 5 - Multiple annotations
+		variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+		type = variableDeclarationStatement.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertNotNull(qualifiedType);
+		assertEquals("Outer.@Marker1 Inner.@Marker2 Deeper", qualifiedType.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		assertEquals("@Marker2", annotations.get(0).toString());
+		SimpleName simpleName = qualifiedType.getName();
+		assertEquals("Deeper", simpleName.toString());
+		Type qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isQualifiedType());
+		qualifiedType = (QualifiedType) qualifierType;
+		assertEquals("Outer.@Marker1 Inner", qualifiedType.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		assertEquals("@Marker1", annotations.get(0).toString());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886 tests the
+	 * representation of type annotations on a possible JAVA 7 and 8 place.
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test0003() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0003/X.java",
+				true/* resolve */);
+		String contents = "package test0003;\n"
+				+ "import java.lang.annotation.Target;\n"
+				+ "public class X {\n"
+				+ "	public static void main(String[] args) {\n"
+				+ "		@Marker Outer.Inner first[] = new Outer.Inner[1];\n"
+				+ "	}\n" + "}\n" + "class Outer {\n"
+				+ "	public class Inner {\n" + "	}\n" + "}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(cu, 0, 0);
+		List statements = methodDeclaration.getBody().statements();
+		int sCount = 0;
+
+		// Current design expects annotation only at the JAVA 7 place if it is
+		// expected at JAVA 8.
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount);
+		List modifiers = variableDeclarationStatement.modifiers();
+		assertTrue(modifiers.size() == 1);
+		Annotation annotation = (Annotation) modifiers.get(0);
+		assertEquals("@Marker", annotation.toString());
+		Type type = variableDeclarationStatement.getType();
+		assertTrue(type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		assertEquals("Outer.Inner", simpleType.toString());
+		List annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 0);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886 tests QTR with
+	 * annotations
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void _test0004() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0004/X.java",
+				true/* resolve */);
+		String contents = "package test0004;"
+				+ "import java.lang.annotation.Target;\n"
+				+ "public class X implements One</*start*/@Marker1 Outer<Integer>. @Marker2 Inner<Double>[]/*end*/> {\n"
+				+ "}\n" + "interface One<T> {}\n" + "class Outer<T> {\n"
+				+ "	public class Inner<S> {}\n" + "}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker1 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker2 {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 0);
+		ArrayType type = (ArrayType) ((ParameterizedType) typedeclaration.superInterfaceTypes().get(0)).typeArguments().get(0);
+		assertNotNull("No annotation", type);
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test0004.Outer<java.lang.Integer>.Inner<java.lang.Double>[]", binding.getQualifiedName());
+		Type elementType = type.getElementType();
+		binding = elementType.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name",
+				"test0004.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName());
+		assertTrue("Not parameterized", elementType.isParameterizedType());
+		ParameterizedType parameterizedType = (ParameterizedType) elementType;
+		Type type2 = parameterizedType.getType();
+		assertTrue("Not qualified", type2.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type2;
+		binding = qualifiedType.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name","test0004.Outer<java.lang.Integer>.Inner<java.lang.Double>", binding.getQualifiedName());
+		Type qualifier = qualifiedType.getQualifier();
+		assertTrue("Not parameterized", qualifier.isParameterizedType());
+		binding = qualifier.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test0004.Outer<java.lang.Integer>", binding.getQualifiedName());
+		parameterizedType = (ParameterizedType) qualifier;
+		type2 = parameterizedType.getType();
+		assertTrue("Not simple type", type2.isSimpleType());
+		binding = type2.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name","test0004.Outer<java.lang.Integer>", binding.getQualifiedName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886 tests QTR with
+	 * annotations
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test0005() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0005/X.java",
+				true/* resolve */);
+		String contents = "package test0005;"
+				+ "import java.lang.annotation.Target;\n"
+				+ "public class X implements One< Outer.Inner > {\n"
+				+ "}\n"
+				+ "class Y implements One< Outer. @Marker1 Inner > {\n"
+				+ "}\n"
+				+ "class Z implements One< @Marker1 Outer.Inner > {\n"
+				+ "}\n"
+				+ "class W implements One< @Marker1 Outer. @Marker2 Inner > {\n"
+				+ "}\n" + "interface One<T> {}\n" + "class Outer {\n"
+				+ "	public class Inner {}\n" + "}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker1 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker2 {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents,
+				this.workingCopy);
+		int tCount = 0;
+
+		// case 1 - no annotations Outer.Inner
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		ParameterizedType parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		List typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		Type type = (Type) typeArguments.get(0);
+		assertTrue(type.isSimpleType());
+		assertEquals("Outer.Inner", type.toString());
+
+		// case 2 - QTR with one annotation Outer.@Marker1 Inner
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration
+				.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		type = (Type) typeArguments.get(0);
+		assertTrue(type.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type;
+		assertEquals("Outer.@Marker1 Inner", qualifiedType.toString());
+		List annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		Annotation annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+		// case 3 - QTR with one annotation at the beginning @Marker1
+		// Outer.Inner
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		type = (Type) typeArguments.get(0);
+		assertTrue(type.isQualifiedType());
+		assertEquals("@Marker1 Outer.Inner", type.toString());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Inner", qualifiedType.getName().toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		Type qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isSimpleType());
+		SimpleType simpleType = (SimpleType) qualifierType;
+		assertEquals("@Marker1 Outer", simpleType.toString());
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+		// case 4 - QTR with annotations at both the types @Marker1
+		// Outer.@Marker2 Inner
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		type = (Type) typeArguments.get(0);
+		assertTrue(type.isQualifiedType());
+		assertEquals("@Marker1 Outer.@Marker2 Inner", type.toString());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Inner", qualifiedType.getName().toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker2", annotation.toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isSimpleType());
+		simpleType = (SimpleType) qualifierType;
+		assertEquals("@Marker1 Outer", simpleType.toString());
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886 tests PQTR with
+	 * annotations part
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void _test0006() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0006/X.java",
+				true);
+		String contents = "package test0006;"
+				+ "import java.lang.annotation.Target;\n"
+				+ "public class X implements One<Outer.  Inner.Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class X1 implements One<Outer. @Marker1 Inner.Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class X2 implements One<Outer. @Marker1 Inner.@Marker2 Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class X3 implements One<@Marker1 Outer. @Marker2 Inner. Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Y implements One<Outer1. Inner<Integer>. Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Y1 implements One<Outer1. Inner<Integer>. @Marker1 Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Y2 implements One<Outer1. @Marker1 Inner<Integer>. Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Y3 implements One<@Marker1 Outer1. Inner<Integer>. Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Y4 implements One<@Marker1 Outer1. @Marker2 Inner<Integer>. Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Z implements One<Outer2<Integer>.Inner.Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Z1 implements One<@Marker1 Outer2<Integer>.Inner.Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class Z2 implements One<Outer2<Integer>. @Marker1 Inner.@Marker2 Deeper<Double>> {\n"
+				+ "}\n"
+				+ "class W implements One<Outer3<Double>. @Marker1 @Marker2 Inner<Integer, Character>. Deeper<Double>> {\n"
+				+ "}\n" + "interface One<T> {}\n" + "class Outer {\n"
+				+ "	public class Inner {\n"
+				+ "       public class Deeper<S> {\n" + "       }\n" + "   }\n"
+				+ "}\n" + "class Outer1 {\n" + "	public class Inner<T> {\n"
+				+ "       public class Deeper<S> {\n" + "       }\n" + "   }\n"
+				+ "}\n" + "class Outer2 <T> {\n" + "	public class Inner {\n"
+				+ "       public class Deeper<S> {}\n" + "   }\n" + "}\n"
+				+ "class Outer3 <T> {\n" + "	public class Inner<K, V> {\n"
+				+ "       public class Deeper<S> {}\n" + "   }\n" + "}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker1 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker2 {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents,
+				this.workingCopy);
+		int tCount = 0;
+
+		// case 1: vanilla case without annotations and with single typeArgument
+		// Outer.Inner.Deeper<Double>
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		ParameterizedType parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		List typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer.Inner.Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		Type type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		assertEquals("Outer.Inner.Deeper", simpleType.toString());
+		Name name = simpleType.getName();
+		assertTrue(name.isQualifiedName());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		assertEquals("Outer.Inner.Deeper", qualifiedName.toString());
+
+		// case 2 - One annotation after the first class
+		// Outer. @Marker1 Inner.Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer.@Marker1 Inner.Deeper<Double>",	parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type;
+		assertEquals("Outer.@Marker1 Inner.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		List annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		Type qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isSimpleType());
+		simpleType = (SimpleType) qualifierType;
+		assertEquals("Outer.@Marker1 Inner", simpleType.toString());
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		Annotation annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+		// case 3 - Inner types annotated with outer not annotated with last
+		// type arg
+		// Outer. @Marker1 Inner.@Marker2 Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer.@Marker1 Inner.@Marker2 Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Outer.@Marker1 Inner.@Marker2 Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker2", annotation.toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isSimpleType());
+		simpleType = (SimpleType) qualifierType;
+		assertEquals("Outer.@Marker1 Inner", simpleType.toString());
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+		// case 4 - one annotation on the outermost, one in middle and one
+		// typearg in innermost
+		// @Marker1 Outer. @Marker2 Inner. Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration
+				.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("@Marker1 Outer.@Marker2 Inner.Deeper<Double>", parametrizedType.toString());
+		ITypeBinding typeBinding = parametrizedType.resolveBinding();
+		assertNotNull("Binding non-null", typeBinding);
+		assertEquals("wrong qualified name", "test0006.Outer.Inner.Deeper<java.lang.Double>", typeBinding.getQualifiedName());
+		assertTrue("Not a Parameterized Type", typeBinding.isParameterizedType());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("@Marker1 Outer.@Marker2 Inner.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isQualifiedType());
+		qualifiedType = (QualifiedType) qualifierType;
+		assertEquals("@Marker1 Outer.@Marker2 Inner", qualifierType.toString());
+		typeBinding = qualifiedType.resolveBinding();
+		assertNotNull("Binding non-null", typeBinding);
+		typeBinding = qualifiedType.resolveBinding();
+		assertEquals("wrong qualified name", "test0006.Outer.Inner", typeBinding.getQualifiedName());
+		assertTrue(qualifierType.isAnnotatable());
+		AnnotatableType annotatableType = (AnnotatableType) qualifierType;
+		annotations = annotatableType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker2", annotation.toString());
+		name = qualifiedType.getName();
+		assertEquals("Inner", name.toString());
+		type = qualifiedType.getQualifier();
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		assertEquals("@Marker1 Outer", simpleType.toString());
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+		// case 5 - without annotations, but with typeargs at second and third
+		// types
+		// Outer1. Inner<Integer>. Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer1.Inner<Integer>.Deeper<Double>",parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Outer1.Inner<Integer>.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		assertEquals("Outer1.Inner<Integer>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		name = simpleType.getName();
+		assertTrue(name.isQualifiedName());
+		qualifiedName = (QualifiedName) name;
+		assertEquals("Outer1.Inner", qualifiedName.toString());
+
+		// case 6 - Annot in between two PQRT with outermost neither annotated
+		// nor having typeargs
+		// Outer1. Inner<Integer>. @Marker1 Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer1.Inner<Integer>.@Marker1 Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Outer1.Inner<Integer>.@Marker1 Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		assertEquals("Outer1.Inner<Integer>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		name = simpleType.getName();
+		assertTrue(name.isQualifiedName());
+		qualifiedName = (QualifiedName) name;
+		assertEquals("Outer1.Inner", qualifiedName.toString());
+
+		// case 7 - Outermost still empty (no annotations, no type args),
+		// followed by annotation, and then typeargs
+		// Outer1. @Marker1 Inner<Integer>. Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer1.@Marker1 Inner<Integer>.Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Outer1.@Marker1 Inner<Integer>.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		assertEquals("Outer1.@Marker1 Inner<Integer>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		assertEquals("Outer1.@Marker1 Inner", simpleType.toString());
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+		// case 8 - Similar to above, but with the major difference of
+		// annotation shifted to outermost.
+		// @Marker1 Outer1. Inner<Integer>. Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("@Marker1 Outer1.Inner<Integer>.Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("@Marker1 Outer1.Inner<Integer>.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		assertEquals("@Marker1 Outer1.Inner<Integer>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("@Marker1 Outer1.Inner", qualifiedType.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		name = qualifiedType.getName();
+		assertTrue(name.isSimpleName());
+		assertEquals("Inner", name.toString());
+		type = qualifiedType.getQualifier();
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+		name = simpleType.getName();
+		assertTrue(name.isSimpleName());
+		assertEquals("Outer1", name.toString());
+
+		// case 9: scenario of the above case plus another annotation at
+		// mid-level.
+		// @Marker1 Outer1.@Marker2 Inner<Integer>. Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("@Marker1 Outer1.@Marker2 Inner<Integer>.Deeper<Double>",parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("@Marker1 Outer1.@Marker2 Inner<Integer>.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		assertEquals("@Marker1 Outer1.@Marker2 Inner<Integer>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("@Marker1 Outer1.@Marker2 Inner", qualifiedType.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker2", annotation.toString());
+		name = qualifiedType.getName();
+		assertTrue(name.isSimpleName());
+		assertEquals("Inner", name.toString());
+		type = qualifiedType.getQualifier();
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+		name = simpleType.getName();
+		assertTrue(name.isSimpleName());
+		assertEquals("Outer1", name.toString());
+
+		// case 10 - PQRT with two type args but without annotations
+		// Outer2<Integer>.Inner.Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer2<Integer>.Inner.Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Outer2<Integer>.Inner.Deeper", qualifiedType.toString());
+		ITypeBinding binding = qualifiedType.resolveBinding();
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isQualifiedType());
+		qualifiedType = (QualifiedType) qualifierType;
+		binding = qualifiedType.resolveBinding();
+		assertEquals("Outer2<Integer>.Inner", qualifiedType.toString());
+		assertEquals("wrong qualified binding", "test0006.Outer2<java.lang.Integer>.Inner",	binding.getQualifiedName());
+		name = qualifiedType.getName();
+		assertEquals("Inner", name.toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertEquals("Outer2", type.toString());
+
+		// case 11 - annotation at outermost in addition to scenario in case 10.
+		// @Marker1 Outer2<Integer>.Inner.Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("@Marker1 Outer2<Integer>.Inner.Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("@Marker1 Outer2<Integer>.Inner.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isQualifiedType());
+		qualifiedType = (QualifiedType) qualifierType;
+		assertEquals("@Marker1 Outer2<Integer>.Inner", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Inner", name.toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertEquals("@Marker1 Outer2", type.toString());
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		annotations = simpleType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+
+		// case 12 - No annotations at outermost, but outermost has
+		// typeAnnotations.
+		// Outer2<Integer>. @Marker1 Inner.@Marker2 Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer2<Integer>.@Marker1 Inner.@Marker2 Deeper<Double>", parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Outer2<Integer>.@Marker1 Inner.@Marker2 Deeper",qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker2", annotation.toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isQualifiedType());
+		qualifiedType = (QualifiedType) qualifierType;
+		assertEquals("Outer2<Integer>.@Marker1 Inner", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Inner", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		assertEquals("@Marker1", annotation.toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Integer", type.toString());
+		type = parametrizedType.getType();
+		assertEquals("Outer2", type.toString());
+		assertTrue(type.isSimpleType());
+
+		// case 13 - a list of annotations and multiple typeArgument element
+		// lists.
+		// Outer3<Double>. @Marker1 @Marker2 Inner<Integer, Character>.
+		// Deeper<Double>
+		typedeclaration = (TypeDeclaration) getASTNode(cu, tCount++);
+		parametrizedType = (ParameterizedType) typedeclaration.superInterfaceTypes().get(0);
+		typeArguments = parametrizedType.typeArguments();
+		assertEquals(1, typeArguments.size());
+		parametrizedType = (ParameterizedType) typeArguments.get(0);
+		assertEquals("Outer3<Double>.@Marker1 @Marker2 Inner<Integer,Character>.Deeper<Double>",parametrizedType.toString());
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertEquals("Double", type.toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Outer3<Double>.@Marker1 @Marker2 Inner<Integer,Character>.Deeper", qualifiedType.toString());
+		name = qualifiedType.getName();
+		assertEquals("Deeper", name.toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 0);
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 2);
+		assertEquals("Integer", typeArguments.get(0).toString());
+		assertEquals("Character", typeArguments.get(1).toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isQualifiedType());
+		qualifiedType = (QualifiedType) type;
+		assertEquals("Inner", qualifiedType.getName().toString());
+		annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 2);
+		assertEquals("@Marker1", annotations.get(0).toString());
+		assertEquals("@Marker2", annotations.get(1).toString());
+		qualifierType = qualifiedType.getQualifier();
+		assertTrue(qualifierType.isParameterizedType());
+		parametrizedType = (ParameterizedType) qualifierType;
+		typeArguments = parametrizedType.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		assertEquals("Double", typeArguments.get(0).toString());
+		type = parametrizedType.getType();
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		assertEquals("Outer3", simpleType.toString());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391893
+	public void test0007() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	public void foo(@Marker @Marker2 X this, @Marker2 @Marker int i){}\n" +
+			"}\n" +
+			"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"@interface Marker {}\n" +
+			"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"@interface Marker2 {}";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		Type receiver = method.getReceiverType();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, receiver.getNodeType());
+		assertEquals("Incorrect receiver signature", "@Marker @Marker2 X", ((SimpleType) receiver).toString());
+		assertEquals("Incorrect annotations on receiver", 2, ((SimpleType) receiver).annotations().size());
+		assertNull("Incorrect receiver qualfier", method.getReceiverQualifier());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391893
+	public void test0008() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+			"	class Y {\n" +
+			"		public Y(@Marker @Marker2 X X.this, @Marker2 @Marker int i){}\n" +
+			"	}\n" +
+			"}\n" +
+			"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"@interface Marker {}\n" +
+			"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"@interface Marker2 {}";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a type Declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration innerType = (TypeDeclaration) node;
+		assertEquals("Incorrect no of methods", 1, innerType.getMethods().length);
+		MethodDeclaration method = innerType.getMethods()[0];
+		Type receiver = method.getReceiverType();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, receiver.getNodeType());
+		assertEquals("Incorrect receiver signature", "@Marker @Marker2 X", ((SimpleType) receiver).toString());
+		assertEquals("Incorrect annotations on receiver", 2, ((SimpleType) receiver).annotations().size());
+		assertNotNull("Incorrect receiver qualfier", method.getReceiverQualifier());
+		assertEquals("Incorrect receiver qualfier", "X", method.getReceiverQualifier().getFullyQualifiedName());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391895
+	public void test0009() throws JavaModelException {
+		String contents =
+				"import java.lang.annotation.ElementType;\n" +
+						"public class X {\n" +
+						" 	class Y {\n" +
+						"		@Annot int @Annot1 [] a @Annot2 @Annot3 [] @Annot3 @Annot2 [] @Annot4 [], b @Annot2 @Annot3 [] @Annot4 [], c [][][];\n" +  
+						"		public void foo1(@Annot int @Annot1 [] p @Annot2 @Annot3 [] @Annot3 @Annot2 [] @Annot4 @Annot3 []) {}\n" +
+						"		public void foo2(@Annot int p [][]) {}\n" +
+						"		@Annot String @Annot1 [] foo3() @Annot1 @Annot2 [][] { return null; }\n" + 
+						"	}\n" +
+						"}\n" +
+						"@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n" + 
+						"@interface Annot {}\n" +
+						"@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n" + 
+						"@interface Annot1 {}\n" +
+						"@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n" +
+						"@interface Annot2 {}\n" +
+						"@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n" + 
+						"@interface Annot3 {}\n" +
+						"@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n" +
+						"@interface Annot4 {}";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a type Declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration type = (TypeDeclaration) node;
+		FieldDeclaration field = type.getFields()[0];
+		List fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 3, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		assertExtraDimensionsEqual("Incorrect extra dimensions", fragment.extraDimensions(), "@Annot2 @Annot3 [] @Annot3 @Annot2 [] @Annot4 []");
+		fragment = (VariableDeclarationFragment) fragments.get(1);
+		assertExtraDimensionsEqual("Incorrect extra dimensions", fragment.extraDimensions(), "@Annot2 @Annot3 [] @Annot4 []");		
+		fragment = (VariableDeclarationFragment) fragments.get(2);
+		assertExtraDimensionsEqual("Incorrect extra dimensions", fragment.extraDimensions(), "[] [] []");
+		MethodDeclaration[] methods = type.getMethods();
+		assertEquals("Incorrect no of methods", 3, methods.length);
+		MethodDeclaration method = methods[0];
+		List parameters = method.parameters();
+		assertEquals("Incorrect no of parameters", 1, parameters.size());
+		assertExtraDimensionsEqual("Incorrect extra dimensions", ((SingleVariableDeclaration) parameters.get(0)).extraDimensions(), "@Annot2 @Annot3 [] @Annot3 @Annot2 [] @Annot4 @Annot3 []");
+
+		method = methods[1];
+		parameters = method.parameters();
+		assertEquals("Incorrect no of parameters", 1, parameters.size());
+		assertExtraDimensionsEqual("Incorrect extra dimensions", ((SingleVariableDeclaration) parameters.get(0)).extraDimensions(), "[] []");
+
+		method = methods[2];
+		assertExtraDimensionsEqual("Incorrect extra dimensions", method.extraDimensions(), "@Annot1 @Annot2 [] []");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399600
+	public void test0010() throws JavaModelException {
+		String contents =
+				"import java.lang.annotation.ElementType;\n" +
+						"public class X {\n" +
+						"	@Marker int foo(@Marker(\"Blah\") int z) @Marker [] @Marker [] {\n" +
+						"		return null;\n" +
+						"	}\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" +
+						"@interface Marker {\n" +
+						"	String value() default \"Blah\";\n" +
+						"}";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		assertExtraDimensionsEqual("Incorrect extra dimensions", method.extraDimensions(), "@Marker [] @Marker []");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391894
+	public void test0011() throws JavaModelException {
+		String contents =
+				"import java.lang.annotation.ElementType;\n" +
+				"public class X {\n" +
+				" 	public void foo() {\n" +
+				"		int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [2] @Marker2 @Marker3 [bar()] @Marker3 @Marker []; \n" +  
+				"		int @Marker [][][] j = new @Marker int @Marker3 @Marker [2] @Marker @Marker2 [X.bar2(2)] @Marker2 @Marker3 [];\n" +
+				"	}\n" +
+				"	public int bar() {\n" +
+				"		return 2;\n" +
+				"	}\n" +
+				"	public static int bar2(int k) {\n" +
+				"		return k;\n" +
+				"	}\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker2 {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker3 {}";
+		
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a Method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		List list = method.getBody().statements();
+		assertEquals("Incorrect no of statements", 2, list.size());
+		VariableDeclarationStatement statement1 = (VariableDeclarationStatement) list.get(0);
+		VariableDeclarationStatement statement2 = (VariableDeclarationStatement) list.get(1);
+		list = statement1.fragments();
+		assertEquals("Incorrect no of fragments", 1, list.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) list.get(0);
+		ArrayCreation creation = (ArrayCreation) fragment.getInitializer();
+		Type type = creation.getType();
+		assertEquals("Incorrect type", true, type.isArrayType());
+		checkSourceRange(type, "@Marker2 int @Marker @Marker2 [2] @Marker2 @Marker3 [bar()] @Marker3 @Marker []", contents.toCharArray());
+		Dimension dimension = (Dimension) ((ArrayType) type).dimensions().get(2);
+		assertEquals("Incorrect annotations", "@Marker3 @Marker ", convertAnnotationsList(dimension.annotations()));
+		dimension = (Dimension) ((ArrayType) type).dimensions().get(1);
+		assertEquals("Incorrect annotations", "@Marker2 @Marker3 ", convertAnnotationsList(dimension.annotations()));
+		dimension = (Dimension) ((ArrayType) type).dimensions().get(0);
+		assertEquals("Incorrect annotations", "@Marker @Marker2 ", convertAnnotationsList(dimension.annotations()));
+		List dimensions = creation.dimensions();
+		assertEquals("Incorrect expressions", 2, dimensions.size());
+		assertEquals("Incorrect expressions", "2", dimensions.get(0).toString());
+		assertEquals("Incorrect expressions", "bar()", dimensions.get(1).toString());
+		
+		list = statement2.fragments();
+		assertEquals("Incorrect no of fragments", 1, list.size());
+		fragment = (VariableDeclarationFragment) list.get(0);
+		creation = (ArrayCreation) fragment.getInitializer();
+		checkSourceRange(creation.getType(), "@Marker int @Marker3 @Marker [2] @Marker @Marker2 [X.bar2(2)] @Marker2 @Marker3 []", contents.toCharArray());
+		
+		type = creation.getType();
+		assertEquals("Incorrect type", true, type.isArrayType());
+		dimension = (Dimension) ((ArrayType) type).dimensions().get(2);
+		assertEquals("Incorrect annotations", "@Marker2 @Marker3 ", convertAnnotationsList(dimension.annotations()));
+		dimension = (Dimension) ((ArrayType) type).dimensions().get(1);
+		assertEquals("Incorrect annotations", "@Marker @Marker2 ", convertAnnotationsList(dimension.annotations()));
+		dimension = (Dimension) ((ArrayType) type).dimensions().get(0);
+		assertEquals("Incorrect annotations", "@Marker3 @Marker ", convertAnnotationsList(dimension.annotations()));
+		dimensions = creation.dimensions();
+		assertEquals("Incorrect expressions", 2, dimensions.size());
+		assertEquals("Incorrect expressions", "2", dimensions.get(0).toString());
+		assertEquals("Incorrect expressions", "X.bar2(2)", dimensions.get(1).toString());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391894
+	public void test0012() throws JavaModelException {
+		String contents =
+				"import java.lang.annotation.ElementType;\n" +
+				"public class X {\n" +
+				" 	public void foo() {\n" +
+				"		int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [] @Marker2 @Marker3 [] @Marker3 @Marker [] {{{1, 2, 3}}}; \n" +  
+				"	}\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker2 {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker3 {}";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a Method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		List list = method.getBody().statements();
+		assertEquals("Incorrect no of statements", 1, list.size());
+		VariableDeclarationStatement statement1 = (VariableDeclarationStatement) list.get(0);
+		list = statement1.fragments();
+		assertEquals("Incorrect no of fragments", 1, list.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) list.get(0);
+		ArrayCreation creation = (ArrayCreation) fragment.getInitializer();
+		Type type = creation.getType();
+		assertEquals("Incorrect type", true, type.isArrayType());
+		checkSourceRange(type, "@Marker2 int @Marker @Marker2 [] @Marker2 @Marker3 [] @Marker3 @Marker []", contents.toCharArray());
+		ArrayInitializer initializer = creation.getInitializer();
+		checkSourceRange(initializer, "{{{1, 2, 3}}}", contents.toCharArray());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391894
+	// Force to use JLS4 and confirm malformed flags are set.
+	public void test0021() throws JavaModelException {
+		String contents =
+				"import java.lang.annotation.ElementType;\n" +
+				"public class X {\n" +
+				" 	public void foo() {\n" +
+				"		int @Marker [][][] i = new @Marker2 int @Marker @Marker2 [] @Marker2 @Marker3 [] @Marker3 @Marker [] {{{1, 2, 3}}}; \n" +  
+				"	}\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker2 {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" + 
+				"@interface Marker3 {}";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		CompilationUnit unit = (CompilationUnit) buildAST(getJLS4(), contents, this.workingCopy, true, true, true);
+		
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Not a Method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		List list = method.getBody().statements();
+		assertEquals("Incorrect no of statements", 1, list.size());
+		VariableDeclarationStatement statement1 = (VariableDeclarationStatement) list.get(0);
+		list = statement1.fragments();
+		assertEquals("Incorrect no of fragments", 1, list.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) list.get(0);
+		ArrayCreation creation = (ArrayCreation) fragment.getInitializer();
+		Type type = creation.getType();
+		assertEquals("Incorrect type", true, type.isArrayType());
+		assertEquals("Type should be malformed", ASTNode.MALFORMED, (type.getFlags() & ASTNode.MALFORMED));
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test0013() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0010/X.java",
+				true/* resolve */);
+		String contents = "package test0010;"
+				+ "import java.lang.annotation.Target;\n"
+				+ "public class X implements One<@Marker1 Integer, @Marker2 Boolean> {\n"
+				+ "}\n" 		
+				+ "class Y implements One<@Marker1 @Marker2 Integer, @Marker2 @Marker1 Double> {\n"
+				+ "}\n" 		
+				+ "interface One<T, U> {}\n" 
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker1 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker2 {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		// simple types for generic type arguments to parameterized classes
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 0);
+		Type type = (Type)((ParameterizedType) typedeclaration.superInterfaceTypes().get(0)).typeArguments().get(0);
+		assertTrue(type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		List annotations = simpleType.annotations();
+		assertEquals("wrong number of annotations", 1, annotations.size());
+		assertEquals("@Marker1", annotations.get(0).toString());
+		assertNotNull("No annotation", type);
+		typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		type = (Type)((ParameterizedType) typedeclaration.superInterfaceTypes().get(0)).typeArguments().get(0);
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		annotations = simpleType.annotations();
+		assertEquals("wrong number of annotations", 2, annotations.size());
+		assertEquals("@Marker2", annotations.get(1).toString());
+		assertNotNull("No annotation", type);	
+		type = (Type)((ParameterizedType) typedeclaration.superInterfaceTypes().get(0)).typeArguments().get(1);
+		assertTrue(type.isSimpleType());
+		simpleType = (SimpleType) type;
+		annotations = simpleType.annotations();
+		assertEquals("wrong number of annotations", 2, annotations.size());
+		assertEquals("@Marker1", annotations.get(1).toString());
+		assertNotNull("No annotation", type);	
+	}
+	
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test0014() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0011/X.java",
+				true/* resolve */);
+		String contents = "package test0011;"
+				+ "import java.lang.annotation.Target;\n"
+				+ "public class X {\n"
+				+ "	public void foo() {\n"
+				+ " 	Y y = new <@Marker2 @Marker1 String> Y(new String(\"Hello\"));\n"
+				+ " 	len = y.<@Marker1 @Marker2 String> bar(new String(\"World\"));\n"
+				+ " }\n"
+				+ "	public int len;\n"
+				+ "}\n" 		
+				+ "class Y {\n"
+				+ "	public <T> Y(T t) {\n"
+				+ "		len = t instanceof String ? ((String)t).length() : 0;\n"
+				+ "	}\n"
+				+ "	public <T> int bar(T t) {\n"
+				+ "		return t instanceof String ? ((String)t).length() : len;\n"
+				+ "	}\n"
+				+ " private int len;\n"
+				+ "}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker1 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker2 {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		// simple type for generic type arguments in a generic method or constructor invocation
+		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(cu, 0, 0);
+		List statements = methodDeclaration.getBody().statements();
+		Statement statement = (Statement)statements.get(0);
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement;
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		Type type = (Type) classInstanceCreation.typeArguments().get(0);
+		assertEquals("@Marker2 @Marker1 String", type.toString());
+		assertTrue(type.isSimpleType());
+		SimpleType simpleType = (SimpleType) type;
+		List annotations = simpleType.annotations();
+		assertEquals("wrong number of annotations", 2, annotations.size());
+		assertEquals("@Marker2", annotations.get(0).toString());
+		statement = (Statement) statements.get(1);
+		Assignment assignment  = (Assignment) ((ExpressionStatement)statement).getExpression();
+		expression = assignment.getRightHandSide();
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		simpleType = (SimpleType)methodInvocation.typeArguments().get(0);
+		annotations = simpleType.annotations();
+		assertEquals("wrong number of annotations", 2, annotations.size());
+		assertEquals("@Marker1", annotations.get(0).toString());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test0015() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test0012/X.java",
+				true/* resolve */);
+		String contents = "package test0012;"
+				+ "import java.lang.annotation.Target;\n"
+				+ "import java.io.File;\n"
+				+ "public class X <@Marker1 @Marker3 F extends @Marker1 @Marker2 File> {\n"
+				+ "	public int foo(F f) {\n"
+				+ " 	Y <@Marker2 @Marker3 ? super @Marker1 @Marker2 File> y = new @Marker2 @Marker1 Y<File>();\n"
+				+ "		Outer o = new @Marker1 @Marker2 Outer();\n"	
+				+ "		Outer.Inner inner = o.new @Marker1 @Marker2 Inner();\n"	
+				+  " 	ZZ zz = new <String> @Marker1 @Marker2 ZZ();\n" 
+				+ " 	return f.getName().length() + y.hashCode() + inner.hashCode();\n"
+				+ " }\n"
+				+ "}\n" 		
+				+ "class Y<@Marker3 T> {\n"
+				+ "	public int bar(T t) {\n"
+				+ "		return t instanceof @Marker1 @Marker2 File ? t.toString().length() : 0;\n"
+				+ "	}\n"
+				+ "}\n"
+				+ "class Outer {\n"
+				+ "	public class Inner {\n" 
+				+ "		public class Deeper {\n"
+				+ "		}\n" 
+				+ "	}\n"
+				+ "}\n"
+				+ "class ZZ {\n"
+				+ "public @Marker1 @Marker2 <T> ZZ() {\n"
+				+ "	T t = null;\n"
+				+ "	len =  t instanceof String ? t.hashCode() : 0;\n"
+				+ "}\n"
+				+ "public @Marker1 int  getint(@Marker2 @Marker1 ZZ this) {return len;}\n"
+				+ "public int len;\n"
+				+ "}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker1 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker2 {}\n"
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker3 {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 0);
+		TypeParameter typeParameter = (TypeParameter) typedeclaration.typeParameters().get(0);
+
+		// TypeParameter with TYPE_USE and TYPE_PARAMETER annotation combination.
+		assertEquals("@Marker1 @Marker3 F extends @Marker1 @Marker2 File", typeParameter.toString());
+		assertTrue(typeParameter.annotations().size() == 2);
+		Annotation annotation = (Annotation)typeParameter.annotations().get(1);
+		assertEquals("@Marker3", annotation.toString());
+		IAnnotationBinding abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker3()", abinding.toString());
+
+		// simpletype for type parameter bounds
+		SimpleType simpleType = (SimpleType) typeParameter.typeBounds().get(0);
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker2", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker2()", abinding.toString());
+
+		MethodDeclaration methodDeclaration = (MethodDeclaration) getASTNode(cu, 0, 0);
+		List statements = methodDeclaration.getBody().statements();
+		Statement statement = (Statement)statements.get(0);
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)statement;
+		Type type = variableDeclarationStatement.getType();
+		assertTrue(type.isParameterizedType());
+		type = (Type)((ParameterizedType)type).typeArguments().get(0);
+		assertTrue(type.isWildcardType());
+		
+		// for constructor invocation results 1/4
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("new @Marker2 @Marker1 Y<File>()", expression.toString());
+		simpleType = (SimpleType) ((ParameterizedType)((ClassInstanceCreation)expression).getType()).getType();
+		assertEquals("@Marker2 @Marker1 Y", simpleType.toString());
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker1", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker1()", abinding.toString());
+		
+		// for constructor invocation results 2/4
+		variableDeclarationStatement = (VariableDeclarationStatement) statements.get(1);
+		fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertEquals("new @Marker1 @Marker2 Outer()", expression.toString());
+		simpleType = (SimpleType) ((ClassInstanceCreation)expression).getType();
+		assertEquals("@Marker1 @Marker2 Outer", simpleType.toString());
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker2", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker2()", abinding.toString());
+		
+		// for constructor invocation results 3/4
+		variableDeclarationStatement = (VariableDeclarationStatement) statements.get(2);
+		fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertEquals("o.new @Marker1 @Marker2 Inner()", expression.toString());
+		simpleType = (SimpleType) ((ClassInstanceCreation)expression).getType();
+		assertEquals("@Marker1 @Marker2 Inner", simpleType.toString());
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker2", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker2()", abinding.toString());
+
+		// for constructor invocation results 4/4
+		variableDeclarationStatement = (VariableDeclarationStatement) statements.get(3);
+		fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertEquals("new <String>@Marker1 @Marker2 ZZ()", expression.toString());
+		simpleType = (SimpleType) ((ClassInstanceCreation)expression).getType();
+		assertEquals("@Marker1 @Marker2 ZZ", simpleType.toString());
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker2", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker2()", abinding.toString());
+
+		// annotations on wildcardtypes with TYPE_USE and TYPE_PARAMETER combination.
+		WildcardType wildCardType = (WildcardType) type;
+		assertEquals("@Marker2 @Marker3 ? super @Marker1 @Marker2 File", wildCardType.toString());
+		assertTrue(wildCardType.annotations().size() == 2);
+		annotation = (Annotation) wildCardType.annotations().get(1);
+		assertEquals("@Marker3", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker3()", abinding.toString());
+
+		// simpleType for  wildcard bounds
+		simpleType = (SimpleType) wildCardType.getBound();
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker2", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker2()", abinding.toString());
+
+		// class declaration with TYPE_PARAMETER annotation
+		typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		typeParameter = (TypeParameter) typedeclaration.typeParameters().get(0);
+		assertEquals("@Marker3 T", typeParameter.toString());
+		assertTrue(typeParameter.annotations().size() == 1);
+		annotation = (Annotation)typeParameter.annotations().get(0);
+		assertEquals("@Marker3", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker3()", abinding.toString());
+
+		// for type tests
+		methodDeclaration = (MethodDeclaration) getASTNode(cu, 1, 0);
+		statements = methodDeclaration.getBody().statements();
+		statement = (Statement)statements.get(0);
+		ConditionalExpression conditionalExpression = (ConditionalExpression)((ReturnStatement)statement).getExpression();
+		simpleType = (SimpleType) ((InstanceofExpression)conditionalExpression.getExpression()).getRightOperand();
+		assertEquals("@Marker1 @Marker2 File", simpleType.toString());
+		assertTrue(simpleType.annotations().size() == 2);
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker2", annotation.toString());
+
+		// type annotation in front of a constructor declaration
+		methodDeclaration = (MethodDeclaration) getASTNode(cu, 3, 0);
+		annotation = (Annotation) methodDeclaration.modifiers().get(2);
+		assertEquals("@Marker2", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker2()", abinding.toString());
+
+		// type annotation on "this"
+		methodDeclaration = (MethodDeclaration) getASTNode(cu, 3, 1);
+		simpleType = (SimpleType) methodDeclaration.getReceiverType();
+		assertEquals("@Marker2 @Marker1 ZZ", simpleType.toString());
+		annotation = (Annotation) simpleType.annotations().get(1);
+		assertEquals("@Marker1", annotation.toString());
+		abinding = annotation.resolveAnnotationBinding();
+		assertEquals("@Marker1()", abinding.toString());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test399793a() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399793/X.java",
+				true/* resolve */);
+		String contents = "package test399793;"
+				+ "interface I {\n"
+				+ "	int foo(int x);\n"
+				+ "}\n" 
+				+ "public class X {\n"
+				+ " I i =  vlambda -> {return 200;};\n"
+				+"}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue(expression instanceof LambdaExpression);
+		LambdaExpression lambdaExpression = (LambdaExpression)expression;
+		assertEquals("vlambda -> {\n  return 200;\n}\n", lambdaExpression.toString());
+		assertTrue(lambdaExpression.parameters().size() == 1);
+		IMethodBinding binding = lambdaExpression.resolveMethodBinding();
+		assertEquals("private static int lambda$0(int) ", binding.toString());
+		VariableDeclaration variableDeclaration = (VariableDeclaration) lambdaExpression.parameters().get(0);
+		assertTrue(variableDeclaration instanceof VariableDeclarationFragment);
+		fragment = (VariableDeclarationFragment)variableDeclaration;
+		assertEquals("vlambda", fragment.toString());		
+		IVariableBinding variableBinding = fragment.resolveBinding();		
+		ITypeBinding typeBinding = variableBinding.getType();
+		assertNotNull("Null Binding for lambda argument", typeBinding);
+		assertEquals("binding of int expected for lambda","int",typeBinding.getName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test399793b() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399793/X.java",
+				true/* resolve */);
+		String contents = "package test399793;"
+				+ "interface I {\n"
+				+ "	int foo(int x);\n"
+				+ "}\n" 
+				+ "public class X {\n"
+				+ " I i =  vlambda -> 200;\n"
+				+"}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue(expression instanceof LambdaExpression);
+		LambdaExpression lambdaExpression = (LambdaExpression)expression;
+		assertEquals("vlambda -> 200", lambdaExpression.toString());
+		IMethodBinding binding = lambdaExpression.resolveMethodBinding();
+		assertEquals("private static int lambda$0(int) ", binding.toString());
+		assertTrue(lambdaExpression.parameters().size() == 1);
+		VariableDeclaration variableDeclaration = (VariableDeclaration) lambdaExpression.parameters().get(0);
+		assertTrue(variableDeclaration instanceof VariableDeclarationFragment);
+		fragment = (VariableDeclarationFragment)variableDeclaration;
+		assertEquals("vlambda", fragment.toString());		
+	}
+	
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test399793c() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399793/X.java",
+				true/* resolve */);
+		String contents = "package test399793;"
+				+ "interface I {\n"
+				+ "	Object foo(int [] ia);\n"
+				+ "}\n" 
+				+ "public class X {\n"
+				+ " I i = (int [] ia) ->{\n"
+				+ "  	return ia.clone();"
+				+ "};\n"
+				+"}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue(expression instanceof LambdaExpression);
+		LambdaExpression lambdaExpression = (LambdaExpression)expression;
+		assertEquals("(int [] ia) -> {\n  return ia.clone();\n}\n", lambdaExpression.toString());
+		IMethodBinding binding = lambdaExpression.resolveMethodBinding();
+		assertEquals("private static java.lang.Object lambda$0(int[]) ", binding.toString());
+		assertTrue(lambdaExpression.parameters().size() == 1);
+		VariableDeclaration variableDeclaration = (VariableDeclaration) lambdaExpression.parameters().get(0);
+		assertTrue(variableDeclaration instanceof SingleVariableDeclaration);
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration)variableDeclaration;
+		assertEquals("int [] ia", singleVariableDeclaration.toString());		
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test399793d() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399793/X.java",
+				true/* resolve */);
+		String contents = "package test399793;" +
+				"interface I {\n" +
+				"	void doit();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"		I i = () -> {\n" +
+				"			System.out.println(this);\n" +
+				"			I j = () -> {\n" +
+				"				System.out.println(this);\n" +
+				"				I k = () -> {\n" +
+				"					System.out.println(this);\n" +
+				"				};\n" +
+				"			};\n" +
+				"		};\n" +
+				"	}\n"; 
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertEquals("test399793.I i", variableBinding.toString());
+		Expression expression = fragment.getInitializer();
+		assertTrue(expression instanceof LambdaExpression);
+		LambdaExpression lambdaExpression = (LambdaExpression)expression;
+		assertEquals("() -> {\n  System.out.println(this);\n  I j=() -> {\n    System.out.println(this);\n    I k=() -> {\n      System.out.println(this);\n    }\n;\n  }\n;\n}\n", lambdaExpression.toString());
+		IMethodBinding binding = lambdaExpression.resolveMethodBinding();
+		assertEquals("private void lambda$0() ", binding.toString());
+		assertTrue(lambdaExpression.parameters().size() == 0);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794
+	 * ReferenceExpression Family Tests
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test399794() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399794/X.java",
+				true/* resolve */);
+		String contents = "package test399794;" +
+				"import java.lang.annotation.*;\n " +
+				"interface I {\n" +
+				"    Object copy(int [] ia);\n" +
+				"}\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class XX {\n" +
+				"	public  void foo(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"class Y {\n" +
+				"       static class Z {\n" +
+				"               public static void foo(int x) {\n" +
+				"                       System.out.print(x);\n" +
+				"               }\n" +
+				"       }\n" +
+				"       public void foo(int x) {\n" +
+				"               System.out.print(x);\n" +
+				"       }\n" +
+				"		public <T> void foo(T t){t.hashCode();}\n" +
+				"}\n" +
+				"\n" +
+				"public class X extends XX {\n" +
+				"       @SuppressWarnings(\"unused\")\n" +
+				"       public  void bar(String [] args) {\n" +
+				"                Y y = new Y();\n" +
+				"                I i = @Marker int []::<String>clone;\n" +
+				"                J j = Y.@Marker Z  :: foo;\n" +
+				"                J j1 = Y.@Marker Z  :: <String> foo;\n" +
+				"                J jdash = @Marker W<@Marker Integer> :: <String> new ;\n" +
+				"                J jj = y :: foo;\n" +
+				"                J jx = super ::  foo;\n" +
+				"		 	     class Z {\n" +
+				"					void foo() {\n" +
+				"						J jz = X.super :: foo;\n" +
+		    	"					}\n" +
+				"				}\n" +		
+				"       }\n" +
+				"       public static void main (String [] args) {}\n" +
+				"}\n" +
+				"class W<T> extends Y {\n" +
+				"       public W(T x) {}\n" +
+				"}\n" +
+				"\n" +
+				"@Target (ElementType.TYPE_USE)\n" +
+				"@interface Marker {}";
+			
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) getASTNode(cu, 4);
+		MethodDeclaration method = typeDeclaration.getMethods()[0];
+		List statements = method.getBody().statements();
+		assertTrue(statements.size() == 8);
+		int fCount = 1;
+		
+		// type method reference with primitive type with type arguments
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(fCount++);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue(expression instanceof TypeMethodReference);
+		TypeMethodReference typeMethodReference = (TypeMethodReference) expression;
+		checkSourceRange(typeMethodReference, "@Marker int []::<String>clone", contents);
+		ITypeBinding typeBinding = typeMethodReference.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		IMethodBinding methodBinding = typeMethodReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		Type type = typeMethodReference.getType();
+		checkSourceRange(type, "@Marker int []", contents);
+		assertTrue(type.isArrayType());
+		List typeArguments = typeMethodReference.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		checkSourceRange(type, "String", contents);
+		assertTrue(type.isSimpleType());
+		SimpleName name = typeMethodReference.getName();
+		checkSourceRange(name, "clone", contents);
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull(typeBinding);
+
+		// type method reference with qualified type without type arguments
+		statement = (VariableDeclarationStatement) statements.get(fCount++);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertTrue(expression instanceof TypeMethodReference);
+		typeMethodReference = (TypeMethodReference) expression;
+		checkSourceRange(typeMethodReference, "Y.@Marker Z  :: foo", contents);
+		typeBinding = typeMethodReference.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		methodBinding = typeMethodReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		type = typeMethodReference.getType();
+		assertTrue(type.isQualifiedType());
+		checkSourceRange(type, "Y.@Marker Z", contents);
+		typeArguments = typeMethodReference.typeArguments();
+		assertTrue(typeArguments.size() == 0);
+		name = typeMethodReference.getName();
+		checkSourceRange(name, "foo", contents);
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull(typeBinding);
+
+		// type method reference with qualified type with type arguments
+		statement = (VariableDeclarationStatement) statements.get(fCount++);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertTrue(expression instanceof TypeMethodReference);
+		typeMethodReference = (TypeMethodReference) expression;
+		checkSourceRange(typeMethodReference, "Y.@Marker Z  :: <String> foo", contents);
+		typeBinding = typeMethodReference.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		methodBinding = typeMethodReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		type = typeMethodReference.getType();
+		assertTrue(type.isQualifiedType());
+		checkSourceRange(type, "Y.@Marker Z", contents);
+		typeArguments = typeMethodReference.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertTrue(type.isSimpleType());
+		checkSourceRange(type, "String", contents);
+		name = typeMethodReference.getName();
+		checkSourceRange(name, "foo", contents);
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull(typeBinding);
+
+		// creation method reference
+		statement = (VariableDeclarationStatement) statements.get(fCount++);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertTrue(expression instanceof CreationReference);
+		CreationReference creationReference = (CreationReference) expression;
+		checkSourceRange(creationReference, "@Marker W<@Marker Integer> :: <String> new", contents);
+		typeBinding = creationReference.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		methodBinding = creationReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		type = creationReference.getType();
+		checkSourceRange(type, "@Marker W<@Marker Integer>", contents);
+		assertTrue(type instanceof ParameterizedType);
+		assertASTNodeEquals("@Marker W<@Marker Integer>", type);
+		typeArguments = creationReference.typeArguments();
+		assertTrue(typeArguments.size() == 1);
+		type = (Type) typeArguments.get(0);
+		assertTrue(type.isSimpleType());
+		checkSourceRange(type, "String", contents);
+
+		// expression method reference
+		statement = (VariableDeclarationStatement) statements.get(fCount++);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertTrue(expression instanceof ExpressionMethodReference);
+		ExpressionMethodReference expressionMethodReference = (ExpressionMethodReference) expression;
+		checkSourceRange(expressionMethodReference, "y :: foo", contents);
+		typeBinding = expressionMethodReference.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		methodBinding = expressionMethodReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		Expression lhs = expressionMethodReference.getExpression();
+		checkSourceRange(lhs, "y", contents);
+		typeArguments = expressionMethodReference.typeArguments();
+		assertTrue(typeArguments.size() == 0);
+		name = expressionMethodReference.getName();
+		checkSourceRange(name, "foo", contents);
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull(typeBinding);
+
+		// super method reference without qualifier
+		statement = (VariableDeclarationStatement) statements.get(fCount++);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertTrue(expression instanceof SuperMethodReference);
+		SuperMethodReference superMethodReference = (SuperMethodReference) expression;
+		checkSourceRange(superMethodReference, "super ::  foo", contents);
+		typeBinding = superMethodReference.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		methodBinding = superMethodReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		assertNull(superMethodReference.getQualifier());		
+		typeArguments = superMethodReference.typeArguments();
+		assertTrue(typeArguments.size() == 0);
+		name = superMethodReference.getName();
+		checkSourceRange(name, "foo", contents);
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull(typeBinding);
+
+		// super method reference with qualifier
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) statements.get(fCount);
+		typeDeclaration = (TypeDeclaration) typeDeclarationStatement.getDeclaration();
+		method = typeDeclaration.getMethods()[0];
+		statements = method.getBody().statements();
+		assertTrue(statements.size() == 1);
+		statement = (VariableDeclarationStatement) statements.get(0);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertTrue(expression instanceof SuperMethodReference);
+		superMethodReference = (SuperMethodReference) expression;
+		checkSourceRange(superMethodReference, "X.super :: foo", contents);
+		typeBinding = superMethodReference.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		methodBinding = superMethodReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		name = (SimpleName) superMethodReference.getQualifier();
+		checkSourceRange(name, "X", contents);		
+		typeArguments = superMethodReference.typeArguments();
+		assertTrue(typeArguments.size() == 0);
+		name = superMethodReference.getName();
+		checkSourceRange(name, "foo", contents);
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull(typeBinding);
+	
+	}
+	
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test399793e() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399793/X.java",
+				true/* resolve */);
+		String contents = "package test399793;" +
+				"interface I {\n" +
+				"  J foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"  int foo();\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    I I = () -> () -> 10;\n" +
+				"}\n";
+			
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 2);
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue(expression instanceof LambdaExpression);
+		LambdaExpression lambdaExpression = (LambdaExpression)expression;
+		assertEquals("() -> () -> 10", lambdaExpression.toString());
+		IMethodBinding binding = lambdaExpression.resolveMethodBinding();
+		assertEquals("private static test399793.J lambda$0() ", binding.toString());
+		assertTrue(lambdaExpression.parameters().size() == 0);
+	}	
+	
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=402665
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test402665a() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test402665/X.java",
+				true/* resolve */);
+		String contents = "package test402665;" +
+				"public class X {\n" +
+				"  public static interface StringToInt {\n" +
+				"   	int stoi(String s);\n" +
+				"  }\n" +
+				"  public static interface ReduceInt {\n" +
+				"      int reduce(int a, int b);\n" +
+				"  }\n" +
+				"  void foo(StringToInt s) { }\n" +
+				"  void bar(ReduceInt r) { }\n" +
+				"  void bar() {\n" +
+				"      foo(s -> s.length());\n" +
+				"      foo((s) -> s.length());\n" +
+				"      foo((String s) -> s.length()); //SingleVariableDeclaration is OK\n" +
+				"      bar((x, y) -> x+y);\n" +
+				"      bar((int x, int y) -> x+y); //SingleVariableDeclarations are OK\n" +
+				"  }\n" +
+				"}\n";
+			
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 0);
+		MethodDeclaration methoddecl = (MethodDeclaration)typedeclaration.bodyDeclarations().get(4);
+		List statements = methoddecl.getBody().statements();
+		int sCount = 0;
+		
+		ExpressionStatement statement = (ExpressionStatement)statements.get(sCount++);
+		MethodInvocation methodInvocation = (MethodInvocation)statement.getExpression();
+		LambdaExpression lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)lambdaExpression.parameters().get(0);
+		checkSourceRange(fragment, "s", contents);
+		
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		fragment = (VariableDeclarationFragment)lambdaExpression.parameters().get(0);
+		checkSourceRange(fragment, "s", contents);
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		SingleVariableDeclaration singleVarDecl = (SingleVariableDeclaration)lambdaExpression.parameters().get(0);
+		checkSourceRange(singleVarDecl, "String s", contents);
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		fragment = (VariableDeclarationFragment)lambdaExpression.parameters().get(0);
+		checkSourceRange(fragment, "x", contents);
+		fragment = (VariableDeclarationFragment)lambdaExpression.parameters().get(1);
+		checkSourceRange(fragment, "y", contents);
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		singleVarDecl = (SingleVariableDeclaration)lambdaExpression.parameters().get(0);
+		checkSourceRange(singleVarDecl, "int x", contents);
+		singleVarDecl = (SingleVariableDeclaration)lambdaExpression.parameters().get(1);
+		checkSourceRange(singleVarDecl, "int y", contents);
+	}
+	public void testBug403132() throws JavaModelException {
+		String contents =
+			"import java.lang.annotation.*;\n" +
+			"public class X {\n" +
+			"	class Y {\n" +
+			"		class Z {\n" +
+			"			public Z(@A X.@B Y Y.this,String str){\n}" +
+			"    	 	public void foo(@A X.@B Y.@C Z this,String str){\n}\n" +
+			"		}\n" +
+			"    }\n" +
+			"}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface A {}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface B {}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface C {}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		TypeDeclaration type = (TypeDeclaration)node;
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		type = (TypeDeclaration) node;
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		Type receiver = method.getReceiverType();
+		assertEquals("Not a qualified type", ASTNode.QUALIFIED_TYPE, receiver.getNodeType());
+		assertEquals("Incorrect receiver", "@A X.@B Y", ((QualifiedType) receiver).toString());
+		assertEquals("Incorrect method signature", "public Z(@A X.@B Y Y.this,String str){\n}\n", method.toString());
+
+		method = (MethodDeclaration) type.bodyDeclarations().get(1);
+		receiver = method.getReceiverType();
+		assertEquals("Incorrect receiver", "@A X.@B Y.@C Z", ((QualifiedType) receiver).toString());
+		assertEquals("Incorrect method signature", "public void foo(@A X.@B Y.@C Z this,String str){\n}\n", method.toString());
+	}
+	public void testParameterizedReceiverType() throws JavaModelException {
+		String contents =
+				"import java.lang.annotation.*;\n" +
+						"public class X<T extends Exception> {\n" +
+						"	class Y<K, V> {\n" +
+						"		class Z {\n" +
+//TODO: bad AST node structure, see https://bugs.eclipse.org/419974#c2 :
+//						"			public Z(@A X<T>.@B Y<K, V> Y.this){ }\n" +
+//						"			public void foo(@B Y<K, V>.@C Z this){ }\n" +
+						"			public Z(X<T>.@B Y<K, V> Y.this){ }\n" +
+						"			public void foo(Y<K, V>.@C Z this){ }\n" +
+						"		}\n" +
+						"	}\n" +
+						"}\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface A {}\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface B {}\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface C {}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		TypeDeclaration type = (TypeDeclaration)node;
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		type = (TypeDeclaration) node;
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		Type receiver = method.getReceiverType();
+//TODO: bad AST node structure, see https://bugs.eclipse.org/419974#c2 :
+//		assertEquals("Incorrect receiver", "@A X<T>.@B Y<K,V>", ((QualifiedType) receiver).toString());
+//		assertEquals("Incorrect method signature", "public Z(@A X<T>.@B Y<K,V> Y.this){\n}\n", method.toString());
+		assertEquals("Incorrect receiver", "X<T>.@B Y<K,V>", ((ParameterizedType) receiver).toString());
+		assertEquals("Incorrect method signature", "public Z(X<T>.@B Y<K,V> Y.this){\n}\n", method.toString());
+		
+		method = (MethodDeclaration) type.bodyDeclarations().get(1);
+		receiver = method.getReceiverType();
+//TODO: bad AST node structure, see https://bugs.eclipse.org/419974#c2 :
+//		assertEquals("Incorrect receiver", "@B Y<K,V>.@C Z", ((QualifiedType) receiver).toString());
+//		assertEquals("Incorrect method signature", "public void foo(@B Y<K,V>.@C Z this){\n}\n", method.toString());
+		assertEquals("Incorrect receiver", "Y<K,V>.@C Z", ((QualifiedType) receiver).toString());
+		assertEquals("Incorrect method signature", "public void foo(Y<K,V>.@C Z this){\n}\n", method.toString());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=403410
+	public void testBug403410() throws JavaModelException {
+		String contents =
+			"import java.lang.annotation.*;\n" +
+			"public class X {\n" +
+			"	class Y {\n" +
+			"		class Z {\n" +
+			"			public Z(final Y Y.this){\n}" +
+			"    	 	public void foo(static @A Z this){\n}\n" +
+			"		}\n" +
+			"    }\n" +
+			"}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface A {}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", false);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0, 0);
+		TypeDeclaration type = (TypeDeclaration)node;
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		type = (TypeDeclaration) node;
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		assertEquals("Type should be malformed", ASTNode.MALFORMED, (method.getFlags() & ASTNode.MALFORMED));
+
+		method = (MethodDeclaration) type.bodyDeclarations().get(1);
+		assertEquals("Type should be malformed", ASTNode.MALFORMED, (method.getFlags() & ASTNode.MALFORMED));
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=402674
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test402674() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test402674/X.java",
+				true/* resolve */);
+		String contents = "package test402674;" +
+				"public class X {\n" +
+				"  public static interface StringToInt {\n" +
+				"   	int stoi(String s);\n" +
+				"  }\n" +
+				"  public static interface ReduceInt {\n" +
+				"      int reduce(int a, int b);\n" +
+				"  }\n" +
+				"  void foo(StringToInt s) { }\n" +
+				"  void bar(ReduceInt r) { }\n" +
+				"  void bar() {\n" +
+				"      foo(s -> s.length());\n" +
+				"      foo((s) -> s.length());\n" +
+				"      foo((String s) -> s.length()); //SingleVariableDeclaration is OK\n" +
+				"      bar((x, y) -> x+y);\n" +
+				"      bar((int x, int y) -> x+y); //SingleVariableDeclarations are OK\n" +
+				"  }\n" +
+				"}\n";
+			
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 0);
+		MethodDeclaration methoddecl = (MethodDeclaration)typedeclaration.bodyDeclarations().get(4);
+		List statements = methoddecl.getBody().statements();
+		int sCount = 0;
+		
+		ExpressionStatement statement = (ExpressionStatement)statements.get(sCount++);
+		MethodInvocation methodInvocation = (MethodInvocation)statement.getExpression();
+		LambdaExpression lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		ITypeBinding binding = lambdaExpression.resolveTypeBinding();
+		assertNotNull(binding);
+		assertEquals("StringToInt", binding.getName());
+		
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		binding = lambdaExpression.resolveTypeBinding();
+		assertNotNull(binding);
+		assertEquals("StringToInt", binding.getName());
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		binding = lambdaExpression.resolveTypeBinding();
+		assertNotNull(binding);
+		assertEquals("StringToInt", binding.getName());
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		binding = lambdaExpression.resolveTypeBinding();
+		assertNotNull(binding);
+		assertEquals("ReduceInt", binding.getName());
+
+		statement = (ExpressionStatement)statements.get(sCount++);
+		methodInvocation = (MethodInvocation)statement.getExpression();
+		lambdaExpression = (LambdaExpression) methodInvocation.arguments().get(0);
+		binding = lambdaExpression.resolveTypeBinding();
+		assertNotNull(binding);
+		assertEquals("ReduceInt", binding.getName());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399791
+	public void testBug399791() throws JavaModelException {
+		String contents =
+			"public interface X {\n" +
+			"	static void foo(){}\n" +
+			"   public default void foo(int i){}\n" +
+			"   native void foo(float f){}\n" +
+			"   abstract void foo(long l){}\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", false);
+		ASTNode node = buildAST(contents, this.workingCopy, false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		assertEquals("Method should not be malformed", 0, (method.getFlags() & ASTNode.MALFORMED));
+		List modifiers = method.modifiers();
+		assertEquals("Incorrect no of modfiers", 1, modifiers.size());
+		Modifier modifier = (Modifier) modifiers.get(0);
+		assertSame("Incorrect modifier keyword", Modifier.ModifierKeyword.STATIC_KEYWORD, modifier.getKeyword());
+
+		method = (MethodDeclaration) type.bodyDeclarations().get(1);
+		assertEquals("Method should not be malformed", 0, (method.getFlags() & ASTNode.MALFORMED));
+
+		modifiers = method.modifiers();
+		assertEquals("Incorrect no of modfiers", 2, modifiers.size());
+		modifier = (Modifier) modifiers.get(1);
+		assertSame("Incorrect modifier keyword", Modifier.ModifierKeyword.DEFAULT_KEYWORD, modifier.getKeyword());
+		assertTrue("Incorrect modifier", modifier.isDefault());
+		assertEquals("Incorrect AST", "public default void foo(int i){\n}\n", method.toString());
+
+		method = (MethodDeclaration) type.bodyDeclarations().get(2);
+		assertEquals("Method should be malformed", ASTNode.MALFORMED, (method.getFlags() & ASTNode.MALFORMED));
+
+		method = (MethodDeclaration) type.bodyDeclarations().get(3);
+		assertEquals("Method should be malformed", ASTNode.MALFORMED, (method.getFlags() & ASTNode.MALFORMED));
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=404489
+	public void testBug404489a() throws JavaModelException {
+		String contents =
+		"package test404489.bug;\n" +
+		"public class X { \n" +
+		"	class Y { \n" +
+		"		class Z {\n" +
+		"			public Z(@A X.@B Y Y.this){}\n" +
+		"			}\n" +
+		"  		}\n" +
+		"  		Object o=(@A X.@B Y.@Marker  Z)null;\n" +
+		"	}\n" +
+		"@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {} \n" +
+		"@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface A {} \n" +
+		"@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface B {} \n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/test404489/bug/X.java", true/* resolve */);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		assertEquals("Not a Type Declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		node = (ASTNode) ((TypeDeclaration)node).bodyDeclarations().get(0);
+		assertEquals("Not a Type Declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		node = (ASTNode) ((TypeDeclaration)node).bodyDeclarations().get(0);		
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		assertEquals("Method should not be malformed", 0, (method.getFlags() & ASTNode.MALFORMED));
+		Type annotatableType = method.getReceiverType();
+		assertTrue(annotatableType.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) annotatableType;
+		assertEquals("wrong qualified type", "@A X.@B Y", qualifiedType.toString());
+		ITypeBinding binding = qualifiedType.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test404489.bug.X.Y", binding.getQualifiedName());
+		SimpleType simpleType = (SimpleType) qualifiedType.getQualifier();
+		assertEquals("incorrect type", "@A X", simpleType.toString());
+		binding = simpleType.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test404489.bug.X", binding.getQualifiedName());
+		List annotations = qualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		MarkerAnnotation marker	= (MarkerAnnotation) annotations.get(0);
+		assertEquals("wrong annotation name", "@B", marker.toString());
+		binding = marker.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test404489.bug.B", binding.getQualifiedName());
+		IAnnotationBinding annotationBinding = marker.resolveAnnotationBinding();
+		assertNotNull(annotationBinding);
+		assertEquals("wrong annotation binding", "B", annotationBinding.getName());
+		Name name = marker.getTypeName();
+		assertTrue(name.isSimpleName());
+		SimpleName simpleName = (SimpleName) name;
+		assertEquals("wrong type name", "B", simpleName.toString());
+		assertEquals("wrong simple name", "B",simpleName.getIdentifier());
+		binding = simpleName.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test404489.bug.B", binding.getQualifiedName());
+		assertTrue(qualifiedType.getQualifier().isSimpleType());
+		simpleType = (SimpleType) qualifiedType.getQualifier();
+		assertEquals("incorrect type", "@A X", simpleType.toString());
+		binding = simpleType.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong qualified name", "test404489.bug.X", binding.getQualifiedName());
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=404489
+	public void testBug404489b() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter18" , "src", "test404489.bug", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runConversion(this.ast.apiLevel(), sourceUnit, 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, 0);
+		TypeDeclaration typeDeclaration =  (TypeDeclaration) compilationUnit.types().get(0);
+
+		node = (ASTNode) typeDeclaration.bodyDeclarations().get(2);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());		
+		MethodDeclaration methodDecl = (MethodDeclaration) node;
+		Type type = methodDecl.getReturnType2();
+		assertTrue(type.isPackageQualifiedType());
+		PackageQualifiedType packageQualifiedType = (PackageQualifiedType) type;
+		checkSourceRange(packageQualifiedType, "test404489.bug.@NonNull IOException", source);
+		ITypeBinding typeBinding = packageQualifiedType.resolveBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.IOException", typeBinding.getQualifiedName());
+		
+		// qualifier of the package qualified type
+		Name name = packageQualifiedType.getQualifier();
+		assertTrue(name.isQualifiedName());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		checkSourceRange(qualifiedName, "test404489.bug", source);
+		typeBinding = qualifiedName.resolveTypeBinding();
+		assertNull(typeBinding);
+		IBinding binding = qualifiedName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		name = qualifiedName.getQualifier();
+		assertTrue("wrong name type", name.isSimpleName());
+		SimpleName simpleName = (SimpleName) name;
+		checkSourceRange(simpleName, "test404489", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489", binding.toString());
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "bug", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		
+		// annotations of package qualified type
+		List annotations = packageQualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		Annotation annotation = (Annotation) annotations.get(0);
+		typeBinding = annotation.resolveTypeBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.X.NonNull", typeBinding.getQualifiedName());
+		IAnnotationBinding annotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("not a valid annotation binding", "@NonNull()", annotationBinding.toString());
+		name = annotation.getTypeName();
+		assertTrue(name.isSimpleName());
+		simpleName = (SimpleName) name;
+		typeBinding = simpleName.resolveTypeBinding();
+		checkSourceRange(simpleName, "NonNull", source);
+		assertNotNull(typeBinding);
+		
+		// name of the package qualified type
+		simpleName = packageQualifiedType.getName();
+		checkSourceRange(simpleName, "IOException", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		
+		// parameter
+		SingleVariableDeclaration param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+		type = param.getType();
+		assertTrue(type.isPackageQualifiedType());
+		packageQualifiedType = (PackageQualifiedType) type;
+		checkSourceRange(packageQualifiedType, "test404489.bug.@NonNull FileNotFoundException", source);
+		typeBinding = packageQualifiedType.resolveBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.FileNotFoundException", typeBinding.getQualifiedName());
+		
+		// qualifier of the package qualified type
+		name = packageQualifiedType.getQualifier();
+		assertTrue(name.isQualifiedName());
+		qualifiedName = (QualifiedName) name;
+		checkSourceRange(qualifiedName, "test404489.bug", source);
+		typeBinding = qualifiedName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = qualifiedName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		name = qualifiedName.getQualifier();
+		assertTrue("wrong name type", name.isSimpleName());
+		simpleName = (SimpleName) name;
+		checkSourceRange(simpleName, "test404489", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489", binding.toString());
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "bug", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		
+		// annotations of package qualified type
+		annotations = packageQualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		typeBinding = annotation.resolveTypeBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.X.NonNull", typeBinding.getQualifiedName());
+		annotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("not a valid annotation binding", "@NonNull()", annotationBinding.toString());
+		name = annotation.getTypeName();
+		assertTrue(name.isSimpleName());
+		simpleName = (SimpleName) name;
+		typeBinding = simpleName.resolveTypeBinding();
+		checkSourceRange(simpleName, "NonNull", source);
+		assertNotNull(typeBinding);
+		
+		// name of the package qualified type
+		simpleName = packageQualifiedType.getName();
+		checkSourceRange(simpleName, "FileNotFoundException", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		
+		// throws
+		type = (Type) methodDecl.thrownExceptionTypes().get(0);
+		assertTrue(type.isPackageQualifiedType());
+		packageQualifiedType = (PackageQualifiedType) type;
+		checkSourceRange(packageQualifiedType, "test404489.bug.@NonNull EOFException", source);
+		typeBinding = packageQualifiedType.resolveBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.EOFException", typeBinding.getQualifiedName());
+		
+		// qualifier of the package qualified type
+		name = packageQualifiedType.getQualifier();
+		assertTrue(name.isQualifiedName());
+		qualifiedName = (QualifiedName) name;
+		checkSourceRange(qualifiedName, "test404489.bug", source);
+		typeBinding = qualifiedName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = qualifiedName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		name = qualifiedName.getQualifier();
+		assertTrue("wrong name type", name.isSimpleName());
+		simpleName = (SimpleName) name;
+		checkSourceRange(simpleName, "test404489", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489", binding.toString());
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "bug", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		
+		// annotations of package qualified type
+		annotations = packageQualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		typeBinding = annotation.resolveTypeBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.X.NonNull", typeBinding.getQualifiedName());
+		annotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("not a valid annotation binding", "@NonNull()", annotationBinding.toString());
+		name = annotation.getTypeName();
+		assertTrue(name.isSimpleName());
+		simpleName = (SimpleName) name;
+		typeBinding = simpleName.resolveTypeBinding();
+		checkSourceRange(simpleName, "NonNull", source);
+		assertNotNull(typeBinding);
+		
+		// name of the package qualified type
+		simpleName = packageQualifiedType.getName();
+		checkSourceRange(simpleName, "EOFException", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull(typeBinding);
+
+		node = (ASTNode) typeDeclaration.bodyDeclarations().get(3);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());		
+		FieldDeclaration field = (FieldDeclaration) node;
+		type = field.getType();
+		assertTrue(type.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type;
+		packageQualifiedType = (PackageQualifiedType)qualifiedType.getQualifier();
+		checkSourceRange(packageQualifiedType, "test404489.bug.@NonNull X", source);
+		typeBinding = packageQualifiedType.resolveBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.X", typeBinding.getQualifiedName());
+		name = packageQualifiedType.getName();
+		assertSame("bindings different for package qualified type and assocated name", typeBinding, name.resolveTypeBinding());
+		
+		// qualifier of the package qualified type
+		name = packageQualifiedType.getQualifier();
+		assertTrue(name.isQualifiedName());
+		qualifiedName = (QualifiedName) name;
+		checkSourceRange(qualifiedName, "test404489.bug", source);
+		typeBinding = qualifiedName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = qualifiedName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		name = qualifiedName.getQualifier();
+		assertTrue("wrong name type", name.isSimpleName());
+		simpleName = (SimpleName) name;
+		checkSourceRange(simpleName, "test404489", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489", binding.toString());
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "bug", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNull(typeBinding);
+		binding = simpleName.resolveBinding();
+		assertTrue("not a package binding", binding.getKind() == IBinding.PACKAGE);
+		assertEquals("wrong package binding", "package test404489.bug", binding.toString());
+		
+		// annotations of package qualified type
+		annotations = packageQualifiedType.annotations();
+		assertTrue(annotations.size() == 1);
+		annotation = (Annotation) annotations.get(0);
+		typeBinding = annotation.resolveTypeBinding();
+		assertNotNull("null binding", typeBinding);
+		assertEquals("not a valid binding", "test404489.bug.X.NonNull", typeBinding.getQualifiedName());
+		annotationBinding = annotation.resolveAnnotationBinding();
+		assertEquals("not a valid annotation binding", "@NonNull()", annotationBinding.toString());
+		name = annotation.getTypeName();
+		assertTrue(name.isSimpleName());
+		simpleName = (SimpleName) name;
+		typeBinding = simpleName.resolveTypeBinding();
+		checkSourceRange(simpleName, "NonNull", source);
+		assertNotNull(typeBinding);
+		
+		// name of the package qualified type
+		simpleName = packageQualifiedType.getName();
+		checkSourceRange(simpleName, "X", source);
+		typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399792
+	public void testBug399792() throws JavaModelException {
+		String content =
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.io.Serializable;\n" +
+				"public class X {\n" +
+				"      Object o = (@Marker1 @Marker2 Serializable & I & @Marker3 @Marker1 J) () -> {};" +
+				"      public Serializable main(Object o) {\n" +
+				"    	  Serializable oo = (Serializable & @Marker3 @Marker1 @Marker2 I & J) o;\n" +
+				"    	  return oo;\n" +
+				"      }\n" +
+				"}\n" +
+				"interface I {\n" +
+				"  public void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"  public void foo();\n" +
+				"  public void bar();\n" +
+				"}\n" +
+				"interface K {\n" +
+				"  public void foo();\n" +
+				"  public void bar();\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n" +
+				"@java.lang.annotation.Target (ElementType.TYPE_USE)\n" +
+				"@interface Marker3 {}";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", false);
+		ASTNode node = buildAST(content, this.workingCopy, false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		node = (ASTNode) type.bodyDeclarations().get(0);
+		assertEquals("Not a field Declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration field = (FieldDeclaration) node;
+		assertEquals("Field should not be malformed", 0, (field.getFlags() & ASTNode.MALFORMED));
+
+		List fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		CastExpression cast = (CastExpression) fragment.getInitializer();
+		Type castType = cast.getType();
+		assertEquals("Not an intersection cast type", ASTNode.INTERSECTION_TYPE, castType.getNodeType());
+		assertTrue("Not an intersection cast type", castType.isIntersectionType());
+		assertEquals("Type should not be malformed", 0, (castType.getFlags() & ASTNode.MALFORMED));
+
+		List intersectionTypes = ((IntersectionType) castType).types();
+		assertEquals("Incorrect no of types", 3, intersectionTypes.size());
+		castType = (Type) intersectionTypes.get(0);
+		assertEquals("Incorrect type", ASTNode.SIMPLE_TYPE, castType.getNodeType());
+		SimpleName name = (SimpleName) ((SimpleType) castType).getName();
+		assertEquals("Incorrect name", "Serializable", name.getIdentifier());
+
+		List annotations = ((SimpleType) castType).annotations();
+		assertEquals("Incorrect no of annotations", 2, annotations.size());
+		assertEquals("Incorrect receiver", "@Marker1 @Marker2 Serializable", castType.toString());
+
+		castType = (Type) intersectionTypes.get(1);
+		assertEquals("Incorrect type", ASTNode.SIMPLE_TYPE, castType.getNodeType());
+		name = (SimpleName) ((SimpleType) castType).getName();
+		assertEquals("Incorrect name", "I", name.getIdentifier());
+
+		annotations = ((SimpleType) castType).annotations();
+		assertEquals("Incorrect no of annotations", 0, annotations.size());
+		assertEquals("Incorrect receiver", "I", castType.toString());
+
+		castType = (Type) intersectionTypes.get(2);
+		assertEquals("Incorrect type", ASTNode.SIMPLE_TYPE, castType.getNodeType());
+		name = (SimpleName) ((SimpleType) castType).getName();
+		assertEquals("Incorrect name", "J", name.getIdentifier());
+
+		annotations = ((SimpleType) castType).annotations();
+		assertEquals("Incorrect no of annotations", 2, annotations.size());
+		assertEquals("Incorrect receiver", "@Marker3 @Marker1 J", castType.toString());
+
+		node = (ASTNode) type.bodyDeclarations().get(1);
+		assertEquals("Not a method Declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration method = (MethodDeclaration) node;
+		assertEquals("Method should not be malformed", 0, (method.getFlags() & ASTNode.MALFORMED));
+		
+		List statements = method.getBody().statements();
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(0);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		cast = (CastExpression) fragment.getInitializer();
+		castType = cast.getType();
+		
+		intersectionTypes = ((IntersectionType) castType).types();
+		assertEquals("Incorrect no of types", 3, intersectionTypes.size());
+		castType = (Type) intersectionTypes.get(0);
+
+		annotations = ((SimpleType) castType).annotations();
+		assertEquals("Incorrect no of annotations", 0, annotations.size());
+		assertEquals("Incorrect receiver", "Serializable", castType.toString());
+
+		castType = (Type) intersectionTypes.get(1);
+		annotations = ((SimpleType) castType).annotations();
+		assertEquals("Incorrect no of annotations", 3, annotations.size());
+		assertEquals("Incorrect receiver", "@Marker3 @Marker1 @Marker2 I", castType.toString());
+
+		castType = (Type) intersectionTypes.get(2);
+
+		annotations = ((SimpleType) castType).annotations();
+		assertEquals("Incorrect no of annotations", 0, annotations.size());
+		assertEquals("Incorrect receiver", "J", castType.toString());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=406505
+	 * tests the source range issue that resulted in bad ast node.
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void testBug406505() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test406505/X.java",
+				true/* resolve */);
+		String contents = "package test406505;"
+				+ "import java.lang.annotation.Target;\n"
+				+ "import java.io.File;\n"
+				+ "public class X {\n"
+				+ "	class Folder<@Marker  F extends File> { }\n"
+				+ "}\n" 		
+				+ "@Target (java.lang.annotation.ElementType.TYPE_USE)\n"
+				+ "@interface Marker {}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);		
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 0);
+		typedeclaration = (TypeDeclaration)typedeclaration.bodyDeclarations().get(0);
+		TypeParameter typeParameter = (TypeParameter) typedeclaration.typeParameters().get(0);
+		checkSourceRange(typeParameter, "@Marker  F extends File", contents);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=412726
+	public void testBug412726() throws JavaModelException {
+		String contents =
+			"public interface X {\n" +
+			"	abstract void foo();\n" +
+			"}\n" +
+			"interface Y1 {\n" +
+			"}\n" +
+			"interface Y2 {\n" +
+			"	default void foo() {}\n" +
+			"}\n" +
+			"interface Z1 {\n" +
+			"	default void foo(){}\n" +
+			"	abstract void bar();\n" +
+			"}\n" +
+			"interface Z2 {\n" +
+			"	default void foo(){}\n" +
+			"	abstract void bar1();\n" +
+			"	abstract void bar2();\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy, true);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		/* case 0: vanilla case - interface with one abstract method */
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertTrue("Not a functional interface", typeBinding.isFunctionalInterface());
+		/* case 1: interface without any method */
+		type =  (TypeDeclaration) unit.types().get(1);
+		typeBinding = type.resolveBinding();
+		assertFalse("A Functional interface", typeBinding.isFunctionalInterface());
+		/* case 2: interface with just one default method and without any abstract method */
+		type =  (TypeDeclaration) unit.types().get(2);
+		typeBinding = type.resolveBinding();
+		assertFalse("A Functional interface", typeBinding.isFunctionalInterface());
+		/* case 3: interface with just one default method and one abstract method */
+		type =  (TypeDeclaration) unit.types().get(3);
+		typeBinding = type.resolveBinding();
+		assertTrue("A Functional interface", typeBinding.isFunctionalInterface());
+		/* case 4: interface with just one default method and two abstract methods */
+		type =  (TypeDeclaration) unit.types().get(4);
+		typeBinding = type.resolveBinding();
+		assertFalse("A Functional interface", typeBinding.isFunctionalInterface());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=417017
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test417017a() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test417017/X.java",
+				true/* resolve */);
+		String contents = "package test417017;"
+				+ "interface I {\n"
+				+ "	int foo(int x);\n"
+				+ "}\n" 
+				+ "public class X {\n"
+				+ " void fun(int a) {\n"
+				+"  	I i1 = x1-> x1;\n"
+				+"  	I i2 = xxx-> {\n"
+				+"  		i1.foo(a);\n"
+				+"  		return xxx;\n"
+				+"  	};\n"
+				+"  }\n"
+				+"}\n";
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		MethodDeclaration methodDeclaration = typedeclaration.getMethods()[0];
+		VariableDeclarationFragment vdf= (VariableDeclarationFragment) ((VariableDeclarationStatement) methodDeclaration.getBody().statements().get(1)).fragments().get(0);
+		LambdaExpression lambda= (LambdaExpression) vdf.getInitializer();
+		List parameters = lambda.parameters();
+		assertTrue("Incorrect Number of parameters", parameters.size() == 1);
+		ITypeBinding[] parameterTypes= lambda.resolveMethodBinding().getParameterTypes();
+		assertTrue("Incorrect Number of parameter type", parameterTypes.length == 1);
+		assertEquals("Incorrect parameter type", "int", parameterTypes[0].toString());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=417017
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test417017b() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test417017/X.java",
+				true/* resolve */);
+		String contents = "package test417017;" +
+				"interface I1 {\n" +
+				"	int foo(int a);\n" +
+				"}\n" +
+				"\n" +
+				"interface I2 {\n" +
+				"	public default int foo() {\n" +
+				"		I1 i1 = (a) -> {\n" +
+				"			return a;\n" +
+				"		};\n" +
+				"		//return 0;\n" + // Error on purpose
+				"	}\n" +
+				"}\n" ;
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy, false);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		MethodDeclaration methodDeclaration = typedeclaration.getMethods()[0];
+		VariableDeclarationFragment vdf= (VariableDeclarationFragment) ((VariableDeclarationStatement) methodDeclaration.getBody().statements().get(0)).fragments().get(0);
+		LambdaExpression lambda= (LambdaExpression) vdf.getInitializer();
+		List parameters = lambda.parameters();
+		assertTrue("Incorrect Number of parameters", parameters.size() == 1);
+		ITypeBinding[] parameterTypes= lambda.resolveMethodBinding().getParameterTypes();
+		assertTrue("Incorrect Number of parameter type", parameterTypes.length == 1);
+		assertEquals("Incorrect parameter type", "int", parameterTypes[0].toString());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=417017
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test417017c() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test417017/X.java",
+				true/* resolve */);
+		String contents = "package test417017;" +
+				"interface I1 {\n" +
+				"	int foo(int a);\n" +
+				"}\n" +
+				"\n" +
+				"interface I2 {\n" +
+				"	public default int foo() {\n" +
+				"		I1 i1 = (float a) -> {\n" +
+				"			return a;\n" +
+				"		};\n" +
+				"		//return 0;\n" + // Error on purpose
+				"	}\n" +
+				"}\n" ;
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy, false);
+		TypeDeclaration typedeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		MethodDeclaration methodDeclaration = typedeclaration.getMethods()[0];
+		VariableDeclarationFragment vdf= (VariableDeclarationFragment) ((VariableDeclarationStatement) methodDeclaration.getBody().statements().get(0)).fragments().get(0);
+		LambdaExpression lambda= (LambdaExpression) vdf.getInitializer();
+		List parameters = lambda.parameters();
+		assertTrue("Incorrect Number of parameters", parameters.size() == 1);
+		ITypeBinding[] parameterTypes= lambda.resolveMethodBinding().getParameterTypes();
+		assertTrue("Incorrect Number of parameter type", parameterTypes.length == 1);
+		assertEquals("Incorrect parameter type", "float", parameterTypes[0].toString());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=417017
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test417017d() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399794/X.java",
+				true/* resolve */);
+		String contents = "package test399794;" +
+				"interface I {\n" +
+				"	void foo(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	void foo(X x) {\n" +
+				"	}\n" +
+				"	I i = this::foo;\n" +
+				"}\n";
+			
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		FieldDeclaration field = typeDeclaration.getFields()[0];
+		
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		ExpressionMethodReference methodReference = (ExpressionMethodReference) expression;
+		IMethodBinding methodBinding = methodReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		ITypeBinding [] parameterTypes = methodBinding.getParameterTypes();
+		assertTrue("Incorrect Number of parameter type", parameterTypes.length == 1);
+		assertEquals("Incorrect parameter type", "X", parameterTypes[0].getName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=417017
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test417017e() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399794/X.java",
+				true/* resolve */);
+		String contents = "package test399794;" +
+				"interface I {\n" +
+				"	int [] foo(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	I i = int []::new;\n" +
+				"}\n";
+			
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		FieldDeclaration field = typeDeclaration.getFields()[0];
+
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		CreationReference creationReference = (CreationReference) expression;
+		IMethodBinding methodBinding = creationReference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		assertEquals("Wrong name", "lambda$0", methodBinding.getName());
+		ITypeBinding [] parameterTypes = methodBinding.getParameterTypes();
+		assertTrue("Incorrect Number of parameter type", parameterTypes.length == 1);
+		assertEquals("Incorrect parameter type", "int", parameterTypes[0].getName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=417017
+	 * 
+	 * @throws JavaModelException
+	 */
+	public void test417017f() throws JavaModelException {
+		this.workingCopy = getWorkingCopy("/Converter18/src/test399794/X.java",
+				true/* resolve */);
+		String contents = "package test399794;" +
+				"interface I {\n" +
+				"	void foo(X x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	private void foo(X x) {\n" +
+				"	}\n" +
+				"	class Y {\n" +
+				"		I i = X.this::foo;\n" +
+				"	}\n" +
+				"}\n";
+
+		CompilationUnit cu = (CompilationUnit) buildAST(contents, this.workingCopy);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) getASTNode(cu, 1);
+		typeDeclaration = typeDeclaration.getTypes()[0];
+		FieldDeclaration field = typeDeclaration.getFields()[0];
+
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		ExpressionMethodReference reference = (ExpressionMethodReference) expression;
+		IMethodBinding methodBinding = reference.resolveMethodBinding();
+		assertNotNull(methodBinding);
+		assertEquals("Wrong name", "foo", methodBinding.getName());
+		ITypeBinding [] parameterTypes = methodBinding.getParameterTypes();
+		assertTrue("Incorrect Number of parameter type", parameterTypes.length == 1);
+		assertEquals("Incorrect parameter type", "X", parameterTypes[0].getName());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=413942
+	// also refer https://bugs.eclipse.org/bugs/show_bug.cgi?id=413569
+	public void testBug413942() throws JavaModelException {
+		String contents =
+		"public class X extends @NonNull(int[].class) Object {\n" +
+		"    Object field = new ArrayList< @NonEmpty(0) int @NonNull(value1 = 1) [] @NonEmpty(1) [ ]>() ;\n" +
+		"    @Annot int @Annot1 [] a1 @Annot2 @Annot3 @NonNull (value = int[].class, value1 = 0)[/* [] */ ] @Annot3 @Annot2 [] @Annot4 [];\n" +
+		"    int[] xxx[];\n" +
+		"    int [][] ii = new int[2][3];" +
+		"    ArrayList<int[]> [][] yyy; // source ranges already broken in AST.JLS4\n" +
+		"    ArrayList<int[][]> [][][][] zzz;\n" +
+		"    ArrayList<Float> [][][] zzz2;\n" +
+		"    Object a = new ArrayList< @TakeType(int[][].class) int @TakeType(float.class) [] @TakeType(double.class) []>() ;\n" +
+		"    Object b = new @NonNull(value1 = Math.PI) ArrayList< >() ; \n" +
+		"    Object c = new ArrayList<@NonNull(value1= Math.PI ) Object[]>() ;\n" +
+		"\n" +
+		"    int foo(@TakeType(int[].class)int i ) @TakeType(int[].class) [] {\n" +
+		"        int[] arr =  new int[2];\n" +
+		"        for (String tab @TakeType(int[].class) [] = null;; ++i) { break; }\n" +
+		"        for (@Deprecated String tab@TakeType(int[].class) [][]  = null;; ++i) {}\n" +
+		"    }\n" +
+		"    int bar(int [] /*@TakeType(int[].class)*/ [] a ) {\n" +
+		"    	return 0;\n" +
+		"    }\n" +
+		"public int var1(int @TakeType(int[].class)... args) { return 0;}\n" +
+		"public int var2(int @Annot ... args) { return 0;}\n" +
+		"}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface NonNull {\n" +
+		"	Class value() default int.class;\n" +
+		"	double value1() default 0;\n" +
+		"}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface NonEmpty {\n" +
+		"	int value() default 0;\n" +
+		"}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface TakeType {\n" +
+		"	Class value() default int[].class;\n" +
+		"}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface Annot {}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface Annot1 {}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface Annot2 {}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface Annot3 {}\n" +
+		"\n" +
+		"@Target(ElementType.TYPE_USE)\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Documented\n" +
+		"@interface Annot4 {}\n" +
+		"\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy, false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		SimpleType simpleType =  (SimpleType) type.getSuperclassType();
+		checkSourceRange(simpleType, "@NonNull(int[].class) Object", contents);
+		SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation) simpleType.annotations().get(0);
+		checkSourceRange(singleMemberAnnotation, "@NonNull(int[].class)", contents);
+		TypeLiteral typeLiteral = (TypeLiteral) singleMemberAnnotation.getValue();
+		checkSourceRange(typeLiteral, "int[].class", contents);
+		ArrayType arrayType = (ArrayType) typeLiteral.getType();
+		checkSourceRange(arrayType, "int[]", contents);
+		
+		int count = 0;
+		FieldDeclaration field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "Object field = new ArrayList< @NonEmpty(0) int @NonNull(value1 = 1) [] @NonEmpty(1) [ ]>() ;", contents);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		ClassInstanceCreation instance = (ClassInstanceCreation) fragment.getInitializer();
+		ParameterizedType parameterizedType = (ParameterizedType) instance.getType();
+		arrayType = (ArrayType) parameterizedType.typeArguments().get(0);
+		checkSourceRange(arrayType, "@NonEmpty(0) int @NonNull(value1 = 1) [] @NonEmpty(1) [ ]", contents);
+		PrimitiveType primitiveType = (PrimitiveType) arrayType.getElementType();
+		checkSourceRange(primitiveType, "@NonEmpty(0) int", contents);
+		Dimension dimension = (Dimension) arrayType.dimensions().get(0);
+		checkSourceRange(dimension, "@NonNull(value1 = 1) []", contents);
+		dimension = (Dimension) arrayType.dimensions().get(1);
+		checkSourceRange(dimension, "@NonEmpty(1) [ ]", contents);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "@Annot int @Annot1 [] a1 @Annot2 @Annot3 @NonNull (value = int[].class, value1 = 0)[/* [] */ ] @Annot3 @Annot2 [] @Annot4 [];", contents);
+		arrayType = (ArrayType) field.getType();
+		checkSourceRange(arrayType, "int @Annot1 []", contents);
+		fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		dimension = (Dimension) fragment.extraDimensions().get(0);
+		checkSourceRange(dimension, "@Annot2 @Annot3 @NonNull (value = int[].class, value1 = 0)[/* [] */ ]", contents);
+		dimension = (Dimension) fragment.extraDimensions().get(1);
+		checkSourceRange(dimension, "@Annot3 @Annot2 []", contents);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "int[] xxx[];", contents);
+		assertTrue(field.getType().isArrayType());
+		arrayType = (ArrayType) field.getType();
+		checkSourceRange(arrayType, "int[]", contents);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "int [][] ii = new int[2][3];", contents);
+		arrayType = (ArrayType) field.getType();
+		checkSourceRange(arrayType, "int [][]", contents);
+		fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		ArrayCreation arrayCreation = (ArrayCreation) fragment.getInitializer();
+		arrayType = arrayCreation.getType();
+		assertTrue(arrayType.getElementType().isPrimitiveType());
+		assertTrue(arrayType.getDimensions() == 2);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "ArrayList<int[]> [][] yyy;", contents);
+		arrayType = (ArrayType) field.getType();
+		checkSourceRange(arrayType, "ArrayList<int[]> [][]", contents);
+
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "ArrayList<int[][]> [][][][] zzz;", contents);
+		arrayType = (ArrayType) field.getType();
+		assertTrue(arrayType.getElementType().isParameterizedType());
+		assertTrue(arrayType.getDimensions() == 4);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "ArrayList<Float> [][][] zzz2;", contents);
+		arrayType = (ArrayType) field.getType();
+		assertTrue(arrayType.getElementType().isParameterizedType());
+		assertTrue(arrayType.getDimensions() == 3);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "Object a = new ArrayList< @TakeType(int[][].class) int @TakeType(float.class) [] @TakeType(double.class) []>() ;", contents);
+		fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) fragment.getInitializer();
+		parameterizedType = (ParameterizedType) classInstanceCreation.getType();
+		arrayType = (ArrayType) parameterizedType.typeArguments().get(0);
+		checkSourceRange(arrayType, "@TakeType(int[][].class) int @TakeType(float.class) [] @TakeType(double.class) []", contents);
+		checkSourceRange(arrayType.getElementType(), "@TakeType(int[][].class) int", contents);
+		assertTrue(arrayType.getElementType().isPrimitiveType());
+		dimension = (Dimension) arrayType.dimensions().get(0);
+		checkSourceRange(dimension, "@TakeType(float.class) []", contents);
+		dimension = (Dimension) arrayType.dimensions().get(1);
+		Annotation annotation = (Annotation) dimension.annotations().get(0);
+		assertTrue(annotation.isSingleMemberAnnotation());
+		singleMemberAnnotation = (SingleMemberAnnotation) annotation;
+		typeLiteral = (TypeLiteral) singleMemberAnnotation.getValue();
+		checkSourceRange(typeLiteral, "double.class", contents);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "Object b = new @NonNull(value1 = Math.PI) ArrayList< >() ;", contents);
+		fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		classInstanceCreation = (ClassInstanceCreation) fragment.getInitializer();
+		parameterizedType = (ParameterizedType) classInstanceCreation.getType();
+		checkSourceRange(parameterizedType.getType(), "@NonNull(value1 = Math.PI) ArrayList", contents);
+		
+		field = (FieldDeclaration) type.bodyDeclarations().get(count++);
+		checkSourceRange(field, "Object c = new ArrayList<@NonNull(value1= Math.PI ) Object[]>() ;", contents);
+		fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		classInstanceCreation = (ClassInstanceCreation) fragment.getInitializer();
+		parameterizedType = (ParameterizedType) classInstanceCreation.getType();
+		arrayType = (ArrayType) parameterizedType.typeArguments().get(0);
+		assertTrue(arrayType.getDimensions() == 1);
+		
+		MethodDeclaration method = (MethodDeclaration) type.bodyDeclarations().get(count++);
+		dimension = (Dimension) method.extraDimensions().get(0);
+		checkSourceRange(dimension, "@TakeType(int[].class) []", contents);
+		singleMemberAnnotation = (SingleMemberAnnotation) dimension.annotations().get(0);
+		typeLiteral = (TypeLiteral) singleMemberAnnotation.getValue();
+		arrayType = (ArrayType) typeLiteral.getType();
+		assertTrue(arrayType.getElementType().isPrimitiveType());
+		assertTrue(arrayType.getDimensions() == 1);
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) method.parameters().get(0);
+		singleMemberAnnotation = (SingleMemberAnnotation) singleVariableDeclaration.modifiers().get(0);
+		checkSourceRange(singleMemberAnnotation, "@TakeType(int[].class)", contents);
+		typeLiteral = (TypeLiteral) singleMemberAnnotation.getValue();
+		arrayType = (ArrayType) typeLiteral.getType();
+		assertTrue(arrayType.getElementType().isPrimitiveType());
+		assertTrue(arrayType.getDimensions() == 1);
+		ForStatement forStatement = (ForStatement) method.getBody().statements().get(1);
+		VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) forStatement.initializers().get(0);
+		fragment = (VariableDeclarationFragment) variableDeclarationExpression.fragments().get(0);
+		dimension = (Dimension) fragment.extraDimensions().get(0);
+		checkSourceRange(dimension, "@TakeType(int[].class) []", contents);
+		forStatement = (ForStatement) method.getBody().statements().get(1);
+		variableDeclarationExpression = (VariableDeclarationExpression) forStatement.initializers().get(0);
+		fragment = (VariableDeclarationFragment) variableDeclarationExpression.fragments().get(0);
+		dimension = (Dimension) fragment.extraDimensions().get(0);
+		checkSourceRange(dimension, "@TakeType(int[].class) []", contents);
+		
+		method = (MethodDeclaration) type.bodyDeclarations().get(count++);
+		singleVariableDeclaration = (SingleVariableDeclaration) method.parameters().get(0);
+		// test case active only after bug 417660 is fixed (uncomment)
+		checkSourceRange(singleVariableDeclaration, "int [] /*@TakeType(int[].class)*/ [] a", contents);
+		
+		method = (MethodDeclaration) type.bodyDeclarations().get(count++);
+		singleVariableDeclaration = (SingleVariableDeclaration) method.parameters().get(0);
+		checkSourceRange(singleVariableDeclaration, "int @TakeType(int[].class)... args", contents);
+		singleMemberAnnotation = (SingleMemberAnnotation) singleVariableDeclaration.varargsAnnotations().get(0);
+		typeLiteral = (TypeLiteral) singleMemberAnnotation.getValue();
+		arrayType = (ArrayType) typeLiteral.getType();
+		assertTrue(arrayType.getElementType().isPrimitiveType());
+		assertTrue(arrayType.getDimensions() == 1);
+		
+		method = (MethodDeclaration) type.bodyDeclarations().get(count++);
+		singleVariableDeclaration = (SingleVariableDeclaration) method.parameters().get(0);
+		checkSourceRange(singleVariableDeclaration, "int @Annot ... args", contents);
+		assertTrue(singleVariableDeclaration.varargsAnnotations().size() == 1);
+
+	}
+	// 	https://bugs.eclipse.org/bugs/show_bug.cgi?id=409586
+	public void testBug409586() throws JavaModelException {
+		String contents = 
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {\n" +
+				" 	String value() default \"\";\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {\n" +
+				" 	String value() default \"22\";\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public @Marker(\"1\") String foo(int @Marker @Marker2 [] args) {\n" +
+				"      return null;\n" +
+				"	}\n" +
+				"	public @Marker(\"3\") String bar() {\n" +
+				"      return null;\n" +
+				"	}\n" +
+				"   public String @Marker(\"i0\") @Marker2 [] [] @Marker(\"i1\") [] str = null;\n" +
+				"   public @Marker String str2 = null;\n" +
+				"   public @Marker String str3 = null;\n" +
+				"   public String str4 = null;\n" +
+				"}";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 2, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding mBinding = methodDeclaration.resolveBinding();
+		assertNotNull("Should not be null", mBinding);
+		ITypeBinding tBinding1 = mBinding.getReturnType();
+		assertNotNull("Should not be null", tBinding1);
+		
+		/* public @Marker("1") String foo(int @Marker @Marker2 [] args) */
+		List params = methodDeclaration.parameters();
+		assertEquals("Incorrect params", 1, params.size());
+		SingleVariableDeclaration param = (SingleVariableDeclaration) params.get(0);
+		ArrayType type = (ArrayType) param.getType();
+		ITypeBinding tBinding = type.resolveBinding();
+		assertNotNull("Should not be null", tBinding);
+		IAnnotationBinding[] annots = tBinding.getTypeAnnotations();
+		assertEquals("Incorrect type annotations", 2, annots.length);
+		assertEquals("Incorrect annotation", "@Marker()", annots[0].toString());
+		assertEquals("Incorrect annotation", "@Marker2()", annots[1].toString());
+		
+		/* public @Marker("3") String bar()*/
+		node = getASTNode(compilationUnit, 2, 1);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		methodDeclaration = (MethodDeclaration) node;
+		mBinding = methodDeclaration.resolveBinding();
+		assertNotNull("Should not be null", mBinding);
+		ITypeBinding tBinding2 = mBinding.getReturnType();
+		assertNotNull("Should not be null", tBinding1);
+		assertNotSame("Type bindings should not be same", tBinding1, tBinding2);
+		annots = tBinding1.getTypeAnnotations();
+		assertEquals("Incorrect type annotations", 1, annots.length);
+		IAnnotationBinding annot = annots[0];
+		assertEquals("Incorrect annotation", "@Marker(value = 1)", annot.toString());
+		annots = tBinding2.getTypeAnnotations();
+		assertEquals("Incorrect type annotations", 1, annots.length);
+		annot = annots[0];
+		assertEquals("Incorrect annotation", "@Marker(value = 3)", annot.toString());
+
+		/* public String @Marker("i0") @Marker2 [] [] @Marker("i1") [] str = null; */
+		node = getASTNode(compilationUnit, 2, 2);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+		FieldDeclaration field = (FieldDeclaration) node;
+		List fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variable = fragment.resolveBinding();
+		assertNotNull("Should not be null", variable);
+		ITypeBinding tBinding3 = variable.getType();
+		assertNotNull("Should not be null", tBinding3);
+		annots = tBinding3.getTypeAnnotations();
+
+		assertEquals("Incorrect type annotations", 2, annots.length);
+		assertEquals("Incorrect annotation", "@Marker(value = i0)", annots[0].toString());
+		assertEquals("Incorrect annotation", "@Marker2()", annots[1].toString());
+		tBinding3 = tBinding3.getComponentType();
+		annots = tBinding3.getTypeAnnotations();
+		assertEquals("Incorrect type annotations", 0, annots.length);
+		tBinding3 = tBinding3.getComponentType();
+		annots = tBinding3.getTypeAnnotations();
+		assertEquals("Incorrect type annotations", 1, annots.length);
+		assertEquals("Incorrect annotation", "@Marker(value = i1)", annots[0].toString());
+		
+		/* public @Marker String str2 = null; */
+		node = getASTNode(compilationUnit, 2, 3);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+		field = (FieldDeclaration) node;
+		fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variable = fragment.resolveBinding();
+		assertNotNull("Should not be null", variable);
+		tBinding1 = variable.getType();
+		
+		/* public @Marker String str3 = null; */
+		node = getASTNode(compilationUnit, 2, 4);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+		field = (FieldDeclaration) node;
+		fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variable = fragment.resolveBinding();
+		assertNotNull("Should not be null", variable);
+		tBinding2 = variable.getType();
+		assertSame("Type bindings should be same", tBinding1, tBinding2);
+		assertTrue("Unannotated bindings should be same", tBinding1.isEqualTo(tBinding2));
+		
+		/* public String str4 = null; */
+		node = getASTNode(compilationUnit, 2, 5);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+		field = (FieldDeclaration) node;
+		fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variable = fragment.resolveBinding();
+		assertNotNull("Should not be null", variable);
+		tBinding2 = variable.getType();
+		assertNotSame("Type bindings should not be same", tBinding1, tBinding2);
+		assertTrue("Unannotated bindings should be same", tBinding1.isEqualTo(tBinding2));
+	}
+	
+	public void testExtendedDimensions() throws JavaModelException {
+		String contents = 
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {\n" +
+				" 	String value() default \"\";\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {\n" +
+				" 	String value() default \"22\";\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker3 {\n" +
+				" 	String value() default \"22\";\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public @Marker(\"1\") String @Marker(\"2\") [] foo(int @Marker @Marker2 [] args @Marker3 []) @Marker3(\"3\") [] {\n" +
+				"      return null;\n" +
+				"	}\n" +
+				"   public String @Marker(\"i0\") @Marker2 [] [] @Marker(\"i1\") [] str @Marker(\"Extended\") [] = null;\n" +
+				"}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 3, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type returnType = methodDeclaration.getReturnType2();
+		ITypeBinding tBinding1 = returnType.resolveBinding();
+		assertEquals("Unexpected type", tBinding1.toString(), "@Marker{ value = (String)\"1\"} String @Marker{ value = (String)\"2\"} []");
+		assertEquals("Unexpected type", methodDeclaration.resolveBinding().getReturnType().toString(), "@Marker{ value = (String)\"1\"} String @Marker3{ value = (String)\"3\"} [] @Marker{ value = (String)\"2\"} []");
+		
+		List params = methodDeclaration.parameters();
+		assertEquals("Incorrect params", 1, params.size());
+		SingleVariableDeclaration param = (SingleVariableDeclaration) params.get(0);
+		ArrayType type = (ArrayType) param.getType();
+		ITypeBinding tBinding = type.resolveBinding();
+		assertEquals("Unexpected type", tBinding.toString(), "int @Marker @Marker2 []");
+		assertEquals("Unexpected type", param.resolveBinding().getType().toString(), "int @Marker3 [] @Marker @Marker2 []");
+
+		// public String @Marker(\"i0\") @Marker2 [] [] @Marker(\"i1\") [] str @Marker(\"Extended\") [] = null;
+		node = getASTNode(compilationUnit, 3, 1);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+		FieldDeclaration field = (FieldDeclaration) node;
+		List fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		assertEquals("Unexpected type", fragment.resolveBinding().getType().toString(), "String @Marker{ value = (String)\"Extended\"} [] @Marker{ value = (String)\"i0\"} @Marker2 [] [] @Marker{ value = (String)\"i1\"} []");
+		assertEquals("Unexpected type", field.getType().toString(), "String @Marker(\"i0\") @Marker2 [] [] @Marker(\"i1\") []");
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=417669
+	public void testBug417669() throws JavaModelException {
+		String contents = 
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"public class X {\n" +
+				"	public static void main(String [] args) {\n" +
+				"      W<String> w = (@Marker W<String>) null;\n" +
+				"	}\n" +
+				"}\n" +
+				"class W<T> {}";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 1, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION);
+		MethodDeclaration method = (MethodDeclaration) node;
+		assertEquals("Method should not be malformed", 0, (method.getFlags() & ASTNode.MALFORMED));
+		
+		List statements = method.getBody().statements();
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		CastExpression cast = (CastExpression) fragment.getInitializer();
+		ParameterizedType castType = (ParameterizedType) cast.getType();
+		Type type = castType.getType();
+		checkSourceRange(castType, "@Marker W<String>", contents);
+		checkSourceRange(type, "@Marker W", contents);
+	}
+
+	// Bug 414113 - [1.8] Method Binding for default method has abstract modifier instead of default
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=414113
+	public void testBug414113() throws JavaModelException {
+		String contents =
+			"public interface X {\n" +
+			"	int i = foo();\n" +
+			"	default int foo_default() { return 1;}\n" +
+			"	static int foo_static() { return 1;}\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy, false);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		MethodDeclaration method = (MethodDeclaration) type.bodyDeclarations().get(1);
+		IMethodBinding binding =  method.resolveBinding();
+		assertTrue("binding is default", (binding.getModifiers() & Modifier.DEFAULT) != 0);
+		method = (MethodDeclaration) type.bodyDeclarations().get(2);
+		binding =  method.resolveBinding();
+		assertTrue("binding is static", (binding.getModifiers() & Modifier.STATIC) != 0);
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
index 6daa07a..a62bafd 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST3Test.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -37,6 +41,30 @@
 	public static Test suite() {
 		return buildModelTestSuite(ASTConverterAST3Test.class);
 	}
+	/** 
+	 * Internal access method to VariableDeclarationFragment#setExtraDimensions() for avoiding deprecated warnings.
+	 *
+	 * @param node
+	 * @param dimensions
+	 * @deprecated
+	 */
+	private void internalSetExtraDimensions(VariableDeclarationFragment node, int dimensions) {
+		node.setExtraDimensions(dimensions);
+	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private static List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
 
 	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$
@@ -2714,20 +2742,20 @@
 		NumberLiteral literal = this.ast.newNumberLiteral();
 		literal.setToken("10");//$NON-NLS-1$
 		fragment.setInitializer(literal);
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
 		fragment.setInitializer(this.ast.newNullLiteral());
-		fragment.setExtraDimensions(1);
+		internalSetExtraDimensions(fragment, 1);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
-		fragment.setExtraDimensions(2);
+		internalSetExtraDimensions(fragment, 2);
 		statement.fragments().add(fragment);
 		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
 		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
@@ -2754,20 +2782,20 @@
 		NumberLiteral literal = this.ast.newNumberLiteral();
 		literal.setToken("10");//$NON-NLS-1$
 		fragment.setInitializer(literal);
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
 		fragment.setInitializer(this.ast.newNullLiteral());
-		fragment.setExtraDimensions(1);
+		internalSetExtraDimensions(fragment, 1);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
-		fragment.setExtraDimensions(2);
+		internalSetExtraDimensions(fragment, 2);
 		statement.fragments().add(fragment);
 		statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
 		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
@@ -2793,7 +2821,7 @@
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
 		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
 		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
-		variableDeclarationFragment.setExtraDimensions(1);
+		internalSetExtraDimensions(variableDeclarationFragment, 1);
 		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
 		variableDeclarationExpression.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String")), 1));//$NON-NLS-1$
 		forStatement.initializers().add(variableDeclarationExpression);
@@ -2821,7 +2849,7 @@
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
 		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
 		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
-		variableDeclarationFragment.setExtraDimensions(1);
+		internalSetExtraDimensions(variableDeclarationFragment, 1);
 		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
 		variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
 		forStatement.initializers().add(variableDeclarationExpression);
@@ -2849,7 +2877,7 @@
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
 		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
 		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
-		variableDeclarationFragment.setExtraDimensions(1);
+		internalSetExtraDimensions(variableDeclarationFragment, 1);
 		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
 		variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
 		forStatement.initializers().add(variableDeclarationExpression);
@@ -2878,7 +2906,7 @@
 		assertTrue("Not a declaration", frag.getName().isDeclaration()); //$NON-NLS-1$
 		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
 		fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
 		assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
@@ -2900,22 +2928,22 @@
 		NumberLiteral literal = this.ast.newNumberLiteral();
 		literal.setToken("10"); //$NON-NLS-1$
 		fragment.setInitializer(literal);
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
 		fieldDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
 		fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("y"));//$NON-NLS-1$
-		fragment.setExtraDimensions(1);
+		internalSetExtraDimensions(fragment, 1);
 		fragment.setInitializer(this.ast.newNullLiteral());
 		fieldDeclaration.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		fieldDeclaration.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
-		fragment.setExtraDimensions(2);
+		internalSetExtraDimensions(fragment, 2);
 		fieldDeclaration.fragments().add(fragment);
 		assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
 		checkSourceRange(node, "public int x= 10, y[] = null, i, j[][];", source); //$NON-NLS-1$
@@ -7638,13 +7666,13 @@
 		ITypeBinding typeBinding = arrayType.resolveBinding();
 		checkSourceRange(type, "java.lang.Object[][]", source); //$NON-NLS-1$
 		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
-		Type elementType = arrayType.getComponentType();
+		Type elementType = componentType(arrayType);
 		ITypeBinding typeBinding2 = elementType.resolveBinding();
 		assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
 		assertEquals("wrong dimension", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
 		assertEquals("wrong name", "Object[]", typeBinding2.getName());		 //$NON-NLS-1$ //$NON-NLS-2$
 		assertTrue("Not an array type", elementType.isArrayType()); //$NON-NLS-1$
-		Type elementType2 = ((ArrayType) elementType).getComponentType();
+		Type elementType2 = componentType(((ArrayType) elementType));
 		assertTrue("Not a simple type", elementType2.isSimpleType()); //$NON-NLS-1$
 		ITypeBinding typeBinding3 = elementType2.resolveBinding();
 		assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
@@ -7985,7 +8013,7 @@
 		ITypeBinding typeBinding3 = simpleType.resolveBinding();
 		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
 		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType2 = (ArrayType) type;
 		ITypeBinding typeBinding4 = arrayType2.resolveBinding();
@@ -8027,14 +8055,14 @@
 		ITypeBinding typeBinding3 = simpleType.resolveBinding();
 		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
 		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType2 = (ArrayType) type;
 		checkSourceRange(arrayType2, "Object[10][]", source); //$NON-NLS-1$
 		ITypeBinding typeBinding4 = arrayType2.resolveBinding();
 		assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
 		assertEquals("wrong name", "Object[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType2.getComponentType();
+		type = componentType(arrayType2);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType3 = (ArrayType) type;
 		ITypeBinding typeBinding5 = arrayType3.resolveBinding();
@@ -8146,7 +8174,7 @@
 		assertNotNull("not null", node); //$NON-NLS-1$
 		assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
-		List thrownExceptions = methodDeclaration.thrownExceptions();
+		List thrownExceptions = internalThrownExceptions(methodDeclaration);
 		assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
 		Name name = (Name) thrownExceptions.get(0);
 		IBinding binding = name.resolveBinding();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java
index 2d65325..c58a218 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST4Test.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -24,7 +28,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS4);
+		this.ast = AST.newAST(getJLS4());
 	}
 
 	public ASTConverterAST4Test(String name) {
@@ -37,11 +41,35 @@
 	public static Test suite() {
 		return buildModelTestSuite(ASTConverterAST4Test.class);
 	}
+	/** 
+	 * Internal access method to VariableDeclarationFragment#setExtraDimensions() for avoiding deprecated warnings.
+	 *
+	 * @param node
+	 * @param dimensions
+	 * @deprecated
+	 */
+	private void internalSetExtraDimensions(VariableDeclarationFragment node, int dimensions) {
+		node.setExtraDimensions(dimensions);
+	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
 
 	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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 
 		// check that we have the right tree
 		CompilationUnit unit = this.ast.newCompilationUnit();
@@ -110,7 +138,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -125,7 +153,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -146,7 +174,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -170,7 +198,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -197,7 +225,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
@@ -227,7 +255,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node;
@@ -248,7 +276,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -269,7 +297,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -292,7 +320,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -308,7 +336,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -324,7 +352,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		ArrayCreation arrayCreation = this.ast.newArrayCreation();
@@ -345,7 +373,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -362,7 +390,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -381,7 +409,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -399,7 +427,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -417,7 +445,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -435,7 +463,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -453,7 +481,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -471,7 +499,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -489,7 +517,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -507,7 +535,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -525,7 +553,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -543,7 +571,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -561,7 +589,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -579,7 +607,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -597,7 +625,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -614,7 +642,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -631,7 +659,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -648,7 +676,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -665,7 +693,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -686,7 +714,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -707,7 +735,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -730,7 +758,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -753,7 +781,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -776,7 +804,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -799,7 +827,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -822,7 +850,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -844,7 +872,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -866,7 +894,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -888,7 +916,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -910,7 +938,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		BooleanLiteral literal = this.ast.newBooleanLiteral(false);
@@ -924,7 +952,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		BooleanLiteral literal = this.ast.newBooleanLiteral(true);
@@ -938,7 +966,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		NullLiteral literal = this.ast.newNullLiteral();
@@ -952,7 +980,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		CharacterLiteral literal = this.ast.newCharacterLiteral();
@@ -967,7 +995,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -981,7 +1009,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -995,7 +1023,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1009,7 +1037,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1023,7 +1051,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1037,7 +1065,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1054,7 +1082,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1068,7 +1096,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		/*
@@ -1093,7 +1121,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1117,7 +1145,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1141,7 +1169,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1165,7 +1193,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1189,7 +1217,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1213,7 +1241,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1237,7 +1265,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1261,7 +1289,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1285,7 +1313,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1309,7 +1337,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1333,7 +1361,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1357,7 +1385,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1381,7 +1409,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1405,7 +1433,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1429,7 +1457,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1453,7 +1481,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1477,7 +1505,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1500,7 +1528,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1530,7 +1558,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1552,7 +1580,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1574,7 +1602,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1597,7 +1625,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1621,7 +1649,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1648,7 +1676,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1675,7 +1703,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1691,7 +1719,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1708,7 +1736,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1725,7 +1753,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1743,7 +1771,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1758,7 +1786,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1788,7 +1816,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1820,7 +1848,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1847,7 +1875,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1871,7 +1899,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -1890,7 +1918,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1910,7 +1938,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1938,7 +1966,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 
@@ -1961,7 +1989,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1978,7 +2006,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1997,7 +2025,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		ForStatement forStatement = (ForStatement) node;
 		BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2013,7 +2041,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		ForStatement forStatement = (ForStatement) node;
 		ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
@@ -2029,7 +2057,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2046,7 +2074,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2063,7 +2091,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2127,7 +2155,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2141,7 +2169,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2161,7 +2189,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2177,7 +2205,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2193,7 +2221,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2217,7 +2245,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2244,7 +2272,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2271,7 +2299,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2298,7 +2326,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2334,7 +2362,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2361,7 +2389,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2388,7 +2416,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode expression = getASTNodeToCompare((CompilationUnit) result);
 		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
 		InfixExpression infixExpression = this.ast.newInfixExpression();
@@ -2424,7 +2452,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2441,7 +2469,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2458,7 +2486,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2476,7 +2504,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2503,7 +2531,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2528,7 +2556,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2560,7 +2588,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2575,7 +2603,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2590,7 +2618,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2605,7 +2633,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2621,7 +2649,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2640,7 +2668,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2659,7 +2687,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2679,7 +2707,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2706,7 +2734,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2714,20 +2742,20 @@
 		NumberLiteral literal = this.ast.newNumberLiteral();
 		literal.setToken("10");//$NON-NLS-1$
 		fragment.setInitializer(literal);
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
 		fragment.setInitializer(this.ast.newNullLiteral());
-		fragment.setExtraDimensions(1);
+		internalSetExtraDimensions(fragment, 1);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
-		fragment.setExtraDimensions(2);
+		internalSetExtraDimensions(fragment, 2);
 		statement.fragments().add(fragment);
 		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
 		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
@@ -2746,7 +2774,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -2754,20 +2782,20 @@
 		NumberLiteral literal = this.ast.newNumberLiteral();
 		literal.setToken("10");//$NON-NLS-1$
 		fragment.setInitializer(literal);
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
 		fragment.setInitializer(this.ast.newNullLiteral());
-		fragment.setExtraDimensions(1);
+		internalSetExtraDimensions(fragment, 1);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		statement.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
-		fragment.setExtraDimensions(2);
+		internalSetExtraDimensions(fragment, 2);
 		statement.fragments().add(fragment);
 		statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
 		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
@@ -2786,14 +2814,14 @@
 	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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
 		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
 		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
-		variableDeclarationFragment.setExtraDimensions(1);
+		internalSetExtraDimensions(variableDeclarationFragment, 1);
 		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
 		variableDeclarationExpression.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String")), 1));//$NON-NLS-1$
 		forStatement.initializers().add(variableDeclarationExpression);
@@ -2814,14 +2842,14 @@
 	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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
 		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
 		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
-		variableDeclarationFragment.setExtraDimensions(1);
+		internalSetExtraDimensions(variableDeclarationFragment, 1);
 		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
 		variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
 		forStatement.initializers().add(variableDeclarationExpression);
@@ -2842,14 +2870,14 @@
 	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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
 		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
 		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
 		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
-		variableDeclarationFragment.setExtraDimensions(1);
+		internalSetExtraDimensions(variableDeclarationFragment, 1);
 		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
 		variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
 		forStatement.initializers().add(variableDeclarationExpression);
@@ -2870,7 +2898,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -2878,7 +2906,7 @@
 		assertTrue("Not a declaration", frag.getName().isDeclaration()); //$NON-NLS-1$
 		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
 		fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
 		assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
@@ -2891,7 +2919,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -2900,22 +2928,22 @@
 		NumberLiteral literal = this.ast.newNumberLiteral();
 		literal.setToken("10"); //$NON-NLS-1$
 		fragment.setInitializer(literal);
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
 		fieldDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
 		fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("y"));//$NON-NLS-1$
-		fragment.setExtraDimensions(1);
+		internalSetExtraDimensions(fragment, 1);
 		fragment.setInitializer(this.ast.newNullLiteral());
 		fieldDeclaration.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
-		fragment.setExtraDimensions(0);
+		internalSetExtraDimensions(fragment, 0);
 		fieldDeclaration.fragments().add(fragment);
 		fragment = this.ast.newVariableDeclarationFragment();
 		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
-		fragment.setExtraDimensions(2);
+		internalSetExtraDimensions(fragment, 2);
 		fieldDeclaration.fragments().add(fragment);
 		assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
 		checkSourceRange(node, "public int x= 10, y[] = null, i, j[][];", source); //$NON-NLS-1$
@@ -2933,7 +2961,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -2957,7 +2985,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -2972,7 +3000,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -2987,7 +3015,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3003,7 +3031,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3017,7 +3045,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3032,7 +3060,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3047,7 +3075,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3065,7 +3093,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3084,7 +3112,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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 +3133,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3123,7 +3151,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3138,7 +3166,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3153,7 +3181,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3168,7 +3196,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3180,7 +3208,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3193,7 +3221,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3213,7 +3241,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3232,7 +3260,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -3245,7 +3273,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3261,7 +3289,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
 		assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
 	}
@@ -3271,7 +3299,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3290,7 +3318,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3304,7 +3332,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3323,7 +3351,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3345,7 +3373,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3368,7 +3396,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3406,7 +3434,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3444,7 +3472,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
 	}
@@ -3454,7 +3482,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3515,7 +3543,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3574,7 +3602,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3610,7 +3638,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3645,7 +3673,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3679,7 +3707,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3715,7 +3743,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
@@ -3785,7 +3813,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3804,7 +3832,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3831,7 +3859,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3857,7 +3885,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3882,7 +3910,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -3915,7 +3943,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -4022,7 +4050,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4052,7 +4080,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4081,7 +4109,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4101,7 +4129,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4124,7 +4152,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4154,7 +4182,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
 		assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4172,7 +4200,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4191,7 +4219,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4212,7 +4240,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4233,7 +4261,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4251,7 +4279,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4269,7 +4297,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4287,7 +4315,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4305,7 +4333,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement ifStatement = (IfStatement) node2;
@@ -4323,7 +4351,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("IfStatement", node2 instanceof WhileStatement); //$NON-NLS-1$
 		WhileStatement whileStatement = (WhileStatement) node2;
@@ -4341,7 +4369,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 2);
 		assertTrue("DoStatement", node2 instanceof DoStatement); //$NON-NLS-1$
 		DoStatement statement = (DoStatement) node2;
@@ -4359,7 +4387,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
 		ForStatement statement = (ForStatement) node2;
@@ -4377,7 +4405,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 2, 1);
 		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
 		IfStatement statement = (IfStatement) node2;
@@ -4395,7 +4423,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4419,7 +4447,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4440,7 +4468,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4462,7 +4490,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4485,7 +4513,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 1);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4509,7 +4537,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 2);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -4530,7 +4558,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 0);
@@ -4556,7 +4584,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -4582,7 +4610,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4611,7 +4639,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -4641,7 +4669,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
 		assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
 		ForStatement forStatement = (ForStatement) node2;
@@ -4657,7 +4685,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4679,7 +4707,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4705,7 +4733,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
 		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
 		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
@@ -4739,7 +4767,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("TypeDeclarationStatement", node2 instanceof TypeDeclarationStatement); //$NON-NLS-1$
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node2;
@@ -4827,7 +4855,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4842,7 +4870,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4857,7 +4885,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4873,7 +4901,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4887,7 +4915,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4902,7 +4930,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4917,7 +4945,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4935,7 +4963,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4954,7 +4982,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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 +5003,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -4993,7 +5021,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5008,7 +5036,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5023,7 +5051,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5038,7 +5066,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5050,7 +5078,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5063,7 +5091,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5083,7 +5111,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5102,7 +5130,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
 		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
@@ -5116,7 +5144,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
 		checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
 		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
@@ -5135,7 +5163,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
 		checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
 		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
@@ -5154,7 +5182,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 3, 2, 0);
 		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -5241,7 +5269,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
 		ReturnStatement returnStatement = (ReturnStatement) node2;
@@ -5269,7 +5297,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5299,7 +5327,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5324,7 +5352,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
 		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
@@ -5359,7 +5387,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
 		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
@@ -5390,7 +5418,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5406,7 +5434,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.JLS4, sourceUnit, true, true, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5428,7 +5456,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.JLS4, sourceUnit, true, true, false);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5449,7 +5477,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5470,7 +5498,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -5480,7 +5508,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -5515,7 +5543,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5553,7 +5581,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5594,7 +5622,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5630,7 +5658,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5673,7 +5701,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5692,7 +5720,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5711,7 +5739,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -5737,7 +5765,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -5765,7 +5793,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -5782,7 +5810,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5805,7 +5833,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5833,7 +5861,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5857,7 +5885,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5887,7 +5915,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5909,7 +5937,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5930,7 +5958,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5950,7 +5978,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5975,7 +6003,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -6006,7 +6034,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -6031,7 +6059,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -6062,7 +6090,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -6072,7 +6100,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -6101,7 +6129,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6120,7 +6148,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6150,7 +6178,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6175,7 +6203,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6210,7 +6238,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -6221,7 +6249,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6248,7 +6276,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6275,7 +6303,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6301,7 +6329,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6327,7 +6355,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6349,7 +6377,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6375,7 +6403,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6393,7 +6421,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6417,7 +6445,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6441,7 +6469,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6459,7 +6487,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6484,7 +6512,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6507,7 +6535,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6531,7 +6559,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6555,7 +6583,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -6642,7 +6670,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6663,7 +6691,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6712,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6733,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6754,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6775,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6796,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6817,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6838,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +6859,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6851,7 +6879,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6864,7 +6892,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6896,7 +6924,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6932,7 +6960,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6963,7 +6991,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.JLS4, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -6988,7 +7016,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7019,7 +7047,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.JLS4, sourceUnit, false);
+		runConversion(getJLS4(), sourceUnit, false);
 	}
 
 	/**
@@ -7028,7 +7056,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7046,7 +7074,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7071,7 +7099,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7093,7 +7121,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +7142,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7133,7 +7161,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7161,7 +7189,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7184,7 +7212,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.JLS4, source, "Test.java", project, true); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7209,7 +7237,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.JLS4, source, "Object.java", project, true); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7230,7 +7258,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7251,7 +7279,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7276,7 +7304,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7299,7 +7327,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7324,7 +7352,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7373,7 +7401,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7418,7 +7446,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7449,7 +7477,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertNotNull("No result", result); //$NON-NLS-1$
 		assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7466,7 +7494,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7502,7 +7530,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertNotNull("No result", result); //$NON-NLS-1$
 		assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -7515,7 +7543,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7553,7 +7581,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7566,7 +7594,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7600,7 +7628,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7625,7 +7653,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7638,13 +7666,13 @@
 		ITypeBinding typeBinding = arrayType.resolveBinding();
 		checkSourceRange(type, "java.lang.Object[][]", source); //$NON-NLS-1$
 		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
-		Type elementType = arrayType.getComponentType();
+		Type elementType = componentType(arrayType);
 		ITypeBinding typeBinding2 = elementType.resolveBinding();
 		assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
 		assertEquals("wrong dimension", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
 		assertEquals("wrong name", "Object[]", typeBinding2.getName());		 //$NON-NLS-1$ //$NON-NLS-2$
 		assertTrue("Not an array type", elementType.isArrayType()); //$NON-NLS-1$
-		Type elementType2 = ((ArrayType) elementType).getComponentType();
+		Type elementType2 = componentType(((ArrayType) elementType));
 		assertTrue("Not a simple type", elementType2.isSimpleType()); //$NON-NLS-1$
 		ITypeBinding typeBinding3 = elementType2.resolveBinding();
 		assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
@@ -7657,7 +7685,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7681,7 +7709,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7708,7 +7736,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7735,7 +7763,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7762,7 +7790,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -7779,7 +7807,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7808,7 +7836,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7849,7 +7877,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7889,7 +7917,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7922,7 +7950,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7949,7 +7977,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertNotNull("No compilation unit", result); //$NON-NLS-1$
 		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
 	}
@@ -7959,7 +7987,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7985,7 +8013,7 @@
 		ITypeBinding typeBinding3 = simpleType.resolveBinding();
 		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
 		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType2 = (ArrayType) type;
 		ITypeBinding typeBinding4 = arrayType2.resolveBinding();
@@ -7999,7 +8027,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8027,14 +8055,14 @@
 		ITypeBinding typeBinding3 = simpleType.resolveBinding();
 		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
 		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType2 = (ArrayType) type;
 		checkSourceRange(arrayType2, "Object[10][]", source); //$NON-NLS-1$
 		ITypeBinding typeBinding4 = arrayType2.resolveBinding();
 		assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
 		assertEquals("wrong name", "Object[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType2.getComponentType();
+		type = componentType(arrayType2);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType3 = (ArrayType) type;
 		ITypeBinding typeBinding5 = arrayType3.resolveBinding();
@@ -8049,7 +8077,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8083,7 +8111,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8116,7 +8144,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8137,7 +8165,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8146,7 +8174,7 @@
 		assertNotNull("not null", node); //$NON-NLS-1$
 		assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
-		List thrownExceptions = methodDeclaration.thrownExceptions();
+		List thrownExceptions = internalThrownExceptions(methodDeclaration);
 		assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
 		Name name = (Name) thrownExceptions.get(0);
 		IBinding binding = name.resolveBinding();
@@ -8160,7 +8188,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8196,7 +8224,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8251,7 +8279,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8369,7 +8397,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8400,7 +8428,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.JLS4, sourceUnit, true);
+			ASTNode result = runConversion(getJLS4(), 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;
@@ -8419,7 +8447,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8473,7 +8501,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8509,7 +8537,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8535,7 +8563,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8561,7 +8589,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8587,7 +8615,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8613,7 +8641,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8646,7 +8674,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8679,7 +8707,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8713,7 +8741,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8725,7 +8753,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8749,7 +8777,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8782,7 +8810,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8801,7 +8829,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8820,7 +8848,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8838,7 +8866,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8856,7 +8884,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8874,7 +8902,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -8928,7 +8956,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8952,7 +8980,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -8975,7 +9003,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9001,7 +9029,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9022,7 +9050,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9043,7 +9071,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9064,7 +9092,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9085,7 +9113,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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();
@@ -9106,7 +9134,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9127,7 +9155,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9148,7 +9176,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9174,7 +9202,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9199,7 +9227,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9218,7 +9246,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9241,7 +9269,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9264,7 +9292,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9283,7 +9311,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -9297,7 +9325,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9325,7 +9353,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9343,7 +9371,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9361,7 +9389,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9379,7 +9407,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9397,7 +9425,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9410,7 +9438,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9435,7 +9463,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9458,7 +9486,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9477,7 +9505,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9496,7 +9524,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9516,7 +9544,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9536,7 +9564,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9557,7 +9585,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9587,7 +9615,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9611,7 +9639,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -9641,7 +9669,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9673,7 +9701,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9705,7 +9733,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -9730,7 +9758,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -9747,7 +9775,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 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/ASTConverterAST8Test.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java
new file mode 100644
index 0000000..c28118c
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterAST8Test.java
@@ -0,0 +1,9781 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.core.tests.dom;
+
+import java.util.*;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.*;
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.jdom.*;
+import org.eclipse.jdt.core.util.IModifierConstants;
+
+public class ASTConverterAST8Test extends ConverterTestSetup {
+
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(AST.JLS8);
+	}
+
+	public ASTConverterAST8Test(String name) {
+		super(name);
+	}
+
+	static {
+//		TESTS_NUMBERS = new int[] { 356 };
+//		TESTS_NAMES = new String[]{ "test0393" };
+	}
+	public static Test suite() {
+		return buildModelTestSuite(ASTConverterAST8Test.class);
+	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private static List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	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);
+
+		// check that we have the right tree
+		CompilationUnit unit = this.ast.newCompilationUnit();
+		PackageDeclaration packageDeclaration = this.ast.newPackageDeclaration();
+		packageDeclaration.setName(this.ast.newSimpleName("test0001"));//$NON-NLS-1$
+		unit.setPackage(packageDeclaration);
+		ImportDeclaration importDeclaration = this.ast.newImportDeclaration();
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newSimpleName("java"),//$NON-NLS-1$
+				this.ast.newSimpleName("util"));//$NON-NLS-1$
+		importDeclaration.setName(name);
+		importDeclaration.setOnDemand(true);
+		unit.imports().add(importDeclaration);
+		TypeDeclaration type = this.ast.newTypeDeclaration();
+		type.setInterface(false);
+		type.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
+		type.setName(this.ast.newSimpleName("Test"));//$NON-NLS-1$
+		MethodDeclaration methodDeclaration = this.ast.newMethodDeclaration();
+		methodDeclaration.setConstructor(false);
+		methodDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
+		methodDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
+		methodDeclaration.setName(this.ast.newSimpleName("main"));//$NON-NLS-1$
+		methodDeclaration.setReturnType2(this.ast.newPrimitiveType(PrimitiveType.VOID));
+		SingleVariableDeclaration variableDeclaration = this.ast.newSingleVariableDeclaration();
+		variableDeclaration.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String"))));//$NON-NLS-1$
+		variableDeclaration.setName(this.ast.newSimpleName("args"));//$NON-NLS-1$
+		methodDeclaration.parameters().add(variableDeclaration);
+		org.eclipse.jdt.core.dom.Block block = this.ast.newBlock();
+		MethodInvocation methodInvocation = this.ast.newMethodInvocation();
+		name =
+			this.ast.newQualifiedName(
+				this.ast.newSimpleName("System"),//$NON-NLS-1$
+				this.ast.newSimpleName("out"));//$NON-NLS-1$
+		methodInvocation.setExpression(name);
+		methodInvocation.setName(this.ast.newSimpleName("println")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		StringLiteral literal = this.ast.newStringLiteral();
+		literal.setLiteralValue("Hello");//$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newStringLiteral();
+		literal.setLiteralValue(" world");//$NON-NLS-1$
+		infixExpression.setRightOperand(literal);//$NON-NLS-1$
+		methodInvocation.arguments().add(infixExpression);
+		ExpressionStatement expressionStatement = this.ast.newExpressionStatement(methodInvocation);
+		block.statements().add(expressionStatement);
+		methodDeclaration.setBody(block);
+		type.bodyDeclarations().add(methodDeclaration);
+		unit.types().add(type);
+		assertTrue("Both AST trees should be identical", result.subtreeMatch(new ASTMatcher(), unit));//$NON-NLS-1$
+		String expected =
+			"package test0001;\n" +
+			"import java.util.*;\n" +
+			"public class Test {\n" +
+			"	public static void main(String[] args) {\n" +
+			"		System.out.println(\"Hello\" + \" world\");\n" +
+			"	}\n" +
+			"}";
+		checkSourceRange(result, expected, source);
+	}
+
+	/**
+	 * Test allocation expression: new Object() ==> ClassInstanceCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+		classInstanceCreation.setType(this.ast.newSimpleType(this.ast.newSimpleName("Object"))); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new Object()", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new java.lang.Object() ==> ClassInstanceCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newQualifiedName(
+					this.ast.newSimpleName("java"), //$NON-NLS-1$
+					this.ast.newSimpleName("lang")), //$NON-NLS-1$
+				this.ast.newSimpleName("Object"));//$NON-NLS-1$
+		classInstanceCreation.setType(this.ast.newSimpleType(name));
+		assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new java.lang.Object()", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new java.lang.Exception("ERROR") ==> ClassInstanceCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newQualifiedName(
+					this.ast.newSimpleName("java"), //$NON-NLS-1$
+					this.ast.newSimpleName("lang")), //$NON-NLS-1$
+				this.ast.newSimpleName("Exception"));//$NON-NLS-1$
+		classInstanceCreation.setType(this.ast.newSimpleType(name));
+		StringLiteral literal = this.ast.newStringLiteral();
+		literal.setLiteralValue("ERROR"); //$NON-NLS-1$
+		classInstanceCreation.arguments().add(literal);
+		assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new java.lang.Exception(\"ERROR\")", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new java.lang.Object() {} ==> ClassInstanceCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newQualifiedName(
+					this.ast.newSimpleName("java"), //$NON-NLS-1$
+					this.ast.newSimpleName("lang")), //$NON-NLS-1$
+				this.ast.newSimpleName("Object"));//$NON-NLS-1$
+		classInstanceCreation.setType(this.ast.newSimpleType(name));
+		AnonymousClassDeclaration anonymousClassDeclaration = this.ast.newAnonymousClassDeclaration();
+		classInstanceCreation.setAnonymousClassDeclaration(anonymousClassDeclaration);
+		assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new java.lang.Object() {}", source); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation2 = (ClassInstanceCreation) expression;
+		Type type = classInstanceCreation2.getType();
+		checkSourceRange(type, "java.lang.Object", source); //$NON-NLS-1$
+	}
+
+
+	/**
+	 * Test allocation expression: new java.lang.Runnable() { public void run() {}} ==> ClassInstanceCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newQualifiedName(
+					this.ast.newSimpleName("java"), //$NON-NLS-1$
+					this.ast.newSimpleName("lang")), //$NON-NLS-1$
+				this.ast.newSimpleName("Runnable"));//$NON-NLS-1$
+		classInstanceCreation.setType(this.ast.newSimpleType(name));
+		MethodDeclaration methodDeclaration = this.ast.newMethodDeclaration();
+		methodDeclaration.setBody(this.ast.newBlock());
+		methodDeclaration.setConstructor(false);
+		methodDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
+		methodDeclaration.setName(this.ast.newSimpleName("run"));//$NON-NLS-1$
+		methodDeclaration.setReturnType2(this.ast.newPrimitiveType(PrimitiveType.VOID));
+		AnonymousClassDeclaration anonymousClassDeclaration = this.ast.newAnonymousClassDeclaration();
+		anonymousClassDeclaration.bodyDeclarations().add(methodDeclaration);
+		classInstanceCreation.setAnonymousClassDeclaration(anonymousClassDeclaration);
+		assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new java.lang.Runnable() { public void run() {}}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new Test().new D() ==> ClassInstanceCreation
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		ASTNode expression = (ASTNode) ((MethodInvocation) expressionStatement.getExpression()).arguments().get(0);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = this.ast.newClassInstanceCreation();
+		classInstanceCreation.setType(this.ast.newSimpleType(this.ast.newSimpleName("D"))); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreationExpression = this.ast.newClassInstanceCreation();
+		classInstanceCreationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("Test"))); //$NON-NLS-1$
+		classInstanceCreation.setExpression(classInstanceCreationExpression);
+		assertTrue("Both AST trees should be identical", classInstanceCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new Test().new D()", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new int[] {1, 2, 3, 4} ==> ArrayCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ArrayCreation arrayCreation = this.ast.newArrayCreation();
+		arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
+		ArrayInitializer arrayInitializer = this.ast.newArrayInitializer();
+		arrayInitializer.expressions().add(this.ast.newNumberLiteral("1"));//$NON-NLS-1$
+		arrayInitializer.expressions().add(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
+		arrayInitializer.expressions().add(this.ast.newNumberLiteral("3"));//$NON-NLS-1$
+		arrayInitializer.expressions().add(this.ast.newNumberLiteral("4"));//$NON-NLS-1$
+		arrayCreation.setInitializer(arrayInitializer);
+		assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new int[] {1, 2, 3, 4}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new int[][] {{1}, {2}} ==> ArrayCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ArrayCreation arrayCreation = this.ast.newArrayCreation();
+		arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
+		ArrayInitializer arrayInitializer = this.ast.newArrayInitializer();
+		ArrayInitializer innerArrayInitializer = this.ast.newArrayInitializer();
+		innerArrayInitializer.expressions().add(this.ast.newNumberLiteral("1"));//$NON-NLS-1$
+		arrayInitializer.expressions().add(innerArrayInitializer);
+		innerArrayInitializer = this.ast.newArrayInitializer();
+		innerArrayInitializer.expressions().add(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
+		arrayInitializer.expressions().add(innerArrayInitializer);
+		arrayCreation.setInitializer(arrayInitializer);
+		assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new int[][] {{1}, {2}}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new int[3] ==> ArrayCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ArrayCreation arrayCreation = this.ast.newArrayCreation();
+		arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
+		arrayCreation.dimensions().add(this.ast.newNumberLiteral("3")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new int[3]", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new int[3][] ==> ArrayCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ArrayCreation arrayCreation = this.ast.newArrayCreation();
+		arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
+		arrayCreation.dimensions().add(this.ast.newNumberLiteral("3")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new int[3][]", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test allocation expression: new int[][] {{},{}} ==> ArrayCreation
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		ArrayCreation arrayCreation = this.ast.newArrayCreation();
+		arrayCreation.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 2));
+		ArrayInitializer arrayInitializer = this.ast.newArrayInitializer();
+		ArrayInitializer innerArrayInitializer = this.ast.newArrayInitializer();
+		arrayInitializer.expressions().add(innerArrayInitializer);
+		innerArrayInitializer = this.ast.newArrayInitializer();
+		arrayInitializer.expressions().add(innerArrayInitializer);
+		arrayCreation.setInitializer(arrayInitializer);
+		assertTrue("Both AST trees should be identical", arrayCreation.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "new int[][] {{}, {}}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * int i; ==> VariableDeclarationFragment
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * int i = 0; ==> VariableDeclarationFragment
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i = 0;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i = 1; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("1")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i = 1;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i += 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.PLUS_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i += 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i -= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.MINUS_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i -= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i *= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.TIMES_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i *= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i /= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.DIVIDE_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i /= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i &= 2 ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.BIT_AND_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i &= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i |= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.BIT_OR_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i |= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i ^= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.BIT_XOR_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i ^= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i %= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.REMAINDER_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i %= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i <<= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.LEFT_SHIFT_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i <<= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i >>= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.RIGHT_SHIFT_SIGNED_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i >>= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i >>>= 2; ==> ExpressionStatement(Assignment)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Assignment assignment = this.ast.newAssignment();
+		assignment.setLeftHandSide(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		assignment.setRightHandSide(this.ast.newNumberLiteral("2")); //$NON-NLS-1$
+		assignment.setOperator(Assignment.Operator.RIGHT_SHIFT_UNSIGNED_ASSIGN);
+		ExpressionStatement statement = this.ast.newExpressionStatement(assignment);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i >>>= 2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * --i; ==> ExpressionStatement(PrefixExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		prefixExpression.setOperator(PrefixExpression.Operator.DECREMENT);//$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(prefixExpression);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "--i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * --i; ==> ExpressionStatement(PrefixExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);//$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(prefixExpression);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "++i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i--; ==> ExpressionStatement(PostfixExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.DECREMENT);//$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(postfixExpression);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i--;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * i++; ==> ExpressionStatement(PostfixExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);//$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(postfixExpression);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "i++;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * (String) o; ==> ExpressionStatement(CastExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+		CastExpression castExpression = this.ast.newCastExpression();
+		castExpression.setExpression(this.ast.newSimpleName("o"));//$NON-NLS-1$
+		castExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(castExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "String s = (String) o;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * (int) d; ==> ExpressionStatement(CastExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		CastExpression castExpression = this.ast.newCastExpression();
+		castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+		castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(castExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i = (int) d;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * (float) d; ==> ExpressionStatement(CastExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("f")); //$NON-NLS-1$
+		CastExpression castExpression = this.ast.newCastExpression();
+		castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+		castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.FLOAT));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(castExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.FLOAT));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "float f = (float) d;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * (byte) d; ==> ExpressionStatement(CastExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		CastExpression castExpression = this.ast.newCastExpression();
+		castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+		castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.BYTE));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(castExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BYTE));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "byte b = (byte) d;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * (short) d; ==> ExpressionStatement(CastExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+		CastExpression castExpression = this.ast.newCastExpression();
+		castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+		castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.SHORT));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(castExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.SHORT));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "short s = (short) d;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * (long) d; ==> ExpressionStatement(CastExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("l")); //$NON-NLS-1$
+		CastExpression castExpression = this.ast.newCastExpression();
+		castExpression.setExpression(this.ast.newSimpleName("d"));//$NON-NLS-1$
+		castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(castExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "long l = (long) d;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * (char) i; ==> ExpressionStatement(CastExpression)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+		CastExpression castExpression = this.ast.newCastExpression();
+		castExpression.setExpression(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		castExpression.setType(this.ast.newPrimitiveType(PrimitiveType.CHAR));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(castExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.CHAR));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "char c = (char) i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * int.class; ==> ExpressionStatement(TypeLiteral)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+		TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+		typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		variableDeclarationFragment.setInitializer(typeLiteral);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "int.class", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * void.class; ==> ExpressionStatement(TypeLiteral)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+		TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+		typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.VOID));
+		variableDeclarationFragment.setInitializer(typeLiteral);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "void.class", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * double.class; ==> ExpressionStatement(TypeLiteral)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+		TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+		typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.DOUBLE));
+		variableDeclarationFragment.setInitializer(typeLiteral);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "double.class", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * long.class; ==> ExpressionStatement(TypeLiteral)
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("c")); //$NON-NLS-1$
+		TypeLiteral typeLiteral = this.ast.newTypeLiteral();
+		typeLiteral.setType(this.ast.newPrimitiveType(PrimitiveType.LONG));
+		variableDeclarationFragment.setInitializer(typeLiteral);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newSimpleType(this.ast.newSimpleName("Class")));//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(((VariableDeclarationFragment)((VariableDeclarationStatement)node).fragments().get(0)).getInitializer(), "long.class", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * false ==> BooleanLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		BooleanLiteral literal = this.ast.newBooleanLiteral(false);
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "false", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * true ==> BooleanLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		BooleanLiteral literal = this.ast.newBooleanLiteral(true);
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "true", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * null ==> NullLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NullLiteral literal = this.ast.newNullLiteral();
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "null", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * CharLiteral ==> CharacterLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		CharacterLiteral literal = this.ast.newCharacterLiteral();
+		literal.setEscapedValue("'c'"); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "'c'", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * DoubleLiteral ==> NumberLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral("1.00001");//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "1.00001", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * FloatLiteral ==> NumberLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral("1.00001f");//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "1.00001f", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * IntLiteral ==> NumberLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral("30000");//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "30000", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * IntLiteralMinValue ==> NumberLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral("-2147483648");//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "-2147483648", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * LongLiteral ==> NumberLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral("2147483648L");//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "2147483648L", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * LongLiteral ==> NumberLiteral (negative value)
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral("2147483648L");//$NON-NLS-1$
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperand(literal);
+		prefixExpression.setOperator(PrefixExpression.Operator.MINUS);
+		assertTrue("Both AST trees should be identical", prefixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "-2147483648L", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * LongLiteralMinValue ==> NumberLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral("-9223372036854775808L");//$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", literal.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "-9223372036854775808L", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ExtendedStringLiteral ==> StringLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		/*
+		StringLiteral literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("Hello World");*/
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		StringLiteral literal = this.ast.newStringLiteral();
+		literal.setLiteralValue("Hello");//$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newStringLiteral();
+		literal.setLiteralValue(" World");//$NON-NLS-1$
+		infixExpression.setRightOperand(literal);//$NON-NLS-1$
+
+		assertTrue("Both AST trees should be identical", infixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "\"Hello\" + \" World\"", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * AND_AND_Expression ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b3")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.CONDITIONAL_AND);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b3 = b && b2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * OR_OR_Expression ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b3")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.CONDITIONAL_OR);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b3 = b || b2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * EqualExpression ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b3")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.EQUALS);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b3 = b == b2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (+) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i + j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (-) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.MINUS);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i - j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (*) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.TIMES);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i * j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (/) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.DIVIDE);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i / j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (%) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.REMAINDER);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i % j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (^) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.XOR);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i ^ j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (&) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.AND);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i & j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (|) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.OR);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = i | j;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (<) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b1")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.LESS);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b2 = b < b1;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (<=) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b1")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.LESS_EQUALS);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b2 = b <= b1;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (>) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b1")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.GREATER);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b2 = b > b1;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (>=) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b1")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.GREATER_EQUALS);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b2 = b >= b1;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression (!=) ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b2")); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		infixExpression.setRightOperand(this.ast.newSimpleName("b1")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.NOT_EQUALS);
+		variableDeclarationFragment.setInitializer(infixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b2 = b != b1;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * InstanceofExpression ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		InstanceofExpression instanceOfExpression = this.ast.newInstanceofExpression();
+		instanceOfExpression.setLeftOperand(this.ast.newSimpleName("o"));//$NON-NLS-1$
+		SimpleType simpleType = this.ast.newSimpleType(this.ast.newSimpleName("Integer"));//$NON-NLS-1$
+		instanceOfExpression.setRightOperand(simpleType);
+		variableDeclarationFragment.setInitializer(instanceOfExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b = o instanceof Integer;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * InstanceofExpression ==> InfixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		InstanceofExpression instanceOfExpression = this.ast.newInstanceofExpression();
+		instanceOfExpression.setLeftOperand(this.ast.newSimpleName("o")); //$NON-NLS-1$
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newQualifiedName(
+					this.ast.newSimpleName("java"), //$NON-NLS-1$
+					this.ast.newSimpleName("lang")), //$NON-NLS-1$
+				this.ast.newSimpleName("Integer")); //$NON-NLS-1$
+		Type type = this.ast.newSimpleType(name);
+		instanceOfExpression.setRightOperand(type);
+		variableDeclarationFragment.setInitializer(instanceOfExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b = o instanceof java.lang.Integer;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * UnaryExpression (!) ==> PrefixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b1")); //$NON-NLS-1$
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperator(PrefixExpression.Operator.NOT);
+		prefixExpression.setOperand(this.ast.newSimpleName("b"));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(prefixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b1 = !b;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * UnaryExpression (~) ==> PrefixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("n")); //$NON-NLS-1$
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperator(PrefixExpression.Operator.COMPLEMENT);
+		prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(prefixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int n = ~i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * UnaryExpression (+) ==> PrefixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperator(PrefixExpression.Operator.PLUS);
+		prefixExpression.setOperand(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(prefixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i = +2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * UnaryExpression (-) ==> PrefixExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperator(PrefixExpression.Operator.MINUS);
+		prefixExpression.setOperand(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(prefixExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i = -2;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ConditionalExpression ==> ConditionalExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("b")); //$NON-NLS-1$
+		ConditionalExpression conditionalExpression = this.ast.newConditionalExpression();
+		InfixExpression condition = this.ast.newInfixExpression();
+		condition.setLeftOperand(this.ast.newSimpleName("args")); //$NON-NLS-1$
+		condition.setRightOperand(this.ast.newNullLiteral()); //$NON-NLS-1$
+		condition.setOperator(InfixExpression.Operator.NOT_EQUALS);
+		conditionalExpression.setExpression(condition);
+		conditionalExpression.setThenExpression(this.ast.newBooleanLiteral(true));
+		conditionalExpression.setElseExpression(this.ast.newBooleanLiteral(false));
+		variableDeclarationFragment.setInitializer(conditionalExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.BOOLEAN));
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "boolean b = args != null ? true : false;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ConditionalExpression ==> ConditionalExpression
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		ConditionalExpression conditionalExpression = this.ast.newConditionalExpression();
+		conditionalExpression.setExpression(this.ast.newBooleanLiteral(true));
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newSimpleName("args"), //$NON-NLS-1$
+				this.ast.newSimpleName("length")); //$NON-NLS-1$
+		conditionalExpression.setThenExpression(name);
+		conditionalExpression.setElseExpression(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(conditionalExpression);
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i = true ? args.length: 0;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * MessageSend ==> SuperMethodInvocation
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
+		superMethodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(superMethodInvocation);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "super.bar();", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * MessageSend ==> SuperMethodInvocation
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		SuperMethodInvocation superMethodInvocation = this.ast.newSuperMethodInvocation();
+		superMethodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
+		superMethodInvocation.arguments().add(this.ast.newNumberLiteral("4"));//$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(superMethodInvocation);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "super.bar(4);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * MessageSend ==> MethodInvocation
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		MethodInvocation methodInvocation = this.ast.newMethodInvocation();
+		methodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
+		methodInvocation.arguments().add(this.ast.newNumberLiteral("4"));//$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(methodInvocation);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "bar(4);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * MessageSend ==> MethodInvocation
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		MethodInvocation methodInvocation = this.ast.newMethodInvocation();
+		methodInvocation.setName(this.ast.newSimpleName("bar")); //$NON-NLS-1$
+		methodInvocation.setExpression(this.ast.newThisExpression());
+		methodInvocation.arguments().add(this.ast.newNumberLiteral("4"));//$NON-NLS-1$
+		ExpressionStatement statement = this.ast.newExpressionStatement(methodInvocation);
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "this.bar(4);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement ==> ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		forStatement.setBody(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (;;);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement ==> ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+		variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		forStatement.initializers().add(variableDeclarationExpression);
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(postfixExpression);
+		forStatement.setBody(this.ast.newBlock());
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.LESS);
+		infixExpression.setRightOperand(this.ast.newNumberLiteral("10")); //$NON-NLS-1$
+		forStatement.setExpression(infixExpression);
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (int i = 0; i < 10; i++) {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement ==> ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+
+		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+		variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		forStatement.initializers().add(variableDeclarationExpression);
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(postfixExpression);
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.LESS);
+		infixExpression.setRightOperand(this.ast.newNumberLiteral("10")); //$NON-NLS-1$
+		forStatement.setExpression(infixExpression);
+		forStatement.setBody(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (int i = 0; i < 10; i++);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement ==> ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+
+		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+		variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		forStatement.initializers().add(variableDeclarationExpression);
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(postfixExpression);
+		forStatement.setBody(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (int i = 0;; i++);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement ==> ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(postfixExpression);
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.LESS);
+		infixExpression.setRightOperand(this.ast.newNumberLiteral("10")); //$NON-NLS-1$
+		forStatement.setExpression(infixExpression);
+		forStatement.setBody(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (; i < 10; i++);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement ==> ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(postfixExpression);
+		forStatement.setBody(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (;;i++);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * LocalDeclaration ==> VariableDeclarationStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * LocalDeclaration ==> VariableDeclarationStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newQualifiedName(
+					this.ast.newSimpleName("java"),//$NON-NLS-1$
+					this.ast.newSimpleName("lang")//$NON-NLS-1$
+				),
+				this.ast.newSimpleName("String") //$NON-NLS-1$
+			);
+		statement.setType(this.ast.newSimpleType(name));
+
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "java.lang.String s;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * LocalDeclaration ==> VariableDeclarationStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		ArrayInitializer initializer = this.ast.newArrayInitializer();
+		initializer.expressions().add(this.ast.newNumberLiteral("1"));//$NON-NLS-1$
+		initializer.expressions().add(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(initializer);
+		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
+
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(variableDeclarationFragment);
+		statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int[] tab = {1, 2};", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Argument ==> SingleVariableDeclaration
+	 */
+	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);
+		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$
+		SingleVariableDeclaration variableDeclaration = this.ast.newSingleVariableDeclaration();
+		variableDeclaration.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+		variableDeclaration.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", variableDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "String s", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Argument ==> SingleVariableDeclaration
+	 */
+	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);
+		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$
+		SingleVariableDeclaration variableDeclaration = this.ast.newSingleVariableDeclaration();
+		variableDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
+		variableDeclaration.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+		variableDeclaration.setName(this.ast.newSimpleName("s")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", variableDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "final String s", source); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 0, node.getExtraDimensions()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Break ==> BreakStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		ForStatement forStatement = (ForStatement) node;
+		BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
+		assertNotNull("Expression should not be null", statement); //$NON-NLS-1$
+		BreakStatement breakStatement = this.ast.newBreakStatement();
+		assertTrue("Both AST trees should be identical", breakStatement.subtreeMatch(new ASTMatcher(), statement));		//$NON-NLS-1$
+		checkSourceRange(statement, "break;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Continue ==> ContinueStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		ForStatement forStatement = (ForStatement) node;
+		ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
+		assertNotNull("Expression should not be null", statement); //$NON-NLS-1$
+		ContinueStatement continueStatement = this.ast.newContinueStatement();
+		assertTrue("Both AST trees should be identical", continueStatement.subtreeMatch(new ASTMatcher(), statement));		//$NON-NLS-1$
+		checkSourceRange(statement, "continue;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Continue with Label ==> ContinueStatement
+	 */
+	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);
+		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
+		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
+		ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
+		assertNotNull("Expression should not be null", statement); //$NON-NLS-1$
+		ContinueStatement continueStatement = this.ast.newContinueStatement();
+		continueStatement.setLabel(this.ast.newSimpleName("label")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", continueStatement.subtreeMatch(new ASTMatcher(), statement));		//$NON-NLS-1$
+		checkSourceRange(statement, "continue label;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Break + label  ==> BreakStatement
+	 */
+	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);
+		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
+		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
+		BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
+		assertNotNull("Expression should not be null", statement); //$NON-NLS-1$
+		BreakStatement breakStatement = this.ast.newBreakStatement();
+		breakStatement.setLabel(this.ast.newSimpleName("label")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", breakStatement.subtreeMatch(new ASTMatcher(), statement));		//$NON-NLS-1$
+		checkSourceRange(statement, "break label;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * SwitchStatement ==> SwitchStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		SwitchStatement switchStatement = this.ast.newSwitchStatement();
+		switchStatement.setExpression(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		SwitchCase _case = this.ast.newSwitchCase();
+		_case.setExpression(this.ast.newNumberLiteral("1"));//$NON-NLS-1$
+		switchStatement.statements().add(_case);
+		switchStatement.statements().add(this.ast.newBreakStatement());
+		_case = this.ast.newSwitchCase();
+		_case.setExpression(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
+		switchStatement.statements().add(_case);
+		MethodInvocation methodInvocation = this.ast.newMethodInvocation();
+		QualifiedName name =
+			this.ast.newQualifiedName(
+				this.ast.newSimpleName("System"),//$NON-NLS-1$
+				this.ast.newSimpleName("out"));//$NON-NLS-1$
+		methodInvocation.setExpression(name);
+		methodInvocation.setName(this.ast.newSimpleName("println")); //$NON-NLS-1$
+		methodInvocation.arguments().add(this.ast.newNumberLiteral("2"));//$NON-NLS-1$
+		ExpressionStatement expressionStatement = this.ast.newExpressionStatement(methodInvocation);
+		switchStatement.statements().add(expressionStatement);
+		switchStatement.statements().add(this.ast.newBreakStatement());
+		_case = this.ast.newSwitchCase();
+		_case.setExpression(null);
+		switchStatement.statements().add(_case);
+		methodInvocation = this.ast.newMethodInvocation();
+		name =
+			this.ast.newQualifiedName(
+				this.ast.newSimpleName("System"),//$NON-NLS-1$
+				this.ast.newSimpleName("out"));//$NON-NLS-1$
+		methodInvocation.setExpression(name);
+		methodInvocation.setName(this.ast.newSimpleName("println")); //$NON-NLS-1$
+		StringLiteral literal = this.ast.newStringLiteral();
+		literal.setLiteralValue("default");	//$NON-NLS-1$
+		methodInvocation.arguments().add(literal);
+		expressionStatement = this.ast.newExpressionStatement(methodInvocation);
+		switchStatement.statements().add(expressionStatement);
+		assertTrue("Both AST trees should be identical", switchStatement.subtreeMatch(new ASTMatcher(), node));	//$NON-NLS-1$
+		String expectedSource = "switch(i) {\n" +//$NON-NLS-1$
+			 "			case 1: \n" +//$NON-NLS-1$
+			 "              break;\n" +//$NON-NLS-1$
+			 "			case 2:\n" +//$NON-NLS-1$
+			 "				System.out.println(2);\n" +//$NON-NLS-1$
+			 "              break;\n" +//$NON-NLS-1$
+			 "          default:\n" +//$NON-NLS-1$
+			 "				System.out.println(\"default\");\n" +//$NON-NLS-1$
+			 "		}"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+		SwitchStatement switchStatement2 = (SwitchStatement) node;
+		List statements = switchStatement2.statements();
+		assertEquals("wrong size", 7, statements.size()); //$NON-NLS-1$
+		Statement stmt = (Statement) statements.get(5);
+		assertTrue("Not a case statement", stmt instanceof SwitchCase); //$NON-NLS-1$
+		SwitchCase switchCase = (SwitchCase) stmt;
+		assertTrue("Not the default case", switchCase.isDefault()); //$NON-NLS-1$
+	}
+
+	/**
+	 * EmptyStatement ==> EmptyStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		EmptyStatement emptyStatement = this.ast.newEmptyStatement();
+		assertTrue("Both AST trees should be identical", emptyStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, ";", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * DoStatement ==> DoStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		DoStatement doStatement = this.ast.newDoStatement();
+		Block block = this.ast.newBlock();
+		block.statements().add(this.ast.newEmptyStatement());
+		doStatement.setBody(block);
+		doStatement.setExpression(this.ast.newBooleanLiteral(true));
+		assertTrue("Both AST trees should be identical", doStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "do {;\n" +//$NON-NLS-1$
+			 "		} while(true);";//$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * WhileStatement ==> WhileStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		WhileStatement whileStatement = this.ast.newWhileStatement();
+		whileStatement.setExpression(this.ast.newBooleanLiteral(true));
+		whileStatement.setBody(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", whileStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "while(true);", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * WhileStatement ==> WhileStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		WhileStatement whileStatement = this.ast.newWhileStatement();
+		whileStatement.setExpression(this.ast.newBooleanLiteral(true));
+		whileStatement.setBody(this.ast.newBlock());
+		assertTrue("Both AST trees should be identical", whileStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "while(true) {}", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ExtendedStringLiteral ==> StringLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		StringLiteral literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("Hello"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue(" World"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+		literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("!"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		assertTrue("Both AST trees should be identical", infixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "\"Hello\" + \" World\" + \"!\"", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ExtendedStringLiteral ==> StringLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		StringLiteral literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("Hello"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue(" World"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+		literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("!"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("!"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		assertTrue("Both AST trees should be identical", infixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "\"Hello\" + \" World\" + \"!\" + \"!\"", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ExtendedStringLiteral ==> StringLiteral
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		StringLiteral literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("Hello"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue(" World"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+		literal = this.ast.newStringLiteral();//$NON-NLS-1$
+		literal.setLiteralValue("!"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		NumberLiteral numberLiteral = this.ast.newNumberLiteral();//$NON-NLS-1$
+		numberLiteral.setToken("4"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(numberLiteral);
+		assertTrue("Both AST trees should be identical", infixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "\"Hello\" + \" World\" + \"!\" + 4", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * NumberLiteral ==> InfixExpression
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		NumberLiteral literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("5"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("6"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		assertTrue("Both AST trees should be identical", infixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "4 + 5 + 6 + 4", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * NumberLiteral ==> InfixExpression
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.MINUS);
+		NumberLiteral literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("5"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+
+		InfixExpression infixExpression2 = this.ast.newInfixExpression();
+		infixExpression2.setOperator(InfixExpression.Operator.PLUS);
+		infixExpression2.setLeftOperand(infixExpression);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("6"); //$NON-NLS-1$
+		infixExpression2.setRightOperand(literal);
+
+		InfixExpression infixExpression3 = this.ast.newInfixExpression();
+		infixExpression3.setOperator(InfixExpression.Operator.PLUS);
+		infixExpression3.setLeftOperand(infixExpression2);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression3.setRightOperand(literal);
+
+		assertTrue("Both AST trees should be identical", infixExpression3.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "4 - 5 + 6 + 4", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * NumberLiteral ==> InfixExpression
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.MINUS);
+		NumberLiteral literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("5"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("6"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		assertTrue("Both AST trees should be identical", infixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "4 - 5 - 6 - 4", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * NumberLiteral ==> InfixExpression
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.PLUS);
+		StringLiteral stringLiteral = this.ast.newStringLiteral();//$NON-NLS-1$
+		stringLiteral.setLiteralValue("4"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(stringLiteral);
+		NumberLiteral literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("5"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("6"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression.extendedOperands().add(literal);
+		assertTrue("Both AST trees should be identical", infixExpression.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "\"4\" + 5 + 6 + 4", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * NumberLiteral ==> InfixExpression
+	 */
+	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 expression = getASTNodeToCompare((CompilationUnit) result);
+		assertNotNull("Expression should not be null", expression); //$NON-NLS-1$
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setOperator(InfixExpression.Operator.MINUS);
+		StringLiteral stringLiteral = this.ast.newStringLiteral();//$NON-NLS-1$
+		stringLiteral.setLiteralValue("4"); //$NON-NLS-1$
+		infixExpression.setLeftOperand(stringLiteral);
+		NumberLiteral literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("5"); //$NON-NLS-1$
+		infixExpression.setRightOperand(literal);
+
+		InfixExpression infixExpression2 = this.ast.newInfixExpression();
+		infixExpression2.setOperator(InfixExpression.Operator.PLUS);
+		infixExpression2.setLeftOperand(infixExpression);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("6"); //$NON-NLS-1$
+		infixExpression2.setRightOperand(literal);
+
+		InfixExpression infixExpression3 = this.ast.newInfixExpression();
+		infixExpression3.setOperator(InfixExpression.Operator.PLUS);
+		infixExpression3.setLeftOperand(infixExpression2);
+		literal = this.ast.newNumberLiteral();//$NON-NLS-1$
+		literal.setToken("4"); //$NON-NLS-1$
+		infixExpression3.setRightOperand(literal);
+
+		assertTrue("Both AST trees should be identical", infixExpression3.subtreeMatch(new ASTMatcher(), expression));		//$NON-NLS-1$
+		checkSourceRange(expression, "\"4\" - 5 + 6 + 4", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ReturnStatement ==> ReturnStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ReturnStatement returnStatement = this.ast.newReturnStatement();
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("2");//$NON-NLS-1$
+		returnStatement.setExpression(literal);
+		assertTrue("Both AST trees should be identical", returnStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "return 2;", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ReturnStatement ==> ReturnStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ReturnStatement returnStatement = this.ast.newReturnStatement();
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("2");//$NON-NLS-1$
+		returnStatement.setExpression(literal);
+		assertTrue("Both AST trees should be identical", returnStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "return 2\\u003B", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * SynchronizedStatement ==> SynchronizedStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		SynchronizedStatement synchronizedStatement = this.ast.newSynchronizedStatement();
+		synchronizedStatement.setExpression(this.ast.newThisExpression());
+		synchronizedStatement.setBody(this.ast.newBlock());
+		assertTrue("Both AST trees should be identical", synchronizedStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "synchronized(this) {\n" +//$NON-NLS-1$
+			 "		}"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * TryStatement ==> TryStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		TryStatement tryStatement = this.ast.newTryStatement();
+		tryStatement.setBody(this.ast.newBlock());
+		tryStatement.setFinally(this.ast.newBlock());
+		CatchClause catchBlock = this.ast.newCatchClause();
+		catchBlock.setBody(this.ast.newBlock());
+		SingleVariableDeclaration exceptionVariable = this.ast.newSingleVariableDeclaration();
+		exceptionVariable.setName(this.ast.newSimpleName("e"));//$NON-NLS-1$
+		exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
+		catchBlock.setException(exceptionVariable);
+		tryStatement.catchClauses().add(catchBlock);
+		assertTrue("Both AST trees should be identical", tryStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "try {\n" +//$NON-NLS-1$
+			 "		} catch(Exception e) {\n" +//$NON-NLS-1$
+			 "		} finally {\n" +//$NON-NLS-1$
+			 "		}"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * TryStatement ==> TryStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		TryStatement tryStatement = this.ast.newTryStatement();
+		tryStatement.setBody(this.ast.newBlock());
+		CatchClause catchBlock = this.ast.newCatchClause();
+		catchBlock.setBody(this.ast.newBlock());
+		SingleVariableDeclaration exceptionVariable = this.ast.newSingleVariableDeclaration();
+		exceptionVariable.setName(this.ast.newSimpleName("e"));//$NON-NLS-1$
+		exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
+		catchBlock.setException(exceptionVariable);
+		tryStatement.catchClauses().add(catchBlock);
+		assertTrue("Both AST trees should be identical", tryStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "try {\n" +//$NON-NLS-1$
+			 "		} catch(Exception e) {\n" +//$NON-NLS-1$
+			 "		}"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * TryStatement ==> TryStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		TryStatement tryStatement = this.ast.newTryStatement();
+		Block block = this.ast.newBlock();
+		ReturnStatement returnStatement = this.ast.newReturnStatement();
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("2");//$NON-NLS-1$
+		returnStatement.setExpression(literal);
+		block.statements().add(returnStatement);
+		tryStatement.setBody(block);
+		CatchClause catchBlock = this.ast.newCatchClause();
+		catchBlock.setBody(this.ast.newBlock());
+		SingleVariableDeclaration exceptionVariable = this.ast.newSingleVariableDeclaration();
+		exceptionVariable.setName(this.ast.newSimpleName("e"));//$NON-NLS-1$
+		exceptionVariable.setType(this.ast.newSimpleType(this.ast.newSimpleName("Exception")));//$NON-NLS-1$
+		catchBlock.setException(exceptionVariable);
+		tryStatement.catchClauses().add(catchBlock);
+		assertTrue("Both AST trees should be identical", tryStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "try {\n" +//$NON-NLS-1$
+			 "			return 2;\n" +//$NON-NLS-1$
+			 "		} catch(Exception e) {\n" +//$NON-NLS-1$
+			 "		}"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * ThrowStatement ==> ThrowStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ThrowStatement throwStatement = this.ast.newThrowStatement();
+		throwStatement.setExpression(this.ast.newSimpleName("e")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", throwStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "throw e   \\u003B", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ThrowStatement ==> ThrowStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ThrowStatement throwStatement = this.ast.newThrowStatement();
+		throwStatement.setExpression(this.ast.newSimpleName("e")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", throwStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "throw e /* comment in the middle of a throw */  \\u003B", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ThrowStatement ==> ThrowStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ThrowStatement throwStatement = this.ast.newThrowStatement();
+		throwStatement.setExpression(this.ast.newSimpleName("e")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", throwStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "throw e /* comment in the middle of a throw */  \\u003B", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * IfStatement ==> IfStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		IfStatement ifStatement = this.ast.newIfStatement();
+		ifStatement.setExpression(this.ast.newBooleanLiteral(true));
+		ifStatement.setThenStatement(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", ifStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "if (true)\\u003B", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * IfStatement ==> IfStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		IfStatement ifStatement = this.ast.newIfStatement();
+		ifStatement.setExpression(this.ast.newBooleanLiteral(true));
+		ifStatement.setThenStatement(this.ast.newEmptyStatement());
+		ifStatement.setElseStatement(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", ifStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "if (true)\\u003B\n" +//$NON-NLS-1$
+			 "\t\telse ;"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * IfStatement ==> IfStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		IfStatement ifStatement = this.ast.newIfStatement();
+		ifStatement.setExpression(this.ast.newBooleanLiteral(true));
+		ifStatement.setThenStatement(this.ast.newBlock());
+		ifStatement.setElseStatement(this.ast.newEmptyStatement());
+		assertTrue("Both AST trees should be identical", ifStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "if (true) {}\n" +//$NON-NLS-1$
+			 "		else ;"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * IfStatement ==> IfStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		IfStatement ifStatement = this.ast.newIfStatement();
+		ifStatement.setExpression(this.ast.newBooleanLiteral(true));
+		ReturnStatement returnStatement = this.ast.newReturnStatement();
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("2");//$NON-NLS-1$
+		returnStatement.setExpression(literal);
+		ifStatement.setThenStatement(returnStatement);
+		assertTrue("Both AST trees should be identical", ifStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "if (true) return 2\\u003B", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * IfStatement ==> IfStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		IfStatement ifStatement = this.ast.newIfStatement();
+		ifStatement.setExpression(this.ast.newBooleanLiteral(true));
+		ReturnStatement returnStatement = this.ast.newReturnStatement();
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("2");//$NON-NLS-1$
+		returnStatement.setExpression(literal);
+		ifStatement.setThenStatement(returnStatement);
+		returnStatement = this.ast.newReturnStatement();
+		literal = this.ast.newNumberLiteral();
+		literal.setToken("3");//$NON-NLS-1$
+		returnStatement.setExpression(literal);
+		ifStatement.setElseStatement(returnStatement);
+		assertTrue("Both AST trees should be identical", ifStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "if (true) return 2;\n" +//$NON-NLS-1$
+			 "		else return 3;"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * Multiple local declaration => VariabledeclarationStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("x"));//$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("10");//$NON-NLS-1$
+		fragment.setInitializer(literal);
+		fragment.extraDimensions().clear();
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
+		fragment.setInitializer(this.ast.newNullLiteral());
+		fragment.extraDimensions().clear();
+		fragment.extraDimensions().add(this.ast.newDimension());
+		statement.fragments().add(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		statement.fragments().add(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		fragment.extraDimensions().add(this.ast.newDimension());
+		fragment.extraDimensions().add(this.ast.newDimension());
+		statement.fragments().add(fragment);
+		statement.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((VariableDeclarationStatement) node).fragments().toArray(new VariableDeclarationFragment[4]);
+		assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
+		checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
+		checkSourceRange(fragments[1], "z[] = null", source);//$NON-NLS-1$
+		checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
+		checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
+		checkSourceRange(node, "int x= 10, z[] = null, i, j[][];", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * Multiple local declaration => VariabledeclarationStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("x"));//$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("10");//$NON-NLS-1$
+		fragment.setInitializer(literal);
+		fragment.extraDimensions().clear();
+		VariableDeclarationStatement statement = this.ast.newVariableDeclarationStatement(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("z"));//$NON-NLS-1$
+		fragment.setInitializer(this.ast.newNullLiteral());
+		fragment.extraDimensions().clear();
+		fragment.extraDimensions().add(this.ast.newDimension());
+		statement.fragments().add(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		statement.fragments().add(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		fragment.extraDimensions().add(this.ast.newDimension());
+		fragment.extraDimensions().add(this.ast.newDimension());
+		statement.fragments().add(fragment);
+		statement.setType(this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 1));
+		assertTrue("Both AST trees should be identical", statement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int[] x= 10, z[] = null, i, j[][];", source); //$NON-NLS-1$
+		VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((VariableDeclarationStatement) node).fragments().toArray(new VariableDeclarationFragment[4]);
+		assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
+		checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
+		checkSourceRange(fragments[1], "z[] = null", source);//$NON-NLS-1$
+		checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
+		checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
+		variableDeclarationFragment.extraDimensions().clear();
+		variableDeclarationFragment.extraDimensions().add(this.ast.newDimension());
+		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+		variableDeclarationExpression.setType(this.ast.newArrayType(this.ast.newSimpleType(this.ast.newSimpleName("String")), 1));//$NON-NLS-1$
+		forStatement.initializers().add(variableDeclarationExpression);
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(prefixExpression);
+		forStatement.setBody(this.ast.newBlock());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (String[] tab[] = null;; ++i) {}", source); //$NON-NLS-1$
+		checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "++i", source); //$NON-NLS-1$
+		checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String[] tab[] = null", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
+		variableDeclarationFragment.extraDimensions().clear();
+		variableDeclarationFragment.extraDimensions().add(this.ast.newDimension());
+		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+		variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+		forStatement.initializers().add(variableDeclarationExpression);
+		PrefixExpression prefixExpression = this.ast.newPrefixExpression();
+		prefixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		prefixExpression.setOperator(PrefixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(prefixExpression);
+		forStatement.setBody(this.ast.newBlock());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (String tab[] = null;; ++i) {}", source); //$NON-NLS-1$
+		checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "++i", source); //$NON-NLS-1$
+		checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String tab[] = null", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * ForStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+		VariableDeclarationFragment variableDeclarationFragment = this.ast.newVariableDeclarationFragment();
+		variableDeclarationFragment.setName(this.ast.newSimpleName("tab")); //$NON-NLS-1$
+		variableDeclarationFragment.setInitializer(this.ast.newNullLiteral());//$NON-NLS-1$
+		variableDeclarationFragment.extraDimensions().clear();
+		variableDeclarationFragment.extraDimensions().add(this.ast.newDimension());
+		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(variableDeclarationFragment);
+		variableDeclarationExpression.setType(this.ast.newSimpleType(this.ast.newSimpleName("String")));//$NON-NLS-1$
+		forStatement.initializers().add(variableDeclarationExpression);
+		PostfixExpression postfixExpression = this.ast.newPostfixExpression();
+		postfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		postfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(postfixExpression);
+		forStatement.setBody(this.ast.newBlock());
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (String tab[] = null;; i++/**/) {}", source); //$NON-NLS-1$
+		checkSourceRange((ASTNode) ((ForStatement) node).updaters().get(0), "i++", source); //$NON-NLS-1$
+		checkSourceRange((ASTNode) ((ForStatement) node).initializers().get(0), "String tab[] = null", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * FieldDeclaration
+	 */
+	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 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$
+		VariableDeclarationFragment frag = (VariableDeclarationFragment) ((FieldDeclaration) node).fragments().get(0);
+		assertTrue("Not a declaration", frag.getName().isDeclaration()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
+		fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * FieldDeclaration
+	 */
+	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 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$
+		VariableDeclarationFragment fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("x")); //$NON-NLS-1$
+		NumberLiteral literal = this.ast.newNumberLiteral();
+		literal.setToken("10"); //$NON-NLS-1$
+		fragment.setInitializer(literal);
+		fragment.extraDimensions().clear();
+		FieldDeclaration fieldDeclaration = this.ast.newFieldDeclaration(fragment);
+		fieldDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
+		fieldDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("y"));//$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		fragment.extraDimensions().add(this.ast.newDimension());
+		fragment.setInitializer(this.ast.newNullLiteral());
+		fieldDeclaration.fragments().add(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		fieldDeclaration.fragments().add(fragment);
+		fragment = this.ast.newVariableDeclarationFragment();
+		fragment.setName(this.ast.newSimpleName("j"));//$NON-NLS-1$
+		fragment.extraDimensions().clear();
+		fragment.extraDimensions().add(this.ast.newDimension());
+		fragment.extraDimensions().add(this.ast.newDimension());
+		fieldDeclaration.fragments().add(fragment);
+		assertTrue("Both AST trees should be identical", fieldDeclaration.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "public int x= 10, y[] = null, i, j[][];", source); //$NON-NLS-1$
+		VariableDeclarationFragment[] fragments = (VariableDeclarationFragment[])((FieldDeclaration) node).fragments().toArray(new VariableDeclarationFragment[4]);
+		assertTrue("fragments.length != 4", fragments.length == 4); //$NON-NLS-1$
+		checkSourceRange(fragments[0], "x= 10", source);//$NON-NLS-1$
+		checkSourceRange(fragments[1], "y[] = null", source);//$NON-NLS-1$
+		checkSourceRange(fragments[2], "i", source);//$NON-NLS-1$
+		checkSourceRange(fragments[3], "j[][]", source);//$NON-NLS-1$
+	}
+
+	/**
+	 * Argument with final modifier
+	 */
+	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 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$
+		assertTrue("Not a declaration", ((MethodDeclaration) node).getName().isDeclaration()); //$NON-NLS-1$
+		List parameters = ((MethodDeclaration) node).parameters();
+		assertTrue("Parameters.length != 1", parameters.size() == 1);		//$NON-NLS-1$
+		SingleVariableDeclaration arg = (SingleVariableDeclaration) ((MethodDeclaration) node).parameters().get(0);
+		SingleVariableDeclaration singleVariableDeclaration = this.ast.newSingleVariableDeclaration();
+		singleVariableDeclaration.modifiers().add(this.ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD));
+		singleVariableDeclaration.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		singleVariableDeclaration.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		assertTrue("Both AST trees should be identical", singleVariableDeclaration.subtreeMatch(new ASTMatcher(), arg));		//$NON-NLS-1$
+		checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+		checkSourceRange(arg, "final int i", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MethodDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
+		checkSourceRange(node, "/** JavaDoc Comment*/\n  void foo(final int i) {}", source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MethodDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MethodDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for FieldDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+//		Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+		checkSourceRange(node, "/** JavaDoc Comment*/\n  int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for FieldDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for FieldDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for TypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		String expectedContents = "public class Test {\n" +//$NON-NLS-1$
+			"  int i;\n"  +//$NON-NLS-1$
+			"}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for TypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		String expectedContents = "public class Test {\n" +//$NON-NLS-1$
+			"  int i;\n"  +//$NON-NLS-1$
+			"}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for TypeDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			"public class Test {\n" +//$NON-NLS-1$
+			"  int i;\n"  +//$NON-NLS-1$
+			"}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			 "  class B {}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "class B {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking initializers
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		checkSourceRange(node, "{}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking initializers
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		checkSourceRange(node, "static {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking initializers
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+		assertNotNull("Javadoc comment should no be null", actualJavadoc); //$NON-NLS-1$
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			 "  static {}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+
+	}
+
+	/**
+	 * Checking initializers
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+		assertNotNull("Javadoc comment should not be null", actualJavadoc); //$NON-NLS-1$
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			 "  {}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+
+	}
+
+	/**
+	 * Checking initializers
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+		assertNull("Javadoc comment should be null", actualJavadoc); //$NON-NLS-1$
+		checkSourceRange(node, "{}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking syntax error
+	 */
+	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);
+		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;
+		assertTrue("The compilation unit is malformed", !isMalformed(unit)); //$NON-NLS-1$
+		assertTrue("The package declaration is not malformed", isMalformed(unit.getPackage())); //$NON-NLS-1$
+		List imports = unit.imports();
+		assertTrue("The imports list size is not one", imports.size() == 1); //$NON-NLS-1$
+		assertTrue("The first import is malformed", !isMalformed((ASTNode) imports.get(0))); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking syntax error
+	 */
+	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);
+		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+		assertTrue("The compilation unit is malformed", !isMalformed(result)); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking syntax error
+	 */
+	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);
+		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);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		assertTrue("The type is malformed", !isMalformed(node)); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		assertTrue("The field is not malformed", isMalformed(node)); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		assertTrue("The method is not malformed", isMalformed(node)); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking syntax error
+	 */
+	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);
+		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);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		assertTrue("The method is not original", isOriginal(node)); //$NON-NLS-1$
+		assertTrue("The method is not malformed", isMalformed(node)); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking binding of package declaration
+	 */
+	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);
+		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;
+		IBinding binding = compilationUnit.getPackage().getName().resolveBinding();
+		assertNotNull("The package binding is null", binding); //$NON-NLS-1$
+		assertTrue("The binding is not a package binding", binding instanceof IPackageBinding); //$NON-NLS-1$
+		IPackageBinding packageBinding = (IPackageBinding) binding;
+		assertEquals("The package name is incorrect", "test0154", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = compilationUnit.getPackage().getName().resolveBinding();
+		assertTrue("The package binding is not canonical", binding == binding2); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking arguments positions
+	 */
+	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);
+		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);
+		assertTrue("The result is not a method declaration", node instanceof MethodDeclaration);  //$NON-NLS-1$
+		MethodDeclaration methodDecl = (MethodDeclaration) node;
+		List parameters = methodDecl.parameters();
+		assertTrue("The parameters size is different from 2", parameters.size() == 2);  //$NON-NLS-1$
+		Object parameter = parameters.get(0);
+		assertTrue("The parameter is not a SingleVariableDeclaration", parameter instanceof SingleVariableDeclaration);  //$NON-NLS-1$
+		checkSourceRange((ASTNode) parameter, "int i", source); //$NON-NLS-1$
+		parameter = parameters.get(1);
+		assertTrue("The parameter is not a SingleVariableDeclaration", parameter instanceof SingleVariableDeclaration);  //$NON-NLS-1$
+		checkSourceRange((ASTNode) parameter, "final boolean b", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking arguments positions
+	 */
+	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);
+		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);
+		assertTrue("The result is not a method declaration", node instanceof MethodDeclaration);  //$NON-NLS-1$
+		MethodDeclaration methodDecl = (MethodDeclaration) node;
+		List parameters = methodDecl.parameters();
+		assertTrue("The parameters size is different from 1", parameters.size() == 1);  //$NON-NLS-1$
+		Object parameter = parameters.get(0);
+		assertTrue("The parameter is not a SingleVariableDeclaration", parameter instanceof SingleVariableDeclaration);  //$NON-NLS-1$
+		checkSourceRange((ASTNode) parameter, "int i", source); //$NON-NLS-1$
+		Block block = methodDecl.getBody();
+		List statements = block.statements();
+		assertTrue("The statements size is different from 2", statements.size() == 2);  //$NON-NLS-1$
+		ASTNode statement = (ASTNode) statements.get(0);
+		assertTrue("The statements[0] is a postfixExpression statement", statement instanceof ExpressionStatement);  //$NON-NLS-1$
+	}
+
+	/**
+	 * Check canonic binding for fields
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
+		assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("This is not a field", bodyDeclaration instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) bodyDeclaration;
+		List variableFragments = fieldDeclaration.fragments();
+		assertTrue("The fragment list is empty", variableFragments.size() != 0); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableFragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("the field binding is null", variableBinding); //$NON-NLS-1$
+		assertFalse("Not a parameter", variableBinding.isParameter());
+		assertTrue("The field binding is not canonical", variableBinding == fragment.resolveBinding()); //$NON-NLS-1$
+		typeBinding = variableBinding.getType();
+		assertTrue("The type is not an array type", typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue("The type binding for the field is not canonical", typeBinding == variableBinding.getType()); //$NON-NLS-1$
+		SimpleName name = fragment.getName();
+		assertTrue("is a declaration", name.isDeclaration()); //$NON-NLS-1$
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("wrong type", IBinding.VARIABLE, binding.getKind()); //$NON-NLS-1$
+		assertTrue("not a field", ((IVariableBinding) binding).isField()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check canonic bindings for fields
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
+		assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
+		SimpleName simpleName = typeDeclaration.getName();
+		assertTrue("is a declaration", simpleName.isDeclaration()); //$NON-NLS-1$
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertEquals("wrong name", simpleName.getIdentifier(), binding.getName()); //$NON-NLS-1$
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("This is not a field", bodyDeclaration instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) bodyDeclaration;
+		List variableFragments = fieldDeclaration.fragments();
+		assertTrue("The fragment list is empty", variableFragments.size() != 0); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableFragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("the field binding is null", variableBinding); //$NON-NLS-1$
+		assertTrue("The field binding is not canonical", variableBinding == fragment.resolveBinding()); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = variableBinding.getType();
+		assertTrue("The type is not an array type", typeBinding2.isArray()); //$NON-NLS-1$
+		assertTrue("The type binding for the field is not canonical", typeBinding2 == variableBinding.getType()); //$NON-NLS-1$
+		assertTrue("The type binding for the field is not canonical with the declaration type binding", typeBinding == typeBinding2.getElementType()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Define an anonymous type
+	 */
+	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);
+		assertNotNull("Expression should not be null", result); //$NON-NLS-1$
+		assertTrue("The result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check bindings for multiple field declarations
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Type binding is null", typeBinding); //$NON-NLS-1$
+		assertTrue("The type binding is canonical", typeBinding == typeDeclaration.resolveBinding()); //$NON-NLS-1$
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertTrue("The body declaration list is empty", bodyDeclarations.size() != 0); //$NON-NLS-1$
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("This is not a field", bodyDeclaration instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) bodyDeclaration;
+		List variableFragments = fieldDeclaration.fragments();
+		assertTrue("The fragment list size is not 2", variableFragments.size() == 2); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableFragments.get(0);
+		IVariableBinding variableBinding1 = fragment.resolveBinding();
+		assertNotNull("the field binding is null", variableBinding1); //$NON-NLS-1$
+		assertTrue("The field binding is not canonical", variableBinding1 == fragment.resolveBinding()); //$NON-NLS-1$
+		ITypeBinding type1 = variableBinding1.getType();
+		assertNotNull("The type is null", type1); //$NON-NLS-1$
+		assertTrue("The field type is canonical", type1 == variableBinding1.getType()); //$NON-NLS-1$
+		assertTrue("The type is not an array type",type1.isArray()); //$NON-NLS-1$
+		assertTrue("The type dimension is 1", type1.getDimensions() == 1); //$NON-NLS-1$
+		fragment = (VariableDeclarationFragment) variableFragments.get(1);
+		IVariableBinding variableBinding2 = fragment.resolveBinding();
+		assertNotNull("the field binding is null", variableBinding2); //$NON-NLS-1$
+		assertTrue("The field binding is not canonical", variableBinding2 == fragment.resolveBinding()); //$NON-NLS-1$
+		ITypeBinding type2 = variableBinding2.getType();
+		type2 = variableBinding2.getType();
+		assertNotNull("The type is null", type2); //$NON-NLS-1$
+		assertTrue("The field type is canonical", type2 == variableBinding2.getType()); //$NON-NLS-1$
+		assertTrue("The type is not an array type",type2.isArray()); //$NON-NLS-1$
+		assertTrue("The type dimension is 2", type2.getDimensions() == 2); //$NON-NLS-1$
+		assertTrue("Element type is canonical", type1.getElementType() == type2.getElementType()); //$NON-NLS-1$
+		assertTrue("type1.id < type2.id", variableBinding1.getVariableId() < variableBinding2.getVariableId()); //$NON-NLS-1$
+
+	}
+
+	/**
+	 * Check ITypeBinding APIs:
+	 *  - getModifiers()
+	 *  - getElementType() when it is not an array type
+	 *  - getDimensions() when it is not an array type
+	 *  - getDeclaringClass()
+	 *  - getDeclaringName()
+	 *  - getName()
+	 *  - isNested()
+	 *  - isAnonymous()
+	 *  - isLocal()
+	 *  - isMember()
+	 *  - isArray()
+	 *  - getDeclaredMethods() => returns binding for default constructor
+	 *  - isPrimitive()
+	 *  - isTopLevel()
+	 *  - getSuperclass()
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("The type binding should not be null", typeBinding); //$NON-NLS-1$
+		assertEquals("The modifier is PUBLIC", Modifier.PUBLIC, typeBinding.getModifiers()); //$NON-NLS-1$
+		assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+		assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+		assertEquals("The name is not Test", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+		assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
+		assertTrue("A nested class", !typeBinding.isNested()); //$NON-NLS-1$
+		assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+		assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+		assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+		assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+		assertTrue("Is nested", typeBinding.isTopLevel()); //$NON-NLS-1$
+		assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+		ITypeBinding superclass = typeBinding.getSuperclass();
+		assertNotNull("No superclass", superclass); //$NON-NLS-1$
+		assertTrue("From source", !superclass.isFromSource()); //$NON-NLS-1$
+		ITypeBinding supersuperclass = superclass.getSuperclass();
+		assertNull("No superclass for java.lang.Object", supersuperclass); //$NON-NLS-1$
+		ITypeBinding[] interfaces = typeBinding.getInterfaces();
+		assertNotNull("No interfaces", interfaces); //$NON-NLS-1$
+		assertEquals("More then one super interface", 1, interfaces.length); //$NON-NLS-1$
+		assertTrue("is not an interface", interfaces[0].isInterface()); //$NON-NLS-1$
+		assertTrue("From source", !interfaces[0].isFromSource()); //$NON-NLS-1$
+		assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check ITypeBinding APIs:
+	 *  - getModifiers()
+	 *  - getElementType() when it is not an array type
+	 *  - getDimensions() when it is not an array type
+	 *  - getDeclaringClass()
+	 *  - getDeclaringName()
+	 *  - getName()
+	 *  - isNested()
+	 *  - isAnonymous()
+	 *  - isLocal()
+	 *  - isMember()
+	 *  - isArray()
+	 *  - getDeclaredMethods() => returns binding for default constructor
+	 *  - isPrimitive()
+	 *  - isTopLevel()
+	 *  - getSuperclass()
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("The type binding should not be null", typeBinding); //$NON-NLS-1$
+		assertEquals("The modifier is PUBLIC", Modifier.PUBLIC, typeBinding.getModifiers()); //$NON-NLS-1$
+		assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+		assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("Contains no methos", 0, methods.length); //$NON-NLS-1$
+		assertEquals("The name is not Test", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+		assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
+		assertTrue("A nested class", !typeBinding.isNested()); //$NON-NLS-1$
+		assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+		assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue("A class", !typeBinding.isClass()); //$NON-NLS-1$
+		assertTrue("Not an interface", typeBinding.isInterface()); //$NON-NLS-1$
+		assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+		assertTrue("Is nested", typeBinding.isTopLevel()); //$NON-NLS-1$
+		assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+		ITypeBinding superclass = typeBinding.getSuperclass();
+		assertNull("No superclass", superclass); //$NON-NLS-1$
+		assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test binding for anonymous declaration: new java.lang.Object() {}
+	 */
+	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 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$
+		ClassInstanceCreation anonymousClass = (ClassInstanceCreation) expression;
+		ITypeBinding typeBinding = anonymousClass.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not an anonymous class", typeBinding.isAnonymous()); //$NON-NLS-1$
+		assertEquals("The modifier is not default", Modifier.NONE, typeBinding.getModifiers()); //$NON-NLS-1$
+		assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+		assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertNotNull("This is a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+		assertEquals("The name is not empty", "", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+		assertTrue("Not a local class", typeBinding.isLocal()); //$NON-NLS-1$
+		assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
+		assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+		assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+		assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+		assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+		assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
+		assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+		assertEquals("wrong qualified name", "", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding superclass = typeBinding.getSuperclass();
+		assertNotNull("No superclass", superclass); //$NON-NLS-1$
+		assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test binding for member type declaration
+	 */
+	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 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$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+		assertEquals("The modifier is not default", Modifier.PRIVATE, typeBinding.getModifiers()); //$NON-NLS-1$
+		assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+		assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertNotNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+		assertEquals("The name is not 'B'", "B", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+		assertTrue("A local class", !typeBinding.isLocal()); //$NON-NLS-1$
+		assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
+		assertTrue("Not a member class", typeBinding.isMember()); //$NON-NLS-1$
+		assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+		assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+		assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+		assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
+		assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+		ITypeBinding superclass = typeBinding.getSuperclass();
+		assertNotNull("No superclass", superclass); //$NON-NLS-1$
+		assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test binding for local type declaration
+	 */
+	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 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$
+		TypeDeclarationStatement statement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDeclaration = statement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertTrue("An anonymous class", !typeBinding.isAnonymous()); //$NON-NLS-1$
+		assertEquals("The modifier is not default", Modifier.NONE, typeBinding.getModifiers()); //$NON-NLS-1$
+		assertNull("There is no element type", typeBinding.getElementType()); //$NON-NLS-1$
+		assertEquals("There is no dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertNotNull("This is not a member type", typeBinding.getDeclaringClass()); //$NON-NLS-1$
+		assertEquals("The name is not 'C'", "C", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("Contains the default constructor", 1, methods.length); //$NON-NLS-1$
+		assertTrue("Not a local class", typeBinding.isLocal()); //$NON-NLS-1$
+		assertTrue("Not a nested class", typeBinding.isNested()); //$NON-NLS-1$
+		assertTrue("A member class", !typeBinding.isMember()); //$NON-NLS-1$
+		assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+		assertTrue("An interface", !typeBinding.isInterface()); //$NON-NLS-1$
+		assertTrue("Not from source", typeBinding.isFromSource()); //$NON-NLS-1$
+		assertTrue("Is a top level", !typeBinding.isTopLevel()); //$NON-NLS-1$
+		assertTrue("A primitive type", !typeBinding.isPrimitive()); //$NON-NLS-1$
+		assertEquals("wrong qualified name", "", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding superclass = typeBinding.getSuperclass();
+		assertNotNull("No superclass", superclass); //$NON-NLS-1$
+		assertEquals("Has fields", 0, typeBinding.getDeclaredFields().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * Multiple local declaration => VariabledeclarationStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("Fragment list is not 4 ", fragments.size() == 4); //$NON-NLS-1$
+		VariableDeclarationFragment fragment1 = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding binding1 = fragment1.resolveBinding();
+		assertNotNull("Binding is null", binding1); //$NON-NLS-1$
+		assertEquals("wrong name for binding1", "x", binding1.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong modifier for binding1", 0, binding1.getModifiers()); //$NON-NLS-1$
+		assertTrue("a field", !binding1.isField()); //$NON-NLS-1$
+		assertNull("declaring class is not null", binding1.getDeclaringClass()); //$NON-NLS-1$
+		ITypeBinding typeBinding1 = binding1.getType();
+		assertNotNull("typeBinding1 is null", typeBinding1); //$NON-NLS-1$
+		assertTrue("typeBinding1 is not a primitive type", typeBinding1.isPrimitive()); //$NON-NLS-1$
+		assertTrue("typeBinding1 is not canonical", typeBinding1 == binding1.getType()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment2 = (VariableDeclarationFragment) fragments.get(1);
+		IVariableBinding binding2 = fragment2.resolveBinding();
+		assertNotNull("Binding is null", binding2); //$NON-NLS-1$
+		assertEquals("wrong name for binding2", "z", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong modifier for binding2", 0, binding2.getModifiers()); //$NON-NLS-1$
+		assertTrue("a field", !binding2.isField()); //$NON-NLS-1$
+		assertNull("declaring class is not null", binding2.getDeclaringClass()); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = binding2.getType();
+		assertNotNull("typeBinding2 is null", typeBinding2); //$NON-NLS-1$
+		assertTrue("typeBinding2 is not an array type", typeBinding2.isArray()); //$NON-NLS-1$
+		assertTrue("typeBinding2 is not canonical", typeBinding2 == binding2.getType()); //$NON-NLS-1$
+		assertTrue("primitive type is not canonical", typeBinding1 == typeBinding2.getElementType()); //$NON-NLS-1$
+		assertEquals("dimension is 1", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
+		assertEquals("it is not int[]", "int[]", typeBinding2.getName());		 //$NON-NLS-1$ //$NON-NLS-2$
+		VariableDeclarationFragment fragment3 = (VariableDeclarationFragment) fragments.get(2);
+		IVariableBinding binding3 = fragment3.resolveBinding();
+		assertNotNull("Binding is null", binding3); //$NON-NLS-1$
+		assertEquals("wrong name for binding3", "i", binding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong modifier for binding3", 0, binding3.getModifiers()); //$NON-NLS-1$
+		assertTrue("a field", !binding3.isField()); //$NON-NLS-1$
+		assertNull("declaring class is not null", binding3.getDeclaringClass()); //$NON-NLS-1$
+		ITypeBinding typeBinding3 = binding3.getType();
+		assertNotNull("typeBinding3 is null", typeBinding3); //$NON-NLS-1$
+		assertTrue("typeBinding3 is not an primitive type", typeBinding3.isPrimitive()); //$NON-NLS-1$
+		assertTrue("typeBinding3 is not canonical", typeBinding3 == binding3.getType()); //$NON-NLS-1$
+		assertTrue("primitive type is not canonical", typeBinding1 == typeBinding3); //$NON-NLS-1$
+		assertEquals("dimension is 0", 0, typeBinding3.getDimensions()); //$NON-NLS-1$
+		assertEquals("it is not the primitive type int", "int", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		VariableDeclarationFragment fragment4 = (VariableDeclarationFragment) fragments.get(3);
+		IVariableBinding binding4 = fragment4.resolveBinding();
+		assertNotNull("Binding is null", binding4); //$NON-NLS-1$
+		assertEquals("wrong name for binding4", "j", binding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong modifier for binding4", 0, binding4.getModifiers()); //$NON-NLS-1$
+		assertTrue("a field", !binding4.isField()); //$NON-NLS-1$
+		assertNull("declaring class is not null", binding4.getDeclaringClass()); //$NON-NLS-1$
+		ITypeBinding typeBinding4 = binding4.getType();
+		assertNotNull("typeBinding4 is null", typeBinding4); //$NON-NLS-1$
+		assertTrue("typeBinding4 is not an array type", typeBinding4.isArray()); //$NON-NLS-1$
+		assertTrue("typeBinding4 is not canonical", typeBinding4 == binding4.getType()); //$NON-NLS-1$
+		assertTrue("primitive type is not canonical", typeBinding1 == typeBinding4.getElementType()); //$NON-NLS-1$
+		assertEquals("dimension is 2", 2, typeBinding4.getDimensions()); //$NON-NLS-1$
+		assertEquals("it is not int[][]", "int[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("ids in the wrong order", binding1.getVariableId() < binding2.getVariableId()); //$NON-NLS-1$
+		assertTrue("ids in the wrong order", binding2.getVariableId() < binding3.getVariableId()); //$NON-NLS-1$
+		assertTrue("ids in the wrong order", binding3.getVariableId() < binding4.getVariableId()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check source position for new Test[1+2].length.
+	 */
+	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 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$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("fragment list size is not 1", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initialization = fragment.getInitializer();
+		assertNotNull("No initialization", initialization); //$NON-NLS-1$
+		assertTrue("Not a FieldAccess", initialization instanceof FieldAccess); //$NON-NLS-1$
+		checkSourceRange(initialization, "new Test[1+2].length", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check package binding: test0168.test
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+		IPackageBinding packageBinding = typeBinding.getPackage();
+		assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "test0168.test1", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		String[] components = packageBinding.getNameComponents();
+		assertNotNull("no components", components); //$NON-NLS-1$
+		assertTrue("components size != 2", components.length == 2); //$NON-NLS-1$
+		assertEquals("wrong component name", "test0168", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong component name", "test1", components[1]); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+		assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
+		assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check package binding: test0169
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+		IPackageBinding packageBinding = typeBinding.getPackage();
+		assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "test0169", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		String[] components = packageBinding.getNameComponents();
+		assertNotNull("no components", components); //$NON-NLS-1$
+		assertTrue("components size != 1", components.length == 1); //$NON-NLS-1$
+		assertEquals("wrong component name", "test0169", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+		assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
+		assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check package binding: test0170
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+		IPackageBinding packageBinding = typeBinding.getPackage();
+		assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		String[] components = packageBinding.getNameComponents();
+		assertNotNull("no components", components); //$NON-NLS-1$
+		assertTrue("components size != 0", components.length == 0); //$NON-NLS-1$
+		assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+		assertTrue("Not an unnamed package", packageBinding.isUnnamed()); //$NON-NLS-1$
+		assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check package binding: test0171
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() == 2); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+		IPackageBinding packageBinding = typeBinding.getPackage();
+		assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "test0171", packageBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		String[] components = packageBinding.getNameComponents();
+		assertNotNull("no components", components); //$NON-NLS-1$
+		assertTrue("components size != 1", components.length == 1); //$NON-NLS-1$
+		assertEquals("wrong component name", "test0171", components[0]); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong type", IBinding.PACKAGE, packageBinding.getKind()); //$NON-NLS-1$
+		assertTrue("Unnamed package", !packageBinding.isUnnamed()); //$NON-NLS-1$
+		assertTrue("Package binding is not canonical", packageBinding == typeBinding.getPackage()); //$NON-NLS-1$
+
+		typeDeclaration = (TypeDeclaration) types.get(1);
+		typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+		IPackageBinding packageBinding2 = typeBinding.getPackage();
+		assertNotNull("No package binding", packageBinding); //$NON-NLS-1$
+		assertTrue("Package binding is not canonical", packageBinding == packageBinding2); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check method binding
+	 */
+	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);
+		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;
+		List types = compilationUnit.types();
+		assertTrue("The types list is empty", types.size() != 0); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) types.get(0);
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("Binding not null", typeBinding); //$NON-NLS-1$
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("methods.length != 4", 4, methods.length); //$NON-NLS-1$
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("body declaration size != 3", 3, bodyDeclarations.size()); //$NON-NLS-1$
+		MethodDeclaration method1 = (MethodDeclaration) bodyDeclarations.get(0);
+		IMethodBinding methodBinding1 = method1.resolveBinding();
+		assertNotNull("No method binding for foo", methodBinding1); //$NON-NLS-1$
+		SimpleName simpleName = method1.getName();
+		assertTrue("not a declaration", simpleName.isDeclaration()); //$NON-NLS-1$
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("wrong name", binding.getName(), simpleName.getIdentifier()); //$NON-NLS-1$
+		// search method foo
+		IMethodBinding methodBinding = null;
+		loop: for (int i = 0, max = methods.length; i < max; i++) {
+			IMethodBinding currentMethod = methods[i];
+			if ("foo".equals(currentMethod.getName())) {
+				methodBinding = currentMethod;
+				break loop;
+			}
+		}
+		assertNotNull("Cannot be null", methodBinding);
+		assertTrue("Canonical method binding", methodBinding1 == methodBinding); //$NON-NLS-1$
+		assertTrue("declaring class is canonical", typeBinding == methodBinding1.getDeclaringClass()); //$NON-NLS-1$
+		ITypeBinding[] exceptionTypes = methodBinding1.getExceptionTypes();
+		assertNotNull("No exception types", exceptionTypes); //$NON-NLS-1$
+		assertEquals("One exception", 1, exceptionTypes.length); //$NON-NLS-1$
+		assertEquals("wrong name for exception", "IOException", exceptionTypes[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong modifier", Modifier.NONE, methodBinding1.getModifiers()); //$NON-NLS-1$
+		assertEquals("wrong name for method", "foo", methodBinding1.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding[] parameters = methodBinding1.getParameterTypes();
+		assertNotNull("No parameters", parameters); //$NON-NLS-1$
+		assertEquals("wrong size", 1, parameters.length); //$NON-NLS-1$
+		assertEquals("wrong type", "int[]", parameters[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong return type", "void", methodBinding1.getReturnType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("A constructor", !methodBinding1.isConstructor()); //$NON-NLS-1$
+
+		MethodDeclaration method2 = (MethodDeclaration) bodyDeclarations.get(1);
+		IMethodBinding methodBinding2 = method2.resolveBinding();
+		assertNotNull("No method binding for main", methodBinding2); //$NON-NLS-1$
+		// search main
+		methodBinding = null;
+		loop: for (int i = 0, max = methods.length; i < max; i++) {
+			IMethodBinding currentMethod = methods[i];
+			if ("main".equals(currentMethod.getName())) {
+				methodBinding = currentMethod;
+				break loop;
+			}
+		}
+		assertNotNull("Cannot be null", methodBinding);
+		assertTrue("Canonical method binding", methodBinding2 == methodBinding); //$NON-NLS-1$
+		assertTrue("declaring class is canonical", typeBinding == methodBinding2.getDeclaringClass()); //$NON-NLS-1$
+		ITypeBinding[] exceptionTypes2 = methodBinding2.getExceptionTypes();
+		assertNotNull("No exception types", exceptionTypes2); //$NON-NLS-1$
+		assertEquals("No exception", 0, exceptionTypes2.length); //$NON-NLS-1$
+		assertEquals("wrong modifier", Modifier.PUBLIC | Modifier.STATIC, methodBinding2.getModifiers()); //$NON-NLS-1$
+		assertEquals("wrong name for method", "main", methodBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding[] parameters2 = methodBinding2.getParameterTypes();
+		assertNotNull("No parameters", parameters2); //$NON-NLS-1$
+		assertEquals("wrong size", 1, parameters2.length); //$NON-NLS-1$
+		assertEquals("wrong type for parameter2[0]", "String[]", parameters2[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong return type", "void", methodBinding2.getReturnType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("A constructor", !methodBinding2.isConstructor()); //$NON-NLS-1$
+
+		MethodDeclaration method3 = (MethodDeclaration) bodyDeclarations.get(2);
+		IMethodBinding methodBinding3 = method3.resolveBinding();
+		assertNotNull("No method binding for bar", methodBinding3); //$NON-NLS-1$
+		// search method bar
+		methodBinding = null;
+		loop: for (int i = 0, max = methods.length; i < max; i++) {
+			IMethodBinding currentMethod = methods[i];
+			if ("bar".equals(currentMethod.getName())) {
+				methodBinding = currentMethod;
+				break loop;
+			}
+		}
+		assertNotNull("Cannot be null", methodBinding);
+		assertTrue("Canonical method binding", methodBinding3 == methodBinding); //$NON-NLS-1$
+		assertTrue("declaring class is canonical", typeBinding == methodBinding3.getDeclaringClass()); //$NON-NLS-1$
+		ITypeBinding[] exceptionTypes3 = methodBinding3.getExceptionTypes();
+		assertNotNull("No exception types", exceptionTypes3); //$NON-NLS-1$
+		assertEquals("No exception", 1, exceptionTypes3.length); //$NON-NLS-1$
+		assertEquals("wrong modifier", Modifier.PRIVATE, methodBinding3.getModifiers()); //$NON-NLS-1$
+		assertEquals("wrong name for method", "bar", methodBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding[] parameters3 = methodBinding3.getParameterTypes();
+		assertNotNull("No parameters", parameters3); //$NON-NLS-1$
+		assertEquals("wrong size", 1, parameters3.length); //$NON-NLS-1$
+		assertEquals("wrong type", "String", parameters3[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong return type", "String", methodBinding3.getReturnType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("A constructor", !methodBinding3.isConstructor()); //$NON-NLS-1$
+		assertTrue("The binding is not canonical", parameters3[0] == methodBinding3.getReturnType()); //$NON-NLS-1$
+	}
+
+	/**
+	 * i++; IVariableBinding
+	 */
+	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 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$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression ex = expressionStatement.getExpression();
+		assertTrue("Not a postfixexpression", ex instanceof PostfixExpression); //$NON-NLS-1$
+		PostfixExpression postfixExpression = (PostfixExpression) ex;
+		Expression expr = postfixExpression.getOperand();
+		assertTrue("Not a simpleName", expr instanceof SimpleName); //$NON-NLS-1$
+		SimpleName name = (SimpleName) expr;
+		assertTrue("a declaration", !name.isDeclaration()); //$NON-NLS-1$
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+
+		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertTrue(variableBinding == binding);
+	}
+
+	/**
+	 * i++; IVariableBinding (field)
+	 */
+	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 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$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression ex = expressionStatement.getExpression();
+		assertTrue("Not a postfixexpression", ex instanceof PostfixExpression); //$NON-NLS-1$
+		PostfixExpression postfixExpression = (PostfixExpression) ex;
+		Expression expr = postfixExpression.getOperand();
+		assertTrue("Not a simpleName", expr instanceof SimpleName); //$NON-NLS-1$
+		SimpleName name = (SimpleName) expr;
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+
+		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
+		List fragments = fieldDeclaration.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertTrue(variableBinding == binding);
+	}
+
+	/**
+	 * int i = 0; Test IntBinding for the field declaration and the 0 literal
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
+		List fragments = fieldDeclaration.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		ITypeBinding typeBinding = fragment.getInitializer().resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue(variableBinding.getType() == typeBinding);
+	}
+
+	/**
+	 * ThisReference
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+		assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node2;
+		assertTrue("Not a field access", returnStatement.getExpression() instanceof FieldAccess); //$NON-NLS-1$
+		FieldAccess fieldAccess = (FieldAccess) returnStatement.getExpression();
+		ITypeBinding typeBinding = fieldAccess.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Expression expr = fieldAccess.getExpression();
+		assertTrue("Not a this expression", expr instanceof ThisExpression); //$NON-NLS-1$
+		ThisExpression thisExpression = (ThisExpression) expr;
+		ITypeBinding typeBinding2 = thisExpression.resolveTypeBinding();
+		assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * i++; IVariableBinding
+	 */
+	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 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$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression ex = expressionStatement.getExpression();
+		assertTrue("Not a postfixexpression", ex instanceof PostfixExpression); //$NON-NLS-1$
+		PostfixExpression postfixExpression = (PostfixExpression) ex;
+		Expression expr = postfixExpression.getOperand();
+		assertTrue("Not a simpleName", expr instanceof SimpleName); //$NON-NLS-1$
+		SimpleName name = (SimpleName) expr;
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+
+		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertEquals("return type is not int", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue(variableBinding == binding);
+	}
+
+	/**
+	 * SuperReference
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
+		assertTrue("Return statement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node2;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not a field access", expr instanceof SuperFieldAccess); //$NON-NLS-1$
+		SuperFieldAccess fieldAccess = (SuperFieldAccess) expr;
+		ITypeBinding typeBinding = fieldAccess.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Allocation expression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		Expression initialization = fragment.getInitializer();
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue(variableBinding.getType() == typeBinding);
+	}
+
+	/**
+	 * Allocation expression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		Expression initialization = fragment.getInitializer();
+		assertTrue("No an array creation", initialization instanceof ArrayCreation); //$NON-NLS-1$
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue(variableBinding.getType() == typeBinding);
+	}
+
+	/**
+	 * Allocation expression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		Expression initialization = fragment.getInitializer();
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
+		assertTrue(variableBinding.getType() == typeBinding);
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node2;
+		Expression expr = ifStatement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "i < 10", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node2;
+		Expression expr = ifStatement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "i < 10 && i < 20", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node2;
+		Expression expr = ifStatement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "i < 10 || i < 20", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node2;
+		Expression expr = ifStatement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "i == 10", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node2;
+		Expression expr = ifStatement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "o == o", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("IfStatement", node2 instanceof WhileStatement); //$NON-NLS-1$
+		WhileStatement whileStatement = (WhileStatement) node2;
+		Expression expr = whileStatement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "i <= 10", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 2);
+		assertTrue("DoStatement", node2 instanceof DoStatement); //$NON-NLS-1$
+		DoStatement statement = (DoStatement) node2;
+		Expression expr = statement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "i <= 10", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
+		ForStatement statement = (ForStatement) node2;
+		Expression expr = statement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "i < 10", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 2, 1);
+		assertTrue("IfStatement", node2 instanceof IfStatement); //$NON-NLS-1$
+		IfStatement statement = (IfStatement) node2;
+		Expression expr = statement.getExpression();
+		assertNotNull("No condition", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "scanner.x < selection.start && selection.start < scanner.y", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * BinaryExpression
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression ex = expressionStatement.getExpression();
+		assertTrue("Assignment", ex instanceof Assignment); //$NON-NLS-1$
+		Assignment statement = (Assignment) ex;
+		Expression rightExpr = statement.getRightHandSide();
+		assertTrue("Not an infix expression", rightExpr instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) rightExpr;
+		Expression expr = infixExpression.getRightOperand();
+		assertNotNull("No right hand side expression", expr); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(expr, "2 < 20", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		Expression initialization = fragment.getInitializer();
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue(variableBinding.getType() == typeBinding);
+		checkSourceRange(initialization, "0", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		Expression initialization = fragment.getInitializer();
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue(variableBinding.getType() == typeBinding);
+		checkSourceRange(initialization, "new Inner()", source); //$NON-NLS-1$
+		assertEquals("Wrong type", "Inner", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		Expression initialization = fragment.getInitializer();
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue(variableBinding.getType() == typeBinding);
+		checkSourceRange(initialization, "new Inner[10]", source); //$NON-NLS-1$
+		assertTrue("Not an array", typeBinding.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong type", "Inner[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 1, 0, 1);
+		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression ex = expressionStatement.getExpression();
+		assertTrue("MethodInvocation", ex instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) ex;
+		checkSourceRange(methodInvocation, "a.useFile(/*]*/a.getFile()/*[*/)", source); //$NON-NLS-1$
+		List list = methodInvocation.arguments();
+		assertTrue("Parameter list not empty", list.size() == 1); //$NON-NLS-1$
+		Expression parameter = (Expression) list.get(0);
+		assertTrue("Not a method invocation", parameter instanceof MethodInvocation); //$NON-NLS-1$
+		ITypeBinding typeBinding = parameter.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not a boolean", "File", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(parameter, "a.getFile()", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 1, 2);
+		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression ex = expressionStatement.getExpression();
+		assertTrue("Assignment", ex instanceof Assignment); //$NON-NLS-1$
+		Assignment statement = (Assignment) ex;
+		Expression rightExpr = statement.getRightHandSide();
+		assertTrue("Not an instanceof expression", rightExpr instanceof InstanceofExpression); //$NON-NLS-1$
+		ITypeBinding typeBinding = rightExpr.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong type", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(rightExpr, "inner instanceof Inner", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
+		CompilationUnit unit = (CompilationUnit) result;
+		assertProblemsSize(unit, 0);
+		ASTNode node2 = getASTNode(unit, 1, 0, 1);
+		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression ex = expressionStatement.getExpression();
+		assertTrue("MethodInvocation", ex instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) ex;
+		checkSourceRange(methodInvocation, "a.getFile()/*[*/.getName()", source); //$NON-NLS-1$
+		Expression receiver = methodInvocation.getExpression();
+		assertTrue("Not a method invocation", receiver instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation2 = (MethodInvocation) receiver;
+		ITypeBinding typeBinding = methodInvocation2.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "File", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(methodInvocation2, "a.getFile()", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node2;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not an infixExpression", expr instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) expr;
+		Expression left = infixExpression.getLeftOperand();
+		assertTrue("Not an InfixExpression", left instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression2 = (InfixExpression) left;
+		Expression right = infixExpression2.getRightOperand();
+		assertTrue("Not an InfixExpression", right instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression3 = (InfixExpression) right;
+		assertEquals("A multiplication", InfixExpression.Operator.TIMES, infixExpression3.getOperator()); //$NON-NLS-1$
+		ITypeBinding typeBinding = infixExpression3.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(infixExpression3, "20 * 30", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initialization = fragment.getInitializer();
+		assertTrue("Not an infixExpression", initialization instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) initialization;
+		Expression left = infixExpression.getLeftOperand();
+		assertTrue("Not an InfixExpression", left instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression2 = (InfixExpression) left;
+		Expression right = infixExpression2.getRightOperand();
+		assertTrue("Not an InfixExpression", right instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression3 = (InfixExpression) right;
+		assertEquals("A multiplication", InfixExpression.Operator.TIMES, infixExpression3.getOperator()); //$NON-NLS-1$
+		ITypeBinding typeBinding = infixExpression3.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(infixExpression3, "10 * 30", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Initializer
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 1, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertTrue("No fragment", fragments.size() == 1); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initialization = fragment.getInitializer();
+		assertTrue("Not an infixExpression", initialization instanceof FieldAccess); //$NON-NLS-1$
+		FieldAccess fieldAccess = (FieldAccess) initialization;
+		Expression receiver = fieldAccess.getExpression();
+		assertTrue("ArrayCreation", receiver instanceof ArrayCreation); //$NON-NLS-1$
+		ArrayCreation arrayCreation = (ArrayCreation) receiver;
+		List dimensions = arrayCreation.dimensions();
+		assertEquals("Wrong dimension", 1, dimensions.size()); //$NON-NLS-1$
+		Expression dim = (Expression) dimensions.get(0);
+		assertTrue("InfixExpression", dim instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) dim;
+		ITypeBinding typeBinding = infixExpression.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(infixExpression, "1 + 2", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Position inside for statement: PR 3300
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("ForStatement", node2 instanceof ForStatement); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node2;
+		List initializers = forStatement.initializers();
+		assertTrue("wrong size", initializers.size() == 1); //$NON-NLS-1$
+		Expression init = (Expression) initializers.get(0);
+		checkSourceRange(init, "int i= 0", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * PR 7386
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
+		checkSourceRange(fieldDeclaration, "int f= (2);", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initialization = fragment.getInitializer();
+		assertTrue("Not a parenthesized expression", initialization instanceof ParenthesizedExpression); //$NON-NLS-1$
+		checkSourceRange(initialization, "(2)", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("no binding", typeBinding); //$NON-NLS-1$
+		assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * PR 7386
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
+		checkSourceRange(fieldDeclaration, "int f= (2);", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initialization = fragment.getInitializer();
+		assertTrue("Not a parenthesized expression", initialization instanceof ParenthesizedExpression); //$NON-NLS-1$
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) initialization;
+		checkSourceRange(parenthesizedExpression, "(2)", source); //$NON-NLS-1$
+		Expression expr = parenthesizedExpression.getExpression();
+		checkSourceRange(expr, "2", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("no binding", typeBinding); //$NON-NLS-1$
+		assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("type binding is canonical", typeBinding == parenthesizedExpression.resolveTypeBinding()); //$NON-NLS-1$
+	}
+
+	/**
+	 * PR 7386
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("FieldDeclaration", node2 instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node2;
+		checkSourceRange(fieldDeclaration, "int f= ((2));", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initialization = fragment.getInitializer();
+		assertTrue("Not a parenthesized expression", initialization instanceof ParenthesizedExpression); //$NON-NLS-1$
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) initialization;
+		checkSourceRange(parenthesizedExpression, "((2))", source); //$NON-NLS-1$
+		Expression expr = parenthesizedExpression.getExpression();
+		assertTrue("Not a parenthesized expression", expr instanceof ParenthesizedExpression); //$NON-NLS-1$
+		ParenthesizedExpression parenthesizedExpression2 = (ParenthesizedExpression) expr;
+		checkSourceRange(parenthesizedExpression2, "(2)", source); //$NON-NLS-1$
+		expr = parenthesizedExpression2.getExpression();
+		checkSourceRange(expr, "2", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("no binding", typeBinding); //$NON-NLS-1$
+		assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = parenthesizedExpression.resolveTypeBinding();
+		assertNotNull("no binding", typeBinding); //$NON-NLS-1$
+		assertEquals("not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("type binding is canonical", typeBinding == parenthesizedExpression2.resolveTypeBinding()); //$NON-NLS-1$
+	}
+
+
+	/**
+	 * Local class end position when trailing comment
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("TypeDeclarationStatement", node2 instanceof TypeDeclarationStatement); //$NON-NLS-1$
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node2;
+		AbstractTypeDeclaration typeDeclaration = typeDeclarationStatement.getDeclaration();
+		assertEquals("wrong name", "AA", typeDeclaration.getName().getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(typeDeclaration, "class AA extends Test {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * QualifiedName
+	 */
+	public void test0206() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0206", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode result = runConversion(sourceUnit, true);
+		ASTNode node2 = getASTNode((CompilationUnit) result, 0, 5, 0);
+		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node2;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not a qualifiedName", expr instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) expr;
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not an int (typeBinding)", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(qualifiedName, "field1.field2.field3.field4.i", source); //$NON-NLS-1$
+		assertTrue("Not a simple name", qualifiedName.getName().isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = qualifiedName.getName();
+		assertTrue("a declaration", !simpleName.isDeclaration()); //$NON-NLS-1$
+		checkSourceRange(simpleName, "i", source); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+		assertNotNull("No typebinding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Not an int (typeBinding2)", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Not Test", "Test", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not default", Modifier.PUBLIC, variableBinding.getModifiers()); //$NON-NLS-1$
+		Name qualifierName = qualifiedName.getQualifier();
+		assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(qualifierName, "field1.field2.field3.field4", source); //$NON-NLS-1$
+		ITypeBinding typeBinding5 = qualifierName.resolveTypeBinding();
+		assertNotNull("No binding5", typeBinding5); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+		qualifiedName = (QualifiedName) qualifierName;
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "field4", source); //$NON-NLS-1$
+		ITypeBinding typeBinding6 = simpleName.resolveTypeBinding();
+		assertNotNull("No binding6", typeBinding6); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", typeBinding6.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+		qualifierName = qualifiedName.getQualifier();
+		assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(qualifierName, "field1.field2.field3", source); //$NON-NLS-1$
+		ITypeBinding typeBinding7 = qualifierName.resolveTypeBinding();
+		assertNotNull("No binding7", typeBinding7); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", typeBinding7.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+		qualifiedName = (QualifiedName) qualifierName;
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "field3", source); //$NON-NLS-1$
+		qualifierName = qualifiedName.getQualifier();
+		assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(qualifierName, "field1.field2", source); //$NON-NLS-1$
+		ITypeBinding typeBinding3 = qualifierName.resolveTypeBinding();
+		assertNotNull("No binding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		qualifiedName = (QualifiedName) qualifierName;
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "field2", source); //$NON-NLS-1$
+		qualifierName = qualifiedName.getQualifier();
+		assertTrue("Not a simple name", qualifierName.isSimpleName()); //$NON-NLS-1$
+		assertTrue("a declaration", !((SimpleName)qualifierName).isDeclaration()); //$NON-NLS-1$
+		checkSourceRange(qualifierName, "field1", source); //$NON-NLS-1$
+		ITypeBinding typeBinding4 = qualifierName.resolveTypeBinding();
+		assertNotNull("No binding4", typeBinding4); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check javadoc for MethodDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
+		checkSourceRange(node, "/** JavaDoc Comment*/\n  void foo(final int i) {}", source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MethodDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MethodDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((MethodDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "void foo(final int i) {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for FieldDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+//		Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+		checkSourceRange(node, "/** JavaDoc Comment*/\n  int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for FieldDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for FieldDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((FieldDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "int i;", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for TypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		String expectedContents = "public class Test {\n" +//$NON-NLS-1$
+			"  int i;\n"  +//$NON-NLS-1$
+			"}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for TypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		String expectedContents = "public class Test {\n" +//$NON-NLS-1$
+			"  int i;\n"  +//$NON-NLS-1$
+			"}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for TypeDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			"public class Test {\n" +//$NON-NLS-1$
+			"  int i;\n"  +//$NON-NLS-1$
+			"}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			 "  class B {}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "class B {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check javadoc for MemberTypeDeclaration
+	 */
+	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 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$
+		Javadoc actualJavadoc = ((TypeDeclaration) node).getJavadoc();
+		assertTrue("Javadoc must be null", actualJavadoc == null);//$NON-NLS-1$
+		checkSourceRange(node, "public static class B {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking initializers
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		checkSourceRange(node, "{}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking initializers
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		checkSourceRange(node, "static {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking initializers
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+		assertNotNull("Javadoc comment should no be null", actualJavadoc); //$NON-NLS-1$
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			 "  static {}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+
+	}
+
+	/**
+	 * Checking initializers
+	 * @deprecated marking deprecated since using deprecated code
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+		assertNotNull("Javadoc comment should not be null", actualJavadoc); //$NON-NLS-1$
+		String expectedContents =
+			 "/** JavaDoc Comment*/\n" + //$NON-NLS-1$
+			 "  {}";//$NON-NLS-1$
+		checkSourceRange(node, expectedContents, source); //$NON-NLS-1$
+		checkSourceRange(actualJavadoc, "/** JavaDoc Comment*/", source); //$NON-NLS-1$
+
+	}
+
+	/**
+	 * Checking initializers
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		Javadoc actualJavadoc = ((Initializer) node).getJavadoc();
+		assertNull("Javadoc comment should be null", actualJavadoc); //$NON-NLS-1$
+		checkSourceRange(node, "{}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Continue ==> ContinueStatement
+	 */
+	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);
+		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
+		checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
+		ContinueStatement statement = (ContinueStatement) ((Block) forStatement.getBody()).statements().get(0);
+		assertNotNull("Expression should not be null", statement); //$NON-NLS-1$
+		ContinueStatement continueStatement = this.ast.newContinueStatement();
+		continueStatement.setLabel(this.ast.newSimpleName("label")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", continueStatement.subtreeMatch(new ASTMatcher(), statement));		//$NON-NLS-1$
+		checkSourceRange(statement, "continue label;", source); //$NON-NLS-1$
+		checkSourceRange(statement.getLabel(), "label", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Break + label  ==> BreakStatement
+	 */
+	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);
+		LabeledStatement labeledStatement = (LabeledStatement) getASTNode((CompilationUnit) result, 0, 0, 0);
+		checkSourceRange(labeledStatement.getLabel(), "label", source); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) labeledStatement.getBody();
+		BreakStatement statement = (BreakStatement) ((Block) forStatement.getBody()).statements().get(0);
+		assertNotNull("Expression should not be null", statement); //$NON-NLS-1$
+		BreakStatement breakStatement = this.ast.newBreakStatement();
+		breakStatement.setLabel(this.ast.newSimpleName("label")); //$NON-NLS-1$
+		assertTrue("Both AST trees should be identical", breakStatement.subtreeMatch(new ASTMatcher(), statement));		//$NON-NLS-1$
+		checkSourceRange(statement, "break label;", source); //$NON-NLS-1$
+		checkSourceRange(statement.getLabel(), "label", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * QualifiedName
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 3, 2, 0);
+		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node2;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not a qualifiedName", expr instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) expr;
+		ITypeBinding typeBinding = expr.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not an long (typeBinding)", "long", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		checkSourceRange(qualifiedName, "field.fB.fA.j", source); //$NON-NLS-1$
+
+		SimpleName simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "j", source); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+		assertEquals("Not an long (typeBinding2)", "long", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Not A", "A", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not default", Modifier.NONE, variableBinding.getModifiers()); //$NON-NLS-1$
+		assertEquals("wrong name", "j", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+		Name qualifierName = qualifiedName.getQualifier();
+		assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(qualifierName, "field.fB.fA", source); //$NON-NLS-1$
+		qualifiedName = (QualifiedName) qualifierName;
+		ITypeBinding typeBinding3 = qualifiedName.resolveTypeBinding();
+		assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("Not an A", "A", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "fA", source); //$NON-NLS-1$
+		ITypeBinding typeBinding4 = simpleName.resolveTypeBinding();
+		assertNotNull("No typeBinding4", typeBinding4); //$NON-NLS-1$
+		assertEquals("Not an A", "A", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = qualifiedName.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertTrue("VariableBinding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding2 = (IVariableBinding) binding2;
+		assertEquals("Not B", "B", variableBinding2.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not default", Modifier.NONE, variableBinding2.getModifiers()); //$NON-NLS-1$
+		assertEquals("wrong name", "fA", variableBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+		qualifierName = qualifiedName.getQualifier();
+		assertTrue("Not a qualified name", qualifierName.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(qualifierName, "field.fB", source); //$NON-NLS-1$
+		qualifiedName = (QualifiedName) qualifierName;
+		ITypeBinding typeBinding5 = qualifiedName.resolveTypeBinding();
+		assertNotNull("No typeBinding5", typeBinding5); //$NON-NLS-1$
+		assertEquals("Not a B", "B", typeBinding5.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		simpleName = qualifiedName.getName();
+		checkSourceRange(simpleName, "fB", source); //$NON-NLS-1$
+		ITypeBinding typeBinding6 = simpleName.resolveTypeBinding();
+		assertNotNull("No typebinding6", typeBinding6); //$NON-NLS-1$
+		assertEquals("not a B", "B", typeBinding6.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding3 = qualifiedName.resolveBinding();
+		assertNotNull("No binding2", binding3); //$NON-NLS-1$
+		assertTrue("VariableBinding", binding3 instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding3 = (IVariableBinding) binding3;
+		assertEquals("Not C", "C", variableBinding3.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not default", Modifier.NONE, variableBinding3.getModifiers()); //$NON-NLS-1$
+		assertEquals("wrong name", "fB", variableBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+
+		qualifierName = qualifiedName.getQualifier();
+		assertTrue("Not a simple name", qualifierName.isSimpleName()); //$NON-NLS-1$
+		checkSourceRange(qualifierName, "field", source); //$NON-NLS-1$
+		simpleName = (SimpleName) qualifierName;
+		ITypeBinding typeBinding7 = simpleName.resolveTypeBinding();
+		assertNotNull("No typeBinding7", typeBinding7); //$NON-NLS-1$
+		assertEquals("Not a C", "C", typeBinding7.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding4 = simpleName.resolveBinding();
+		assertNotNull("No binding4", binding4); //$NON-NLS-1$
+		assertTrue("VariableBinding", binding4 instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding4 = (IVariableBinding) binding4;
+		assertEquals("Not Test", "Test", variableBinding4.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not public", Modifier.PUBLIC, variableBinding4.getModifiers()); //$NON-NLS-1$
+		assertEquals("wrong name", "field", variableBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong return type", "C", variableBinding4.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * QualifiedName as TypeReference
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+		assertTrue("ReturnStatement", node2 instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node2;
+		Expression expr = returnStatement.getExpression();
+		checkSourceRange(expr, "test0228.Test.foo()", source); //$NON-NLS-1$
+		assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expr;
+		Expression qualifier = methodInvocation.getExpression();
+		assertNotNull("no qualifier", qualifier); //$NON-NLS-1$
+		assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) qualifier;
+		checkSourceRange(qualifiedName, "test0228.Test", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = qualifiedName.resolveTypeBinding();
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong type", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding = qualifiedName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Not a type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+
+	}
+
+	/**
+	 * MethodInvocation
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression expr = expressionStatement.getExpression();
+		assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+		checkSourceRange(expr, "System.err.println()", source); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expr;
+		Expression qualifier = methodInvocation.getExpression();
+		assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) qualifier;
+		ITypeBinding typeBinding = qualifier.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding = qualifiedName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("wrong name", "err", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName methodName = methodInvocation.getName();
+		IBinding binding2 = methodName.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+	}
+
+	/**
+	 * MethodInvocation
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 1, 0);
+		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression expr = expressionStatement.getExpression();
+		assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+		checkSourceRange(expr, "err.println()", source); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expr;
+		Expression qualifier = methodInvocation.getExpression();
+		assertTrue("SimpleName", qualifier instanceof SimpleName); //$NON-NLS-1$
+		SimpleName name = (SimpleName) qualifier;
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong name", "err", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding typeBinding = name.resolveTypeBinding();
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wron type name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * MethodInvocation
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("ExpressionStatement", node2 instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression expr = expressionStatement.getExpression();
+		assertTrue("MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+		checkSourceRange(expr, "System.err.println()", source); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expr;
+		Expression qualifier = methodInvocation.getExpression();
+		assertTrue("QualifiedName", qualifier instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) qualifier;
+		ITypeBinding typeBinding = qualifier.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "PrintStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding = qualifiedName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("VariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("wrong name", "err", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName methodName = methodInvocation.getName();
+		IBinding binding2 = methodName.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		Name name = qualifiedName.getQualifier();
+		assertTrue("SimpleName", name.isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+		assertNotNull("No typeBinding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("wrong type name", "System", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * MethodInvocation
+	 */
+	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 node2 = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("VariableDeclarationStatement", node2 instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node2;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression initialization = variableDeclarationFragment.getInitializer();
+		ITypeBinding typeBinding = initialization.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not a primitive type", typeBinding.isPrimitive()); //$NON-NLS-1$
+		assertEquals("wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("QualifiedName", initialization instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) initialization;
+		SimpleName simpleName = qualifiedName.getName();
+		ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+		assertTrue("Not a primitive type", typeBinding2.isPrimitive()); //$NON-NLS-1$
+		assertEquals("wrong name", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("IVariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertNull("No declaring class", variableBinding.getDeclaringClass()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking that only syntax errors are reported for the MALFORMED tag
+	 */
+	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);
+		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$
+		CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("The fiels is not malformed", !isMalformed(node)); //$NON-NLS-1$
+		assertEquals("No problem found", 1, unit.getMessages().length); //$NON-NLS-1$
+		assertEquals("No problem found", 1, unit.getProblems().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking that null is returned for a resolveBinding if the type is unknown
+	 */
+	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);
+		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$
+		CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("No problem found", 1, unit.getMessages().length); //$NON-NLS-1$
+		assertEquals("No problem found", 1, unit.getProblems().length); //$NON-NLS-1$
+		assertTrue("FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding); //$NON-NLS-1$
+		assertEquals("Ltest0234/Test;.field)LList;", variableBinding.getKey());
+	}
+
+	/**
+	 * Checking that null is returned for a resolveBinding if the type is unknown
+	 */
+	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);
+		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$
+		CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("No problem found", 1, unit.getMessages().length); //$NON-NLS-1$
+		assertEquals("No problem found", 1, unit.getProblems().length); //$NON-NLS-1$
+		assertTrue("FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNull("Got a binding", variableBinding); //$NON-NLS-1$
+	}
+
+	/**
+	 * Checking that null is returned for a resolveBinding if the type is unknown
+	 */
+	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);
+		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$
+		CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("problems found", 0, unit.getMessages().length); //$NON-NLS-1$
+		assertEquals("problems found", 0, unit.getProblems().length); //$NON-NLS-1$
+		assertTrue("FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=9452
+	 */
+	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);
+		assertNotNull("No compilation unit", result); //$NON-NLS-1$
+		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check ThisExpression
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration();
+		Object o = typeDecl.bodyDeclarations().get(0);
+		assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDecl = (MethodDeclaration) o;
+		Block block = methodDecl.getBody();
+		List statements = block.statements();
+		assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+		Statement stmt = (Statement) statements.get(0);
+		assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) stmt;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not a method invocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expr;
+		checkSourceRange(methodInvocation, "Test.this.bar()", source); //$NON-NLS-1$
+		Expression qualifier = methodInvocation.getExpression();
+		assertTrue("Not a ThisExpression", qualifier instanceof ThisExpression); //$NON-NLS-1$
+		ThisExpression thisExpression = (ThisExpression) qualifier;
+		Name name = thisExpression.getQualifier();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("wrong name", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check ThisExpression
+	 */
+	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);
+		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);
+		assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration();
+		Object o = typeDecl.bodyDeclarations().get(0);
+		assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDecl = (MethodDeclaration) o;
+		Block block = methodDecl.getBody();
+		List statements = block.statements();
+		assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+		Statement stmt = (Statement) statements.get(0);
+		assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) stmt;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not a SuperMethodInvocation", expr instanceof SuperMethodInvocation); //$NON-NLS-1$
+		SuperMethodInvocation superMethodInvocation = (SuperMethodInvocation) expr;
+		Name name = superMethodInvocation.getQualifier();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("A type binding", binding instanceof ITypeBinding); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Name methodName = superMethodInvocation.getName();
+		IBinding binding2 = methodName.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertTrue("No an IMethodBinding", binding2 instanceof IMethodBinding); //$NON-NLS-1$
+		IMethodBinding methodBinding = (IMethodBinding) binding2;
+		assertEquals("Not bar", "bar", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not T", "T", methodBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check FieldAccess
+	 */
+	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);
+		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);
+		assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration();
+		Object o = typeDecl.bodyDeclarations().get(0);
+		assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDecl = (MethodDeclaration) o;
+		Block block = methodDecl.getBody();
+		List statements = block.statements();
+		assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+		Statement stmt = (Statement) statements.get(0);
+		assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) stmt;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not a field access", expr instanceof FieldAccess); //$NON-NLS-1$
+		FieldAccess fieldAccess = (FieldAccess) expr;
+		Expression qualifier = fieldAccess.getExpression();
+		assertTrue("Not a ThisExpression", qualifier instanceof ThisExpression); //$NON-NLS-1$
+		ThisExpression thisExpression = (ThisExpression) qualifier;
+		Name name = thisExpression.getQualifier();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Name fieldName = fieldAccess.getName();
+		IBinding binding2 = fieldName.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "f", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong modifier", Modifier.PUBLIC, binding2.getModifiers()); //$NON-NLS-1$
+		ITypeBinding typeBinding = fieldName.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check order of body declarations
+	 */
+	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);
+		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);
+		assertTrue("Not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		assertTrue("Not a declaration", ((TypeDeclaration) node).getName().isDeclaration()); //$NON-NLS-1$
+		assertEquals("Wrong size", 11, ((TypeDeclaration)node).bodyDeclarations().size()); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 2);
+		assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 3);
+		assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 4);
+		assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 5);
+		assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 6);
+		assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 7);
+		assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 8);
+		assertTrue("Not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 9);
+		assertTrue("Not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		node = getASTNode((CompilationUnit) result, 0, 10);
+		assertTrue("Not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check ThisExpression
+	 */
+	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);
+		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);
+		assertTrue("Not a type declaration statement", node instanceof TypeDeclarationStatement); //$NON-NLS-1$
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDecl = typeDeclarationStatement.getDeclaration();
+		Object o = typeDecl.bodyDeclarations().get(0);
+		assertTrue("Not a method", o instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDecl = (MethodDeclaration) o;
+		Block block = methodDecl.getBody();
+		List statements = block.statements();
+		assertEquals("Not 1", 1, statements.size()); //$NON-NLS-1$
+		Statement stmt = (Statement) statements.get(0);
+		assertTrue("Not a return statement", stmt instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) stmt;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("Not a SuperFieldAccess", expr instanceof SuperFieldAccess); //$NON-NLS-1$
+		SuperFieldAccess superFieldAccess = (SuperFieldAccess) expr;
+		Name name = superFieldAccess.getQualifier();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("A type binding", binding instanceof ITypeBinding); //$NON-NLS-1$
+		assertEquals("Not Test", "Test", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Name fieldName = superFieldAccess.getName();
+		IBinding binding2 = fieldName.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertTrue("No an IVariableBinding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding2;
+		assertEquals("Not f", "f", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not T", "T", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding typeBinding2 = fieldName.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+		assertEquals("Not int", "int", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check catch clause positions:
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10570
+	 */
+	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);
+		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);
+		assertTrue("Not a try statement", node instanceof TryStatement); //$NON-NLS-1$
+		TryStatement tryStatement = (TryStatement) node;
+		List catchClauses = tryStatement.catchClauses();
+		assertEquals("wrong size", 1, catchClauses.size()); //$NON-NLS-1$
+		CatchClause catchClause = (CatchClause) catchClauses.get(0);
+		checkSourceRange(catchClause, "catch (Exception e){m();}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check catch clause positions:
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10570
+	 */
+	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);
+		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);
+		assertTrue("Not a try statement", node instanceof TryStatement); //$NON-NLS-1$
+		TryStatement tryStatement = (TryStatement) node;
+		List catchClauses = tryStatement.catchClauses();
+		assertEquals("wrong size", 2, catchClauses.size()); //$NON-NLS-1$
+		CatchClause catchClause = (CatchClause) catchClauses.get(0);
+		checkSourceRange(catchClause, "catch (RuntimeException e){m();}", source); //$NON-NLS-1$
+		catchClause = (CatchClause) catchClauses.get(1);
+		checkSourceRange(catchClause, "catch(Exception e) {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=10587
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expr = returnStatement.getExpression();
+		assertTrue("not a name", expr instanceof Name); //$NON-NLS-1$
+		Name name = (Name) expr;
+		IBinding binding = name.resolveBinding();
+		assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Not i", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not int", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ASTNode declaringNode = unit.findDeclaringNode(variableBinding);
+		assertNotNull("No declaring node", declaringNode); //$NON-NLS-1$
+		assertTrue("Not a VariableDeclarationFragment", declaringNode instanceof VariableDeclarationFragment); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test binding resolution for import declaration
+	 */
+	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);
+		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;
+		List imports = unit.imports();
+		assertEquals("wrong imports size", 2, imports.size()); //$NON-NLS-1$
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		assertTrue("Not on demand", importDeclaration.isOnDemand()); //$NON-NLS-1$
+		checkSourceRange(importDeclaration, "import java.util.*;", source); //$NON-NLS-1$
+		IBinding binding = importDeclaration.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+		assertEquals("Wrong name", "java.util", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		importDeclaration = (ImportDeclaration) imports.get(1);
+		assertTrue("On demand", !importDeclaration.isOnDemand()); //$NON-NLS-1$
+		checkSourceRange(importDeclaration, "import java.io.IOException;", source); //$NON-NLS-1$
+		binding = importDeclaration.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertEquals("Wrong name", "IOException", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Test binding resolution for import declaration
+	 */
+	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);
+		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;
+		PackageDeclaration packageDeclaration = unit.getPackage();
+		checkSourceRange(packageDeclaration, "package test0247;", source); //$NON-NLS-1$
+		IPackageBinding binding = packageDeclaration.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+		assertEquals("Wrong name", "test0247", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
+	 */
+	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);
+		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);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration);		 //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 1, parameters.size()); //$NON-NLS-1$
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Name name = singleVariableDeclaration.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
+	 */
+	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);
+		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);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not an assignment", expression instanceof Assignment); //$NON-NLS-1$
+		Assignment assignment = (Assignment) expression;
+		Expression leftHandSide = assignment.getLeftHandSide();
+		assertTrue("Not a qualified name", leftHandSide instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) leftHandSide;
+		Name simpleName = qualifiedName.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertTrue("Not a IVariableBinding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "k", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong modifier", Modifier.STATIC, variableBinding.getModifiers()); //$NON-NLS-1$
+		assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong declaring class name", "j", variableBinding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
+	 */
+	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);
+		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);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration);		 //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		Name name = singleVariableDeclaration.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check qualified name resolution for static fields
+	 */
+	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);
+		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);
+		assertTrue("Not a ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		checkSourceRange(methodInvocation, "java.lang.System.out.println()", source); //$NON-NLS-1$
+		Expression qualifier = methodInvocation.getExpression();
+		assertTrue("Not a qualified name", qualifier instanceof QualifiedName); //$NON-NLS-1$
+		checkSourceRange(qualifier, "java.lang.System.out", source); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) qualifier;
+		Name typeName = qualifiedName.getQualifier();
+		assertTrue("Not a QualifiedName", typeName instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedTypeName = (QualifiedName) typeName;
+		IBinding binding = qualifiedTypeName.getName().resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong name", "System", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		binding = qualifiedTypeName.getQualifier().resolveBinding();
+		assertNotNull("No binding2", binding); //$NON-NLS-1$
+		assertEquals("Wrong type binding", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check binding for anonymous class
+	 */
+	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);
+		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);
+		assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("Not a classinstancecreation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
+		assertTrue("Not a constructor", methodBinding.isConstructor()); //$NON-NLS-1$
+		assertTrue("Not an anonymous class", methodBinding.getDeclaringClass().isAnonymous()); //$NON-NLS-1$
+		assertEquals("Not an anonymous class of java.lang.Object", "Object", methodBinding.getDeclaringClass().getSuperclass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Not an anonymous class of java.lang.Object", "java.lang", methodBinding.getDeclaringClass().getSuperclass().getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check binding for allocation expression
+	 */
+	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);
+		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);
+		assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("Not a classinstancecreation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		IMethodBinding methodBinding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
+		assertTrue("Not a constructor", methodBinding.isConstructor()); //$NON-NLS-1$
+		assertEquals("Wrong size", 1, methodBinding.getParameterTypes().length); //$NON-NLS-1$
+		assertEquals("Wrong type", "String", methodBinding.getParameterTypes()[0].getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check binding for allocation expression
+	 */
+	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);
+		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);
+		assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("Not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("wrong type", "C", binding.getDeclaringClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+
+	/**
+	 * Check binding for allocation expression
+	 */
+	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);
+		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);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+		Expression expression2 = (Expression) arguments.get(0);
+		assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression2;
+		Type type = castExpression.getType();
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("Not an array type", binding.isArray()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check binding for allocation expression
+	 */
+	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);
+		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);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+		Expression expression2 = (Expression) arguments.get(0);
+		assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression2;
+		Type type = castExpression.getType();
+		assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("Not a class", binding.isClass()); //$NON-NLS-1$
+		Name name = simpleType.getName();
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertEquals("Wrong type", "Object", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * Check binding for allocation expression
+	 */
+	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);
+		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);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+		Expression expression2 = (Expression) arguments.get(0);
+		assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression2;
+		Type type = castExpression.getType();
+		assertTrue("Not a primitive type", type.isPrimitiveType()); //$NON-NLS-1$
+		PrimitiveType primitiveType = (PrimitiveType) type;
+		assertEquals("Not int", PrimitiveType.INT, primitiveType.getPrimitiveTypeCode()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Check binding for allocation expression
+	 */
+	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);
+		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);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a MethodInvocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		List arguments = methodInvocation.arguments();
+		assertEquals("wrong size", 1, arguments.size()); //$NON-NLS-1$
+		Expression expression2 = (Expression) arguments.get(0);
+		assertTrue("Not a CastExpression", expression2 instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression2;
+		Type type = castExpression.getType();
+		assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("Not a class", binding.isClass()); //$NON-NLS-1$
+		Name name = simpleType.getName();
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertEquals("Wrong type", "Object", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10663
+	 */
+	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);
+		assertNotNull("No compilation unit", result); //$NON-NLS-1$
+		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10592
+	 */
+	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);
+		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);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration);		 //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		IBinding binding = singleVariableDeclaration.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		Name name = singleVariableDeclaration.getName();
+		assertTrue("Not a simple name", name instanceof SimpleName); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		assertEquals("Wrong name", "i", simpleName.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding", binding2); //$NON-NLS-1$
+		assertTrue("binding == binding2", binding == binding2); //$NON-NLS-1$
+		assertTrue("Not a variable binding", binding2 instanceof IVariableBinding); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding2;
+		assertEquals("Wrong name", "i", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong type", "int", variableBinding.getType().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10679
+	 */
+	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);
+		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;
+		assertEquals("Wrong msg size", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertEquals("Wrong pb size", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		ITypeBinding binding = expression.resolveTypeBinding();
+		assertNull("got a binding", binding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10676
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expr = expressionStatement.getExpression();
+		assertTrue("Not a MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expr;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong argument list size", 1, arguments.size()); //$NON-NLS-1$
+		Expression expr2 = (Expression) arguments.get(0);
+		assertTrue("Not a class instance creation", expr2 instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expr2;
+		arguments = classInstanceCreation.arguments();
+		assertEquals("Wrong size", 1, arguments.size()); //$NON-NLS-1$
+		Expression expression2 = (Expression) arguments.get(0);
+		assertTrue("Not a string literal", expression2 instanceof StringLiteral); //$NON-NLS-1$
+		StringLiteral stringLiteral = (StringLiteral) expression2;
+		ITypeBinding typeBinding = stringLiteral.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "String", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10700
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expr = expressionStatement.getExpression();
+		assertTrue("Not a MethodInvocation", expr instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expr;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong argument list size", 1, arguments.size()); //$NON-NLS-1$
+		Expression expr2 = (Expression) arguments.get(0);
+		assertTrue("Not a simple name", expr2 instanceof SimpleName); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expr2;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10699
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong fragment size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a classinstancecreation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		assertNotNull("No anonymousclassdeclaration", anonymousClassDeclaration); //$NON-NLS-1$
+		String expectedSourceRange =
+			"{\n"+  //$NON-NLS-1$
+			"			void m(int k){\n"+ //$NON-NLS-1$
+			"				k= i;\n"+ //$NON-NLS-1$
+			"			}\n"+ //$NON-NLS-1$
+			"		}"; //$NON-NLS-1$
+		checkSourceRange(anonymousClassDeclaration, expectedSourceRange, source);
+		List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size()); //$NON-NLS-1$
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		assertEquals("Wrong name", "m", methodDeclaration.getName().getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10698
+	 */
+	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);
+		assertNotNull("No compilation unit", result); //$NON-NLS-1$
+		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "Inner\\u005b]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		Type type2 = arrayType.getElementType();
+		assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type2;
+		checkSourceRange(simpleType, "Inner", source); //$NON-NLS-1$
+		Name name = simpleType.getName();
+		assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		checkSourceRange(simpleName, "Inner", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "Inner[]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		Type type2 = arrayType.getElementType();
+		assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type2;
+		checkSourceRange(simpleType, "Inner", source); //$NON-NLS-1$
+		Name name = simpleType.getName();
+		assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		checkSourceRange(simpleName, "Inner", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "test0268.Test.Inner[]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		Type type2 = arrayType.getElementType();
+		assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type2;
+		checkSourceRange(simpleType, "test0268.Test.Inner", source); //$NON-NLS-1$
+		Name name = simpleType.getName();
+		assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(name, "test0268.Test.Inner", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "test0269.Test.Inner[/**/]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		Type type2 = arrayType.getElementType();
+		assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type2;
+		checkSourceRange(simpleType, "test0269.Test.Inner", source); //$NON-NLS-1$
+		Name name = simpleType.getName();
+		assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(name, "test0269.Test.Inner", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "test0270.Test.Inner", source); //$NON-NLS-1$
+		assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(name, "test0270.Test.Inner", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "test0271.Test.Inner[]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		Type type2 = arrayType.getElementType();
+		assertTrue("Not a simple type", type2.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type2;
+		checkSourceRange(simpleType, "test0271.Test.Inner", source); //$NON-NLS-1$
+		Name name = simpleType.getName();
+		assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		checkSourceRange(name, "test0271.Test.Inner", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a For statement", node instanceof ForStatement); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		checkSourceRange(forStatement, "for (int i= 0; i < 10; i++) foo();", source); //$NON-NLS-1$
+		Statement action = forStatement.getBody();
+		checkSourceRange(action, "foo();", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a For statement", node instanceof ForStatement); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		checkSourceRange(forStatement, "for (int i= 0; i < 10; i++) { foo(); }", source); //$NON-NLS-1$
+		Statement action = forStatement.getBody();
+		checkSourceRange(action, "{ foo(); }", source); //$NON-NLS-1$
+		assertTrue("Not a block", action instanceof Block); //$NON-NLS-1$
+		Block block = (Block) action;
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size()); //$NON-NLS-1$
+		Statement stmt = (Statement) statements.get(0);
+		checkSourceRange(stmt, "foo();", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not a While statement", node instanceof WhileStatement); //$NON-NLS-1$
+		WhileStatement whileStatement = (WhileStatement) node;
+		checkSourceRange(whileStatement, "while (i < 10) { foo(i++); }", source); //$NON-NLS-1$
+		Statement action = whileStatement.getBody();
+		checkSourceRange(action, "{ foo(i++); }", source); //$NON-NLS-1$
+		assertTrue("Not a block", action instanceof Block); //$NON-NLS-1$
+		Block block = (Block) action;
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size()); //$NON-NLS-1$
+		Statement stmt = (Statement) statements.get(0);
+		checkSourceRange(stmt, "foo(i++);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10843
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not a While statement", node instanceof WhileStatement); //$NON-NLS-1$
+		WhileStatement whileStatement = (WhileStatement) node;
+		checkSourceRange(whileStatement, "while (i < 10) foo(i++);", source); //$NON-NLS-1$
+		Statement action = whileStatement.getBody();
+		checkSourceRange(action, "foo(i++);", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10798
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		String expectedSource =
+			"public void foo() {\n" + //$NON-NLS-1$
+			"		foo();\n" + //$NON-NLS-1$
+			"	}"; //$NON-NLS-1$
+		checkSourceRange(methodDeclaration, expectedSource, source);
+		expectedSource =
+			"{\n" + //$NON-NLS-1$
+			"		foo();\n" + //$NON-NLS-1$
+			"	}";		 //$NON-NLS-1$
+		checkSourceRange(methodDeclaration.getBody(), expectedSource, source);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10798
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		String expectedSource =
+			"public void foo() {\n" + //$NON-NLS-1$
+			"	}"; //$NON-NLS-1$
+		checkSourceRange(methodDeclaration, expectedSource, source);
+		expectedSource =
+			"{\n" + //$NON-NLS-1$
+			"	}";		 //$NON-NLS-1$
+		checkSourceRange(methodDeclaration.getBody(), expectedSource, source);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "Class c = java.lang.String.class;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a type literal", expression instanceof TypeLiteral); //$NON-NLS-1$
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10861
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0,0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		checkSourceRange(variableDeclarationStatement, "Class c = java.lang.String.class;", source); //$NON-NLS-1$
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a type literal", expression instanceof TypeLiteral); //$NON-NLS-1$
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10865
+	 * Check well known types
+	 */
+	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);
+		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();
+		ITypeBinding typeBinding = newAst.resolveWellKnownType("boolean"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "boolean", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("char"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "char", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("byte"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "byte", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("short"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "short", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("int"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("long"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "long", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("float"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "float", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("double"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "double", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("void"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "void", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Object"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.String"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "String", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.StringBuffer"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "StringBuffer", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Throwable"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Throwable", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Exception"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Exception", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.RuntimeException"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "RuntimeException", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Error"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Error", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Class"); //$NON-NLS-1$
+		assertNotNull("No typeBinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Class", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Runnable"); //$NON-NLS-1$
+		assertNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Cloneable"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.io.Serializable"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Boolean"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Byte"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Character"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Double"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Float"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Integer"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Long"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Short"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+		typeBinding = newAst.resolveWellKnownType("java.lang.Void"); //$NON-NLS-1$
+		assertNotNull("typeBinding not null", typeBinding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "Object o= /*]*/new Object()/*[*/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "new Object()", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "boolean b = /*]*/true/*[*/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "true", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "char c = /*]*/'c'/*[*/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "'c'", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "Object o = /*]*/null/*[*/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "null", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "Object o = /*]*/Object.class/*[*/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "Object.class", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "int i = /**/(2)/**/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "(2)", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "String[] tab = /**/new String[3]/**/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "new String[3]", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "String[] tab = /**/{ }/**/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "{ }", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "String s = /**/tab1[0]/**/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "tab1[0]", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "Object o = /*]*/new java.lang.Object()/*[*/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "new java.lang.Object()", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10898
+	 */
+	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);
+		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;
+		assertEquals("no errors", 1, unit.getMessages().length); //$NON-NLS-1$
+		assertEquals("no errors", 1, unit.getProblems().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10913
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("Not a qualifiedName", expression instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) expression;
+		SimpleName simpleName = qualifiedName.getName();
+		assertEquals("Wrong name", "x", simpleName.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("NO binding", binding); //$NON-NLS-1$
+		assertTrue("Not a variable binding", binding instanceof IVariableBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "x", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Name name = qualifiedName.getQualifier();
+		assertTrue("Not a simpleName", name instanceof SimpleName); //$NON-NLS-1$
+		SimpleName simpleName2 = (SimpleName) name;
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertTrue("Not a type binding", binding2 instanceof ITypeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Test", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10933
+ 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10935
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
+		String expectedSource =
+				"{\n" + //$NON-NLS-1$
+				"			public void run() {\n" + //$NON-NLS-1$
+				"				/*]*/foo();/*[*/\n" + //$NON-NLS-1$
+				"			}\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(anonymousClassDeclaration, expectedSource, source);
+		expectedSource =
+				"run= new Runnable() {\n" + //$NON-NLS-1$
+				"			public void run() {\n" + //$NON-NLS-1$
+				"				/*]*/foo();/*[*/\n" + //$NON-NLS-1$
+				"			}\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(variableDeclarationFragment, expectedSource, source);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		String expectedSource =
+				"public void fails() {\n" + //$NON-NLS-1$
+				"		foo()\n" + //$NON-NLS-1$
+				"	}"; //$NON-NLS-1$
+		checkSourceRange(methodDeclaration, expectedSource, source, true/*expectMalformed*/);
+		Block block = methodDeclaration.getBody();
+		expectedSource =
+				"{\n" + //$NON-NLS-1$
+				"		foo()\n" + //$NON-NLS-1$
+				"	}"; //$NON-NLS-1$
+		checkSourceRange(block, expectedSource, source);
+		node = getASTNode(compilationUnit, 0, 1);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10986
+	 */
+	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);
+		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;
+		assertEquals("Wrong size", 2, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertEquals("Wrong size", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("not a method invocation", expression instanceof MethodInvocation); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		ITypeBinding typeBinding = methodInvocation.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("LList;", typeBinding.getKey());
+		assertEquals("Ltest0295/Test;.g()LList;", methodInvocation.resolveMethodBinding().getKey());
+	}
+
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		String expectedSource =
+				"public void fails() {\n" + //$NON-NLS-1$
+				"		foo()\n" + //$NON-NLS-1$
+				"	}"; //$NON-NLS-1$
+		checkSourceRange(methodDeclaration, expectedSource, source, true/*expectMalformed*/);
+		Block block = methodDeclaration.getBody();
+		expectedSource =
+				"{\n" + //$NON-NLS-1$
+				"		foo()\n" + //$NON-NLS-1$
+				"	}"; //$NON-NLS-1$
+		checkSourceRange(block, expectedSource, source);
+		node = getASTNode(compilationUnit, 0, 1);
+		assertTrue("Not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11037
+	 */
+	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);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10984
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a ReturnStatement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		checkSourceRange(expression, "a().length != 3", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "int i = (/**/2/**/);", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a parenthesized expression", expression instanceof ParenthesizedExpression); //$NON-NLS-1$
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression;
+		Expression expression2 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression2, "2", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "boolean b = /**/true/**/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "true", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=10874
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11104
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a Field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		checkSourceRange(fieldDeclaration, "Object o = /**/null/**/;", source); //$NON-NLS-1$
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		checkSourceRange(expression, "null", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11106
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a DoStatement", node instanceof DoStatement); //$NON-NLS-1$
+		DoStatement doStatement = (DoStatement) node;
+		String expectedSource =
+				"do\n" +   //$NON-NLS-1$
+				"			foo();\n" +  //$NON-NLS-1$
+				"		while(1 < 10);"; //$NON-NLS-1$
+		checkSourceRange(doStatement, expectedSource, source);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11129
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression2 = expressionStatement.getExpression();
+		assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
+		Assignment assignment = (Assignment) expression2;
+		Expression expression = assignment.getRightHandSide();
+		assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression;
+		ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "char", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type type = castExpression.getType();
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "char", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11151
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		checkSourceRange(node, "public void foo(int arg);", source); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		assertNull("Has a body", block); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11125
+	 */
+	public void test0305() {
+		char[] source =
+				("package test0305;\n" +  //$NON-NLS-1$
+				"\n" +  //$NON-NLS-1$
+				"class Test {\n" +  //$NON-NLS-1$
+				"	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$
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong package", "test0305", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("Not an interface", typeBinding.isClass()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11125
+	 */
+	public void test0306() {
+		char[] source =
+				("package java.lang;\n" +  //$NON-NLS-1$
+				"\n" +  //$NON-NLS-1$
+				"class Object {\n" +  //$NON-NLS-1$
+				"	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$
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong package", "java.lang", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("Not an interface", typeBinding.isClass()); //$NON-NLS-1$
+		assertEquals("Wrong size", 2, typeBinding.getDeclaredMethods().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		assertNotNull("No body", block); //$NON-NLS-1$
+		List statements = block.statements();
+		assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(0);
+		assertTrue("Not a super constructor invocation", statement instanceof SuperConstructorInvocation); //$NON-NLS-1$
+		checkSourceRange(statement, "super(10);", source);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11371
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("not a method declaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		assertNotNull("No body", block); //$NON-NLS-1$
+		List statements = block.statements();
+		assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(0);
+		assertTrue("Not a super constructor invocation", statement instanceof SuperConstructorInvocation); //$NON-NLS-1$
+		SuperConstructorInvocation superConstructorInvocation = (SuperConstructorInvocation) statement;
+		IMethodBinding methodBinding = superConstructorInvocation.resolveConstructorBinding();
+		assertNotNull("No methodBinding", methodBinding); //$NON-NLS-1$
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+		assertNotNull("No methodBinding2", methodBinding2); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11380
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a conditional expression", expression instanceof ConditionalExpression); //$NON-NLS-1$
+		ConditionalExpression conditionalExpression = (ConditionalExpression) expression;
+		ITypeBinding typeBinding = conditionalExpression.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11380
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a qualified name", expression instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) expression;
+		Name qualifier = qualifiedName.getQualifier();
+		IBinding binding = qualifier.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("wrong name", "I", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11638
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
+		List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("wrong size for body declarations", 1, bodyDeclarations.size()); //$NON-NLS-1$
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		assertNotNull("no body", block); //$NON-NLS-1$
+		List statements = block.statements();
+		assertEquals("Wrong size for statements", 1, statements.size()); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(0);
+		assertTrue("not a variable declaration statement", statement instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement2 = (VariableDeclarationStatement) statement;
+		List fragments2 = variableDeclarationStatement2.fragments();
+		assertEquals("wrong size for fragments2", 1, fragments2.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment2 = (VariableDeclarationFragment) fragments2.get(0);
+		Expression expression2 = variableDeclarationFragment2.getInitializer();
+		assertTrue("Not a name", expression2 instanceof Name); //$NON-NLS-1$
+		Name name = (Name) expression2;
+		checkSourceRange(name, "j", source); //$NON-NLS-1$
+		IBinding binding = name.resolveBinding();
+		ASTNode declaringNode = compilationUnit.findDeclaringNode(binding);
+		assertNotNull("No declaring node", declaringNode); //$NON-NLS-1$
+		checkSourceRange(declaringNode, "int j", source); //$NON-NLS-1$
+		assertTrue("Not a single variable declaration", declaringNode instanceof SingleVariableDeclaration); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11638
+	 * There is a error in this source. A is unresolved. Then there is no
+	 * declaring node.
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("not a class instance creation", expression instanceof ClassInstanceCreation); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		assertNotNull("No body", anonymousClassDeclaration); //$NON-NLS-1$
+		List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("wrong size for body declarations", 1, bodyDeclarations.size()); //$NON-NLS-1$
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("Not a method declaration", bodyDeclaration instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		assertNotNull("no body", block); //$NON-NLS-1$
+		List statements = block.statements();
+		assertEquals("Wrong size for statements", 1, statements.size()); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(0);
+		assertTrue("not a variable declaration statement", statement instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement2 = (VariableDeclarationStatement) statement;
+		List fragments2 = variableDeclarationStatement2.fragments();
+		assertEquals("wrong size for fragments2", 1, fragments2.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment2 = (VariableDeclarationFragment) fragments2.get(0);
+		Expression expression2 = variableDeclarationFragment2.getInitializer();
+		assertTrue("Not a name", expression2 instanceof Name); //$NON-NLS-1$
+		Name name = (Name) expression2;
+		checkSourceRange(name, "j", source); //$NON-NLS-1$
+		IBinding binding = name.resolveBinding();
+		ASTNode declaringNode = compilationUnit.findDeclaringNode(binding);
+		assertNotNull("No declaring node is available", declaringNode); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11659
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not an InfixExpression", expression instanceof InfixExpression); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) expression;
+		checkSourceRange(infixExpression, "i+j", source); //$NON-NLS-1$
+		Expression expression2 = infixExpression.getLeftOperand();
+		checkSourceRange(expression2, "i", source); //$NON-NLS-1$
+		assertTrue("Not a name", expression2 instanceof Name); //$NON-NLS-1$
+		Name name = (Name) expression2;
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		ASTNode astNode = compilationUnit.findDeclaringNode(binding);
+		assertNotNull("No declaring node", astNode); //$NON-NLS-1$
+		checkSourceRange(astNode, "int i", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=12326
+	 */
+	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);
+		assertNotNull("No result", result); //$NON-NLS-1$
+		assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("Wrong line number", 1, compilationUnit.getLineNumber(0)); //$NON-NLS-1$
+		// ensure that last character is on the last line
+		assertEquals("Wrong line number", 3, compilationUnit.getLineNumber(source.length - 1)); //$NON-NLS-1$
+		// source.length is beyond the size of the compilation unit source
+		assertEquals("Wrong line number", -1, compilationUnit.getLineNumber(source.length)); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=12326
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a Return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("Not an instanceof expression", expression instanceof InstanceofExpression); //$NON-NLS-1$
+		InstanceofExpression instanceOfExpression = (InstanceofExpression) expression;
+		Type rightOperand = instanceOfExpression.getRightOperand();
+		assertTrue("Not a simpleType", rightOperand instanceof SimpleType); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) rightOperand;
+		Name n = simpleType.getName();
+		assertTrue("Not a qualified name", n instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName name = (QualifiedName) n;
+		checkSourceRange(name, "java.io.Serializable", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = name.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Serializable", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Name qualifier = name.getQualifier();
+		assertTrue("Not a qualified name", qualifier instanceof QualifiedName); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = qualifier.resolveTypeBinding();
+		assertNull("typebinding2 is not null", typeBinding2); //$NON-NLS-1$
+		IBinding binding = qualifier.resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+		IPackageBinding pBinding = (IPackageBinding) binding;
+		assertEquals("Wrong name", "java.io", pBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=12454
+	 */
+	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);
+		assertNotNull("No result", result); //$NON-NLS-1$
+		assertTrue("Not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("Wrong size", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertEquals("Wrong size", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=12781
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a return statement", node instanceof ReturnStatement); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("not an instanceof expression", expression instanceof InstanceofExpression); //$NON-NLS-1$
+		InstanceofExpression instanceOfExpression = (InstanceofExpression) expression;
+		Expression left = instanceOfExpression.getLeftOperand();
+		assertTrue("Not a Name", left instanceof Name); //$NON-NLS-1$
+		Name name = (Name) left;
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("wrong name", "x", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding typeBinding = name.resolveTypeBinding();
+		assertNotNull("No typebinding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong type", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type right = instanceOfExpression.getRightOperand();
+		assertTrue("Not a simpleType", right instanceof SimpleType); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) right;
+		name = simpleType.getName();
+		assertTrue("Not a simpleName", name instanceof SimpleName); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		IBinding binding2 = simpleName.resolveBinding();
+		assertNotNull("No binding2", binding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+		assertNotNull("No typeBinding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13233
+	 */
+	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);
+		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;
+		assertEquals("No error", 1, unit.getMessages().length); //$NON-NLS-1$
+		assertEquals("No error", 1, unit.getProblems().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+		ArrayCreation arrayCreation = (ArrayCreation) expression;
+		ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
+		assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ArrayType arrayType = arrayCreation.getType();
+		ITypeBinding typeBinding2 = arrayType.resolveBinding();
+		assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type type = arrayType.getElementType();
+		assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		ITypeBinding typeBinding3 = simpleType.resolveBinding();
+		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "int[]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		ITypeBinding typeBinding = arrayType.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		Type elementType = arrayType.getElementType();
+		assertTrue("Not a simple type", elementType.isPrimitiveType()); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = elementType.resolveBinding();
+		assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		ITypeBinding typeBinding = arrayType.resolveBinding();
+		checkSourceRange(type, "java.lang.Object[][]", source); //$NON-NLS-1$
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		Type elementType = arrayType.getElementType();
+		assertTrue("Not a simple type", elementType.isSimpleType()); //$NON-NLS-1$
+		ITypeBinding typeBinding3 = elementType.resolveBinding();
+		assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong dimension", 0, typeBinding3.getDimensions()); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding3.getName());		 //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13231
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a FieldDeclaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a null literal", expression instanceof NullLiteral); //$NON-NLS-1$
+		NullLiteral nullLiteral = (NullLiteral) expression;
+		ITypeBinding typeBinding = nullLiteral.resolveTypeBinding();
+		assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not the null type", typeBinding.isNullType()); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", typeBinding.getQualifiedName(), "null"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression2 = expressionStatement.getExpression();
+		assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
+		Assignment assignment = (Assignment) expression2;
+		Expression expression = assignment.getRightHandSide();
+		assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression;
+		ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Object", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type type = castExpression.getType();
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression2 = expressionStatement.getExpression();
+		assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
+		Assignment assignment = (Assignment) expression2;
+		Expression expression = assignment.getRightHandSide();
+		assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression;
+		ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type type = castExpression.getType();
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "Object[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression2 = expressionStatement.getExpression();
+		assertTrue("Not an Assignement", expression2 instanceof Assignment); //$NON-NLS-1$
+		Assignment assignment = (Assignment) expression2;
+		Expression expression = assignment.getRightHandSide();
+		assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression;
+		ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+		assertNotNull("No binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "int[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type type = castExpression.getType();
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "int[]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14217
+	 */
+	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);
+		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$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertTrue("Not an ExpressionStatement", node instanceof ExpressionStatement); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		checkSourceRange(expressionStatement.getExpression(), "a().f= a()", source); //$NON-NLS-1$
+		checkSourceRange(expressionStatement, "a().f= a();", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14198
+	 */
+	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);
+		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;
+		assertEquals("Wrong number of errors", 2, compilationUnit.getProblems().length); //$NON-NLS-1$<
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not an VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a CastExpression", expression instanceof CastExpression); //$NON-NLS-1$
+		CastExpression castExpression = (CastExpression) expression;
+		ITypeBinding typeBinding = castExpression.resolveTypeBinding();
+		assertNotNull("No typebinding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "String", typeBinding.getName());
+		Type type = castExpression.getType();
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		assertNotNull("No binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong name", "String", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "java.lang.Object[]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		ITypeBinding typeBinding = arrayType.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type elementType = arrayType.getElementType();
+		assertTrue("Not a simple type", elementType.isSimpleType()); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = elementType.resolveBinding();
+		assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+		ITypeBinding typeBinding3 = expression.resolveTypeBinding();
+		assertNotNull("No typeBinding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ArrayCreation arrayCreation = (ArrayCreation) expression;
+		ArrayInitializer arrayInitializer = arrayCreation.getInitializer();
+		assertNotNull("not array initializer", arrayInitializer); //$NON-NLS-1$
+		ITypeBinding typeBinding4 = arrayInitializer.resolveTypeBinding();
+		assertNotNull("No typeBinding4", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "java.lang.Object[]", source); //$NON-NLS-1$
+		assertTrue("Not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		ITypeBinding typeBinding = arrayType.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type elementType = arrayType.getElementType();
+		assertTrue("Not a simple type", elementType.isSimpleType()); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = elementType.resolveBinding();
+		assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+		ITypeBinding typeBinding3 = expression.resolveTypeBinding();
+		assertNotNull("No typeBinding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ArrayCreation arrayCreation = (ArrayCreation) expression;
+		ArrayInitializer arrayInitializer = arrayCreation.getInitializer();
+		assertNotNull("not array initializer", arrayInitializer); //$NON-NLS-1$
+		ITypeBinding typeBinding4 = arrayInitializer.resolveTypeBinding();
+		assertNotNull("No typeBinding4", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14313
+	 */
+	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);
+		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;
+		assertEquals("wrong size", 2, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertEquals("wrong size", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+		IMethodBinding[] methods = typeBinding.getDeclaredMethods();
+		assertEquals("wrong size", 1, methods.length); //$NON-NLS-1$
+		assertTrue("not a constructor", methods[0].isConstructor()); //$NON-NLS-1$
+		assertTrue("wrong name", !methods[0].getName().equals("foo")); //$NON-NLS-1$ //$NON-NLS-2$
+		node = getASTNode(compilationUnit, 0, 0);
+		assertTrue("Not a methodDeclaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNull("method binding not null", methodBinding); //$NON-NLS-1$
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		ITypeBinding typeBinding2 = expression.resolveTypeBinding();
+		assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14322
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not an VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a QualifiedName", expression instanceof QualifiedName); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) expression;
+		IBinding binding = qualifiedName.getName().resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.VARIABLE, binding.getKind()); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertTrue("Not a field", variableBinding.isField()); //$NON-NLS-1$
+		assertNull("Got a declaring class", variableBinding.getDeclaringClass()); //$NON-NLS-1$
+		assertEquals("wrong name", "length", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14403
+	 */
+	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);
+		assertNotNull("No compilation unit", result); //$NON-NLS-1$
+		assertTrue("result is not a compilation unit", result instanceof CompilationUnit); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+		ArrayCreation arrayCreation = (ArrayCreation) expression;
+		ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
+		assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[][]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ArrayType arrayType = arrayCreation.getType();
+		ITypeBinding typeBinding2 = arrayType.resolveBinding();
+		assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[][]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type type = arrayType.getElementType();
+		assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		ITypeBinding typeBinding3 = simpleType.resolveBinding();
+		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		type = arrayType.getElementType();
+		ITypeBinding typeBinding4 = type.resolveBinding();
+		assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=13807
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertTrue("Not a VariableDeclarationStatement", node instanceof VariableDeclarationStatement); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not an array creation", expression instanceof ArrayCreation); //$NON-NLS-1$
+		ArrayCreation arrayCreation = (ArrayCreation) expression;
+		ITypeBinding typeBinding = arrayCreation.resolveTypeBinding();
+		assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[][][]", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ArrayType arrayType = arrayCreation.getType();
+		checkSourceRange(arrayType, "Object[10][][]", source); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = arrayType.resolveBinding();
+		assertNotNull("no type binding2", typeBinding2); //$NON-NLS-1$
+		assertEquals("wrong name", "Object[][][]", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Type type = arrayType.getElementType();
+		assertTrue("Not a simple type", type instanceof SimpleType); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		checkSourceRange(simpleType, "Object", source); //$NON-NLS-1$
+		ITypeBinding typeBinding3 = simpleType.resolveBinding();
+		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		type = arrayType.getElementType();
+		ITypeBinding typeBinding4 = type.resolveBinding();
+		assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
+		assertEquals("wrong name", "Object", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertEquals("errors found", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		Type superclassType = typeDeclaration.getSuperclassType();
+		assertNotNull("no super class", superclassType); //$NON-NLS-1$
+		assertEquals("Wrong type", superclassType.getNodeType(), ASTNode.SIMPLE_TYPE);
+		SimpleType simpleType = (SimpleType) superclassType;
+		Name name = simpleType.getName();
+		assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) name;
+		name = qualifiedName.getQualifier();
+		assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		qualifiedName = (QualifiedName) name;
+		name = qualifiedName.getQualifier();
+		assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertEquals("wrong type", IBinding.PACKAGE, binding.getKind()); //$NON-NLS-1$
+		assertEquals("wrong name", "junit", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14526
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertEquals("errors found", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("not a type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List superInterfaces = typeDeclaration.superInterfaceTypes();
+		assertEquals("wrong size", 1, superInterfaces.size()); //$NON-NLS-1$
+		Type type = (Type) superInterfaces.get(0);
+		assertEquals("wrong type", type.getNodeType(), ASTNode.SIMPLE_TYPE);
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) name;
+		name = qualifiedName.getQualifier();
+		assertTrue("not a simple name", name.isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertEquals("wrong name", "Sorter", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14602
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		checkSourceRange(variableDeclarationFragment, "message= Test.m(\"s\", new String[]{\"g\"})", source); //$NON-NLS-1$
+		checkSourceRange(fieldDeclaration, "String message= Test.m(\"s\", new String[]{\"g\"});", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14852
+	 */
+	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);
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IBinding binding;
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			List thrownExceptions = internalThrownExceptions(methodDeclaration);
+			assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
+			Name name = (Name) thrownExceptions.get(0);
+			binding = name.resolveBinding();	
+		} else {
+			List thrownExceptionTypes = methodDeclaration.thrownExceptionTypes();
+			assertEquals("Wrong size", 1, thrownExceptionTypes.size()); //$NON-NLS-1$
+			Type type = (Type) thrownExceptionTypes.get(0);
+			binding = type.resolveBinding();
+		}
+		assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertEquals("wrong name", "IOException", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=15061
+	 */
+	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);
+		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;
+		assertEquals("No errors found", 3, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("not a Type declaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size()); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclarations.get(0);
+		checkSourceRange(methodDeclaration, "int doQuery(boolean x);", source); //$NON-NLS-1$
+		node = getASTNode(compilationUnit, 0, 1);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
+		String expectedSource =
+			"public void setX(boolean x) {\n" +  //$NON-NLS-1$
+			" 		{\n" +  //$NON-NLS-1$
+			"		z\n" +  //$NON-NLS-1$
+			"	}\n" +  //$NON-NLS-1$
+			"}"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source, true/*expectMalformed*/);
+		int methodEndPosition = node.getStartPosition() + node.getLength();
+		node = getASTNode(compilationUnit, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		int typeEndPosition = node.getStartPosition() + node.getLength();
+		assertEquals("different positions", methodEndPosition, typeEndPosition); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=14852
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not an method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertNotNull("No receiver", expression2); //$NON-NLS-1$
+		ITypeBinding binding = expression2.resolveTypeBinding();
+		assertNotNull("No type binding", binding); //$NON-NLS-1$
+		assertEquals("wrong name", "A", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong name", "p2", binding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("Not a qualified name", expression2.getNodeType() == ASTNode.QUALIFIED_NAME); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) expression2;
+		SimpleName simpleName = qualifiedName.getName();
+		assertEquals("wrong name", "A", simpleName.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding typeBinding = simpleName.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "A", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong name", "p2", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		Name name = qualifiedName.getQualifier();
+		assertTrue("Not a simple name", name.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName2 = (SimpleName) name;
+		assertEquals("wrong name", "p2", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("No binding", binding2); //$NON-NLS-1$
+		assertEquals("wrong type", IBinding.PACKAGE, binding2.getKind()); //$NON-NLS-1$
+		assertEquals("wrong name", "p2", binding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		node = getASTNode(compilationUnit, 0, 1, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement2 = (ExpressionStatement) node;
+		Expression expression3 = expressionStatement2.getExpression();
+		assertTrue("Not an method invocation", expression3.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation2 = (MethodInvocation) expression3;
+		Expression expression4 = methodInvocation2.getExpression();
+		assertNotNull("No receiver", expression4); //$NON-NLS-1$
+		ITypeBinding binding3 = expression4.resolveTypeBinding();
+		assertNotNull("No type binding", binding3); //$NON-NLS-1$
+		assertEquals("wrong name", "A", binding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("wrong name", "p1", binding3.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=15804
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an if statement", node.getNodeType() == ASTNode.IF_STATEMENT); //$NON-NLS-1$
+		String expectedSource =
+				"if (field != null) {\n" + //$NON-NLS-1$
+				"			throw new IOException();\n" + //$NON-NLS-1$
+				"		} else if (field == null) {\n" + //$NON-NLS-1$
+				"			throw new MalformedURLException();\n" + //$NON-NLS-1$
+				"		} else if (field == null) {\n" + //$NON-NLS-1$
+				"			throw new InterruptedIOException();\n" + //$NON-NLS-1$
+				"		} else {\n" + //$NON-NLS-1$
+				"			throw new UnsupportedEncodingException();\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+		IfStatement ifStatement = (IfStatement) node;
+		Statement thenStatement = ifStatement.getThenStatement();
+		expectedSource =
+				"{\n" + //$NON-NLS-1$
+				"			throw new IOException();\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(thenStatement, expectedSource, source);
+		Statement elseStatement = ifStatement.getElseStatement();
+		expectedSource =
+				"if (field == null) {\n" + //$NON-NLS-1$
+				"			throw new MalformedURLException();\n" + //$NON-NLS-1$
+				"		} else if (field == null) {\n" + //$NON-NLS-1$
+				"			throw new InterruptedIOException();\n" + //$NON-NLS-1$
+				"		} else {\n" + //$NON-NLS-1$
+				"			throw new UnsupportedEncodingException();\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(elseStatement, expectedSource, source);
+		assertTrue("Not a if statement", elseStatement.getNodeType() == ASTNode.IF_STATEMENT); //$NON-NLS-1$
+		ifStatement = (IfStatement) elseStatement;
+		thenStatement = ifStatement.getThenStatement();
+		expectedSource =
+				"{\n" + //$NON-NLS-1$
+				"			throw new MalformedURLException();\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(thenStatement, expectedSource, source);
+		elseStatement = ifStatement.getElseStatement();
+		expectedSource =
+				"if (field == null) {\n" + //$NON-NLS-1$
+				"			throw new InterruptedIOException();\n" + //$NON-NLS-1$
+				"		} else {\n" + //$NON-NLS-1$
+				"			throw new UnsupportedEncodingException();\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(elseStatement, expectedSource, source);
+		assertTrue("Not a if statement", elseStatement.getNodeType() == ASTNode.IF_STATEMENT); //$NON-NLS-1$
+		ifStatement = (IfStatement) elseStatement;
+		thenStatement = ifStatement.getThenStatement();
+		expectedSource =
+				"{\n" + //$NON-NLS-1$
+				"			throw new InterruptedIOException();\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(thenStatement, expectedSource, source);
+		elseStatement = ifStatement.getElseStatement();
+		expectedSource =
+				"{\n" + //$NON-NLS-1$
+				"			throw new UnsupportedEncodingException();\n" + //$NON-NLS-1$
+				"		}"; //$NON-NLS-1$
+		checkSourceRange(elseStatement, expectedSource, source);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=15657
+	 * @deprecated marked deprecated to suppress JDOM-related deprecation warnings
+	 */
+	public void test0342() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0342", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IDOMCompilationUnit dcompUnit = new DOMFactory().createCompilationUnit(sourceUnit.getSource(), sourceUnit.getElementName());
+		assertNotNull("dcompUnit is null", dcompUnit); //$NON-NLS-1$
+
+		// searching class
+		IDOMType classNode = null;
+		Enumeration children = dcompUnit.getChildren();
+		assertNotNull("dcompUnit has no children", children); //$NON-NLS-1$
+
+		while (children.hasMoreElements()) {
+			IDOMNode child = (IDOMNode) children.nextElement();
+			if (child.getNodeType() == IDOMNode.TYPE) {
+				classNode = (IDOMType) child;
+				break;
+			}
+		}
+		assertNotNull("classNode is null", classNode); //$NON-NLS-1$
+
+		// searching for methods
+		children = classNode.getChildren();
+
+		assertNotNull("classNode has no children", children); //$NON-NLS-1$
+
+		while (children.hasMoreElements()) {
+			IDOMNode child = (IDOMNode) children.nextElement();
+			if (child.getNodeType() == IDOMNode.METHOD) {
+				IDOMMethod childMethod = (IDOMMethod) child;
+
+				// returnType is always null;
+				String returnType = childMethod.getReturnType();
+				if (childMethod.isConstructor()) {
+					assertNull(returnType);
+				} else {
+					assertNotNull("no return type", returnType); //$NON-NLS-1$
+				}
+			}
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=16051
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 1);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an if statement", node.getNodeType() == ASTNode.IF_STATEMENT); //$NON-NLS-1$
+		String expectedSource =
+				"if (flag)\n" + //$NON-NLS-1$
+				"			i= 10;"; //$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=16132
+	 */
+	public void test0344() throws JavaModelException {
+		IJavaProject project = null;
+		String pb_assert = null;
+		String compiler_source = null;
+		String compiler_compliance = null;
+		try {
+			ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0344", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+			project = sourceUnit.getJavaProject();
+			pb_assert = project.getOption(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, true);
+			compiler_source = project.getOption(JavaCore.COMPILER_SOURCE, true);
+			compiler_compliance = project.getOption(JavaCore.COMPILER_COMPLIANCE, true);
+			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);
+			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;
+			assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		} finally {
+			if (project != null) {
+				project.setOption(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, pb_assert);
+				project.setOption(JavaCore.COMPILER_SOURCE, compiler_source);
+				project.setOption(JavaCore.COMPILER_COMPLIANCE, compiler_compliance);
+			}
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=17922
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not an ArrayCreation", expression.getNodeType() == ASTNode.ARRAY_CREATION); //$NON-NLS-1$
+		ArrayCreation arrayCreation = (ArrayCreation) expression;
+		ArrayType arrayType = arrayCreation.getType();
+		IBinding binding2 = arrayType.resolveBinding();
+		assertNotNull("no binding2", binding2); //$NON-NLS-1$
+		assertEquals("not a type", binding2.getKind(), IBinding.TYPE); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = (ITypeBinding) binding2;
+		assertTrue("Not an array type binding2", typeBinding2.isArray()); //$NON-NLS-1$
+		Type type = arrayType.getElementType();
+		assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("QualifiedName", name.getNodeType() == ASTNode.QUALIFIED_NAME); //$NON-NLS-1$
+		SimpleName simpleName = ((QualifiedName) name).getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertEquals("not a type", binding.getKind(), IBinding.TYPE); //$NON-NLS-1$
+		ITypeBinding typeBinding = (ITypeBinding) binding;
+		assertTrue("An array type binding", !typeBinding.isArray()); //$NON-NLS-1$
+		Type type2 = fieldDeclaration.getType();
+		assertTrue("Not a array type", type2.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType2 = (ArrayType) type2;
+		Type type3 = arrayType2.getElementType();
+		assertTrue("Not a simple type", type3.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType2 = (SimpleType) type3;
+		Name name2 = simpleType2.getName();
+		assertTrue("Not a qualified name", name2.getNodeType() == ASTNode.QUALIFIED_NAME); //$NON-NLS-1$
+		SimpleName simpleName2 = ((QualifiedName) name2).getName();
+		IBinding binding3 = simpleName2.resolveBinding();
+		assertNotNull("no binding", binding3); //$NON-NLS-1$
+		assertEquals("not a type", binding3.getKind(), IBinding.TYPE); //$NON-NLS-1$
+		ITypeBinding typeBinding3 = (ITypeBinding) binding3;
+		assertTrue("An array type binding", !typeBinding3.isArray()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an variable declaration", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "Vector", source); //$NON-NLS-1$
+		assertTrue("not an array type", !type.isArrayType()); //$NON-NLS-1$
+		assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("Not a simpleName", name.isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		ITypeBinding typeBinding = (ITypeBinding) binding;
+		assertTrue("An array", !typeBinding.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		ITypeBinding typeBinding2 = simpleType.resolveBinding();
+		assertNotNull("No binding", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, typeBinding2.getKind()); //$NON-NLS-1$
+		assertTrue("An array", !typeBinding2.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector", typeBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an variable declaration", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "Vector[]", source); //$NON-NLS-1$
+		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		ITypeBinding binding = arrayType.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertTrue("Not an array type", binding.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector[]", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an variable declaration", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "Vector[][]", source); //$NON-NLS-1$
+		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		ITypeBinding binding = arrayType.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertTrue("Not an array type", binding.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector[][]", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "Vector[][]", source); //$NON-NLS-1$
+		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		ITypeBinding binding = arrayType.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertTrue("Not an array type", binding.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector[][]", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18138
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "Vector", source); //$NON-NLS-1$
+		assertTrue("not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		ITypeBinding binding = simpleType.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertTrue("An array type", binding.isClass()); //$NON-NLS-1$
+		assertEquals("Wrong name", "Vector", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18169
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		checkSourceRange(singleVariableDeclaration, "int a", source); //$NON-NLS-1$
+		singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
+		checkSourceRange(singleVariableDeclaration, "int[] b", source); //$NON-NLS-1$
+		node = getASTNode(compilationUnit, 0, 1);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+		singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		checkSourceRange(singleVariableDeclaration, "int a", source); //$NON-NLS-1$
+		singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
+		checkSourceRange(singleVariableDeclaration, "int b[]", source);			 //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18169
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		List parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		checkSourceRange(singleVariableDeclaration, "final int a", source); //$NON-NLS-1$
+		singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
+		checkSourceRange(singleVariableDeclaration, "final int[] b", source); //$NON-NLS-1$
+		node = getASTNode(compilationUnit, 0, 1);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		parameters = methodDeclaration.parameters();
+		assertEquals("wrong size", 2, parameters.size()); //$NON-NLS-1$
+		singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+		checkSourceRange(singleVariableDeclaration, "final int a", source); //$NON-NLS-1$
+		singleVariableDeclaration = (SingleVariableDeclaration) parameters.get(1);
+		checkSourceRange(singleVariableDeclaration, "final int b[]", source);			 //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=18042
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("not null", node); //$NON-NLS-1$
+		assertTrue("Not an variable declaration", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		checkSourceRange(type, "InputStream", source); //$NON-NLS-1$
+		assertTrue("not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+		assertTrue("Not a class", binding.isClass()); //$NON-NLS-1$
+		assertEquals("Wrong name", "InputStream", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong package", "java.io", binding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding", binding2); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.TYPE, binding2.getKind()); //$NON-NLS-1$
+		ITypeBinding typeBinding = (ITypeBinding) binding2;
+		assertTrue("Not a class", typeBinding.isClass()); //$NON-NLS-1$
+		assertEquals("Wrong name", "InputStream", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong package", "java.io", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=19851
+	 */
+	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);
+		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;
+		assertEquals("errors found", 2, compilationUnit.getMessages().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=20520
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not an if statement", node.getNodeType() == ASTNode.IF_STATEMENT); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node;
+		Expression condition = ifStatement.getExpression();
+		assertTrue("Not an infixExpression", condition.getNodeType() == ASTNode.INFIX_EXPRESSION); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) condition;
+		Expression expression = infixExpression.getLeftOperand();
+		assertTrue("Not a method invocation expression", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a parenthesis expression", expression2.getNodeType() == ASTNode.PARENTHESIZED_EXPRESSION); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=20865
+	 */
+	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);
+		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;
+		assertEquals("errors found", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		Type type = variableDeclarationStatement.getType();
+		ITypeBinding binding = type.resolveBinding();
+		assertNotNull("Binding should NOT be null for type: "+type, binding);
+
+		// Verify that class instance creation has a null binding
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Expect only one fragment for VariableDeclarationStatement: "+variableDeclarationStatement, 1, fragments.size());
+		node = (ASTNode) fragments.get(0);
+		assertEquals("Not a variable declaration fragment", ASTNode.VARIABLE_DECLARATION_FRAGMENT, node.getNodeType()); //$NON-NLS-1$
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) node;
+		Expression initializer = fragment.getInitializer();
+		assertEquals("Expect a class instance creation for initializer: "+initializer, ASTNode.CLASS_INSTANCE_CREATION, initializer.getNodeType()); //$NON-NLS-1$
+		ClassInstanceCreation instanceCreation = (ClassInstanceCreation) initializer;
+		type = instanceCreation.getType();
+		binding = type.resolveBinding();
+		assertNull("Binding should BE null for type: "+type, binding);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=21757
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration statement", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		SimpleName name = typeDeclaration.getName();
+		checkSourceRange(name, "A", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=21768
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0,0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration statement", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		SimpleName name = methodDeclaration.getName();
+		checkSourceRange(name, "mdd", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=21768
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0,0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration statement", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		SimpleName name = methodDeclaration.getName();
+		checkSourceRange(name, "mdd", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0,0, 0);
+		assertNotNull(node);
+		assertTrue("Not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		List initializers = forStatement.initializers();
+		assertEquals("Wrong size", 1, initializers.size()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0,0, 0);
+		assertNotNull(node);
+		assertTrue("Not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		List initializers = forStatement.initializers();
+		assertEquals("Wrong size", 1, initializers.size()); //$NON-NLS-1$
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=21916
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		ForStatement forStatement = this.ast.newForStatement();
+
+		VariableDeclarationFragment iFragment = this.ast.newVariableDeclarationFragment();
+		iFragment.setName(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		iFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+		VariableDeclarationFragment jFragment = this.ast.newVariableDeclarationFragment();
+		jFragment.setName(this.ast.newSimpleName("j")); //$NON-NLS-1$
+		jFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+		VariableDeclarationFragment kFragment = this.ast.newVariableDeclarationFragment();
+		kFragment.setName(this.ast.newSimpleName("k")); //$NON-NLS-1$
+		kFragment.setInitializer(this.ast.newNumberLiteral("0"));//$NON-NLS-1$
+
+		VariableDeclarationExpression variableDeclarationExpression = this.ast.newVariableDeclarationExpression(iFragment);
+		variableDeclarationExpression.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
+		variableDeclarationExpression.fragments().add(jFragment);
+		variableDeclarationExpression.fragments().add(kFragment);
+		forStatement.initializers().add(variableDeclarationExpression);
+
+		PostfixExpression iPostfixExpression = this.ast.newPostfixExpression();
+		iPostfixExpression.setOperand(this.ast.newSimpleName("i"));//$NON-NLS-1$
+		iPostfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(iPostfixExpression);
+
+		PostfixExpression jPostfixExpression = this.ast.newPostfixExpression();
+		jPostfixExpression.setOperand(this.ast.newSimpleName("j"));//$NON-NLS-1$
+		jPostfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(jPostfixExpression);
+
+		PostfixExpression kPostfixExpression = this.ast.newPostfixExpression();
+		kPostfixExpression.setOperand(this.ast.newSimpleName("k"));//$NON-NLS-1$
+		kPostfixExpression.setOperator(PostfixExpression.Operator.INCREMENT);
+		forStatement.updaters().add(kPostfixExpression);
+
+		forStatement.setBody(this.ast.newBlock());
+
+		InfixExpression infixExpression = this.ast.newInfixExpression();
+		infixExpression.setLeftOperand(this.ast.newSimpleName("i")); //$NON-NLS-1$
+		infixExpression.setOperator(InfixExpression.Operator.LESS);
+		infixExpression.setRightOperand(this.ast.newNumberLiteral("10")); //$NON-NLS-1$
+		forStatement.setExpression(infixExpression);
+
+		assertTrue("Both AST trees should be identical", forStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		checkSourceRange(node, "for (int i=0, j=0, k=0; i<10 ; i++, j++, k++) {}", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 1);
+		assertNotNull(node);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a parenthesized expression", expression.getNodeType() == ASTNode.PARENTHESIZED_EXPRESSION); //$NON-NLS-1$
+		Expression expression2 = ((ParenthesizedExpression) expression).getExpression();
+		checkSourceRange(expression2, "xxxx", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11529
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		checkSourceRange(variableDeclarationStatement, "int local;", source); //$NON-NLS-1$
+		SimpleName simpleName = variableDeclarationFragment.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=11529
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		List initializers = forStatement.initializers();
+		assertEquals("Wrong size", 1, initializers.size()); //$NON-NLS-1$
+		VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) initializers.get(0);
+		List fragments = variableDeclarationExpression.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		SimpleName simpleName = variableDeclarationFragment.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		checkSourceRange(forStatement, "for (int i = 0; i < 5; ++i);", source); //$NON-NLS-1$
+		Statement statement = forStatement.getBody();
+		assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+		checkSourceRange(statement, ";", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a while statement", node.getNodeType() == ASTNode.WHILE_STATEMENT); //$NON-NLS-1$
+		WhileStatement whileStatement = (WhileStatement) node;
+		checkSourceRange(whileStatement, "while(i == 2);", source); //$NON-NLS-1$
+		Statement statement = whileStatement.getBody();
+		assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+		checkSourceRange(statement, ";", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
+	 */
+	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);
+		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;
+		assertProblemsSize(compilationUnit, 1, "The label test is never explicitly referenced"); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a labeled statement", node.getNodeType() == ASTNode.LABELED_STATEMENT); //$NON-NLS-1$
+		LabeledStatement labeledStatement = (LabeledStatement) node;
+		checkSourceRange(labeledStatement, "test:;", source); //$NON-NLS-1$
+		Statement statement = labeledStatement.getBody();
+		assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+		checkSourceRange(statement, ";", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
+	 */
+	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);
+		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;
+		assertProblemsSize(compilationUnit, 1, "The label test is never explicitly referenced"); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a labeled statement", node.getNodeType() == ASTNode.LABELED_STATEMENT); //$NON-NLS-1$
+		LabeledStatement labeledStatement = (LabeledStatement) node;
+		checkSourceRange(labeledStatement, "test:\\u003B", source); //$NON-NLS-1$
+		Statement statement = labeledStatement.getBody();
+		assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+		checkSourceRange(statement, "\\u003B", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * DoStatement ==> DoStatement
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull("Expression should not be null", node); //$NON-NLS-1$
+		DoStatement doStatement = this.ast.newDoStatement();
+		doStatement.setBody(this.ast.newEmptyStatement());
+		doStatement.setExpression(this.ast.newBooleanLiteral(true));
+		assertTrue("Both AST trees should be identical", doStatement.subtreeMatch(new ASTMatcher(), node));		//$NON-NLS-1$
+		String expectedSource = "do ; while(true);";//$NON-NLS-1$
+		checkSourceRange(node, expectedSource, source);
+		DoStatement doStatement2 = (DoStatement) node;
+		Statement statement = doStatement2.getBody();
+		assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+		checkSourceRange(statement, ";", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a labeled statement", node.getNodeType() == ASTNode.IF_STATEMENT); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node;
+		checkSourceRange(ifStatement, "if (i == 6);", source); //$NON-NLS-1$
+		Statement statement = ifStatement.getThenStatement();
+		assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+		checkSourceRange(statement, ";", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23048
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a labeled statement", node.getNodeType() == ASTNode.IF_STATEMENT); //$NON-NLS-1$
+		IfStatement ifStatement = (IfStatement) node;
+		checkSourceRange(ifStatement, "if (i == 6) {} else ;", source); //$NON-NLS-1$
+		Statement statement = ifStatement.getElseStatement();
+		assertTrue("Not an empty statement", statement.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+		checkSourceRange(statement, ";", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23118
+	 */
+	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);
+		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;
+		assertEquals("errors found", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		Statement statement = forStatement.getBody();
+		assertTrue("Not a block statement", statement.getNodeType() == ASTNode.BLOCK); //$NON-NLS-1$
+		Block block = (Block) statement;
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size()); //$NON-NLS-1$
+		Statement statement2 = (Statement) statements.get(0);
+		assertTrue("Not a break statement", statement2.getNodeType() == ASTNode.BREAK_STATEMENT); //$NON-NLS-1$
+		BreakStatement breakStatement = (BreakStatement) statement2;
+		checkSourceRange(breakStatement, "break;", source);		 //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23118
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		Statement statement = forStatement.getBody();
+		assertTrue("Not a block statement", statement.getNodeType() == ASTNode.BLOCK); //$NON-NLS-1$
+		Block block = (Block) statement;
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size()); //$NON-NLS-1$
+		Statement statement2 = (Statement) statements.get(0);
+		assertTrue("Not a break statement", statement2.getNodeType() == ASTNode.CONTINUE_STATEMENT); //$NON-NLS-1$
+		ContinueStatement continueStatement = (ContinueStatement) statement2;
+		checkSourceRange(continueStatement, "continue;", source);		 //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23052
+	 */
+	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);
+		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;
+		assertEquals("problems found", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
+		List imports = compilationUnit.imports();
+		assertEquals("wrong size", 1, imports.size()); //$NON-NLS-1$
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		IBinding binding = importDeclaration.resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertEquals("Not a type binding", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a cast expression", expression.getNodeType() == ASTNode.CAST_EXPRESSION); //$NON-NLS-1$
+		Type type = ((CastExpression) expression).getType();
+		checkSourceRange(type, "A", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23050
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = variableDeclarationFragment.resolveBinding();
+		assertNotNull("No variable binding", variableBinding); //$NON-NLS-1$
+		assertEquals("Wrong modifier", IModifierConstants.ACC_FINAL, variableBinding.getModifiers()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22161
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		SimpleName name = typeDeclaration.getName();
+		checkSourceRange(name, "B", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22161
+	 */
+	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 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$
+		ClassInstanceCreation classInstanceCreation2 = (ClassInstanceCreation) expression;
+		Type type = classInstanceCreation2.getType();
+		checkSourceRange(type, "Object", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22054
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("Not a super method invocation", expression.getNodeType() == ASTNode.SUPER_METHOD_INVOCATION); //$NON-NLS-1$
+		SuperMethodInvocation superMethodInvocation = (SuperMethodInvocation) expression;
+		ITypeBinding typeBinding = superMethodInvocation.resolveTypeBinding();
+		assertNotNull("no type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong declaring class", typeBinding.getSuperclass().getName(), "Object"); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName simpleName = superMethodInvocation.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("no binding", binding); //$NON-NLS-1$
+		assertEquals("Wrong type", IBinding.METHOD, binding.getKind()); //$NON-NLS-1$
+		IMethodBinding methodBinding = (IMethodBinding) binding;
+		assertEquals("Wrong declaring class", methodBinding.getDeclaringClass().getName(), "Object"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23054
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		Javadoc javadoc = typeDeclaration.getJavadoc();
+		assertNull("Javadoc not null", javadoc); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong fully qualified name", typeBinding.getQualifiedName(), "test0382.A"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong fully qualified name", typeBinding.getQualifiedName(), "test0383.A.B"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong fully qualified name", typeBinding.getQualifiedName(), "test0384.A.B.D"); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23117
+	 */
+	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);
+		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;
+		assertEquals("errors found", 1, compilationUnit.getMessages().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23259
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a switch statement", node.getNodeType() == ASTNode.SWITCH_STATEMENT); //$NON-NLS-1$
+		SwitchStatement switchStatement = (SwitchStatement) node;
+		List statements = switchStatement.statements();
+		assertEquals("Wrong size", 5, statements.size()); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(0);
+		assertTrue("Not a case statement", statement.getNodeType() == ASTNode.SWITCH_CASE); //$NON-NLS-1$
+		checkSourceRange(statement, "case 1:", source); //$NON-NLS-1$
+		statement = (Statement) statements.get(3);
+		assertTrue("Not a default case statement", statement.getNodeType() == ASTNode.SWITCH_CASE); //$NON-NLS-1$
+		checkSourceRange(statement, "default :", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22939
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not a cast expression", expression.getNodeType() == ASTNode.CAST_EXPRESSION); //$NON-NLS-1$
+		Type type = ((CastExpression) expression).getType();
+		checkSourceRange(type, "A", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "test0388.A", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "test0389.A.B", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "int", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "int[]", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22154
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "java.lang.String[]", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		checkSourceRange(type, "String", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "java.lang.String", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong dimension", 1, methodDeclaration.getExtraDimensions()); //$NON-NLS-1$
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull("No method binding", methodBinding); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = methodBinding.getReturnType();
+		assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "java.lang.String[]", typeBinding2.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong dimension", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
+		List extraDimensions = methodDeclaration.extraDimensions();
+		assertExtraDimensionsEqual("Wrong extra extra dimensions", extraDimensions, "[]");
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		checkSourceRange(type, "String", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "java.lang.String", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong dimension", 0, methodDeclaration.getExtraDimensions()); //$NON-NLS-1$
+	}
+
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
+	 */
+	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);
+		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;
+		assertEquals("errors found", 0, compilationUnit.getMessages().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		checkSourceRange(type, "String[]", source); //$NON-NLS-1$
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 1, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "java.lang.String[]", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong dimension", 1, methodDeclaration.getExtraDimensions()); //$NON-NLS-1$
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull("No method binding", methodBinding); //$NON-NLS-1$
+		ITypeBinding typeBinding2 = methodBinding.getReturnType();
+		assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+		assertEquals("Wrong qualified name", "java.lang.String[][]", typeBinding2.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong dimension", 2, typeBinding2.getDimensions()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration method = (MethodDeclaration) node;
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) method.parameters().get(0);
+		assertNotNull("Expression should not be null", singleVariableDeclaration); //$NON-NLS-1$
+		checkSourceRange(singleVariableDeclaration, "final String s[]", source); //$NON-NLS-1$
+		Type type = singleVariableDeclaration.getType();
+		checkSourceRange(type, "String", source); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 1, singleVariableDeclaration.getExtraDimensions()); //$NON-NLS-1$
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("An array binding", !typeBinding.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 0, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertEquals("wrong fully qualified name", "java.lang.String", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IVariableBinding variableBinding = singleVariableDeclaration.resolveBinding();
+		assertNotNull("No variable binding", variableBinding); //$NON-NLS-1$
+		assertTrue("Is a parameter", variableBinding.isParameter());
+		ITypeBinding typeBinding2 = variableBinding.getType();
+		assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+		assertTrue("Not an array binding", typeBinding2.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
+		assertEquals("wrong fully qualified name", "java.lang.String[]", typeBinding2.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		List extraDimensions = singleVariableDeclaration.extraDimensions();
+		assertExtraDimensionsEqual("Wrong extra extra dimensions", extraDimensions, "[]");
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23284
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration method = (MethodDeclaration) node;
+		SingleVariableDeclaration singleVariableDeclaration = (SingleVariableDeclaration) method.parameters().get(0);
+		assertNotNull("Expression should not be null", singleVariableDeclaration); //$NON-NLS-1$
+		checkSourceRange(singleVariableDeclaration, "final String[] \\u0073\\u005B][]", source); //$NON-NLS-1$
+		Type type = singleVariableDeclaration.getType();
+		checkSourceRange(type, "String[]", source); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 2, singleVariableDeclaration.getExtraDimensions()); //$NON-NLS-1$
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertTrue("Not an array binding", typeBinding.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 1, typeBinding.getDimensions()); //$NON-NLS-1$
+		assertEquals("wrong fully qualified name", "java.lang.String[]", typeBinding.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IVariableBinding variableBinding = singleVariableDeclaration.resolveBinding();
+		assertNotNull("No variable binding", variableBinding); //$NON-NLS-1$
+		assertTrue("Is a parameter", variableBinding.isParameter());
+		ITypeBinding typeBinding2 = variableBinding.getType();
+		assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+		assertTrue("Not an array binding", typeBinding2.isArray()); //$NON-NLS-1$
+		assertEquals("Wrong dimension", 3, typeBinding2.getDimensions()); //$NON-NLS-1$
+		assertEquals("wrong fully qualified name", "java.lang.String[][][]", typeBinding2.getQualifiedName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23362
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("wrong size", 1, fragments.size()); //$NON-NLS-1$
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = variableDeclarationFragment.getInitializer();
+		assertTrue("Not an infix expression", expression.getNodeType() == ASTNode.INFIX_EXPRESSION); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) expression;
+		checkSourceRange(infixExpression, "(1 + 2) * 3", source); //$NON-NLS-1$
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertTrue("Not an parenthesis expression", expression2.getNodeType() == ASTNode.PARENTHESIZED_EXPRESSION); //$NON-NLS-1$
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression2;
+		Expression expression3 = parenthesizedExpression.getExpression();
+		assertTrue("Not an infix expression", expression3.getNodeType() == ASTNode.INFIX_EXPRESSION); //$NON-NLS-1$
+		checkSourceRange(expression3, "1 + 2", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22306
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Not a constructor", methodDeclaration.isConstructor()); //$NON-NLS-1$
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("wrong size", 2, statements.size()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22306
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Not a constructor", methodDeclaration.isConstructor()); //$NON-NLS-1$
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("wrong size", 3, statements.size()); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(0);
+		assertTrue("Not an superconstructorinvocation", statement.getNodeType() == ASTNode.SUPER_CONSTRUCTOR_INVOCATION); //$NON-NLS-1$
+		checkSourceRange(statement, "super();", source); //$NON-NLS-1$
+	}
+}
\ No newline at end of file
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 31cea21..37ad583 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
@@ -859,10 +859,10 @@
 			"8. ERROR in /Converter15/src/a/X.java (at line 16)\n" +
 			"	}takeParam((int) c);\n" +
 			"	^\n" +
-			"Syntax error, insert \";\" to complete Statement\n" +			
-			"9. ERROR in /Converter15/src/a/X.java (at line 16)\n" +
-			"	}takeParam((int) c);\n" +
-			"	 ^^^^^^^^^^\n" +
+			"Syntax error, insert \";\" to complete Statement\n" + 
+			"9. ERROR in /Converter15/src/a/X.java (at line 16)\n" + 
+			"	}takeParam((int) c);\n" + 
+			"	 ^^^^^^^^^^\n" + 
 			"Return type for the method is missing\n",
 			result);
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java
index 0cb5ad2..407fa5b 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS3.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS4.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS4.java
index 6532bd0..ccc2dbc 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS4.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS4.java
@@ -15,8 +15,6 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.eclipse.jdt.core.dom.AST;
-
 /**
  * Test suite to verify that DOM/AST bugs are fixed.
  *
@@ -28,7 +26,7 @@
 
 public ASTConverterBugsTestJLS4(String name) {
     super(name);
-    this.testLevel = AST.JLS4;
+    this.testLevel = getJLS4();
 }
 
 public static Test suite() {
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
new file mode 100644
index 0000000..6693bf1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterBugsTestJLS8.java
@@ -0,0 +1,1045 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2012 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 java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+
+/**
+ * Test suite to verify that DOM/AST bugs are fixed.
+ *
+ * Note that only specific JLS8 tests are defined in this test suite, but when
+ * running it, all superclass {@link ASTConverterBugsTest} tests will be run
+ * as well.
+ */
+public class ASTConverterBugsTestJLS8 extends ASTConverterBugsTest {
+
+public ASTConverterBugsTestJLS8(String name) {
+    super(name);
+    this.testLevel = AST.JLS8;
+}
+
+public static Test suite() {
+	TestSuite suite = new Suite(ASTConverterBugsTestJLS8.class.getName());
+	List tests = buildTestsList(ASTConverterBugsTestJLS8.class, 1, 0/* do not sort*/);
+	for (int index=0, size=tests.size(); index<size; index++) {
+		suite.addTest((Test)tests.get(index));
+	}
+	return suite;
+}
+
+/**
+ * @bug 130778: Invalid annotation elements cause no annotation to be in the AST
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=130778"
+ */
+public void testBug130778a() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]public[*1*]\n" +
+			"[*2*]@AnAnnotation(\"a\")[*2*]\n" +
+			"[*3*]final[*3*]\n" +
+			"[*4*]@AnAnnotation2(\"b\")[*4*]\n" +
+			"class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]public[*1*] [*2*]@AnAnnotation(\"a\")[*2*] [*3*]final[*3*] [*4*]@AnAnnotation2(\"b\")[*4*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MODIFIER,[11,6],,,[N/A]\n" +
+			"2:SINGLE_MEMBER_ANNOTATION,[18,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MODIFIER,[37,5],,,[N/A]\n" +
+			"4:SINGLE_MEMBER_ANNOTATION,[43,19],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"No problem",
+			result);
+}
+public void testBug130778b() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"#\n" +
+			"[*1*]public[*1*]\n" +
+			"[*2*]@AnAnnotation(\"a\")[*2*]\n" +
+			"[*3*]final[*3*]\n" +
+			"[*4*]@AnAnnotation2(\"b\")[*4*]\n" +
+			"class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]public[*1*] [*2*]@AnAnnotation(\"a\")[*2*] [*3*]final[*3*] [*4*]@AnAnnotation2(\"b\")[*4*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MODIFIER,[13,6],,,[N/A]\n" +
+			"2:SINGLE_MEMBER_ANNOTATION,[20,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MODIFIER,[39,5],,,[N/A]\n" +
+			"4:SINGLE_MEMBER_ANNOTATION,[45,19],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	#\n" +
+			"	^\n" +
+			"Syntax error on token \"Invalid Character\", delete this token\n",
+			result);
+}
+public void testBug130778c() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]public[*1*]\n" +
+			"#\n" +
+			"[*2*]@AnAnnotation(\"a\")[*2*]\n" +
+			"[*3*]final[*3*]\n" +
+			"[*4*]@AnAnnotation2(\"b\")[*4*]\n" +
+			"class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]public[*1*] [*2*]@AnAnnotation(\"a\")[*2*] [*3*]final[*3*] [*4*]@AnAnnotation2(\"b\")[*4*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MODIFIER,[11,6],,,[N/A]\n" +
+			"2:SINGLE_MEMBER_ANNOTATION,[20,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MODIFIER,[39,5],,,[N/A]\n" +
+			"4:SINGLE_MEMBER_ANNOTATION,[45,19],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 3)\n" +
+			"	#\n" +
+			"	^\n" +
+			"Syntax error on token \"Invalid Character\", delete this token\n",
+			result);
+}
+public void testBug130778d() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]public[*1*]\n" +
+			"[*2*]@AnAnnotation(\"a\")[*2*]\n" +
+			"#\n" +
+			"[*3*]final[*3*]\n" +
+			"[*4*]@AnAnnotation2(\"b\")[*4*]\n" +
+			"class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]public[*1*] [*2*]@AnAnnotation(\"a\")[*2*] [*3*]final[*3*] [*4*]@AnAnnotation2(\"b\")[*4*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MODIFIER,[11,6],,,[N/A]\n" +
+			"2:SINGLE_MEMBER_ANNOTATION,[18,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MODIFIER,[39,5],,,[N/A]\n" +
+			"4:SINGLE_MEMBER_ANNOTATION,[45,19],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 4)\n" +
+			"	#\n" +
+			"	^\n" +
+			"Syntax error on token \"Invalid Character\", delete this token\n",
+			result);
+}
+public void testBug130778e() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]public[*1*]\n" +
+			"[*2*]@AnAnnotation(\"a\")[*2*]\n" +
+			"[*3*]final[*3*]\n" +
+			"#\n" +
+			"[*4*]@AnAnnotation2(\"b\")[*4*]\n" +
+			"class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]public[*1*] [*2*]@AnAnnotation(\"a\")[*2*] [*3*]final[*3*] [*4*]@AnAnnotation2(\"b\")[*4*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MODIFIER,[11,6],,,[N/A]\n" +
+			"2:SINGLE_MEMBER_ANNOTATION,[18,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MODIFIER,[37,5],,,[N/A]\n" +
+			"4:SINGLE_MEMBER_ANNOTATION,[45,19],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 5)\n" +
+			"	#\n" +
+			"	^\n" +
+			"Syntax error on token \"Invalid Character\", delete this token\n",
+			result);
+}
+public void testBug130778f() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]public[*1*]\n" +
+			"[*2*]@AnAnnotation(\"a\")[*2*]\n" +
+			"[*3*]final[*3*]\n" +
+			"[*4*]@AnAnnotation2(\"b\")[*4*]\n" +
+			"#\n" +
+			"class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]public[*1*] [*2*]@AnAnnotation(\"a\")[*2*] [*3*]final[*3*] [*4*]@AnAnnotation2(\"b\")[*4*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MODIFIER,[11,6],,,[N/A]\n" +
+			"2:SINGLE_MEMBER_ANNOTATION,[18,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MODIFIER,[37,5],,,[N/A]\n" +
+			"4:SINGLE_MEMBER_ANNOTATION,[43,19],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 6)\n" +
+			"	#\n" +
+			"	^\n" +
+			"Syntax error on token \"Invalid Character\", delete this token\n",
+			result);
+}
+public void testBug130778g() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]public[*1*]\n" +
+			"[*2*]@AnAnnotation(\"a\")[*2*]\n" +
+			"[*3*]final[*3*]\n" +
+			"[*4*]@AnAnnotation2(\"b\")[*4*]\n" +
+			"class X {\n" +
+			"  #\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]public[*1*] [*2*]@AnAnnotation(\"a\")[*2*] [*3*]final[*3*] [*4*]@AnAnnotation2(\"b\")[*4*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MODIFIER,[11,6],,,[N/A]\n" +
+			"2:SINGLE_MEMBER_ANNOTATION,[18,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MODIFIER,[37,5],,,[N/A]\n" +
+			"4:SINGLE_MEMBER_ANNOTATION,[43,19],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 7)\n" +
+			"	#\n" +
+			"	^\n" +
+			"Syntax error on token \"Invalid Character\", delete this token\n",
+			result);
+}
+public void testBug130778h() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=\"a\")[*1*]\n" +
+			"[*2*]@AnAnnotation2(value=\"b\")[*2*]\n" +
+			"[*3*]public[*3*] class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=\"a\")[*1*] [*2*]@AnAnnotation2(value=\"b\")[*2*] [*3*]public[*3*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[11,24],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:NORMAL_ANNOTATION,[36,25],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"3:MODIFIER,[62,6],,,[N/A]\n" +
+			"===== Problems =====\n" +
+			"No problem",
+			result);
+}
+public void testBug130778i() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=[*1*])\n" +
+			"[*2*]@AnAnnotation2(value=\"b\")[*2*]\n" +
+			"[*3*]public[*3*] class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=$missing$)[*1*] [*2*]@AnAnnotation2(value=\"b\")[*2*] [*3*]public[*3*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[11,20],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:NORMAL_ANNOTATION,[33,25],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"3:MODIFIER,[59,6],,,[N/A]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(value=)\n" +
+			"	                   ^\n" +
+			"Syntax error on token \"=\", MemberValue expected after this token\n",
+			result);
+}
+public void testBug130778j() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=\"a\")[*1*]\n" +
+			"[*2*]@AnAnnotation2(value=[*2*])\n" +
+			"[*3*]public[*3*] class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=\"a\")[*1*] [*2*]@AnAnnotation2(value=$missing$)[*2*] [*3*]public[*3*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[11,24],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:NORMAL_ANNOTATION,[36,21],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"3:MODIFIER,[59,6],,,[N/A]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 3)\n" +
+			"	@AnAnnotation2(value=)\n" +
+			"	                    ^\n" +
+			"Syntax error on token \"=\", MemberValue expected after this token\n",
+			result);
+}
+public void testBug130778k() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=[*1*])\n" +
+			"[*2*]@AnAnnotation2(value=[*2*])\n" +
+			"[*3*]public[*3*] class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation(value=$missing$)[*1*] [*2*]@AnAnnotation2(value=$missing$)[*2*] [*3*]public[*3*] class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[11,20],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:NORMAL_ANNOTATION,[33,21],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"3:MODIFIER,[56,6],,,[N/A]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(value=)\n" +
+			"	                    ^\n" +
+			"Syntax error on token \")\", delete this token\n" +
+			"2. ERROR in /Converter15/src/a/X.java (at line 3)\n" +
+			"	@AnAnnotation2(value=)\n" +
+			"	                    ^\n" +
+			"Syntax error on token \"=\", ) expected\n",
+			result);
+}
+public void testBug130778l() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"public class X {\n" +
+			"  public void foo(){\n" +
+			"    [*1*]@AnAnnotation(value=[*1*])\n" +
+			"    [*2*]@AnAnnotation2(value=\"b\")[*2*]\n" +
+			"    class Y {}\n" +
+			"  }\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"public class X {\n" +
+			"  public void foo(){\n" +
+			"[*1*]@AnAnnotation(value=$missing$)[*1*] [*2*]@AnAnnotation2(value=\"b\")[*2*] class Y {\n" +
+			"    }\n" +
+			"  }\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[53,20],,RECOVERED,[ANNOTATION,La/X$115$Y;@La/AnAnnotation;,]\n" +
+			"2:NORMAL_ANNOTATION,[79,25],,,[ANNOTATION,La/X$115$Y;@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 4)\n" +
+			"	@AnAnnotation(value=)\n" +
+			"	                   ^\n" +
+			"Syntax error on token \"=\", MemberValue expected after this token\n",
+			result);
+}
+public void testBug130778m() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"public class X {\n" +
+			"  public void foo(){\n" +
+			"    [*1*]@AnAnnotation(value=)[*1*]\n" +
+			"    [*2*]@AnAnnotation2(value=\"b\")[*2*]\n" +
+			"    int i;\n" +
+			"  }\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"public class X {\n" +
+			"  public void foo(){\n" +
+			"    [*1*]@AnAnnotation(value=$missing$)[*1*] [*2*]@AnAnnotation2(value=\"b\")[*2*] int i;\n" +
+			"  }\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[53,21],,,[ANNOTATION,La/X;.foo()V#i@La/AnAnnotation;,]\n" +
+			"2:NORMAL_ANNOTATION,[79,25],,,[ANNOTATION,La/X;.foo()V#i@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 4)\n" +
+			"	@AnAnnotation(value=)\n" +
+			"	                   ^\n" +
+			"Syntax error on token \"=\", MemberValue expected after this token\n",
+			result);
+}
+public void testBug130778n() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String name1();\n" +
+			"  String name2();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation([*3*]name1=\"a\"[*3*][*2*], name2)\n" +
+			"public class X {\n" +
+			"}[*1*]\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation([*3*]name1=\"a\"[*3*])[*2*] public class X {\n" +
+			"}[*1*]\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:TYPE_DECLARATION,[11,50],,MALFORMED|RECOVERED,[TYPE,La/X;,]\n" +
+			"2:NORMAL_ANNOTATION,[11,23],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MEMBER_VALUE_PAIR,[25,9],,,[N/A]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(name1=\"a\", name2)\n" +
+			"	                       ^\n" +
+			"Syntax error on token \",\", . expected\n",
+			result);
+}
+public void testBug130778o() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String name1();\n" +
+			"  String name2();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation([*3*]name1=[*3*][*2*])\n" +
+			"public class X {\n" +
+			"}[*1*]\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation([*3*]name1=$missing$[*3*])[*2*] public class X {\n" +
+			"}[*1*]\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:TYPE_DECLARATION,[11,40],,MALFORMED,[TYPE,La/X;,]\n" +
+			"2:NORMAL_ANNOTATION,[11,20],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MEMBER_VALUE_PAIR,[25,6],,RECOVERED,[N/A]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(name1=)\n" +
+			"	                   ^\n" +
+			"Syntax error on token \"=\", MemberValue expected after this token\n",
+			result);
+}
+public void testBug130778p() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  AnAnnotation2 value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]value=[*3*]@AnAnnotation2(value=\"a\")[*3*][*2*])[*1*]\n" +
+			"public class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]value=[*3*]@AnAnnotation2(value=\"a\")[*3*][*2*])[*1*] public class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[11,46],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:MEMBER_VALUE_PAIR,[25,31],,,[N/A]\n" +
+			"3:NORMAL_ANNOTATION,[31,25],,,[ANNOTATION,@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"No problem",
+			result);
+}
+public void _testBug130778q() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  AnAnnotation2 value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]value=[*3*]@AnAnnotation2(value=\"a\")[*3*][*2*][*1*]\n" +
+			"public class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]value=[*3*]@AnAnnotation2(value=\"a\")[*3*][*2*])[*1*] public class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:NORMAL_ANNOTATION,[11,45],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:MEMBER_VALUE_PAIR,[25,31],,,[N/A]\n" +
+			"3:NORMAL_ANNOTATION,[31,25],,RECOVERED,[ANNOTATION,@La/AnAnnotation2;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(value=@AnAnnotation2(value=\"a\")\n" +
+			"	                                            ^\n" +
+			"Syntax error, insert \")\" to complete Modifiers\n",
+			result);
+}
+public void testBug130778r() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  AnAnnotation2 value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation(value=[*2*][*3*]@AnAnnotation2(value=[*3*]))\n" +
+			"public class X {\n" +
+			"}[*1*]\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation(value=$missing$)[*2*] public class X {\n" +
+			"}[*1*]\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:TYPE_DECLARATION,[11,62],,MALFORMED|RECOVERED,[TYPE,La/X;,]\n" +
+			"2:NORMAL_ANNOTATION,[11,20],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:No corresponding node\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(value=@AnAnnotation2(value=))\n" +
+			"	                                        ^\n" +
+			"Syntax error on token \"=\", MemberValue expected after this token\n",
+			result);
+}
+public void testBug130778s() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value1();\n" +
+			"  AnAnnotation2 value2();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation([*3*]value1=[*3*][*2*],[*4*]value=[*5*]@AnAnnotation2(value=\"b\")[*5*][*4*])\n" +
+			"public class X {\n" +
+			"}[*1*]\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*][*2*]@AnAnnotation([*3*]value1=$missing$[*3*])[*2*] [*5*]@AnAnnotation2(value=\"b\")[*5*] public class X {\n" +
+			"}[*1*]\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:TYPE_DECLARATION,[11,73],,MALFORMED,[TYPE,La/X;,]\n" +
+			"2:NORMAL_ANNOTATION,[11,21],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"3:MEMBER_VALUE_PAIR,[25,7],,RECOVERED,[N/A]\n" +
+			"5:NORMAL_ANNOTATION,[39,25],,,[ANNOTATION,La/X;@La/AnAnnotation2;,]\n" +
+			"4:No corresponding node\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(value1=,value=@AnAnnotation2(value=\"b\"))\n" +
+			"	                    ^\n" +
+			"Syntax error on token \"=\", MemberValue expected after this token\n",
+			result);
+}
+public void testBug130778t() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation(\"b\")[*1*]\n" +
+			"public class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation(\"b\")[*1*] public class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:SINGLE_MEMBER_ANNOTATION,[11,18],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"===== Problems =====\n" +
+			"No problem",
+			result);
+}
+public void testBug130778u() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]\"b\"[*2*][*1*]\n" +
+			"public class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]\"b\"[*2*])[*1*] public class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:SINGLE_MEMBER_ANNOTATION,[11,17],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:STRING_LITERAL,[25,3],,,[N/A]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(\"b\"\n" +
+			"	              ^^^\n" +
+			"Syntax error, insert \")\" to complete Modifiers\n",
+			result);
+}
+public void testBug130778v() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[2];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  AnAnnotation2 value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	this.workingCopies[1] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation2.java",
+			"package a;\n" +
+			"public @interface AnAnnotation2 {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation[*1*](@AnAnnotation2(\"b\"\n" +
+			"public class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation[*1*] public class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:MARKER_ANNOTATION,[11,13],,,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(@AnAnnotation2(\"b\"\n" +
+			"	                             ^^^\n" +
+			"Syntax error, insert \")\" to complete SingleMemberAnnotation\n" +
+			"2. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(@AnAnnotation2(\"b\"\n" +
+			"	                             ^^^\n" +
+			"Syntax error, insert \")\" to complete Modifiers\n",
+			result);
+}
+public void testBug130778x() throws JavaModelException {
+	this.workingCopies = new ICompilationUnit[1];
+
+	this.workingCopies[0] = getWorkingCopy(
+			"/Converter15/src/a/AnAnnotation.java",
+			"package a;\n" +
+			"public @interface AnAnnotation {\n" +
+			"  String value();\n" +
+			"}\n",
+			true/*resolve*/);
+
+	ASTResult result = this.buildMarkedAST(
+			"/Converter15/src/a/X.java",
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]\"a\"[*2*][*1*], [*3*]\"b\"[*3*])\n" +
+			"public class X {\n" +
+			"}\n");
+
+	assertASTResult(
+			"===== AST =====\n" +
+			"package a;\n" +
+			"[*1*]@AnAnnotation([*2*]\"a\"[*2*])[*1*] public class X {\n" +
+			"}\n" +
+			"\n" +
+			"===== Details =====\n" +
+			"1:SINGLE_MEMBER_ANNOTATION,[11,17],,RECOVERED,[ANNOTATION,La/X;@La/AnAnnotation;,]\n" +
+			"2:STRING_LITERAL,[25,3],,,[N/A]\n" +
+			"3:No corresponding node\n" +
+			"===== Problems =====\n" +
+			"1. ERROR in /Converter15/src/a/X.java (at line 2)\n" +
+			"	@AnAnnotation(\"a\", \"b\")\n" +
+			"	                 ^\n" +
+			"Syntax error on token \",\", < expected\n",
+			result);
+}
+}
\ No newline at end of file
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 d58dbdc..0180de7 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,16 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.dom;
 
 import java.util.Iterator;
+import java.util.List;
 
 import org.eclipse.jdt.core.dom.*;
 
@@ -33,6 +38,13 @@
 }
 
 /**
+ * @deprecated
+ */
+private Type componentType(ArrayType array) {
+	return array.getComponentType();
+}
+
+/**
  * Returns the string accumulated in the visit.
  *
  * @return the serialized
@@ -52,8 +64,17 @@
  * @see ASTVisitor#visit(ArrayType)
  */
 public boolean visit(ArrayType node) {
-	node.getComponentType().accept(this);
-	this.buffer.append("[]");//$NON-NLS-1$
+	if (node.getAST().apiLevel() < AST.JLS8) {
+		componentType(node).accept(this);
+		this.buffer.append("[]");//$NON-NLS-1$
+	} else {
+		node.getElementType().accept(this);
+		int noOfDimensions = node.getDimensions();
+		List dimensions = node.dimensions();
+		for (int i = 0;  i < noOfDimensions; ++i) {
+			((Dimension) dimensions.get(i)).accept(this);
+		}
+	}
 	return false;
 }
 
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
index 03c13be..064ca2c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterRecoveryTest.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -776,7 +780,7 @@
 	}
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=129909
-	public void test0014() throws JavaModelException {
+	public void _test0014() throws JavaModelException {
 		this.workingCopies = new ICompilationUnit[1];
 		this.workingCopies[0] = getWorkingCopy(
 			"/Converter/src/test/X.java",
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 f34c99b..ac6c02c 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -40,6 +44,20 @@
 	public static Test suite() {
 		return buildModelTestSuite(ASTConverterTest.class);
 	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private static List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
 
 	/** @deprecated using deprecated code */
 	public void test0001() throws JavaModelException {
@@ -7810,13 +7828,13 @@
 		ITypeBinding typeBinding = arrayType.resolveBinding();
 		checkSourceRange(type, "java.lang.Object[][]", source); //$NON-NLS-1$
 		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
-		Type elementType = arrayType.getComponentType();
+		Type elementType = componentType(arrayType);
 		ITypeBinding typeBinding2 = elementType.resolveBinding();
 		assertNotNull("No type binding2", typeBinding2); //$NON-NLS-1$
 		assertEquals("wrong dimension", 1, typeBinding2.getDimensions()); //$NON-NLS-1$
 		assertEquals("wrong name", "Object[]", typeBinding2.getName());		 //$NON-NLS-1$ //$NON-NLS-2$
 		assertTrue("Not an array type", elementType.isArrayType()); //$NON-NLS-1$
-		Type elementType2 = ((ArrayType) elementType).getComponentType();
+		Type elementType2 = componentType(((ArrayType) elementType));
 		assertTrue("Not a simple type", elementType2.isSimpleType()); //$NON-NLS-1$
 		ITypeBinding typeBinding3 = elementType2.resolveBinding();
 		assertNotNull("No type binding3", typeBinding3); //$NON-NLS-1$
@@ -8157,7 +8175,7 @@
 		ITypeBinding typeBinding3 = simpleType.resolveBinding();
 		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
 		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType2 = (ArrayType) type;
 		ITypeBinding typeBinding4 = arrayType2.resolveBinding();
@@ -8199,14 +8217,14 @@
 		ITypeBinding typeBinding3 = simpleType.resolveBinding();
 		assertNotNull("no type binding3", typeBinding3); //$NON-NLS-1$
 		assertEquals("wrong name", "Object", typeBinding3.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType.getComponentType();
+		type = componentType(arrayType);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType2 = (ArrayType) type;
 		checkSourceRange(arrayType2, "Object[10][]", source); //$NON-NLS-1$
 		ITypeBinding typeBinding4 = arrayType2.resolveBinding();
 		assertNotNull("no type binding4", typeBinding4); //$NON-NLS-1$
 		assertEquals("wrong name", "Object[][]", typeBinding4.getName()); //$NON-NLS-1$ //$NON-NLS-2$
-		type = arrayType2.getComponentType();
+		type = componentType(arrayType2);
 		assertTrue("Not an array type", type instanceof ArrayType); //$NON-NLS-1$
 		ArrayType arrayType3 = (ArrayType) type;
 		ITypeBinding typeBinding5 = arrayType3.resolveBinding();
@@ -8314,10 +8332,18 @@
 		assertNotNull("not null", node); //$NON-NLS-1$
 		assertTrue("not a MethodDeclaration", node instanceof MethodDeclaration); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
-		List thrownExceptions = methodDeclaration.thrownExceptions();
-		assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
-		Name name = (Name) thrownExceptions.get(0);
-		IBinding binding = name.resolveBinding();
+		IBinding binding;
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			List thrownExceptions = internalThrownExceptions(methodDeclaration);
+			assertEquals("Wrong size", 1, thrownExceptions.size()); //$NON-NLS-1$
+			Name name = (Name) thrownExceptions.get(0);
+			binding = name.resolveBinding();			
+		} else {
+			List thrownExceptionTypes = methodDeclaration.thrownExceptionTypes();
+			assertEquals("Wrong size", 1, thrownExceptionTypes.size()); //$NON-NLS-1$
+			Type type = (Type) thrownExceptionTypes.get(0);
+			binding = type.resolveBinding();			
+		}
 		assertEquals("wrong type", IBinding.TYPE, binding.getKind()); //$NON-NLS-1$
 		assertEquals("wrong name", "IOException", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
 	}
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 8e299a8..6617fbb 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,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -48,6 +52,21 @@
 	public static Test suite() {
 		return buildModelTestSuite(ASTConverterTest2.class);
 	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private static List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
+
 	/**
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22560
 	 * @deprecated using deprecated code
@@ -446,7 +465,7 @@
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
-		List throwsException = methodDeclaration.thrownExceptions();
+		List throwsException = internalThrownExceptions(methodDeclaration);
 		assertEquals("wrong size", 2, throwsException.size()); //$NON-NLS-1$
 		Name name = (Name) throwsException.get(0);
 		IBinding binding = name.resolveBinding();
@@ -2623,11 +2642,11 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2649,15 +2668,15 @@
 		checkSourceRange(type, "Class[][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2679,11 +2698,11 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 		List fragments = fieldDeclaration.fragments();
@@ -2709,19 +2728,19 @@
 		checkSourceRange(type, "Class[][][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2743,7 +2762,7 @@
 		checkSourceRange(type, "Class[]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
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 d33456b..7b49755 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -130,6 +134,21 @@
 	public static Test suite() {
 		return buildModelTestSuite(ASTConverterTestAST3_2.class);
 	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private static List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
+
 	/**
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22560
 	 */
@@ -526,7 +545,7 @@
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
-		List throwsException = methodDeclaration.thrownExceptions();
+		List throwsException = internalThrownExceptions(methodDeclaration);
 		assertEquals("wrong size", 2, throwsException.size()); //$NON-NLS-1$
 		Name name = (Name) throwsException.get(0);
 		IBinding binding = name.resolveBinding();
@@ -2706,11 +2725,11 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2732,15 +2751,15 @@
 		checkSourceRange(type, "Class[][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2762,11 +2781,11 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 		List fragments = fieldDeclaration.fragments();
@@ -2792,19 +2811,19 @@
 		checkSourceRange(type, "Class[][][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2826,7 +2845,7 @@
 		checkSourceRange(type, "Class[]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -6537,7 +6556,7 @@
 			checkSourceRange(type, "boolean[]", contents);
 			assertTrue("Not an array type", type.isArrayType());
 			ArrayType arrayType = (ArrayType) type;
-			Type componentType = arrayType.getComponentType();
+			Type componentType = componentType(arrayType);
 			assertTrue("Not a primitive type", componentType.isPrimitiveType());
 			PrimitiveType primitiveType = (PrimitiveType) componentType;
 			assertEquals("Not boolean", PrimitiveType.BOOLEAN, primitiveType.getPrimitiveTypeCode());
@@ -7204,7 +7223,7 @@
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
-			"Syntax error on token \",\", invalid VariableInitializer";
+			"Syntax error on token \",\", invalid Expression";
 		assertProblemsSize(compilationUnit, 1, expectedOutput);
 		ASTNode node = getASTNode(compilationUnit, 0, 0);
 		assertEquals("Not a compilation unit", ASTNode.FIELD_DECLARATION, node.getNodeType()); //$NON-NLS-1$
@@ -7223,7 +7242,7 @@
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
-			"Syntax error on token \",\", invalid VariableInitializer";
+			"Syntax error on token \",\", invalid Expression";
 		assertProblemsSize(compilationUnit, 1, expectedOutput);
 	}
 	/**
@@ -7561,7 +7580,7 @@
 	/**
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=129330
 	 */
-	public void test0642() throws JavaModelException {
+	public void _test0642() throws JavaModelException {
 		ICompilationUnit workingCopy = null;
 		try {
 			String contents =
@@ -7649,7 +7668,7 @@
 				true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
-			assertProblemsSize(unit, 1, "Syntax error on token \"=\", VariableInitializer expected after this token");
+			assertProblemsSize(unit, 1, "Syntax error on token \"=\", Expression expected after this token");
 			node = getASTNode(unit, 0, 0, 0);
 			assertEquals("Not a vaviable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
 			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
@@ -7930,7 +7949,7 @@
 	 * @bug 149126: IllegalArgumentException in ASTConverter
 	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=149126"
 	 */
-	public void test0652() throws CoreException {
+	public void _test0652() throws CoreException {
 		ASTResult result = this.buildMarkedAST(
 				"/Converter/src/TestCharset.java",
 				"import java.nio.ByteBuffer;\n" +
@@ -8021,23 +8040,23 @@
 				"	CharsetDecoder(CharSet\n" +
 				"	^^^^^^^^^^^^^^^^^^^^^^\n" +
 				"Syntax error on token(s), misplaced construct(s)\n" +
-				"11. ERROR in /Converter/src/TestCharset.java (at line 10)\n" + 
-				"	CharsetDecoder(CharSet\n" + 
-				"	^^^^^^^^^^^^^^^\n" + 
-				"Return type for the method is missing\n" + 
-				"12. ERROR in /Converter/src/TestCharset.java (at line 11)\n" + 
-				"	protected CoderResult decodeLoop(ByteBuffer in,\n" + 
-				"	          ^^^^^^^^^^^\n" + 
-				"CoderResult cannot be resolved to a type\n" + 
-				"13. ERROR in /Converter/src/TestCharset.java (at line 11)\n" + 
-				"	protected CoderResult decodeLoop(ByteBuffer in,\n" + 
-				"	                                 ^^^^^^^^^^\n" + 
-				"ByteBuffer cannot be resolved to a type\n" + 
-				"14. ERROR in /Converter/src/TestCharset.java (at line 12)\n" + 
-				"	CharBuffer out) {\n" + 
-				"	^^^^^^^^^^\n" + 
-				"CharBuffer cannot be resolved to a type\n" + 
-				"15. ERROR in /Converter/src/TestCharset.java (at line 17)\n" + 
+				"11. ERROR in /Converter/src/TestCharset.java (at line 10)\n" +
+				"	CharsetDecoder(CharSet\n" +
+				"	^^^^^^^^^^^^^^^\n" +
+				"Return type for the method is missing\n" +
+				"12. ERROR in /Converter/src/TestCharset.java (at line 11)\n" +
+				"	protected CoderResult decodeLoop(ByteBuffer in,\n" +
+				"	          ^^^^^^^^^^^\n" +
+				"CoderResult cannot be resolved to a type\n" +
+				"13. ERROR in /Converter/src/TestCharset.java (at line 11)\n" +
+				"	protected CoderResult decodeLoop(ByteBuffer in,\n" +
+				"	                                 ^^^^^^^^^^\n" +
+				"ByteBuffer cannot be resolved to a type\n" +
+				"14. ERROR in /Converter/src/TestCharset.java (at line 12)\n" +
+				"	CharBuffer out) {\n" +
+				"	^^^^^^^^^^\n" +
+				"CharBuffer cannot be resolved to a type\n" +
+				"15. ERROR in /Converter/src/TestCharset.java (at line 17)\n" +
 				"	public CharsetEncoder newEncoder() {\n" +
 				"	       ^^^^^^^^^^^^^^\n" +
 				"CharsetEncoder cannot be resolved to a type\n",
@@ -8277,7 +8296,7 @@
 	/**
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=157570
 	 */
-	public void test0658() {
+	public void _test0658() {
 		String src = "public static void m1()\n" +
 				"    {\n" +
 				"        int a;\n" +
@@ -9529,11 +9548,11 @@
 		ArrayCreation arrayCreation = (ArrayCreation) node;
 		ArrayType arrayType = arrayCreation.getType();
 		checkSourceRange(arrayType, "String[0][b[10]][]", sourceUnit.getSource());
-		node = arrayType.getComponentType();
+		node = componentType(arrayType);
 		assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType());
 		arrayType = (ArrayType)node;
 		checkSourceRange(arrayType, "String[0][b[10]]", sourceUnit.getSource());
-		node = arrayType.getComponentType();
+		node = componentType(arrayType);
 		assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType());
 		arrayType = (ArrayType)node;
 		checkSourceRange(arrayType, "String[0]", sourceUnit.getSource());
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 a19d196..25f88a8 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,9 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * Copyright (c) 2011, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -112,7 +117,7 @@
 
 	public void setUpSuite() throws Exception {
 		super.setUpSuite();
-		this.ast = AST.newAST(AST.JLS4);
+		this.ast = AST.newAST(getJLS4());
 	}
 
 	public ASTConverterTestAST4_2(String name) {
@@ -127,12 +132,27 @@
 	public static Test suite() {
 		return buildModelTestSuite(ASTConverterTestAST4_2.class);
 	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private static List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
+
 	/**
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22560
 	 */
 	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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
@@ -158,7 +178,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -171,7 +191,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -205,7 +225,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -236,7 +256,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -267,7 +287,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -300,7 +320,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -331,7 +351,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
 		assertNotNull(node);
@@ -365,7 +385,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.JLS4, sourceUnit, true);
+			ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 			assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			assertProblemsSize(compilationUnit, 0);
@@ -451,7 +471,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -468,7 +488,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -485,7 +505,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -515,7 +535,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.JLS4, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -523,7 +543,7 @@
 		assertNotNull(node);
 		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
 		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
-		List throwsException = methodDeclaration.thrownExceptions();
+		List throwsException = internalThrownExceptions(methodDeclaration);
 		assertEquals("wrong size", 2, throwsException.size()); //$NON-NLS-1$
 		Name name = (Name) throwsException.get(0);
 		IBinding binding = name.resolveBinding();
@@ -537,7 +557,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -563,7 +583,7 @@
 
 		ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0414", "B.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
 
-		result = runConversion(AST.JLS4, sourceUnit2, true);
+		result = runConversion(getJLS4(), 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$
@@ -580,7 +600,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -602,7 +622,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -635,7 +655,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -660,7 +680,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -681,7 +701,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -704,7 +724,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -731,7 +751,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -759,7 +779,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -787,7 +807,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -814,7 +834,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -838,7 +858,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -865,7 +885,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.JLS4, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -886,7 +906,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -911,7 +931,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -936,7 +956,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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 +982,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -985,7 +1005,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1006,7 +1026,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1028,7 +1048,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1057,7 +1077,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1081,7 +1101,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1105,7 +1125,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.JLS4, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1131,7 +1151,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.JLS4, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1153,7 +1173,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.JLS4, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1169,7 +1189,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.JLS4, sourceUnit, true, false, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1190,7 +1210,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1230,7 +1250,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1258,7 +1278,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1287,7 +1307,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1311,7 +1331,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1334,7 +1354,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1345,7 +1365,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1356,7 +1376,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1367,7 +1387,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1386,7 +1406,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -1404,7 +1424,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1492,7 +1512,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1509,7 +1529,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1525,7 +1545,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1545,7 +1565,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1570,7 +1590,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1598,7 +1618,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1619,7 +1639,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1646,7 +1666,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1675,7 +1695,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -1703,7 +1723,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1717,7 +1737,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		char[] source = sourceUnit.getSource().toCharArray();
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
@@ -1754,7 +1774,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -1773,7 +1793,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		char[] source = sourceUnit.getSource().toCharArray();
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1794,7 +1814,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
 		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1816,7 +1836,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1848,7 +1868,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.JLS4, sourceUnit, true);
+			ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			char[] source = sourceUnit.getSource().toCharArray();
 			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1872,7 +1892,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.JLS4, sourceUnit, true);
+			ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			char[] source = sourceUnit.getSource().toCharArray();
 			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -1897,7 +1917,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1936,7 +1956,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 2, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1953,7 +1973,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
@@ -1980,7 +2000,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 0);
@@ -2001,7 +2021,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 2);
@@ -2024,7 +2044,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.JLS4, sourceUnit, true);
+			ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 			CompilationUnit compilationUnit = (CompilationUnit) result;
 			assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
 			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
@@ -2045,7 +2065,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2069,7 +2089,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2093,7 +2113,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2118,7 +2138,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
@@ -2147,7 +2167,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2196,7 +2216,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2235,7 +2255,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2263,7 +2283,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2303,7 +2323,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2341,7 +2361,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2384,7 +2404,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2415,7 +2435,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2445,7 +2465,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -2476,7 +2496,7 @@
 		assertEquals("wrong size", 3, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -2549,7 +2569,7 @@
 		assertEquals("wrong size", 2, initializers.length);
 		IInitializer init = initializers[1];
 		ISourceRange sourceRange = init.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -2613,7 +2633,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -2629,7 +2649,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -2646,7 +2666,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.JLS4, sourceUnit, true);
+			ASTNode result = runConversion(getJLS4(), 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 +2692,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.JLS4, sourceUnit, true);
+			ASTNode result = runConversion(getJLS4(), 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$<
@@ -2692,7 +2712,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -2703,11 +2723,11 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2718,7 +2738,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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,15 +2749,15 @@
 		checkSourceRange(type, "Class[][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2748,7 +2768,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -2759,11 +2779,11 @@
 		checkSourceRange(type, "Class[][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 		List fragments = fieldDeclaration.fragments();
@@ -2778,7 +2798,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -2789,19 +2809,19 @@
 		checkSourceRange(type, "Class[][][][]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[][]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class[]", source);
 		arrayType = (ArrayType) componentType;
-		componentType = arrayType.getComponentType();
+		componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2812,7 +2832,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$<
@@ -2823,7 +2843,7 @@
 		checkSourceRange(type, "Class[]", source);
 		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
 		ArrayType arrayType = (ArrayType) type;
-		Type componentType = arrayType.getComponentType();
+		Type componentType = componentType(arrayType);
 		assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
 		checkSourceRange(componentType, "Class", source);
 	}
@@ -2832,7 +2852,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 	}
 
@@ -2841,7 +2861,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -2879,7 +2899,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.JLS4, sourceUnit, true);
+			CompilationUnit result = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 			IProblem[] problems= result.getProblems();
 			assertTrue(problems.length == 1);
 			assertEquals("Invalid warning", "Javadoc: Missing tag for parameter a", problems[0].getMessage());
@@ -2893,7 +2913,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertNotNull(result);
 		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 	}
@@ -2903,7 +2923,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'i' in initializer
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 0, 0);
@@ -2917,7 +2937,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'j' in 'then' block in initializer
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 0, 1);
@@ -2933,7 +2953,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'i' in 'foo()'
 		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 1, 0);
@@ -2947,7 +2967,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'j' in 'then' block in 'foo()'
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
@@ -2963,7 +2983,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'j' in 'else' block in 'foo()'
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
@@ -2979,7 +2999,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// first 'new Object(){...}' in 'foo()'
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 2);
@@ -2994,7 +3014,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'B' in 'foo()'
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3008,7 +3028,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// second 'new Object(){...}' in 'foo()'
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 4);
@@ -3023,7 +3043,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'field' in 'B' in 'foo()'
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3041,7 +3061,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// 'bar()' in 'B' in 'foo()'
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
@@ -3058,7 +3078,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// top level type A
 		TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0);
@@ -3071,7 +3091,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// member type B in A
 		TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0, 0);
@@ -3084,7 +3104,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// local type E in foo() in A
 		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 0);
@@ -3098,7 +3118,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// anonymous type new Object() {...} in foo() in A
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
@@ -3113,7 +3133,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// type F in anonymous type new Object() {...} in foo() in A
 		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
@@ -3129,7 +3149,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// local type C in bar() in B in A
 		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3144,7 +3164,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// anonymous type new Object() {...} in bar() in B in A
 		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3160,7 +3180,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// type D in anonymous type new Object() {...} in bar() in B in A
 		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
@@ -3177,7 +3197,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.JLS4, sourceUnit, true);
+		CompilationUnit unit = (CompilationUnit)runConversion(getJLS4(), sourceUnit, true);
 
 		// unreachable type G in foo() in A
 		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 2);
@@ -3194,7 +3214,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3212,7 +3232,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3229,7 +3249,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3249,7 +3269,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3269,7 +3289,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3289,7 +3309,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3309,7 +3329,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3329,7 +3349,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3350,7 +3370,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -3366,7 +3386,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 	}
@@ -3377,7 +3397,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
 	}
@@ -3388,7 +3408,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3412,14 +3432,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3446,7 +3466,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		assertNotNull("No comments", unit.getCommentList());
@@ -3455,7 +3475,7 @@
 		assertNotNull("No node", node);
 		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
 		FieldDeclaration declaration = (FieldDeclaration) node;
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3482,14 +3502,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
@@ -3516,7 +3536,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		assertNotNull("No comments", unit.getCommentList());
@@ -3524,7 +3544,7 @@
 		ASTNode node = getASTNode(unit, 0, 0, 0);
 		assertNotNull("No node", node);
 		ASTNode statement = node;
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setSource(source);
 		parser.setSourceRange(statement.getStartPosition(), statement.getLength());
@@ -3551,7 +3571,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		assertNotNull("No comments", unit.getCommentList());
@@ -3561,7 +3581,7 @@
 		assertTrue("not a block", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT);
 		ExpressionStatement expressionStatement = (ExpressionStatement) node;
 		Expression expression = expressionStatement.getExpression();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_EXPRESSION);
 		parser.setSource(source);
 		parser.setSourceRange(expression.getStartPosition(), expression.getLength());
@@ -3631,7 +3651,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3680,7 +3700,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3719,7 +3739,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3747,7 +3767,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3786,7 +3806,7 @@
 		assertEquals("wrong size", 2, methods.length);
 		IMethod method = methods[1];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3824,7 +3844,7 @@
 		assertEquals("wrong size", 1, methods.length);
 		IMethod method = methods[0];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3865,7 +3885,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3894,7 +3914,7 @@
 		assertEquals("wrong size", 1, memberTypes.length);
 		IType memberType = memberTypes[0];
 		ISourceRange sourceRange = memberType.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3923,7 +3943,7 @@
 		assertEquals("wrong size", 3, methods.length);
 		IMethod method = methods[2];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -3952,7 +3972,7 @@
 		assertEquals("wrong size", 5, methods.length);
 		IMethod method = methods[3];
 		ISourceRange sourceRange = method.getSourceRange();
-		ASTNode result = runConversion(AST.JLS4, classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), classFile, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -4033,7 +4053,7 @@
 		type = classFile.getType();
 		initializers = type.getInitializers();
 		assertEquals("wrong size", 0, initializers.length);
-		ASTNode result = runConversion(AST.JLS4, classFile, position, false);
+		ASTNode result = runConversion(getJLS4(), classFile, position, false);
 		assertNotNull(result);
 		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 
@@ -4099,7 +4119,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4124,7 +4144,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4149,7 +4169,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4172,7 +4192,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4180,7 +4200,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4188,7 +4208,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4196,7 +4216,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertNotNull("No compilation unit", result);
 	}
 	/**
@@ -4216,7 +4236,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.JLS4
+			// TODO improve test for getJLS4()
 		} finally {
 			sourceUnit.discardWorkingCopy();
 		}
@@ -4250,7 +4270,7 @@
 			sourceUnit.becomeWorkingCopy(null, null);
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
 			assertNull("Unexpected compilation unit", unit);
-			// TODO improve test for AST.JLS4
+			// TODO improve test for getJLS4()
 		} finally {
 			sourceUnit.discardWorkingCopy();
 		}
@@ -4270,7 +4290,7 @@
 				"  Object field;\n" +
 				"}"
 			);
-			// TODO improve test for AST.JLS4
+			// TODO improve test for getJLS4()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
 			ASTNode node = getASTNode(unit, 0, 0);
 			assertNotNull("No node", node);
@@ -4294,7 +4314,7 @@
 		try {
 			ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
 			sourceUnit.becomeWorkingCopy(pbRequestor, null);
-			// TODO improve test for AST.JLS4
+			// TODO improve test for getJLS4()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
 			ASTNode node = getASTNode(unit, 0);
 			assertNotNull("No node", node);
@@ -4329,7 +4349,7 @@
 				"  }\n" +
 				"}"
 			);
-			// TODO improve test for AST.JLS4
+			// TODO improve test for getJLS4()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
 			ASTNode node = getASTNode(unit, 0);
 			assertNotNull("No node", node);
@@ -4360,7 +4380,7 @@
 				"}"
 			);
 			sourceUnit.reconcile(ICompilationUnit.NO_AST, false/* don't force pb detection*/, null, null);
-			// TODO improve test for AST.JLS4
+			// TODO improve test for getJLS4()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
 			ASTNode node = getASTNode(unit, 0);
 			assertNotNull("No node", node);
@@ -4388,7 +4408,7 @@
 				"  Object field;\n" +
 				"}"
 			);
-			// TODO improve test for AST.JLS4
+			// TODO improve test for getJLS4()
 			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
 			assertEquals("Unexpected well known type", null, unit.getAST().resolveWellKnownType("void"));
 		} finally {
@@ -4401,7 +4421,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4440,7 +4460,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.JLS4, source, "Test.java", project, options, true); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -4460,7 +4480,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4489,7 +4509,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4657,7 +4677,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		final CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		unit.accept(new GetKeyVisitor());
@@ -4668,7 +4688,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4685,7 +4705,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		CompilationUnit unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		ASTNode node = getASTNode(unit, 0, 0);
@@ -4695,7 +4715,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.JLS4, sourceUnit, true);
+		result = runConversion(getJLS4(), sourceUnit, true);
 		unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		node = getASTNode(unit, 0, 0);
@@ -4705,7 +4725,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.JLS4, sourceUnit, true);
+		result = runConversion(getJLS4(), sourceUnit, true);
 		unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		node = getASTNode(unit, 0, 0);
@@ -4716,7 +4736,7 @@
 
 
 		sourceUnit = getCompilationUnit("Converter", "src", "test0545", "Test.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-		result = runConversion(AST.JLS4, sourceUnit, true);
+		result = runConversion(getJLS4(), sourceUnit, true);
 		unit = (CompilationUnit) result;
 		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
 		node = getASTNode(unit, 0);
@@ -4731,7 +4751,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4774,7 +4794,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -4799,7 +4819,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -4808,7 +4828,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -4817,7 +4837,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -4827,7 +4847,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, false);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4839,7 +4859,7 @@
 	public void test0552() throws JavaModelException {
 		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0552", "Test.java");
 		char[] source = sourceUnit.getSource().toCharArray();
-		CompilationUnit result = (CompilationUnit) runConversion(AST.JLS4, sourceUnit, true);
+		CompilationUnit result = (CompilationUnit) runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("Got errors", 0, result.getProblems().length);
 		TypeDeclaration declaration = (TypeDeclaration) result.types().get(0);
 		Block body = declaration.getMethods()[0].getBody();
@@ -4870,7 +4890,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4893,7 +4913,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4922,7 +4942,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4951,7 +4971,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -4976,7 +4996,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5020,7 +5040,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5048,7 +5068,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5076,7 +5096,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5104,7 +5124,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5132,7 +5152,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5159,7 +5179,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5186,7 +5206,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5213,7 +5233,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5229,7 +5249,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5244,7 +5264,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 	}
 
@@ -5253,7 +5273,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5264,7 +5284,7 @@
 	 * No binding when there is no unit name set
 	 */
 	public void test0571() throws JavaModelException {
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		String source = "public class A {public boolean foo() {}}";
 		parser.setSource(source.toCharArray());
 		parser.setProject(getJavaProject("Converter"));
@@ -5281,7 +5301,7 @@
 	 * No binding when there is no unit name set
 	 */
 	public void test0572() throws JavaModelException {
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		String source = "public class A {public boolean foo() {}}";
 		parser.setSource(source.toCharArray());
 		parser.setProject(getJavaProject("Converter"));
@@ -5301,7 +5321,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.JLS4, sourceUnit, pos, true);
+		ASTNode result = runConversion(getJLS4(), 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);
@@ -5320,7 +5340,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5349,7 +5369,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		final IProblem[] problems = unit.getProblems();
@@ -5386,7 +5406,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) result;
 		assertProblemsSize(unit, 0);
@@ -6389,7 +6409,7 @@
 	 */
 	public void test0607() throws JavaModelException {
 		final char[] source = "private static Category[] values = new Category[]{v1, v2, v3};".toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(source);
 		ASTNode root = parser.createAST(null);
@@ -6460,7 +6480,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.JLS4, sourceUnit, true);
+		final ASTNode result = runConversion(getJLS4(), 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");
@@ -6534,7 +6554,7 @@
 			checkSourceRange(type, "boolean[]", contents);
 			assertTrue("Not an array type", type.isArrayType());
 			ArrayType arrayType = (ArrayType) type;
-			Type componentType = arrayType.getComponentType();
+			Type componentType = componentType(arrayType);
 			assertTrue("Not a primitive type", componentType.isPrimitiveType());
 			PrimitiveType primitiveType = (PrimitiveType) componentType;
 			assertEquals("Not boolean", PrimitiveType.BOOLEAN, primitiveType.getPrimitiveTypeCode());
@@ -6696,7 +6716,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents.toCharArray());
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true);
+			ASTNode node = runConversion(getJLS4(), workingCopy, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			assertProblemsSize(unit, 1, "Dead code");
@@ -6731,7 +6751,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents.toCharArray());
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true);			
+			ASTNode node = runConversion(getJLS4(), workingCopy, true);			
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedOutput = "Dead code";
@@ -6806,13 +6826,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.JLS4, sourceUnit, false);
+		ASTNode result = runConversion(getJLS4(), 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.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setSource(source);
 		parser.setSourceRange(statement.getStartPosition(), statement.getLength());
@@ -7079,7 +7099,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.JLS4, source, "Test.java", project); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7101,7 +7121,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.JLS4, source, "Object.java", project); //$NON-NLS-1$
+		ASTNode result = runConversion(getJLS4(), 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;
@@ -7176,7 +7196,7 @@
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=125270
 	 */
 	public void test0628() throws JavaModelException {
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_EXPRESSION);
 		String source = "{\"red\", \"yellow\"}";
 		parser.setSource(source.toCharArray());
@@ -7197,11 +7217,11 @@
 	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.JLS4, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
-			"Syntax error on token \",\", invalid VariableInitializer";
+			"Syntax error on token \",\", invalid Expression";
 		assertProblemsSize(compilationUnit, 1, expectedOutput);
 		ASTNode node = getASTNode(compilationUnit, 0, 0);
 		assertEquals("Not a compilation unit", ASTNode.FIELD_DECLARATION, node.getNodeType()); //$NON-NLS-1$
@@ -7216,11 +7236,11 @@
 	 */
 	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.JLS4, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
-			"Syntax error on token \",\", invalid VariableInitializer";
+			"Syntax error on token \",\", invalid Expression";
 		assertProblemsSize(compilationUnit, 1, expectedOutput);
 	}
 	/**
@@ -7229,7 +7249,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.JLS4, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) result;
 		String expectedOutput =
@@ -7290,7 +7310,7 @@
 	public void test0633() {
 		String src = "switch (state) {case 4:double M0,M1;}";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setSource (source);
 		ASTNode result = parser.createAST (null);
@@ -7334,7 +7354,7 @@
 					"}";
 
 			char[] source = src.toCharArray();
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(getJLS4());
 			parser.setKind (ASTParser.K_COMPILATION_UNIT);
 			parser.setSource (source);
 			parser.setStatementsRecovery(true);
@@ -7558,7 +7578,7 @@
 	/**
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=129330
 	 */
-	public void test0642() throws JavaModelException {
+	public void _test0642() throws JavaModelException {
 		ICompilationUnit workingCopy = null;
 		try {
 			String contents =
@@ -7646,7 +7666,7 @@
 				true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
-			assertProblemsSize(unit, 1, "Syntax error on token \"=\", VariableInitializer expected after this token");
+			assertProblemsSize(unit, 1, "Syntax error on token \"=\", Expression expected after this token");
 			node = getASTNode(unit, 0, 0, 0);
 			assertEquals("Not a vaviable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
 			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
@@ -7927,7 +7947,7 @@
 	 * @bug 149126: IllegalArgumentException in ASTConverter
 	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=149126"
 	 */
-	public void test0652() throws CoreException {
+	public void _test0652() throws CoreException {
 		ASTResult result = this.buildMarkedAST(
 				"/Converter/src/TestCharset.java",
 				"import java.nio.ByteBuffer;\n" +
@@ -8046,7 +8066,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
 		CompilationUnit unit = (CompilationUnit) result;
 
@@ -8193,7 +8213,7 @@
 				"        int d;\n" +
 				"    }";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setSource (source);
@@ -8226,7 +8246,7 @@
 				"        int d;\n" +
 				"    }";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(false);
 		parser.setSource (source);
@@ -8274,7 +8294,7 @@
 	/**
 	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=157570
 	 */
-	public void test0658() {
+	public void _test0658() {
 		String src = "public static void m1()\n" +
 				"    {\n" +
 				"        int a;\n" +
@@ -8287,7 +8307,7 @@
 				"        int d;\n" +
 				"    }";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setSource (source);
@@ -8313,7 +8333,7 @@
 	public void test0659() throws CoreException, JavaModelException {
 		IJavaProject javaProject = createJavaProject("P659", new String[] { "src" }, new String[0], "bin");
 		try {
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(getJLS4());
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
 			parser.setStatementsRecovery(true);
 			parser.setBindingsRecovery(true);
@@ -8915,7 +8935,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.JLS4, sourceUnit, true, true);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, true, true);
 		assertNotNull(result);
 	}
 
@@ -8937,7 +8957,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS4(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedError =
@@ -8980,7 +9000,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS4(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedError =
@@ -9050,7 +9070,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS4(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedError =
@@ -9142,7 +9162,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS4(), 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());
@@ -9208,7 +9228,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS4(), workingCopy, true, true, true);
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			assertProblemsSize(unit, 0);
@@ -9248,7 +9268,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents);
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true, true, true);
+			ASTNode node = runConversion(getJLS4(), 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";
@@ -9275,7 +9295,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.JLS4, sourceUnit, true, true, true);
+		ASTNode node = runConversion(getJLS4(), 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());
@@ -9329,7 +9349,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.JLS4, sourceUnit, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true);
 		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		node = getASTNode(unit, 0);
@@ -9363,7 +9383,7 @@
 				"}";
 			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
 			workingCopy.getBuffer().setContents(contents.toCharArray());
-			ASTNode node = runConversion(AST.JLS4, workingCopy, true);			
+			ASTNode node = runConversion(getJLS4(), workingCopy, true);			
 			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
 			CompilationUnit unit = (CompilationUnit) node;
 			String expectedOutput = "Dead code";
@@ -9449,7 +9469,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.JLS4, sourceUnit, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) node;
 		assertProblemsSize(compilationUnit, 0);
@@ -9466,7 +9486,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.JLS4, sourceUnit, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit compilationUnit = (CompilationUnit) node;
 		assertProblemsSize(compilationUnit, 0);
@@ -9481,7 +9501,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.JLS4, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(
@@ -9509,7 +9529,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.JLS4, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9526,11 +9546,11 @@
 		ArrayCreation arrayCreation = (ArrayCreation) node;
 		ArrayType arrayType = arrayCreation.getType();
 		checkSourceRange(arrayType, "String[0][b[10]][]", sourceUnit.getSource());
-		node = arrayType.getComponentType();
+		node = componentType(arrayType);
 		assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType());
 		arrayType = (ArrayType)node;
 		checkSourceRange(arrayType, "String[0][b[10]]", sourceUnit.getSource());
-		node = arrayType.getComponentType();
+		node = componentType(arrayType);
 		assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType());
 		arrayType = (ArrayType)node;
 		checkSourceRange(arrayType, "String[0]", sourceUnit.getSource());
@@ -9541,7 +9561,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.JLS4, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9566,7 +9586,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.JLS4, sourceUnit, true, true);
+		ASTNode node = runConversion(getJLS4(), sourceUnit, true, true);
 		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
 		CompilationUnit unit = (CompilationUnit) node;
 		assertProblemsSize(unit, 0);
@@ -9693,7 +9713,7 @@
 		IField field = type.getField("i");
 		assertNotNull("No field", field);
 		ISourceRange sourceRange = field.getNameRange();
-		ASTNode result = runConversion(AST.JLS4, sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
+		ASTNode result = runConversion(getJLS4(), sourceUnit, sourceRange.getOffset() + sourceRange.getLength() / 2, false);
 		assertNotNull(result);
 	}
 	/**
@@ -9718,7 +9738,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.JLS4, sourceUnit, true, true);
+			ASTNode result = runConversion(getJLS4(), sourceUnit, true, true);
 			assertNotNull(result);
 			ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
 			assertNull("Should be null", typeBinding);
@@ -9748,7 +9768,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.JLS4, sourceUnit, true, true, true);
+			ASTNode result = runConversion(getJLS4(), sourceUnit, true, true, true);
 			assertNotNull(result);
 			ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
 			assertNull("Should be null", typeBinding);
@@ -9765,7 +9785,7 @@
 		IType type = unit.getType("X");
 		IMethod method = type.getMethod("foo", new String[0]);
 		
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setSource(unit);
 		Hashtable options = JavaCore.getOptions();
@@ -9810,7 +9830,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.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		ASTRequestor requestor = new ASTRequestor() {};
 		ICompilationUnit[] cus = new ICompilationUnit[2];
 		cus[0] = unit;
@@ -9831,7 +9851,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.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		ASTRequestor requestor = new ASTRequestor() {};
 		ICompilationUnit[] cus = new ICompilationUnit[2];
 		cus[0] = unit;
@@ -9851,7 +9871,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.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setSource(unit.getSource().toCharArray());
 		Map options = JavaCore.getOptions();
@@ -9876,7 +9896,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.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setSource(unit.getSource().toCharArray());
 		Map options = JavaCore.getOptions();
@@ -9994,7 +10014,7 @@
 			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
 			IVariableBinding variableBinding = fragment.resolveBinding();
 			final String key = variableBinding.getKey();
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(getJLS4());
 			parser.setProject(workingCopy.getJavaProject());
 			parser.setResolveBindings(true);
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10036,7 +10056,7 @@
 			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
 			IVariableBinding variableBinding = fragment.resolveBinding();
 			final String key = variableBinding.getKey();
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(getJLS4());
 			parser.setProject(workingCopy.getJavaProject());
 			parser.setResolveBindings(true);
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10079,7 +10099,7 @@
 			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
 			IVariableBinding variableBinding = fragment.resolveBinding();
 			final String key = variableBinding.getKey();
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(getJLS4());
 			parser.setProject(workingCopy.getJavaProject());
 			parser.setResolveBindings(true);
 			parser.setKind(ASTParser.K_COMPILATION_UNIT);
@@ -10110,7 +10130,7 @@
 		final char[] source = ("void foo() {\n" + 
 				"	Integer I = new ${cursor}\n" +
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10134,7 +10154,7 @@
 				"		Integer I = new ${cursor}\n" + 
 				"	}\n" + 
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10156,7 +10176,7 @@
 		final char[] source = ("{\n" + 
 				"	Integer I = new ${cursor}\n" +
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10181,7 +10201,7 @@
 				"{\n" + 
 				"	Integer I = new ${cursor}\n" +
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10210,7 +10230,7 @@
 				"		Integer I = new ${cursor}\n" + 
 				"	};\"\n" + 
 				"}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_COMPILATION_UNIT);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10227,7 +10247,7 @@
 		final char[] source = ("Integer i = new Integer() {\n" + 
 				"	Integer I = new ${cursor}\n" + 
 				"};").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10241,7 +10261,7 @@
 	 */
 	public void test0708() throws JavaModelException {
 		final char[] source = ("System.out.println()\nint i;\n").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10286,7 +10306,7 @@
 	 */
 	public void test0710() throws JavaModelException {
 		final char[] source = (";").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10301,7 +10321,7 @@
 	 */
 	public void test0711() throws JavaModelException {
 		final char[] source = (";void foo() {}").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10316,7 +10336,7 @@
 	 */
 	public void test0712() throws JavaModelException {
 		final char[] source = (";void foo() {};").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(true);
 		parser.setSource(source);
@@ -10339,7 +10359,7 @@
 				"      if (condition) appendAndExecute(new AddCommand(...));\n" + 
 				"    }\n" + 
 				"  }").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(false);
 		parser.setSource(source);
@@ -10388,7 +10408,7 @@
 				"      }\n" + 
 				"    }\n" + 
 				"  }").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(false);
 		parser.setSource(source);
@@ -10402,7 +10422,7 @@
 	 */
 	public void test0715() throws JavaModelException {
 		final char[] source = ("System.out.println()\nint i;\n").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_STATEMENTS);
 		parser.setStatementsRecovery(true);
 		parser.setIgnoreMethodBodies(true);
@@ -10419,7 +10439,7 @@
 	public void test0716() {
 		String src = "switch (state) {case 4:double M0,M1;}";
 		char[] source = src.toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		parser.setIgnoreMethodBodies(true);
 		parser.setSource (source);
@@ -10451,7 +10471,7 @@
 				"      if (condition) appendAndExecute(new AddCommand());\n" + 
 				"    }\n" + 
 				"  }").toCharArray();
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
 		parser.setStatementsRecovery(false);
 		parser.setIgnoreMethodBodies(true);
@@ -10564,7 +10584,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.JLS4, sourceUnit, true);
+		ASTNode result = runConversion(getJLS4(), 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$
@@ -10645,7 +10665,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396
 	 */
 	public void test0723() {
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind (ASTParser.K_STATEMENTS);
 		String src = "int j;\nfor {};\nj=1000;";
 		char[] source = src.toCharArray();
@@ -10667,7 +10687,7 @@
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396
 	 */
 	public void test0724() {
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(getJLS4());
 		parser.setKind (ASTParser.K_COMPILATION_UNIT);
 		String src = "public class X { void foo() {int j;\nfor {};\nj=1000;}}";
 		char[] source = src.toCharArray();
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
new file mode 100644
index 0000000..2e74436
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST8_2.java
@@ -0,0 +1,10784 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.dom;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.Test;
+
+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;
+import org.eclipse.jdt.core.IInitializer;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.ISourceRange;
+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.compiler.IProblem;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTMatcher;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ASTParser;
+import org.eclipse.jdt.core.dom.ASTRequestor;
+import org.eclipse.jdt.core.dom.ASTVisitor;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
+import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
+import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
+import org.eclipse.jdt.core.dom.ArrayCreation;
+import org.eclipse.jdt.core.dom.ArrayInitializer;
+import org.eclipse.jdt.core.dom.ArrayType;
+import org.eclipse.jdt.core.dom.AssertStatement;
+import org.eclipse.jdt.core.dom.Assignment;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.BodyDeclaration;
+import org.eclipse.jdt.core.dom.CastExpression;
+import org.eclipse.jdt.core.dom.CatchClause;
+import org.eclipse.jdt.core.dom.CharacterLiteral;
+import org.eclipse.jdt.core.dom.ClassInstanceCreation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ConditionalExpression;
+import org.eclipse.jdt.core.dom.ConstructorInvocation;
+import org.eclipse.jdt.core.dom.EnumDeclaration;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
+import org.eclipse.jdt.core.dom.FieldAccess;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ForStatement;
+import org.eclipse.jdt.core.dom.IBinding;
+import org.eclipse.jdt.core.dom.IMethodBinding;
+import org.eclipse.jdt.core.dom.IPackageBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.IfStatement;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.InfixExpression;
+import org.eclipse.jdt.core.dom.Initializer;
+import org.eclipse.jdt.core.dom.InstanceofExpression;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.NullLiteral;
+import org.eclipse.jdt.core.dom.NumberLiteral;
+import org.eclipse.jdt.core.dom.PackageDeclaration;
+import org.eclipse.jdt.core.dom.ParenthesizedExpression;
+import org.eclipse.jdt.core.dom.PrimitiveType;
+import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.ReturnStatement;
+import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.Statement;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.SuperFieldAccess;
+import org.eclipse.jdt.core.dom.SuperMethodInvocation;
+import org.eclipse.jdt.core.dom.SwitchCase;
+import org.eclipse.jdt.core.dom.SwitchStatement;
+import org.eclipse.jdt.core.dom.TryStatement;
+import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
+import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WhileStatement;
+import org.eclipse.jdt.core.tests.model.CancelCounter;
+import org.eclipse.jdt.core.tests.model.Canceler;
+import org.eclipse.jdt.core.tests.model.ReconcilerTests;
+import org.eclipse.jdt.core.tests.util.Util;
+
+public class ASTConverterTestAST8_2 extends ConverterTestSetup {
+
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(AST.JLS8);
+	}
+
+	public ASTConverterTestAST8_2(String name) {
+		super(name);
+	}
+
+	static {
+//		TESTS_NAMES = new String[] {"test0602"};
+//		TESTS_RANGE = new int[] { 721, -1 };
+//		TESTS_NUMBERS =  new int[] { 725 };
+	}
+	public static Test suite() {
+		return buildModelTestSuite(ASTConverterTestAST8_2.class);
+	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings.
+	 * @deprecated
+	 */
+	private static List internalThrownExceptions(MethodDeclaration methodDeclaration) {
+		return methodDeclaration.thrownExceptions();
+	}
+
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=22560
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("wrong size", 1, statements.size()); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(0);
+		assertTrue("Not a return statement", statement.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) statement;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("there is no expression", expression); //$NON-NLS-1$
+		// call the default initialization
+		methodDeclaration.getReturnType2();
+		ITypeBinding typeBinding = expression.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("wrong name", "int", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23464
+	 */
+	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 node = getASTNode((CompilationUnit) result, 1, 0, 0);
+		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not a super method invocation", node.getNodeType() == ASTNode.SUPER_CONSTRUCTOR_INVOCATION); //$NON-NLS-1$
+		checkSourceRange(node, "new A().super();", source); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
+	 */
+	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 node = getASTNode((CompilationUnit) result, 1, 0, 1);
+		assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("wrong type", binding.getKind() == IBinding.VARIABLE); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "test", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "clone", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("no binding2", binding2); //$NON-NLS-1$
+		assertTrue("Wrong type", binding2.getKind() == IBinding.METHOD); //$NON-NLS-1$
+		IMethodBinding methodBinding = (IMethodBinding) binding2;
+		assertEquals("Wrong name", "clone", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		IMethodBinding methodBinding2 = methodInvocation.resolveMethodBinding();
+		assertNotNull("No method binding2", methodBinding2);
+		assertTrue("Wrong binding", methodBinding == methodBinding2);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
+	 */
+	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 node = getASTNode((CompilationUnit) result, 0, 0, 1);
+		assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("wrong type", binding.getKind() == IBinding.VARIABLE); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "a", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "clone", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("no binding2", binding2); //$NON-NLS-1$
+		assertTrue("Wrong type", binding2.getKind() == IBinding.METHOD); //$NON-NLS-1$
+		IMethodBinding methodBinding = (IMethodBinding) binding2;
+		assertEquals("Wrong name", "clone", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
+	 */
+	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 node = getASTNode((CompilationUnit) result, 1, 0, 1);
+		assertEquals("Wrong number of problems", 1, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("wrong type", binding.getKind() == IBinding.VARIABLE); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "a", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "clone", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("no binding2", binding2); //$NON-NLS-1$
+		assertTrue("Wrong type", binding2.getKind() == IBinding.METHOD); //$NON-NLS-1$
+		IMethodBinding methodBinding = (IMethodBinding) binding2;
+		assertEquals("Wrong name", "clone", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23597
+	 */
+	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);
+		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$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("wrong type", binding.getKind() == IBinding.VARIABLE); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "a", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "foo", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("no binding2", binding2); //$NON-NLS-1$
+		assertTrue("Wrong type", binding2.getKind() == IBinding.METHOD); //$NON-NLS-1$
+		IMethodBinding methodBinding = (IMethodBinding) binding2;
+		assertEquals("Wrong name", "foo", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertNull("Got a declaring node in the unit", unit.findDeclaringNode(methodBinding));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23162
+	 */
+	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);
+		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		CompilationUnit unit = (CompilationUnit) result;
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		SimpleName simpleName = methodDeclaration.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("Not a method binding", binding.getKind() == IBinding.METHOD); //$NON-NLS-1$
+		IMethodBinding methodBinding = (IMethodBinding) binding;
+		assertEquals("wrong name", "foo", methodBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		methodDeclaration.setName(methodDeclaration.getAST().newSimpleName("foo2")); //$NON-NLS-1$
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+		assertNotNull("No methodbinding2", methodBinding2); //$NON-NLS-1$
+		assertEquals("wrong name", "foo", methodBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		simpleName = methodDeclaration.getName();
+		IBinding binding2 = simpleName.resolveBinding();
+		assertNull("Got a binding2", binding2); //$NON-NLS-1$
+
+		ASTNode astNode = unit.findDeclaringNode(methodBinding);
+		assertNotNull("No declaring node", astNode);
+		assertEquals("wrong declaring node", methodDeclaration, astNode);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23162
+	 */
+	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);
+		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		assertTrue("Not a simple type", type.isSimpleType()); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) name;
+		name = qualifiedName.getQualifier();
+		assertTrue("Not a qualified name", name.isQualifiedName()); //$NON-NLS-1$
+		qualifiedName = (QualifiedName) name;
+		name = qualifiedName.getQualifier();
+		assertTrue("Not a simple name", name.isSimpleName()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) name;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("Not a package binding", binding.getKind() == IBinding.PACKAGE); //$NON-NLS-1$
+		assertEquals("Wrong name", "java", binding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=23162
+	 */
+	public void test0409() throws JavaModelException {
+		Hashtable options = JavaCore.getOptions();
+		Hashtable newOptions = JavaCore.getOptions();
+		try {
+			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);
+			assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+			CompilationUnit compilationUnit = (CompilationUnit) result;
+			assertProblemsSize(compilationUnit, 0);
+			BindingsCollectorVisitor bindingsCollectorVisitor = new BindingsCollectorVisitor();
+			compilationUnit.accept(bindingsCollectorVisitor);
+			assertEquals("wrong number", 3, bindingsCollectorVisitor.getUnresolvedNodesSet().size()); //$NON-NLS-1$
+			Map bindingsMap = bindingsCollectorVisitor.getBindingsMap();
+			// changed to 212  - two bindings (type + name) for each Throwable derivatives.
+			assertEquals("wrong number", 212, bindingsMap.size()); //$NON-NLS-1$
+			ASTNodesCollectorVisitor nodesCollector = new ASTNodesCollectorVisitor();
+			compilationUnit.accept(nodesCollector);
+			Set detachedNodes = nodesCollector.getDetachedAstNodes();
+			for (Iterator iterator = detachedNodes.iterator(); iterator.hasNext(); ) {
+				ASTNode detachedNode = (ASTNode) iterator.next();
+				IBinding binding = (IBinding) bindingsMap.get(detachedNode);
+				assertNotNull(binding);
+				switch(detachedNode.getNodeType()) {
+					case ASTNode.ARRAY_ACCESS :
+					case ASTNode.ARRAY_CREATION :
+					case ASTNode.ARRAY_INITIALIZER :
+					case ASTNode.ASSIGNMENT :
+					case ASTNode.BOOLEAN_LITERAL :
+					case ASTNode.CAST_EXPRESSION :
+					case ASTNode.CHARACTER_LITERAL :
+					case ASTNode.CLASS_INSTANCE_CREATION :
+					case ASTNode.CONDITIONAL_EXPRESSION :
+					case ASTNode.FIELD_ACCESS :
+					case ASTNode.INFIX_EXPRESSION :
+					case ASTNode.INSTANCEOF_EXPRESSION :
+					case ASTNode.METHOD_INVOCATION :
+					case ASTNode.NULL_LITERAL :
+					case ASTNode.NUMBER_LITERAL :
+					case ASTNode.POSTFIX_EXPRESSION :
+					case ASTNode.PREFIX_EXPRESSION :
+					case ASTNode.THIS_EXPRESSION :
+					case ASTNode.TYPE_LITERAL :
+					case ASTNode.VARIABLE_DECLARATION_EXPRESSION :
+						ITypeBinding typeBinding = ((Expression) detachedNode).resolveTypeBinding();
+						if (!binding.equals(typeBinding)) {
+							System.out.println(detachedNode);
+						}
+						assertTrue("binding not equals", binding.equals(typeBinding)); //$NON-NLS-1$
+						break;
+					case ASTNode.VARIABLE_DECLARATION_FRAGMENT :
+						assertTrue("binding not equals", binding.equals(((VariableDeclarationFragment) detachedNode).resolveBinding())); //$NON-NLS-1$
+						break;
+					case ASTNode.ANONYMOUS_CLASS_DECLARATION :
+						assertTrue("binding not equals", binding.equals(((AnonymousClassDeclaration) detachedNode).resolveBinding())); //$NON-NLS-1$
+						break;
+					case ASTNode.QUALIFIED_NAME :
+					case ASTNode.SIMPLE_NAME :
+						IBinding newBinding = ((Name) detachedNode).resolveBinding();
+						assertTrue("binding not equals", binding.equals(newBinding)); //$NON-NLS-1$
+						break;
+					case ASTNode.ARRAY_TYPE :
+					case ASTNode.SIMPLE_TYPE :
+					case ASTNode.PRIMITIVE_TYPE :
+						assertTrue("binding not equals", binding.equals(((Type) detachedNode).resolveBinding())); //$NON-NLS-1$
+						break;
+					case ASTNode.CONSTRUCTOR_INVOCATION :
+						assertTrue("binding not equals", binding.equals(((ConstructorInvocation) detachedNode).resolveConstructorBinding())); //$NON-NLS-1$
+						break;
+					case ASTNode.IMPORT_DECLARATION :
+						assertTrue("binding not equals", binding.equals(((ImportDeclaration) detachedNode).resolveBinding())); //$NON-NLS-1$
+						break;
+					case ASTNode.METHOD_DECLARATION :
+						assertTrue("binding not equals", binding.equals(((MethodDeclaration) detachedNode).resolveBinding())); //$NON-NLS-1$
+						break;
+					case ASTNode.PACKAGE_DECLARATION :
+						assertTrue("binding not equals", binding.equals(((PackageDeclaration) detachedNode).resolveBinding())); //$NON-NLS-1$
+						break;
+					case ASTNode.TYPE_DECLARATION :
+						assertTrue("binding not equals", binding.equals(((TypeDeclaration) detachedNode).resolveBinding())); //$NON-NLS-1$
+						break;
+				}
+			}
+		} finally {
+			JavaCore.setOptions(options);
+		}
+	}
+
+	/**
+	 * Test for message on jdt-core-dev
+	 */
+	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);
+		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		Expression expression = ((ReturnStatement) node).getExpression();
+		assertTrue("Not an infix expression", expression.getNodeType() == ASTNode.INFIX_EXPRESSION); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) expression;
+		List extendedOperands = infixExpression.extendedOperands();
+		assertEquals("wrong size", 3, extendedOperands.size()); //$NON-NLS-1$
+	}
+
+	/**
+	 * Test for message on jdt-core-dev
+	 */
+	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);
+		assertEquals("Wrong number of problems", 0, ((CompilationUnit) result).getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		Expression expression = ((ReturnStatement) node).getExpression();
+		assertTrue("Not an infix expression", expression.getNodeType() == ASTNode.INFIX_EXPRESSION); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) expression;
+		List extendedOperands = infixExpression.extendedOperands();
+		assertEquals("wrong size", 0, extendedOperands.size()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=23901
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertTrue("Not an interface", typeDeclaration.isInterface()); //$NON-NLS-1$
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertNotNull("No declaring node", unit.findDeclaringNode(typeBinding)); //$NON-NLS-1$
+		Name name = typeDeclaration.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		ASTNode declaringNode = unit.findDeclaringNode(binding);
+		assertNotNull("No declaring node", declaringNode); //$NON-NLS-1$
+		assertEquals("Wrong node", typeDeclaration, declaringNode); //$NON-NLS-1$
+		typeBinding = name.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		declaringNode = unit.findDeclaringNode(typeBinding);
+		assertNotNull("No declaring node", declaringNode); //$NON-NLS-1$
+		assertEquals("Wrong node", typeDeclaration, declaringNode); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=20881
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 1, 0);
+		assertNotNull(node);
+		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) {
+			List throwsException = internalThrownExceptions(methodDeclaration);
+			assertEquals("wrong size", 2, throwsException.size()); //$NON-NLS-1$
+			Name name = (Name) throwsException.get(0);
+			binding = name.resolveBinding();			
+		} else {
+			List throwsExceptionTypes = methodDeclaration.thrownExceptionTypes();
+			assertEquals("wrong size", 2, throwsExceptionTypes.size()); //$NON-NLS-1$
+			Type type = (Type) throwsExceptionTypes.get(0);
+			binding = type.resolveBinding();			
+		}
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertEquals("LIOException;", binding.getKey());
+		assertTrue("Binding should be marked as recovered", binding.isRecovered());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=23734
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		ASTNode declaringNode = unit.findDeclaringNode(typeBinding);
+		assertNull("Got a declaring node", declaringNode); //$NON-NLS-1$
+
+		node = getASTNode(unit, 0, 1);
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration2 = (MethodDeclaration) node;
+		Type type2 = methodDeclaration2.getReturnType2();
+		ITypeBinding typeBinding2 = type2.resolveBinding();
+		assertNotNull("No type binding", typeBinding2); //$NON-NLS-1$
+		ASTNode declaringNode2 = unit.findDeclaringNode(typeBinding2);
+		assertNotNull("No declaring node", declaringNode2); //$NON-NLS-1$
+
+		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);
+		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$
+		ASTNode declaringNode3 = unit2.findDeclaringNode(typeBinding);
+		assertNull("Got a declaring node", declaringNode3); //$NON-NLS-1$
+
+		ASTNode declaringNode4 = unit2.findDeclaringNode(typeBinding.getKey());
+		assertNotNull("No declaring node", declaringNode4); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24268
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a switch statement", node.getNodeType() == ASTNode.SWITCH_STATEMENT); //$NON-NLS-1$
+		SwitchStatement switchStatement = (SwitchStatement) node;
+		List statements = switchStatement.statements();
+		assertEquals("wrong size", statements.size(), 5); //$NON-NLS-1$
+		Statement statement = (Statement) statements.get(3);
+		assertTrue("not a switch case (default)", statement.getNodeType() == ASTNode.SWITCH_CASE); //$NON-NLS-1$
+		SwitchCase defaultCase = (SwitchCase) statement;
+		assertTrue("not a default case", defaultCase.isDefault());
+		checkSourceRange(defaultCase, "default:", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24324
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", fragments.size(), 1);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression init = fragment.getInitializer();
+		assertTrue("not a qualified name", init.getNodeType() == ASTNode.QUALIFIED_NAME); //$NON-NLS-1$
+		QualifiedName qualifiedName = (QualifiedName) init;
+		SimpleName simpleName = qualifiedName.getName();
+		assertEquals("Wrong name", "CONST", simpleName.getIdentifier());
+		IBinding binding = simpleName.resolveBinding();
+		assertEquals("Wrong type", IBinding.VARIABLE, binding.getKind());
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong modifier", variableBinding.getModifiers(), Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL);
+		ASTNode declaringNode = unit.findDeclaringNode(variableBinding);
+		assertNotNull("No declaring node", declaringNode);
+		assertTrue("not a variable declaration fragment", declaringNode.getNodeType() == ASTNode.VARIABLE_DECLARATION_FRAGMENT);
+		VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) declaringNode;
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) variableDeclarationFragment.getParent();
+		assertEquals("Wrong modifier", fieldDeclaration.getModifiers(), Modifier.NONE);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24347
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("not a simple type", type.getNodeType() == ASTNode.SIMPLE_TYPE); //$NON-NLS-1$
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertTrue("Not a qualified name", name.isQualifiedName());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		Name qualifier = qualifiedName.getQualifier();
+		assertTrue("Not a simple name", qualifier.isSimpleName());
+		IBinding binding = qualifier.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24406
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 1, 0);
+		assertNotNull("No node", node);
+		assertTrue("not an expression statement ", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("not an method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Name name = methodInvocation.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", node.getNodeType(), ASTNode.EXPRESSION_STATEMENT);
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", expression.getNodeType(), ASTNode.ASSIGNMENT);
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a name", expression2.getNodeType(), ASTNode.SIMPLE_NAME);
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding = simpleName.resolveBinding();
+		assertNull(binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", node.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", expression.getNodeType(), ASTNode.INFIX_EXPRESSION);
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getRightOperand();
+		assertEquals("Not a parenthesized expression", expression2.getNodeType(), ASTNode.PARENTHESIZED_EXPRESSION);
+		checkSourceRange(expression2, "(2 + 3)", source);
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression2;
+		Expression expression3 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression3, "2 + 3", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", node.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", expression.getNodeType(), ASTNode.INFIX_EXPRESSION);
+		InfixExpression infixExpression = (InfixExpression) expression;
+		checkSourceRange(infixExpression, "(1 + 2) + 3", source);
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Not a parenthesized expression", expression2.getNodeType(), ASTNode.PARENTHESIZED_EXPRESSION);
+		checkSourceRange(expression2, "(1 + 2)", source);
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression2;
+		Expression expression3 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression3, "1 + 2", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", node.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", expression.getNodeType(), ASTNode.INFIX_EXPRESSION);
+		InfixExpression infixExpression = (InfixExpression) expression;
+		checkSourceRange(infixExpression, "( 1 + 2 ) + 3", source);
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Not a parenthesized expression", expression2.getNodeType(), ASTNode.PARENTHESIZED_EXPRESSION);
+		checkSourceRange(expression2, "( 1 + 2 )", source);
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression2;
+		Expression expression3 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression3, "1 + 2", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", node.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", expression.getNodeType(), ASTNode.INFIX_EXPRESSION);
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getRightOperand();
+		assertEquals("Not a parenthesized expression", expression2.getNodeType(), ASTNode.PARENTHESIZED_EXPRESSION);
+		checkSourceRange(expression2, "( 2 + 3 )", source);
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression2;
+		Expression expression3 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression3, "2 + 3", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", node.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", expression.getNodeType(), ASTNode.INFIX_EXPRESSION);
+		InfixExpression infixExpression = (InfixExpression) expression;
+		assertEquals("Wrong size", 1, infixExpression.extendedOperands().size());
+		Expression expression2 = (Expression) infixExpression.extendedOperands().get(0);
+		checkSourceRange(expression2, "( 2 + 3 )", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24453
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", node.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", expression.getNodeType(), ASTNode.INFIX_EXPRESSION);
+		InfixExpression infixExpression = (InfixExpression) expression;
+		assertEquals("Wrong size", 0, infixExpression.extendedOperands().size());
+		Expression expression2 = infixExpression.getRightOperand();
+		assertTrue("not an infix expression", expression2.getNodeType() == ASTNode.INFIX_EXPRESSION); //$NON-NLS-1$
+		InfixExpression infixExpression2 = (InfixExpression) expression2;
+		Expression expression3 = infixExpression2.getRightOperand();
+		assertTrue("not a parenthesized expression", expression3.getNodeType() == ASTNode.PARENTHESIZED_EXPRESSION); //$NON-NLS-1$
+		checkSourceRange(expression3, "( 2 + 3 )", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", node.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertTrue("not a simple type", type.getNodeType() == ASTNode.SIMPLE_TYPE);
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertNotNull("No name", name);
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", node.getNodeType(), ASTNode.EXPRESSION_STATEMENT);
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", expression.getNodeType(), ASTNode.ASSIGNMENT);
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a super field access", expression2.getNodeType(), ASTNode.SUPER_FIELD_ACCESS);
+		SuperFieldAccess superFieldAccess = (SuperFieldAccess) expression2;
+		Name name = superFieldAccess.getName();
+		assertNotNull("No name", name);
+		IBinding binding = name.resolveBinding();
+		assertNull("Got a binding", binding);
+		assertNull("Got a binding", superFieldAccess.resolveFieldBinding());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", node.getNodeType(), ASTNode.EXPRESSION_STATEMENT);
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", expression.getNodeType(), ASTNode.ASSIGNMENT);
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a qualified name", expression2.getNodeType(), ASTNode.QUALIFIED_NAME);
+		QualifiedName name = (QualifiedName) expression2;
+		SimpleName simpleName = name.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding2", binding2);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24449
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", node.getNodeType(), ASTNode.EXPRESSION_STATEMENT);
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", expression.getNodeType(), ASTNode.ASSIGNMENT);
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a qualified name", expression2.getNodeType(), ASTNode.QUALIFIED_NAME);
+		QualifiedName name = (QualifiedName) expression2;
+		SimpleName simpleName = name.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		IBinding binding2 = name.resolveBinding();
+		assertNotNull("No binding2", binding2);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24499
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertTrue("Not a constructor invocation", node.getNodeType() == ASTNode.CONSTRUCTOR_INVOCATION);
+		ConstructorInvocation constructorInvocation = (ConstructorInvocation) node;
+		checkSourceRange(constructorInvocation, "this(coo2());", source);
+		List arguments = constructorInvocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		Expression expression = (Expression) arguments.get(0);
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION);
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		SimpleName simpleName = methodInvocation.getName();
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24500
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertTrue("Not a constructor invocation", node.getNodeType() == ASTNode.CONSTRUCTOR_INVOCATION);
+		ConstructorInvocation constructorInvocation = (ConstructorInvocation) node;
+		List arguments = constructorInvocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		Expression expression = (Expression) arguments.get(0);
+		assertTrue("Not a simple name", expression.getNodeType() == ASTNode.SIMPLE_NAME);
+		SimpleName simpleName = (SimpleName) expression;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", ASTNode.ASSIGNMENT, expression.getNodeType());
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, expression2.getNodeType());
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", ASTNode.ASSIGNMENT, expression.getNodeType());
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a super field access", ASTNode.SUPER_FIELD_ACCESS, expression2.getNodeType());
+		SuperFieldAccess superFieldAccess = (SuperFieldAccess) expression2;
+		SimpleName simpleName = superFieldAccess.getName();
+		assertEquals("wrong name", "fCoo", simpleName.getIdentifier());
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong binding", IBinding.VARIABLE, binding.getKind());
+		IVariableBinding variableBinding = superFieldAccess.resolveFieldBinding();
+		assertTrue("Different binding", binding == variableBinding);
+		ASTNode astNode = unit.findDeclaringNode(variableBinding);
+		assertTrue("Wrong type", astNode.getNodeType() == ASTNode.SINGLE_VARIABLE_DECLARATION || astNode.getNodeType() == ASTNode.VARIABLE_DECLARATION_FRAGMENT || astNode.getNodeType() == ASTNode.VARIABLE_DECLARATION_EXPRESSION);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", ASTNode.ASSIGNMENT, expression.getNodeType());
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, expression2.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) expression2;
+		SimpleName simpleName = qualifiedName.getName();
+		assertEquals("wrong name", "fCoo", simpleName.getIdentifier());
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24501
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an assignment", ASTNode.ASSIGNMENT, expression.getNodeType());
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getLeftHandSide();
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, expression2.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) expression2;
+		SimpleName simpleName = qualifiedName.getName();
+		assertEquals("wrong name", "fCoo", simpleName.getIdentifier());
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType());
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		SimpleName simpleName = qualifiedName.getName();
+		assertEquals("wrong name", "CInner", simpleName.getIdentifier());
+		IBinding binding2 = simpleName.resolveBinding();
+		assertNotNull("No binding", binding2);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType());
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		SimpleName simpleName = (SimpleName) name;
+		IBinding binding = simpleName.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24511
+	 */
+	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);
+		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$<
+		List imports = unit.imports();
+		assertEquals("Wrong size", 1, imports.size()); //$NON-NLS-1$<
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		IBinding binding = importDeclaration.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24502
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		Type type = statement.getType();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType());
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		// 2 * 3 + "" + (true)
+		InfixExpression infixExpression = (InfixExpression) expression;
+		checkSourceRange(infixExpression, "2 * 3 + \"\" + (true)", source);
+		Expression leftOperand = infixExpression.getLeftOperand();
+		checkSourceRange(leftOperand, "2 * 3 + \"\"", source);
+		checkSourceRange(infixExpression.getRightOperand(), "(true)", source);
+		assertEquals("wrong operator", infixExpression.getOperator(), InfixExpression.Operator.PLUS);
+		assertEquals("wrong type", ASTNode.INFIX_EXPRESSION, leftOperand.getNodeType());
+		infixExpression = (InfixExpression) leftOperand;
+		checkSourceRange(infixExpression, "2 * 3 + \"\"", source);
+		leftOperand = infixExpression.getLeftOperand();
+		checkSourceRange(leftOperand, "2 * 3", source);
+		checkSourceRange(infixExpression.getRightOperand(), "\"\"", source);
+		assertEquals("wrong operator", infixExpression.getOperator(), InfixExpression.Operator.PLUS);
+		assertEquals("wrong type", ASTNode.INFIX_EXPRESSION, leftOperand.getNodeType());
+		infixExpression = (InfixExpression) leftOperand;
+		checkSourceRange(infixExpression, "2 * 3", source);
+		leftOperand = infixExpression.getLeftOperand();
+		checkSourceRange(leftOperand, "2", source);
+		checkSourceRange(infixExpression.getRightOperand(), "3", source);
+		assertEquals("wrong operator", infixExpression.getOperator(), InfixExpression.Operator.TIMES);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		checkSourceRange(infixExpression, "(2 + 2) * 3 * 1", source);
+		Expression leftOperand = infixExpression.getLeftOperand();
+		checkSourceRange(leftOperand, "(2 + 2)", source);
+		checkSourceRange(infixExpression.getRightOperand(), "3", source);
+		List extendedOperands = infixExpression.extendedOperands();
+		assertEquals("wrong size", 1, extendedOperands.size());
+		checkSourceRange((Expression) extendedOperands.get(0), "1", source);
+		assertEquals("wrong operator", InfixExpression.Operator.TIMES, infixExpression.getOperator());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24622
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		checkSourceRange(infixExpression, "2 + (2 * 3) + 1", source);
+		Expression leftOperand = infixExpression.getLeftOperand();
+		checkSourceRange(leftOperand, "2", source);
+		Expression rightOperand = infixExpression.getRightOperand();
+		checkSourceRange(rightOperand, "(2 * 3)", source);
+		assertEquals("wrong type", ASTNode.PARENTHESIZED_EXPRESSION, rightOperand.getNodeType());
+		List extendedOperands = infixExpression.extendedOperands();
+		assertEquals("wrong size", 1, extendedOperands.size());
+		checkSourceRange((Expression) extendedOperands.get(0), "1", source);
+		assertEquals("wrong operator", InfixExpression.Operator.PLUS, infixExpression.getOperator());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24623
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertNotNull("No body", methodDeclaration.getBody());
+		assertNotNull("No binding", methodDeclaration.resolveBinding());
+		assertTrue("Not an abstract method", Modifier.isAbstract(methodDeclaration.getModifiers()));
+		List modifiers = methodDeclaration.modifiers();
+		assertEquals("Wrong size", 2, modifiers.size());
+		Modifier modifier1 = (Modifier) modifiers.get(0);
+		assertTrue("Not a public modifier", modifier1.isPublic());
+		Modifier modifier2 = (Modifier) modifiers.get(1);
+		assertTrue("Not an abstract modifier", modifier2.isAbstract());
+		assertTrue("Not malformed", isMalformed(methodDeclaration));
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24623
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0);
+		assertEquals("Wrong type", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 2, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration)bodyDeclarations.get(0);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		assertEquals("Wrong name", "foo", methodDeclaration.getName().getIdentifier());
+		bodyDeclaration = (BodyDeclaration)bodyDeclarations.get(1);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		assertEquals("Wrong name", "foo", ((MethodDeclaration) bodyDeclaration).getName().getIdentifier());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24773
+	 */
+	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);
+		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$<
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=25018
+	 */
+	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);
+		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$<
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=25124
+	 */
+	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);
+		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$<
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=25330
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", node.getNodeType(), ASTNode.METHOD_DECLARATION);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Not a constructor", methodDeclaration.isConstructor());
+		assertNull("No return type", methodDeclaration.getReturnType2());
+		Block block = methodDeclaration.getBody();
+		assertNotNull("No method body", block);
+		assertEquals("wrong size", 0, block.statements().size());
+	}
+
+	/**
+	 * Check that the implicit super constructor call is not there
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", node.getNodeType(), ASTNode.METHOD_DECLARATION);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Not a constructor", methodDeclaration.isConstructor());
+		Block block = methodDeclaration.getBody();
+		assertNotNull("No method body", block);
+		assertEquals("wrong size", 1, block.statements().size());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=26452
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", node.getNodeType(), ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		assertTrue("not a class", typeBinding.isClass());
+		assertTrue("not a toplevel type", typeBinding.isTopLevel());
+		assertTrue("a local type", !typeBinding.isLocal());
+		assertTrue("an anonymous type", !typeBinding.isAnonymous());
+		assertTrue("a member type", !typeBinding.isMember());
+		assertTrue("a nested type", !typeBinding.isNested());
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not an expression statement", node.getNodeType(), ASTNode.EXPRESSION_STATEMENT);
+		Expression expression = ((ExpressionStatement) node).getExpression();
+		assertEquals("Not a class instance creation", expression.getNodeType(), ASTNode.CLASS_INSTANCE_CREATION);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		assertTrue("not a class", typeBinding.isClass());
+		assertTrue("a toplevel type", !typeBinding.isTopLevel());
+		assertTrue("not a local type", typeBinding.isLocal());
+		assertTrue("not an anonymous type", typeBinding.isAnonymous());
+		assertTrue("a member type", !typeBinding.isMember());
+		assertTrue("not a nested type", typeBinding.isNested());
+		ASTNode astNode = unit.findDeclaringNode(typeBinding);
+		assertEquals("Wrong type", ASTNode.ANONYMOUS_CLASS_DECLARATION, astNode.getNodeType());
+		assertNotNull("Didn't get a key", typeBinding.getKey());
+		astNode = unit.findDeclaringNode(typeBinding.getKey());
+		assertNotNull("Didn't get a declaring node", astNode);
+
+		ITypeBinding typeBinding3 = classInstanceCreation.resolveTypeBinding();
+		assertEquals("wrong binding", typeBinding, typeBinding3);
+
+		List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 2, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("not a type declaration", bodyDeclaration.getNodeType() == ASTNode.TYPE_DECLARATION);
+		typeDeclaration = (TypeDeclaration) bodyDeclaration;
+
+		bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(1);
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		assertNotNull("No body", block);
+		List statements = block.statements();
+		assertEquals("wrong size", 2, statements.size());
+		Statement statement = (Statement) statements.get(1);
+		assertEquals("Not a variable declaration statement", statement.getNodeType(), ASTNode.VARIABLE_DECLARATION_STATEMENT);
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement;
+		Type type = variableDeclarationStatement.getType();
+		assertNotNull("No type", type);
+
+		ITypeBinding typeBinding2 = type.resolveBinding();
+		typeBinding = typeDeclaration.resolveBinding();
+		assertTrue("not equals", typeBinding == typeBinding2);
+		assertNotNull("No type binding", typeBinding);
+		assertTrue("not a class", typeBinding.isClass());
+		assertTrue("a toplevel type", !typeBinding.isTopLevel());
+		assertTrue("an anonymous type", !typeBinding.isAnonymous());
+		assertTrue("not a member type", typeBinding.isMember());
+		assertTrue("not a nested type", typeBinding.isNested());
+		assertTrue("a local type", !typeBinding.isLocal());
+
+		bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("not a type declaration", bodyDeclaration.getNodeType() == ASTNode.TYPE_DECLARATION);
+		typeDeclaration = (TypeDeclaration) bodyDeclaration;
+		typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		assertTrue("not a class", typeBinding.isClass());
+		assertTrue("a toplevel type", !typeBinding.isTopLevel());
+		assertTrue("an anonymous type", !typeBinding.isAnonymous());
+		assertTrue("not a member type", typeBinding.isMember());
+		assertTrue("not a nested type", typeBinding.isNested());
+		assertTrue("a local type", !typeBinding.isLocal());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=24916
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		checkSourceRange(type, "int", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=27204
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		SimpleName name = methodDeclaration.getName();
+		assertEquals("wrong line number", 3, compilationUnit.getLineNumber(name.getStartPosition()));
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=27173
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0,0);
+		assertNotNull("No node", node);
+		assertTrue("not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertTrue("not a super method invocation", expression.getNodeType() == ASTNode.SUPER_METHOD_INVOCATION); //$NON-NLS-1$
+		SuperMethodInvocation methodInvocation = (SuperMethodInvocation) expression;
+		IMethodBinding methodBinding = methodInvocation.resolveMethodBinding();
+		assertNotNull("No method binding", methodBinding);
+		assertEquals("Wrong binding", "toString", methodBinding.getName());
+	}
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28296
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0,1);
+		assertNotNull("No node", node);
+		assertTrue("not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+		List fragments = statement.fragments();
+		assertEquals("wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue("not a cast expression", expression.getNodeType() == ASTNode.CAST_EXPRESSION); //$NON-NLS-1$
+		checkSourceRange(expression, "(int) (3.14f * a)", source);
+		CastExpression castExpression = (CastExpression) expression;
+		checkSourceRange(castExpression.getType(), "int", source);
+		Expression expression2 = castExpression.getExpression();
+		checkSourceRange(expression2, "(3.14f * a)", source);
+		assertTrue("not a parenthesized expression", expression2.getNodeType() == ASTNode.PARENTHESIZED_EXPRESSION); //$NON-NLS-1$
+	}
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node; // first for loop
+		String expectedSource = "for (int i = 0; i < 10; i++)  // for 1\n" +
+			"	        for (int j = 0; j < 10; j++)  // for 2\n" +
+			"	            if (true) { }";
+		checkSourceRange(forStatement, expectedSource, source);
+		Statement body = forStatement.getBody();
+		expectedSource = "for (int j = 0; j < 10; j++)  // for 2\n" +
+			"	            if (true) { }";
+		checkSourceRange(body, expectedSource, source);
+		assertTrue("not a for statement", body.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement2 = (ForStatement) body;
+		body = forStatement2.getBody();
+		expectedSource = "if (true) { }";
+		checkSourceRange(body, expectedSource, source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node; // first for loop
+		String expectedSource = "for (int x= 10; x < 20; x++)\n" +
+			"			main();";
+		checkSourceRange(forStatement, expectedSource, source);
+		Statement body = forStatement.getBody();
+		expectedSource = "main();";
+		checkSourceRange(body, expectedSource, source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node; // first for loop
+		String expectedSource = "for (int i= 10; i < 10; i++)/*[*/\n"+
+			"			for (int z= 10; z < 10; z++)\n" +
+			"				foo();";
+		checkSourceRange(forStatement, expectedSource, source);
+		Statement body = forStatement.getBody();
+		expectedSource = "for (int z= 10; z < 10; z++)\n" +
+			"				foo();";
+		checkSourceRange(body, expectedSource, source);
+		assertTrue("not a for statement", body.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement2 = (ForStatement) body;
+		body = forStatement2.getBody();
+		expectedSource = "foo();";
+		checkSourceRange(body, expectedSource, source);
+	}
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node; // first for loop
+		String expectedSource = "for (int i= 10; i < 10; i++)/*[*/\n"+
+			"			for (int z= 10; z < 10; z++)\n" +
+			"				;";
+		checkSourceRange(forStatement, expectedSource, source);
+		Statement body = forStatement.getBody();
+		expectedSource = "for (int z= 10; z < 10; z++)\n" +
+			"				;";
+		checkSourceRange(body, expectedSource, source);
+		assertTrue("not a for statement", body.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement2 = (ForStatement) body;
+		body = forStatement2.getBody();
+		expectedSource = ";";
+		checkSourceRange(body, expectedSource, source);
+		assertTrue("not an empty statement", body.getNodeType() == ASTNode.EMPTY_STATEMENT); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28682
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node; // first for loop
+		String expectedSource = "for (int i= 10; i < 10; i++)/*[*/\n"+
+			"			for (int z= 10; z < 10; z++)\n" +
+			"				{    }";
+		checkSourceRange(forStatement, expectedSource, source);
+		Statement body = forStatement.getBody();
+		expectedSource = "for (int z= 10; z < 10; z++)\n" +
+			"				{    }";
+		checkSourceRange(body, expectedSource, source);
+		assertTrue("not a for statement", body.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement2 = (ForStatement) body;
+		body = forStatement2.getBody();
+		expectedSource = "{    }";
+		checkSourceRange(body, expectedSource, source);
+		assertTrue("not a block", body.getNodeType() == ASTNode.BLOCK); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28869
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("Malformed", !isMalformed(node));
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=28824
+	 */
+	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);
+		char[] source = sourceUnit.getSource().toCharArray();
+		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$
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("Malformed", !isMalformed(node));
+		assertTrue("not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("not an assignment", expression.getNodeType() == ASTNode.ASSIGNMENT); //$NON-NLS-1$
+		Assignment assignment = (Assignment) expression;
+		checkSourceRange(assignment, "z= foo().y.toList()", source);
+		Expression expression2 = assignment.getRightHandSide();
+		checkSourceRange(expression2, "foo().y.toList()", source);
+		assertTrue("not a method invocation", expression2.getNodeType() == ASTNode.METHOD_INVOCATION);
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		checkSourceRange(expression3, "foo().y", source);
+		checkSourceRange(methodInvocation.getName(), "toList", source);
+		assertTrue("not a field access", expression3.getNodeType() == ASTNode.FIELD_ACCESS);
+		FieldAccess fieldAccess = (FieldAccess) expression3;
+		checkSourceRange(fieldAccess.getName(), "y", source);
+		Expression expression4 = fieldAccess.getExpression();
+		checkSourceRange(expression4, "foo()", source);
+		assertTrue("not a method invocation", expression4.getNodeType() == ASTNode.METHOD_INVOCATION);
+		MethodInvocation methodInvocation2 = (MethodInvocation) expression4;
+		checkSourceRange(methodInvocation2.getName(), "foo", source);
+		assertNull("no null", methodInvocation2.getExpression());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=32338
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertEquals("Wrong name", "Test462", typeDeclaration.getName().getIdentifier());
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No binding", typeBinding);
+		assertEquals("Wrong name", "Test462", typeBinding.getQualifiedName());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=33450
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		char[] source = sourceUnit.getSource().toCharArray();
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertTrue("not a string literal", expression.getNodeType() == ASTNode.STRING_LITERAL); //$NON-NLS-1$
+		StringLiteral stringLiteral = (StringLiteral) expression;
+		checkSourceRange(stringLiteral, "\"\\012\\015\\u0061\"", source);
+		assertEquals("wrong value", "\012\015a", stringLiteral.getLiteralValue());
+		assertEquals("wrong value", "\"\\012\\015\\u0061\"", stringLiteral.getEscapedValue());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=33039
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No node", node);
+		assertTrue("not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertTrue("not a null literal", expression.getNodeType() == ASTNode.NULL_LITERAL); //$NON-NLS-1$
+		NullLiteral nullLiteral = (NullLiteral) expression;
+		ITypeBinding typeBinding = nullLiteral.resolveTypeBinding();
+		assertNotNull("No type binding", typeBinding);
+		assertFalse("A primitive type", typeBinding.isPrimitive());
+		assertTrue("Null type", typeBinding.isNullType());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=33831
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No node", node);
+		assertTrue("not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertTrue("not a field access", expression.getNodeType() == ASTNode.FIELD_ACCESS); //$NON-NLS-1$
+		FieldAccess fieldAccess = (FieldAccess) expression;
+		Name name = fieldAccess.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.VARIABLE, binding.getKind());
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "i", variableBinding.getName());
+		assertEquals("Wrong type", "int", variableBinding.getType().getName());
+		IVariableBinding variableBinding2 = fieldAccess.resolveFieldBinding();
+		assertTrue("different binding", variableBinding == variableBinding2);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=33949
+	 */
+	public void test0466() throws JavaModelException {
+		Hashtable options = JavaCore.getOptions();
+		Hashtable newOptions = JavaCore.getOptions();
+		try {
+			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);
+			CompilationUnit compilationUnit = (CompilationUnit) result;
+			char[] source = sourceUnit.getSource().toCharArray();
+			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+			checkSourceRange(node, "assert ref != null : message;", source);
+			assertTrue("not an assert statement", node.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$
+			AssertStatement statement = (AssertStatement) node;
+			checkSourceRange(statement.getExpression(), "ref != null", source);
+			checkSourceRange(statement.getMessage(), "message", source);
+		} finally {
+			JavaCore.setOptions(options);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=33949
+	 */
+	public void test0467() throws JavaModelException {
+		Hashtable options = JavaCore.getOptions();
+		Hashtable newOptions = JavaCore.getOptions();
+		try {
+			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);
+			CompilationUnit compilationUnit = (CompilationUnit) result;
+			char[] source = sourceUnit.getSource().toCharArray();
+			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+			checkSourceRange(node, "assert ref != null : message\\u003B", source);
+			assertTrue("not an assert statement", node.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$
+			AssertStatement statement = (AssertStatement) node;
+			checkSourceRange(statement.getExpression(), "ref != null", source);
+			checkSourceRange(statement.getMessage(), "message", source);
+
+			node = getASTNode(compilationUnit, 0, 0, 1);
+			checkSourceRange(node, "assert ref != null\\u003B", source);
+			assertTrue("not an assert statement", node.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$
+			statement = (AssertStatement) node;
+			checkSourceRange(statement.getExpression(), "ref != null", source);
+		} finally {
+			JavaCore.setOptions(options);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=36772
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No node", node);
+		assertTrue("not a return statement", node.getNodeType() == ASTNode.RETURN_STATEMENT); //$NON-NLS-1$
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertTrue("not a field access", expression.getNodeType() == ASTNode.FIELD_ACCESS); //$NON-NLS-1$
+		FieldAccess fieldAccess = (FieldAccess) expression;
+		Name name = fieldAccess.getName();
+		IBinding binding = name.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.VARIABLE, binding.getKind());
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "i", variableBinding.getName());
+		assertEquals("Wrong type", "int", variableBinding.getType().getName());
+		IVariableBinding variableBinding2 = fieldAccess.resolveFieldBinding();
+		assertTrue("different binding", variableBinding == variableBinding2);
+
+		node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("No node", node);
+		assertEquals("Wrong type", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+
+		ASTNode foundNode = compilationUnit.findDeclaringNode(variableBinding);
+		assertNotNull("No found node", foundNode);
+		assertEquals("wrong node", fragment, foundNode);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=36895
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 2, 0);
+		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No node", node);
+		assertTrue("not a variable declaration statement", node.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		ASTNode parent = node.getParent();
+		assertNotNull(parent);
+		assertTrue("not a block", parent.getNodeType() == ASTNode.BLOCK); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=37381
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No node", node);
+		assertTrue("not a for statement", node.getNodeType() == ASTNode.FOR_STATEMENT); //$NON-NLS-1$
+		ForStatement forStatement = (ForStatement) node;
+		List initializers = forStatement.initializers();
+		assertEquals("wrong size", 1, initializers.size());
+		Expression initializer = (Expression) initializers.get(0);
+		assertTrue("not a variable declaration expression", initializer.getNodeType() == ASTNode.VARIABLE_DECLARATION_EXPRESSION); //$NON-NLS-1$
+		VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) initializer;
+		List fragments = variableDeclarationExpression.fragments();
+		assertEquals("wrong size", 2, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		checkSourceRange(fragment, "i= 0", source);
+		fragment = (VariableDeclarationFragment) fragments.get(1);
+		checkSourceRange(fragment, "j= goo(3)", source);
+		checkSourceRange(variableDeclarationExpression, "int i= 0, j= goo(3)", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=38447
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Is a constructor", !methodDeclaration.isConstructor());
+		checkSourceRange(methodDeclaration, "private void foo(){", source, true/*expectMalformed*/);
+		node = getASTNode(compilationUnit, 0, 1);
+		assertNotNull("No node", node);
+		assertTrue("not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Is a constructor", !methodDeclaration.isConstructor());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=38447
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 2);
+		assertNotNull("No node", node);
+		assertTrue("not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Not a constructor", methodDeclaration.isConstructor());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=38732
+	 */
+	public void test0473() throws JavaModelException {
+		Hashtable options = JavaCore.getOptions();
+		Hashtable newOptions = JavaCore.getOptions();
+		try {
+			newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
+			newOptions.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR);
+			JavaCore.setOptions(newOptions);
+
+			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);
+			CompilationUnit compilationUnit = (CompilationUnit) result;
+			assertEquals("No error", 2, compilationUnit.getProblems().length); //$NON-NLS-1$
+			ASTNode node = getASTNode(compilationUnit, 0, 0, 0);
+			assertNotNull("No node", node);
+			assertTrue("not an assert statement", node.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$
+			AssertStatement assertStatement = (AssertStatement) node;
+			checkSourceRange(assertStatement, "assert(true);", source);
+			Expression expression = assertStatement.getExpression();
+			checkSourceRange(expression, "(true)", source);
+		} finally {
+			JavaCore.setOptions(options);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertNotNull("No node", node);
+		assertEquals("Not a while statement", node.getNodeType(), ASTNode.WHILE_STATEMENT);
+		WhileStatement whileStatement = (WhileStatement) node;
+		Statement statement = whileStatement.getBody();
+		assertEquals("Not a while statement", statement.getNodeType(), ASTNode.WHILE_STATEMENT);
+		WhileStatement whileStatement2 = (WhileStatement) statement;
+		String expectedSource =
+			"while(b())\n" +
+			"				foo();";
+		checkSourceRange(whileStatement2, expectedSource, source);
+		Statement statement2 = whileStatement2.getBody();
+		checkSourceRange(statement2, "foo();", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertNotNull("No node", node);
+		assertEquals("Not an if statement", node.getNodeType(), ASTNode.IF_STATEMENT);
+		IfStatement statement = (IfStatement) node;
+		Statement statement2 = statement.getThenStatement();
+		assertEquals("Not an if statement", statement2.getNodeType(), ASTNode.IF_STATEMENT);
+		IfStatement statement3 = (IfStatement) statement2;
+		String expectedSource =
+			"if(b())\n" +
+			"				foo();";
+		checkSourceRange(statement3, expectedSource, source);
+		Statement statement4 = statement3.getThenStatement();
+		checkSourceRange(statement4, "foo();", source);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("No error", 0, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertNotNull("No node", node);
+		assertEquals("Not a for statement", node.getNodeType(), ASTNode.FOR_STATEMENT);
+		ForStatement statement = (ForStatement) node;
+		Statement statement2 = statement.getBody();
+		assertEquals("Not a for statement", statement2.getNodeType(), ASTNode.FOR_STATEMENT);
+		ForStatement statement3 = (ForStatement) statement2;
+		String expectedSource =
+			"for(;b();)\n" +
+			"				foo();";
+		checkSourceRange(statement3, expectedSource, source);
+		Statement statement4 = statement3.getBody();
+		checkSourceRange(statement4, "foo();", source);
+	}
+
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=39327
+	 */
+	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);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertEquals("No error", 1, compilationUnit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(compilationUnit, 0, 1, 0);
+		assertNotNull("No node", node);
+
+		checkSourceRange(node, "this(undef());", source);
+		assertEquals("Not a constructor invocation", node.getNodeType(), ASTNode.CONSTRUCTOR_INVOCATION);
+		ConstructorInvocation constructorInvocation = (ConstructorInvocation) node;
+		List arguments = constructorInvocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		IMethodBinding binding = constructorInvocation.resolveConstructorBinding();
+		assertNotNull("No binding", binding);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0478() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0478", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 2, types.length);
+		IType type = types[1];
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull(methodBinding);
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 2, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(1);
+		assertNotNull(node2);
+		assertTrue("Not an expression statement", node2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("wrong type", binding.getKind() == IBinding.VARIABLE); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "a", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "clone", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("no binding2", binding2); //$NON-NLS-1$
+		assertTrue("Wrong type", binding2.getKind() == IBinding.METHOD); //$NON-NLS-1$
+		IMethodBinding methodBinding2 = (IMethodBinding) binding2;
+		assertEquals("Wrong name", "clone", methodBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0479() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0479", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 2, types.length);
+		IType type = types[1];
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 2, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(1);
+		assertNotNull(node2);
+		assertTrue("Not an expression statement", node2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNull("No binding", binding); //$NON-NLS-1$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "clone", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0480() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0480", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0481() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0481", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node2;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+		assertNotNull(typeBinding);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0482() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IType[] memberTypes = type.getTypes();
+		assertNotNull(memberTypes);
+		assertEquals("wrong size", 1, memberTypes.length);
+		IType memberType = memberTypes[0];
+		IMethod[] methods = memberType.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node2;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		assertTrue(typeBinding.isAnonymous());
+		assertEquals("Wrong name", "", typeBinding.getName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0483() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0483", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IMethod[] methods = type.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "A", methodDeclaration.getName().getIdentifier());
+		assertTrue("Not a constructor", methodDeclaration.isConstructor());
+		IBinding binding = methodDeclaration.getName().resolveBinding();
+		assertNotNull(binding);
+		assertEquals("Wrong type", IBinding.METHOD, binding.getKind());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node2;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		assertTrue(typeBinding.isAnonymous());
+		assertEquals("Wrong name", "", typeBinding.getName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0484() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IType[] memberTypes = type.getTypes();
+		assertNotNull(memberTypes);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertEquals("wrong name", "B", typeDeclaration.getName().getIdentifier());
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("Not a method declaration", bodyDeclaration.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0485() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0482", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IType[] memberTypes = type.getTypes();
+		assertNotNull(memberTypes);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertEquals("wrong name", "B", typeDeclaration.getName().getIdentifier());
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("Not a method declaration", bodyDeclaration.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0486() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0486", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IMethod[] methods = type.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 2);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 2, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0487() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0487", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IMethod[] methods = type.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 5);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 2, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 4);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Wrong name", "field", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Wrong name", "i", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 2);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		Initializer initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.NONE, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 3);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.STATIC, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 6);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=40474
+	 */
+	public void test0488() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IInitializer[] initializers = type.getInitializers();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 5);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 4);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Wrong name", "field", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Wrong name", "i", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 2);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		Initializer initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.NONE, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 3);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.STATIC, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 6);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+	}
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=40804
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertNull("Got a type binding", typeDeclaration.resolveBinding());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=40804
+	 */
+	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);
+		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$<
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=42647
+	 */
+	public void test0491() throws JavaModelException {
+		Hashtable options = JavaCore.getOptions();
+		Hashtable newOptions = JavaCore.getOptions();
+		try {
+			newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
+			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);
+			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$<
+			ASTNode node = getASTNode(unit, 0, 0, 0);
+			assertTrue("not an assert statement", node.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$
+			AssertStatement assertStatement = (AssertStatement) node;
+			Expression expression = assertStatement.getExpression();
+			assertTrue("not a parenthesized expression", expression.getNodeType() == ASTNode.PARENTHESIZED_EXPRESSION); //$NON-NLS-1$
+			checkSourceRange(expression, "(loginName != null)", source);
+		} finally {
+			JavaCore.setOptions(options);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=42647
+	 */
+	public void test0492() throws JavaModelException {
+		Hashtable options = JavaCore.getOptions();
+		Hashtable newOptions = JavaCore.getOptions();
+		try {
+			newOptions.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_4);
+			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);
+			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$<
+			ASTNode node = getASTNode(unit, 0, 0, 0);
+			assertTrue("not an assert statement", node.getNodeType() == ASTNode.ASSERT_STATEMENT); //$NON-NLS-1$
+			AssertStatement assertStatement = (AssertStatement) node;
+			Expression expression = assertStatement.getExpression();
+			checkSourceRange(expression, "loginName != null", source);
+		} finally {
+			JavaCore.setOptions(options);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "Class[][]", source);
+		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		if (this.ast.apiLevel() < AST.JLS8) {
+			Type componentType = componentType(arrayType);
+			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class[]", source);
+			arrayType = (ArrayType) componentType;
+			componentType = componentType(arrayType);
+			assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class", source);
+		} else {
+			Type elementType = arrayType.getElementType();
+			checkSourceRange(elementType, "Class", source);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "Class[][][]", source);
+		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		if (this.ast.apiLevel() < AST.JLS8) {
+			Type componentType = componentType(arrayType);
+			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class[][]", source);
+			arrayType = (ArrayType) componentType;
+			componentType = componentType(arrayType);
+			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class[]", source);
+			arrayType = (ArrayType) componentType;
+			componentType = componentType(arrayType);
+			assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class", source);
+		} else {
+			Type elementType = arrayType.getElementType();
+			checkSourceRange(elementType, "Class", source);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "Class[][]", source);
+		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		if (this.ast.apiLevel() < AST.JLS8) {
+			Type componentType = componentType(arrayType);
+			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class[]", source);
+			arrayType = (ArrayType) componentType;
+			componentType = componentType(arrayType);
+			assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class", source);
+		} else {
+			Type elementType = arrayType.getElementType();
+			checkSourceRange(elementType, "Class", source);
+		}
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		assertEquals("wrong extra dimension", 1, fragment.getExtraDimensions());
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		checkSourceRange(type, "Class[][][][]", source);
+		assertTrue("not an array type", type.isArrayType()); //$NON-NLS-1$
+		ArrayType arrayType = (ArrayType) type;
+		if (this.ast.apiLevel() < AST.JLS8) {
+			Type componentType = componentType(arrayType);
+			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class[][][]", source);
+			arrayType = (ArrayType) componentType;
+			componentType = componentType(arrayType);
+			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class[][]", source);
+			arrayType = (ArrayType) componentType;
+			componentType = componentType(arrayType);
+			assertTrue("not an array type", componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class[]", source);
+			arrayType = (ArrayType) componentType;
+			componentType = componentType(arrayType);
+			assertTrue("is an array type", !componentType.isArrayType()); //$NON-NLS-1$
+			checkSourceRange(componentType, "Class", source);
+		} else {
+			Type elementType = arrayType.getElementType();
+			checkSourceRange(elementType, "Class", source);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=42839
+	 */
+	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);
+		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$<
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		Type type = fieldDeclaration.getType();
+		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();
+		assertTrue("is an array type", !type.isArrayType()); //$NON-NLS-1$
+		checkSourceRange(type, "Class", source);
+	}
+
+	/**
+	 */
+	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);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=45199
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 0, 0, 1);
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		Expression expression = ((ExpressionStatement) node).getExpression();
+		assertTrue("Not an assignment", expression.getNodeType() == ASTNode.ASSIGNMENT); //$NON-NLS-1$
+		Assignment assignment = (Assignment) expression;
+		Expression expression2 = assignment.getRightHandSide();
+		assertTrue("Not an infix expression", expression2.getNodeType() == ASTNode.INFIX_EXPRESSION); //$NON-NLS-1$
+		InfixExpression infixExpression = (InfixExpression) expression2;
+		Expression expression3 = infixExpression.getLeftOperand();
+		assertTrue("Not a simple name", expression3.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		ITypeBinding binding = expression3.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		Expression expression4 = assignment.getLeftHandSide();
+		assertTrue("Not a simple name", expression4.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		ITypeBinding binding2 = expression4.resolveTypeBinding();
+		assertNotNull("No binding", binding2);
+		assertTrue("Should be the same", binding == binding2);
+	}
+
+	/**
+	 * Test for bug 45436 fix.
+	 * When this bug happened, the first assertion was false (2 problems found).
+	 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=45436">bug 45436</a>
+	 * @throws JavaModelException
+	 */
+	public void test0500() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0500", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IJavaProject project = sourceUnit.getJavaProject();
+		Map originalOptions = project.getOptions(false);
+		try {
+			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);
+			IProblem[] problems= result.getProblems();
+			assertTrue(problems.length == 1);
+			assertEquals("Invalid warning", "Javadoc: Missing tag for parameter a", problems[0].getMessage());
+		} finally {
+			project.setOptions(originalOptions);
+		}
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46012
+	 */
+	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);
+		assertNotNull(result);
+		assertTrue("not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'i' in initializer
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 0, 0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		IVariableBinding localBinding = fragment.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A;#0#i", localBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'j' in 'then' block in initializer
+		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 0, 1);
+		Block block = (Block)ifStatement.getThenStatement();
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) block.statements().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		IVariableBinding localBinding = fragment.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A;#0#0#j", localBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'i' in 'foo()'
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement)getASTNode(unit, 0, 1, 0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		IVariableBinding localBinding = fragment.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A;.foo()V#i", localBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'j' in 'then' block in 'foo()'
+		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
+		Block block = (Block)ifStatement.getThenStatement();
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) block.statements().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		IVariableBinding localBinding = fragment.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A;.foo()V#0#j", localBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'j' in 'else' block in 'foo()'
+		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 1);
+		Block block = (Block)ifStatement.getElseStatement();
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) block.statements().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+		IVariableBinding localBinding = fragment.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A;.foo()V#1#j", localBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// first 'new Object(){...}' in 'foo()'
+		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 2);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		ITypeBinding typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A$182;", typeBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'B' in 'foo()'
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
+		AbstractTypeDeclaration typeDeclaration = typeDeclarationStatement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A$206$B;", typeBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// second 'new Object(){...}' in 'foo()'
+		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 4);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		ITypeBinding typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A$255;", typeBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'field' in 'B' in 'foo()'
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
+		AbstractTypeDeclaration abstractTypeDeclaration = typeDeclarationStatement.getDeclaration();
+		assertEquals("Wrong type", abstractTypeDeclaration.getNodeType(), ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) abstractTypeDeclaration;
+		FieldDeclaration fieldDeclaration = typeDeclaration.getFields()[0];
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fieldDeclaration.fragments().get(0);
+		IVariableBinding fieldBinding = fragment.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A$206$B;.field)I", fieldBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46013
+	 */
+	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);
+
+		// 'bar()' in 'B' in 'foo()'
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 3);
+		AbstractTypeDeclaration abstractTypeDeclaration = typeDeclarationStatement.getDeclaration();
+		assertEquals("Wrong type", abstractTypeDeclaration.getNodeType(), ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) abstractTypeDeclaration;
+		MethodDeclaration methodDeclaration = typeDeclaration.getMethods()[0];
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertEquals("Unexpected key", "Ltest0502/A$206$B;.bar()V", methodBinding.getKey()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// top level type A
+		TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0);
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// member type B in A
+		TypeDeclaration type = (TypeDeclaration)getASTNode(unit, 0, 0);
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A$B", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// local type E in foo() in A
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) getASTNode(unit, 0, 1, 0);
+		AbstractTypeDeclaration typeDeclaration = typeDeclarationStatement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A$1$E", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// anonymous type new Object() {...} in foo() in A
+		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		ITypeBinding typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A$2", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// type F in anonymous type new Object() {...} in foo() in A
+		ExpressionStatement expressionStatement = (ExpressionStatement) getASTNode(unit, 0, 1, 1);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		TypeDeclaration type = (TypeDeclaration) anonymousClassDeclaration.bodyDeclarations().get(0);
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A$2$F", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// local type C in bar() in B in A
+		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) method.getBody().statements().get(0);
+		AbstractTypeDeclaration typeDeclaration = typeDeclarationStatement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A$1$C", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// anonymous type new Object() {...} in bar() in B in A
+		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
+		ExpressionStatement expressionStatement = (ExpressionStatement) method.getBody().statements().get(1);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		ITypeBinding typeBinding = anonymousClassDeclaration.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A$1", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// type D in anonymous type new Object() {...} in bar() in B in A
+		MethodDeclaration method = (MethodDeclaration) getASTNode(unit, 0, 0, 0);
+		ExpressionStatement expressionStatement = (ExpressionStatement) method.getBody().statements().get(1);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		TypeDeclaration type = (TypeDeclaration) anonymousClassDeclaration.bodyDeclarations().get(0);
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertEquals("Unexpected binary name", "test0503.A$1$D", typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=46057
+	 */
+	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);
+
+		// unreachable type G in foo() in A
+		IfStatement ifStatement = (IfStatement) getASTNode(unit, 0, 1, 2);
+		Block block = (Block)ifStatement.getThenStatement();
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) block.statements().get(0);
+		AbstractTypeDeclaration typeDeclaration = typeDeclarationStatement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Unexpected binary name", null, typeBinding.getBinaryName()); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=47396
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 1, 0);
+		assertNotNull(node);
+		assertTrue("Not a constructor declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		assertTrue("A constructor", !declaration.isConstructor());
+		checkSourceRange(declaration, "public method(final int parameter);", source, true/*expectMalformed*/);
+	}
+
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=47396
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 1, 0);
+		assertNotNull(node);
+		assertTrue("Not a constructor declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		assertTrue("A constructor", !declaration.isConstructor());
+		checkSourceRange(declaration, "public method(final int parameter) {     }", source, true/*expectMalformed*/);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		assertTrue("Not a class instance creation", expressionStatement.getExpression().getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertFalse("is synthetic", binding.isSynthetic());
+		assertTrue("is default constructor", binding.isDefaultConstructor());
+		assertNull("Has a declaring node", unit.findDeclaringNode(binding));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		assertTrue("Not a class instance creation", expressionStatement.getExpression().getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertFalse("is synthetic", binding.isSynthetic());
+		assertTrue("is default constructor", binding.isDefaultConstructor());
+		assertNull("Has a declaring node", unit.findDeclaringNode(binding));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		assertTrue("Not a class instance creation", expressionStatement.getExpression().getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertFalse("is synthetic", binding.isSynthetic());
+		assertTrue("not a default constructor", !binding.isDefaultConstructor());
+		assertNotNull("Has no declaring node", unit.findDeclaringNode(binding));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		assertTrue("Not a class instance creation", expressionStatement.getExpression().getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertFalse("is synthetic", binding.isSynthetic());
+		assertTrue("not a default constructor", !binding.isDefaultConstructor());
+		assertNull("Has a declaring node", unit.findDeclaringNode(binding));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		assertTrue("Not a class instance creation", expressionStatement.getExpression().getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertFalse("is synthetic", binding.isSynthetic());
+		assertFalse("is default constructor", binding.isDefaultConstructor());
+		assertNull("Has a declaring node", unit.findDeclaringNode(binding));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=46699
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong number of problems", 0, (unit).getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		assertTrue("Not a class instance creation", expressionStatement.getExpression().getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expressionStatement.getExpression();
+		IMethodBinding binding = classInstanceCreation.resolveConstructorBinding();
+		assertFalse("is synthetic", binding.isSynthetic());
+		assertFalse("is default constructor", binding.isDefaultConstructor());
+		assertNull("Has a declaring node", unit.findDeclaringNode(binding));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=47326
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Wrong number of problems", 2, unit.getProblems().length); //$NON-NLS-1$
+		assertNotNull(node);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		assertTrue("Not a constructor", declaration.isConstructor());
+		checkSourceRange(declaration, "public A();", source, true/*expectMalformed*/);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=49429
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
+	}
+
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48502
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=49204
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a if statement", node.getNodeType() == ASTNode.IF_STATEMENT);
+		IfStatement ifStatement = (IfStatement) node;
+		assertTrue("not an empty statement", ifStatement.getThenStatement().getNodeType() == ASTNode.EMPTY_STATEMENT);
+		checkSourceRange(ifStatement.getThenStatement(), ";", source);
+		Statement statement = ifStatement.getElseStatement();
+		assertTrue("not a if statement", statement.getNodeType() == ASTNode.IF_STATEMENT);
+		ifStatement = (IfStatement) statement;
+		assertTrue("not an empty statement", ifStatement.getThenStatement().getNodeType() == ASTNode.EMPTY_STATEMENT);
+		checkSourceRange(ifStatement.getThenStatement(), ";", source);
+		Statement statement2 = ifStatement.getElseStatement();
+		assertTrue("not an empty statement", statement2.getNodeType() == ASTNode.EMPTY_STATEMENT);
+		checkSourceRange(statement2, ";", source);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 */
+	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);
+		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);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(source);
+		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a type declaration", result2.getNodeType() == ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) result2;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue(declaration.subtreeMatch(new ASTMatcher(), bodyDeclaration));
+		ASTNode root = bodyDeclaration.getRoot();
+		assertNotNull("No root", root);
+		assertTrue("not a compilation unit", root.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) root;
+		assertEquals("wrong problem size", 0, compilationUnit.getProblems().length);
+		assertNotNull("No comments", compilationUnit.getCommentList());
+		assertEquals("Wrong size", 3, compilationUnit.getCommentList().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No comments", unit.getCommentList());
+		assertEquals("Wrong size", 3, unit.getCommentList().size());
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+		FieldDeclaration declaration = (FieldDeclaration) node;
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(source);
+		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a type declaration", result2.getNodeType() == ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) result2;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue(declaration.subtreeMatch(new ASTMatcher(), bodyDeclaration));
+		ASTNode root = bodyDeclaration.getRoot();
+		assertNotNull("No root", root);
+		assertTrue("not a compilation unit", root.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) root;
+		assertEquals("wrong problem size", 0, compilationUnit.getProblems().length);
+		assertNotNull("No comments", compilationUnit.getCommentList());
+		assertEquals("Wrong size", 2, compilationUnit.getCommentList().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 */
+	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);
+		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);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(source);
+		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a type declaration", result2.getNodeType() == ASTNode.TYPE_DECLARATION);
+		TypeDeclaration typeDeclaration = (TypeDeclaration) result2;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue(declaration.subtreeMatch(new ASTMatcher(), bodyDeclaration));
+		ASTNode root = bodyDeclaration.getRoot();
+		assertNotNull("No root", root);
+		assertTrue("not a compilation unit", root.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) root;
+		assertEquals("wrong problem size", 0, compilationUnit.getProblems().length);
+		assertNotNull("No comments", compilationUnit.getCommentList());
+		assertEquals("Wrong size", 3, compilationUnit.getCommentList().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No comments", unit.getCommentList());
+		assertEquals("Wrong size", 2, unit.getCommentList().size());
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertNotNull("No node", node);
+		ASTNode statement = node;
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_STATEMENTS);
+		parser.setSource(source);
+		parser.setSourceRange(statement.getStartPosition(), statement.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a block", result2.getNodeType() == ASTNode.BLOCK);
+		Block block = (Block) result2;
+		List statements = block.statements();
+		assertEquals("wrong size", 1, statements.size());
+		Statement statement2 = (Statement) statements.get(0);
+		assertTrue(statement.subtreeMatch(new ASTMatcher(), statement2));
+		ASTNode root = statement2.getRoot();
+		assertNotNull("No root", root);
+		assertTrue("not a compilation unit", root.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) root;
+		assertEquals("wrong problem size", 0, compilationUnit.getProblems().length);
+		assertNotNull("No comments", compilationUnit.getCommentList());
+		assertEquals("Wrong size", 1, compilationUnit.getCommentList().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		assertNotNull("No comments", unit.getCommentList());
+		assertEquals("Wrong size", 2, unit.getCommentList().size());
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a block", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT);
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_EXPRESSION);
+		parser.setSource(source);
+		parser.setSourceRange(expression.getStartPosition(), expression.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a method invocation", result2.getNodeType() == ASTNode.METHOD_INVOCATION);
+		assertTrue(expression.subtreeMatch(new ASTMatcher(), result2));
+		ASTNode root = result2.getRoot();
+		assertNotNull("No root", root);
+		assertTrue("not a compilation unit", root.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) root;
+		assertEquals("wrong problem size", 0, compilationUnit.getProblems().length);
+		assertNotNull("No comments", compilationUnit.getCommentList());
+		assertEquals("Wrong size", 1, compilationUnit.getCommentList().size());
+	}
+	/**
+	 * Ensure an OperationCanceledException is correcly thrown when progress monitor is canceled
+	 * @deprecated using deprecated code
+	 */
+	public void test0521() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0521", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
+		// count the number of time isCanceled() is called when converting this source unit
+		WorkingCopyOwner owner = new WorkingCopyOwner() {};
+		CancelCounter counter = new CancelCounter();
+		ASTParser parser = ASTParser.newParser(AST.JLS2);
+		parser.setSource(sourceUnit);
+		parser.setResolveBindings(true);
+		parser.setWorkingCopyOwner(owner);
+		parser.createAST(counter);
+
+		// throw an OperatonCanceledException at each point isCanceled() is called
+		for (int i = 0; i < counter.count; i++) {
+			boolean gotException = false;
+			try {
+				parser = ASTParser.newParser(AST.JLS2);
+				parser.setSource(sourceUnit);
+				parser.setResolveBindings(true);
+				parser.setWorkingCopyOwner(owner);
+				parser.createAST(new Canceler(i));
+			} catch (OperationCanceledException e) {
+				gotException = true;
+			}
+			assertTrue("Should get an OperationCanceledException (" + i + ")", gotException);
+		}
+
+		// last should not throw an OperationCanceledException
+		parser = ASTParser.newParser(AST.JLS2);
+		parser.setSource(sourceUnit);
+		parser.setResolveBindings(true);
+		parser.setWorkingCopyOwner(owner);
+		parser.createAST(new Canceler(counter.count));
+	}
+
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		assertNotNull(type);
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull(methodBinding);
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 2, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(1);
+		assertNotNull(node2);
+		assertTrue("Not an expression statement", node2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNotNull("No binding", binding); //$NON-NLS-1$
+		assertTrue("wrong type", binding.getKind() == IBinding.VARIABLE); //$NON-NLS-1$
+		IVariableBinding variableBinding = (IVariableBinding) binding;
+		assertEquals("Wrong name", "a", variableBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "clone", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+		IBinding binding2 = simpleName2.resolveBinding();
+		assertNotNull("no binding2", binding2); //$NON-NLS-1$
+		assertTrue("Wrong type", binding2.getKind() == IBinding.METHOD); //$NON-NLS-1$
+		IMethodBinding methodBinding2 = (IMethodBinding) binding2;
+		assertEquals("Wrong name", "clone", methodBinding2.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		assertNotNull(type);
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 1, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 2, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(1);
+		assertNotNull(node2);
+		assertTrue("Not an expression statement", node2.getNodeType() == ASTNode.EXPRESSION_STATEMENT); //$NON-NLS-1$
+		ExpressionStatement expressionStatement = (ExpressionStatement) node2;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("Not a method invocation", expression.getNodeType() == ASTNode.METHOD_INVOCATION); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertTrue("Not a simple name", expression2.getNodeType() == ASTNode.SIMPLE_NAME); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		IBinding binding  = simpleName.resolveBinding();
+		assertNull("No binding", binding); //$NON-NLS-1$
+		SimpleName simpleName2 = methodInvocation.getName();
+		assertEquals("Wrong name", "clone", simpleName2.getIdentifier()); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		assertNotNull(type);
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+	}
+
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		assertNotNull(type);
+		IMethod[] methods = type.getMethods();
+		assertNotNull(methods);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node2;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+		assertNotNull(typeBinding);
+	}
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		assertNotNull(type);
+		IType[] memberTypes = type.getTypes();
+		assertNotNull(memberTypes);
+		assertEquals("wrong size", 1, memberTypes.length);
+		IType memberType = memberTypes[0];
+		IMethod[] methods = memberType.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "test", methodDeclaration.getName().getIdentifier());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node2;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		assertTrue(typeBinding.isAnonymous());
+		assertEquals("Wrong name", "", typeBinding.getName());
+	}
+
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		assertNotNull(type);
+		IMethod[] methods = type.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertEquals("wrong name", "A", methodDeclaration.getName().getIdentifier());
+		assertTrue("Not a constructor", methodDeclaration.isConstructor());
+		IBinding binding = methodDeclaration.getName().resolveBinding();
+		assertNotNull(binding);
+		assertEquals("Wrong type", IBinding.METHOD, binding.getKind());
+		List statements = ((MethodDeclaration) node).getBody().statements();
+		assertEquals("wrong size", 1, statements.size());
+		ASTNode node2 = (ASTNode) statements.get(0);
+		assertNotNull(node2);
+		assertTrue("Not an variable declaration statement", node2.getNodeType() == ASTNode.VARIABLE_DECLARATION_STATEMENT); //$NON-NLS-1$
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) node2;
+		List fragments = statement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue("Not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		ITypeBinding typeBinding = classInstanceCreation.resolveTypeBinding();
+		assertNotNull(typeBinding);
+		assertTrue(typeBinding.isAnonymous());
+		assertEquals("Wrong name", "", typeBinding.getName());
+	}
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		IType[] memberTypes = type.getTypes();
+		assertNotNull(memberTypes);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertEquals("wrong name", "B", typeDeclaration.getName().getIdentifier());
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("Not a method declaration", bodyDeclaration.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size());
+	}
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		IType[] memberTypes = type.getTypes();
+		assertNotNull(memberTypes);
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertEquals("wrong name", "B", typeDeclaration.getName().getIdentifier());
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertTrue("Not a method declaration", bodyDeclaration.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size());
+	}
+
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		IMethod[] methods = type.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 2);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 2, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+	}
+	/**
+	 * 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$
+		assertNotNull(classFile);
+		assertNotNull(classFile.getSource());
+		IType type = classFile.getType();
+		IMethod[] methods = type.getMethods();
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 5);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 2, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 4);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Wrong name", "field", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Wrong name", "i", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 2);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		Initializer initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.NONE, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 3);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.STATIC, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 6);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48292
+	 */
+	public void test0532() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0488", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IInitializer[] initializers = type.getInitializers();
+		assertEquals("wrong size", 2, initializers.length);
+		IInitializer init = initializers[1];
+		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$
+		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);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+
+		ASTNode node = getASTNode((CompilationUnit) result, 0, 5);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Block block = methodDeclaration.getBody();
+		List statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 4);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 0);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Wrong name", "field", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 1);
+		assertTrue("Not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Wrong name", "i", fragment.getName().getIdentifier());
+		assertNotNull("No initializer", expression);
+
+		node = getASTNode((CompilationUnit) result, 0, 2);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		Initializer initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.NONE, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 3);
+		assertTrue("Not an initializer", node.getNodeType() == ASTNode.INITIALIZER); //$NON-NLS-1$
+		initializer = (Initializer) node;
+		assertEquals("Not static", Modifier.STATIC, initializer.getModifiers());
+		block = initializer.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 1, statements.size());
+
+		node = getASTNode((CompilationUnit) result, 0, 6);
+		assertTrue("Not a method declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		methodDeclaration = (MethodDeclaration) node;
+		block = methodDeclaration.getBody();
+		statements = block.statements();
+		assertEquals("Wrong size", 0, statements.size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 * @deprecated using deprecated code
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, 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.JLS2);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(source);
+		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a compilation unit", result2.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result2;
+		assertEquals("wrong problem size", 1, compilationUnit.getProblems().length);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 * @deprecated using deprecated code
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertNotNull("No node", node);
+		assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+		FieldDeclaration declaration = (FieldDeclaration) node;
+		ASTParser parser = ASTParser.newParser(AST.JLS2);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(source);
+		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a compilation unit", result2.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result2;
+		assertEquals("wrong problem size", 1, compilationUnit.getProblems().length);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=48489
+	 * @deprecated using deprecated code
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, 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.JLS2);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(source);
+		parser.setSourceRange(declaration.getStartPosition(), declaration.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a compilation unit", result2.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result2;
+		assertEquals("wrong problem size", 1, compilationUnit.getProblems().length);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=47396
+	 */
+	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);
+		assertNotNull("No compilation unit", result);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
+	 */
+	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);
+		assertNotNull("No compilation unit", result);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
+	 */
+	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);
+		assertNotNull("No compilation unit", result);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=51089
+	 */
+	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);
+		assertNotNull("No compilation unit", result);
+	}
+	/**
+	 * Ensures that an AST can be created during reconcile.
+	 * @deprecated using deprecated code
+	 */
+	public void test0538a() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			sourceUnit.becomeWorkingCopy(null, null);
+			sourceUnit.getBuffer().setContents(
+				"package test0538;\n" +
+				"public class A {\n" +
+				"  int i;\n" +
+				"}"
+			);
+			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
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/*
+	 * Ensures that no AST is created during reconcile if not requested.
+	 */
+	public void test0538b() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			sourceUnit.becomeWorkingCopy(null);
+			sourceUnit.getBuffer().setContents(
+				"package test0538;\n" +
+				"public class A {\n" +
+				"  int i;\n" +
+				"}"
+			);
+			CompilationUnit unit = sourceUnit.reconcile(0, false, null, null);
+			assertNull("Unexpected compilation unit", unit);
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/**
+	 * Ensures that no AST is created during reconcile if consistent.
+	 * @deprecated using deprecated code
+	 */
+	public void test0538c() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			sourceUnit.becomeWorkingCopy(null, null);
+			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
+			assertNull("Unexpected compilation unit", unit);
+			// TODO improve test for AST.JLS8
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/**
+	 * Ensures that bindings are created during reconcile if the problem requestor is active.
+	 * @deprecated using deprecated code
+	 */
+	public void test0538d() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
+			sourceUnit.becomeWorkingCopy(pbRequestor, null);
+			sourceUnit.getBuffer().setContents(
+				"package test0538;\n" +
+				"public class A {\n" +
+				"  Object field;\n" +
+				"}"
+			);
+			// TODO improve test for AST.JLS8
+			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
+			ASTNode node = getASTNode(unit, 0, 0);
+			assertNotNull("No node", node);
+			assertTrue("Not original", isOriginal(node));
+			assertTrue("not a field declaration", node.getNodeType() == ASTNode.FIELD_DECLARATION);
+			FieldDeclaration declaration = (FieldDeclaration) node;
+			Type type = declaration.getType();
+			ITypeBinding typeBinding = type.resolveBinding();
+			assertNotNull("No type binding", typeBinding);
+			assertEquals("Wrong name", "Object", typeBinding.getName());
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/**
+	 * Ensures that bindings are created during reconcile if force problem detection is turned on.
+	 * @deprecated using deprecated code
+	 */
+	public void test0538e() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
+			sourceUnit.becomeWorkingCopy(pbRequestor, null);
+			// TODO improve test for AST.JLS8
+			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
+			ASTNode node = getASTNode(unit, 0);
+			assertNotNull("No node", node);
+			assertTrue("not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION);
+			TypeDeclaration declaration = (TypeDeclaration) node;
+			ITypeBinding typeBinding = declaration.resolveBinding();
+			assertNotNull("No type binding", typeBinding);
+			assertEquals("Wrong name", "A", typeBinding.getName());
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/**
+	 * Ensures that bindings are created during reconcile if force problem detection is turned on.
+	 * Case of a unit containing an anonymous type.
+	 * (regression test for bug 55102 NPE when using ICU.reconcile(GET_AST_TRUE, ...))
+	 * @deprecated using deprecated code
+	 */
+	public void test0538f() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
+			sourceUnit.becomeWorkingCopy(pbRequestor, null);
+			sourceUnit.getBuffer().setContents(
+				"package test0538;\n" +
+				"public class A {\n" +
+				"  void foo() {\n" +
+				"    new Object() {\n" +
+				"      void bar() {\n" +
+				"      }\n" +
+				"    };\n" +
+				"  }\n" +
+				"}"
+			);
+			// TODO improve test for AST.JLS8
+			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
+			ASTNode node = getASTNode(unit, 0);
+			assertNotNull("No node", node);
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/**
+	 * Ensures that bindings are created during reconcile if force problem detection is turned on.
+	 * Case of a unit containing an anonymous type.
+	 * (regression test for bug 55102 NPE when using ICU.reconcile(GET_AST_TRUE, ...))
+	 * @deprecated using deprecated code
+	 */
+	public void test0538g() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor();
+			sourceUnit.becomeWorkingCopy(pbRequestor, null);
+			sourceUnit.getBuffer().setContents(
+				"package test0538;\n" +
+				"public class A {\n" +
+				"  void foo() {\n" +
+				"    new Object() {\n" +
+				"      void bar() {\n" +
+				"      }\n" +
+				"    };\n" +
+				"  }\n" +
+				"}"
+			);
+			sourceUnit.reconcile(ICompilationUnit.NO_AST, false/* don't force pb detection*/, null, null);
+			// TODO improve test for AST.JLS8
+			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, true/*force pb detection*/, null, null);
+			ASTNode node = getASTNode(unit, 0);
+			assertNotNull("No node", node);
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/**
+	 * Ensures that asking for well known type doesn't throw a NPE if the problem requestor is not active.
+	 * (regression test for bug 64750 NPE in Java AST Creation - editing some random file)
+	 * @deprecated using deprecated code
+	 */
+	public void test0538h() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0538", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		try {
+			ReconcilerTests.ProblemRequestor pbRequestor = new ReconcilerTests.ProblemRequestor() {
+                public boolean isActive() {
+                    return false;
+                }
+			};
+			sourceUnit.becomeWorkingCopy(pbRequestor, null);
+			sourceUnit.getBuffer().setContents(
+				"package test0538;\n" +
+				"public class A {\n" +
+				"  Object field;\n" +
+				"}"
+			);
+			// TODO improve test for AST.JLS8
+			CompilationUnit unit = sourceUnit.reconcile(AST.JLS2, false, null, null);
+			assertEquals("Unexpected well known type", null, unit.getAST().resolveWellKnownType("void"));
+		} finally {
+			sourceUnit.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=53477
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 1, 0);
+		assertNotNull("No node", node);
+		assertTrue("not an expression statement", node.getNodeType() == ASTNode.EXPRESSION_STATEMENT);
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertTrue("not a class instance creation", expression.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION);
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		checkSourceRange(classInstanceCreation, "new A(){}.new Inner(){/*x*/}", source);
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		Expression expression2 = classInstanceCreation.getExpression();
+		assertTrue("not a class instance creation", expression2.getNodeType() == ASTNode.CLASS_INSTANCE_CREATION);
+		ClassInstanceCreation classInstanceCreation2 = (ClassInstanceCreation) expression2;
+		AnonymousClassDeclaration anonymousClassDeclaration2 = classInstanceCreation2.getAnonymousClassDeclaration();
+		assertNotNull("No anonymous class declaration", anonymousClassDeclaration2);
+		checkSourceRange(anonymousClassDeclaration2, "{}", source);
+		assertNotNull("No anonymous class declaration", anonymousClassDeclaration);
+		checkSourceRange(anonymousClassDeclaration, "{/*x*/}", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=54431
+	 */
+	public void test0540() {
+		char[] source =
+				("package test0540;\n" +  //$NON-NLS-1$
+				"\n" +  //$NON-NLS-1$
+				"class Test {\n" +  //$NON-NLS-1$
+				"	public void foo(int arg) {\n" +//$NON-NLS-1$
+				"		assert true;\n" +//$NON-NLS-1$
+				"	}\n" +  //$NON-NLS-1$
+				"}").toCharArray(); //$NON-NLS-1$
+		IJavaProject project = getJavaProject("Converter"); //$NON-NLS-1$
+		Map options = project.getOptions(true);
+		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$
+		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;
+		assertEquals("Problems found", 0, compilationUnit.getProblems().length);
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding); //$NON-NLS-1$
+		assertEquals("Wrong name", "Test", typeBinding.getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertEquals("Wrong package", "test0540", typeBinding.getPackage().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+		assertTrue("Not an interface", typeBinding.isClass()); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=56697
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		class Change14FieldAccessASTVisitor extends ASTVisitor {
+			int counter;
+			Change14FieldAccessASTVisitor() {
+				this.counter = 0;
+			}
+			public void endVisit(QualifiedName qualifiedName) {
+				IBinding i_binding = qualifiedName.getQualifier().resolveBinding();
+				ITypeBinding type_binding = qualifiedName.getQualifier().resolveTypeBinding();
+				if (i_binding == null || type_binding == null) {
+					this.counter++;
+				}
+			}
+		}
+		Change14FieldAccessASTVisitor visitor = new Change14FieldAccessASTVisitor();
+		unit.accept(visitor);
+		assertEquals("Missing binding", 0, visitor.counter);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=55004
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "STRING_FIELD", variableBinding.getName());
+		Object constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", "Hello world!", constantValue);
+		Expression initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "\"Hello world!\"", source);
+
+		node = getASTNode(unit, 0, 1);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "BOOLEAN_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", new Boolean(true), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "true", source);
+
+		node = getASTNode(unit, 0, 2);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "BYTE_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", new Byte((byte)1), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "1", source);
+
+		node = getASTNode(unit, 0, 3);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "CHAR_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", new Character('{'), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "\'{\'", source);
+
+		node = getASTNode(unit, 0, 4);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "DOUBLE_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", new Double("3.1415"), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "3.1415", source);
+
+		node = getASTNode(unit, 0, 5);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "FLOAT_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", new Float("3.14159f"), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "3.14159f", source);
+
+		node = getASTNode(unit, 0, 6);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "INT_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", Integer.valueOf("7fffffff", 16), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "Integer.MAX_VALUE", source);
+
+		node = getASTNode(unit, 0, 7);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "LONG_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", new Long("34"), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "34L", source);
+
+		node = getASTNode(unit, 0, 8);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "SHORT_FIELD", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant", constantValue);
+		assertEquals("Wrong value", new Short("130"), constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "130", source);
+
+		node = getASTNode(unit, 0, 9);
+		assertTrue("not a field declaration", node instanceof FieldDeclaration); //$NON-NLS-1$
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		assertEquals("Wrong name", "int_field", variableBinding.getName());
+		constantValue = variableBinding.getConstantValue();
+		assertNull("Got a constant", constantValue);
+		initializer = fragment.getInitializer();
+		assertNotNull("No initializer", initializer);
+		checkSourceRange(initializer, "Integer.MAX_VALUE", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=58436
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		unit.accept(new GetKeyVisitor());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=51500
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		assertTrue("Not an abstract method", (methodDeclaration.getModifiers() & Modifier.ABSTRACT) != 0);
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		assertNotNull("No binding", methodBinding);
+		assertTrue("Not an abstract method binding", (methodBinding.getModifiers() & Modifier.ABSTRACT) != 0);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=59843
+	 */
+	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);
+		CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		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);
+		unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		node = getASTNode(unit, 0, 0);
+		assertEquals("not a method declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		typeDeclaration = (TypeDeclaration) node;
+		typeBinding = typeDeclaration.resolveBinding();
+		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);
+		unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		node = getASTNode(unit, 0, 0);
+		assertEquals("not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		typeDeclaration = (TypeDeclaration) node;
+		typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong key", "Ltest0545/Third$Test;", typeBinding.getKey());
+
+
+		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);
+		unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		node = getASTNode(unit, 0);
+		assertEquals("not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		typeDeclaration = (TypeDeclaration) node;
+		typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong key", "Ltest0545/Test;", typeBinding.getKey());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=59848
+	 */
+	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);
+		final CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 0, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 1, 0, 0);
+		assertEquals("not a variable declaration", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType()); //$NON-NLS-1$
+		VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) node;
+		List fragments = variableDeclarationStatement.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		ITypeBinding typeBinding = variableBinding.getType();
+		assertTrue("An anonymous type binding", !typeBinding.isAnonymous());
+		Expression initializer = fragment.getInitializer();
+		assertEquals("not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, initializer.getNodeType()); //$NON-NLS-1$
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) initializer;
+		AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		ITypeBinding typeBinding2 = anonymousClassDeclaration.resolveBinding();
+		assertTrue("Not an anonymous type binding", typeBinding2.isAnonymous());
+		ITypeBinding typeBinding3 = classInstanceCreation.resolveTypeBinding();
+		assertTrue("Not an anonymous type binding", typeBinding3.isAnonymous());
+		node = getASTNode(unit, 1, 0, 1);
+		assertEquals("not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); //$NON-NLS-1$
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType()); //$NON-NLS-1$
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		assertEquals("not a simple name", ASTNode.SIMPLE_NAME, expression2.getNodeType()); //$NON-NLS-1$
+		SimpleName simpleName = (SimpleName) expression2;
+		ITypeBinding typeBinding4 = simpleName.resolveTypeBinding();
+		assertTrue("An anonymous type binding", !typeBinding4.isAnonymous());
+		Type type = classInstanceCreation.getType();
+		IBinding binding = type.resolveBinding();
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+		ITypeBinding typeBinding5 = (ITypeBinding) binding;
+		assertTrue("An anonymous type binding", !typeBinding5.isAnonymous());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=60078
+	 */
+	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);
+		CompilationUnit unit = (CompilationUnit) result;
+		assertEquals("Wrong number of problems", 1, unit.getProblems().length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, node.getNodeType()); //$NON-NLS-1$
+		TypeDeclarationStatement typeDeclarationStatement = (TypeDeclarationStatement) node;
+		AbstractTypeDeclaration typeDeclaration = typeDeclarationStatement.getDeclaration();
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertEquals("Wrong key", "Ltest0547/A$74$Local;", typeBinding.getKey());
+
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("wrong size", 3, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("not a type declaration statement", ASTNode.TYPE_DECLARATION, bodyDeclaration.getNodeType()); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration2 = (TypeDeclaration) bodyDeclaration;
+
+		typeBinding = typeDeclaration2.resolveBinding();
+		assertEquals("Wrong key", "Ltest0547/A$100$LocalMember;", typeBinding.getKey());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=60581
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48502
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=48502
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=60848
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 1, problems.length); //$NON-NLS-1$
+		IProblem problem = problems[0];
+		assertEquals("wrong end position", source.length - 1, problem.getSourceEnd());
+	}
+
+	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);
+		assertEquals("Got errors", 0, result.getProblems().length);
+		TypeDeclaration declaration = (TypeDeclaration) result.types().get(0);
+		Block body = declaration.getMethods()[0].getBody();
+		ExpressionStatement expr = (ExpressionStatement) body.statements().get(0);
+		MethodInvocation invocation = (MethodInvocation) expr.getExpression();
+		InfixExpression node = (InfixExpression) invocation.arguments().get(0);
+		ITypeBinding typeBinding = node.resolveTypeBinding();
+		assertEquals("wrong type", "java.lang.String", typeBinding.getQualifiedName());
+		checkSourceRange(node, "\"a\" + \"a\" + \"a\"", source);
+		List extendedOperands = node.extendedOperands();
+		assertEquals("Wrong size", 1, extendedOperands.size());
+		Expression leftOperand = node.getLeftOperand();
+		checkSourceRange(leftOperand, "\"a\"", source);
+		typeBinding = leftOperand.resolveTypeBinding();
+		assertEquals("wrong type", "java.lang.String", typeBinding.getQualifiedName());
+		Expression rightOperand = node.getRightOperand();
+		checkSourceRange(rightOperand, "\"a\"", source);
+		typeBinding = rightOperand.resolveTypeBinding();
+		assertEquals("wrong type", "java.lang.String", typeBinding.getQualifiedName());
+		Expression expression = (Expression) extendedOperands.get(0);
+		checkSourceRange(expression, "\"a\"", source);
+		typeBinding = expression.resolveTypeBinding();
+		assertEquals("wrong type", "java.lang.String", typeBinding.getQualifiedName());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		assertNotNull("No binding", variableBinding);
+		Object constantValue = variableBinding.getConstantValue();
+		assertNull("Got a constant value", constantValue);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		checkSourceRange(expression2, "A", source);
+		ITypeBinding typeBinding = expression2.resolveTypeBinding();
+		assertEquals("wrong type", "test0554.A", typeBinding.getQualifiedName());
+		IVariableBinding[] fields = typeBinding.getDeclaredFields();
+		assertEquals("Wrong size", 1, fields.length);
+		IVariableBinding variableBinding = fields[0];
+		Object constantValue = variableBinding.getConstantValue();
+		assertNotNull("Missing constant", constantValue);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=61946
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertNotNull("No expression", expression);
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, expression.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) expression;
+		Name name = qualifiedName.getQualifier();
+		checkSourceRange(name, "A", source);
+		ITypeBinding typeBinding = name.resolveTypeBinding();
+		assertEquals("wrong type", "test0555.A", typeBinding.getQualifiedName());
+		IVariableBinding[] fields = typeBinding.getDeclaredFields();
+		assertEquals("Wrong size", 1, fields.length);
+		IVariableBinding variableBinding = fields[0];
+		Object constantValue = variableBinding.getConstantValue();
+		assertNotNull("No constant value", constantValue);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=62463
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		checkSourceRange(expression2, "(aa.bar())", source);
+		SimpleName simpleName = methodInvocation.getName();
+		checkSourceRange(simpleName, "size", source);
+		checkSourceRange(expression, "(aa.bar()).size()", source);
+		checkSourceRange(expressionStatement, "(aa.bar()).size();", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=62463
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertEquals("Not an method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		Expression expression2 = methodInvocation.getExpression();
+		checkSourceRange(expression2, "(aa.bar())", source);
+		SimpleName simpleName = methodInvocation.getName();
+		checkSourceRange(simpleName, "get", source);
+		checkSourceRange(expression, "(aa.bar()).get(0)", source);
+		checkSourceRange(expressionStatement, "(aa.bar()).get(0);", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65090
+	 * @deprecated using deprecated code
+	 */
+	public void test0558() {
+		String src = "\tSystem.out.println(\"Hello\");\n\tSystem.out.println(\"World\");\n";
+		char[] source = src.toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS2);
+		parser.setKind (ASTParser.K_STATEMENTS);
+		parser.setSource (source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Wrong type", ASTNode.BLOCK, result.getNodeType());
+		Block block = (Block) result;
+		List statements = block.statements();
+		assertNotNull("No statements", statements);
+		assertEquals("Wrong size", 2, statements.size());
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Wrong type", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		assertEquals("Wrong type", ASTNode.PARENTHESIZED_EXPRESSION, expression3.getNodeType());
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression3;
+		Expression expression4 = parenthesizedExpression.getExpression();
+		assertEquals("Wrong type", ASTNode.STRING_LITERAL, expression4.getNodeType());
+		checkSourceRange(expression4, "\" \"", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Wrong type", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		assertEquals("Wrong type", ASTNode.PARENTHESIZED_EXPRESSION, expression3.getNodeType());
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression3;
+		Expression expression4 = parenthesizedExpression.getExpression();
+		assertEquals("Wrong type", ASTNode.STRING_LITERAL, expression4.getNodeType());
+		checkSourceRange(expression4, "\" \"", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Wrong type", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		assertEquals("Wrong type", ASTNode.PARENTHESIZED_EXPRESSION, expression3.getNodeType());
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression3;
+		Expression expression4 = parenthesizedExpression.getExpression();
+		assertEquals("Wrong type", ASTNode.STRING_LITERAL, expression4.getNodeType());
+		checkSourceRange(expression4, "\" \"", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Wrong type", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		assertEquals("Wrong type", ASTNode.PARENTHESIZED_EXPRESSION, expression3.getNodeType());
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression3;
+		Expression expression4 = parenthesizedExpression.getExpression();
+		assertEquals("Wrong type", ASTNode.STRING_LITERAL, expression4.getNodeType());
+		checkSourceRange(expression4, "\" \"", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Wrong type", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		assertEquals("Wrong type", ASTNode.PARENTHESIZED_EXPRESSION, expression3.getNodeType());
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression3;
+		Expression expression4 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression4, "new String()", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Wrong type", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		assertEquals("Wrong type", ASTNode.PARENTHESIZED_EXPRESSION, expression3.getNodeType());
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression3;
+		Expression expression4 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression4, "new String()", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=65562
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Wrong type", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Wrong type", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+		InfixExpression infixExpression = (InfixExpression) expression;
+		Expression expression2 = infixExpression.getLeftOperand();
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression2.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression2;
+		Expression expression3 = methodInvocation.getExpression();
+		assertEquals("Wrong type", ASTNode.PARENTHESIZED_EXPRESSION, expression3.getNodeType());
+		ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression3;
+		Expression expression4 = parenthesizedExpression.getExpression();
+		checkSourceRange(expression4, "(/**/ String /**/) new String()", source);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=69349
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		assertEquals("Wrong character", '}', source[node.getStartPosition() + node.getLength() - 1]);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=69349
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		assertEquals("Wrong character", '}', source[node.getStartPosition() + node.getLength() - 1]);
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=70398
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=70398
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+	}
+
+	/**
+	 * No binding when there is no unit name set
+	 */
+	public void test0571() throws JavaModelException {
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		String source = "public class A {public boolean foo() {}}";
+		parser.setSource(source.toCharArray());
+		parser.setProject(getJavaProject("Converter"));
+		// no unit name parser.setUnitName("A");
+		parser.setResolveBindings(true);
+		ASTNode node = parser.createAST(null);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) node;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+	}
+
+	/**
+	 * No binding when there is no unit name set
+	 */
+	public void test0572() throws JavaModelException {
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		String source = "public class A {public boolean foo() {}}";
+		parser.setSource(source.toCharArray());
+		parser.setProject(getJavaProject("Converter"));
+		parser.setUnitName("A.java");
+		parser.setResolveBindings(true);
+		ASTNode node = parser.createAST(null);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) node;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 1, problems.length); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77968
+	 */
+	public void test0573() throws JavaModelException {
+		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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		ASTNode node = getASTNode(unit, 0, 0, 0);
+		assertNotNull("Missing node", node);
+		assertEquals("Wrong type", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		Expression expression = expressionStatement.getExpression();
+		assertNotNull("Missing node", expression);
+		assertEquals("Wrong type", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 1, problems.length); //$NON-NLS-1$
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78735
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 0);
+		assertNotNull("Missing node", node);
+		assertEquals("Wrong type", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding = fragment.resolveBinding();
+		node = getASTNode(unit, 0, 1, 0);
+		assertNotNull("Missing node", node);
+		assertEquals("Wrong type", ASTNode.FIELD_DECLARATION, node.getNodeType());
+		fieldDeclaration = (FieldDeclaration) node;
+		fragments = fieldDeclaration.fragments();
+		assertEquals("Wrong size", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		IVariableBinding variableBinding2 = fragment.resolveBinding();
+		assertFalse("are Equals", variableBinding.isEqualTo(variableBinding2));
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78735
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		final IProblem[] problems = unit.getProblems();
+		assertEquals("Wrong number of problems", 0, problems.length); //$NON-NLS-1$
+		ASTNode node = getASTNode(unit, 0, 2);
+		assertNotNull("Missing node", node);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+		node = getASTNode(unit, 0, 1, 1);
+		assertNotNull("Missing node", node);
+		assertEquals("Wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+		assertFalse("are Equals", methodBinding.isEqualTo(methodBinding2));
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=78740
+	 * @deprecated marked deprecated to suppress JDOM-related deprecation warnings
+	 */
+	public void test0576() throws JavaModelException {
+		org.eclipse.jdt.core.jdom.DOMFactory factory = new org.eclipse.jdt.core.jdom.DOMFactory();
+		org.eclipse.jdt.core.jdom.IDOMCompilationUnit domCompilationUnit = factory.createCompilationUnit(
+				"package x; /** @model */ interface X  {}", "NAME");
+		org.eclipse.jdt.core.jdom.IDOMType domType = (org.eclipse.jdt.core.jdom.IDOMType) domCompilationUnit.getFirstChild().getNextNode();
+		assertTrue("Not an interface", Flags.isInterface(domType.getFlags()));
+		domType.getComment();
+		assertTrue("Not an interface", Flags.isInterface(domType.getFlags()));
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77645
+	 */
+	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);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) result;
+		assertProblemsSize(unit, 0);
+		unit.accept(new ASTVisitor() {
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.SingleVariableDeclaration)
+			 */
+			public boolean visit(SingleVariableDeclaration node) {
+				IVariableBinding binding = node.resolveBinding();
+				assertNotNull("No method", binding.getDeclaringMethod());
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.VariableDeclarationFragment)
+			 */
+			public boolean visit(VariableDeclarationFragment node) {
+				IVariableBinding binding = node.resolveBinding();
+				ASTNode parent = node.getParent();
+				if (parent != null && binding != null) {
+					final IMethodBinding declaringMethod = binding.getDeclaringMethod();
+					final String variableBindingName = binding.getName();
+					switch(parent.getNodeType()) {
+						case ASTNode.FIELD_DECLARATION :
+							assertNull("Got a method", declaringMethod);
+							break;
+						default :
+							if (variableBindingName.equals("var1")
+									|| variableBindingName.equals("var2")) {
+								assertNull("Got a method", declaringMethod);
+							} else {
+								assertNotNull("No method", declaringMethod);
+								String methodName = declaringMethod.getName();
+								if (variableBindingName.equals("var4")) {
+									assertEquals("Wrong method", "foo", methodName);
+								} else if (variableBindingName.equals("var5")) {
+									assertEquals("Wrong method", "foo2", methodName);
+								} else if (variableBindingName.equals("var7")) {
+									assertEquals("Wrong method", "foo3", methodName);
+								} else if (variableBindingName.equals("var8")) {
+									assertEquals("Wrong method", "X", methodName);
+								} else if (variableBindingName.equals("var9")) {
+									assertEquals("Wrong method", "bar3", methodName);
+								} else if (variableBindingName.equals("var10")) {
+									assertEquals("Wrong method", "bar3", methodName);
+								} else if (variableBindingName.equals("var11")) {
+									assertEquals("Wrong method", "X", methodName);
+								}
+							}
+					}
+				}
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.FieldAccess)
+			 */
+			public boolean visit(FieldAccess node) {
+				IVariableBinding binding = node.resolveFieldBinding();
+				assertNull("No method", binding.getDeclaringMethod());
+				return false;
+			}
+			/* (non-Javadoc)
+			 * @see org.eclipse.jdt.core.dom.ASTVisitor#endVisit(org.eclipse.jdt.core.dom.SuperFieldAccess)
+			 */
+			public boolean visit(SuperFieldAccess node) {
+				IVariableBinding binding = node.resolveFieldBinding();
+				assertNull("No method", binding.getDeclaringMethod());
+				return false;
+			}
+		});
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=77984
+	 * @deprecated
+	 */
+	public void test0579() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0579", "ParserTask.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = AST.parseCompilationUnit(sourceUnit, true);
+		assertEquals("not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertEquals("not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		assertEquals("Wrong number of body declarations", 3, typeDeclaration.bodyDeclarations().size());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=79953
+	 */
+	public void test0580() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/p/X.java", true/*resolve*/);
+			String source = "package p;\n" +
+			"public class X {\n" +
+			"	d String[][]tab;\n" +
+			"}";
+			ASTNode node = buildAST(
+				source,
+				workingCopy,
+				false);
+			assertEquals("wrong type", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			node = getASTNode(compilationUnit, 0, 0);
+			assertEquals("wrong type", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			checkSourceRange(fieldDeclaration, "d String[][]", source.toCharArray(), true/*expectMalformed*/);
+			Type type = fieldDeclaration.getType();
+			assertTrue("Not a simple type", type.isSimpleType());
+			List fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			assertEquals("Wrong extended dimensions", 2, fragment.getExtraDimensions());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=80041
+	 */
+	public void test0581() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/p/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				"package p;\n" +
+				"public class X {\n" +
+				"    void m(Object obj) {}\n" +
+				"    void foo(Object obj) {}\n" +
+				"}",
+				workingCopy);
+			assertEquals("wrong type", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			node = getASTNode(compilationUnit, 0, 0);
+			assertEquals("wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+			List parameters = methodDeclaration.parameters();
+			SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+			IVariableBinding variableBinding = variableDeclaration.resolveBinding();
+			node = getASTNode(compilationUnit, 0, 1);
+			assertEquals("wrong type", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			methodDeclaration = (MethodDeclaration) node;
+			parameters = methodDeclaration.parameters();
+			variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+			IVariableBinding variableBinding2 = variableDeclaration.resolveBinding();
+			assertFalse("Bindings are equal", variableBinding.isEqualTo(variableBinding2));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=80338
+	 */
+	// TODO (jerome) remove this test as it has nothing to do on ASTConverterTest and it is a dup of ExistenceTests#testMethodWithInvalidParameter()
+	public void test0582() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0582", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		IMethod[] methods = type.getMethods();
+		assertEquals("wrong size", 1, methods.length);
+		IMethod method = methods[0];
+		assertEquals("wrong number", 1, method.getNumberOfParameters());
+		assertEquals("wrong signature", "([[I)[[[[[I", method.getSignature());
+		assertEquals("wrong return type", "[[[[[I", method.getReturnType());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0583() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\000\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\000', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0584() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\u0020\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", 32, literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0585() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\b\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\b', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0586() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\t\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\t', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0587() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\n\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\n', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0588() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\f\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\f', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0589() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\r\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\r', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0590() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\\"\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\"', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0591() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\'\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\'', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0592() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\\\\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\\', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0593() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\077\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a character literal", ASTNode.CHARACTER_LITERAL, expression.getNodeType());
+			CharacterLiteral literal = (CharacterLiteral) expression;
+			assertEquals("Wrong character", '\077', literal.charValue());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82616
+	 */
+	public void test0594() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	private char nextChar() {\n" +
+				"		return \'\\777\';\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 1, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+			assertTrue("not malformed", isMalformed(methodDeclaration));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=82985
+	 */
+	public void test0595() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0595", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode result = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(result);
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		assertProblemsSize(compilationUnit, 0);
+		List imports = compilationUnit.imports();
+		assertEquals("Wrong size", 1, imports.size());
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		IBinding binding = importDeclaration.resolveBinding();
+		assertNotNull("No binding", binding);
+		assertEquals("Wrong type", IBinding.TYPE, binding.getKind());
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=83098
+	 */
+	public void test0596() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void m(String[] args) {\n" +
+				"		for (int i= 0; i < args.length; i++) {\n" +
+				"			String string= args[i];\n" +
+				"		}\n" +
+				"		for (int i= 0; i < args.length; i++) {\n" +
+				"			String string= args[i];\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertEquals("Got problems", 0, compilationUnit.getProblems().length);
+			node = getASTNode(compilationUnit, 0, 0, 0);
+			assertEquals("Not a for statement", ASTNode.FOR_STATEMENT, node.getNodeType());
+			ForStatement forStatement = (ForStatement) node;
+			Statement action = forStatement.getBody();
+			assertEquals("Not a block", ASTNode.BLOCK, action.getNodeType());
+			Block block = (Block) action;
+			List statements = block.statements();
+			assertEquals("Wrong size", 1, statements.size());
+			Statement statement = (Statement) statements.get(0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement.getNodeType());
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement;
+			List fragments = variableDeclarationStatement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+
+			node = getASTNode(compilationUnit, 0, 0, 1);
+			assertEquals("Not a for statement", ASTNode.FOR_STATEMENT, node.getNodeType());
+			forStatement = (ForStatement) node;
+			action = forStatement.getBody();
+			assertEquals("Not a block", ASTNode.BLOCK, action.getNodeType());
+			block = (Block) action;
+			statements = block.statements();
+			assertEquals("Wrong size", 1, statements.size());
+			statement = (Statement) statements.get(0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement.getNodeType());
+			variableDeclarationStatement = (VariableDeclarationStatement) statement;
+			fragments = variableDeclarationStatement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding2 = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding2);
+
+			assertFalse("Bindings are equals", variableBinding.isEqualTo(variableBinding2));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=83210
+	 */
+	public void test0597() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0597", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Not an if statement", ASTNode.IF_STATEMENT, node.getNodeType());
+		IfStatement ifStatement = (IfStatement) node;
+		Expression expression = ifStatement.getExpression();
+		assertEquals("Not an instanceof expression", ASTNode.INSTANCEOF_EXPRESSION, expression.getNodeType());
+		InstanceofExpression instanceofExpression = (InstanceofExpression) expression;
+		Type type = instanceofExpression.getRightOperand();
+		assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType());
+		SimpleType simpleType = (SimpleType) type;
+		Name name = simpleType.getName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		SimpleName simpleName = (SimpleName) name;
+		ITypeBinding typeBinding = simpleName.resolveTypeBinding();
+
+		List imports = compilationUnit.imports();
+		assertEquals("Wrong size", 2, imports.size());
+		ImportDeclaration importDeclaration = (ImportDeclaration) imports.get(0);
+		name = importDeclaration.getName();
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		QualifiedName qualifiedName = (QualifiedName) name;
+		simpleName = qualifiedName.getName();
+		ITypeBinding typeBinding2 = simpleName.resolveTypeBinding();
+
+		assertTrue("not identical", typeBinding == typeBinding2);
+		assertTrue("not identical", typeBinding.isEqualTo(typeBinding2));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=84778
+	 */
+	public void test0598() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	int m(int i) {\n" +
+				"		return /*start*/1 + 2 + ++i/*end*/;\n" +
+				"	}\n" +
+				"}\n";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, node.getNodeType());
+			assertEquals("Wrong debug string", "1 + 2 + ++i", node.toString());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=86541
+	 */
+	public void test0599() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0599", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		String expectedResult =
+			"The hierarchy of the type X is inconsistent\n" +
+			"The type test0599.Zork2 cannot be resolved. It is indirectly referenced from required .class files";
+		assertProblemsSize(compilationUnit, 2, expectedResult);
+		compilationUnit.accept(new ASTVisitor() {
+			public void endVisit(MethodDeclaration methodDeclaration) {
+				Block body = methodDeclaration.getBody();
+				assertNotNull("No body", body);
+				assertTrue("No statements", body.statements().size() != 0);
+			}
+		});
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=87777
+	 */
+	public void test0600() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0600", "Try.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		Expression expression = statement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) expression;
+		IMethodBinding methodBinding = methodInvocation.resolveMethodBinding().getMethodDeclaration();
+
+		sourceUnit = getCompilationUnit("Converter" , "src", "test0600", "C.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		IMethodBinding methodBinding2 = methodDeclaration.resolveBinding().getMethodDeclaration();
+
+		assertTrue("Not equals", methodBinding.isEqualTo(methodBinding2));
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=89014
+	 */
+	public void test0601() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	Runnable one= new Runnable(){\n" +
+				"		public void run() {\n" +
+				"		}\n" +
+				"	};\n" +
+				"	Runnable two= new Runnable(){\n" +
+				"		public void run() {\n" +
+				"		}\n" +
+				"	};\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			node = getASTNode(compilationUnit, 0, 0);
+			assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			List fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression expression = fragment.getInitializer();
+			assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+			ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+			AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+			assertNotNull("No anonymous", anonymousClassDeclaration);
+			List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+			assertEquals("Wrong size", 1, bodyDeclarations.size());
+			BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+			IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+
+			node = getASTNode(compilationUnit, 0, 1);
+			assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			fieldDeclaration = (FieldDeclaration) node;
+			fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			expression = fragment.getInitializer();
+			assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+			classInstanceCreation = (ClassInstanceCreation) expression;
+			anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+			assertNotNull("No anonymous", anonymousClassDeclaration);
+			bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+			assertEquals("Wrong size", 1, bodyDeclarations.size());
+			bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+			methodDeclaration = (MethodDeclaration) bodyDeclaration;
+			IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+
+			assertFalse("Bindings are equals", methodBinding.isEqualTo(methodBinding2));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=70526
+	 */
+	public void test0602() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0602", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		compilationUnit.accept(new ASTVisitor() {
+			public boolean visit(StringLiteral stringLiteral) {
+				assertTrue("Wrong start position", stringLiteral.getStartPosition() != 0);
+				assertTrue("Wrong length", stringLiteral.getLength() != -1);
+				return false;
+			}
+		});
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91098
+	 */
+	public void test0603() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0603", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		assertProblemsSize(compilationUnit, 0);
+		compilationUnit.accept(new ASTVisitor() {
+			public boolean visit(SimpleType type) {
+				assertFalse("start cannot be -1", type.getStartPosition() == -1);
+				assertFalse("length cannot be 0", type.getLength() == 0);
+				return false;
+			}
+			public boolean visit(ArrayType type) {
+				assertFalse("start cannot be -1", type.getStartPosition() == -1);
+				assertFalse("length cannot be 0", type.getLength() == 0);
+				return true;
+			}
+		});
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=91098
+	 */
+	public void test0604() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0604", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		assertProblemsSize(compilationUnit, 0);
+		compilationUnit.accept(new ASTVisitor() {
+			public boolean visit(SimpleType type) {
+				assertFalse("start cannot be -1", type.getStartPosition() == -1);
+				assertFalse("length cannot be 0", type.getLength() == 0);
+				return false;
+			}
+			public boolean visit(ArrayType type) {
+				assertFalse("start cannot be -1", type.getStartPosition() == -1);
+				assertFalse("length cannot be 0", type.getLength() == 0);
+				return true;
+			}
+		});
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=92059
+	 * check resolvedType binding from variable ref (of array type)
+	 */
+	public void test0605() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0605", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ASTNode node = runJLS8Conversion(sourceUnit, true, false);
+		assertNotNull(node);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0, 0, 1);
+		assertEquals("Not a variable declaration", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		VariableDeclarationStatement varDecl = (VariableDeclarationStatement) node;
+		List fragments = varDecl.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Expression expression = fragment.getInitializer();
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, expression.getNodeType());
+		IBinding arraylength = ((QualifiedName)expression).resolveBinding();
+		IJavaElement element = arraylength.getJavaElement();
+		assertNull("Shouldn't be binding for arraylength", element);
+		Name name = ((QualifiedName) expression).getQualifier();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		ITypeBinding binding = name.resolveTypeBinding();
+		assertNotNull("No binding", binding);
+		assertTrue("No array", binding.isArray());
+
+		node = getASTNode(compilationUnit, 0, 0, 4);
+		assertEquals("Not a variable declaration", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		varDecl = (VariableDeclarationStatement) node;
+		fragments = varDecl.fragments();
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, expression.getNodeType());
+		name = ((QualifiedName) expression).getQualifier();
+		assertEquals("Not a simple name", ASTNode.QUALIFIED_NAME, name.getNodeType());
+		name = ((QualifiedName) name).getName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		ITypeBinding binding2 = name.resolveTypeBinding();
+		assertNotNull("No binding", binding2);
+		assertTrue("No array", binding2.isArray());
+
+		assertEquals("Not same binding", binding, binding2);
+
+		node = getASTNode(compilationUnit, 0, 0, 2);
+		assertEquals("Not a variable declaration", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+		varDecl = (VariableDeclarationStatement) node;
+		fragments = varDecl.fragments();
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		expression = fragment.getInitializer();
+		assertEquals("Not a qualified name", ASTNode.FIELD_ACCESS, expression.getNodeType());
+		expression = ((FieldAccess) expression).getExpression();
+		assertEquals("Not a simple name", ASTNode.FIELD_ACCESS, expression.getNodeType());
+		name = ((FieldAccess) expression).getName();
+		assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, name.getNodeType());
+		ITypeBinding binding3 = name.resolveTypeBinding();
+		assertNotNull("No binding", binding3);
+		assertTrue("No array", binding3.isArray());
+
+		assertEquals("Not same binding", binding, binding3);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=89014
+	 */
+	public void test0606() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    int i = 0;\n" +
+				"    i += 1;\n" +
+				"    String s = \"\";\n" +
+				"    s += \"hello world\";\n" +
+				"    System.out.println(i+s);\n" +
+				"  }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			node = getASTNode(compilationUnit, 0, 0, 1);
+			assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+			Expression expression = ((ExpressionStatement) node).getExpression();
+			assertEquals("Not an assignment", ASTNode.ASSIGNMENT, expression.getNodeType());
+			Assignment assignment = (Assignment) expression;
+			assertEquals("Wrong operator", Assignment.Operator.PLUS_ASSIGN, assignment.getOperator());
+			ITypeBinding typeBinding = assignment.resolveTypeBinding();
+			assertNotNull("No binding", typeBinding);
+			assertEquals("Wrong type", "int", typeBinding.getQualifiedName());
+
+			node = getASTNode(compilationUnit, 0, 0, 3);
+			assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+			expression = ((ExpressionStatement) node).getExpression();
+			assertEquals("Not an assignment", ASTNode.ASSIGNMENT, expression.getNodeType());
+			assignment = (Assignment) expression;
+			assertEquals("Wrong operator", Assignment.Operator.PLUS_ASSIGN, assignment.getOperator());
+			typeBinding = assignment.resolveTypeBinding();
+			assertNotNull("No binding", typeBinding);
+			assertEquals("Wrong type", "java.lang.String", typeBinding.getQualifiedName());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=95262
+	 */
+	public void test0607() throws JavaModelException {
+		final char[] source = "private static Category[] values = new Category[]{v1, v2, v3};".toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertNotNull("cannot be null", root);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=96698
+	 */
+	public void test0608() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    for (int /*start*/i = 0/*end*/; i < args.length; i++) {\n" +
+				"		System.out.println(args[i]);\n" +
+				"	 }\n" +
+				"  }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a variable declaration fragment", ASTNode.VARIABLE_DECLARATION_FRAGMENT, node.getNodeType());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) node;
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			IJavaElement javaElement = variableBinding.getJavaElement();
+			assertNotNull("No java element", javaElement);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=96698
+	 */
+	public void test0609() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"  public static void main(String[] args) {\n" +
+				"    int /*start*/i = 0/*end*/;\n" +
+				"	 System.out.println(i);\n" +
+				"  }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a variable declaration fragment", ASTNode.VARIABLE_DECLARATION_FRAGMENT, node.getNodeType());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) node;
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			IJavaElement javaElement = variableBinding.getJavaElement();
+			assertNotNull("No java element", javaElement);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=98088
+	 */
+	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);
+		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");
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=96698
+	 */
+	public void test0611() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"abstract class SearchPattern {\n" +
+				"}\n" +
+				"class InternalSearchPattern extends SearchPattern {\n" +
+				"	boolean mustResolve;\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	public static final int POSSIBLE_MATCH = 0;\n" +
+				"	public static final int ACCURATE_MATCH = 1;\n" +
+				"	\n" +
+				"	public void foo(SearchPattern pattern) {\n" +
+				"		int declarationLevel = ((InternalSearchPattern) pattern).mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n" +
+				"		System.out.println(declarationLevel);\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 2, 2, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression expression = fragment.getInitializer();
+			checkSourceRange(expression, "((InternalSearchPattern) pattern).mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	public void test0612() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"    void foo(boolean[]value) {\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+			List parameters = methodDeclaration.parameters();
+			assertEquals("Wrong size", 1, parameters.size());
+			SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+			checkSourceRange(variableDeclaration, "boolean[]value", contents);
+			Type type = variableDeclaration.getType();
+			checkSourceRange(type, "boolean[]", contents);
+			assertTrue("Not an array type", type.isArrayType());
+			ArrayType arrayType = (ArrayType) type;
+			Type componentType = componentType(arrayType);
+			assertTrue("Not a primitive type", componentType.isPrimitiveType());
+			PrimitiveType primitiveType = (PrimitiveType) componentType;
+			assertEquals("Not boolean", PrimitiveType.BOOLEAN, primitiveType.getPrimitiveTypeCode());
+			checkSourceRange(primitiveType, "boolean", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	public void test0613() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void foo(boolean b) {\n" +
+				"		Zork z = null;\n" +
+				"		if (b) {\n" +
+				"			System.out.println(z);\n" +
+				"		}\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "Zork cannot be resolved to a type");
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding binding = fragment.resolveBinding();
+			assertNotNull("No binding", binding);
+			assertEquals("LX;.foo(Z)V#z", binding.getKey());
+
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not an if statement", ASTNode.IF_STATEMENT, node.getNodeType());
+			IfStatement ifStatement = (IfStatement) node;
+			Statement statement2 = ifStatement.getThenStatement();
+			assertEquals("Not a block", ASTNode.BLOCK, statement2.getNodeType());
+			Block block = (Block) statement2;
+			List statements = block.statements();
+			assertEquals("Wrong size", 1, statements.size());
+
+			Statement statement3 = (Statement) statements.get(0);
+			assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, statement3.getNodeType());
+			ExpressionStatement expressionStatement = (ExpressionStatement) statement3;
+			Expression expression = expressionStatement.getExpression();
+			assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+			MethodInvocation methodInvocation = (MethodInvocation) expression;
+			List arguments = methodInvocation.arguments();
+			assertEquals("Wrong size", 1, arguments.size());
+			Expression expression2 = (Expression) arguments.get(0);
+			ITypeBinding typeBinding = expression2.resolveTypeBinding();
+			assertNotNull("No binding", typeBinding);
+			assertEquals("LX;.foo(Z)V#z", binding.getKey());
+			assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, expression2.getNodeType());
+			SimpleName simpleName = (SimpleName) expression2;
+			IBinding binding2 = simpleName.resolveBinding();
+			assertNotNull("Got a binding", binding2);
+			assertEquals("LX;.foo(Z)V#z", binding2.getKey());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=105192
+	public void test0614() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+		    String contents =
+		    	"class T { void m() { for (i=0, j=0; i<10; i++, j++) ; }}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			final String expectedOutput = "class T {\n" +
+					"  void m(){\n" +
+					"    for (i=0, j=0; i < 10; i++, j++)     ;\n" +
+					"  }\n" +
+					"}\n";
+			assertEquals("Wrong output", Util.convertToIndependantLineDelimiter(expectedOutput), Util.convertToIndependantLineDelimiter(node.toString()));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=100041
+	 */
+	public void test0615() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"class X {\n" +
+				"	static Object object;\n" +
+				"	static void foo() {\n" +
+				"		/**\n" +
+				"		 * javadoc comment.\n" +
+				"		 */\n" +
+				"		if (object instanceof String) {\n" +
+				"			final String clr = null;\n" +
+				"		}\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 1, 0);
+			assertNotNull("No node", node);
+			assertEquals("Not an if statement", ASTNode.IF_STATEMENT, node.getNodeType());
+			IfStatement ifStatement = (IfStatement) node;
+			String expectedSource = "if (object instanceof String) {\n" +
+			"			final String clr = null;\n" +
+			"		}";
+			checkSourceRange(ifStatement, expectedSource, contents);
+			Statement statement = ifStatement.getThenStatement();
+			assertNotNull("No then statement", statement);
+			assertEquals("not a block", ASTNode.BLOCK, statement.getNodeType());
+			Block block = (Block) statement;
+			expectedSource = "{\n" +
+			"			final String clr = null;\n" +
+			"		}";
+			checkSourceRange(block, expectedSource, contents);
+			List statements = block.statements();
+			assertEquals("Wrong size", 1, statements.size());
+			Statement statement2 = (Statement) statements.get(0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement2.getNodeType());
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement2;
+			checkSourceRange(variableDeclarationStatement, "final String clr = null;", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=109333
+	 */
+	public void test0616() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"class X {\n" +
+				"	boolean val = true && false && true && false && true;\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents.toCharArray());
+			ASTNode node = runConversion(AST.JLS8, workingCopy, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "Dead code");
+			node = getASTNode(unit, 0, 0);
+			assertNotNull("No node", node);
+			assertEquals("Not a field declaration ", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			final FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			final List fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			final Expression initializer = fragment.getInitializer();
+			assertNotNull("No initializer", initializer);
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, initializer.getNodeType());
+			InfixExpression infixExpression = (InfixExpression) initializer;
+			final List extendedOperands = infixExpression.extendedOperands();
+			assertEquals("Wrong size", 3, extendedOperands.size());
+			assertEquals("Wrong operator", InfixExpression.Operator.CONDITIONAL_AND, infixExpression.getOperator());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=109333
+	 */
+	public void test0617() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"class X {\n" +
+				"	boolean val = true || false || true || false || true;\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents.toCharArray());
+			ASTNode node = runConversion(AST.JLS8, workingCopy, true);			
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedOutput = "Dead code";
+			assertProblemsSize(unit, 1, expectedOutput);
+			node = getASTNode(unit, 0, 0);
+			assertNotNull("No node", node);
+			assertEquals("Not a field declaration ", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			final FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			final List fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			final Expression initializer = fragment.getInitializer();
+			assertNotNull("No initializer", initializer);
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, initializer.getNodeType());
+			InfixExpression infixExpression = (InfixExpression) initializer;
+			final List extendedOperands = infixExpression.extendedOperands();
+			assertEquals("Wrong size", 3, extendedOperands.size());
+			assertEquals("Wrong operator", InfixExpression.Operator.CONDITIONAL_OR, infixExpression.getOperator());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=109535
+	 */
+	public void test0618() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	String f = \"\" + \"\" - 1;\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0);
+			assertNotNull("No node", node);
+			assertEquals("Not a field declaration ", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			final FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			final List fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			final Expression initializer = fragment.getInitializer();
+			assertNotNull("No initializer", initializer);
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, initializer.getNodeType());
+			InfixExpression infixExpression = (InfixExpression) initializer;
+			List extendedOperands = infixExpression.extendedOperands();
+			assertEquals("Wrong size", 0, extendedOperands.size());
+			assertEquals("Wrong operator", InfixExpression.Operator.MINUS, infixExpression.getOperator());
+			Expression leftOperand = infixExpression.getLeftOperand();
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, leftOperand.getNodeType());
+			InfixExpression infixExpression2 = (InfixExpression) leftOperand;
+			extendedOperands = infixExpression.extendedOperands();
+			assertEquals("Wrong size", 0, extendedOperands.size());
+			assertEquals("Wrong operator", InfixExpression.Operator.PLUS, infixExpression2.getOperator());
+			assertEquals("Not a string literal", ASTNode.STRING_LITERAL, infixExpression2.getLeftOperand().getNodeType());
+			assertEquals("Not a string literal", ASTNode.STRING_LITERAL, infixExpression2.getRightOperand().getNodeType());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=109646
+	 */
+	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);
+		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);
+		parser.setKind(ASTParser.K_STATEMENTS);
+		parser.setSource(source);
+		parser.setSourceRange(statement.getStartPosition(), statement.getLength());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result2 = parser.createAST(null);
+		assertNotNull("No node", result2);
+		assertTrue("not a block", result2.getNodeType() == ASTNode.BLOCK);
+		Block block = (Block) result2;
+		List statements = block.statements();
+		assertEquals("wrong size", 1, statements.size());
+		Statement statement2 = (Statement) statements.get(0);
+		assertEquals("Statement is not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement2.getNodeType());
+		VariableDeclarationStatement declarationStatement = (VariableDeclarationStatement) statement2;
+		assertEquals("Wrong number of fragments", 4, declarationStatement.fragments().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=109940
+	 */
+	public void test0620() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println((int) \'\\0\');\n" +
+				"		System.out.println((int) \'\\1\');\n" +
+				"		System.out.println((int) \'\\2\');\n" +
+				"		System.out.println((int) \'\\3\');\n" +
+				"		System.out.println((int) \'\\4\');\n" +
+				"		System.out.println((int) \'\\5\');\n" +
+				"		System.out.println((int) \'\\6\');\n" +
+				"		System.out.println((int) \'\\7\');\n" +
+				"		System.out.println((int) \'\\077\');\n" +
+				"		System.out.println((int) \'\\55\');\n" +
+				"		System.out.println((int) \'\\77\');\n" +
+				"		System.out.println((int) \'\\377\');\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			unit.accept(new ASTVisitor() {
+				public boolean visit(CharacterLiteral characterLiteral) {
+					try {
+						final String escapedValue = characterLiteral.getEscapedValue();
+						final char charValue = characterLiteral.charValue();
+						if (escapedValue.equals("\'\\0\'")) {
+							assertEquals("Wrong value", 0, charValue);
+						} else if (escapedValue.equals("\'\\1\'")) {
+							assertEquals("Wrong value", 1, charValue);
+						} else if (escapedValue.equals("\'\\2\'")) {
+							assertEquals("Wrong value", 2, charValue);
+						} else if (escapedValue.equals("\'\\3\'")) {
+							assertEquals("Wrong value", 3, charValue);
+						} else if (escapedValue.equals("\'\\4\'")) {
+							assertEquals("Wrong value", 4, charValue);
+						} else if (escapedValue.equals("\'\\5\'")) {
+							assertEquals("Wrong value", 5, charValue);
+						} else if (escapedValue.equals("\'\\6\'")) {
+							assertEquals("Wrong value", 6, charValue);
+						} else if (escapedValue.equals("\'\\7\'")) {
+							assertEquals("Wrong value", 7, charValue);
+						} else if (escapedValue.equals("\'\\077\'")) {
+							assertEquals("Wrong value", 63, charValue);
+						} else if (escapedValue.equals("\'\\55\'")) {
+							assertEquals("Wrong value", 45, charValue);
+						} else if (escapedValue.equals("\'\\77\'")) {
+							assertEquals("Wrong value", 63, charValue);
+						} else if (escapedValue.equals("\'\\377\'")) {
+							assertEquals("Wrong value", 255, charValue);
+						} else {
+							assertTrue("Should not get there", false);
+						}
+					} catch(IllegalArgumentException e) {
+						assertTrue("Should not happen", false);
+					}
+					return false;
+				}
+			});
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=109963
+	 */
+	public void test0621() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	public void foo(int y) {\n" +
+				"		switch (y) {\n" +
+				"			case 1:\n" +
+				"				int i,j;\n" +
+				"		}\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertNotNull("No node", node);
+			assertEquals("Not a switch statement", ASTNode.SWITCH_STATEMENT, node.getNodeType());
+			SwitchStatement switchStatement = (SwitchStatement) node;
+			List statements = switchStatement.statements();
+			assertEquals("Wrong size", 2, statements.size());
+			Statement statement = (Statement) statements.get(1);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement.getNodeType());
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement;
+			assertEquals("Wrong size", 2, variableDeclarationStatement.fragments().size());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=92866
+	 */
+	public void test0622() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		System.out.println((int) \'\\0\');\n" +
+				"		System.out.println((int) \'\\00\');\n" +
+				"		System.out.println((int) \'\\000\');\n" +
+				"		System.out.println((int) \'\\40\');\n" +
+				"		System.out.println((int) \'\\040\');\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", false/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			unit.accept(new ASTVisitor() {
+				public boolean visit(CharacterLiteral characterLiteral) {
+					try {
+						characterLiteral.charValue();
+					} catch(IllegalArgumentException e) {
+						assertTrue("Should not happen", false);
+					}
+					return false;
+				}
+			});
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=116573
+	 */
+	public void test0623() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"class X {\n" +
+				"        X(boolean x, String y, String z) {}\n" +
+				"        X(int x, String y) {}\n" +
+				"        X(String x) {\n" +
+				"                this(first, second);\n" +
+				"        }\n" +
+				"        void test() {\n" +
+				"                new X(first, second);\n" +
+				"        }\n" +
+				"        class Z extends X {\n" +
+				"                public Z() {\n" +
+				"                        super(first, second);\n" +
+				"                }\n" +
+				"        }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedOutput =
+				"first cannot be resolved to a variable\n" +
+				"second cannot be resolved to a variable\n" +
+				"first cannot be resolved to a variable\n" +
+				"second cannot be resolved to a variable\n" +
+				"first cannot be resolved to a variable\n" +
+				"second cannot be resolved to a variable";
+			assertProblemsSize(unit, 6, expectedOutput);
+			unit.accept(new ASTVisitor() {
+				public boolean visit(ConstructorInvocation constructorInvocation) {
+					assertNotNull("No binding", constructorInvocation.resolveConstructorBinding());
+					return false;
+				}
+				public boolean visit(ClassInstanceCreation classInstanceCreation) {
+					assertNotNull("No binding", classInstanceCreation.resolveConstructorBinding());
+					return false;
+				}
+			});
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=118876
+	 */
+	public void test0624() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X extend {}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedOutput =
+				"Syntax error on token \"extend\", delete this token";
+			assertProblemsSize(unit, 1, expectedOutput);
+			unit.accept(new ASTVisitor() {
+				public boolean visit(TypeDeclaration typeDeclaration) {
+					assertTrue("Should be malformed", isMalformed(typeDeclaration));
+					return false;
+				}
+				public boolean visit(CompilationUnit compilationUnit) {
+					assertFalse("Should not be malformed", isMalformed(compilationUnit));
+					return true;
+				}
+			});
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=118897
+	 */
+	public void test0625() {
+		char[] source =
+				("package test0305;\n" +  //$NON-NLS-1$
+				"\n" +  //$NON-NLS-1$
+				"class Test {\n" +  //$NON-NLS-1$
+				"	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$
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNull("Got a type binding", typeBinding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=118897
+	 */
+	public void test0626() {
+		char[] source =
+				("package java.lang;\n" +  //$NON-NLS-1$
+				"\n" +  //$NON-NLS-1$
+				"class Object {\n" +  //$NON-NLS-1$
+				"	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$
+		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;
+		ASTNode node = getASTNode(compilationUnit, 0);
+		assertTrue("not a TypeDeclaration", node instanceof TypeDeclaration); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNull("Got a type binding", typeBinding); //$NON-NLS-1$
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=116833
+	 */
+	public void test0627() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"    void m() {\n" +
+				"        error();\n" +
+				"        new Cloneable() {\n" +
+				"            void xx() {}\n" +
+				"        };\n" +
+				"        new Cloneable() {\n" +
+				"            void xx() {}\n" +
+				"        };\n" + 				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedOutput =
+				"The method error() is undefined for the type X";
+			assertProblemsSize(unit, 1, expectedOutput);
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+			Expression expression = ((ExpressionStatement) node).getExpression();
+			assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+			AnonymousClassDeclaration anonymousClassDeclaration = ((ClassInstanceCreation) expression).getAnonymousClassDeclaration();
+			assertNotNull("No anonymous class declaration", anonymousClassDeclaration);
+			List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+			assertEquals("Wrong size", 1, bodyDeclarations.size());
+			BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) bodyDeclaration;
+			IMethodBinding methodBinding = methodDeclaration.resolveBinding();
+
+			node = getASTNode(unit, 0, 0, 2);
+			assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+			expression = ((ExpressionStatement) node).getExpression();
+			assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+			anonymousClassDeclaration = ((ClassInstanceCreation) expression).getAnonymousClassDeclaration();
+			assertNotNull("No anonymous class declaration", anonymousClassDeclaration);
+			bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+			assertEquals("Wrong size", 1, bodyDeclarations.size());
+			bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+			methodDeclaration = (MethodDeclaration) bodyDeclaration;
+			IMethodBinding methodBinding2 = methodDeclaration.resolveBinding();
+
+			assertFalse("Should not be equal", methodBinding.isEqualTo(methodBinding2));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=125270
+	 */
+	public void test0628() throws JavaModelException {
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_EXPRESSION);
+		String source = "{\"red\", \"yellow\"}";
+		parser.setSource(source.toCharArray());
+		parser.setSourceRange(0, source.length());
+		parser.setCompilerOptions(JavaCore.getOptions());
+		ASTNode result = parser.createAST(null);
+		assertNotNull("No node", result);
+		assertEquals("not an array initializer", ASTNode.ARRAY_INITIALIZER, result.getNodeType());
+		ArrayInitializer arrayInitializer = (ArrayInitializer) result;
+		List expressions = arrayInitializer.expressions();
+		assertEquals("Wrong size", 2, expressions.size());
+		assertEquals("Wrong type", ASTNode.STRING_LITERAL, ((Expression) expressions.get(0)).getNodeType());
+		assertEquals("Wrong type", ASTNode.STRING_LITERAL, ((Expression) expressions.get(1)).getNodeType());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=126598
+	 */
+	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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedOutput =
+			"Syntax error on token \",\", invalid Expression";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a compilation unit", ASTNode.FIELD_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		checkSourceRange(fragment, "s =  {\"\",,,}", source);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=126598
+	 */
+	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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedOutput =
+			"Syntax error on token \",\", invalid Expression";
+		assertProblemsSize(compilationUnit, 1, expectedOutput);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=126598
+	 */
+	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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType()); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		String expectedOutput =
+			"Syntax error, insert \"}\" to complete ArrayInitializer\n" +
+			"Syntax error, insert \";\" to complete FieldDeclaration\n" +
+			"Syntax error, insert \"}\" to complete ClassBody";
+		assertProblemsSize(compilationUnit, 3, expectedOutput);
+		ASTNode node = getASTNode(compilationUnit, 0, 0);
+		assertEquals("Not a compilation unit", ASTNode.FIELD_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+		List fragments = fieldDeclaration.fragments();
+		assertEquals("wrong size", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		checkSourceRange(fragment, "s =  {\"\",,,", source, true/*expectMalformed*/);
+		assertTrue("Not initializer", fragment.getInitializer() == null);
+		assertTrue("Not a malformed node", isMalformed(fragment));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128539
+	 */
+	public void test0632() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void m(int state) {\n" +
+				"		switch (state) {\n" +
+				"			case 4:\n" +
+				"				double M0,M1;\n" +
+				"		}\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a switch statement", ASTNode.SWITCH_STATEMENT, node.getNodeType());
+			SwitchStatement statement = (SwitchStatement) node;
+			List statements = statement.statements();
+			assertEquals("wrong size", 2, statements.size());
+			assertEquals("Not a switch case", ASTNode.SWITCH_CASE, ((ASTNode) statements.get(0)).getNodeType());
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, ((ASTNode) statements.get(1)).getNodeType());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128539
+	 */
+	public void test0633() {
+		String src = "switch (state) {case 4:double M0,M1;}";
+		char[] source = src.toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind (ASTParser.K_STATEMENTS);
+		parser.setSource (source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Wrong type", ASTNode.BLOCK, result.getNodeType());
+		Block block = (Block) result;
+		List statements = block.statements();
+		assertNotNull("No statements", statements);
+		assertEquals("Wrong size", 1, statements.size());
+		final ASTNode node = (ASTNode) statements.get(0);
+		assertEquals("Not a switch statement", ASTNode.SWITCH_STATEMENT, node.getNodeType());
+		SwitchStatement statement = (SwitchStatement) node;
+		statements = statement.statements();
+		assertEquals("wrong size", 2, statements.size());
+		assertEquals("Not a switch case", ASTNode.SWITCH_CASE, ((ASTNode) statements.get(0)).getNodeType());
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, ((ASTNode) statements.get(1)).getNodeType());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128823
+	 */
+	public void test0634() throws JavaModelException {
+		try {
+			String src =
+				"public class X {\n" +
+					"	void foo() {\n" +
+					"		int i1 i1;\n" +
+					"		int i2 i2;\n" +
+					"		int i3 i3;\n" +
+					"		int i4 i4;\n" +
+	 				"		int i5 i5;\n" +
+					"		int i6 i6;\n" +
+	 				"		int i7 i7;\n" +
+					"		int i8 i8;\n" +
+					"		int i9 i9;\n" +
+					"		int i10 i10;\n" +
+					"		int i11 i11;\n" +
+					"		\n" +
+					"		for for ;;){}\n" +
+					"	}\n" +
+					"}";
+
+			char[] source = src.toCharArray();
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			parser.setKind (ASTParser.K_COMPILATION_UNIT);
+			parser.setSource (source);
+			parser.setStatementsRecovery(true);
+			ASTNode result = parser.createAST (null);
+			assertNotNull("no result", result);
+		} catch (ArrayIndexOutOfBoundsException e) {
+			assertTrue("ArrayIndexOutOfBoundsException", false);
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128960
+	 */
+	public void test0635() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void foo(Object tab[]) {\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration declaration = (MethodDeclaration) node;
+			List parameters = declaration.parameters();
+			assertEquals("wrong number", 1, parameters.size());
+			SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+			checkSourceRange(variableDeclaration, "Object tab[]", contents);
+			checkSourceRange(variableDeclaration.getType(), "Object", contents);
+			checkSourceRange(variableDeclaration.getName(), "tab", contents);
+			assertEquals("wrong number of extra dimensions", 1, variableDeclaration.getExtraDimensions());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128960
+	 */
+	public void test0636() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void foo(java.lang.Object tab[]) {\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration declaration = (MethodDeclaration) node;
+			List parameters = declaration.parameters();
+			assertEquals("wrong number", 1, parameters.size());
+			SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0);
+			checkSourceRange(variableDeclaration, "java.lang.Object tab[]", contents);
+			checkSourceRange(variableDeclaration.getType(), "java.lang.Object", contents);
+			checkSourceRange(variableDeclaration.getName(), "tab", contents);
+			assertEquals("wrong number of extra dimensions", 1, variableDeclaration.getExtraDimensions());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128961
+	 */
+	public void test0637() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void foo() {\n" +
+				"		for( int i = (1); ; ) {\n" +
+				"       }\n" +
+				"   }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a for statement", ASTNode.FOR_STATEMENT, node.getNodeType());
+			ForStatement forStatement = (ForStatement) node;
+			List inits = forStatement.initializers();
+			assertEquals("Wrong size", 1, inits.size());
+			Expression expression = (Expression) inits.get(0);
+			assertEquals("Not a variable declaration expression", ASTNode.VARIABLE_DECLARATION_EXPRESSION, expression.getNodeType());
+			VariableDeclarationExpression declarationExpression = (VariableDeclarationExpression) expression;
+			List fragments = declarationExpression.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression initializer = fragment.getInitializer();
+			checkSourceRange(initializer, "(1)", contents);
+			checkSourceRange(fragment, "i = (1)", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128961
+	 */
+	public void test0638() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	int i = (1);\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			List fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression initializer = fragment.getInitializer();
+			checkSourceRange(initializer, "(1)", contents);
+			checkSourceRange(fragment, "i = (1)", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=128961
+	 */
+	public void test0639() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void foo() {\n" +
+				"		for( int i = (1), j = 0; ; ) {\n" +
+				"       }\n" +
+				"   }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a for statement", ASTNode.FOR_STATEMENT, node.getNodeType());
+			ForStatement forStatement = (ForStatement) node;
+			List inits = forStatement.initializers();
+			assertEquals("Wrong size", 1, inits.size());
+			Expression expression = (Expression) inits.get(0);
+			assertEquals("Not a variable declaration expression", ASTNode.VARIABLE_DECLARATION_EXPRESSION, expression.getNodeType());
+			VariableDeclarationExpression declarationExpression = (VariableDeclarationExpression) expression;
+			List fragments = declarationExpression.fragments();
+			assertEquals("Wrong size", 2, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression initializer = fragment.getInitializer();
+			checkSourceRange(initializer, "(1)", contents);
+			checkSourceRange(fragment, "i = (1)", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/*
+	 * 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)
+	 */
+	public void test0641() throws JavaModelException {
+		// Integer from attached source
+		IClassFile 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")};
+		markerInfo.astEnds = new int[] {source.lastIndexOf('}') + 1};
+		ASTNode node = buildAST(markerInfo, classFile);
+		IBinding bindingFromAttachedSource = ((TypeDeclaration) node).resolveBinding();
+
+		ICompilationUnit workingCopy = null;
+		try {
+    		workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+	    	String contents =
+				"public class X {\n" +
+				"	/*start*/Integer/*end*/ field;\n" +
+				"}";
+		   	IBinding[] bindings = resolveBindings(contents, workingCopy);
+		   	assertTrue("2 type bindings should be equals", bindingFromAttachedSource.isEqualTo(bindings[0]));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=129330
+	 */
+	public void _test0642() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.awt.Point;\n" +
+				"public class X {\n" +
+				"	public void foo(Point p, int[] a) {\n" +
+				"	   p.x;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "Syntax error, insert \"AssignmentOperator Expression\" to complete Expression");
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+			assertTrue("Not recovered", isRecovered(node));
+			final Expression expression = ((ExpressionStatement) node).getExpression();
+			assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, expression.getNodeType());
+			assertTrue("Not recovered", isRecovered(expression));
+			checkSourceRange(expression, "p.x", contents);
+			checkSourceRange(node, "p.x;", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=129330
+	 */
+	public void test0643() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.awt.Point;\n" +
+				"public class X {\n" +
+				"	public void foo(Point p, int[] a) {\n" +
+				"	   a[0];\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "Syntax error, insert \"AssignmentOperator Expression\" to complete Expression");
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+			assertTrue("Not recovered", isRecovered(node));
+			final Expression expression = ((ExpressionStatement) node).getExpression();
+			assertEquals("Not an array access", ASTNode.ARRAY_ACCESS, expression.getNodeType());
+			assertTrue("Not recovered", isRecovered(expression));
+			checkSourceRange(expression, "a[0]", contents);
+			checkSourceRange(node, "a[0];", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=129330
+	 */
+	public void test0644() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	public void foo() {\n" +
+				"	   int x =;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "Syntax error on token \"=\", Expression expected after this token");
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a vaviable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression expression = fragment.getInitializer();
+			assertNull("No initializer", expression);
+			assertTrue("Not recovered", isRecovered(fragment));
+			checkSourceRange(fragment, "x =", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=135997
+	 */
+	public void test0645() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	{\n" +
+				"	   new Object();\n" +
+				"	   Object.equ;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertEquals(
+					"Wrong problem size",
+					2,
+					unit.getProblems().length);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a field declaration statement", ASTNode.INITIALIZER, node.getNodeType());
+			Initializer initializer = (Initializer) node;
+			checkSourceRange(
+					initializer,
+					"{\n" +
+					"	   new Object();\n" +
+					"	   Object.equ;\n" +
+					"	}",
+					contents);
+			Block block = initializer.getBody();
+			checkSourceRange(
+					block,
+					"{\n" +
+					"	   new Object();\n" +
+					"	   Object.equ;\n" +
+					"	}",
+					contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=136972
+	 */
+	public void test0646() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"        static {\n" +
+				"                class A\n" +
+				"                Object o = new Object(){\n" +
+				"                        void test(){\n" +
+				"                        }\n" +
+				"                };\n" +
+				"        }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=141043
+	 */
+	public void test0647() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"    public void run(int i) {\n" +
+				"    }\n" +
+				"    public void foo() {\n" +
+				"        new Runnable() {\n" +
+				"            public void run() {\n" +
+				"                run(1);    \n" +
+				"            }\n" +
+				"        };\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "The method run() in the type new Runnable(){} is not applicable for the arguments (int)");
+			node = getASTNode(unit, 0, 1, 0);
+			assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+			Expression expression = ((ExpressionStatement) node).getExpression();
+			ITypeBinding typeBinding = expression.resolveTypeBinding();
+			IMethodBinding[] methodBindings = typeBinding.getDeclaredMethods();
+			assertEquals("Wrong size", 2, methodBindings.length);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=147877
+	 */
+	public void test0648() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"    public void foo(int[] a) {\n" +
+				"        int i = a[0];\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a vaviable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression expression = fragment.getInitializer();
+			assertNotNull("No initializer", expression);
+			checkSourceRange(expression, "a[0]", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=147877
+	 */
+	public void test0649() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"    public void foo(int[] a) {\n" +
+				"        int i = a[0\\u005D;\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a vaviable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression expression = fragment.getInitializer();
+			assertNotNull("No initializer", expression);
+			checkSourceRange(expression, "a[0\\u005D", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=147877
+	 */
+	public void test0650() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"    public void foo(int[] a) {\n" +
+				"        int[] i = new int[0];\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a vaviable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression expression = fragment.getInitializer();
+			assertNotNull("No initializer", expression);
+			checkSourceRange(expression, "new int[0]", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=147877
+	 */
+	public void test0651() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"    public void foo(int[] a) {\n" +
+				"        int[] i = new int[0\\u005D;\n" +
+				"    }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a vaviable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			Expression expression = fragment.getInitializer();
+			assertNotNull("No initializer", expression);
+			checkSourceRange(expression, "new int[0\\u005D", contents);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * @bug 149126: IllegalArgumentException in ASTConverter
+	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=149126"
+	 */
+	public void _test0652() throws CoreException {
+		ASTResult result = this.buildMarkedAST(
+				"/Converter/src/TestCharset.java",
+				"import java.nio.ByteBuffer;\n" +
+				"import java.nio.CharBuffer;\n" +
+				"import java.nio.charset.Charset;\n" +
+				"import java.nio.charset.CharsetDecoder;\n" +
+				"import java.nio.charset.CharsetEncoder;\n" +
+				"import java.nio.charset.CoderResult;\n" +
+				"public class TestCharset extends Charset {\n" +
+				"        public CharsetDecoder newDecoder() {\n" +
+				"                return new CharsetDecoder(this, 2.0, 2.0) {\n" +
+				"                        CharsetDecoder(CharSet\n" +
+				"                        protected CoderResult decodeLoop(ByteBuffer in,\n" +
+				"CharBuffer out) {\n" +
+				"                                return null;\n" +
+				"                        }\n" +
+				"                };;\n" +
+				"        }\n" +
+				"        public CharsetEncoder newEncoder() {\n" +
+				"                return null;\n" +
+				"        }\n" +
+				"}");
+
+		assertASTResult(
+				"===== AST =====\n" +
+				"import java.nio.ByteBuffer;\n" +
+				"import java.nio.CharBuffer;\n" +
+				"import java.nio.charset.Charset;\n" +
+				"import java.nio.charset.CharsetDecoder;\n" +
+				"import java.nio.charset.CharsetEncoder;\n" +
+				"import java.nio.charset.CoderResult;\n" +
+				"public class TestCharset extends Charset {\n" +
+				"  public CharsetDecoder newDecoder(){\n" +
+				"    return new CharsetDecoder(this,2.0,2.0){\n" +
+				"      void CharsetDecoder(){\n" +
+				"      }\n" +
+				"      protected CoderResult decodeLoop(      ByteBuffer in,      CharBuffer out){\n" +
+				"        return null;\n" +
+				"      }\n" +
+				"    }\n" +
+				";\n" +
+				"    ;\n" +
+				"  }\n" +
+				"  public CharsetEncoder newEncoder(){\n" +
+				"    return null;\n" +
+				"  }\n" +
+				"}\n" +
+				"\n" +
+				"===== Details =====\n" +
+				"===== Problems =====\n" +
+				"1. ERROR in /Converter/src/TestCharset.java (at line 1)\n" +
+				"	import java.nio.ByteBuffer;\n" +
+				"	       ^^^^^^^^\n" +
+				"The import java.nio cannot be resolved\n" +
+				"2. ERROR in /Converter/src/TestCharset.java (at line 2)\n" +
+				"	import java.nio.CharBuffer;\n" +
+				"	       ^^^^^^^^\n" +
+				"The import java.nio cannot be resolved\n" +
+				"3. ERROR in /Converter/src/TestCharset.java (at line 3)\n" +
+				"	import java.nio.charset.Charset;\n" +
+				"	       ^^^^^^^^\n" +
+				"The import java.nio cannot be resolved\n" +
+				"4. ERROR in /Converter/src/TestCharset.java (at line 4)\n" +
+				"	import java.nio.charset.CharsetDecoder;\n" +
+				"	       ^^^^^^^^\n" +
+				"The import java.nio cannot be resolved\n" +
+				"5. ERROR in /Converter/src/TestCharset.java (at line 5)\n" +
+				"	import java.nio.charset.CharsetEncoder;\n" +
+				"	       ^^^^^^^^\n" +
+				"The import java.nio cannot be resolved\n" +
+				"6. ERROR in /Converter/src/TestCharset.java (at line 6)\n" +
+				"	import java.nio.charset.CoderResult;\n" +
+				"	       ^^^^^^^^\n" +
+				"The import java.nio cannot be resolved\n" +
+				"7. ERROR in /Converter/src/TestCharset.java (at line 7)\n" +
+				"	public class TestCharset extends Charset {\n" +
+				"	                                 ^^^^^^^\n" +
+				"Charset cannot be resolved to a type\n" +
+				"8. ERROR in /Converter/src/TestCharset.java (at line 8)\n" +
+				"	public CharsetDecoder newDecoder() {\n" +
+				"	       ^^^^^^^^^^^^^^\n" +
+				"CharsetDecoder cannot be resolved to a type\n" +
+				"9. ERROR in /Converter/src/TestCharset.java (at line 9)\n" +
+				"	return new CharsetDecoder(this, 2.0, 2.0) {\n" +
+				"	           ^^^^^^^^^^^^^^\n" +
+				"CharsetDecoder cannot be resolved to a type\n" +
+				"10. ERROR in /Converter/src/TestCharset.java (at line 10)\n" +
+				"	CharsetDecoder(CharSet\n" +
+				"	^^^^^^^^^^^^^^^^^^^^^^\n" +
+				"Syntax error on token(s), misplaced construct(s)\n" +
+				"11. ERROR in /Converter/src/TestCharset.java (at line 10)\n" +
+				"	CharsetDecoder(CharSet\n" +
+				"	^^^^^^^^^^^^^^^\n" +
+				"Return type for the method is missing\n" +
+				"12. ERROR in /Converter/src/TestCharset.java (at line 11)\n" +
+				"	protected CoderResult decodeLoop(ByteBuffer in,\n" +
+				"	          ^^^^^^^^^^^\n" +
+				"CoderResult cannot be resolved to a type\n" +
+				"13. ERROR in /Converter/src/TestCharset.java (at line 11)\n" +
+				"	protected CoderResult decodeLoop(ByteBuffer in,\n" +
+				"	                                 ^^^^^^^^^^\n" +
+				"ByteBuffer cannot be resolved to a type\n" +
+				"14. ERROR in /Converter/src/TestCharset.java (at line 12)\n" +
+				"	CharBuffer out) {\n" +
+				"	^^^^^^^^^^\n" +
+				"CharBuffer cannot be resolved to a type\n" +
+				"15. ERROR in /Converter/src/TestCharset.java (at line 17)\n" +
+				"	public CharsetEncoder newEncoder() {\n" +
+				"	       ^^^^^^^^^^^^^^\n" +
+				"CharsetEncoder cannot be resolved to a type\n",
+				result);
+		}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=150409
+	 */
+	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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
+		CompilationUnit unit = (CompilationUnit) result;
+
+		ASTNode node = getASTNode(unit, 0, 2, 0);
+		assertEquals("Not a method invocation", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement statement = (ExpressionStatement) node;
+		MethodInvocation invocation = (MethodInvocation) statement.getExpression();
+		List arguments = invocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		Expression argument = (Expression) arguments.get(0);
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, argument.getNodeType());
+		invocation = (MethodInvocation) argument;
+		Expression expression = invocation.getExpression();
+		assertEquals("Not a method invocation", ASTNode.FIELD_ACCESS, expression.getNodeType());
+		FieldAccess fieldAccess = (FieldAccess) expression;
+		IVariableBinding variableBinding = fieldAccess.resolveFieldBinding();
+		assertNotNull("No variable binding", variableBinding);
+		IMethodBinding resolveMethodBinding = invocation.resolveMethodBinding();
+		assertNotNull("No binding", resolveMethodBinding);
+	}
+
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=148224
+	 */
+	public void test0654() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	int i;\n" +
+				"	public void foo(int[] a) {\n" +
+				"	}\n" +
+				"	String s;\n" +
+				"	public String[][] bar() {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			FieldDeclaration declaration = (FieldDeclaration) node;
+			Type type = declaration.getType();
+			ITypeBinding typeBinding = type.resolveBinding();
+			assertTrue("Not a primitive type", typeBinding.isPrimitive());
+			assertEquals("Not int", "int", typeBinding.getName());
+			try {
+				typeBinding.createArrayType(-1);
+				assertTrue("Should throw an exception", false);
+			} catch(IllegalArgumentException exception) {
+				// ignore
+			}
+			try {
+				typeBinding.createArrayType(0);
+				assertTrue("Should throw an exception", false);
+			} catch(IllegalArgumentException exception) {
+				// ignore
+			}
+			try {
+				typeBinding.createArrayType(256);
+				assertTrue("Should throw an exception", false);
+			} catch(IllegalArgumentException exception) {
+				// ignore
+			}
+			ITypeBinding binding = typeBinding.createArrayType(2);
+			assertEquals("Wrong dimensions", 2, binding.getDimensions());
+			assertTrue("Not an array type binding", binding.isArray());
+			ITypeBinding componentType = binding.getComponentType();
+			assertTrue("Not an array type binding", componentType.isArray());
+			assertEquals("Wrong dimensions", 1, componentType.getDimensions());
+			componentType = componentType.getComponentType();
+			assertFalse("An array type binding", componentType.isArray());
+			assertEquals("Wrong dimensions", 0, componentType.getDimensions());
+
+			binding = typeBinding.createArrayType(1);
+			node = getASTNode(unit, 0, 1);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+			List parameters = methodDeclaration.parameters();
+			assertEquals("Wrong size", 1, parameters.size());
+			SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(0);
+			Type type2 = parameter.getType();
+			ITypeBinding typeBinding2 = type2.resolveBinding();
+			assertNotNull("No binding", typeBinding2);
+			assertTrue("Not an array binding", typeBinding2.isArray());
+			assertEquals("Wrong dimension", 1, typeBinding2.getDimensions());
+			assertEquals("Wrong type", "int", typeBinding2.getElementType().getName());
+			assertTrue("Should be equals", binding == typeBinding2);
+
+			binding = typeBinding2.createArrayType(3);
+			assertTrue("Not an array binding", binding.isArray());
+			assertEquals("Wrong dimension", 4, binding.getDimensions());
+
+			node = getASTNode(unit, 0, 2);
+			assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			declaration = (FieldDeclaration) node;
+			type = declaration.getType();
+			typeBinding = type.resolveBinding();
+			assertTrue("A primitive type", !typeBinding.isPrimitive());
+			assertEquals("Not String", "String", typeBinding.getName());
+
+			binding = typeBinding.createArrayType(1);
+			node = getASTNode(unit, 0, 3);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			methodDeclaration = (MethodDeclaration) node;
+			type = methodDeclaration.getReturnType2();
+			assertNotNull("No return type", type);
+			typeBinding2 = type.resolveBinding();
+			assertNotNull("No binding", typeBinding2);
+			assertTrue("Not an array binding", typeBinding2.isArray());
+			assertEquals("Wrong dimension", 2, typeBinding2.getDimensions());
+			assertEquals("Wrong type", "String", typeBinding2.getElementType().getName());
+			typeBinding2 = typeBinding2.getComponentType();
+			assertTrue("Not an array binding", typeBinding2.isArray());
+			assertEquals("Wrong dimension", 1, typeBinding2.getDimensions());
+			assertTrue("Should be equals", binding == typeBinding2);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=157570
+	 */
+	public void test0655() {
+		String src = "public static void m1()\n" +
+				"    {\n" +
+				"        int a;\n" +
+				"        int b;\n" +
+				"    }\n" +
+				"\n" +
+				"    public static void m2()\n" +
+				"    {\n" +
+				"        int c;\n" +
+				"        int d;\n" +
+				"    }";
+		char[] source = src.toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind (ASTParser.K_STATEMENTS);
+		parser.setStatementsRecovery(true);
+		parser.setSource (source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Not a block", ASTNode.BLOCK, result.getNodeType());
+		Block block = (Block) result;
+		List statements = block.statements();
+		for (Iterator iterator = statements.iterator(); iterator.hasNext(); ) {
+			Statement statement = (Statement) iterator.next();
+			if (statement.getNodeType() == ASTNode.EXPRESSION_STATEMENT) {
+				// only the expression statements are recovered. The others are considered as valid blocks.
+				assertTrue(isRecovered(statement));
+			}
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=157570
+	 */
+	public void test0656() {
+		String src = "public static void m1()\n" +
+				"    {\n" +
+				"        int a;\n" +
+				"        int b;\n" +
+				"    }\n" +
+				"\n" +
+				"    public static void m2()\n" +
+				"    {\n" +
+				"        int c;\n" +
+				"        int d;\n" +
+				"    }";
+		char[] source = src.toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind (ASTParser.K_STATEMENTS);
+		parser.setStatementsRecovery(false);
+		parser.setSource (source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Not a block", ASTNode.BLOCK, result.getNodeType());
+		Block block = (Block) result;
+		List statements = block.statements();
+		assertEquals("Should be empty", 0, statements.size());
+	}
+
+	// http://dev.eclipse.org/bugs/show_bug.cgi?id=160198
+	public void test0657() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0657", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		ICompilationUnit sourceUnit2 = getCompilationUnit("Converter" , "src", "test0657", "A.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		class TestASTRequestor extends ASTRequestor {
+			public ArrayList asts = new ArrayList();
+			public void acceptAST(ICompilationUnit source, CompilationUnit compilationUnit) {
+				this.asts.add(compilationUnit);
+			}
+			public void acceptBinding(String bindingKey, IBinding binding) {
+			}
+		}
+		TestASTRequestor requestor = new TestASTRequestor();
+		resolveASTs(
+			new ICompilationUnit[] {sourceUnit, sourceUnit2},
+			new String[0],
+			requestor,
+			getJavaProject("Converter"),
+			sourceUnit.getOwner()
+		);
+		ArrayList arrayList = requestor.asts;
+		assertEquals("Wrong size", 2, arrayList.size());
+		int problemsCount = 0;
+		for (int i = 0, max = arrayList.size(); i < max; i++) {
+			Object current = arrayList.get(i);
+			assertTrue("not a compilation unit", current instanceof CompilationUnit);
+			CompilationUnit unit = (CompilationUnit) current;
+			IProblem[] problems = unit.getProblems();
+			problemsCount += problems.length;
+		}
+		assertEquals("wrong size", 1, problemsCount);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=157570
+	 */
+	public void _test0658() {
+		String src = "public static void m1()\n" +
+				"    {\n" +
+				"        int a;\n" +
+				"        int b;\n" +
+				"    }\n" +
+				"\n" +
+				"    public static void m2()\n" +
+				"    {\n" +
+				"        int c;\n" +
+				"        int d;\n" +
+				"    }";
+		char[] source = src.toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind (ASTParser.K_STATEMENTS);
+		parser.setStatementsRecovery(true);
+		parser.setSource (source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Not a block", ASTNode.BLOCK, result.getNodeType());
+		Block block = (Block) result;
+		List statements = block.statements();
+		assertEquals("Should be empty", 4, statements.size());
+		assertTrue("Not recovered", isRecovered(block));
+		ASTNode root = block.getRoot();
+		assertNotNull("No root", root);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, root.getNodeType());
+		CompilationUnit unit = (CompilationUnit) root;
+		String errors =
+			"Syntax error on token(s), misplaced construct(s)\n" +
+			"Syntax error, insert \";\" to complete BlockStatements\n" +
+			"Syntax error on token(s), misplaced construct(s)\n" +
+			"Syntax error, insert \";\" to complete Statement";
+		assertProblemsSize(unit, 4, errors);
+	}
+
+	public void test0659() throws CoreException, JavaModelException {
+		IJavaProject javaProject = createJavaProject("P659", new String[] { "src" }, new String[0], "bin");
+		try {
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			parser.setKind(ASTParser.K_COMPILATION_UNIT);
+			parser.setStatementsRecovery(true);
+			parser.setBindingsRecovery(true);
+			String source ="package java.lang;\n" +
+					"public class Object {\n" +
+					"        public String toString() {\n" +
+					"                return \"\";\n" +
+					"        }\n" +
+					"}";
+			parser.setSource(source.toCharArray());
+			parser.setProject(javaProject);
+			parser.setResolveBindings(true);
+			parser.setUnitName("Object.java");
+			ASTNode result = parser.createAST (null);
+			assertNotNull("no result", result);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, result.getNodeType());
+			CompilationUnit unit = (CompilationUnit) result;
+			ASTNode node = getASTNode(unit, 0, 0);
+			assertNotNull("No node", node);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration declaration = (MethodDeclaration) node;
+			Block block = declaration.getBody();
+			assertNotNull("no block", block);
+			List statements = block.statements();
+			assertEquals("Wrong size", 1, statements.size());
+			ReturnStatement returnStatement = (ReturnStatement) statements.get(0);
+			Expression expression = returnStatement.getExpression();
+			assertNotNull("No expression", expression);
+			ITypeBinding binding = expression.resolveTypeBinding();
+			assertNotNull("No binding", binding);
+			assertEquals("LString;", binding.getKey());
+		} finally {
+			deleteProject("P659");
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=144858
+	 */
+	public void test0660() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void foo() {\n" +
+				"		int x = 0;\n" +
+				"		String x = \"\"; //$NON-NLS-1$\n" +
+				"		x.toString();\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "Duplicate local variable x");
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List  fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "x", variableBinding.getName());
+			// (PR 149590)
+			String key = variableBinding.getKey();
+
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			statement = (VariableDeclarationStatement) node;
+			fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "x", variableBinding.getName());
+			// (PR 149590)
+			String key2 = variableBinding.getKey();
+			assertFalse("Keys should not be equals", key2.equals(key));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=144858
+	 */
+	public void test0661() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"        public static void main(String[] args) {\n" +
+				"                int x = 2;\n" +
+				"                try {\n" +
+				"\n" +
+				"                } catch(NullPointerException x) {\n" +
+				"                } catch(Exception e) {\n" +
+				"                }\n" +
+				"        }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 1, "Duplicate parameter x");
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List  fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "x", variableBinding.getName());
+			// (PR 149590)
+			String key = variableBinding.getKey();
+
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not a try statement", ASTNode.TRY_STATEMENT, node.getNodeType());
+			TryStatement statement2 = (TryStatement) node;
+			List catchClauses = statement2.catchClauses();
+			assertEquals("Wrong size", 2, catchClauses.size());
+			CatchClause catchClause = (CatchClause) catchClauses.get(0);
+			SingleVariableDeclaration variableDeclaration = catchClause.getException();
+			variableBinding = variableDeclaration.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "x", variableBinding.getName());
+			// (PR 149590)
+			String key2 = variableBinding.getKey();
+			assertFalse("Keys should not be equals", key2.equals(key));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=144858
+	 */
+	public void test0662() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"        public static void main(String[] args) {\n" +
+				"                int x = x = 0;\n" +
+				"                if (true) {\n" +
+				"                        int x = x = 1;\n" +
+				"                }\n" +
+				"        }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedLog =
+				"The assignment to variable x has no effect\n" +
+				"Duplicate local variable x\n" +
+				"The assignment to variable x has no effect";
+			assertProblemsSize(unit, 3, expectedLog);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List  fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "x", variableBinding.getName());
+			// (PR 149590)
+			String key = variableBinding.getKey();
+
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not an if statement", ASTNode.IF_STATEMENT, node.getNodeType());
+			IfStatement ifStatement = (IfStatement) node;
+			Block block = (Block) ifStatement.getThenStatement();
+			List statements = block.statements();
+			assertEquals("Wrong size", 1, statements.size());
+			Statement statement2 = (Statement) statements.get(0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement2.getNodeType());
+			statement = (VariableDeclarationStatement) statement2;
+			fragments = statement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "x", variableBinding.getName());
+
+			// (PR 149590)
+			String key2 = variableBinding.getKey();
+			assertFalse("Keys should not be equals", key2.equals(key));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=144858
+	 */
+	public void test0663() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"        public static void main(String[] args) {\n" +
+				"                for (int i = 0; i < 10; i++) {\n" +
+				"                        for (int i = 0; i < 5; i++)  {\n" +
+				"                                // do something\n" +
+				"                        }\n" +
+				"                }\n" +
+				"        }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedLog = "Duplicate local variable i";
+			assertProblemsSize(unit, 1, expectedLog);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a for statement", ASTNode.FOR_STATEMENT, node.getNodeType());
+			ForStatement statement = (ForStatement) node;
+			List initializers = statement.initializers();
+			assertEquals("Wrong size", 1, initializers.size());
+			Expression expression = (Expression) initializers.get(0);
+			assertEquals("Not a variable declaration expression", ASTNode.VARIABLE_DECLARATION_EXPRESSION, expression.getNodeType());
+			VariableDeclarationExpression expression2 = (VariableDeclarationExpression) expression;
+			List fragments = expression2.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "i", variableBinding.getName());
+			// (PR 149590)
+			String key = variableBinding.getKey();
+
+			Block block = (Block) statement.getBody();
+			List statements = block.statements();
+			assertEquals("Wrong size", 1, statements.size());
+			Statement statement2 = (Statement) statements.get(0);
+			assertEquals("Not a for statement", ASTNode.FOR_STATEMENT, statement2.getNodeType());
+			statement = (ForStatement) statement2;
+			initializers = statement.initializers();
+			assertEquals("Wrong size", 1, initializers.size());
+			expression = (Expression) initializers.get(0);
+			assertEquals("Not a variable declaration expression", ASTNode.VARIABLE_DECLARATION_EXPRESSION, expression.getNodeType());
+			expression2 = (VariableDeclarationExpression) expression;
+			fragments = expression2.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "i", variableBinding.getName());
+
+			// (PR 149590)
+			String key2 = variableBinding.getKey();
+			assertFalse("Keys should not be equals", key2.equals(key));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=165662
+	 */
+	public void test0664() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"  void foo() {\n" +
+				"     class Local {\n" +
+				"        void foo() {}\n" +
+				"     }\n" +
+				"     {\n" +
+				"        class Local {\n" +
+				"                Local(int i) {\n" +
+				"                        this.init(i);\n" +
+				"                }\n" +
+				"				 void init(int i) {}\n" +
+				"        }\n" +
+				"        Local l = new Local(0);\n" +
+				"     }\n" +
+				"  }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedLog = "Duplicate nested type Local";
+			assertProblemsSize(unit, 1, expectedLog);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, node.getNodeType());
+			TypeDeclarationStatement statement = (TypeDeclarationStatement) node;
+			ITypeBinding typeBinding = statement.resolveBinding();
+			assertNotNull("No binding", typeBinding);
+			String key = typeBinding.getKey();
+			assertNotNull("No key", key);
+
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not a block", ASTNode.BLOCK, node.getNodeType());
+			Block block = (Block) node;
+			List statements = block.statements();
+			assertEquals("wrong size", 2, statements.size());
+			Statement statement2 = (Statement) statements.get(0);
+			assertEquals("Not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, statement2.getNodeType());
+			statement = (TypeDeclarationStatement) statement2;
+			typeBinding = statement.resolveBinding();
+			assertNotNull("No binding", typeBinding);
+			String key2 = typeBinding.getKey();
+			assertNotNull("No key2", key2);
+			assertFalse("Keys should not be equals", key.equals(key2));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=165662
+	 */
+	public void test0665() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"        void foo() {\n" +
+				"                class Local {\n" +
+				"                        void foo() {\n" +
+				"                        }\n" +
+				"                }\n" +
+				"                {\n" +
+				"                        class Local {\n" +
+				"                               Local(int i) {\n" +
+				"                                       this.init(i);\n" +
+				"                                       this.bar();\n" +
+				"                               }\n" +
+				"				 				void init(int i) {}\n" +
+				"                        		void bar() {\n" +
+				"                        		}\n" +
+				"                        }\n" +
+				"                        Local l = new Local(0);\n" +
+				"                }\n" +
+				"                Local l = new Local();\n" +
+				"                l.foo();\n" +
+				"        }\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedLog = "Duplicate nested type Local";
+			assertProblemsSize(unit, 1, expectedLog);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, node.getNodeType());
+			TypeDeclarationStatement statement = (TypeDeclarationStatement) node;
+			ITypeBinding typeBinding = statement.resolveBinding();
+			assertNotNull("No binding", typeBinding);
+			String key = typeBinding.getKey();
+			assertNotNull("No key", key);
+
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not a block", ASTNode.BLOCK, node.getNodeType());
+			Block block = (Block) node;
+			List statements = block.statements();
+			assertEquals("wrong size", 2, statements.size());
+			Statement statement2 = (Statement) statements.get(0);
+			assertEquals("Not a type declaration statement", ASTNode.TYPE_DECLARATION_STATEMENT, statement2.getNodeType());
+			statement = (TypeDeclarationStatement) statement2;
+			typeBinding = statement.resolveBinding();
+			assertNotNull("No binding", typeBinding);
+			String key2 = typeBinding.getKey();
+			assertNotNull("No key2", key2);
+			assertFalse("Keys should not be equals", key.equals(key2));
+
+			Statement statement3 = (Statement) statements.get(1);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, statement3.getNodeType());
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statement3;
+			List  fragments = variableDeclarationStatement.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("Wrong name", "l", variableBinding.getName());
+			Expression expression = fragment.getInitializer();
+			ITypeBinding typeBinding2 = expression.resolveTypeBinding();
+			assertNotNull("No type binding2", typeBinding2);
+
+			AbstractTypeDeclaration declaration = statement.getDeclaration();
+			List bodyDeclarations = declaration.bodyDeclarations();
+			assertEquals("Wrong size", 3, bodyDeclarations.size());
+			BodyDeclaration declaration2 = (BodyDeclaration) bodyDeclarations.get(0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, declaration2.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) declaration2;
+			assertTrue("not a constructor", methodDeclaration.isConstructor());
+			block = methodDeclaration.getBody();
+			statements = block.statements();
+			assertEquals("Wrong size", 2, statements.size());
+			statement3 = (Statement) statements.get(1);
+			assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, statement3.getNodeType());
+			expression = ((ExpressionStatement) statement3).getExpression();
+			assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, expression.getNodeType());
+			MethodInvocation invocation = (MethodInvocation) expression;
+			IMethodBinding methodBinding = invocation.resolveMethodBinding();
+			assertNotNull(methodBinding);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0666() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.util.ArrayList;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	protected String foo() {\n" +
+				"		List c = new ArrayList();\n" +
+				"		c.add(null);\n" +
+				"		return c;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				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";
+			assertProblemsSize(unit, 1, expectedError);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("No fragments", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertEquals("LX;.foo()Ljava/lang/String;#c", variableBinding.getKey());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0666_2() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.util.ArrayList;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	protected String foo() {\n" +
+				"		List c = new ArrayList();\n" +
+				"		c.add(null);\n" +
+				"		return c;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				true,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedError =
+				"List cannot be resolved to a type";
+			assertProblemsSize(unit, 1, expectedError);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("No fragments", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNull("Got a binding", variableBinding);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0667() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.util.ArrayList;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	List foo() {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedError = "List cannot be resolved to a type";
+			assertProblemsSize(unit, 1, expectedError);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration declaration = (MethodDeclaration) node;
+			IMethodBinding binding = declaration.resolveBinding();
+			assertNull("Got a binding", binding);
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0667_2() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.util.ArrayList;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	List foo() {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy,
+				false,
+				false,
+				true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedError = "List cannot be resolved to a type";
+			assertProblemsSize(unit, 1, expectedError);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration declaration = (MethodDeclaration) node;
+			IMethodBinding binding = declaration.resolveBinding();
+			assertNotNull("No binding", binding);
+			assertEquals("LX;.foo()LList;", binding.getKey());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=174298
+	 */
+	public void test0668() throws JavaModelException {
+		assertEquals("Wrong name property", "org.eclipse.jdt.core.dom.SimpleName", AnnotationTypeDeclaration.NAME_PROPERTY.getChildType().getName());
+		assertEquals("Wrong name property", "org.eclipse.jdt.core.dom.SimpleName", EnumDeclaration.NAME_PROPERTY.getChildType().getName());
+		assertEquals("Wrong name property", "org.eclipse.jdt.core.dom.SimpleName", TypeDeclaration.NAME_PROPERTY.getChildType().getName());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=176057
+	 */
+	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);
+		assertNotNull(result);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0670() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.util.ArrayList;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	protected String foo() {\n" +
+				"		List c = new ArrayList();\n" +
+				"		c.add(null);\n" +
+				"		return c;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents);
+			ASTNode node = runConversion(AST.JLS8, 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";
+			assertProblemsSize(unit, 1, expectedError);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("No fragments", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertFalse("Not a recovered binding", variableBinding.isRecovered());
+			ITypeBinding typeBinding = variableBinding.getType();
+			assertNotNull("No binding", typeBinding);
+			assertTrue("Not a recovered binding", typeBinding.isRecovered());
+			assertEquals("Wrong name", "List", typeBinding.getName());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0671() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.util.ArrayList;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	protected String foo() {\n" +
+				"		List[] c[] = new ArrayList();\n" +
+				"		c.add(null);\n" +
+				"		return c;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents);
+			ASTNode node = runConversion(AST.JLS8, 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"	;
+			assertProblemsSize(unit, 1, expectedError);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("No fragments", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertFalse("Unexpected recovered binding", variableBinding.isRecovered());
+			ITypeBinding typeBinding = variableBinding.getType();
+			assertNotNull("No binding", typeBinding);
+			assertTrue("Not a recovered binding", typeBinding.isRecovered());
+			assertEquals("Wrong name", "List[][]", typeBinding.getName());
+			assertEquals("Wrong dimension", 2, typeBinding.getDimensions());
+			ITypeBinding componentType = typeBinding.getComponentType();
+			assertNotNull("No binding", componentType);
+			assertTrue("Not a recovered binding", componentType.isRecovered());
+			assertEquals("Wrong name", "List[]", componentType.getName());
+			componentType = componentType.getComponentType();
+			assertNotNull("No binding", componentType);
+			assertTrue("Not a recovered binding", componentType.isRecovered());
+			assertEquals("Wrong name", "List", componentType.getName());
+			ITypeBinding elementType = typeBinding.getElementType();
+			assertNotNull("No binding", elementType);
+			assertTrue("Not a recovered binding", elementType.isRecovered());
+			assertEquals("Wrong name", "List", elementType.getName());
+
+			typeBinding = statement.getType().resolveBinding();
+			assertNotNull("No binding", typeBinding);
+			assertTrue("Not a recovered binding", typeBinding.isRecovered());
+			assertEquals("Wrong name", "List[]", typeBinding.getName());
+			assertEquals("Wrong dimension", 1, typeBinding.getDimensions());
+			componentType = typeBinding.getComponentType();
+			assertEquals("Wrong name", "List", componentType.getName());
+			assertNotNull("No binding", componentType);
+			assertTrue("Not a recovered binding", componentType.isRecovered());
+			elementType = typeBinding.getElementType();
+			assertNotNull("No binding", elementType);
+			assertTrue("Not a recovered binding", elementType.isRecovered());
+			assertEquals("Wrong name", "List", elementType.getName());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 */
+	public void test0672() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"import java.util.ArrayList;\n" +
+				"\n" +
+				"public class X {\n" +
+				"	protected String foo() {\n" +
+				"		List[][] c = new ArrayList();\n" +
+				"		c.add(null);\n" +
+				"		return c;\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents);
+			ASTNode node = runConversion(AST.JLS8, 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";
+			assertProblemsSize(unit, 1, expectedError);
+			assertTrue("No binding recovery", unit.getAST().hasBindingsRecovery());
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("No fragments", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			assertNotNull("No binding", variableBinding);
+			assertFalse("Unexpected recovered binding", variableBinding.isRecovered());
+			ITypeBinding typeBinding = variableBinding.getType();
+			assertNotNull("No binding", typeBinding);
+			assertTrue("Not a recovered binding", typeBinding.isRecovered());
+			assertEquals("Wrong name", "List[][]", typeBinding.getName());
+			assertEquals("Wrong dimension", 2, typeBinding.getDimensions());
+			ITypeBinding componentType = typeBinding.getComponentType();
+			assertNotNull("No binding", componentType);
+			assertTrue("Not a recovered binding", componentType.isRecovered());
+			assertEquals("Wrong name", "List[]", componentType.getName());
+			ITypeBinding elementType = typeBinding.getElementType();
+			assertNotNull("No binding", elementType);
+			assertTrue("Not a recovered binding", elementType.isRecovered());
+			assertEquals("Wrong name", "List", elementType.getName());
+
+			typeBinding = statement.getType().resolveBinding();
+			assertNotNull("No binding", typeBinding);
+			assertTrue("Not a recovered binding", typeBinding.isRecovered());
+			assertEquals("Wrong name", "List[][]", typeBinding.getName());
+			assertEquals("Wrong dimension", 2, typeBinding.getDimensions());
+			componentType = typeBinding.getComponentType();
+			assertEquals("Wrong name", "List[]", componentType.getName());
+			assertNotNull("No binding", componentType);
+			assertTrue("Not a recovered binding", componentType.isRecovered());
+			elementType = typeBinding.getElementType();
+			assertNotNull("No binding", elementType);
+			assertEquals("Wrong name", "List", elementType.getName());
+			assertTrue("Not a recovered binding", elementType.isRecovered());
+
+			IJavaElement javaElement = elementType.getJavaElement();
+			assertNotNull("No java element", javaElement);
+			assertTrue("Javalement exists", !javaElement.exists());
+			IPackageBinding packageBinding = elementType.getPackage();
+			assertNotNull("No package", packageBinding);
+			assertTrue("Not the default package", packageBinding.isUnnamed());
+			ITypeBinding arrayBinding = elementType.createArrayType(2);
+			assertNotNull("No array binding", arrayBinding);
+			assertEquals("Wrong dimensions", 2, arrayBinding.getDimensions());
+			ITypeBinding elementType2 = arrayBinding.getElementType();
+			assertNotNull("No element type", elementType2);
+			assertNotNull("No key", elementType.getKey());
+			assertTrue("Not equals", elementType2.isEqualTo(elementType));
+
+			node = getASTNode(unit, 0);
+			assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+			TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+			ITypeBinding typeBinding2 = typeDeclaration.resolveBinding();
+			ITypeBinding javaLangObject = typeBinding2.getSuperclass();
+			assertEquals("Not java.lang.Object", "java.lang.Object", javaLangObject.getQualifiedName());
+			assertTrue("Not isCastCompatible", elementType.isCastCompatible(javaLangObject));
+			assertTrue("Not isCastCompatible", elementType.isCastCompatible(elementType2));
+
+			assertTrue("Not isSubTypeCompatible", elementType.isSubTypeCompatible(javaLangObject));
+			assertTrue("Not isSubTypeCompatible", elementType.isSubTypeCompatible(elementType2));
+
+			assertTrue("Not isAssignmentCompatible", elementType.isAssignmentCompatible(javaLangObject));
+			assertTrue("Not isAssignmentCompatible", elementType.isAssignmentCompatible(elementType2));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=180905
+	 */
+	public void test0673() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	B foo() {\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents);
+			ASTNode node = runConversion(AST.JLS8, 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());
+			assertTrue("no statement recovery", unit.getAST().hasStatementsRecovery());
+			assertTrue("no binding resolution", unit.getAST().hasResolvedBindings());
+			String expectedError = "B cannot be resolved to a type";
+			assertProblemsSize(unit, 1, expectedError);
+			assertTrue("No binding recovery", unit.getAST().hasBindingsRecovery());
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+			MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+			Type type = methodDeclaration.getReturnType2();
+			assertNotNull("No type", type);
+			ITypeBinding typeBinding = type.resolveBinding();
+			assertNotNull("No type binding", typeBinding);
+			assertTrue("Not a recovered binding", typeBinding.isRecovered());
+			IJavaElement javaElement = typeBinding.getJavaElement();
+			assertNotNull("No java element", javaElement);
+			assertEquals("Wrong java element type", IJavaElement.TYPE, javaElement.getElementType());
+			assertTrue("Javalement exists", !javaElement.exists());
+			IPackageBinding packageBinding = typeBinding.getPackage();
+			assertNotNull("No package", packageBinding);
+			assertTrue("Not the default package", packageBinding.isUnnamed());
+			ITypeBinding arrayBinding = typeBinding.createArrayType(2);
+			assertNotNull("No array binding", arrayBinding);
+			assertEquals("Wrong dimensions", 2, arrayBinding.getDimensions());
+			ITypeBinding elementType = arrayBinding.getElementType();
+			assertNotNull("No element type", elementType);
+			assertNotNull("No key", typeBinding.getKey());
+			assertTrue("Not equals", elementType.isEqualTo(typeBinding));
+
+			node = getASTNode(unit, 0);
+			assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+			TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+			ITypeBinding typeBinding2 = typeDeclaration.resolveBinding();
+			ITypeBinding javaLangObject = typeBinding2.getSuperclass();
+			assertEquals("Not java.lang.Object", "java.lang.Object", javaLangObject.getQualifiedName());
+			assertTrue("Not isCastCompatible", typeBinding.isCastCompatible(javaLangObject));
+			assertTrue("Not isCastCompatible", typeBinding.isCastCompatible(elementType));
+
+			assertTrue("Not isSubTypeCompatible", typeBinding.isSubTypeCompatible(javaLangObject));
+			assertTrue("Not isSubTypeCompatible", typeBinding.isSubTypeCompatible(elementType));
+
+			assertTrue("Not isAssignmentCompatible", typeBinding.isAssignmentCompatible(javaLangObject));
+			assertTrue("Not isAssignmentCompatible", typeBinding.isAssignmentCompatible(elementType));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=180524
+	 */
+	public void test0674() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	Object foo() {\n" +
+				"		return new Object() {/*anon*/};\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents);
+			ASTNode node = runConversion(AST.JLS8, workingCopy, true, true, true);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+			ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+			ITypeBinding binding = classInstanceCreation.resolveTypeBinding();
+			assertTrue("not an anonymous type", binding.isAnonymous());
+			try {
+				assertNotNull(binding.createArrayType(2));
+			} catch (IllegalArgumentException e) {
+				assertTrue("Should not be rejected", false);
+			}
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=166963
+	 */
+	public void test0675() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	public X(String label) {}\n" +
+				"	public X() {\n" +
+				"		String s= \"foo\";\n" +
+				"		System.out.println(s);\n" +
+				"		this(s);\n" +
+				"		System.out.println(s);\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents);
+			ASTNode node = runConversion(AST.JLS8, 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";
+			assertProblemsSize(unit, 1, expectedError);
+			node = getASTNode(unit, 0, 1, 2);
+			assertEquals("Not a constructor invocation", ASTNode.CONSTRUCTOR_INVOCATION, node.getNodeType());
+			ConstructorInvocation constructorInvocation = (ConstructorInvocation) node;
+			assertNull("Got a binding", constructorInvocation.resolveConstructorBinding());
+			List arguments = constructorInvocation.arguments();
+			assertEquals("wrong size", 1, arguments.size());
+			Expression expression = (Expression) arguments.get(0);
+			ITypeBinding typeBinding = expression.resolveTypeBinding();
+			assertNotNull("No binding", typeBinding);
+			assertEquals("Wrong type", "java.lang.String", typeBinding.getQualifiedName());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=149567
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=180905
+	 */
+	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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit unit = (CompilationUnit) node;
+		assertTrue("no binding recovery", unit.getAST().hasBindingsRecovery());
+		assertTrue("no statement recovery", unit.getAST().hasStatementsRecovery());
+		assertTrue("no binding resolution", unit.getAST().hasResolvedBindings());
+		String expectedError = "B cannot be resolved to a type";
+		assertProblemsSize(unit, 1, expectedError);
+		assertTrue("No binding recovery", unit.getAST().hasBindingsRecovery());
+		node = getASTNode(unit, 0, 0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType());
+		MethodDeclaration methodDeclaration = (MethodDeclaration) node;
+		Type type = methodDeclaration.getReturnType2();
+		assertNotNull("No type", type);
+		ITypeBinding typeBinding = type.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		assertTrue("Not a recovered binding", typeBinding.isRecovered());
+		IJavaElement javaElement = typeBinding.getJavaElement();
+		assertNotNull("No java element", javaElement);
+		assertEquals("Wrong java element type", IJavaElement.TYPE, javaElement.getElementType());
+		assertTrue("Java element exists", !javaElement.exists());
+		IPackageBinding packageBinding = typeBinding.getPackage();
+		assertNotNull("No package", packageBinding);
+		assertNotNull("No java element for package", packageBinding.getJavaElement());
+		assertEquals("Not the package test0676", "test0676", packageBinding.getName());
+		ITypeBinding arrayBinding = typeBinding.createArrayType(2);
+		assertNotNull("No array binding", arrayBinding);
+		assertEquals("Wrong dimensions", 2, arrayBinding.getDimensions());
+		ITypeBinding elementType = arrayBinding.getElementType();
+		assertNotNull("No element type", elementType);
+		assertNotNull("No key", typeBinding.getKey());
+		assertTrue("Not equals", elementType.isEqualTo(typeBinding));
+
+		node = getASTNode(unit, 0);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding2 = typeDeclaration.resolveBinding();
+		ITypeBinding javaLangObject = typeBinding2.getSuperclass();
+		assertEquals("Not java.lang.Object", "java.lang.Object", javaLangObject.getQualifiedName());
+		assertTrue("Not isCastCompatible", typeBinding.isCastCompatible(javaLangObject));
+		assertTrue("Not isCastCompatible", typeBinding.isCastCompatible(elementType));
+
+		assertTrue("Not isSubTypeCompatible", typeBinding.isSubTypeCompatible(javaLangObject));
+		assertTrue("Not isSubTypeCompatible", typeBinding.isSubTypeCompatible(elementType));
+
+		assertTrue("Not isAssignmentCompatible", typeBinding.isAssignmentCompatible(javaLangObject));
+		assertTrue("Not isAssignmentCompatible", typeBinding.isAssignmentCompatible(elementType));
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=185306
+	 */
+	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);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) node;
+		node = getASTNode(unit, 0);
+		assertProblemsSize(unit, 0);
+		assertNotNull(node);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		assertNotNull("No type binding", typeBinding);
+		ITypeBinding superclass = typeBinding.getSuperclass();
+		assertNotNull("No super class", superclass);
+		IMethodBinding[] methods = superclass.getDeclaredMethods();
+		assertNotNull("No methods", methods);
+		assertTrue("Empty", methods.length != 0);
+		IVariableBinding[] fields = superclass.getDeclaredFields();
+		assertNotNull("No fields", fields);
+		assertTrue("Empty", fields.length != 0);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=193979
+	 */
+	public void test0678() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	public String foo() {\n" +
+				"		return((true ? \"\" : (\"Hello\" + \" World\") + \"!\"));\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			workingCopy.getBuffer().setContents(contents.toCharArray());
+			ASTNode node = runConversion(AST.JLS8, workingCopy, true);			
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			String expectedOutput = "Dead code";
+			assertProblemsSize(unit, 1, expectedOutput);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement returnStatement = (ReturnStatement) node;
+			Expression expression = returnStatement.getExpression();
+			assertNotNull("No expression", expression);
+			assertEquals("Not a parenthesized expression", ASTNode.PARENTHESIZED_EXPRESSION, expression.getNodeType());
+			expression = ((ParenthesizedExpression) expression).getExpression();
+			assertEquals("Not a parenthesized expression", ASTNode.PARENTHESIZED_EXPRESSION, expression.getNodeType());
+			expression = ((ParenthesizedExpression) expression).getExpression();
+			assertEquals("Not a conditional expression", ASTNode.CONDITIONAL_EXPRESSION, expression.getNodeType());
+			ConditionalExpression conditionalExpression = (ConditionalExpression) expression;
+			final Expression elseExpression = conditionalExpression.getElseExpression();
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, elseExpression.getNodeType());
+			InfixExpression infixExpression = (InfixExpression) elseExpression;
+			List extendedOperands = infixExpression.extendedOperands();
+			assertEquals("wrong size", 0, extendedOperands.size());
+			Expression leftOperand = infixExpression.getLeftOperand();
+			assertEquals("Not a parenthesized expression", ASTNode.PARENTHESIZED_EXPRESSION, leftOperand.getNodeType());
+			ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) leftOperand;
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, parenthesizedExpression.getExpression().getNodeType());
+			Expression rightOperand = infixExpression.getRightOperand();
+			assertEquals("Not a string literal", ASTNode.STRING_LITERAL, rightOperand.getNodeType());
+			StringLiteral stringLiteral = (StringLiteral) rightOperand;
+			assertEquals("wrong value", "!", stringLiteral.getLiteralValue());
+			infixExpression = (InfixExpression) parenthesizedExpression.getExpression();
+			leftOperand = infixExpression.getLeftOperand();
+			assertEquals("Not a string literal", ASTNode.STRING_LITERAL, leftOperand.getNodeType());
+			stringLiteral = (StringLiteral) leftOperand;
+			assertEquals("wrong value", "Hello", stringLiteral.getLiteralValue());
+			rightOperand = infixExpression.getRightOperand();
+			assertEquals("Not a string literal", ASTNode.STRING_LITERAL, rightOperand.getNodeType());
+			stringLiteral = (StringLiteral) rightOperand;
+			assertEquals("wrong value", " World", stringLiteral.getLiteralValue());
+			assertEquals("Wrong size", 0, infixExpression.extendedOperands().size());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=169745
+	 */
+	public void _test0679() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	int i = 1 - 2 + 3 + 4 + 5;\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0);
+			assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			final List fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 1, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			final Expression initializer = fragment.getInitializer();
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, initializer.getNodeType());
+			InfixExpression infixExpression = (InfixExpression) initializer;
+			final Expression leftOperand = infixExpression.getLeftOperand();
+			assertEquals("Not a number literal", ASTNode.NUMBER_LITERAL, leftOperand.getNodeType());
+			NumberLiteral literal = (NumberLiteral) leftOperand;
+			assertEquals("Wrong value", "1", literal.getToken());
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=196249
+	 */
+	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);
+		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		node = getASTNode(compilationUnit, 0);
+		assertNotNull(node);
+		assertTrue("Not a type declaration", node.getNodeType() == ASTNode.TYPE_DECLARATION); //$NON-NLS-1$
+		TypeDeclaration typeDeclaration = (TypeDeclaration) node;
+		final List modifiers = typeDeclaration.modifiers();
+		assertEquals("Wrong size", 1, modifiers.size());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=196354
+	 */
+	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);
+		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		final PackageDeclaration packageDeclaration = compilationUnit.getPackage();
+		final IPackageBinding packageBinding = packageDeclaration.resolveBinding();
+		assertNotNull("No binding", packageBinding);
+		assertEquals("Wrong name", "Sample", packageBinding.getName());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=196514
+	 */
+	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);
+		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(
+				unit,
+				2,
+				"Variable must provide either dimension expressions or an array initializer\n" +
+				"Syntax error on token \"String\", [ expected after this token");
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		node = expressionStatement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, node.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) node;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		node = (ASTNode)arguments.get(0);
+		assertEquals("Not an array creation", ASTNode.ARRAY_CREATION, node.getNodeType());
+		ArrayCreation arrayCreation = (ArrayCreation) node;
+		ArrayType arrayType = arrayCreation.getType();
+		checkSourceRange(arrayType, "String]", sourceUnit.getSource());
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=196514
+	 */
+	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);
+		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 1, 0);
+		assertEquals("Not a expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		ExpressionStatement expressionStatement = (ExpressionStatement) node;
+		node = expressionStatement.getExpression();
+		assertEquals("Not a method invocation", ASTNode.METHOD_INVOCATION, node.getNodeType());
+		MethodInvocation methodInvocation = (MethodInvocation) node;
+		List arguments = methodInvocation.arguments();
+		assertEquals("Wrong size", 1, arguments.size());
+		node = (ASTNode)arguments.get(0);
+		assertEquals("Not an array creation", ASTNode.ARRAY_CREATION, node.getNodeType());
+		ArrayCreation arrayCreation = (ArrayCreation) node;
+		ArrayType arrayType = arrayCreation.getType();
+		checkSourceRange(arrayType, "String[0][b[10]][]", sourceUnit.getSource());
+		if (this.ast.apiLevel() < AST.JLS8) {
+			node = componentType(arrayType);
+			assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType());
+			arrayType = (ArrayType)node;
+			checkSourceRange(arrayType, "String[0][b[10]]", sourceUnit.getSource());
+			node = componentType(arrayType);
+			assertEquals("Not an array type", ASTNode.ARRAY_TYPE, node.getNodeType());
+			arrayType = (ArrayType)node;
+			checkSourceRange(arrayType, "String[0]", sourceUnit.getSource());
+		} else {
+			node = arrayType.getElementType();
+			checkSourceRange(node, "String", sourceUnit.getSource());
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=201929
+	 */
+	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);
+		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+		ReturnStatement returnStatement = (ReturnStatement) node;
+		Expression expression = returnStatement.getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		final AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		final List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, ((BodyDeclaration) bodyDeclarations.get(0)).getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) bodyDeclarations.get(0);
+		final ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		final String qualifiedName = typeBinding.getQualifiedName();
+		assertEquals("wrong qualified name", "", qualifiedName);
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=201929
+	 */
+	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);
+		assertTrue("Not a compilation unit", node.getNodeType() == ASTNode.COMPILATION_UNIT); //$NON-NLS-1$
+		CompilationUnit unit = (CompilationUnit) node;
+		assertProblemsSize(unit, 0);
+		node = getASTNode(unit, 0, 0, 0);
+		assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType());
+		Expression expression = ((ExpressionStatement) node).getExpression();
+		assertEquals("Not a class instance creation", ASTNode.CLASS_INSTANCE_CREATION, expression.getNodeType());
+		ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) expression;
+		final AnonymousClassDeclaration anonymousClassDeclaration = classInstanceCreation.getAnonymousClassDeclaration();
+		final List bodyDeclarations = anonymousClassDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, ((BodyDeclaration) bodyDeclarations.get(0)).getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) bodyDeclarations.get(0);
+		final ITypeBinding typeBinding = typeDeclaration.resolveBinding();
+		final String qualifiedName = typeBinding.getQualifiedName();
+		assertEquals("wrong qualified name", "", qualifiedName);
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=203579
+	 */
+	public void test0686() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	void foo() {\n" +
+				"		int   a  ,   b  ;\n" +
+				"		for (int  i  ,  j  ;;) {}\n" +
+				"	}\n" +
+				"	int   n  ,   m  ;\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a variable statement declaration", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType());
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) node;
+			List fragments = statement.fragments();
+			assertEquals("Wrong size", 2, fragments.size());
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+			checkSourceRange(fragment, "a", contents);
+			fragment = (VariableDeclarationFragment) fragments.get(1);
+			checkSourceRange(fragment, "b", contents);
+			node = getASTNode(unit, 0, 0, 1);
+			assertEquals("Not a for statement", ASTNode.FOR_STATEMENT, node.getNodeType());
+			ForStatement forStatement = (ForStatement) node;
+			final List initializers = forStatement.initializers();
+			assertEquals("Wrong size", 1, initializers.size());
+			VariableDeclarationExpression expression = (VariableDeclarationExpression) initializers.get(0);
+			fragments = expression.fragments();
+			assertEquals("Wrong size", 2, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			assertFalse("Not a malformed node", isMalformed(fragment));
+			checkSourceRange(fragment, "i", contents);
+			fragment = (VariableDeclarationFragment) fragments.get(1);
+			checkSourceRange(fragment, "j", contents);
+			assertFalse("Not a malformed node", isMalformed(fragment));
+
+			node = getASTNode(unit, 0, 1);
+			assertEquals("Not a field declaration", ASTNode.FIELD_DECLARATION, node.getNodeType());
+			FieldDeclaration fieldDeclaration = (FieldDeclaration) node;
+			fragments = fieldDeclaration.fragments();
+			assertEquals("Wrong size", 2, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			checkSourceRange(fragment, "n", contents);
+			assertFalse("Not a malformed node", isMalformed(fragment));
+			fragment = (VariableDeclarationFragment) fragments.get(1);
+			checkSourceRange(fragment, "m", contents);
+			assertFalse("Not a malformed node", isMalformed(fragment));
+		} finally {
+			if (workingCopy != null)
+				workingCopy.discardWorkingCopy();
+		}
+	}
+
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=207754
+	 */
+	public void test0687() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" +
+				"	protected String foo(String string) {\n" +
+				"		return (\"\" + string + \"\") + (\"\");\n" +
+				"	}\n" +
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ASTNode node = buildAST(
+				contents,
+				workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit unit = (CompilationUnit) node;
+			assertProblemsSize(unit, 0);
+			node = getASTNode(unit, 0, 0, 0);
+			assertEquals("Not a return statement", ASTNode.RETURN_STATEMENT, node.getNodeType());
+			ReturnStatement statement = (ReturnStatement) node;
+			Expression expression = statement.getExpression();
+			checkSourceRange(expression, "(\"\" + string + \"\") + (\"\")", contents);
+			assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, expression.getNodeType());
+			InfixExpression infixExpression = (InfixExpression) expression;
+			Expression leftOperand = infixExpression.getLeftOperand();
+			checkSourceRange(leftOperand, "(\"\" + string + \"\")", contents);
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=215858
+	 */
+	public void test0688() throws JavaModelException {
+		ICompilationUnit sourceUnit = getCompilationUnit("Converter" , "src", "test0688", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType[] types = sourceUnit.getTypes();
+		assertNotNull(types);
+		assertEquals("wrong size", 1, types.length);
+		IType type = types[0];
+		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);
+		assertNotNull(result);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=240815
+	 */
+	public void test0689() throws JavaModelException {
+		IJavaProject project = getJavaProject("Converter");
+		if (project == null) {
+			return;
+		}
+		// replace JCL_LIB with JCL15_LIB, and JCL_SRC with JCL15_SRC
+		IClasspathEntry[] classpath = project.getRawClasspath();
+		try {
+			ArrayList newClasspathEntries = new ArrayList();
+			for (int i = 0, length = classpath.length; i < length; i++) {
+				IClasspathEntry entry = classpath[i];
+				if (entry.getEntryKind() != IClasspathEntry.CPE_VARIABLE) {
+					newClasspathEntries.add(entry);
+				}
+			}
+			IClasspathEntry[] newClasspath = new IClasspathEntry[newClasspathEntries.size()];
+			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);
+			assertNotNull(result);
+			ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
+			assertNull("Should be null", typeBinding);
+		} finally {
+			project.setRawClasspath(classpath, null);
+		}
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=240815
+	 */
+	public void test0690() throws JavaModelException {
+		IJavaProject project = getJavaProject("Converter");
+		if (project == null) {
+			return;
+		}
+		// replace JCL_LIB with JCL15_LIB, and JCL_SRC with JCL15_SRC
+		IClasspathEntry[] classpath = project.getRawClasspath();
+		try {
+			ArrayList newClasspathEntries = new ArrayList();
+			for (int i = 0, length = classpath.length; i < length; i++) {
+				IClasspathEntry entry = classpath[i];
+				if (entry.getEntryKind() != IClasspathEntry.CPE_VARIABLE) {
+					newClasspathEntries.add(entry);
+				}
+			}
+			IClasspathEntry[] newClasspath = new IClasspathEntry[newClasspathEntries.size()];
+			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);
+			assertNotNull(result);
+			ITypeBinding typeBinding = result.getAST().resolveWellKnownType("java.lang.Boolean");
+			assertNull("Should be null", typeBinding);
+		} finally {
+			project.setRawClasspath(classpath, null);
+		}
+	}
+
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=242292
+	 */
+	public void test0691() throws JavaModelException {
+		ICompilationUnit unit = getCompilationUnit("Converter" , "src", "test0691", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		IType type = unit.getType("X");
+		IMethod method = type.getMethod("foo", new String[0]);
+		
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setSource(unit);
+		Hashtable options = JavaCore.getOptions();
+		options.put(JavaCore.COMPILER_DOC_COMMENT_SUPPORT, JavaCore.ENABLED);
+		parser.setCompilerOptions(options);
+		ISourceRange range = method.getSourceRange();
+		parser.setSourceRange(range.getOffset(), range.getLength());
+		ASTNode node = parser.createAST(null);
+		assertNotNull("No node", node);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=242961
+	 */
+	public void test0692() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"/*start*/public class X {\n" +
+				"	int k;\n" +
+				"	Zork z;\n" +
+				"}/*end*/";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			TypeDeclaration typeDeclaration = (TypeDeclaration) buildAST(
+				contents,
+				workingCopy,
+				false,
+				false,
+				false);
+			ITypeBinding binding = typeDeclaration.resolveBinding();
+			IVariableBinding[] declaredFields = binding.getDeclaredFields();
+			assertEquals("Wrong size", 1, declaredFields.length);
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=243715
+	 */
+	public void test0693() throws JavaModelException {
+		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);
+		ASTRequestor requestor = new ASTRequestor() {};
+		ICompilationUnit[] cus = new ICompilationUnit[2];
+		cus[0] = unit;
+		cus[1] = unit2;
+		
+		try {
+			// the following line will throw exception but seemingly shouldn't 
+			parser.createASTs(cus, new String[0], requestor, null);
+		} catch(Exception e) {
+			e.printStackTrace();
+			assertFalse("Should not get there", true);
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=243715
+	 */
+	public void test0694() throws JavaModelException {
+		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);
+		ASTRequestor requestor = new ASTRequestor() {};
+		ICompilationUnit[] cus = new ICompilationUnit[2];
+		cus[0] = unit;
+		cus[1] = unit2;
+		
+		try {
+			// the following line will throw exception but seemingly shouldn't 
+			parser.createASTs(cus, new String[0], requestor, null);
+		} catch(Exception e) {
+			e.printStackTrace();
+			assertFalse("Should not get there", true);
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=245348
+	 */
+	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);
+		parser.setKind(ASTParser.K_COMPILATION_UNIT);
+		parser.setSource(unit.getSource().toCharArray());
+		Map options = JavaCore.getOptions();
+		options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3);
+		options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
+		options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2);
+		parser.setCompilerOptions(options);
+
+		CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
+		ASTVisitor visitor = new ASTVisitor() {
+			public boolean visit(EnumDeclaration node) {
+				assertFalse("Should not be there", true);
+				return false;
+			}
+		};
+		astRoot.accept(visitor);
+		assertEquals("No problem found", 1, astRoot.getProblems().length);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=245348
+	 */
+	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);
+		parser.setKind(ASTParser.K_COMPILATION_UNIT);
+		parser.setSource(unit.getSource().toCharArray());
+		Map options = JavaCore.getOptions();
+		options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3);
+		options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4);
+		options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2);
+		parser.setCompilerOptions(options);
+
+		CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
+		ASTVisitor visitor = new ASTVisitor() {
+			public boolean visit(AnnotationTypeDeclaration node) {
+				assertFalse("Should not be there", true);
+				return false;
+			}
+		};
+		astRoot.accept(visitor);
+		assertEquals("No problem found", 1, astRoot.getProblems().length);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=248246
+	 */
+	public void test0697() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" + 
+				"	/*start*/private void foo() {\n" + 
+				"		Object o = new new Object() {};\n" + 
+				"	}/*end*/\n" + 
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			MethodDeclaration methodDeclaration = (MethodDeclaration) buildAST(
+				contents,
+				workingCopy,
+				false,
+				false,
+				true);
+			Block body = methodDeclaration.getBody();
+			assertEquals("Should contain 1 statement", 1, body.statements().size());
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=248246
+	 */
+	public void test0698a() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" + 
+				"	private void foo() {\n" + 
+				"		Object o = new /*start*/new Object() {}/*end*/;\n" + 
+				"	}\n" + 
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			ExpressionStatement statement = (ExpressionStatement) buildAST(
+				contents,
+				workingCopy,
+				false,
+				true,
+				true);
+			String expectedContents = "new Object() {}";
+			checkSourceRange(statement, expectedContents, new MarkerInfo(contents).source);
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=248246
+	 */
+	public void test0698b() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" + 
+				"	private void foo() {\n" + 
+				"		/*start*/Object o = new /*end*/new Object() {};\n" + 
+				"	}\n" + 
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) buildAST(
+				contents,
+				workingCopy,
+				false,
+				true,
+				true);
+			String expectedContents = "Object o = new ";
+			checkSourceRange(statement, expectedContents, new MarkerInfo(contents).source);
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=264443
+	public void test0699() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/example/Test.java", true/*resolve*/);
+			String contents =
+				"package example;\n" + 
+				"public class Test {\n" + 
+				"	public void test() throws Throwable {\n" + 
+				"		B /*start*/b = new B()/*end*/;\n" + 
+				"	}\n" + 
+				"}";
+	
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			final String key = variableBinding.getKey();
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			parser.setProject(workingCopy.getJavaProject());
+			parser.setResolveBindings(true);
+			parser.setKind(ASTParser.K_COMPILATION_UNIT);
+	
+			parser.createASTs(
+					new ICompilationUnit[] { workingCopy },
+					new String[] { key },
+					new ASTRequestor() {
+						public void acceptBinding(String bindingKey,
+								IBinding binding) {
+							assertEquals("Wrong key", key, bindingKey);
+							assertTrue("Not a variable binding", binding.getKind() == IBinding.VARIABLE);
+						}
+	
+						public void acceptAST(ICompilationUnit source,
+								CompilationUnit astCompilationUnit) {
+						}
+					}, null);
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=264443
+	public void test0700() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/example/Test.java", true/*resolve*/);
+			String contents =
+				"package example;\n" + 
+				"import java.io.IOException;\n" +
+				"public class Test {\n" + 
+				"	public void test() throws IOException, RuntimeException {\n" + 
+				"		B /*start*/b = new B()/*end*/;\n" + 
+				"	}\n" + 
+				"}";
+	
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			final String key = variableBinding.getKey();
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			parser.setProject(workingCopy.getJavaProject());
+			parser.setResolveBindings(true);
+			parser.setKind(ASTParser.K_COMPILATION_UNIT);
+	
+			parser.createASTs(
+					new ICompilationUnit[] { workingCopy },
+					new String[] { key },
+					new ASTRequestor() {
+						public void acceptBinding(String bindingKey,
+								IBinding binding) {
+							assertEquals("Wrong key", key, bindingKey);
+							assertTrue("Not a variable binding", binding.getKind() == IBinding.VARIABLE);
+						}
+	
+						public void acceptAST(ICompilationUnit source,
+								CompilationUnit astCompilationUnit) {
+						}
+					}, null);
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=264443
+	//no thrown exceptions
+	public void test0701() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/example/Test.java", true/*resolve*/);
+			String contents =
+				"package example;\n" + 
+				"import java.io.IOException;\n" +
+				"public class Test {\n" + 
+				"	public void test() {\n" + 
+				"		B /*start*/b = new B()/*end*/;\n" + 
+				"	}\n" + 
+				"}";
+	
+			VariableDeclarationFragment fragment = (VariableDeclarationFragment) buildAST(contents, workingCopy, false, true, true);
+			IVariableBinding variableBinding = fragment.resolveBinding();
+			final String key = variableBinding.getKey();
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
+			parser.setProject(workingCopy.getJavaProject());
+			parser.setResolveBindings(true);
+			parser.setKind(ASTParser.K_COMPILATION_UNIT);
+	
+			parser.createASTs(
+					new ICompilationUnit[] { workingCopy },
+					new String[] { key },
+					new ASTRequestor() {
+						public void acceptBinding(String bindingKey,
+								IBinding binding) {
+							assertEquals("Wrong key", key, bindingKey);
+							assertTrue("Not a variable binding", binding.getKind() == IBinding.VARIABLE);
+						}
+						public void acceptAST(ICompilationUnit source,
+								CompilationUnit astCompilationUnit) {
+						}
+					}, null);
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=270148
+	 */
+	public void test0702() throws JavaModelException {
+		final char[] source = ("void foo() {\n" + 
+				"	Integer I = new ${cursor}\n" +
+				"}").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) root;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) bodyDeclaration;
+		// check if there is a body with one statement in it
+		assertEquals("No statement found", 1, declaration.getBody().statements().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=270148
+	 */
+	public void test0703() throws JavaModelException {
+		final char[] source = ("public class Try {\n" + 
+				"	void foo() {\n" + 
+				"		Integer I = new ${cursor}\n" + 
+				"	}\n" + 
+				"}").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_COMPILATION_UNIT);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a compilation declaration", ASTNode.COMPILATION_UNIT, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) ((CompilationUnit) root).types().get(0);
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, bodyDeclaration.getNodeType());
+		MethodDeclaration declaration = (MethodDeclaration) bodyDeclaration;
+		// check if there is a body with one statement in it
+		assertEquals("No statement found", 1, declaration.getBody().statements().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=270148
+	 */
+	public void test0704() throws JavaModelException {
+		final char[] source = ("{\n" + 
+				"	Integer I = new ${cursor}\n" +
+				"}").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) root;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not an initializer", ASTNode.INITIALIZER, bodyDeclaration.getNodeType());
+		Initializer initializer = (Initializer) bodyDeclaration;
+		// check if there is a body with one statement in it
+		assertEquals("No statement found", 1, initializer.getBody().statements().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=270148
+	 */
+	public void test0705() throws JavaModelException {
+		final char[] source = ("{\n" + 
+				"	Integer I = new ${cursor}\n" +
+				"}\n" +
+				"{\n" + 
+				"	Integer I = new ${cursor}\n" +
+				"}").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) root;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 2, bodyDeclarations.size());
+		BodyDeclaration bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(0);
+		assertEquals("Not an initializer", ASTNode.INITIALIZER, bodyDeclaration.getNodeType());
+		Initializer initializer = (Initializer) bodyDeclaration;
+		// check if there is a body with one statement in it
+		assertEquals("No statement found", 1, initializer.getBody().statements().size());
+		bodyDeclaration = (BodyDeclaration) bodyDeclarations.get(1);
+		assertEquals("Not an initializer", ASTNode.INITIALIZER, bodyDeclaration.getNodeType());
+		initializer = (Initializer) bodyDeclaration;
+		// check if there is a body with one statement in it
+		assertEquals("No statement found", 1, initializer.getBody().statements().size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=270148
+	 */
+	public void test0706() throws JavaModelException {
+		final char[] source = ("public class Try {\n" + 
+				"	Integer i = new Integer() {\n" + 
+				"		Integer I = new ${cursor}\n" + 
+				"	};\"\n" + 
+				"}").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_COMPILATION_UNIT);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a compilation declaration", ASTNode.COMPILATION_UNIT, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) ((CompilationUnit) root).types().get(0);
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=270148
+	 */
+	public void test0707() throws JavaModelException {
+		final char[] source = ("Integer i = new Integer() {\n" + 
+				"	Integer I = new ${cursor}\n" + 
+				"};").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		List bodyDeclarations = ((TypeDeclaration) root).bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=270148
+	 */
+	public void test0708() throws JavaModelException {
+		final char[] source = ("System.out.println()\nint i;\n").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_STATEMENTS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a block", ASTNode.BLOCK, root.getNodeType());
+		Block block = (Block) root;
+		List statements = block.statements();
+		assertEquals("Wrong size", 2, statements.size());
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=270367
+	public void test0709() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			String contents =
+				"public class X {\n" + 
+				"	public Integer test() {\n" + 
+				"		return (new Integer(getId()));\n" + 
+				"	}\n" + 
+				"	public String getId() {\n" + 
+				"		return \"1\";\n" + 
+				"	}\n" + 
+				"}";
+	
+			ASTNode node = buildAST(
+					contents,
+					workingCopy);
+			node.accept(new ASTVisitor() {
+				public boolean visit(ParenthesizedExpression parenthesizedExpression) {
+					assertNotNull(parenthesizedExpression.resolveTypeBinding());
+					return true;
+				}
+			});
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=280079
+	 */
+	public void test0710() throws JavaModelException {
+		final char[] source = (";").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) root;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 0, bodyDeclarations.size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=280079
+	 */
+	public void test0711() throws JavaModelException {
+		final char[] source = (";void foo() {}").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) root;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=280079
+	 */
+	public void test0712() throws JavaModelException {
+		final char[] source = (";void foo() {};").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) root;
+		List bodyDeclarations = typeDeclaration.bodyDeclarations();
+		assertEquals("Wrong size", 1, bodyDeclarations.size());
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=280063
+	 */
+	public void test0713() throws JavaModelException {
+		final char[] source = ("  class MyCommand extends CompoundCommand\n" + 
+				"  {\n" + 
+				"    public void execute()\n" + 
+				"    {\n" + 
+				"      // ...\n" + 
+				"      appendAndExecute(new AddCommand(...));\n" + 
+				"      if (condition) appendAndExecute(new AddCommand(...));\n" + 
+				"    }\n" + 
+				"  }").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(false);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.COMPILATION_UNIT, root.getNodeType());
+		CompilationUnit unit = (CompilationUnit) root;
+		assertTrue("No problem reported", unit.getProblems().length != 0);
+	}
+	/**
+	 * http://dev.eclipse.org/bugs/show_bug.cgi?id=280063
+	 */
+	public void test0714() throws JavaModelException {
+		final char[] source = ("class MyCommand extends CommandBase\n" + 
+				"  {\n" + 
+				"    protected Command subcommand;\n" + 
+				"\n" + 
+				"    //...\n" + 
+				"\n" + 
+				"    public void execute()\n" + 
+				"    {\n" + 
+				"      // ...\n" + 
+				"      Compound subcommands = new CompoundCommand();\n" + 
+				"      subcommands.appendAndExecute(new AddCommand(...));\n" + 
+				"      if (condition) subcommands.appendAndExecute(new AddCommand(...));\n" + 
+				"      subcommand = subcommands.unwrap();\n" + 
+				"    }\n" + 
+				"\n" + 
+				"    public void undo()\n" + 
+				"    {\n" + 
+				"      // ...\n" + 
+				"      subcommand.undo();\n" + 
+				"    }\n" + 
+				"\n" + 
+				"    public void redo()\n" + 
+				"    {\n" + 
+				"      // ...\n" + 
+				"      subcommand.redo();\n" + 
+				"    }\n" + 
+				"\n" + 
+				"    public void dispose()\n" + 
+				"    {\n" + 
+				"      // ...\n" + 
+				"      if (subcommand != null)\n" + 
+				"     {\n" + 
+				"        subcommand.dispose();\n" + 
+				"      }\n" + 
+				"    }\n" + 
+				"  }").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(false);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.COMPILATION_UNIT, root.getNodeType());
+		CompilationUnit unit = (CompilationUnit) root;
+		assertTrue("No problem reported", unit.getProblems().length != 0);
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=288211
+	 */
+	public void test0715() throws JavaModelException {
+		final char[] source = ("System.out.println()\nint i;\n").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_STATEMENTS);
+		parser.setStatementsRecovery(true);
+		parser.setIgnoreMethodBodies(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a block", ASTNode.BLOCK, root.getNodeType());
+		Block block = (Block) root;
+		List statements = block.statements();
+		assertEquals("Wrong size", 2, statements.size());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=288211
+	 */
+	public void test0716() {
+		String src = "switch (state) {case 4:double M0,M1;}";
+		char[] source = src.toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind (ASTParser.K_STATEMENTS);
+		parser.setIgnoreMethodBodies(true);
+		parser.setSource (source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Wrong type", ASTNode.BLOCK, result.getNodeType());
+		Block block = (Block) result;
+		List statements = block.statements();
+		assertNotNull("No statements", statements);
+		assertEquals("Wrong size", 1, statements.size());
+		final ASTNode node = (ASTNode) statements.get(0);
+		assertEquals("Not a switch statement", ASTNode.SWITCH_STATEMENT, node.getNodeType());
+		SwitchStatement statement = (SwitchStatement) node;
+		statements = statement.statements();
+		assertEquals("wrong size", 2, statements.size());
+		assertEquals("Not a switch case", ASTNode.SWITCH_CASE, ((ASTNode) statements.get(0)).getNodeType());
+		assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, ((ASTNode) statements.get(1)).getNodeType());
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=288211
+	 */
+	public void test0717() throws JavaModelException {
+		final char[] source = ("  class MyCommand extends CompoundCommand\n" + 
+				"  {\n" + 
+				"    public void execute()\n" + 
+				"    {\n" + 
+				"      // ...\n" + 
+				"      appendAndExecute(new AddCommand());\n" + 
+				"      if (condition) appendAndExecute(new AddCommand());\n" + 
+				"    }\n" + 
+				"  }").toCharArray();
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
+		parser.setStatementsRecovery(false);
+		parser.setIgnoreMethodBodies(true);
+		parser.setSource(source);
+		ASTNode root = parser.createAST(null);
+		assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, root.getNodeType());
+		TypeDeclaration typeDeclaration = (TypeDeclaration) root;
+		typeDeclaration.accept(new ASTVisitor() {
+			public boolean visit(MethodDeclaration node) {
+				Block body = node.getBody();
+				assertNotNull(body);
+				assertTrue(body.statements().size() == 0);
+				return true;
+			}
+		});
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=296629
+	public void test0718() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			String contents =
+				"public class X {\n" + 
+				"	public void v() {\n" + 
+				"		class Test2 {}\n" + 
+				"		Test2 t = get();\n" + 
+				"		t.toString();\n" + 
+				"	}\n" + 
+				"	public Object get() {return null;}\n" + 
+				"}";
+	
+			CompilationUnit unit = (CompilationUnit) buildAST(
+					contents,
+					workingCopy,
+					false);
+			VariableDeclarationStatement statement = (VariableDeclarationStatement) getASTNode(unit, 0, 0, 1);
+			ITypeBinding typeBinding = statement.getType().resolveBinding();
+			ITypeBinding typeBinding2 = ((VariableDeclarationFragment) statement.fragments().get(0)).getInitializer().resolveTypeBinding();
+			assertTrue("Is not cast compatible", typeBinding.isCastCompatible(typeBinding2));
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=258905
+	public void test0719() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			String contents =
+				"public class X {}";
+	
+			CompilationUnit unit = (CompilationUnit) buildAST(
+					contents,
+					workingCopy,
+					true);
+			final AST currentAst = unit.getAST();
+			// well known bindings
+			String[] wkbs = {
+				"byte", "char", "short", "int", "long", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+				"boolean", "float", "double", "void", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				"java.lang.AssertionError", //$NON-NLS-1$
+				"java.lang.Class", //$NON-NLS-1$
+				"java.lang.Cloneable", //$NON-NLS-1$
+				"java.lang.Error", //$NON-NLS-1$
+				"java.lang.Exception", //$NON-NLS-1$
+				"java.lang.Object", //$NON-NLS-1$
+				"java.lang.RuntimeException", //$NON-NLS-1$
+				"java.lang.String", //$NON-NLS-1$
+				"java.lang.StringBuffer", //$NON-NLS-1$
+				"java.lang.Throwable", //$NON-NLS-1$
+				"java.io.Serializable", //$NON-NLS-1$
+				"java.lang.Boolean", //$NON-NLS-1$
+				"java.lang.Byte", //$NON-NLS-1$
+				"java.lang.Character", //$NON-NLS-1$
+				"java.lang.Double", //$NON-NLS-1$
+				"java.lang.Float", //$NON-NLS-1$
+				"java.lang.Integer", //$NON-NLS-1$
+				"java.lang.Long", //$NON-NLS-1$
+				"java.lang.Short", //$NON-NLS-1$
+				"java.lang.Void", //$NON-NLS-1$
+			};
+
+			// no-so-well-known bindings
+			String[] nwkbs = {
+				"verylong", //$NON-NLS-1$
+				"java.lang.Math", //$NON-NLS-1$
+				"com.example.MyCode", //$NON-NLS-1$
+			};
+
+			// all of the well known bindings resolve
+			for (int i = 0; i<wkbs.length; i++) {
+				assertNotNull("No binding for " + wkbs[i], currentAst.resolveWellKnownType(wkbs[i]));
+			}
+
+			// none of the no so well known bindings resolve
+			for (int i = 0; i<nwkbs.length; i++) {
+				assertNull("Binding for " + nwkbs[i], currentAst.resolveWellKnownType(nwkbs[i]));
+			}
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/**
+	 * http://bugs.eclipse.org/bugs/show_bug.cgi?id=47396
+	 */
+	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);
+		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$
+		ASTNode node = getASTNode(unit, 1, 0);
+		assertNotNull(node);
+		assertTrue("Not a constructor declaration", node.getNodeType() == ASTNode.METHOD_DECLARATION); //$NON-NLS-1$
+		MethodDeclaration declaration = (MethodDeclaration) node;
+		assertTrue("A constructor", !declaration.isConstructor());
+		checkSourceRange(declaration, "public void method(final int parameter) {     }", source, true/*expectMalformed*/);
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=339864
+	 */
+	public void test0721() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		File file = new File(args[0]);\n" + 
+				"		/*start*/try {\n" + 
+				"			FileInputStream fis = new FileInputStream(file);\n" + 
+				"			fis.read();\n" + 
+				"		} catch (FileNotFoundException | IOException e) {\n" + 
+				"			e.printStackTrace();\n" + 
+				"		}/*end*/\n" + 
+				"	}\n" + 
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			TryStatement statement = (TryStatement) buildAST(
+				getJLS3(),
+				contents,
+				workingCopy,
+				false,
+				true,
+				true);
+			CatchClause catchClause = (CatchClause) statement.catchClauses().get(0);
+			assertTrue("Should be malformed", isMalformed(catchClause.getException().getType()));
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=339864
+	 */
+	public void test0722() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"public class X {\n" + 
+				"	public static void main(String[] args) {\n" + 
+				"		File file = new File(args[0]);\n" + 
+				"		/*start*/try (FileInputStream fis = new FileInputStream(file);) {\n" + 
+				"			fis.read();\n" + 
+				"		} catch (IOException e) {\n" + 
+				"			e.printStackTrace();\n" + 
+				"		}/*end*/\n" + 
+				"	}\n" + 
+				"}";
+			workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
+			TryStatement statement = (TryStatement) buildAST(
+				getJLS3(),
+				contents,
+				workingCopy,
+				false,
+				true,
+				true);
+			assertTrue("Should be malformed", isMalformed(statement));
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396
+	 */
+	public void test0723() {
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind (ASTParser.K_STATEMENTS);
+		String src = "int j;\nfor {};\nj=1000;";
+		char[] source = src.toCharArray();
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Wrong type", ASTNode.BLOCK, result.getNodeType());
+		Block block = (Block) result;
+		List statements = block.statements();
+		assertNotNull("No statements", statements);
+		assertEquals("Wrong size", 3, statements.size());
+		assertFalse(isRecovered((ASTNode) statements.get(0)));
+		assertFalse(isRecovered((ASTNode) statements.get(1)));
+		assertFalse(isRecovered((ASTNode) statements.get(2)));
+	}
+
+	/**
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=347396
+	 */
+	public void test0724() {
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setKind (ASTParser.K_COMPILATION_UNIT);
+		String src = "public class X { void foo() {int j;\nfor {};\nj=1000;}}";
+		char[] source = src.toCharArray();
+		parser.setStatementsRecovery(true);
+		parser.setSource(source);
+		ASTNode result = parser.createAST (null);
+		assertNotNull("no result", result);
+		assertEquals("Wrong type", ASTNode.COMPILATION_UNIT, result.getNodeType());
+		Block block = ((MethodDeclaration) getASTNode((CompilationUnit) result, 0, 0)).getBody();
+		List statements = block.statements();
+		assertNotNull("No statements", statements);
+		assertEquals("Wrong size", 3, statements.size());
+		assertFalse(isRecovered((ASTNode) statements.get(0)));
+		assertFalse(isRecovered((ASTNode) statements.get(1)));
+		assertFalse(isRecovered((ASTNode) statements.get(2)));
+	}
+	/*
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=357471
+	 */
+	public void test0725() throws JavaModelException {
+		ICompilationUnit workingCopy = null;
+		try {
+			String contents =
+				"package one.two;\n" +
+				"public class one {}";
+			workingCopy = getWorkingCopy("/Converter/src/one/two/one.java", true/*resolve*/);
+			CompilationUnit unit = (CompilationUnit) buildAST(
+				getJLS3(),
+				contents,
+				workingCopy,
+				true,
+				true,
+				true);
+			PackageDeclaration packageDeclaration = unit.getPackage();
+			IPackageBinding packageBinding = packageDeclaration.resolveBinding();
+			assertNotNull("No binding", packageBinding);
+			assertEquals("Wrong name", "one.two", packageBinding.getName());
+			Name packageName = packageDeclaration.getName();
+			IBinding binding = packageName.resolveBinding();
+			assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind());
+			packageBinding = (IPackageBinding) binding;
+			assertEquals("Wrong name", "one.two", packageBinding.getName());
+			packageName = ((QualifiedName) packageName).getQualifier();
+			binding = packageName.resolveBinding();
+			assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind());
+			packageBinding = (IPackageBinding) binding;
+			assertEquals("Wrong name", "one", packageBinding.getName());
+			packageName = packageDeclaration.getName();
+			packageName = ((QualifiedName) packageName).getName();
+			binding = packageName.resolveBinding();
+			assertEquals("Wrong type", IBinding.PACKAGE, binding.getKind());
+			packageBinding = (IPackageBinding) binding;
+			assertEquals("Wrong name", "one.two", packageBinding.getName());
+		} finally {
+			if (workingCopy != null) {
+				workingCopy.discardWorkingCopy();
+			}
+		}
+	}
+}
\ No newline at end of file
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 32a4447..c86504d 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -22,12 +26,19 @@
 public class ASTMatcherTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase {
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
 	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
 	
+	/**
+	 * Internal synonym for deprecated constant AST.JSL4
+	 * to alleviate deprecation warnings.
+	 * @deprecated
+	 */
+	/*package*/ static final int JLS4_INTERNAL = AST.JLS4;
+	
 	/** @deprecated using deprecated code */
 	public static Test suite() {
 		// TODO (frederic) use buildList + setAstLevel(init) instead...
@@ -39,6 +50,8 @@
 			if (methods[i].getName().startsWith("test")) { //$NON-NLS-1$
 				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));
 			}
 		}
 		return suite;
@@ -62,6 +75,8 @@
 	Block B1;
 	SingleVariableDeclaration V1;
 	SingleVariableDeclaration V2;
+	AnnotatableType R1;
+	Name Q1;
 	VariableDeclarationFragment W1;
 	VariableDeclarationFragment W2;
 	FieldDeclaration FD1;
@@ -95,7 +110,8 @@
 	Modifier MOD2;
 	EnumConstantDeclaration EC1;
 	EnumConstantDeclaration EC2;
-
+	Type T3;
+	Type T4;
 	final StringBuffer b = new StringBuffer();
 
 	int API_LEVEL;
@@ -127,6 +143,10 @@
 		this.S1 = this.ast.newContinueStatement();
 		this.S2 = this.ast.newBreakStatement();
 		this.B1 = this.ast.newBlock();
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			this.R1 = this.ast.newSimpleType(this.ast.newSimpleName("XYZ"));
+			this.Q1 = this.ast.newSimpleName("XYZ");
+		}
 		this.V1 = this.ast.newSingleVariableDeclaration();
 		this.V1.setType(this.ast.newPrimitiveType(PrimitiveType.INT));
 		this.V1.setName(this.ast.newSimpleName("a")); //$NON-NLS-1$
@@ -225,7 +245,10 @@
 			this.EC2 = this.ast.newEnumConstantDeclaration();
 			this.EC2.setName(this.ast.newSimpleName("G")); //$NON-NLS-1$
 		}
-
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			this.T3 = this.ast.newSimpleType(this.ast.newSimpleName("U")); //$NON-NLS-1$
+			this.T4 = this.ast.newSimpleType(this.ast.newSimpleName("V")); //$NON-NLS-1$
+		}
 	}
 
 	protected void tearDown() throws Exception {
@@ -430,6 +453,9 @@
 		public boolean match(PackageDeclaration node, Object other) {
 			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
 		}
+		public boolean match(PackageQualifiedType node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
 		public boolean match(ParameterizedType node, Object other) {
 			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
 		}
@@ -478,6 +504,9 @@
 		public boolean match(SuperMethodInvocation node, Object other) {
 			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
 		}
+		public boolean match(SuperMethodReference node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
 		public boolean match(SwitchCase node, Object other) {
 			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
 		}
@@ -529,6 +558,27 @@
 		public boolean match(WildcardType node, Object other) {
 			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
 		}
+		public boolean match(Dimension node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
+		public boolean match(InstanceofExpression node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
+		public boolean match(LambdaExpression node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
+		public boolean match(CreationReference node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
+		public boolean match(ExpressionMethodReference node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
+		public boolean match(TypeMethodReference node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
+		public boolean match(IntersectionType node, Object other) {
+			return standardBody(node, other, this.superMatch ? super.match(node, other) : false);
+		}
 	}
 
 	/**
@@ -658,7 +708,7 @@
 	}
 
 	public void testUnionType() {
-		if (this.ast.apiLevel() < AST.JLS4) {
+		if (this.ast.apiLevel() < JLS4_INTERNAL) {
 			return;
 		}
 		UnionType x1 = this.ast.newUnionType();
@@ -673,6 +723,15 @@
 	}
 
 	/** @deprecated using deprecated code */
+	public void testPackageQualifiedType() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		Type x1 = this.ast.newPackageQualifiedType(this.ast.newQualifiedName(this.N2, this.N3), this.N1);
+		basicMatch(x1);
+	}
+
+	/** @deprecated using deprecated code */
 	public void testParameterizedType() {
 		if (this.ast.apiLevel() == AST.JLS2) {
 			return;
@@ -823,6 +882,16 @@
 		x1.setLabel(this.N1);
 		basicMatch(x1);
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794
+	public void testCreationReference() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		CreationReference x1 = this.ast.newCreationReference();
+		x1.setType(this.T1);
+		basicMatch(x1);
+	}
+	
 	public void testDoStatement() {
 		DoStatement x1 = this.ast.newDoStatement();
 		x1.setExpression(this.E1);
@@ -878,6 +947,17 @@
 		x1.bodyDeclarations().add(this.FD2);
 		basicMatch(x1);
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794
+	public void testExpressionMethodReference() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		ExpressionMethodReference x1 = this.ast.newExpressionMethodReference();
+		x1.setExpression(this.E1);
+		x1.setName(this.N1);
+		basicMatch(x1);
+	}
+	
 	public void testExpressionStatement() {
 		ExpressionStatement x1 = this.ast.newExpressionStatement(this.E1);
 		basicMatch(x1);
@@ -986,12 +1066,20 @@
 			x1.typeParameters().add(this.TP1);
 			x1.typeParameters().add(this.TP2);
 			x1.setReturnType2(this.T1);
+			if (this.ast.apiLevel() >= AST.JLS8) {
+				x1.setReceiverType(this.R1);
+			}
 		}
 		x1.setName(this.N1);
 		x1.parameters().add(this.V1);
 		x1.parameters().add(this.V2);
-		x1.thrownExceptions().add(this.N2);
-		x1.thrownExceptions().add(this.N3);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			x1.thrownExceptions().add(this.N2);
+			x1.thrownExceptions().add(this.N3);			
+		} else {
+			x1.thrownExceptionTypes().add(this.T3);
+			x1.thrownExceptionTypes().add(this.T4);			
+		}
 		x1.setBody(this.B1);
 		basicMatch(x1);
 	}
@@ -1102,6 +1190,15 @@
 		x1.arguments().add(this.E2);
 		basicMatch(x1);
 	}
+	public void testSuperMethodReference() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		SuperMethodReference x1 = this.ast.newSuperMethodReference();
+		x1.setQualifier(this.N1);
+		x1.setName(this.N2);
+		basicMatch(x1);
+	}
 	public void testSwitchCase() {
 		SwitchCase x1 = this.ast.newSwitchCase();
 		x1.setExpression(this.E1);
@@ -1161,7 +1258,7 @@
 		basicMatch(x1);
 	}
 	public void testTryStatementWithResources() {
-		if (this.ast.apiLevel() < AST.JLS4) {
+		if (this.ast.apiLevel() < JLS4_INTERNAL) {
 			return;
 		}
 		TryStatement x1 = this.ast.newTryStatement();
@@ -1320,4 +1417,285 @@
 		basicMatch(x1);
 	}
 
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391898
+	public void testSingleVariableDeclarationVarargsAnnotation() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		SingleVariableDeclaration x1 = this.ast.newSingleVariableDeclaration();
+		x1.setType(this.T1);
+		x1.setName(this.N1);
+		x1.setVarargs(true);
+		x1.varargsAnnotations().add(this.ANO1);
+		basicMatch(x1);
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886
+	public void testQualifiedTypeAnnotation() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		QualifiedType x1 = this.ast.newQualifiedType(this.T1, this.N1);
+		x1.annotations().add(this.ANO1);
+		x1 = this.ast.newQualifiedType(x1, this.N2);
+		x1.annotations().add(this.ANO2);
+		basicMatch(x1);
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=395886
+	public void testParameterizedQualifiedTypeAnnotation() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		QualifiedType qualifiedType = this.ast.newQualifiedType(this.T1, this.N1); 
+		qualifiedType.annotations().add(this.ANO1);
+		ParameterizedType x1 = this.ast.newParameterizedType(qualifiedType);
+		x1.typeArguments().add(this.ast.newSimpleType(this.ast.newSimpleName("SN1")));
+		qualifiedType = this.ast.newQualifiedType(x1, this.N2);
+		x1 = this.ast.newParameterizedType(qualifiedType);
+		SimpleType simpleType = this.ast.newSimpleType(this.ast.newSimpleName("SN2"));
+		simpleType.annotations().add(this.ANO2);
+		x1.typeArguments().add(simpleType);
+		basicMatch(x1);
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations1() {	
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// simpleType with Annotations
+		SimpleType x1 = this.ast.newSimpleType(this.N1);
+		x1.annotations().add(this.ANO1);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations2() {		
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+  		// Type arguments at parameterized types
+		SimpleType x1 = this.ast.newSimpleType(this.N2);
+		ParameterizedType x2 = this.ast.newParameterizedType(x1);
+		x1 = this.ast.newSimpleType(this.ast.newSimpleName("SN1"));
+		x1.annotations().add(this.ANO1);
+		x1.annotations().add(this.ANO2);		
+		x2.typeArguments().add(x1);
+		basicMatch(x2);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations3() {		
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// type arguments in constructor invocation
+		ConstructorInvocation x1 = this.ast.newConstructorInvocation();
+		SimpleType x2 = this.ast.newSimpleType(this.N1);
+		x2.annotations().add(this.ANO1);
+		x1.typeArguments().add(x2);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations4() {		
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// annotated simple type at class inheritance
+		TypeDeclaration x1 = this.ast.newTypeDeclaration();
+		SimpleType x2 = this.ast.newSimpleType(this.N1);
+		x2.annotations().add(this.ANO1);
+		x1.setSuperclassType(x2);
+		x1.setName(this.N2);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations5() {	
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// constructor invocation results
+		ClassInstanceCreation x1 = this.ast.newClassInstanceCreation();
+		SimpleType x2 = this.ast.newSimpleType(this.N1);
+		x2.annotations().add(this.ANO1);
+		x1.setType(x2);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations6() {	
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// simple type in cast expression
+		CastExpression x1 = this.ast.newCastExpression();
+		SimpleType x2 = this.ast.newSimpleType(this.N1);
+		x2.annotations().add(this.ANO1);
+		x1.setType(x2);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations7() {		
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// simple type type tests
+		InstanceofExpression x1 = this.ast.newInstanceofExpression();
+		SimpleType x2 = this.ast.newSimpleType(this.N1);
+		x2.annotations().add(this.ANO1);
+		x1.setRightOperand(x2);
+		x1.setLeftOperand(this.E1);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations8() {	
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// annotations on wildcard type
+		WildcardType x1 = this.ast.newWildcardType();
+		SimpleType x2 = this.ast.newSimpleType(this.N1);
+		x1.setBound(x2);
+		x1.annotations().add(this.ANO1);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations9() {		
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// annotations on constructor declaration - implying on the object returned.
+		MethodDeclaration x1 = this.ast.newMethodDeclaration();
+		x1.setConstructor(true);
+		x1.setName(this.N1);
+		x1.modifiers().add(this.ANO1);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations10() {		
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// annotations on constructor declaration - implying on the object returned.
+		MethodDeclaration x1 = this.ast.newMethodDeclaration();
+		x1.setConstructor(true);
+		x1.setName(this.N1);
+		SimpleType x2 = this.ast.newSimpleType(this.N2);
+		x2.annotations().add(this.ANO1);
+		x1.setReceiverType(x2);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations11() {	
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		// annotated simple type at class inheritance
+		TypeDeclaration x1 = this.ast.newTypeDeclaration();
+		TypeParameter x2 = this.ast.newTypeParameter();
+		x2.setName(this.ast.newSimpleName("T"));
+		x2.annotations().add(this.ANO1);
+		x1.typeParameters().add(x2);
+		x1.setName(this.N2);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399768
+	public void testTypeAnnotations12() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		VariableDeclarationFragment x1 = this.ast.newVariableDeclarationFragment();
+		x1.setName(this.N1);
+		Dimension x2 = this.ast.newDimension();
+		Annotation Annot = this.ast.newMarkerAnnotation();
+		Annot.setTypeName(this.ast.newSimpleName("NewAnnot1"));
+		x2.annotations().add(Annot);
+		x1.extraDimensions().add(x2);
+		x2 = this.ast.newDimension();
+		Annot = this.ast.newMarkerAnnotation();
+		Annot.setTypeName(this.ast.newSimpleName("NewAnnot2"));
+		x2.annotations().add(Annot);
+		Annot = this.ast.newMarkerAnnotation();
+		Annot.setTypeName(this.ast.newSimpleName("NewAnnot3"));
+		x2.annotations().add(Annot);
+		x1.extraDimensions().add(x2);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399794
+	public void testTypeMethodReference() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		TypeMethodReference x1 = this.ast.newTypeMethodReference();
+		x1.setType(this.T1);
+		x1.setName(this.N1);
+		basicMatch(x1);
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	public void testLambdaExpressions1() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		LambdaExpression x1 = this.ast.newLambdaExpression();
+		VariableDeclarationFragment x2 = this.ast.newVariableDeclarationFragment();
+		x2.setName(this.N1);
+		x1.parameters().add(x2);
+		x1.setBody(this.ast.newBlock());
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	public void testLambdaExpressions2() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		LambdaExpression x1 = this.ast.newLambdaExpression();
+		x1.setBody(this.ast.newBlock());
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	public void testLambdaExpressions3() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		LambdaExpression x1 = this.ast.newLambdaExpression();
+		x1.setBody(this.E1);
+		basicMatch(x1);
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=399793
+	public void testLambdaExpressions4() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		LambdaExpression x1 = this.ast.newLambdaExpression();
+		SingleVariableDeclaration x2 = this.ast.newSingleVariableDeclaration();
+		x2.modifiers().add(this.MOD1);
+		x2.modifiers().add(this.MOD2);
+		x2.setType(this.T1);
+		x2.setName(this.N1);
+		x1.parameters().add(x2);
+		x1.setBody(this.E1);
+		basicMatch(x1);
+	}
+	public void testIntersectionType() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		IntersectionType x1 = this.ast.newIntersectionType();
+		x1.types().add(this.ast.newSimpleType(this.N1));
+		basicMatch(x1);
+	}
 }
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 77ade14..0fd7a86 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
@@ -35,7 +35,7 @@
 	ICompilationUnit workingCopy;
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
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 2c10016..6710c8c 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
@@ -16,6 +20,7 @@
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
 
@@ -36,6 +41,8 @@
 			if (methods[i].getName().startsWith("test")) { //$NON-NLS-1$
 				suite.addTest(new ASTStructuralPropertyTest(methods[i].getName(), AST.JLS2));
 				suite.addTest(new ASTStructuralPropertyTest(methods[i].getName(), AST.JLS3));
+				suite.addTest(new ASTStructuralPropertyTest(methods[i].getName(), AST.JLS4));
+				suite.addTest(new ASTStructuralPropertyTest(methods[i].getName(), AST.JLS8));
 			}
 		}
 		return suite;
@@ -45,6 +52,12 @@
 	ASTParser parser;
 	int API_LEVEL;
 
+	public ASTStructuralPropertyTest(String name) {
+		super(name.substring(0, name.indexOf(" - JLS")));
+		name.indexOf(" - JLS");
+		this.API_LEVEL = Integer.parseInt(name.substring(name.indexOf(" - JLS") + 6));
+	}
+	
 	public ASTStructuralPropertyTest(String name, int apiLevel) {
 		super(name);
 		this.API_LEVEL = apiLevel;
@@ -61,17 +74,8 @@
 		super.tearDown();
 	}
 
-	/** @deprecated using deprecated code */
 	public String getName() {
-		String name = super.getName();
-		switch (this.API_LEVEL) {
-			case AST.JLS2:
-				name = "JLS2 - " + name;
-				break;
-			case AST.JLS3:
-				name = "JLS3 - " + name;
-				break;
-		}
+		String name = super.getName() + " - JLS" + this.API_LEVEL;
 		return name;
 	}
 
@@ -107,11 +111,11 @@
 	public void testStructuralProperties() {
 		final ASTNode root = SampleASTs.oneOfEach(this.ast);
 
-		final Set simpleProperties = new HashSet(400);
-		final Set childProperties = new HashSet(400);
-		final Set childListProperties = new HashSet(400);
-		final Set visitedProperties = new HashSet(400);
-		final Set nodeClasses = new HashSet(100);
+		final Set simpleProperties = new LinkedHashSet(400);
+		final Set childProperties = new LinkedHashSet(400);
+		final Set childListProperties = new LinkedHashSet(400);
+		final Set visitedProperties = new LinkedHashSet(400);
+		final Set nodeClasses = new LinkedHashSet(100);
 
 		ASTVisitor v = new ASTVisitor(true) {
 			public void postVisit(ASTNode node) {
@@ -119,7 +123,6 @@
 				if (me != null) {
 					visitedProperties.add(me);
 				}
-				visitedProperties.add(me);
 				nodeClasses.add(node.getClass());
 				List ps = node.structuralPropertiesForType();
 				for (Iterator it = ps.iterator(); it.hasNext(); ) {
@@ -149,7 +152,7 @@
 		switch(this.API_LEVEL) {
 			case AST.JLS2 :
 				assertEquals("Wrong number of visited node classes", 67, nodeClasses.size());
-				assertEquals("Wrong number of visited properties", 82, visitedProperties.size());
+				assertEquals("Wrong number of visited properties", 81, visitedProperties.size());
 //{ObjectTeams: 2 new simple properties in TypeDeclaration: TEAM_PROPERTY and ROLE_PROPERTY:
 /* orig:				
 				assertEquals("Wrong number of simple properties", 26, simpleProperties.size());
@@ -170,7 +173,7 @@
 				break;
 			case AST.JLS3 :
 				assertEquals("Wrong number of visited node classes", 80, nodeClasses.size());
-				assertEquals("Wrong number of visited properties", 104, visitedProperties.size());
+				assertEquals("Wrong number of visited properties", 103, visitedProperties.size());
 //{ObjectTeams: 2 new simple properties in TypeDeclaration: TEAM_PROPERTY and ROLE_PROPERTY:
 //				1 new property   in ImportDeclaration: BASE_PROPERTY
 /* orig:				
@@ -189,6 +192,53 @@
   :giro */
 				assertEquals("Wrong number of child list properties", 54, childListProperties.size());
 // SH}
+				break;
+			case AST.JLS4 :
+				assertEquals("Wrong number of visited node classes", 81, nodeClasses.size());
+				assertEquals("Wrong number of visited properties", 103, visitedProperties.size());
+//{ObjectTeams: 2 new simple properties in TypeDeclaration: TEAM_PROPERTY and ROLE_PROPERTY:
+//				1 new property   in ImportDeclaration: BASE_PROPERTY
+/* orig:				
+				assertEquals("Wrong number of simple properties", 23, simpleProperties.size());
+  :giro */
+				assertEquals("Wrong number of simple properties", 26, simpleProperties.size());
+				// 2 new child properties: GUARD_PROPERTY (in TypeDeclaration and MethodDeclaration)
+/* orig:
+				assertEquals("Wrong number of child properties", 115, childProperties.size());
+  :giro */
+				assertEquals("Wrong number of child properties", 117, childProperties.size());
+				
+			 // 2 new child list properties: TypeDeclaration.PRECEDENCES_PROPERTY, PackageDeclaration.MODIFIERS_PROPERTY  
+/* orig:
+				assertEquals("Wrong number of child list properties", 54, childListProperties.size());
+  :giro */
+				assertEquals("Wrong number of child list properties", 56, childListProperties.size());
+// SH}			
+				break;
+			case AST.JLS8 :
+				assertEquals("Wrong number of visited node classes", 84, nodeClasses.size());
+				assertEquals("Wrong number of visited properties", 106, visitedProperties.size());
+//{ObjectTeams: 2 new simple properties in TypeDeclaration: TEAM_PROPERTY and ROLE_PROPERTY:
+//				1 new property   in ImportDeclaration: BASE_PROPERTY
+/* orig:				
+				assertEquals("Wrong number of simple properties", 21, simpleProperties.size());
+  :giro */
+				assertEquals("Wrong number of simple properties", 24, simpleProperties.size());
+				// 2 new child properties: GUARD_PROPERTY (in TypeDeclaration and MethodDeclaration)
+/* orig:
+				assertEquals("Wrong number of child properties", 118, childProperties.size());
+  :giro */
+				assertEquals("Wrong number of child properties", 120, childProperties.size());
+				
+			 // 2 new child list properties: TypeDeclaration.PRECEDENCES_PROPERTY, PackageDeclaration.MODIFIERS_PROPERTY  
+/* orig:
+				assertEquals("Wrong number of child list properties", 66, childListProperties.size());
+  :giro */
+				assertEquals("Wrong number of child list properties", 68, childListProperties.size());
+// SH}			
+				break;
+			default :
+				fail();
 		}
 		// visit should rebuild tree
 		ASTNode newRoot = SampleASTs.oneOfEach(this.ast);
@@ -326,6 +376,24 @@
 
 	/** @deprecated using deprecated code */
 	public void testCreateInstance() {
+		int maxNodeType;
+		switch (this.ast.apiLevel()) {
+			case AST.JLS2:
+				maxNodeType = 69;
+				break;
+			case AST.JLS3:
+				maxNodeType = 83;
+				break;
+			case AST.JLS4:
+				maxNodeType = 84;
+				break;
+			case AST.JLS8:
+				maxNodeType = 92;
+				break;
+			default:
+				fail();
+				return;
+		}
 		for (int nodeType = 0; nodeType < 100; nodeType++) {
 			Class nodeClass = null;
 			try {
@@ -341,24 +409,12 @@
 						// good: OT node
 					} else
 // SH}
-					if (this.ast.apiLevel() == AST.JLS2) {
-						assertTrue((nodeType >= 1) && (nodeType <= 69));
-					} else if (this.ast.apiLevel() == AST.JLS3) {
-						assertTrue((nodeType >= 1) && (nodeType <= 83));
-					} else if (this.ast.apiLevel() == AST.JLS4) {
-						assertTrue((nodeType >= 1) && (nodeType <= 84));
-					}
+					assertTrue(nodeType <= maxNodeType);
 					assertTrue(node.getNodeType() == nodeType);
 					//ASTNode node2 = ast.createInstance(nodeType);
 					//assertTrue(node2.getNodeType() == nodeType);
 				} catch (RuntimeException e) {
-					if (this.ast.apiLevel() == AST.JLS2) {
-						assertTrue((nodeType < 1) || (nodeType > 69));
-					} else if (this.ast.apiLevel() == AST.JLS3) {
-						assertTrue((nodeType < 1) || (nodeType > 83));
-					} else if (this.ast.apiLevel() == AST.JLS4) {
-						assertTrue((nodeType < 1) || (nodeType > 84));
-					}
+					assertTrue((nodeType < 1) || (nodeType > maxNodeType));
 				}
 			}
 		}
@@ -370,7 +426,7 @@
 		Set classes = new HashSet(100);
 		// make sure node types are contiguous starting at 0
 		int hi = 0;
-		for (int nodeType = 1; nodeType < 100; nodeType++) { 
+		for (int nodeType = 1; nodeType < 100; nodeType++) {
   :giro */
 		Set classes = new HashSet(120);
 		// make sure node types are contiguous starting at 0
@@ -391,10 +447,10 @@
 		}
 // {ObjectTeams: adapted for OT specific ASTNodes		
 /* orig:
-		assertTrue(hi == 84); // last known one
+		assertEquals("Wrong last known type", 92, hi); // last known one
   :giro */
-		assertTrue(hi == 100); // last known one
+		assertEquals("Wrong last known type", 108, hi); // last known one
 // jwl}		
-		assertTrue(classes.size() == hi); // all classes are distinct
+		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 5afe3a7..a4647cb 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
@@ -12,17 +16,19 @@
 
 package org.eclipse.jdt.core.tests.dom;
 
+import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
-import java.util.Set;
-
 import java.util.Map;
 
+import junit.framework.AssertionFailedError;
 import junit.framework.Test;
+
 import org.eclipse.jdt.core.dom.*;
 
 // testing
@@ -30,7 +36,7 @@
 public class ASTTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase {
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
@@ -746,6 +752,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));
 			}
 		}
 		return suite;
@@ -754,6 +761,11 @@
 	AST ast;
 	int API_LEVEL;
 
+	public ASTTest(String name) {
+		super(name.substring(0, name.indexOf(" - JLS")));
+		name.indexOf(" - JLS");
+		this.API_LEVEL = Integer.parseInt(name.substring(name.indexOf(" - JLS") + 6));
+	}
 
 	public ASTTest(String name, int apiLevel) {
 		super(name);
@@ -770,21 +782,21 @@
 		super.tearDown();
 	}
 
-	/** @deprecated using deprecated code */
 	public String getName() {
-		String name = super.getName();
-		switch (this.API_LEVEL) {
-			case AST.JLS2:
-				name = "JLS2 - " + name;
-				break;
-			case JLS3_INTERNAL:
-				name = "JLS3 - " + name;
-				break;
-		}
+		String name = super.getName() + " - JLS" + this.API_LEVEL;
 		return name;
 	}
 
 	/**
+	 * Internal access method to VariableDeclarationFragment#setExtraDimensions for avoiding deprecated warnings.
+	 *
+	 * @param node
+	 * @deprecated
+	 */
+	private void setExtraDimensions(VariableDeclarationFragment node, int dimensions) {
+		node.setExtraDimensions(dimensions);
+	}
+	/**
 	 * Snippets that show how to...
 	 * @deprecated using deprecated code
 	 */
@@ -2055,6 +2067,18 @@
 		assertTrue(PrimitiveType.toCode("not-a-type") == null); //$NON-NLS-1$
 	}
 
+	/**
+	 * @deprecated
+	 */
+	Type getArrayComponentType(ArrayType array) {
+		return array.getComponentType();
+	}
+	/**
+	 * @deprecated
+	 */
+	void setArrayComponentType(ArrayType array, Type type) {
+		array.setComponentType(type);
+	}
 	public void testArrayType() {
 		SimpleName x1 = this.ast.newSimpleName("String"); //$NON-NLS-1$
 		SimpleType x2 = this.ast.newSimpleType(x1);
@@ -2064,7 +2088,11 @@
 		previousCount = this.ast.modificationCount();
 		assertTrue(x.getAST() == this.ast);
 		assertTrue(x.getParent() == null);
-		assertTrue(x.getComponentType().getParent() == x);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			assertTrue(getArrayComponentType(x).getParent() == x);
+		} else {
+			assertTrue(x.getElementType().getParent() == x);
+		}
 		// make sure that reading did not change modification count
 		assertTrue(this.ast.modificationCount() == previousCount);
 		assertTrue(!x.isSimpleType());
@@ -2079,39 +2107,69 @@
 		assertTrue(x.getDimensions() == 1);
 		assertTrue(x.getElementType() == x2);
 
-		genericPropertyTest(x, new Property("ComponentType", true, Type.class) { //$NON-NLS-1$
-			public ASTNode sample(AST targetAst, boolean parented) {
-				SimpleType result = targetAst.newSimpleType(
-					targetAst.newSimpleName("a")); //$NON-NLS-1$
-				if (parented) {
-					targetAst.newArrayType(result);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			genericPropertyTest(x, new Property("ComponentType", true, Type.class) { //$NON-NLS-1$
+				public ASTNode sample(AST targetAst, boolean parented) {
+					SimpleType result = targetAst.newSimpleType(
+						targetAst.newSimpleName("a")); //$NON-NLS-1$
+					if (parented) {
+						targetAst.newArrayType(result);
+					}
+					return result;
 				}
-				return result;
-			}
-			public ASTNode wrap() {
-				ArrayType result = ASTTest.this.ast.newArrayType(x);
-				return result;
-			}
-			public void unwrap() {
-				ArrayType a = (ArrayType) x.getParent();
-				a.setComponentType(ASTTest.this.ast.newPrimitiveType(PrimitiveType.INT));
-			}
-			public ASTNode get() {
-				return x.getComponentType();
-			}
-			public void set(ASTNode value) {
-				x.setComponentType((Type) value);
-			}
-		});
+				public ASTNode wrap() {
+					ArrayType result = ASTTest.this.ast.newArrayType(x);
+					return result;
+				}
+				public void unwrap() {
+					ArrayType a = (ArrayType) x.getParent();
+					setArrayComponentType(a, ASTTest.this.ast.newPrimitiveType(PrimitiveType.INT));
+				}
+				public ASTNode get() {
+					return getArrayComponentType(x);
+				}
+				public void set(ASTNode value) {
+					setArrayComponentType(x, (Type) value);
+				}
+			});
 
-		x.setComponentType(
-			this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 4));
+			setArrayComponentType(x,
+				this.ast.newArrayType(this.ast.newPrimitiveType(PrimitiveType.INT), 4));
+			assertTrue(x.getDimensions() == 5);
+			assertTrue(x.getElementType().isPrimitiveType());
+			final ArrayType x3 = this.ast.newArrayType(x, 2);
+			assertTrue(x3.getDimensions() == 7);
+		} else {
+			genericPropertyTest(x, new Property("ElementType", true, Type.class) { //$NON-NLS-1$
+				public ASTNode sample(AST targetAst, boolean parented) {
+					SimpleType result = targetAst.newSimpleType(
+						targetAst.newSimpleName("a")); //$NON-NLS-1$
+					if (parented) {
+						targetAst.newArrayType(result);
+					}
+					return result;
+				}
+				public ASTNode wrap() {
+					ArrayType result = ASTTest.this.ast.newArrayType(x, 5);
+					return result;
+				}
+				public void unwrap() {
+					ArrayType a = (ArrayType) x.getParent();
+					a.setElementType(ASTTest.this.ast.newPrimitiveType(PrimitiveType.INT));
+				}
+				public ASTNode get() {
+					return x.getElementType();
+				}
+				public void set(ASTNode value) {
+					x.setElementType((Type) value);
+				}
+			});
 
-		assertTrue(x.getDimensions() == 5);
-		assertTrue(x.getElementType().isPrimitiveType());
-		final ArrayType x3 = this.ast.newArrayType(x, 2);
-		assertTrue(x3.getDimensions() == 7);
-		
+			x.setElementType(this.ast.newPrimitiveType(PrimitiveType.INT));
+			assertTrue(x.getDimensions() == 1);
+			assertTrue(x.getElementType().isPrimitiveType());
+		}
+
 		try {
 			this.ast.newArrayType(null, 2);
 		} catch(IllegalArgumentException e) {
@@ -3164,12 +3222,20 @@
 		}
 
 		previousCount = this.ast.modificationCount();
-		x.setExtraDimensions(1);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			x.setExtraDimensions(1);
+		} else {
+			x.extraDimensions().add(this.ast.newDimension());
+		}
 		assertTrue(this.ast.modificationCount() > previousCount);
 		assertTrue(x.getExtraDimensions() == 1);
 
 		previousCount = this.ast.modificationCount();
-		x.setExtraDimensions(0);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			x.setExtraDimensions(0);
+		} else {
+			x.extraDimensions().remove(0);
+		}
 		assertTrue(this.ast.modificationCount() > previousCount);
 		assertTrue(x.getExtraDimensions() == 0);
 
@@ -3268,6 +3334,19 @@
 			}
 		});
 
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			genericPropertyListTest(x, x.extraDimensions(),
+					new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$
+						public ASTNode sample(AST targetAst, boolean parented) {
+							Dimension result = targetAst.newDimension();
+							if (parented) {
+								targetAst.newMethodDeclaration().extraDimensions().add(result);
+							}
+							return result;
+						}
+					});
+		}
+		
 		genericPropertyTest(x, new Property("Initializer", false, Expression.class) { //$NON-NLS-1$
 			public ASTNode sample(AST targetAst, boolean parented) {
 				SimpleName result = targetAst.newSimpleName("foo"); //$NON-NLS-1$
@@ -3313,21 +3392,31 @@
 		assertTrue(this.ast.modificationCount() == previousCount);
 
 		previousCount = this.ast.modificationCount();
-		x.setExtraDimensions(1);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			setExtraDimensions(x, 1);
+		} else {
+			x.extraDimensions().add(this.ast.newDimension());
+		}
 		assertTrue(this.ast.modificationCount() > previousCount);
 		assertTrue(x.getExtraDimensions() == 1);
 
 		previousCount = this.ast.modificationCount();
-		x.setExtraDimensions(0);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			setExtraDimensions(x, 0);
+		} else {
+			x.extraDimensions().remove(0);
+		}
 		assertTrue(this.ast.modificationCount() > previousCount);
 		assertTrue(x.getExtraDimensions() == 0);
 
 		// check that property cannot be set negative
-		try {
-			x.setExtraDimensions(-1);
-			assertTrue(false);
-		} catch (RuntimeException e) {
-			// pass
+		if (this.ast.apiLevel() < AST.JLS8) {
+			try {
+				setExtraDimensions(x, -1);
+				fail();
+			} catch (IllegalArgumentException e) {
+				// pass
+			}
 		}
 
 		genericPropertyTest(x, new Property("Name", true, SimpleName.class) { //$NON-NLS-1$
@@ -3346,6 +3435,19 @@
 			}
 		});
 
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			genericPropertyListTest(x, x.extraDimensions(),
+					new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$
+						public ASTNode sample(AST targetAst, boolean parented) {
+							Dimension result = targetAst.newDimension();
+							if (parented) {
+								targetAst.newMethodDeclaration().extraDimensions().add(result);
+							}
+							return result;
+						}
+					});
+		}
+		
 		genericPropertyTest(x, new Property("Initializer", false, Expression.class) { //$NON-NLS-1$
 			public ASTNode sample(AST targetAst, boolean parented) {
 				SimpleName result = targetAst.newSimpleName("foo"); //$NON-NLS-1$
@@ -3412,7 +3514,11 @@
 		assertTrue(x.getExtraDimensions() == 0);
 		assertTrue(x.getJavadoc() == null);
 		assertTrue(x.parameters().size() == 0);
-		assertTrue(x.thrownExceptions().size() == 0);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			assertTrue(x.thrownExceptions().size() == 0);			
+		} else {
+			assertTrue(x.thrownExceptionTypes().size() == 0);			
+		}
 		assertTrue(x.getBody() == null);
 		assertTrue(x.getNodeType() == ASTNode.METHOD_DECLARATION);
 		assertTrue(x.structuralPropertiesForType() ==
@@ -3448,12 +3554,20 @@
 		}
 
 		previousCount = this.ast.modificationCount();
-		x.setExtraDimensions(1);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			x.setExtraDimensions(1);
+		} else {
+			x.extraDimensions().add(this.ast.newDimension());
+		}
 		assertTrue(this.ast.modificationCount() > previousCount);
 		assertTrue(x.getExtraDimensions() == 1);
 
 		previousCount = this.ast.modificationCount();
-		x.setExtraDimensions(0);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			x.setExtraDimensions(0);
+		} else {
+			x.extraDimensions().remove(0);
+		}
 		assertTrue(this.ast.modificationCount() > previousCount);
 		assertTrue(x.getExtraDimensions() == 0);
 
@@ -3527,6 +3641,19 @@
 			});
 		}
 
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			genericPropertyListTest(x, x.extraDimensions(),
+					new Property("ExtraDimensions", true, Dimension.class) { //$NON-NLS-1$
+						public ASTNode sample(AST targetAst, boolean parented) {
+							Dimension result = targetAst.newDimension();
+							if (parented) {
+								targetAst.newMethodDeclaration().extraDimensions().add(result);
+							}
+							return result;
+						}
+					});
+		}
+		
 		genericPropertyListTest(x, x.parameters(),
 		  new Property("Parameters", true, SingleVariableDeclaration.class) { //$NON-NLS-1$
 			public ASTNode sample(AST targetAst, boolean parented) {
@@ -3552,16 +3679,29 @@
 			}
 		});
 
-		genericPropertyListTest(x, x.thrownExceptions(),
-		  new Property("ThrownExceptions", true, Name.class) { //$NON-NLS-1$
-			public ASTNode sample(AST targetAst, boolean parented) {
-				SimpleName result = targetAst.newSimpleName("foo"); //$NON-NLS-1$
-				if (parented) {
-					targetAst.newExpressionStatement(result);
-				}
-				return result;
-			}
-		});
+		if (this.ast.apiLevel() < AST.JLS8) {
+			genericPropertyListTest(x, x.thrownExceptions(),
+					  new Property("ThrownExceptions", true, Name.class) { //$NON-NLS-1$
+						public ASTNode sample(AST targetAst, boolean parented) {
+							SimpleName result = targetAst.newSimpleName("foo"); //$NON-NLS-1$
+							if (parented) {
+								targetAst.newExpressionStatement(result);
+							}
+							return result;
+						}
+					});			
+		} else {
+			genericPropertyListTest(x, x.thrownExceptionTypes(),
+					  new Property("ThrownExceptionTypes", true, Type.class) { //$NON-NLS-1$
+						public ASTNode sample(AST targetAst, boolean parented) {
+							Type result = targetAst.newSimpleType(targetAst.newSimpleName("foo")); //$NON-NLS-1$
+							if (parented) {
+								targetAst.newArrayType(result);
+							}
+							return result;
+						}
+					});			
+		}
 
 		genericPropertyTest(x, new Property("Body", false, Block.class) { //$NON-NLS-1$
 			public ASTNode sample(AST targetAst, boolean parented) {
@@ -3606,11 +3746,13 @@
 			x.parameters().add(this.ast.newSingleVariableDeclaration());
 			assertTrue(!x.isVarargs()); // only last param counts
 		}
-		try {
-			x.setExtraDimensions(-1);
-			assertTrue("Should fail", false);
-		} catch(IllegalArgumentException e) {
-			// pass
+		if (this.ast.apiLevel() < AST.JLS8) {
+			try {
+				x.setExtraDimensions(-1);
+				fail("Should fail");
+			} catch(IllegalArgumentException e) {
+				// pass
+			}
 		}
 	}
 
@@ -5580,7 +5722,8 @@
 				this.ast.newModifier(Modifier.ModifierKeyword.SYNCHRONIZED_KEYWORD),
 				this.ast.newModifier(Modifier.ModifierKeyword.TRANSIENT_KEYWORD),
 				this.ast.newModifier(Modifier.ModifierKeyword.VOLATILE_KEYWORD),
-				this.ast.newModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD)
+				this.ast.newModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD),
+				this.ast.newModifier(Modifier.ModifierKeyword.DEFAULT_KEYWORD)
 		};
 		return allMods;
 	}
@@ -8385,7 +8528,7 @@
 	 * @param x the annotation to test
      * @since 3.0
 	 */
-	public void tAnnotationName(final Annotation x) {
+	void tAnnotationName(final Annotation x) {
 		genericPropertyTest(x, new Property("TypeName", true, Name.class) { //$NON-NLS-1$
 			public ASTNode sample(AST targetAst, boolean parented) {
 				SimpleName result = targetAst.newSimpleName("a"); //$NON-NLS-1$
@@ -8496,6 +8639,7 @@
 		assertTrue(Modifier.ModifierKeyword.TRANSIENT_KEYWORD.toString().equals("transient")); //$NON-NLS-1$
 		assertTrue(Modifier.ModifierKeyword.VOLATILE_KEYWORD.toString().equals("volatile")); //$NON-NLS-1$
 		assertTrue(Modifier.ModifierKeyword.STRICTFP_KEYWORD.toString().equals("strictfp")); //$NON-NLS-1$
+		assertTrue(Modifier.ModifierKeyword.DEFAULT_KEYWORD.toString().equals("default")); //$NON-NLS-1$
 
 		final Modifier.ModifierKeyword[] known = {
 			Modifier.ModifierKeyword.PUBLIC_KEYWORD,
@@ -8509,6 +8653,7 @@
 			Modifier.ModifierKeyword.TRANSIENT_KEYWORD,
 			Modifier.ModifierKeyword.VOLATILE_KEYWORD,
 			Modifier.ModifierKeyword.STRICTFP_KEYWORD,
+			Modifier.ModifierKeyword.DEFAULT_KEYWORD
 		};
 
 		// check all modifiers are distinct
@@ -8604,190 +8749,167 @@
 		assertTrue(subtreeBytes > 0);
 	}
 
-	public void testNodeTypeConstants() {
+	public void testNodeTypeConstants() throws Exception {
 		// it would be a breaking API change to change the numeric values of
 		// public static final ints
-		assertSame(ASTNode.ANONYMOUS_CLASS_DECLARATION, 1);
-		assertSame(ASTNode.ARRAY_ACCESS, 2);
-		assertSame(ASTNode.ARRAY_CREATION, 3);
-		assertSame(ASTNode.ARRAY_INITIALIZER, 4);
-		assertSame(ASTNode.ARRAY_TYPE, 5);
-		assertSame(ASTNode.ASSERT_STATEMENT, 6);
-		assertSame(ASTNode.ASSIGNMENT, 7);
-		assertSame(ASTNode.BLOCK, 8);
-		assertSame(ASTNode.BOOLEAN_LITERAL, 9);
-		assertSame(ASTNode.BREAK_STATEMENT, 10);
-		assertSame(ASTNode.CAST_EXPRESSION, 11);
-		assertSame(ASTNode.CATCH_CLAUSE, 12);
-		assertSame(ASTNode.CHARACTER_LITERAL, 13);
-		assertSame(ASTNode.CLASS_INSTANCE_CREATION, 14);
-		assertSame(ASTNode.COMPILATION_UNIT, 15);
-		assertSame(ASTNode.CONDITIONAL_EXPRESSION, 16);
-		assertSame(ASTNode.CONSTRUCTOR_INVOCATION, 17);
-		assertSame(ASTNode.CONTINUE_STATEMENT, 18);
-		assertSame(ASTNode.DO_STATEMENT, 19);
-		assertSame(ASTNode.EMPTY_STATEMENT, 20);
-		assertSame(ASTNode.EXPRESSION_STATEMENT, 21);
-		assertSame(ASTNode.FIELD_ACCESS, 22);
-		assertSame(ASTNode.FIELD_DECLARATION, 23);
-		assertSame(ASTNode.FOR_STATEMENT, 24);
-		assertSame(ASTNode.IF_STATEMENT, 25);
-		assertSame(ASTNode.IMPORT_DECLARATION, 26);
-		assertSame(ASTNode.INFIX_EXPRESSION, 27);
-		assertSame(ASTNode.INITIALIZER, 28);
-		assertSame(ASTNode.JAVADOC, 29);
-		assertSame(ASTNode.LABELED_STATEMENT, 30);
-		assertSame(ASTNode.METHOD_DECLARATION, 31);
-		assertSame(ASTNode.METHOD_INVOCATION, 32);
-		assertSame(ASTNode.NULL_LITERAL, 33);
-		assertSame(ASTNode.NUMBER_LITERAL, 34);
-		assertSame(ASTNode.PACKAGE_DECLARATION, 35);
-		assertSame(ASTNode.PARENTHESIZED_EXPRESSION, 36);
-		assertSame(ASTNode.POSTFIX_EXPRESSION, 37);
-		assertSame(ASTNode.PREFIX_EXPRESSION, 38);
-		assertSame(ASTNode.PRIMITIVE_TYPE, 39);
-		assertSame(ASTNode.QUALIFIED_NAME, 40);
-		assertSame(ASTNode.RETURN_STATEMENT, 41);
-		assertSame(ASTNode.SIMPLE_NAME, 42);
-		assertSame(ASTNode.SIMPLE_TYPE, 43);
-		assertSame(ASTNode.SINGLE_VARIABLE_DECLARATION, 44);
-		assertSame(ASTNode.STRING_LITERAL, 45);
-		assertSame(ASTNode.SUPER_CONSTRUCTOR_INVOCATION, 46);
-		assertSame(ASTNode.SUPER_FIELD_ACCESS, 47);
-		assertSame(ASTNode.SUPER_METHOD_INVOCATION, 48);
-		assertSame(ASTNode.SWITCH_CASE, 49);
-		assertSame(ASTNode.SWITCH_STATEMENT, 50);
-		assertSame(ASTNode.SYNCHRONIZED_STATEMENT, 51);
-		assertSame(ASTNode.THIS_EXPRESSION, 52);
-		assertSame(ASTNode.THROW_STATEMENT, 53);
-		assertSame(ASTNode.TRY_STATEMENT, 54);
-		assertSame(ASTNode.TYPE_DECLARATION, 55);
-		assertSame(ASTNode.TYPE_DECLARATION_STATEMENT, 56);
-		assertSame(ASTNode.TYPE_LITERAL, 57);
-		assertSame(ASTNode.VARIABLE_DECLARATION_EXPRESSION, 58);
-		assertSame(ASTNode.VARIABLE_DECLARATION_FRAGMENT, 59);
-		assertSame(ASTNode.VARIABLE_DECLARATION_STATEMENT, 60);
-		assertSame(ASTNode.WHILE_STATEMENT, 61);
-		assertSame(ASTNode.INSTANCEOF_EXPRESSION, 62);
-		assertSame(ASTNode.LINE_COMMENT, 63);
-		assertSame(ASTNode.BLOCK_COMMENT, 64);
-		assertSame(ASTNode.TAG_ELEMENT, 65);
-		assertSame(ASTNode.TEXT_ELEMENT, 66);
-		assertSame(ASTNode.MEMBER_REF, 67);
-		assertSame(ASTNode.METHOD_REF, 68);
-		assertSame(ASTNode.METHOD_REF_PARAMETER, 69);
-		assertSame(ASTNode.ENHANCED_FOR_STATEMENT, 70);
-		assertSame(ASTNode.ENUM_DECLARATION, 71);
-		assertSame(ASTNode.ENUM_CONSTANT_DECLARATION, 72);
-		assertSame(ASTNode.TYPE_PARAMETER, 73);
-		assertSame(ASTNode.PARAMETERIZED_TYPE, 74);
-		assertSame(ASTNode.QUALIFIED_TYPE, 75);
-		assertSame(ASTNode.WILDCARD_TYPE, 76);
-		assertSame(ASTNode.NORMAL_ANNOTATION, 77);
-		assertSame(ASTNode.MARKER_ANNOTATION, 78);
-		assertSame(ASTNode.SINGLE_MEMBER_ANNOTATION, 79);
-		assertSame(ASTNode.MEMBER_VALUE_PAIR, 80);
-		assertSame(ASTNode.ANNOTATION_TYPE_DECLARATION, 81);
-		assertSame(ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION, 82);
-		assertSame(ASTNode.MODIFIER, 83);
-
-		// ensure that all constants are distinct, positive, and small
-		// (this may seem paranoid, but this test did uncover a stupid bug!)
-		int[] all= {
-	      	  ASTNode.ANNOTATION_TYPE_DECLARATION,
-			  ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION,
-              ASTNode.ANONYMOUS_CLASS_DECLARATION,
-              ASTNode.ARRAY_ACCESS,
-              ASTNode.ARRAY_CREATION,
-              ASTNode.ARRAY_INITIALIZER,
-              ASTNode.ARRAY_TYPE,
-              ASTNode.ASSERT_STATEMENT,
-              ASTNode.ASSIGNMENT,
-              ASTNode.BLOCK,
-        	  ASTNode.BLOCK_COMMENT,
-              ASTNode.BOOLEAN_LITERAL,
-              ASTNode.BREAK_STATEMENT,
-              ASTNode.CAST_EXPRESSION,
-              ASTNode.CATCH_CLAUSE,
-              ASTNode.CHARACTER_LITERAL,
-              ASTNode.CLASS_INSTANCE_CREATION,
-              ASTNode.COMPILATION_UNIT,
-              ASTNode.CONDITIONAL_EXPRESSION,
-              ASTNode.CONSTRUCTOR_INVOCATION,
-              ASTNode.CONTINUE_STATEMENT,
-              ASTNode.DO_STATEMENT,
-              ASTNode.EMPTY_STATEMENT,
-              ASTNode.ENHANCED_FOR_STATEMENT,
-              ASTNode.ENUM_CONSTANT_DECLARATION,
-              ASTNode.ENUM_DECLARATION,
-              ASTNode.EXPRESSION_STATEMENT,
-              ASTNode.FIELD_ACCESS,
-              ASTNode.FIELD_DECLARATION,
-              ASTNode.FOR_STATEMENT,
-              ASTNode.IF_STATEMENT,
-              ASTNode.IMPORT_DECLARATION,
-              ASTNode.INFIX_EXPRESSION,
-              ASTNode.INSTANCEOF_EXPRESSION,
-              ASTNode.INITIALIZER,
-              ASTNode.JAVADOC,
-              ASTNode.LABELED_STATEMENT,
-        	  ASTNode.LINE_COMMENT,
-      		  ASTNode.MARKER_ANNOTATION,
-        	  ASTNode.MEMBER_REF,
-      		  ASTNode.MEMBER_VALUE_PAIR,
-              ASTNode.METHOD_DECLARATION,
-              ASTNode.METHOD_INVOCATION,
-        	  ASTNode.METHOD_REF,
-        	  ASTNode.METHOD_REF_PARAMETER,
-      		  ASTNode.MODIFIER,
-			  ASTNode.NORMAL_ANNOTATION,
-              ASTNode.NULL_LITERAL,
-              ASTNode.NUMBER_LITERAL,
-              ASTNode.PACKAGE_DECLARATION,
-              ASTNode.PARAMETERIZED_TYPE,
-              ASTNode.PARENTHESIZED_EXPRESSION,
-              ASTNode.POSTFIX_EXPRESSION,
-              ASTNode.PREFIX_EXPRESSION,
-              ASTNode.PRIMITIVE_TYPE,
-              ASTNode.QUALIFIED_NAME,
-              ASTNode.QUALIFIED_TYPE,
-              ASTNode.RETURN_STATEMENT,
-              ASTNode.SIMPLE_NAME,
-              ASTNode.SIMPLE_TYPE,
-      		  ASTNode.SINGLE_MEMBER_ANNOTATION,
-              ASTNode.SINGLE_VARIABLE_DECLARATION,
-              ASTNode.STRING_LITERAL,
-              ASTNode.SUPER_CONSTRUCTOR_INVOCATION,
-              ASTNode.SUPER_FIELD_ACCESS,
-              ASTNode.SUPER_METHOD_INVOCATION,
-              ASTNode.SWITCH_CASE,
-              ASTNode.SWITCH_STATEMENT,
-              ASTNode.SYNCHRONIZED_STATEMENT,
-        	  ASTNode.TAG_ELEMENT,
-        	  ASTNode.TEXT_ELEMENT,
-              ASTNode.THIS_EXPRESSION,
-              ASTNode.THROW_STATEMENT,
-              ASTNode.TRY_STATEMENT,
-              ASTNode.TYPE_DECLARATION,
-              ASTNode.TYPE_DECLARATION_STATEMENT,
-              ASTNode.TYPE_LITERAL,
-              ASTNode.TYPE_PARAMETER,
-              ASTNode.VARIABLE_DECLARATION_EXPRESSION,
-              ASTNode.VARIABLE_DECLARATION_FRAGMENT,
-              ASTNode.VARIABLE_DECLARATION_STATEMENT,
-              ASTNode.WHILE_STATEMENT,
-              ASTNode.WILDCARD_TYPE,
+		int[] nodeTypes = {
+			ASTNode.ANONYMOUS_CLASS_DECLARATION,
+			ASTNode.ARRAY_ACCESS,
+			ASTNode.ARRAY_CREATION,
+			ASTNode.ARRAY_INITIALIZER,
+			ASTNode.ARRAY_TYPE,
+			ASTNode.ASSERT_STATEMENT,
+			ASTNode.ASSIGNMENT,
+			ASTNode.BLOCK,
+			ASTNode.BOOLEAN_LITERAL,
+			ASTNode.BREAK_STATEMENT,
+			ASTNode.CAST_EXPRESSION,
+			ASTNode.CATCH_CLAUSE,
+			ASTNode.CHARACTER_LITERAL,
+			ASTNode.CLASS_INSTANCE_CREATION,
+			ASTNode.COMPILATION_UNIT,
+			ASTNode.CONDITIONAL_EXPRESSION,
+			ASTNode.CONSTRUCTOR_INVOCATION,
+			ASTNode.CONTINUE_STATEMENT,
+			ASTNode.DO_STATEMENT,
+			ASTNode.EMPTY_STATEMENT,
+			ASTNode.EXPRESSION_STATEMENT,
+			ASTNode.FIELD_ACCESS,
+			ASTNode.FIELD_DECLARATION,
+			ASTNode.FOR_STATEMENT,
+			ASTNode.IF_STATEMENT,
+			ASTNode.IMPORT_DECLARATION,
+			ASTNode.INFIX_EXPRESSION,
+			ASTNode.INITIALIZER,
+			ASTNode.JAVADOC,
+			ASTNode.LABELED_STATEMENT,
+			ASTNode.METHOD_DECLARATION,
+			ASTNode.METHOD_INVOCATION,
+			ASTNode.NULL_LITERAL,
+			ASTNode.NUMBER_LITERAL,
+			ASTNode.PACKAGE_DECLARATION,
+			ASTNode.PARENTHESIZED_EXPRESSION,
+			ASTNode.POSTFIX_EXPRESSION,
+			ASTNode.PREFIX_EXPRESSION,
+			ASTNode.PRIMITIVE_TYPE,
+			ASTNode.QUALIFIED_NAME,
+			ASTNode.RETURN_STATEMENT,
+			ASTNode.SIMPLE_NAME,
+			ASTNode.SIMPLE_TYPE,
+			ASTNode.SINGLE_VARIABLE_DECLARATION,
+			ASTNode.STRING_LITERAL,
+			ASTNode.SUPER_CONSTRUCTOR_INVOCATION,
+			ASTNode.SUPER_FIELD_ACCESS,
+			ASTNode.SUPER_METHOD_INVOCATION,
+			ASTNode.SWITCH_CASE,
+			ASTNode.SWITCH_STATEMENT,
+			ASTNode.SYNCHRONIZED_STATEMENT,
+			ASTNode.THIS_EXPRESSION,
+			ASTNode.THROW_STATEMENT,
+			ASTNode.TRY_STATEMENT,
+			ASTNode.TYPE_DECLARATION,
+			ASTNode.TYPE_DECLARATION_STATEMENT,
+			ASTNode.TYPE_LITERAL,
+			ASTNode.VARIABLE_DECLARATION_EXPRESSION,
+			ASTNode.VARIABLE_DECLARATION_FRAGMENT,
+			ASTNode.VARIABLE_DECLARATION_STATEMENT,
+			ASTNode.WHILE_STATEMENT,
+			ASTNode.INSTANCEOF_EXPRESSION,
+			ASTNode.LINE_COMMENT,
+			ASTNode.BLOCK_COMMENT,
+			ASTNode.TAG_ELEMENT,
+			ASTNode.TEXT_ELEMENT,
+			ASTNode.MEMBER_REF,
+			ASTNode.METHOD_REF,
+			ASTNode.METHOD_REF_PARAMETER,
+			ASTNode.ENHANCED_FOR_STATEMENT,
+			ASTNode.ENUM_DECLARATION,
+			ASTNode.ENUM_CONSTANT_DECLARATION,
+			ASTNode.TYPE_PARAMETER,
+			ASTNode.PARAMETERIZED_TYPE,
+			ASTNode.QUALIFIED_TYPE,
+			ASTNode.WILDCARD_TYPE,
+			ASTNode.NORMAL_ANNOTATION,
+			ASTNode.MARKER_ANNOTATION,
+			ASTNode.SINGLE_MEMBER_ANNOTATION,
+			ASTNode.MEMBER_VALUE_PAIR,
+			ASTNode.ANNOTATION_TYPE_DECLARATION,
+			ASTNode.ANNOTATION_TYPE_MEMBER_DECLARATION,
+			ASTNode.MODIFIER,
+			ASTNode.UNION_TYPE,
+			ASTNode.DIMENSION,
+			ASTNode.LAMBDA_EXPRESSION,
+			ASTNode.INTERSECTION_TYPE,
+			ASTNode.PACKAGE_QUALIFIED_TYPE,
+			ASTNode.CREATION_REFERENCE,
+			ASTNode.EXPRESSION_METHOD_REFERENCE,
+			ASTNode.SUPER_METHOD_REFERENCE,
+			ASTNode.TYPE_METHOD_REFERENCE,
+//{ObjectTeams:
+			ASTNode.METHOD_SPEC,
+			ASTNode.CALLIN_MAPPING_DECLARATION,
+			ASTNode.CALLOUT_MAPPING_DECLARATION,
+			ASTNode.LIFTING_TYPE,
+			ASTNode.WITHIN_STATEMENT,
+			ASTNode.BASE_CONSTRUCTOR_INVOCATION,
+			ASTNode.PARAMETER_MAPPING,
+			ASTNode.BASE_CALL_MESSAGE_SEND,
+			ASTNode.FIELD_ACCESS_SPEC,
+			ASTNode.ROLE_TYPE_DECLARATION,
+			ASTNode.TSUPER_MESSAGE_SEND,
+			ASTNode.TSUPER_CONSTRUCTOR_INVOCATION,
+			ASTNode.TYPE_ANCHOR,
+			ASTNode.PRECEDENCE_DECLARATION,
+			ASTNode.GUARD_PREDICATE_DECLARATION,
+			ASTNode.METHOD_BINDING_OPERATOR
+// SH}
 		};
-		int MIN = 1;
-		int MAX = 100;
-		Set s = new HashSet();
-		for (int i=0; i<all.length; i++) {
-			assertTrue(MIN <= all[i] && all[i] <= MAX);
-			s.add(new Integer(all[i]));
+		
+		// assert that nodeType values are correct:
+		for (int i= 0; i < nodeTypes.length; i++) {
+			assertSame(i + 1, nodeTypes[i]);
 		}
-		assertTrue(s.size() == all.length);
-		// ensure that Integers really do compare properly with equals
-		assertTrue(new Integer(1).equals(new Integer(1)));
+		
+		// test nodeClassForType:
+		for (int i= 0; i < nodeTypes.length; i++) {
+			int nodeType = nodeTypes[i];
+			ASTNode node;
+			try {
+				node = this.ast.createInstance(nodeType);
+			} catch (IllegalArgumentException e) {
+				if (this.API_LEVEL < AST.JLS8 && e.getCause() instanceof UnsupportedOperationException) {
+					continue;
+				} else {
+					throw new AssertionFailedError("missing node type: " + nodeType);
+				}
+			}
+			assertEquals(nodeType, node.getNodeType());
+		}
+		
+		// assert that test covers all nodeTypes:
+		Field[] fields = ASTNode.class.getDeclaredFields();
+		HashSet declaredNodeTypes = new HashSet();
+		for (int i= 0; i < fields.length; i++) {
+			Field field= fields[i];
+			if (field.getType() != int.class)
+				continue;
+			if (field.getModifiers() != (java.lang.reflect.Modifier.PUBLIC | java.lang.reflect.Modifier.STATIC | java.lang.reflect.Modifier.FINAL))
+				continue;
+			String name = field.getName();
+			if ("MALFORMED".equals(name) || "ORIGINAL".equals(name) || "PROTECT".equals(name) || "RECOVERED".equals(name))
+				continue;
+			declaredNodeTypes.add(new Integer(field.getInt(null)));
+		}
+		for (int i= 0; i < nodeTypes.length; i++) {
+			int nodeType= nodeTypes[i];
+			assertTrue("node type " + nodeType + " from test is missing in ASTNode", declaredNodeTypes.remove(new Integer(nodeType)));
+			nodeTypes[i] = -1;
+		}
+		for (int i= 0; i < nodeTypes.length; i++) {
+			int nodeType= nodeTypes[i];
+			assertEquals("node type " + nodeType + " missing in ASTNode", -1, nodeType);
+		}
+		assertEquals("node types missing in test", Collections.EMPTY_SET, declaredNodeTypes);
 	}
 }
 
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 faf7a50..59d8b23 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -12,9 +16,10 @@
 package org.eclipse.jdt.core.tests.dom;
 
 import java.lang.reflect.Method;
+
 import junit.framework.Test;
+
 import org.eclipse.jdt.core.dom.*;
-import org.eclipse.jdt.core.dom.ASTNode;
 
 public class ASTVisitorTest extends org.eclipse.jdt.core.tests.junit.extension.TestCase {
 
@@ -29,6 +34,8 @@
 			if (methods[i].getName().startsWith("test")) { //$NON-NLS-1$
 				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));
 			}
 		}
 		return suite;
@@ -119,7 +126,11 @@
 	String EC1S;
 	EnumConstantDeclaration EC2;
 	String EC2S;
-
+	Type T3;
+	String T3S;
+	Type T4;
+	String T4S;
+	
 	final StringBuffer b = new StringBuffer();
 
 	int API_LEVEL;
@@ -128,6 +139,18 @@
 		super(name);
 		this.API_LEVEL = apiLevel;
 	}
+	
+	public ASTVisitorTest(String name) {
+		super(name.substring(0, name.indexOf(" - JLS")));
+		name.indexOf(" - JLS");
+		this.API_LEVEL = Integer.parseInt(name.substring(name.indexOf(" - JLS") + 6));
+	}
+
+	/** @deprecated using deprecated code */
+	public String getName() {
+		String name = super.getName() + " - JLS" + this.API_LEVEL;
+		return name;
+	}
 
 	/**
 	 * @deprecated (not really - just suppressing the warnings
@@ -279,7 +302,13 @@
 			this.EC2.setName(this.ast.newSimpleName("d")); //$NON-NLS-1$
 			this.EC2S = "[(ECD[(nSddnS)]ECD)]"; //$NON-NLS-1$
 		}
-
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			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$
+			this.T4S = "[(tS[(nSXXnS)]tS)]"; //$NON-NLS-1$
+		}
+		
 	}
 
 	protected void tearDown() throws Exception {
@@ -287,20 +316,6 @@
 		super.tearDown();
 	}
 
-	/** @deprecated using deprecated code */
-	public String getName() {
-		String name = super.getName();
-		switch (this.API_LEVEL) {
-			case AST.JLS2:
-				name = "JLS2 - " + name;
-				break;
-			case AST.JLS3:
-				name = "JLS3 - " + name;
-				break;
-		}
-		return name;
-	}
-
 	class TestVisitor extends ASTVisitor {
 
 		boolean visitTheKids = true;
@@ -368,6 +383,13 @@
 			ASTVisitorTest.this.b.append(node.getPrimitiveTypeCode().toString());
 			ASTVisitorTest.this.b.append("tP)"); //$NON-NLS-1$
 		}
+		public boolean visit(PackageQualifiedType node) {
+			ASTVisitorTest.this.b.append("(tPQ"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(PackageQualifiedType node) {
+			ASTVisitorTest.this.b.append("tPQ)"); //$NON-NLS-1$
+		}
 		public boolean visit(ParameterizedType node) {
 			ASTVisitorTest.this.b.append("(tM"); //$NON-NLS-1$
 			return isVisitingChildren();
@@ -382,6 +404,13 @@
 		public void endVisit(QualifiedType node) {
 			ASTVisitorTest.this.b.append("tQ)"); //$NON-NLS-1$
 		}
+		public boolean visit(UnionType node) {
+			ASTVisitorTest.this.b.append("(tU"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(UnionType node) {
+			ASTVisitorTest.this.b.append("tU)"); //$NON-NLS-1$
+		}
 		public boolean visit(WildcardType node) {
 			ASTVisitorTest.this.b.append("(tW"); //$NON-NLS-1$
 			return isVisitingChildren();
@@ -683,6 +712,22 @@
 			ASTVisitorTest.this.b.append("*/)"); //$NON-NLS-1$
 		}
 
+		public boolean visit(CreationReference node) {
+			ASTVisitorTest.this.b.append("(eCR"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(CreationReference node) {
+			ASTVisitorTest.this.b.append("eCR)"); //$NON-NLS-1$
+		}
+
+		public boolean visit(ExpressionMethodReference node) {
+			ASTVisitorTest.this.b.append("(eEMR"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(ExpressionMethodReference node) {
+			ASTVisitorTest.this.b.append("eEMR)"); //$NON-NLS-1$
+		}
+
 		public boolean visit(LineComment node) {
 			ASTVisitorTest.this.b.append("(//"); //$NON-NLS-1$
 			return isVisitingChildren();
@@ -863,6 +908,14 @@
 			ASTVisitorTest.this.b.append("eSM)"); //$NON-NLS-1$
 		}
 
+		public boolean visit(SuperMethodReference node) {
+			ASTVisitorTest.this.b.append("(eSMR"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(SuperMethodReference node) {
+			ASTVisitorTest.this.b.append("eSMR)"); //$NON-NLS-1$
+		}
+
 		public boolean visit(SwitchCase node) {
 			ASTVisitorTest.this.b.append("(sSC"); //$NON-NLS-1$
 			return isVisitingChildren();
@@ -935,6 +988,14 @@
 			ASTVisitorTest.this.b.append("eTL)"); //$NON-NLS-1$
 		}
 
+		public boolean visit(TypeMethodReference node) {
+			ASTVisitorTest.this.b.append("(eTMR"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(TypeMethodReference node) {
+			ASTVisitorTest.this.b.append("eTMR)"); //$NON-NLS-1$
+		}
+
 		public boolean visit(TypeParameter node) {
 			ASTVisitorTest.this.b.append("(tTP"); //$NON-NLS-1$
 			return isVisitingChildren();
@@ -1033,6 +1094,14 @@
 			ASTVisitorTest.this.b.append("MOD)"); //$NON-NLS-1$
 		}
 
+		public boolean visit(Dimension node) {
+			ASTVisitorTest.this.b.append("(@ED"); //$NON-NLS-1$
+			return isVisitingChildren();
+		}
+		public void endVisit(Dimension node) {
+			ASTVisitorTest.this.b.append("@ED)"); //$NON-NLS-1$
+		}
+		
 		public void preVisit(ASTNode node) {
 			ASTVisitorTest.this.b.append("["); //$NON-NLS-1$
 		}
@@ -1088,7 +1157,22 @@
 		this.b.setLength(0);
 		x1.accept(v1);
 		String result = this.b.toString();
-		assertTrue("[(tA[(tPcharchartP)]tA)]".equals(result)); //$NON-NLS-1$
+		String expected = this.ast.apiLevel() < AST.JLS8 ? "[(tA[(tPcharchartP)]tA)]" : "[(tA[(tPcharchartP)][(@ED@ED)]tA)]";
+		assertTrue(expected.equals(result)); //$NON-NLS-1$
+	}
+
+	/** @deprecated using deprecated code */
+	public void testPackageQualifiedType() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		QualifiedName q = this.ast.newQualifiedName(this.N2, this.N3);
+		PackageQualifiedType x1 = this.ast.newPackageQualifiedType(q, this.N1);
+		TestVisitor v1 = new TestVisitor();
+		this.b.setLength(0);
+		x1.accept(v1);
+		String result = this.b.toString();
+		assertTrue(result.equals("[(tPQ"+"[(nQ"+this.N2S+this.N3S+"nQ)]"+this.N1S+"tPQ)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
 	/** @deprecated using deprecated code */
@@ -1133,6 +1217,21 @@
 		assertTrue(result.equals("[(tW"+this.T1S+"tW)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
 
+	/** @deprecated using deprecated code */
+	public void testUnionType() {
+		if (this.ast.apiLevel() <= AST.JLS4) {
+			return;
+		}
+		UnionType x1 = this.ast.newUnionType();
+		x1.types().add(this.T1);
+		x1.types().add(this.T2);
+		TestVisitor v1 = new TestVisitor();
+		this.b.setLength(0);
+		x1.accept(v1);
+		String result = this.b.toString();
+		assertTrue(result.equals("[(tU"+this.T1S+this.T2S+"tU)]")); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
 	// EXPRESSIONS and STATEMENTS
 
 	public void testArrayAccess() {
@@ -1156,7 +1255,8 @@
 		this.b.setLength(0);
 		x1.accept(v1);
 		String result = this.b.toString();
-		assertTrue(result.equals("[(eAC"+"[(tA"+this.T1S+"tA)]"+this.E1S+this.E2S+"[(eAIeAI)]eAC)]")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+		String dim = this.ast.apiLevel() < AST.JLS8 ? "" : "[(@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() {
 		ArrayInitializer x1 = this.ast.newArrayInitializer();
@@ -1350,6 +1450,19 @@
 		String result = this.b.toString();
 		assertTrue(result.equals("[(sCN"+this.N1S+"sCN)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
+
+	public void testCreationReference() {
+		if (this.ast.apiLevel() < AST.JLS8)
+			return;
+		CreationReference x1 = this.ast.newCreationReference();
+		x1.setType(this.T1);
+		TestVisitor v1 = new TestVisitor();
+		this.b.setLength(0);
+		x1.accept(v1);
+		String result = this.b.toString();
+		assertTrue(result.equals("[(eCR"+this.T1S+"eCR)]")); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
 	public void testDoStatement() {
 		DoStatement x1 = this.ast.newDoStatement();
 		x1.setExpression(this.E1);
@@ -1410,6 +1523,19 @@
 		String result = this.b.toString();
 		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)
+			return;
+		ExpressionMethodReference x1 = this.ast.newExpressionMethodReference();
+		x1.setExpression(this.E1);
+		x1.setName(this.N1);
+		TestVisitor v1 = new TestVisitor();
+		this.b.setLength(0);
+		x1.accept(v1);
+		String result = this.b.toString();
+		assertTrue(result.equals("[(eEMR"+this.E1S+this.N1S+"eEMR)]")); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
 	public void testExpressionStatement() {
 		ExpressionStatement x1 = this.ast.newExpressionStatement(this.E1);
 		TestVisitor v1 = new TestVisitor();
@@ -1418,6 +1544,20 @@
 		String result = this.b.toString();
 		assertTrue(result.equals("[(sEX"+this.E1S+"sEX)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
+	public void testExtraDimension() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		Dimension x1 = this.ast.newDimension();
+		x1.annotations().add(this.ANO1);
+		x1.annotations().add(this.ANO2);
+		TestVisitor v1 = new TestVisitor();
+		this.b.setLength(0);
+		x1.accept(v1);
+		String result = this.b.toString();
+		assertEquals("[(@ED"+this.ANO1S+this.ANO2S+"@ED)]", result); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
 	public void testFieldAccess() {
 		FieldAccess x1 = this.ast.newFieldAccess();
 		x1.setExpression(this.E1);
@@ -1623,17 +1763,24 @@
 		x1.setName(this.N1);
 		x1.parameters().add(this.V1);
 		x1.parameters().add(this.V2);
-		x1.thrownExceptions().add(this.N2);
-		x1.thrownExceptions().add(this.N3);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			x1.thrownExceptions().add(this.N2);
+			x1.thrownExceptions().add(this.N3);			
+		} else {
+			x1.thrownExceptionTypes().add(this.T3);
+			x1.thrownExceptionTypes().add(this.T4);			
+		}
 		x1.setBody(this.B1);
 		TestVisitor v1 = new TestVisitor();
 		this.b.setLength(0);
 		x1.accept(v1);
 		String result = this.b.toString();
 		if (this.ast.apiLevel() == AST.JLS2) {
-			assertTrue(result.equals("[(MD"+this.JD1S+this.T1S+this.N1S+this.V1S+this.V2S+this.N2S+this.N3S+this.B1S+"MD)]")); //$NON-NLS-1$ //$NON-NLS-2$
+			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) {
+			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 {
-			assertTrue(result.equals("[(MD"+this.JD1S+this.MOD1S+this.MOD2S+this.TP1S+this.T1S+this.N1S+this.V1S+this.V2S+this.N2S+this.N3S+this.B1S+"MD)]")); //$NON-NLS-1$ //$NON-NLS-2$
+			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$			
 		}
 	}
 	/** @deprecated using deprecated code */
@@ -1922,6 +2069,19 @@
 			assertTrue(result.equals("[(eSM"+this.N1S+this.PT1S+this.N2S+this.E1S+this.E2S+"eSM)]")); //$NON-NLS-1$ //$NON-NLS-2$
 		}
 	}
+	public void testSuperMethodReference() {
+		if (this.ast.apiLevel() < AST.JLS8) {
+			return;
+		}
+		SuperMethodReference x1 = this.ast.newSuperMethodReference();
+		x1.setQualifier(this.N1);
+		x1.setName(this.N2);
+		TestVisitor v1 = new TestVisitor();
+		this.b.setLength(0);
+		x1.accept(v1);
+		String result = this.b.toString();
+		assertTrue(result.equals("[(eSMR"+this.N1S+this.N2S+"eSMR)]")); //$NON-NLS-1$ //$NON-NLS-2$
+	}
 	public void testSwitchCase() {
 		SwitchCase x1 = this.ast.newSwitchCase();
 		x1.setExpression(this.E1);
@@ -1992,8 +2152,18 @@
 		String result = this.b.toString();
 		assertTrue(result.equals("[(sTR"+this.E1S+"sTR)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
+	/** @deprecated using deprecated code */
 	public void testTryStatement() {
 		TryStatement x1 = this.ast.newTryStatement();
+		int level = this.ast.apiLevel();
+		if (level >= AST.JLS4) {
+			VariableDeclarationExpression vde1= this.ast.newVariableDeclarationExpression(this.W1);
+			vde1.setType(this.T1);
+			x1.resources().add(vde1);
+			VariableDeclarationExpression vde2= this.ast.newVariableDeclarationExpression(this.W2);
+			vde2.setType(this.T2);
+			x1.resources().add(vde2);
+		}
 		x1.setBody(this.B1);
 		CatchClause c1 = this.ast.newCatchClause();
 		c1.setException(this.V1);
@@ -2008,7 +2178,9 @@
 		this.b.setLength(0);
 		x1.accept(v1);
 		String result = this.b.toString();
-		assertTrue(result.equals("[(sTY"+this.B1S+"[(cc"+this.V1S+"[(sBsB)]"+"cc)]"+"[(cc"+this.V2S+"[(sBsB)]"+"cc)]"+"[(sBsB)]"+"sTY)]")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+		assertEquals("[(sTY"
+				+(level >= AST.JLS4 ? "[(eVD"+this.T1S+this.W1S+"eVD)]"+"[(eVD"+this.T2S+this.W2S+"eVD)]" : "")
+				+this.B1S+"[(cc"+this.V1S+"[(sBsB)]"+"cc)]"+"[(cc"+this.V2S+"[(sBsB)]"+"cc)]"+"[(sBsB)]"+"sTY)]", result); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
 	}
 	/** @deprecated using deprecated code */
 	public void testTypeDeclaration() {
@@ -2056,6 +2228,19 @@
 		String result = this.b.toString();
 		assertTrue(result.equals("[(eTL"+this.T1S+"eTL)]")); //$NON-NLS-1$ //$NON-NLS-2$
 	}
+	public void testTypeMethodReference() {
+		if (this.ast.apiLevel() < AST.JLS8)
+			return;
+		TypeMethodReference x1 = this.ast.newTypeMethodReference();
+		x1.setType(this.T1);
+		x1.setName(this.N1);
+		TestVisitor v1 = new TestVisitor();
+		this.b.setLength(0);
+		x1.accept(v1);
+		String result = this.b.toString();
+		assertTrue(result.equals("[(eTMR"+this.T1S+this.N1S+"eTMR)]")); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
 	/** @deprecated using deprecated code */
 	public void testSingleVariableDeclaration() {
 		SingleVariableDeclaration x1 = this.ast.newSingleVariableDeclaration();
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 20432e9..7ef4438 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -56,17 +60,24 @@
 import org.eclipse.jdt.core.tests.util.Util;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.core.dom.SourceRangeVerifier;
 
 public class AbstractASTTests extends ModifyingResourceTests implements DefaultMarkedNodeLabelProviderOptions {
 
 	/** @deprecated Using deprecated code */
 	private static final int AST_INTERNAL_JLS2 = AST.JLS2;
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
 	/*package*/ static final int AST_INTERNAL_JLS3 = AST.JLS3;
+	/**
+	 * Internal synonym for deprecated constant AST.JSL4
+	 * to alleviate deprecation warnings.
+	 * @deprecated
+	 */
+	/*package*/ static final int AST_INTERNAL_JLS4 = AST.JLS4;
 	public static final int astInternalJLS2() {
 		return AST_INTERNAL_JLS2;
 	}
@@ -78,6 +89,13 @@
 		super(name);
 	}
 
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		
+		SourceRangeVerifier.DEBUG = true;
+		SourceRangeVerifier.DEBUG_THROW = true;
+	}
+	
 	/*
 	 * Removes the *start* and *end* markers from the given source
 	 * and remembers the positions.
@@ -468,8 +486,10 @@
 		String option = cu.getJavaProject().getOption(JavaCore.COMPILER_COMPLIANCE, true);
 		long jdkLevel = CompilerOptions.versionToJdkLevel(option);
 		int JLSLevel = AST_INTERNAL_JLS3;
-		if (jdkLevel >= ClassFileConstants.JDK1_7) {
-			JLSLevel = AST.JLS4;
+		if (jdkLevel >= ClassFileConstants.JDK1_8) {
+			JLSLevel = AST.JLS8;
+		} else if (jdkLevel >= ClassFileConstants.JDK1_7) {
+			JLSLevel = AST_INTERNAL_JLS4;
 		}
 		return buildASTs(
 				JLSLevel,
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
index 8016c80..3983978 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/BatchASTCreationTests.java
@@ -39,7 +39,7 @@
 public class BatchASTCreationTests extends AbstractASTTests {
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
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 206bb71..cde2cc4 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
@@ -5,12 +5,17 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.dom;
 
 import java.io.IOException;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -27,14 +32,30 @@
 
 public abstract class ConverterTestSetup extends AbstractASTTests {
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
 	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+
+	/**
+	 * Internal synonym for deprecated constant AST.JSL4
+	 * to alleviate deprecation warnings.
+	 * @deprecated
+	 */
+	/*package*/ static final int JLS4_INTERNAL = AST.JLS4;
+
+	static int getJLS3() {
+		return JLS3_INTERNAL;
+	}
+
+	static int getJLS4() {
+		return JLS4_INTERNAL;
+	}
+	
 	protected AST ast;
-	static List TEST_SUITES = null;
-	static boolean PROJECT_SETUP = false;
+	public static List TEST_SUITES = null;
+	public static boolean PROJECT_SETUP = false;
 
 	protected ConverterTestSetup(String name) {
 		super(name);
@@ -70,6 +91,7 @@
 			this.deleteProject("Converter15"); //$NON-NLS-1$
 			this.deleteProject("Converter16"); //$NON-NLS-1$
 			this.deleteProject("Converter17"); //$NON-NLS-1$
+			this.deleteProject("Converter18"); //$NON-NLS-1$
 			PROJECT_SETUP = false;
 		} else {
 			TEST_SUITES.remove(getClass());
@@ -78,6 +100,7 @@
 				this.deleteProject("Converter15"); //$NON-NLS-1$
 				this.deleteProject("Converter16"); //$NON-NLS-1$
 				this.deleteProject("Converter17"); //$NON-NLS-1$
+				this.deleteProject("Converter18"); //$NON-NLS-1$
 				PROJECT_SETUP = false;
 			}
 		}
@@ -103,6 +126,14 @@
 					new IPath[] {getConverterJCLPath("1.7"), getConverterJCLSourcePath("1.7"), getConverterJCLRootSourcePath()},
 					null);
 			}
+		} else if ("1.8".equals(compliance)) {
+			if (JavaCore.getClasspathVariable("CONVERTER_JCL18_LIB") == null) {
+				setupExternalJCL("converterJclMin1.8");
+				JavaCore.setClasspathVariables(
+					new String[] {"CONVERTER_JCL18_LIB", "CONVERTER_JCL18_SRC", "CONVERTER_JCL18_SRCROOT"},
+					new IPath[] {getConverterJCLPath("1.8"), getConverterJCLSourcePath("1.8"), getConverterJCLRootSourcePath()},
+					null);
+			}
 		} else if (JavaCore.getClasspathVariable("CONVERTER_JCL_LIB") == null) {
 			setupExternalJCL("converterJclMin");
 			JavaCore.setClasspathVariables(
@@ -123,11 +154,38 @@
 			setUpJavaProject("Converter15", "1.5"); //$NON-NLS-1$ //$NON-NLS-2$
 			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$
 			waitUntilIndexesReady(); // needed to find secondary types
 			PROJECT_SETUP = true;
 		}
 	}
 
+	protected void assertExtraDimensionsEqual(String message, List dimensions, String expected) {
+		StringBuffer buffer = new StringBuffer();
+		Iterator iter = dimensions.iterator();
+		while(iter.hasNext()) {
+			Dimension dim = (Dimension) iter.next();
+			buffer.append(convertAnnotationsList(dim.annotations()));
+			if (iter.hasNext()) {
+				buffer.append("[] ");
+			} else {
+				buffer.append("[]");
+			}
+		}
+		assertEquals(message, expected, buffer.toString());
+	}
+
+	protected String convertAnnotationsList(List annotations) {
+		StringBuffer buffer = new StringBuffer();
+		Iterator iter = annotations.iterator();
+		while (iter.hasNext()) {
+			buffer.append('@');
+			buffer.append(((Annotation) iter.next()).getTypeName().getFullyQualifiedName());
+			buffer.append(' ');
+		}
+		return buffer.toString();
+	}
+
 	public ASTNode runConversion(ICompilationUnit unit, boolean resolveBindings,
 			boolean bindingsRecovery) {
 		return runConversion(astInternalJLS2(), unit, resolveBindings, false, bindingsRecovery);
@@ -472,7 +530,7 @@
 			parser.createAST(null);
 		}
 
-		parser = ASTParser.newParser(AST.JLS4);
+		parser = ASTParser.newParser(JLS4_INTERNAL);
 		parser.setSource(unit);
 		parser.setResolveBindings(resolveBindings);
 		parser.setBindingsRecovery(bindingRecovery);
@@ -489,6 +547,38 @@
 		return result;
 	}
 
+	public ASTNode runJLS8Conversion(ICompilationUnit unit, boolean resolveBindings, boolean checkJLS2) {
+		return runJLS8Conversion(unit, resolveBindings, checkJLS2, false);
+	}
+
+	public ASTNode runJLS8Conversion(ICompilationUnit unit, boolean resolveBindings, boolean checkJLS2, boolean bindingRecovery) {
+
+		// Create parser
+		ASTParser parser;
+		if (checkJLS2) {
+			parser = ASTParser.newParser(astInternalJLS2());
+			parser.setSource(unit);
+			parser.setResolveBindings(resolveBindings);
+			parser.setBindingsRecovery(bindingRecovery);
+			parser.createAST(null);
+		}
+
+		parser = ASTParser.newParser(AST.JLS8);
+		parser.setSource(unit);
+		parser.setResolveBindings(resolveBindings);
+		parser.setBindingsRecovery(bindingRecovery);
+
+		// Parse compilation unit
+		ASTNode result = parser.createAST(null);
+
+		// Verify we get a compilation unit node and that binding are correct
+		assertTrue("Not a compilation unit", result.getNodeType() == ASTNode.COMPILATION_UNIT);
+		CompilationUnit compilationUnit = (CompilationUnit) result;
+		if (resolveBindings && compilationUnit.getProblems().length == 0) {
+			compilationUnit.accept(new NullBindingVerifier());
+		}
+		return result;
+	}
 	public ASTNode runConversion(int astLevel, ICompilationUnit unit, int position, boolean resolveBindings) {
 
 		// Create parser
@@ -672,8 +762,4 @@
 			}
 		}
 	}
-	
-	static int getJLS3() {
-		return JLS3_INTERNAL;
-	}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java
index fa31748..e3ccd40 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ProfilingASTConvertionTest.java
@@ -38,7 +38,7 @@
 public class ProfilingASTConvertionTest extends AbstractJavaModelTests {
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
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 77c4faf..091821b 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -38,9 +42,15 @@
 		ASTConverterBindingsTest.class,
 		ASTConverterRecoveryTest.class,
 		ASTConverterAST4Test.class,
+		ASTConverterAST8Test.class,
 		ASTConverterTestAST4_2.class,
+		ASTConverterTestAST8_2.class,
 		ASTConverterBugsTestJLS4.class,
+		ASTConverterBugsTestJLS8.class,
 		ASTConverter15JLS4Test.class,
+		ASTConverter15JLS8Test.class,
+		TypeAnnotationsConverterTest.class,
+		ASTConverter18Test.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 22c86c4..a2e84df 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
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 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
@@ -17,11 +17,17 @@
 
 public class SampleASTs {
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
 	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+	/**
+	 * Internal synonym for deprecated constant AST.JSL4
+	 * to alleviate deprecation warnings.
+	 * @deprecated
+	 */
+	/*package*/ static final int JLS4_INTERNAL = AST.JLS4;
 	
 	/**
 	 * Returns a subtree of sample of AST nodes. The sample includes
@@ -86,6 +92,10 @@
 			pmt.typeArguments().add(qt);
 			md.setReturnType2(pmt);
 		}
+		if (target.apiLevel() >= AST.JLS8) {
+			Dimension ed = target.newDimension();
+			md.extraDimensions().add(ed);
+		}
 
 		Block b = target.newBlock();
 		md.setBody(b);
@@ -138,6 +148,10 @@
 		CatchClause catchClause = target.newCatchClause();
 		tr.catchClauses().add(catchClause);
 		b.statements().add(tr);
+		if (target.apiLevel() >= JLS4_INTERNAL) {
+			UnionType ut = target.newUnionType();
+			catchClause.getException().setType(ut);
+		}
 
 		TypeDeclaration typeDeclaration = target.newTypeDeclaration();
 		TypeDeclarationStatement typeDeclarationStatement = target.newTypeDeclarationStatement(typeDeclaration);
@@ -165,6 +179,10 @@
 		z.add(booleanLiteral);
 		CastExpression castExpression = target.newCastExpression();
 		z.add(castExpression);
+		if (target.apiLevel() >= AST.JLS8) {
+			IntersectionType it = target.newIntersectionType();
+			castExpression.setType(it);
+		}
 		CharacterLiteral characterLiteral = target.newCharacterLiteral();
 		z.add(characterLiteral);
 		ClassInstanceCreation cic = target.newClassInstanceCreation();
@@ -179,6 +197,10 @@
 		z.add(infixExpression);
 		InstanceofExpression instanceofExpression = target.newInstanceofExpression();
 		z.add(instanceofExpression);
+		if (target.apiLevel() >= AST.JLS8) {
+			LambdaExpression lambdaExpression = target.newLambdaExpression();
+			z.add(lambdaExpression);
+		}
 		MethodInvocation methodInvocation = target.newMethodInvocation();
 		z.add(methodInvocation);
 		Name name = target.newName(new String[]{"a", "b"}); //$NON-NLS-1$ //$NON-NLS-2$
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
new file mode 100644
index 0000000..c7efeb0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeAnnotationsConverterTest.java
@@ -0,0 +1,374 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.dom;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+
+public class TypeAnnotationsConverterTest extends ConverterTestSetup {
+
+	ICompilationUnit workingCopy;
+
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(AST.JLS8);
+	}
+
+	public TypeAnnotationsConverterTest(String name) {
+		super(name);
+	}
+
+	static {
+//		TESTS_NUMBERS = new int[] { 9 };
+//		TESTS_RANGE = new int[] { 1, -1 };
+//		TESTS_NAMES = new String[] {"test0001"};
+	}
+	public static Test suite() {
+		return buildModelTestSuite(TypeAnnotationsConverterTest.class);
+	}
+
+	protected void tearDown() throws Exception {
+		super.tearDown();
+		if (this.workingCopy != null) {
+			this.workingCopy.discardWorkingCopy();
+			this.workingCopy = null;
+		}
+	}
+
+	// Test QualifiedTypeReference
+	public void test0001() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+		    "    class Y {\n" +
+			"        class Z {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    Object o = (@Marker X. @Marker Y.@Marker Z) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		String expectedOutput = 
+				"public class X {\n" + 
+				"class Y {\n" + 
+				"class Z {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Object o=(@Marker X.@Marker Y.@Marker Z)null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test ParameterizedQualifiedTypeReference
+	public void test0002() throws JavaModelException {
+		String contents =
+			"public class X {\n" +
+		    "    class Y {\n" +
+			"        class Z<T> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    Object o = (@Marker X. @Marker Y.@Marker Z<String>) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		String expectedOutput = 
+				"public class X {\n" + 
+				"class Y {\n" + 
+				"class Z<T> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Object o=(@Marker X.@Marker Y.@Marker Z<String>)null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test ParameterizedQualifiedReference
+	public void test0003() throws JavaModelException {
+		String contents =
+			"public class X<T> {\n" +
+		    "    class Y<R> {\n" +
+			"        class Z<Q> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    Object o = (@Marker X<String>. @Marker Y<Integer>.@Marker Z<Object>) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		String expectedOutput = 
+				"public class X<T> {\n" + 
+				"class Y<R> {\n" + 
+				"class Z<Q> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Object o=(@Marker X<String>.@Marker Y<Integer>.@Marker Z<Object>)null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test ParameterizedQualifiedReference with arrays.
+	public void test0004() throws JavaModelException {
+		String contents =
+			"public class X<T> {\n" +
+		    "    class Y<R> {\n" +
+			"        class Z<Q> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    Object o = (@Marker X<@Marker String>. @Marker Y<@Marker Integer>.@Marker Z<@Marker Object> @Marker [] [] @Marker [] []) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		String expectedOutput = 
+				"public class X<T> {\n" + 
+				"class Y<R> {\n" + 
+				"class Z<Q> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Object o=(@Marker X<@Marker String>.@Marker Y<@Marker Integer>.@Marker Z<@Marker Object> @Marker [] [] @Marker [] [])null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test ParameterizedQualifiedReference with arrays.
+	public void test0005() throws JavaModelException {
+		String contents =
+			"public class X<T> {\n" +
+		    "    class Y<R> {\n" +
+			"        class Z<Q> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    Object o = (@Marker X<@Marker String>. @Marker Y<@Marker Integer>.@Marker Z<@Marker Object> [] @Marker [] [] @Marker []) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy);
+		String expectedOutput = 
+				"public class X<T> {\n" + 
+				"class Y<R> {\n" + 
+				"class Z<Q> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Object o=(@Marker X<@Marker String>.@Marker Y<@Marker Integer>.@Marker Z<@Marker Object> [] @Marker [] [] @Marker [])null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test PrimitiveType with arrays
+	public void test0006() throws JavaModelException {
+		String contents =
+			"public class X<T> {\n" +
+		    "    class Y<R> {\n" +
+			"        class Z<Q> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    int [] [] [] [] o = (@One int [] @Two [] [] @Three []) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy, false);
+		String expectedOutput = 
+				"public class X<T> {\n" + 
+				"class Y<R> {\n" + 
+				"class Z<Q> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  int [] [] [] [] o=(@One int [] @Two [] [] @Three [])null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test SingleTypeReference with arrays.
+	public void test0007() throws JavaModelException {
+		String contents =
+			"public class X<T> {\n" +
+		    "    class Y<R> {\n" +
+			"        class Z<Q> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    String [] [] [] [] o = (@One String [] @Two [] [] @Three []) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy, false);
+		String expectedOutput = 
+				"public class X<T> {\n" + 
+				"class Y<R> {\n" + 
+				"class Z<Q> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  String [] [] [] [] o=(@One String [] @Two [] [] @Three [])null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test ParameterizedSingleTypeReference with arrays.
+	public void test0008() throws JavaModelException {
+		String contents =
+			"public class X<T> {\n" +
+		    "    class Y<R> {\n" +
+			"        class Z<Q> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"    Object o = (@One X<String> [] @Two [] [] @Three []) null;\n" +
+			
+			"    @java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+			"    @interface Marker {\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy, false);
+		String expectedOutput = 
+				"public class X<T> {\n" + 
+				"class Y<R> {\n" + 
+				"class Z<Q> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"  Object o=(@One X<String> [] @Two [] [] @Three [])null;\n" + 
+				"  @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {}\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test type parameters.
+	public void test0009() throws JavaModelException {
+		String contents =
+			"public class X<@NonNull T> {\n" +
+		    "    class Y<@Nullable R> {\n" +
+			"        class Z<@Readonly Q> {\n" +
+		    "        }\n" +
+			"    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy, false);
+		String expectedOutput = 
+				"public class X<@NonNull T> {\n" + 
+				"class Y<@Nullable R> {\n" + 
+				"class Z<@Readonly Q> {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test wildcard types.
+	public void test0010() throws JavaModelException {
+		String contents =
+			"public class X<@NonNull T> {\n" +
+		    "    X<@NonNull ? extends @Nullable String> x;\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy, false);
+		String expectedOutput = 
+				"public class X<@NonNull T> {\n" + 
+				"  X<@NonNull ? extends @Nullable String> x;\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test union types.
+	public void test0011() throws JavaModelException {
+		String contents =
+			"public class X<@NonNull T> {\n" +
+		    "    void foo() {\n" +
+		    "        try {\n" +
+		    "        } catch (@NonNull NullPointerException | @Nullable ArrayIndexOutOfBoundsException e) {\n" +
+		    "        }\n" +
+		    "    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy, false);
+		String expectedOutput = 
+				"public class X<@NonNull T> {\n" + 
+				"  void foo(){\n" + 
+				"    try {\n" + 
+				"    }\n" + 
+				" catch (    @NonNull NullPointerException|@Nullable ArrayIndexOutOfBoundsException e) {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+	// Test thrown types.
+	public void test0012() throws JavaModelException {
+		String contents =
+			"public class X<@NonNull T> {\n" +
+		    "    void foo() throws @NonNull NullPointerException, @Nullable ArrayIndexOutOfBoundsException {\n" +
+		    "        try {\n" +
+		    "        } catch (@NonNull NullPointerException | @Nullable ArrayIndexOutOfBoundsException e) {\n" +
+		    "        }\n" +
+		    "    }\n" +
+			"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(
+			contents,
+			this.workingCopy, false);
+		String expectedOutput = 
+				"public class X<@NonNull T> {\n" + 
+				"  void foo() throws @NonNull NullPointerException, @Nullable ArrayIndexOutOfBoundsException {\n" + 
+				"    try {\n" + 
+				"    }\n" + 
+				" catch (    @NonNull NullPointerException|@Nullable ArrayIndexOutOfBoundsException e) {\n" + 
+				"    }\n" + 
+				"  }\n" + 
+				"}\n";
+		assertASTNodeEquals(expectedOutput, node);
+	}
+}
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
new file mode 100644
index 0000000..7c85aee
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/TypeBindingTests308.java
@@ -0,0 +1,2122 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.dom;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.ArrayCreation;
+import org.eclipse.jdt.core.dom.ArrayType;
+import org.eclipse.jdt.core.dom.Assignment;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.CastExpression;
+import org.eclipse.jdt.core.dom.CatchClause;
+import org.eclipse.jdt.core.dom.ClassInstanceCreation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.CreationReference;
+import org.eclipse.jdt.core.dom.EnhancedForStatement;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.IAnnotationBinding;
+import org.eclipse.jdt.core.dom.ITypeBinding;
+import org.eclipse.jdt.core.dom.IVariableBinding;
+import org.eclipse.jdt.core.dom.IfStatement;
+import org.eclipse.jdt.core.dom.InstanceofExpression;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.ParameterizedType;
+import org.eclipse.jdt.core.dom.ParenthesizedExpression;
+import org.eclipse.jdt.core.dom.PrefixExpression;
+import org.eclipse.jdt.core.dom.QualifiedType;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.TryStatement;
+import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.TypeMethodReference;
+import org.eclipse.jdt.core.dom.TypeParameter;
+import org.eclipse.jdt.core.dom.UnionType;
+import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WildcardType;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+
+public class TypeBindingTests308 extends ConverterTestSetup {
+
+	ICompilationUnit workingCopy;
+
+	public static Test suite() {
+		return buildModelTestSuite(TypeBindingTests308.class);
+	}
+	public void setUpSuite() throws Exception {
+		super.setUpSuite();
+		this.ast = AST.newAST(AST.JLS8);
+	}
+	public TypeBindingTests308(String testName){
+		super(testName);
+	}
+	static {
+//		TESTS_NUMBERS = new int[] { };
+//		TESTS_RANGE = new int[] { };
+//		TESTS_NAMES = new String[] {"test027"};
+	}
+
+	private void verifyAnnotationOnType(Type type, String[] annots) {
+		verifyAnnotationsOnBinding(type.resolveBinding(), annots);
+	}
+
+	private void verifyAnnotationsOnBinding(ITypeBinding binding, String[] annots) {
+		IAnnotationBinding[] annotations = binding.getTypeAnnotations();
+		assertNotNull("Should not be null", annotations);
+		int length = annots.length;
+		assertEquals("Incorrect type use annotations", length, annotations.length);
+		for (int i = 0; i < length; i++) {
+			assertEquals("Incorrect annotation", annots[i], (annotations[i] == null) ? null : annotations[i].toString());
+		}
+	}
+
+	private void verifyAnnotationsOnBinding(IVariableBinding binding, String[] annots) {
+		IAnnotationBinding[] annotations = binding.getAnnotations();
+		assertNotNull("Should not be null", annotations);
+		int length = annots.length;
+		assertEquals("Incorrect annotations", length, annotations.length);
+		for (int i = 0; i < length; i++) {
+			assertEquals("Incorrect annotation", annots[i], (annotations[i] == null) ? null : annotations[i].toString());
+		}
+	}
+	
+	public void test000() throws Exception {
+		String contents = 
+					"public class X extends @Marker @SingleMember(0) @Normal(value = 0) Object {\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Marker {}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface SingleMember { int value() default 0;}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface Normal { int value() default 0;}\n";
+		
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 4, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		Type type = typeDecl.getSuperclassType();
+		assertNotNull("Super class should not be null", type);
+		
+		verifyAnnotationOnType(type, new String[]{"@Marker()", "@SingleMember(value = 0)", "@Normal(value = 0)"});
+	}
+	public void test001() throws Exception {
+		String contents = 
+				"public class X {\n" +
+						"    @Marker int x;\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect field", 1, fields.length);
+		FieldDeclaration field = fields[0];
+		verifyAnnotationOnType(field.getType(), new String[]{"@Marker()"});
+	}
+	public void test002() throws Exception {
+		String contents = 
+						"public class X {\n" +
+						"    @Marker <@Marker2 T> int x() { return 10; };\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)\n" +
+						"@interface Marker2{}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List params = method.typeParameters();
+		TypeParameter param = (TypeParameter) params.get(0);
+		ITypeBinding binding = param.resolveBinding();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker2()"});
+		verifyAnnotationOnType(method.getReturnType2(), new String[]{"@Marker()"});
+	}
+	public void test003() throws Exception {
+		String contents = 
+						"public class X {\n" +
+						"    int x(@Marker int p) { return 10; };\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List params = method.parameters();
+		SingleVariableDeclaration param = (SingleVariableDeclaration) params.get(0);
+		ITypeBinding binding = param.resolveBinding().getType();
+		
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+		verifyAnnotationOnType(param.getType(), new String[]{"@Marker()"});
+	}
+	public void test004() throws Exception {
+		String contents = 
+				"public class X {\n" +
+						"    int x(@Marker int ... p) { return 10; };\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List params = method.parameters();
+		SingleVariableDeclaration param = (SingleVariableDeclaration) params.get(0);
+		verifyAnnotationOnType(param.getType(), new String[]{"@Marker()"});
+	}
+
+	public void test005() throws Exception {
+			String contents = 
+				"public class X {\n" +
+						"    int x(@Marker int @Marker2 [] @Marker3 ... p) { return 10; };\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker2 {}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker3 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 4, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List params = method.parameters();
+		SingleVariableDeclaration param = (SingleVariableDeclaration) params.get(0);
+		ArrayType type = (ArrayType) param.getType();
+		ITypeBinding binding = type.resolveBinding();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker2()"});
+		verifyAnnotationsOnBinding(param.resolveBinding().getType(), new String[]{"@Marker2()"});
+		binding = binding.getComponentType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+	}
+	public void test006() throws Exception {
+		String contents = 
+						"public class X {\n" +
+						"    int x() {\n" +
+						"        try {\n" +
+						"        } catch (@Marker NullPointerException | @Marker2 ArrayIndexOutOfBoundsException e) {\n" +
+						"        }\n" +
+						"        return 10;\n" +
+						"    }\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List statements = method.getBody().statements();
+		TryStatement trySt = (TryStatement) statements.get(0);
+		CatchClause catchCl = (CatchClause) trySt.catchClauses().get(0);
+		UnionType union = (UnionType) catchCl.getException().getType();
+		types = union.types();
+		assertEquals("Incorrect union types", 2, types.size());
+		Type type = (Type) types.get(0);
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		
+		type = (Type) types.get(1);
+		verifyAnnotationOnType(type, new String[]{"@Marker2()"});
+	}	
+	public void test007() throws Exception {
+		String contents = 
+				"package java.lang;\n" +
+				"public class X {\n" +
+				"    public void x() throws Exception {\n" +
+				"        try (@Marker LocalStream p = null; final @Marker2 LocalStream q = null; @Marker3 final LocalStream r = null) {}\n" +
+				"    }\n" +
+				"}\n" +
+				"class LocalStream implements AutoCloseable {\n" +
+				"    public void close() throws Exception {}\n" +
+				"}\n" +
+				"interface AutoCloseable {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker3 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/java/lang/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 6, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List statements = method.getBody().statements();
+		TryStatement trySt = (TryStatement) statements.get(0);
+		List resources = trySt.resources();
+		assertEquals("Incorrect no of resources", 3, resources.size());
+		VariableDeclarationExpression resource = (VariableDeclarationExpression) resources.get(0);
+		Type type = resource.getType();
+		assertNotNull("Resource type should not be null", type);
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		
+		resource = (VariableDeclarationExpression) resources.get(1);
+		type = resource.getType();
+		assertNotNull("Resource type should not be null", type);
+		verifyAnnotationOnType(type, new String[]{"@Marker2()"});
+		
+		resource = (VariableDeclarationExpression) resources.get(2);
+		type = resource.getType();
+		assertNotNull("Resource type should not be null", type);
+		verifyAnnotationOnType(type, new String[]{"@Marker3()"});
+	}
+	public void test008() throws Exception {
+		String contents = 
+				"public class X {\n" +
+						"    int x() {\n" +
+						"        for (@Marker int i: new int[3]) {}\n" +
+						"        for (final @Marker int i: new int[3]) {}\n" +
+						"        for (@Marker final int i: new int[3]) {}\n" +
+						"        return 10;\n" +
+						"    }\n" +
+						"}\n" +
+						"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+						"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List statements = method.getBody().statements();
+		EnhancedForStatement forStmt = (EnhancedForStatement) statements.get(0);
+		SingleVariableDeclaration param = forStmt.getParameter();
+		Type type = param.getType();
+		assertNotNull("Resource type should not be null", type);
+		ITypeBinding binding = param.resolveBinding().getType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+		binding = type.resolveBinding();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+	}	
+	public void test009() throws Exception {
+		String contents = 
+				"interface I {\n" +
+				"    Object copy(int [] ia);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = @Marker int @Marker2 []::clone;\n" +
+				"    }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 4, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List statements = method.getBody().statements();
+		VariableDeclarationStatement stmt = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) stmt.fragments().get(0);
+		TypeMethodReference lambda = (TypeMethodReference) fragment.getInitializer();
+		ArrayType type = (ArrayType) lambda.getType();
+
+		verifyAnnotationOnType(type, new String[]{"@Marker2()"});
+		ITypeBinding binding = type.resolveBinding();
+		binding = binding.getComponentType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+	}
+	public void test010() throws Exception {
+		String contents = 
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        int i [] = new @Marker int @Marker2 [4];\n" +
+				"        int j [] = new @Marker2 int @Marker [] { 10 };\n" +
+				"    }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List statements = method.getBody().statements();
+		VariableDeclarationStatement stmt = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) stmt.fragments().get(0);
+		ArrayCreation arrayCr = (ArrayCreation) fragment.getInitializer();
+
+		ArrayType type = arrayCr.getType();
+		ITypeBinding binding = type.resolveBinding();
+		verifyAnnotationOnType(type, new String[]{"@Marker2()"});
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker2()"});
+		binding = binding.getComponentType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+
+		stmt = (VariableDeclarationStatement) statements.get(1);
+		fragment = (VariableDeclarationFragment) stmt.fragments().get(0);
+		arrayCr = (ArrayCreation) fragment.getInitializer();
+		type = arrayCr.getType();
+		
+		binding = type.resolveBinding();
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+		binding = binding.getComponentType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker2()"});
+	}
+	public void test011() throws Exception {
+		String contents = 
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        int i = (@Marker int) 0;\n" +
+				"        int j [] = (@Marker int @Marker2 []) null;\n" +
+				"    }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List statements = method.getBody().statements();
+		VariableDeclarationStatement stmt = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) stmt.fragments().get(0);
+		CastExpression castExp = (CastExpression) fragment.getInitializer();
+		Type type = castExp.getType();
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		
+		stmt = (VariableDeclarationStatement) statements.get(1);
+		fragment = (VariableDeclarationFragment) stmt.fragments().get(0);
+		castExp = (CastExpression) fragment.getInitializer();
+		ArrayType arrayType = (ArrayType) castExp.getType();
+		
+		ITypeBinding binding = arrayType.resolveBinding();
+		verifyAnnotationOnType(arrayType, new String[]{"@Marker2()"});
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker2()"});
+		binding = binding.getComponentType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+	}
+	public void test012() throws Exception {
+		String contents = 
+				"public class X  {\n" +
+				"    public static void main(String args) {\n" +
+				"        if (args instanceof @Marker String) {\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect method", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		List statements = method.getBody().statements();
+		IfStatement ifStmt = (IfStatement) statements.get(0);
+		InstanceofExpression instanceOf = (InstanceofExpression) ifStmt.getExpression();
+		Type type = instanceOf.getRightOperand();
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+	}
+	public void test013() throws Exception {
+			String contents = 
+				"public class X extends Y<@Marker(10) Integer, String> {}\n" +
+				"class Y<T, V> {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {int value();}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		ParameterizedType superClass = (ParameterizedType) typeDecl.getSuperclassType();
+		List arguments = superClass.typeArguments();
+		assertEquals("Incorrect no of type arguments", 2, arguments.size());
+		Type type = (Type) arguments.get(0);
+		
+		verifyAnnotationOnType(type, new String[]{"@Marker(value = 10)"});
+	}
+	public void test014() throws Exception {
+		String contents = 
+				"public class X<T extends Object & Comparable<? super @Marker String>> {}\n" +
+				"class Y<T> {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		List typeParams = typeDecl.typeParameters();
+
+		TypeParameter typeParam = (TypeParameter) typeParams.get(0);
+		List bounds = typeParam.typeBounds();
+		assertEquals("Incorrect no of type bounds", 2, bounds.size());
+		ParameterizedType type = (ParameterizedType) bounds.get(1);
+		typeParams = type.typeArguments();
+		assertEquals("Incorrect type params", 1, typeParams.size());
+		WildcardType wildcard = (WildcardType)typeParams.get(0);
+		Type bound = wildcard.getBound();
+		assertNotNull("Bound should not be null", bound);
+		verifyAnnotationOnType(bound, new String[]{"@Marker()"});
+	}
+	public void test015() throws Exception {
+		String contents = 
+				"public class X {\n" +
+				"	void foo(Map<@Marker ? super @Marker2 Object, @Marker3 ? extends @Marker4 String> m){}\n" +
+				"   void goo(Map<@Marker4 ? extends @Marker3 Object, @Marker2 ? super @Marker String> m){}\n" +
+				"}\n" +
+				"class Map<K, V>{}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker3 {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker4 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true/*resolve*/);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 6, types.size());
+		
+		MethodDeclaration[] methods = ((TypeDeclaration) types.get(0)).getMethods();
+		assertEquals("Incorrect no of metods", 2, methods.length);
+		MethodDeclaration method = methods[0];
+		SingleVariableDeclaration arg = (SingleVariableDeclaration) method.parameters().get(0);
+		
+		
+		List typeArgs = ((ParameterizedType) arg.getType()).typeArguments();
+		
+		WildcardType wildcard = (WildcardType) typeArgs.get(0);
+		verifyAnnotationOnType(wildcard, new String[]{"@Marker()"});
+		Type type = wildcard.getBound();
+		verifyAnnotationOnType(type, new String[]{"@Marker2()"});
+
+		wildcard = (WildcardType) typeArgs.get(1);
+		verifyAnnotationOnType(wildcard, new String[]{"@Marker3()"});
+		type = wildcard.getBound();
+		verifyAnnotationOnType(type, new String[]{"@Marker4()"});
+		
+		method = methods[1];
+		arg = (SingleVariableDeclaration) method.parameters().get(0);
+		typeArgs = ((ParameterizedType) arg.getType()).typeArguments();
+
+		wildcard = (WildcardType) typeArgs.get(0);
+		verifyAnnotationOnType(wildcard, new String[]{"@Marker4()"});
+		type = wildcard.getBound();
+		verifyAnnotationOnType(type, new String[]{"@Marker3()"});
+
+		wildcard = (WildcardType) typeArgs.get(1);
+		verifyAnnotationOnType(wildcard, new String[]{"@Marker2()"});
+		type = wildcard.getBound();
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+	}
+	public void test016() throws Exception {
+		String contents = 
+				"public class X<E> {\n" +
+				"  class Y {\n" +
+				"    E e;\n" +
+				"    E getOtherElement(Object other) {\n" +
+				"      if (!(other instanceof @Marker X<?>.Y)) {};\n" +
+				"      return null;\n" +
+				"    }\n" +
+				"  }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		typeDecl = typeDecl.getTypes()[0];
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		IfStatement ifStmt = (IfStatement) method.getBody().statements().get(0);
+		PrefixExpression prefix = (PrefixExpression ) ifStmt.getExpression();
+		ParenthesizedExpression operand = (ParenthesizedExpression) prefix.getOperand();
+		InstanceofExpression expression = (InstanceofExpression) operand.getExpression();
+		QualifiedType type = (QualifiedType) expression.getRightOperand();
+		verifyAnnotationOnType(type, new String[]{});
+		verifyAnnotationOnType(type.getQualifier(), new String[]{"@Marker()"});
+	}
+	public void test017() throws Exception {
+		String contents = 
+				"public class X<P, C> {\n" +
+				"  public X() {\n" +
+				"    if (!(this instanceof @Marker X)) {}\n" +
+				"  }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		IfStatement ifStmt = (IfStatement) method.getBody().statements().get(0);
+		PrefixExpression prefix = (PrefixExpression ) ifStmt.getExpression();
+		ParenthesizedExpression operand = (ParenthesizedExpression) prefix.getOperand();
+		InstanceofExpression expression = (InstanceofExpression) operand.getExpression();
+		verifyAnnotationOnType(expression.getRightOperand(), new String[]{"@Marker()"});
+	}
+	public void test018() throws Exception {
+		String contents = 
+				"interface I {\n" +
+				"    void foo(Y<String>.Z z, int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = Y<String>.@Marker Z::foo;\n" +
+				"        i.foo(new Y<String>().new Z(), 10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class Y<T> {\n" +
+				"    class Z {\n" +
+				"        void foo(int x) {\n" +
+				"        }\n" +
+				"    }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 4, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) method.getBody().statements().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		TypeMethodReference initializer = (TypeMethodReference) fragment.getInitializer();
+		Type type = initializer.getType();
+		assertTrue(type.isQualifiedType());
+		QualifiedType qualifiedType = (QualifiedType) type;
+		checkSourceRange(qualifiedType.getName(), "Z", contents);
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		assertEquals("Should be a qualified type", ASTNode.QUALIFIED_TYPE, type.getNodeType());
+		verifyAnnotationOnType(((QualifiedType) type).getQualifier() , new String[]{});
+	}
+	public void test019() throws Exception {
+		String contents = 
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        X [] x = new @Marker X @Marker2 [5];\n" +
+				"        X [] x2 = new @Marker2 X @Marker [] { null };\n" +
+				"    }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		List statements = method.getBody().statements();
+		assertEquals("Incorrect no of statements", 2, statements.size());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		ArrayCreation initializer = (ArrayCreation) fragment.getInitializer();
+		ArrayType arrayType = initializer.getType();
+		ITypeBinding binding = arrayType.resolveBinding();
+		
+		verifyAnnotationOnType(arrayType, new String[]{"@Marker2()"});
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker2()"});
+		
+		binding = binding.getComponentType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+
+		statement = (VariableDeclarationStatement) statements.get(1);
+		fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		initializer = (ArrayCreation) fragment.getInitializer();
+		arrayType = initializer.getType();
+		binding = arrayType.resolveBinding();
+		verifyAnnotationOnType(arrayType, new String[]{"@Marker()"});
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker()"});
+		
+		binding = binding.getComponentType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@Marker2()"});
+	}
+	public void _test020() throws Exception {
+		String contents = 
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        Map.Entry<String, String> [] e = (Map.@Marker Entry<String, String> []) null;\n" +
+				"    }\n" +
+				"}\n" +
+				"class Map<K, V> {\n" +
+				"	interface Entry<K, V> {}\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		List statements = method.getBody().statements();
+		assertEquals("Incorrect no of statements", 1, statements.size());
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		CastExpression castExp = (CastExpression) fragment.getInitializer();
+		ArrayType arrayType = (ArrayType) castExp.getType();
+		verifyAnnotationOnType(arrayType, new String[]{});
+		ParameterizedType type = (ParameterizedType) arrayType.getElementType();
+		verifyAnnotationOnType(type.getType(), new String[]{"@Marker()"});
+	}
+	public void test021() throws Exception {
+		String contents = 
+				"import java.io.Serializable;\n" +
+				"import java.util.List;\n" +
+				"public class X<T extends Comparable<T> & Serializable> {\n" +
+				"	void foo(List<? extends @Marker @Marker2 Comparable<T>> p) {} \n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		SingleVariableDeclaration param = (SingleVariableDeclaration) method.parameters().get(0);
+		Type type = param.getType();
+		assertEquals("Should be a parameterized type", ASTNode.PARAMETERIZED_TYPE, type.getNodeType());
+		List typeArgs = ((ParameterizedType) type).typeArguments();
+		assertEquals("Incorrect type args", 1, typeArgs.size());
+		WildcardType wildcard = (WildcardType) typeArgs.get(0);
+		ParameterizedType bound = (ParameterizedType) wildcard.getBound();
+		verifyAnnotationOnType(bound, new String[]{"@Marker()", "@Marker2()"});
+	}
+	public void test022() throws Exception {
+		String contents = 
+				"public class X {\n" +
+				"    X x = new @Marker X();\n" +
+				"    X y = new <String> @Marker X();\n" +	
+				"	<T> X(){}\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect no of fields", 2, fields.length);
+		FieldDeclaration field = fields[0];
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		ClassInstanceCreation creation = (ClassInstanceCreation) fragment.getInitializer();
+		verifyAnnotationOnType(creation.getType(), new String[]{"@Marker()"});
+		
+		field = fields[1];
+		fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		creation = (ClassInstanceCreation) fragment.getInitializer();
+		verifyAnnotationOnType(creation.getType(), new String[]{"@Marker()"});
+	}
+	public void test023() throws Exception {
+		String contents = 
+				"public class X {\n" +
+				"    class Y {\n" +
+				"	    <T> Y(){}\n" +
+				"    }\n" +
+				"    Y y1 = new @Marker X().new @Marker2 Y();\n" +
+				"    Y y2 = new @Marker2 X().new <String> @Marker Y();\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect no of fields", 2, fields.length);
+		FieldDeclaration field = fields[0];
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		ClassInstanceCreation creation = (ClassInstanceCreation) fragment.getInitializer();
+		verifyAnnotationOnType(creation.getType(), new String[]{"@Marker2()"});
+		creation = (ClassInstanceCreation) creation.getExpression();
+		verifyAnnotationOnType(creation.getType(), new String[]{"@Marker()"});
+		
+		field = fields[1];
+		fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		creation = (ClassInstanceCreation) fragment.getInitializer();
+		verifyAnnotationOnType(creation.getType(), new String[]{"@Marker()"});
+		creation = (ClassInstanceCreation) creation.getExpression();
+		verifyAnnotationOnType(creation.getType(), new String[]{"@Marker2()"});
+	}
+	public void test024() throws Exception {
+		String contents = 
+				"public class X {\n" +
+				"    void foo() throws @Marker NullPointerException, @Marker2 ArrayIndexOutOfBoundsException {}\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 3, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		List thrownTypes = method.thrownExceptionTypes();
+		assertEquals("Incorrect no of thrown exceptions", 2, thrownTypes.size());
+		Type type = (Type) thrownTypes.get(0);
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		type = (Type) thrownTypes.get(1);
+		verifyAnnotationOnType(type, new String[]{"@Marker2()"});
+	}
+	public void test025() throws Exception {
+		String contents = 
+				"interface I {}\n" +
+				"interface J {}\n" +
+				"interface K extends @Marker I, @Marker2 J {}\n" +
+				"interface L {}\n" +
+				"public class X implements @Marker2 K, @Marker L {\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 7, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(2);
+		List interfaces = typeDecl.superInterfaceTypes();
+		assertEquals("Incorrect no of super interfaces", 2, interfaces.size());
+		verifyAnnotationOnType((Type) interfaces.get(0), new String[]{"@Marker()"});
+		verifyAnnotationOnType((Type) interfaces.get(1), new String[]{"@Marker2()"});
+		
+		typeDecl = (TypeDeclaration) types.get(4);
+		interfaces = typeDecl.superInterfaceTypes();
+		assertEquals("Incorrect no of super interfaces", 2, interfaces.size());
+		verifyAnnotationOnType((Type) interfaces.get(0), new String[]{"@Marker2()"});
+		verifyAnnotationOnType((Type) interfaces.get(1), new String[]{"@Marker()"});
+	}
+	public void test026() throws Exception {
+		String contents = 
+				"interface I {\n" +
+				"    void foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = A.Y.@Marker Z ::foo;\n" +
+				"        i.foo(10); \n" +
+				"    }\n" +
+				"}\n" +
+				"class A {\n" +
+				"  static class Y {\n" +
+				"    static class Z {\n" +
+				"        public static void foo(int x) {\n" +
+				"	        System.out.println(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"  }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 4, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		List statements = method.getBody().statements();
+		
+		VariableDeclarationStatement stmt = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) stmt.fragments().get(0);
+		TypeMethodReference lambda = (TypeMethodReference) fragment.getInitializer();
+		Type type = lambda.getType();
+
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		verifyAnnotationOnType(((QualifiedType)type).getQualifier(), new String[]{});
+	}
+	public void test027() throws Exception {
+		String contents = 
+				"interface I {\n" +
+				"    Y foo(int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"    class Z extends Y {\n" +
+				"        public Z(int x) {\n" +
+				"            super(x);\n" +
+				"        }\n" +
+				"    }\n" +
+				"    public static void main(String [] args) {\n" +
+				"        I i = @Marker W<@Marker2 Integer>::<@Marker3 String> new;\n" +
+				"    }\n" +
+				"}\n" +
+				"class W<T> extends Y {\n" +
+				"    public <C> W(T x) {\n" +
+				"        super(0);\n" +
+				"    }\n" +
+				"}\n" +
+				"class Y {\n" +
+				"    public Y(int x) {\n" +
+				"    }\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker2 {}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker3 {}\n";
+
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 7, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		MethodDeclaration method = typeDecl.getMethods()[0];
+		List statements = method.getBody().statements();
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		CreationReference lambda = (CreationReference) fragment.getInitializer();
+		Type type = lambda.getType();
+		verifyAnnotationOnType(type, new String[]{"@Marker()"});
+		ParameterizedType paramType = (ParameterizedType) type;
+		verifyAnnotationOnType((Type) paramType.typeArguments().get(0), new String[]{"@Marker2()"});
+		List typeArgs = lambda.typeArguments();
+		verifyAnnotationOnType((Type) typeArgs.get(0), new String[]{"@Marker3()"});
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=418096
+	public void test028() throws Exception {
+		String contents = 
+				"public class X {\n" +
+				"    @TypeUseAnnotation(\"a\") String @TypeUseAnnotation(\"a1\") [] @TypeUseAnnotation(\"a2\") [] _field2 @TypeUseAnnotation(\"a3\") [], _field3 @TypeUseAnnotation(\"a4\") [][] = null;\n" +
+				"}" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface TypeUseAnnotation {\n" +
+				"	String value() default \"\";\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect no of fields", 1, fields.length);
+		FieldDeclaration field = fields[0];
+		List fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 2, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		ITypeBinding binding = fragment.resolveBinding().getType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@TypeUseAnnotation(value = a3)"});
+		verifyAnnotationsOnBinding(binding = binding.getComponentType(), new String[]{"@TypeUseAnnotation(value = a1)"});
+		verifyAnnotationsOnBinding(binding = binding.getComponentType(), new String[]{"@TypeUseAnnotation(value = a2)"});
+		verifyAnnotationsOnBinding(binding = binding.getComponentType(), new String[]{"@TypeUseAnnotation(value = a)"});
+		fragment = (VariableDeclarationFragment) fragments.get(1);
+		binding = fragment.resolveBinding().getType();
+		verifyAnnotationsOnBinding(binding, new String[]{"@TypeUseAnnotation(value = a4)"});
+		verifyAnnotationsOnBinding(binding = binding.getComponentType(), new String[]{});
+		verifyAnnotationsOnBinding(binding = binding.getComponentType(), new String[]{"@TypeUseAnnotation(value = a1)"});
+		verifyAnnotationsOnBinding(binding = binding.getComponentType(), new String[]{"@TypeUseAnnotation(value = a2)"});
+		verifyAnnotationsOnBinding(binding = binding.getComponentType(), new String[]{"@TypeUseAnnotation(value = a)"});
+	}
+	
+	public void testAnnotatedBinaryType() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer  {\n" +
+				"	class Middle {\n" +
+				"		class Inner {\n" +
+				"		}\n" +
+				"	}\n" +
+				"	public @Marker(\"Outer\") Outer.@Marker (\"Middle\") Middle.@Marker(\"Inner\") Inner omi;\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {\n" +
+				"	String value() default \"GOK\";\n" +
+				"}\n"
+			};
+		
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Outer o) {\n" +
+					"        o.omi = null;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			assertEquals("Wrong type", "@Marker{ value = (String)\"Outer\"} Outer.@Marker{ value = (String)\"Middle\"} Middle.@Marker{ value = (String)\"Inner\"} Inner", type.toString());		
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testAnnotatedBinaryType2() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer  {\n" +
+				"	class Middle {\n" +
+				"		class Inner {\n" +
+				"		}\n" +
+				"	}\n" +
+				"	public @Marker(\"Outer\") Outer.@Marker (\"Middle\") Middle.@Marker(\"Inner\") Inner @Marker(\"Prefix []\") [] omi @Marker(\"Extended []\") [];\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface Marker {\n" +
+				"	String value() default \"GOK\";\n" +
+				"}\n"
+			};
+		
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Outer o) {\n" +
+					"        o.omi = null;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			assertEquals("Wrong type", "@Marker{ value = (String)\"Outer\"} Outer.@Marker{ value = (String)\"Middle\"} Middle.@Marker{ value = (String)\"Inner\"} Inner @Marker{ value = (String)\"Extended []\"} [] @Marker{ value = (String)\"Prefix []\"} []", type.toString());		
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testAnnotatedBinaryType3() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer<K>  {\n" +
+				"	class Inner<P> {\n" +
+				"	}\n" +
+				"	public @T(1) Outer<@T(2) String>.@T(3) Inner<@T(4) Integer> @T(5) [] omi @T(6) [];\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value();\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Outer<String> o) {\n" +
+					"        o.omi = null;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			assertEquals("Wrong type", "@T{ value = (int)1} Outer<@T{ value = (int)2} String>.@T{ value = (int)3} Inner<@T{ value = (int)4} Integer> @T{ value = (int)6} [] @T{ value = (int)5} []", type.toString());		
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	
+	public void testAnnotatedBinaryType4() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer<K>  {\n" +
+				"	class Inner<P> {\n" +
+				"	}\n" +
+				"	@T(1) K @T(2) [] f @T(3) [];\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value();\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Outer<String> o) {\n" +
+					"        o.f = null;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			assertEquals("Wrong type", "@T{ value = (int)1} String @T{ value = (int)3} [] @T{ value = (int)2} []", type.toString());		
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testAnnotatedBinaryType5() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer<K>  {\n" +
+				"	class Inner<P> {\n" +
+				"	}\n" +
+				"	@T(1) Outer<@T(2) ? extends @T(3) String>.@T(4) Inner<@T(5) ? super @T(6) Integer> @T(7) [] f @T(8) [];\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value();\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Outer<String> o) {\n" +
+					"        o.f = null;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			assertEquals("Wrong type", "@T{ value = (int)1} Outer<@T{ value = (int)2} ? extends @T{ value = (int)3} String>.@T{ value = (int)4} Inner<@T{ value = (int)5} ? super @T{ value = (int)6} Integer> @T{ value = (int)8} [] @T{ value = (int)7} []", type.toString());		
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testAnnotatedBinaryType6() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer<K>  {\n" +
+				"	class Inner<P> {\n" +
+				"	}\n" +
+				"	@T(1) Outer.@T(2) Inner @T(3) [] f @T(4) [];\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value();\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Outer<String> o) {\n" +
+					"        o.f = null;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			assertEquals("Wrong type", "@T{ value = (int)1} Outer#RAW.@T{ value = (int)2} Inner#RAW @T{ value = (int)4} [] @T{ value = (int)3} []", type.toString());		
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testIntersectionCastType() throws CoreException, IOException {
+		String contents = 
+				"import java.lang.annotation.ElementType;\n" +
+						"import java.lang.annotation.Target;\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface T1 {\n" +
+						"}\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface T2 {\n" +
+						"}\n" +
+						"@Target(ElementType.TYPE_USE)\n" +
+						"@interface T3 {\n" +
+						"}\n" +
+						"public class X {\n" +
+						"	Object o = (@T1 Object & @T2 Runnable & java.io.@T3 Serializable) null;\n" +
+						"	Object p = (@T1 Object & @T2 Runnable & java.io.@T3 Serializable) null;\n" +
+						"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 4, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(3);
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect no of fields", 2, fields.length);
+		FieldDeclaration field = fields[0];
+		List fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		CastExpression cast = (CastExpression) fragment.getInitializer();
+		Type castType = cast.getType();
+		ITypeBinding binding1 = castType.resolveBinding();
+		assertEquals("Wrong annotations", "@T1 Object & @T2 Runnable & @T3 Serializable", binding1.toString());
+		
+		field = fields[1];
+		fragments = field.fragments();
+		assertEquals("Incorrect no of fragments", 1, fragments.size());
+		fragment = (VariableDeclarationFragment) fragments.get(0);
+		cast = (CastExpression) fragment.getInitializer();
+		castType = cast.getType();
+		ITypeBinding binding2 = castType.resolveBinding();
+		assertEquals("Wrong annotations", "@T1 Object & @T2 Runnable & @T3 Serializable", binding2.toString());
+		assertSame("Should be equal", binding1, binding2);
+	}
+	public void testMemberType() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer  {\n" +
+				"	class Inner {\n" +
+				"	}\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(@T Outer o) {\n" +
+					"    }\n" +
+					"}\n" +
+					"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+					"@interface T {\n" +
+					"}\n";
+					
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 2, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			List parameters = method.parameters();
+			SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(0);
+			ITypeBinding binding = parameter.resolveBinding().getType();
+			assertEquals("@T Outer", binding.toString());
+			ITypeBinding [] memberTypes = binding.getDeclaredTypes();
+			assertEquals("Incorrect no of types", 1, memberTypes.length);
+			assertEquals("Incorrect no of types", "@T Outer.Inner", memberTypes[0].toString());
+			assertEquals("Incorrect no of types", "@T Outer", memberTypes[0].getEnclosingType().toString());
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testMemberType2() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer  {\n" +
+				"    @T Outer f;\n"+
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Outer o) {\n" +
+					"		o.f = null;\n" +
+					"    }\n" +
+					"}\n";
+					
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			assertEquals("Wrong type", "@T Outer", type.toString());
+			IVariableBinding[] declaredFields = type.getDeclaredFields();
+			assertEquals("Wrong type", 1, declaredFields.length);
+			assertEquals("Wrong type", "@T Outer", declaredFields[0].getType().toString());
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testBinarySuperInterfaces() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Y.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T1 {\n" +
+				"}\n" +
+				"public abstract class Y implements Comparable<@T1 Y>{  \n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"    void foo(Y y) {\n" +
+					"    }\n" +
+					"}\n";
+					
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			List parameters = method.parameters();
+			SingleVariableDeclaration parameter = (SingleVariableDeclaration) parameters.get(0);
+			ITypeBinding binding = parameter.resolveBinding().getType();
+			ITypeBinding binding2 = binding.getInterfaces()[0].getTypeArguments()[0];
+			assertEquals("Wrong type", "@T1 Y", binding2.toString());
+			assertEquals("Wrong type", "Comparable<@T1 Y>", binding2.getInterfaces()[0].toString());		
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testMemberTypeSource() throws CoreException, IOException {
+		String contents = 
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    class Y {}\n" +
+				"    @T X.Y xy;\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect no of fields", 1, fields.length);
+		FieldDeclaration field = fields[0];
+		ITypeBinding binding = field.getType().resolveBinding();
+		assertEquals("Wrong Type", "@T X", (binding = binding.getEnclosingType()).toString());
+		assertEquals("Wrong Type", "@T X.Y", (binding = binding.getDeclaredTypes()[0]).toString());
+	}
+	public void testAnnotatedTypeIdentity() throws CoreException, IOException {
+		String contents = 
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"import java.util.List;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"public class X {\n" +
+				"    @T List<@T String> ls = (@T List<@T String>) null;\n" +
+				"}\n";
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect no of fields", 1, fields.length);
+		FieldDeclaration field = fields[0];
+		ITypeBinding binding = field.getType().resolveBinding();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		CastExpression cast = (CastExpression) fragment.getInitializer();
+		ITypeBinding binding2 = cast.resolveTypeBinding();
+		assertEquals("Wrong Type", "@T List<@T String>", binding.toString());
+		assertSame("not Equal", binding, binding2);
+	}
+	public void testAnnotatedTypeIdentity2() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"public class Outer  {\n" +
+				"	Outer @T [] f @T [];\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value() default 10;\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"public class X {\n" +
+					"	 Outer @T [] f @T [];\n" +
+					"    void foo(Outer o) {\n" +
+					"        o.f = this.f;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			Expression right = assignment.getRightHandSide();
+			ITypeBinding type2 = right.resolveTypeBinding();
+			assertEquals("Wrong type", "Outer @T [] @T []", type.toString());
+			assertSame ("Should be same", type, type2);
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testAnnotatedTypeIdentity3() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Outer.java",
+				"import java.util.List;\n" +
+				"public class Outer  {\n" +
+				"	@T List<@T String> ls;\n" +
+				"}\n" +
+				"@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value() default 10;\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"import java.util.List;\n" +
+					"public class X {\n" +
+					"	@T List<@T String> ls;\n" +
+					"    void foo(Outer o) {\n" +
+					"        o.ls = this.ls;\n" +
+					"    }\n" +
+					"}";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			
+			MethodDeclaration[] methods = typeDecl.getMethods();
+			assertEquals("Incorrect no of methods", 1, methods.length);
+			MethodDeclaration method = methods[0];
+			Block body = method.getBody();
+			ExpressionStatement stmt = (ExpressionStatement) body.statements().get(0);
+			Assignment assignment = (Assignment) stmt.getExpression();
+			Expression left = assignment.getLeftHandSide();
+			ITypeBinding type = left.resolveTypeBinding();
+			Expression right = assignment.getRightHandSide();
+			ITypeBinding type2 = right.resolveTypeBinding();
+			assertEquals("Wrong type", "@T List<@T String>", type.toString());
+			assertSame ("Should be same", type, type2);
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	public void testHybridAnnotations() throws CoreException, IOException {
+		String contents = 
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@interface A {\n" +
+				"}\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface AUse {\n" +
+				"}\n" +
+				"@Target({ElementType.TYPE_USE, ElementType.PARAMETER})\n" +
+				"@interface AUseParameter {\n" +
+				"}\n" +
+				"@Target({ElementType.TYPE_USE, ElementType.LOCAL_VARIABLE})\n" +
+				"@interface AUseLocal {\n" +
+				"}\n" +
+				"@Target({ElementType.PARAMETER})\n" +
+				"@interface AParameter {\n" +
+				"}\n" +
+				"public class X {    \n" +
+				"	void foo(@A @AUse @AUseParameter @AUseLocal @AParameter X x) {\n" +
+				"	}\n" +
+				"}\n";
+		
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 6, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(5);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect no of methods", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		SingleVariableDeclaration parameter = (SingleVariableDeclaration) method.parameters().get(0);
+		IVariableBinding parameterBinding = parameter.resolveBinding();
+		verifyAnnotationsOnBinding(parameterBinding, new String [] { "@A()", "@AUseParameter()", "@AParameter()" });
+		ITypeBinding type = parameterBinding.getType();
+		verifyAnnotationsOnBinding(type, new String [] { "@AUse()", "@AUseParameter()", "@AUseLocal()" });
+	}
+	public void testGenericMethod() throws CoreException, IOException {
+		String contents = 
+				"import java.lang.annotation.Annotation;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"}\n" +
+				"public class X { \n" +
+				"	<N extends Annotation> @T String f(N a) {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"}\n";
+		
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect no of methods", 1, methods.length);
+		MethodDeclaration method = methods[0];
+		Type returnType = method.getReturnType2();
+		ITypeBinding type = returnType.resolveBinding();
+		verifyAnnotationsOnBinding(type, new String [] { "@T()" });
+	}
+	public void testHybridAnnotations2() throws CoreException, IOException {
+		String contents = 
+				"import java.lang.annotation.Target;\n" +
+				"import java.lang.annotation.ElementType;\n" +
+				"@Target({ ElementType.TYPE_USE, ElementType.METHOD })\n" +
+				"@interface SillyAnnotation {  }\n" +
+				"public class X {\n" +
+				"    @SillyAnnotation\n" +
+				"    X(@SillyAnnotation int x) {\n" +
+				"    }\n" +
+				"    @SillyAnnotation\n" +
+				"    void foo(@SillyAnnotation int x) {\n" +
+				"    }\n" +
+				"    @SillyAnnotation\n" +
+				"    String goo(@SillyAnnotation int x) {\n" +
+				"	return null;\n" +
+				"    }\n" +
+				"    @SillyAnnotation\n" +
+				"    X field;\n" +
+				"}\n";
+		
+		this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+		ASTNode node = buildAST(contents, this.workingCopy);
+		assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+		CompilationUnit compilationUnit = (CompilationUnit) node;
+		assertProblemsSize(compilationUnit, 0);
+		List types = compilationUnit.types();
+		assertEquals("Incorrect no of types", 2, types.size());
+		
+		TypeDeclaration typeDecl = (TypeDeclaration) types.get(1);
+		MethodDeclaration[] methods = typeDecl.getMethods();
+		assertEquals("Incorrect no of methods", 3, methods.length);
+		
+		MethodDeclaration method = methods[0];
+		List modifiers = method.modifiers();
+		int size = modifiers.size();
+		assertTrue("Should be just 1", size == 1);
+		MarkerAnnotation annotation = (MarkerAnnotation) modifiers.get(0);
+		assertEquals("Incorrect annotation", "@SillyAnnotation", annotation.toString());
+		SingleVariableDeclaration parameter = (SingleVariableDeclaration) method.parameters().get(0);
+	    IAnnotationBinding [] annotations = parameter.resolveBinding().getAnnotations();
+		assertTrue("should be 0", annotations == null || annotations.length == 0);
+		IAnnotationBinding [] typeAnnotations = parameter.getType().resolveBinding().getTypeAnnotations();
+		assertEquals("Incorrect annotation", "@SillyAnnotation()", typeAnnotations[0].toString());
+		
+		method = methods[1];
+		modifiers = method.modifiers();
+		size = modifiers.size();
+		assertTrue("Should be just 1", size == 1);
+		annotation = (MarkerAnnotation) modifiers.get(0);
+		assertEquals("Incorrect annotation", "@SillyAnnotation", annotation.toString());
+		typeAnnotations = method.getReturnType2().resolveBinding().getTypeAnnotations();
+		assertTrue("Should be just 0", typeAnnotations.length == 0);
+		parameter = (SingleVariableDeclaration) method.parameters().get(0);
+	    annotations = parameter.resolveBinding().getAnnotations();
+		assertTrue("should be 0", annotations == null || annotations.length == 0);
+		typeAnnotations = parameter.getType().resolveBinding().getTypeAnnotations();
+		assertEquals("Incorrect annotation", "@SillyAnnotation()", typeAnnotations[0].toString());
+		
+		method = methods[2];
+		modifiers = method.modifiers();
+		size = modifiers.size();
+		assertTrue("Should be just 1", size == 1);
+		annotation = (MarkerAnnotation) modifiers.get(0);
+		assertEquals("Incorrect annotation", "@SillyAnnotation", annotation.toString());
+		typeAnnotations = method.getReturnType2().resolveBinding().getTypeAnnotations();
+		assertTrue("Should be just 1", typeAnnotations.length == 1);
+		assertEquals("Incorrect annotation", "@SillyAnnotation()", typeAnnotations[0].toString());
+		parameter = (SingleVariableDeclaration) method.parameters().get(0);
+	    annotations = parameter.resolveBinding().getAnnotations();
+		assertTrue("should be 0", annotations == null || annotations.length == 0);
+		typeAnnotations = parameter.getType().resolveBinding().getTypeAnnotations();
+		assertEquals("Incorrect annotation", "@SillyAnnotation()", typeAnnotations[0].toString());
+		
+		FieldDeclaration[] fields = typeDecl.getFields();
+		assertEquals("Incorrect no of fields", 1, fields.length);
+		
+		FieldDeclaration field = fields[0];
+		modifiers = field.modifiers();
+		size = modifiers.size();
+		assertTrue("Should be just 1", size == 1);
+		annotation = (MarkerAnnotation) modifiers.get(0);
+		assertEquals("Incorrect annotation", "@SillyAnnotation", annotation.toString());
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) field.fragments().get(0);
+		annotations = fragment.resolveBinding().getAnnotations();
+		assertTrue("Incorrect annotation", annotations == null || annotations.length == 0);
+		
+		typeAnnotations = field.getType().resolveBinding().getTypeAnnotations();
+		assertTrue("Should be just 1", typeAnnotations.length == 1);
+		assertEquals("Incorrect annotation", "@SillyAnnotation()", typeAnnotations[0].toString());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=419918, [1.8][compiler] Annotations are not restored from class files in a few situations.
+	public void testBinaryWithoutGenericSignature() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"Superclass.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value() default 0;\n" +
+				"}\n" +
+				"@T(1)\n" +
+				"public abstract class Superclass extends @T(2) Object implements @T(3) Runnable {\n" +
+				"	Object @T(4) [] field;\n" +
+				"	@T(5)\n" +
+				"	public String run(@T(6) Superclass this, Object @T(7) [] that) throws @T(8) NullPointerException {\n" +
+				"		return null;\n" +
+				"	}\n" +
+				"   @T(9)\n" +
+				"   Superclass () {}\n" +
+				"   @T(10)\n" +
+				"   class Inner {}\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"@T(21)\n" +
+					"public abstract class X extends @T(22) Superclass implements @T(23) Runnable {\n" +
+					"	Object @T(24) [] field;\n" +
+					"	@T(25)\n" +
+					"	public String run(@T(26) X this, Object @T(27) [] that) throws @T(28) NullPointerException {\n" +
+					"		return null;\n" +
+					"	}\n" +
+					"   @T(29)\n" +
+					"   X() {\n" +
+		            "   }" +
+					"   @T(30)\n" +
+					"   class Inner {\n" +
+					"   }\n" +
+					"}\n";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 0);
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			ITypeBinding typeBinding = typeDecl.resolveBinding();
+			IAnnotationBinding[] annotations = typeBinding.getAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 21)", annotations[0].toString());
+			annotations = typeBinding.getSuperclass().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 22)", annotations[0].toString());
+			annotations = typeBinding.getInterfaces()[0].getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 23)", annotations[0].toString());
+			
+			annotations = typeDecl.getFields()[0].getType().resolveBinding().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 24)", annotations[0].toString());
+			
+			annotations = typeDecl.getMethods()[0].getReturnType2().resolveBinding().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 25)", annotations[0].toString());
+			
+			annotations = typeDecl.getMethods()[0].getReceiverType().resolveBinding().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 26)", annotations[0].toString());
+			
+			annotations = ((SingleVariableDeclaration) (typeDecl.getMethods()[0].parameters().get(0))).getType().resolveBinding().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 27)", annotations[0].toString());
+			
+			annotations = ((Type) typeDecl.getMethods()[0].thrownExceptionTypes().get(0)).resolveBinding().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 28)", annotations[0].toString());
+			
+			annotations = typeDecl.getMethods()[1].resolveBinding().getAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 29)", annotations[0].toString());
+			
+			annotations = typeDecl.getTypes()[0].resolveBinding().getAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 30)", annotations[0].toString());
+			
+			
+			// Check the same set of things for the binary type.
+			annotations = typeBinding.getSuperclass().getAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 1)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getSuperclass().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 2)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getInterfaces()[0].getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 3)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getDeclaredFields()[0].getType().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 4)", annotations[0].toString());
+			
+			// Skip past the constructor at [0]
+			annotations = typeBinding.getSuperclass().getDeclaredMethods()[1].getReturnType().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 5)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getDeclaredMethods()[1].getDeclaredReceiverType().getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 6)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getDeclaredMethods()[1].getParameterTypes()[0].getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 7)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getDeclaredMethods()[1].getExceptionTypes()[0].getTypeAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 8)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getDeclaredMethods()[0].getAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 9)", annotations[0].toString());
+			
+			annotations = typeBinding.getSuperclass().getDeclaredTypes()[0].getAnnotations();
+			assertTrue("Should be 1", annotations.length == 1);
+			assertEquals("Annotation mismatch", "@T(value = 10)", annotations[0].toString());
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=419918, [1.8][compiler] Annotations are not restored from class files in a few situations.
+	public void testBinaryAnnotationType() throws CoreException, IOException {
+		String jarName = "TypeBindingTests308.jar";
+		String srcName = "TypeBindingTests308_src.zip";
+		final IJavaProject javaProject = getJavaProject("Converter18");
+		try {
+			String[] pathAndContents = new String[] {
+				"T.java",
+				"import java.lang.annotation.ElementType;\n" +
+				"import java.lang.annotation.Target;\n" +
+				"@Deprecated\n" +		
+				"@Target(ElementType.TYPE_USE)\n" +
+				"@interface T {\n" +
+				"	int value() default 0;\n" +
+				"}\n"
+			};
+			
+			HashMap libraryOptions = new HashMap(javaProject.getOptions(true));
+			libraryOptions.put(CompilerOptions.OPTION_Store_Annotations, CompilerOptions.ENABLED);
+			addLibrary(javaProject, jarName, srcName, pathAndContents, JavaCore.VERSION_1_8, libraryOptions);
+			
+			String contents = 
+					"@T\n" +
+					"public class X {\n" +
+					"}\n";
+			
+			this.workingCopy = getWorkingCopy("/Converter18/src/X.java", true);
+			ASTNode node = buildAST(contents, this.workingCopy, false);
+			assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType());
+			CompilationUnit compilationUnit = (CompilationUnit) node;
+			assertProblemsSize(compilationUnit, 1, "The type T is deprecated");
+			List types = compilationUnit.types();
+			assertEquals("Incorrect no of types", 1, types.size());
+			TypeDeclaration typeDecl = (TypeDeclaration) types.get(0);
+			ITypeBinding typeBinding = typeDecl.resolveBinding();
+			IAnnotationBinding[] annotations = typeBinding.getAnnotations()[0].getAnnotationType().getAnnotations();
+			assertTrue("Should be 2", annotations.length == 2);
+			assertEquals("Annotation mismatch", "@Target(value = {public static final java.lang.annotation.ElementType TYPE_USE})", annotations[0].toString());
+			assertEquals("Annotation mismatch", "@Deprecated()", annotations[1].toString());
+		} finally {
+			removeLibrary(javaProject, jarName, srcName);
+		}
+	}	
+}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterJSR308Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterJSR308Tests.java
new file mode 100644
index 0000000..42ab816
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterJSR308Tests.java
@@ -0,0 +1,357 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper Steen Moller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     Jesper Steen Moller - initial API and implementation
+ *                           Contribution for bug 403881
+ */
+
+package org.eclipse.jdt.core.tests.formatter;
+
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.formatter.CodeFormatter;
+import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.formatter.DefaultCodeFormatter;
+import org.eclipse.jdt.internal.formatter.DefaultCodeFormatterOptions;
+import org.eclipse.text.edits.TextEdit;
+
+public class FormatterJSR308Tests extends AbstractJavaModelTests {
+
+	protected static IJavaProject JAVA_PROJECT;
+
+	public static final int UNKNOWN_KIND = 0;
+	public static final String IN = "_in";
+	public static final String OUT = "_out";
+	public static final boolean DEBUG = false;
+	static final String LINE_SEPARATOR = System.getProperty("line.separator");
+	private static final String PROJECT_NAME = "FormatterJSR308"; 
+	private long time;
+
+	DefaultCodeFormatterOptions formatterPrefs;
+	Map formatterOptions;
+
+	static {
+//		TESTS_NUMBERS = new int[] { 783 };
+//		TESTS_RANGE = new int[] { 734, -1 };
+//		TESTS_NAMES = new String [] { "test015" };
+	}
+	public static Test suite() {
+		return buildModelTestSuite(FormatterJSR308Tests.class);
+	}
+
+	public FormatterJSR308Tests(String name) {
+		super(name);
+	}
+
+	String runFormatter(CodeFormatter codeFormatter, String source, int kind, int indentationLevel, int offset, int length, String lineSeparator, boolean repeat) {
+//		long time = System.currentTimeMillis();
+		TextEdit edit = codeFormatter.format(kind, source, offset, length, indentationLevel, lineSeparator);//$NON-NLS-1$
+//		System.out.println((System.currentTimeMillis() - time) + " ms");
+		if (edit == null) return null;
+//		System.out.println(edit.getChildrenSize() + " edits");
+		String result = org.eclipse.jdt.internal.core.util.Util.editedString(source, edit);
+
+		if (repeat && length == source.length()) {
+//			time = System.currentTimeMillis();
+			edit = codeFormatter.format(kind, result, 0, result.length(), indentationLevel, lineSeparator);//$NON-NLS-1$
+//			System.out.println((System.currentTimeMillis() - time) + " ms");
+			if (edit == null) return null;
+//			assertEquals("Should not have edits", 0, edit.getChildren().length);
+			final String result2 = org.eclipse.jdt.internal.core.util.Util.editedString(result, edit);
+			if (!result.equals(result2)) {
+				assertSourceEquals("Second formatting is different from first one!", Util.convertToIndependantLineDelimiter(result), Util.convertToIndependantLineDelimiter(result2));
+			}
+		}
+		return result;
+	}
+
+	/**
+	 * Init formatter preferences with Eclipse default settings.
+	 */
+	protected void setUp() throws Exception {
+	    super.setUp();
+		this.formatterPrefs = DefaultCodeFormatterOptions.getEclipseDefaultSettings();
+		if (JAVA_PROJECT != null) {
+			this.formatterOptions = JAVA_PROJECT.getOptions(true);
+		}
+		this.formatterOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		this.formatterOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+		this.formatterOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+	}
+
+	/**
+	 * Create project and set the jar placeholder.
+	 */
+	public void setUpSuite() throws Exception {
+		// ensure autobuilding is turned off
+		IWorkspaceDescription description = getWorkspace().getDescription();
+		if (description.isAutoBuilding()) {
+			description.setAutoBuilding(false);
+			getWorkspace().setDescription(description);
+		}
+
+		if (JAVA_PROJECT == null) {
+			JAVA_PROJECT = setUpJavaProject(PROJECT_NAME, "1.8"); //$NON-NLS-1$
+		}
+
+		if (DEBUG) {
+			this.time = System.currentTimeMillis();
+		}
+	}
+
+	/**
+	 * Reset the jar placeholder and delete project.
+	 */
+	public void tearDownSuite() throws Exception {
+		deleteProject(JAVA_PROJECT); //$NON-NLS-1$
+		JAVA_PROJECT = null;
+		if (DEBUG) {
+			System.out.println("Time spent = " + (System.currentTimeMillis() - this.time));//$NON-NLS-1$
+		}
+		super.tearDownSuite();
+	}
+
+	private String getIn(String compilationUnitName) {
+		assertNotNull(compilationUnitName);
+		int dotIndex = compilationUnitName.indexOf('.');
+		assertTrue(dotIndex != -1);
+		return compilationUnitName.substring(0, dotIndex) + IN + compilationUnitName.substring(dotIndex);
+	}
+
+	private String getOut(String compilationUnitName) {
+		assertNotNull(compilationUnitName);
+		int dotIndex = compilationUnitName.indexOf('.');
+		assertTrue(dotIndex != -1);
+		return compilationUnitName.substring(0, dotIndex) + OUT + compilationUnitName.substring(dotIndex);
+	}
+
+	void assertLineEquals(String actualContents, String originalSource, String expectedContents, boolean checkNull) {
+		if (actualContents == null) {
+			assertTrue("actualContents is null", checkNull);
+			assertEquals(expectedContents, originalSource);
+			return;
+		}
+		assertSourceEquals("Different number of length", Util.convertToIndependantLineDelimiter(expectedContents), actualContents);
+	}
+
+	private void runTest(String packageName, String compilationUnitName) {
+		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(this.formatterPrefs, this.formatterOptions);
+		runTest(codeFormatter, packageName, compilationUnitName, CodeFormatter.K_COMPILATION_UNIT, 0);
+	}
+
+	private void runTest(CodeFormatter codeFormatter, String packageName, String compilationUnitName, int kind, int indentationLevel) {
+		runTest(codeFormatter, packageName, compilationUnitName, kind, indentationLevel, false, 0, -1);
+	}
+	private void runTest(CodeFormatter codeFormatter, String packageName, String compilationUnitName, int kind, int indentationLevel, boolean checkNull, int offset, int length) {
+		runTest(codeFormatter, packageName, compilationUnitName, kind, indentationLevel, checkNull, offset, length, null);
+	}
+
+	private void runTest(CodeFormatter codeFormatter, String packageName, String compilationUnitName, int kind, int indentationLevel, boolean checkNull, int offset, int length, String lineSeparator) {
+		try {
+			ICompilationUnit sourceUnit = getCompilationUnit(PROJECT_NAME , "", packageName, getIn(compilationUnitName)); //$NON-NLS-1$ //$NON-NLS-2$
+			String source = sourceUnit.getSource();
+			assertNotNull(source);
+			ICompilationUnit outputUnit = getCompilationUnit(PROJECT_NAME , "", packageName, getOut(compilationUnitName)); //$NON-NLS-1$ //$NON-NLS-2$
+			assertNotNull(outputUnit);
+			String result;
+			if (length == -1) {
+				result = runFormatter(codeFormatter, source, kind, indentationLevel, offset, source.length(), lineSeparator, true);
+			} else {
+				result = runFormatter(codeFormatter, source, kind, indentationLevel, offset, length, lineSeparator, true);
+			}
+			assertLineEquals(result, source, outputUnit.getSource(), checkNull);
+		} catch (JavaModelException e) {
+			e.printStackTrace();
+			assertTrue(false);
+		}
+	}
+	
+	public void testLambda() {
+		runTest("testLambda", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	public void testReferenceExpression() {
+		runTest("testReferenceExpression", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test000() {
+		runTest("test000", "I.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test001() {
+		runTest("test001", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test002() {
+		runTest("test002", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test003() {
+		runTest("test003", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test004() {
+		runTest("test004", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test005() {
+		runTest("test005", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test006() {
+		runTest("test006", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test007() {
+		runTest("test007", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test008() {
+		runTest("test008", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test009() {
+		runTest("test009", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test010() {
+		runTest("test010", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test011() {
+		runTest("test011", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test012() {
+		runTest("test012", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test013() {
+		runTest("test013", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test014() {
+		runTest("test014", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test015() {
+		runTest("test015", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test016() {
+		runTest("test016", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test017() {
+		runTest("test017", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test018() {
+		runTest("test018", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test019() {
+		runTest("test019", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test020() {
+		runTest("test020", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test021() {
+		runTest("test021", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test022() {
+		runTest("test022", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test023() {
+		runTest("test023", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test024() {
+		runTest("test024", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test025() {
+		runTest("test025", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test026() {
+		runTest("test026", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test027() {
+		runTest("test027", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test028() {
+		runTest("test028", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test029() {
+		runTest("test029", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test030() {
+		runTest("test030", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test031() {
+		runTest("test031", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test032() {
+		runTest("test032", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test033() {
+		runTest("test033", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test034() {
+		runTest("test034", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test035() {
+		runTest("test035", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test036() {
+		runTest("test036", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test037() {
+		runTest("test037", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test038() {
+		runTest("test038", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void test039() {
+		runTest("test039", "X.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	public void testBug403881() {
+		runTest("testBugs", "Bug403881.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterJSR335Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterJSR335Tests.java
new file mode 100644
index 0000000..cc7acd1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterJSR335Tests.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper Steen Moller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     Jesper Steen Moller - initial API and implementation
+ *                           Contribution for bug 402819
+ *                           Contribution for bug 402818
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.formatter;
+
+import java.util.Map;
+
+import junit.framework.Test;
+
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.formatter.CodeFormatter;
+import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.formatter.DefaultCodeFormatter;
+import org.eclipse.jdt.internal.formatter.DefaultCodeFormatterOptions;
+import org.eclipse.text.edits.TextEdit;
+
+public class FormatterJSR335Tests extends AbstractJavaModelTests {
+
+	protected static IJavaProject JAVA_PROJECT;
+
+	public static final int UNKNOWN_KIND = 0;
+	public static final String IN = "_in";
+	public static final String OUT = "_out";
+	public static final boolean DEBUG = false;
+	static final String LINE_SEPARATOR = System.getProperty("line.separator");
+	private static final String PROJECT_NAME = "FormatterJSR335"; 
+
+	DefaultCodeFormatterOptions formatterPrefs;
+	Map formatterOptions;
+
+	static {
+//		TESTS_NUMBERS = new int[] { 783 };
+//		TESTS_RANGE = new int[] { 734, -1 };
+	}
+	public static Test suite() {
+		return buildModelTestSuite(FormatterJSR335Tests.class);
+	}
+
+	public FormatterJSR335Tests(String name) {
+		super(name);
+	}
+
+	/**
+	 * Init formatter preferences with Eclipse default settings.
+	 */
+	protected void setUp() throws Exception {
+	    super.setUp();
+		this.formatterPrefs = DefaultCodeFormatterOptions.getEclipseDefaultSettings();
+		if (JAVA_PROJECT != null) {
+			this.formatterOptions = JAVA_PROJECT.getOptions(true);
+		}
+		this.formatterOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		this.formatterOptions.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+		this.formatterOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+	}
+
+	/**
+	 * Create project and set the jar placeholder.
+	 */
+	public void setUpSuite() throws Exception {
+		// ensure autobuilding is turned off
+		IWorkspaceDescription description = getWorkspace().getDescription();
+		if (description.isAutoBuilding()) {
+			description.setAutoBuilding(false);
+			getWorkspace().setDescription(description);
+		}
+
+		if (JAVA_PROJECT == null) {
+			JAVA_PROJECT = setUpJavaProject(PROJECT_NAME, "1.8"); //$NON-NLS-1$
+		}
+	}
+
+	/**
+	 * Reset the jar placeholder and delete project.
+	 */
+	public void tearDownSuite() throws Exception {
+		deleteProject(JAVA_PROJECT); //$NON-NLS-1$
+		JAVA_PROJECT = null;
+		super.tearDownSuite();
+	}
+
+	String runFormatter(CodeFormatter codeFormatter, String source, int kind, int indentationLevel, int offset, int length, String lineSeparator, boolean repeat) {
+		TextEdit edit = codeFormatter.format(kind, source, offset, length, indentationLevel, lineSeparator);//$NON-NLS-1$
+		if (edit == null) return null;
+		String result = org.eclipse.jdt.internal.core.util.Util.editedString(source, edit);
+
+		if (repeat && length == source.length()) {
+			edit = codeFormatter.format(kind, result, 0, result.length(), indentationLevel, lineSeparator);//$NON-NLS-1$
+			if (edit == null) return null;
+			final String result2 = org.eclipse.jdt.internal.core.util.Util.editedString(result, edit);
+			if (!result.equals(result2)) {
+				assertSourceEquals("Second formatting is different from first one!", Util.convertToIndependantLineDelimiter(result), Util.convertToIndependantLineDelimiter(result2));
+			}
+		}
+		return result;
+	}
+
+	private String getIn(String compilationUnitName) {
+		assertNotNull(compilationUnitName);
+		int dotIndex = compilationUnitName.indexOf('.');
+		assertTrue(dotIndex != -1);
+		return compilationUnitName.substring(0, dotIndex) + IN + compilationUnitName.substring(dotIndex);
+	}
+
+	private String getOut(String compilationUnitName) {
+		assertNotNull(compilationUnitName);
+		int dotIndex = compilationUnitName.indexOf('.');
+		assertTrue(dotIndex != -1);
+		return compilationUnitName.substring(0, dotIndex) + OUT + compilationUnitName.substring(dotIndex);
+	}
+
+	void assertLineEquals(String actualContents, String originalSource, String expectedContents, boolean checkNull) {
+		if (actualContents == null) {
+			assertTrue("actualContents is null", checkNull);
+			assertEquals(expectedContents, originalSource);
+			return;
+		}
+		assertSourceEquals("Different number of length", Util.convertToIndependantLineDelimiter(expectedContents), actualContents);
+	}
+	private void runTest(String packageName, String compilationUnitName, DefaultCodeFormatterOptions codeFormatterOptions) {
+		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(codeFormatterOptions, this.formatterOptions);
+		runTest(codeFormatter, packageName, compilationUnitName, CodeFormatter.K_COMPILATION_UNIT, 0);
+	}
+	
+	private void runTest(String packageName, String compilationUnitName) {
+		DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(this.formatterPrefs, this.formatterOptions);
+		runTest(codeFormatter, packageName, compilationUnitName, CodeFormatter.K_COMPILATION_UNIT, 0);
+	}
+	private void runTest(CodeFormatter codeFormatter, String packageName, String compilationUnitName, int kind, int indentationLevel) {
+		runTest(codeFormatter, packageName, compilationUnitName, kind, indentationLevel, false, 0, -1, null);
+	}
+	private void runTest(CodeFormatter codeFormatter, String packageName, String compilationUnitName, int kind, int indentationLevel, boolean checkNull, int offset, int length, String lineSeparator) {
+		try {
+			ICompilationUnit sourceUnit = getCompilationUnit(PROJECT_NAME , "", packageName, getIn(compilationUnitName)); //$NON-NLS-1$ //$NON-NLS-2$
+			String source = sourceUnit.getSource();
+			assertNotNull(source);
+			ICompilationUnit outputUnit = getCompilationUnit(PROJECT_NAME , "", packageName, getOut(compilationUnitName)); //$NON-NLS-1$ //$NON-NLS-2$
+			assertNotNull(outputUnit);
+			String result;
+			if (length == -1) {
+				result = runFormatter(codeFormatter, source, kind, indentationLevel, offset, source.length(), lineSeparator, true);
+			} else {
+				result = runFormatter(codeFormatter, source, kind, indentationLevel, offset, length, lineSeparator, true);
+			}
+			assertLineEquals(result, source, outputUnit.getSource(), checkNull);
+		} catch (JavaModelException e) {
+			e.printStackTrace();
+			assertTrue(false);
+		}
+	}
+
+	public void testLambda() {
+		runTest("testLambda", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void testLambdaOptions() {
+		DefaultCodeFormatterOptions options = DefaultCodeFormatterOptions.getEclipseDefaultSettings();
+		options.brace_position_for_lambda_body = DefaultCodeFormatterConstants.NEXT_LINE;
+		options.insert_space_after_lambda_arrow = false;
+		options.insert_space_before_lambda_arrow = false;
+		runTest("testLambdaOptions", "A.java", options);//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void testMethodReference() {
+		runTest("testMethodReference", "A.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+
+	public void testBug402819() {
+		runTest("testBugs", "Bug402819.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+	public void testBug402818() {
+		runTest("testBugs", "Bug402818.java");//$NON-NLS-1$ //$NON-NLS-2$
+	}
+}
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 990ec4e..603f641 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
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -397,7 +401,7 @@
 
 	}
 	protected void addExternalLibrary(IJavaProject javaProject, String jarPath, String[] pathAndContents, String[] nonJavaResources, String compliance) throws Exception {
-		String[] claspath = get15LibraryIfNeeded(compliance);
+		String[] claspath = getJCL15PlusLibraryIfNeeded(compliance);
 		org.eclipse.jdt.core.tests.util.Util.createJar(pathAndContents, nonJavaResources, jarPath, claspath, compliance);
 		addLibraryEntry(javaProject, new Path(jarPath), true/*exported*/);
 	}
@@ -456,7 +460,7 @@
 		IProject project = javaProject.getProject();
 		String projectLocation = project.getLocation().toOSString();
 		String jarPath = projectLocation + File.separator + jarName;
-		String[] claspath = get15LibraryIfNeeded(compliance);
+		String[] claspath = getJCL15PlusLibraryIfNeeded(compliance);
 		org.eclipse.jdt.core.tests.util.Util.createJar(pathAndContents, nonJavaResources, jarPath, claspath, compliance, options);
 		if (pathAndContents != null && pathAndContents.length != 0) {
 			String sourceZipPath = projectLocation + File.separator + sourceZipName;
@@ -1677,6 +1681,12 @@
 					options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
 					options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
 					javaProject.setOptions(options);
+				} else if ("1.8".equals(compliance)) {
+					Map options = new HashMap();
+					options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+					options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+					options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+					javaProject.setOptions(options);
 				}
 
 				result[0] = javaProject;
@@ -1825,8 +1835,13 @@
 			assertTrue("Did not find sibling", found);
 		}
 	}
-	protected String[] get15LibraryIfNeeded(String compliance) throws JavaModelException, IOException {
-		if (compliance.charAt(compliance.length()-1) >= '5' && (AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_1_5) == 0) {
+	protected String[] getJCL15PlusLibraryIfNeeded(String compliance) throws JavaModelException, IOException {
+		if (compliance.charAt(compliance.length()-1) >= '8' && (AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_1_8) != 0) {
+			// ensure that the JCL 18 lib is setup (i.e. that the jclMin18.jar is copied)
+			setUpJCLClasspathVariables("1.8");
+			return new String[] {getExternalJCLPathString("1.8")};
+		}
+		if (compliance.charAt(compliance.length()-1) >= '5' && (AbstractCompilerTest.getPossibleComplianceLevels() & AbstractCompilerTest.F_1_5) != 0) {
 			// ensure that the JCL 15 lib is setup (i.e. that the jclMin15.jar is copied)
 			setUpJCLClasspathVariables("1.5");
 			return new String[] {getExternalJCLPathString("1.5")};
@@ -2764,7 +2779,15 @@
 					new IPath[] {getExternalJCLPath("1.7"), getExternalJCLSourcePath("1.7"), getExternalJCLRootSourcePath()},
 					null);
 			}
-		}else {
+		} else if ("1.8".equals(compliance)) {
+			if (JavaCore.getClasspathVariable("JCL18_LIB") == null) {
+				setupExternalJCL("jclMin1.8");
+				JavaCore.setClasspathVariables(
+					new String[] {"JCL18_LIB", "JCL18_SRC", "JCL_SRCROOT"},
+					new IPath[] {getExternalJCLPath("1.8"), getExternalJCLSourcePath("1.8"), getExternalJCLRootSourcePath()},
+					null);
+			}	
+		} else {
 			if (JavaCore.getClasspathVariable("JCL_LIB") == null) {
 				setupExternalJCL("jclMin");
 				JavaCore.setClasspathVariables(
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java
index 183581e..6c8714e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ClassNameTests.java
@@ -55,7 +55,7 @@
 }
 
 /**
- * Internal synonynm for deprecated constant AST.JSL3
+ * Internal synonym for deprecated constant AST.JSL3
  * to alleviate deprecation warnings.
  * @deprecated
  */
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 7d83147..2a52510 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
@@ -44,7 +44,7 @@
 	super(name);
 }
 /**
- * Internal synonynm for deprecated constant AST.JSL3
+ * Internal synonym for deprecated constant AST.JSL3
  * to alleviate deprecation warnings.
  * @deprecated
  */
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java
index af4f1ee..6a6aa77 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -1032,6 +1036,11 @@
 	suite.addTest(new CompletionTests("testBug350652l"));
 	suite.addTest(new CompletionTests("testBug350652m"));
 	suite.addTest(new CompletionTests("testBug350652n"));
+	suite.addTest(new CompletionTests("testBug401487a"));
+	suite.addTest(new CompletionTests("testBug401487b"));
+	suite.addTest(new CompletionTests("testBug401487c"));
+	suite.addTest(new CompletionTests("testBug401487d"));
+	suite.addTest(new CompletionTests("testBug401487e"));
 	suite.addTest(new CompletionTests("testBug351444"));
 	suite.addTest(new CompletionTests("testBug351444a"));
 	suite.addTest(new CompletionTests("testBug351444b"));
@@ -1046,7 +1055,17 @@
 	suite.addTest(new CompletionTests("testBug385858c"));
 	suite.addTest(new CompletionTests("testBug385858d"));
 	suite.addTest(new CompletionTests("testBug402574"));
+	suite.addTest(new CompletionTests("testBug402812a"));
+	suite.addTest(new CompletionTests("testBug402812b"));
+	suite.addTest(new CompletionTests("testBug402812c"));
+	suite.addTest(new CompletionTests("testBug402812d"));
 	suite.addTest(new CompletionTests("testBug370971"));
+	suite.addTest(new CompletionTests("testBug406468a"));
+	suite.addTest(new CompletionTests("testBug406468b"));
+	suite.addTest(new CompletionTests("testBug405250a"));
+	suite.addTest(new CompletionTests("testBug405250b"));
+	suite.addTest(new CompletionTests("testBug405250c"));
+	suite.addTest(new CompletionTests("testBug405250d"));
 	return suite;
 }
 public CompletionTests(String name) {
@@ -24859,6 +24878,171 @@
 		COMPLETION_PROJECT.setOptions(options);	
 	}
 }
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=401487
+// Bug 401487 - [1.8][assist] default modifier not proposed while completing modifiers in interfaces
+public void testBug401487a() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[3];
+		this.workingCopies[0] = getWorkingCopy(
+			"/Completion/src/test/Test.java",
+			"package test;"+
+			"interface P { \n" +
+            "    def" +
+			"}\n");
+
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "    def";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		
+		assertResults(
+			"def[POTENTIAL_METHOD_DECLARATION]{def, Ltest.P;, ()V, def, null, 14}\n" + "default[KEYWORD]{default, null, null, default, null, 24}" ,
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug401487b() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[3];
+		this.workingCopies[0] = getWorkingCopy(
+			"/Completion/src/test/Test.java",
+			"package test;"+
+			"@interface P { \n" +
+            "    def" +
+			"}\n");
+
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "    def";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		
+		assertResults(
+			"" ,
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug401487c() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[3];
+		this.workingCopies[0] = getWorkingCopy(
+			"/Completion/src/test/Test.java",
+			"package test;"+
+			"class P { \n" +
+            "    def" +
+			"}\n");
+
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "    def";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		
+		assertResults(
+			"def[POTENTIAL_METHOD_DECLARATION]{def, Ltest.P;, ()V, def, null, 14}" ,
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug401487d() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[3];
+		this.workingCopies[0] = getWorkingCopy(
+			"/Completion/src/test/Test.java",
+			"package test;"+
+			"enum P { \n" +
+            "    def" +
+			"}\n");
+
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "    def";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		
+		assertResults(
+			"" ,
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug401487e() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[3];
+		this.workingCopies[0] = getWorkingCopy(
+			"/Completion/src/test/Test.java",
+			"package test;"+
+			"public class ZZ { \n" +
+			"    public interface I {" +
+            "        def" +
+			"    }" +
+			"}\n");
+
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "    def";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		
+		assertResults(
+			"def[POTENTIAL_METHOD_DECLARATION]{def, Ltest.ZZ$I;, ()V, def, null, 14}\n" + "default[KEYWORD]{default, null, null, default, null, 24}" ,
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=350652
 // superclass exception type is allowed in multi-catch
 // types in same CU. Relevance of super type will be less.
@@ -25940,6 +26124,226 @@
 		COMPLETION_PROJECT.setOptions(options);	
 	}
 }
+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=402812
+//Bug 402812 - [1.8][completion] Code Completion problems with static/default interface methods.
+public void testBug402812a() throws Exception {
+	Hashtable javaCoreOldOptions = JavaCore.getOptions();
+	Map completionProjectOptions = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = completionProjectOptions.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = completionProjectOptions.get(CompilerOptions.OPTION_Source);	
+	try {
+		Hashtable options = new Hashtable(javaCoreOldOptions);
+		options.put(JavaCore.CODEASSIST_VISIBILITY_CHECK, JavaCore.ENABLED);
+		JavaCore.setOptions(options);
+		
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);
+		
+		IJavaProject p = createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB", "/P/lib402812.jar"}, "bin");
+		
+		refresh(p);
+		
+		waitUntilIndexesReady();
+		
+		this.workingCopies = new ICompilationUnit[1];
+
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/Test.java",
+				"interface Test { \n" +
+				"static void staticMethod() {}" +
+				"    default void defaultMethod() {" +
+				"        stat" +
+				"    }" +
+				"}\n");
+		// do completion
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true, true);
+		requestor.allowAllRequiredProposals();
+		NullProgressMonitor monitor = new NullProgressMonitor();
+
+	    String str = this.workingCopies[0].getSource();
+	    String completeBehind = "    stat";
+	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	    this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner, monitor);
+	    
+	    assertResults(
+			"staticMethod[METHOD_REF]{staticMethod(), Ltest.Test;, ()V, staticMethod, null, 27}",
+			requestor.getResults());
+	} finally {
+		deleteProject("P");
+		
+		JavaCore.setOptions(javaCoreOldOptions);
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);	
+	}
+}
+public void testBug402812b() throws Exception {
+	Hashtable javaCoreOldOptions = JavaCore.getOptions();
+	Map completionProjectOptions = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = completionProjectOptions.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = completionProjectOptions.get(CompilerOptions.OPTION_Source);	
+	try {
+		Hashtable options = new Hashtable(javaCoreOldOptions);
+		options.put(JavaCore.CODEASSIST_VISIBILITY_CHECK, JavaCore.ENABLED);
+		JavaCore.setOptions(options);
+		
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);
+		
+		IJavaProject p = createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB", "/P/lib402812.jar"}, "bin");
+		
+		refresh(p);
+		
+		waitUntilIndexesReady();
+		
+		this.workingCopies = new ICompilationUnit[1];
+
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/Test.java",
+				"interface I { \n" +
+				"    static void staticMethod() {}" +
+				"    default void defaultMethod() {}" +
+				"}" +
+				"public class X implements I {" +
+				"	public void foo(I i) {" +
+				"		I.stat     " +
+				"	}" +
+				"}\n");
+		// do completion
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true, true);
+		requestor.allowAllRequiredProposals();
+		NullProgressMonitor monitor = new NullProgressMonitor();
+
+	    String str = this.workingCopies[0].getSource();
+	    String completeBehind = "I.stat";
+	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	    this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner, monitor);
+	    
+	    assertResults(
+			"staticMethod[METHOD_REF]{staticMethod(), Ltest.I;, ()V, staticMethod, null, 26}",
+			requestor.getResults());
+	} finally {
+		deleteProject("P");
+		
+		JavaCore.setOptions(javaCoreOldOptions);
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);	
+	}
+}
+public void testBug402812c() throws Exception {
+	Hashtable javaCoreOldOptions = JavaCore.getOptions();
+	Map completionProjectOptions = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = completionProjectOptions.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = completionProjectOptions.get(CompilerOptions.OPTION_Source);	
+	try {
+		Hashtable options = new Hashtable(javaCoreOldOptions);
+		options.put(JavaCore.CODEASSIST_VISIBILITY_CHECK, JavaCore.ENABLED);
+		JavaCore.setOptions(options);
+		
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);
+		
+		IJavaProject p = createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB", "/P/lib402812.jar"}, "bin");
+		
+		refresh(p);
+		
+		waitUntilIndexesReady();
+		
+		this.workingCopies = new ICompilationUnit[1];
+
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/Test.java",
+				"interface I { \n" +
+				"static void staticMethod() {}" +
+				"    default void defaultMethod() {" +
+				"    }" +
+				"}" +
+				"public class X implements I {" +
+				"	public void foo(I i) {" +
+				"		this.defa     " +
+				"	}" +
+				"}\n");
+		// do completion
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true, true);
+		requestor.allowAllRequiredProposals();
+		NullProgressMonitor monitor = new NullProgressMonitor();
+
+	    String str = this.workingCopies[0].getSource();
+	    String completeBehind = "this.defa";
+	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	    this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner, monitor);
+	    
+	    assertResults(
+			"defaultMethod[METHOD_REF]{defaultMethod(), Ltest.I;, ()V, defaultMethod, null, 35}",
+			requestor.getResults());
+	} finally {
+		deleteProject("P");
+		
+		JavaCore.setOptions(javaCoreOldOptions);
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);	
+	}
+}
+public void testBug402812d() throws Exception {
+	Hashtable javaCoreOldOptions = JavaCore.getOptions();
+	Map completionProjectOptions = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = completionProjectOptions.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = completionProjectOptions.get(CompilerOptions.OPTION_Source);	
+	try {
+		Hashtable options = new Hashtable(javaCoreOldOptions);
+		options.put(JavaCore.CODEASSIST_VISIBILITY_CHECK, JavaCore.ENABLED);
+		JavaCore.setOptions(options);
+		
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);
+		
+		IJavaProject p = createJavaProject("P", new String[] {"src"}, new String[]{"JCL_LIB", "/P/lib402812.jar"}, "bin");
+		
+		refresh(p);
+		
+		waitUntilIndexesReady();
+		
+		this.workingCopies = new ICompilationUnit[1];
+
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/Test.java",
+				"interface I { \n" +
+				"    static void staticMethod() {}" +
+				"    default void defaultMethod() {}" +
+				"}" +
+				"public class X implements I {" +
+				"	public void foo(I i) {" +
+				"		defaultM     " +
+				"	}" +
+				"}\n");
+		// do completion
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true, false, false, true, true);
+		requestor.allowAllRequiredProposals();
+		NullProgressMonitor monitor = new NullProgressMonitor();
+
+	    String str = this.workingCopies[0].getSource();
+	    String completeBehind = "defaultM";
+	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+	    this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner, monitor);
+	    
+	    assertResults(
+			"defaultMethod[METHOD_REF]{defaultMethod(), Ltest.I;, ()V, defaultMethod, null, 27}",
+			requestor.getResults());
+	} finally {
+		deleteProject("P");
+		
+		JavaCore.setOptions(javaCoreOldOptions);
+		completionProjectOptions.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		completionProjectOptions.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(completionProjectOptions);	
+	}
+}
 //Bug 370971 - Content Assist autocomplete broken within an array of anonymous classes instances
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=370971
 public void testBug370971() throws JavaModelException {
@@ -25983,4 +26387,201 @@
 		COMPLETION_PROJECT.setOptions(options);	
 	}
 }
+// Bug 406468 - [1.8][code assist] No completion proposals after the use of a constructor reference
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=406468
+public void testBug406468a() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/X.java",
+				"interface I {\n" +
+				"	X [][][] copy (int x);\n" +
+				"}\n" +
+				"public class X  {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = X[][][]::new;\n" +
+				"		X[][][] x = i.copy(136);\n" +
+				"		System.out.println(x.length);\n" +
+				"           \n" +	
+				"	}\n" +
+				"}\n");
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "System.out.println(x.length);";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		assertResults(
+			"I[TYPE_REF]{I, test, Ltest.I;, null, null, 27}\n" +
+			"X[TYPE_REF]{X, test, Ltest.X;, null, null, 27}\n" +
+			"args[LOCAL_VARIABLE_REF]{args, null, [Ljava.lang.String;, args, null, 27}\n" +
+			"i[LOCAL_VARIABLE_REF]{i, null, Ltest.I;, i, null, 27}\n" +
+			"main[METHOD_REF]{main(), Ltest.X;, ([Ljava.lang.String;)V, main, (args), 27}\n" +
+			"x[LOCAL_VARIABLE_REF]{x, null, [[[Ltest.X;, x, null, 27}",
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug406468b() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/X.java",
+				"interface I {\n" +
+				"	X<java.lang.String> copy ();\n" +
+				"}\n" +
+				"public class X<S>  {\n" +
+				"	public static void main(String[] args) {\n" +
+				"		I i = X<java.lang.String>::new;\n" +
+				"		X x = i.copy();\n" +
+				"		System.out.println(x);\n" +
+				"           \n" +	
+				"	}\n" +
+				"}\n");
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "System.out.println(x);";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		assertResults(
+			"I[TYPE_REF]{I, test, Ltest.I;, null, null, 27}\n" +
+			"S[TYPE_REF]{S, null, TS;, null, null, 27}\n" +
+			"X<S>[TYPE_REF]{X, test, Ltest.X<TS;>;, null, null, 27}\n" +
+			"args[LOCAL_VARIABLE_REF]{args, null, [Ljava.lang.String;, args, null, 27}\n" +
+			"i[LOCAL_VARIABLE_REF]{i, null, Ltest.I;, i, null, 27}\n" +
+			"main[METHOD_REF]{main(), Ltest.X<TS;>;, ([Ljava.lang.String;)V, main, (args), 27}\n" +
+			"x[LOCAL_VARIABLE_REF]{x, null, Ltest.X;, x, null, 27}",
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+// Bug 405250 - [1.8][code assist] Annotations getting suggested at import statements
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=405250
+public void testBug405250a() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/X.java",
+				"import java.util.@ \n");
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "import java.util.@";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		assertResults(
+			"",
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug405250b() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/X.java",
+				"import @ \n");
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "import @";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		assertResults(
+			"",
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug405250c() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/X.java",
+				"import static @ \n");
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "import static @";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		assertResults(
+			"",
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
+public void testBug405250d() throws JavaModelException {
+	Map options = COMPLETION_PROJECT.getOptions(true);
+	Object savedOptionCompliance = options.get(CompilerOptions.OPTION_Compliance);
+	Object savedOptionSource = options.get(CompilerOptions.OPTION_Source);
+	try {
+		options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+		options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+		COMPLETION_PROJECT.setOptions(options);
+		this.workingCopies = new ICompilationUnit[1];
+		this.workingCopies[0] = getWorkingCopy(
+				"/Completion/src/test/X.java",
+				"import static java.util.@ \n");
+		CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
+		String str = this.workingCopies[0].getSource();
+		String completeBehind = "import static java.util.@";
+		int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
+		this.workingCopies[0].codeComplete(cursorLocation, requestor, this.wcOwner);
+		assertResults(
+			"",
+			requestor.getResults());
+	} finally {
+		// Restore compliance settings.
+		options.put(CompilerOptions.OPTION_Compliance, savedOptionCompliance);
+		options.put(CompilerOptions.OPTION_Source, savedOptionSource);
+		COMPLETION_PROJECT.setOptions(options);	
+	}
+}
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java
index 76c0c20..29437ff 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionWithMissingTypesTests_1_5.java
@@ -444,7 +444,7 @@
 			requestor.getResults());
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=44984
-public void test0010() throws JavaModelException {
+public void _test0010() throws JavaModelException {
 	this.workingCopies = new ICompilationUnit[2];
 	this.workingCopies[0] = getWorkingCopy(
 		"/Completion/src/test/Test.java",
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java
index ba3b370..cb5c73c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/IgnoreOptionalProblemsFromSourceFoldersTests.java
@@ -39,7 +39,7 @@
 	}
 	
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
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 51429ca..910e15d 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
@@ -2571,7 +2571,7 @@
 		proj.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
 
 		try {
-			ASTParser parser= ASTParser.newParser(AST.JLS4);
+			ASTParser parser= ASTParser.newParser(AST.JLS8);
 			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/JavaSearchBugs8Tests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs8Tests.java
new file mode 100644
index 0000000..d53f243
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugs8Tests.java
@@ -0,0 +1,1590 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.WorkingCopyOwner;
+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.SearchParticipant;
+import org.eclipse.jdt.core.search.SearchPattern;
+import org.eclipse.jdt.core.search.TypeReferenceMatch;
+
+/**
+ * Non-regression tests for bugs fixed in Java Search engine.
+ */
+public class JavaSearchBugs8Tests extends AbstractJavaSearchTests {
+
+	static {
+//	 org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
+//	TESTS_NAMES = new String[] {"testBug400899g29"};
+}
+
+public JavaSearchBugs8Tests(String name) {
+	super(name);
+	this.endChar = "";
+}
+public static Test suite() {
+	if (TESTS_PREFIX != null || TESTS_NAMES != null || TESTS_NUMBERS!=null || TESTS_RANGE !=null) {
+		return buildModelTestSuite(JavaSearchBugs8Tests.class);
+	}
+	// hack to guarantee the test order
+	TestSuite suite = new Suite(JavaSearchBugs8Tests.class.getName());
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g1"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g2"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g3"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g4"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g5"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g6"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g7"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g8"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g9"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g10"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g11"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g12"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g13"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g14"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g15"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g16"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g17"));
+//	suite.addTest(new JavaSearchBugs8Tests("testBug400899g18"));
+//	suite.addTest(new JavaSearchBugs8Tests("testBug400899g19"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g20"));
+//	suite.addTest(new JavaSearchBugs8Tests("testBug400899g22"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g23"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g24"));
+//	suite.addTest(new JavaSearchBugs8Tests("testBug400899g25"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g26"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g27"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g28"));
+//	suite.addTest(new JavaSearchBugs8Tests("testBug400899g29"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g30"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g31"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g32"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g33"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g34"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g35"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g36"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g37"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400899g38"));
+	suite.addTest(new JavaSearchBugs8Tests("testBug400902"));
+	return suite;
+}
+class TestCollector extends JavaSearchResultCollector {
+	public List matches = new ArrayList();
+	public void acceptSearchMatch(SearchMatch searchMatch) throws CoreException {
+		super.acceptSearchMatch(searchMatch);
+		this.matches.add(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", "1.8");
+}
+public void tearDownSuite() throws Exception {
+	deleteProject("JavaSearchBugs");
+	super.tearDownSuite();
+}
+protected void setUp () throws Exception {
+	super.setUp();
+	this.resultCollector = new TestCollector();
+	this.resultCollector.showAccuracy(true);
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ *	FieldDeclaration ::= Modifiersopt Type VariableDeclarators ';'	
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g1() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    @Marker int x;\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X.x [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * TYPE:   MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('	
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g2() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    @Marker <T> int x() { return 10; };\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * FormalParameter ::= Modifiersopt Type VariableDeclaratorIdOrThis	
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g3() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    int x(@Marker int p) { return 10; };\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x(int) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * FormalParameter ::= Modifiersopt Type PushZeroTypeAnnotations '...' VariableDeclaratorIdOrThis	
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g4() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    int x(@Marker int ... p) { return 10; };\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x(int ...) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * FormalParameter ::= Modifiersopt Type @308... TypeAnnotations '...' VariableDeclaratorIdOrThis	
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g5() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    int x(@Marker int [] @Marker ... p) { return 10; };\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x(int[] ...) [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x(int[] ...) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * UnionType ::= Type
+ * UnionType ::= UnionType '|' Type
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g6() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    int x() {\n" +
+		"        try {\n" +
+		"        } catch (@Marker NullPointerException | @Marker ArrayIndexOutOfBoundsException e) {\n" +
+		"        }\n" +
+		"        return 10;\n" +
+		"    }\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * LocalVariableDeclaration ::= Type PushModifiers VariableDeclarators
+ * LocalVariableDeclaration ::= Modifiers Type PushRealModifiers VariableDeclarators
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g7() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    int x() {\n" +
+		"        @Marker int p;\n" +
+		"        final @Marker int q;\n" +
+		"        @Marker final int r;\n" +
+		"        return 10;\n" +
+		"    }\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following:
+ * Resource ::= Type PushModifiers VariableDeclaratorId EnterVariable '=' ForceNoDiet VariableInitializer RestoreDiet ExitVariableWithInitialization
+ * Resource ::= Modifiers Type PushRealModifiers VariableDeclaratorId EnterVariable '=' ForceNoDiet VariableInitializer RestoreDiet ExitVariableWithInitialization
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g8() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    int x() {\n" +
+		"        try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {\n" +
+		"        }\n" +
+		"        return 10;\n" +
+		"    }\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following:
+ * EnhancedForStatementHeaderInit ::= 'for' '(' Type PushModifiers Identifier Dimsopt
+ * EnhancedForStatementHeaderInit ::= 'for' '(' Modifiers Type PushRealModifiers Identifier Dimsopt
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g9() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    int x() {\n" +
+		"        for (@Marker int i: new int[3]) {}\n" +
+		"        for (final @Marker int i: new int[3]) {}\n" +
+		"        for (@Marker final int i: new int[3]) {}\n" +
+		"        return 10;\n" +
+		"    }\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java int b400899.X.x() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
+ * AnnotationMethodHeaderName ::= Modifiersopt Type 'Identifier' '('
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g10() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public @interface X { \n" +
+		"	public @Marker String value(); \n" +
+		"	@Marker String value2(); \n" +
+		"	@Marker public String value3(); \n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java String b400899.X.value() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java String b400899.X.value2() [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java String b400899.X.value3() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * PrimaryNoNewArray ::= PrimitiveType Dims '.' 'class'
+ * PrimaryNoNewArray ::= PrimitiveType '.' 'class'
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g11() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X { \n" +
+		"	public void value() {\n" +
+		"		Object o = @Marker int.class;\n" +
+		"		Object o2 = @Marker int @Marker[] [] @Marker[].class;\n" +
+		"   }\n" +
+		"}\n" +
+		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.value() [Marker] POTENTIAL_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.value() [Marker] POTENTIAL_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.value() [Marker] POTENTIAL_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.value() [Marker] POTENTIAL_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceExpression ::= PrimitiveType Dims '::' NonWildTypeArgumentsopt IdentifierOrNew
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g12() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"interface I {\n" +
+		"    Object copy(int [] ia);\n" +
+		"}\n" +
+		"public class X  {\n" +
+		"    public static void main(String [] args) {\n" +
+		"        I i = @Marker int @Marker []::<String>clone;\n" +
+		"    }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" +
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"		
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs
+ * ArrayCreationWithArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs ArrayInitializer
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g13() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X  {\n" +
+		"    public static void main(String [] args) {\n" +
+		"        int i [] = new @Marker int @Marker [4];\n" +
+		"        int j [] = new @Marker int @Marker [] { 10 };\n" +
+		"    }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g14() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X  {\n" +
+		"    public static void main(String [] args) {\n" +
+		"        int i = (@Marker int) 0;\n" +
+		"        int j [] = (@Marker int @Marker []) null;\n" +
+		"    }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * InstanceofExpression ::= InstanceofExpression 'instanceof' ReferenceType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g15() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X  {\n" +
+		"    public static void main(String [] args) {\n" +
+		"        if (args instanceof @Marker String[]) {\n" +
+		"        }\n" +
+		"    }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * TypeArgument ::= ReferenceType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g16() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X extends Y<@Marker Integer, String> {}\n" +
+		"class Y<T, V> {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceType1 ::= ReferenceType '>'
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g17() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X extends Y<@Marker Integer> {}\n" +
+		"class Y<T> {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceType2 ::= ReferenceType '>>'
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void _testBug400899g18() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X<T extends Object & Comparable<? super @Marker String>> {}\n" +
+		"class Y<T> {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"<TODO : ADD THE EXPECTED RESULT HERE>"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceType3 ::= ReferenceType '>>>'
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void _testBug400899g19() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X<A extends X<X<X<@Marker String>>>> {}\n" +
+		"class Y<T> {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"<TODO : ADD THE EXPECTED RESULT HERE>"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * WildcardBounds ::= 'extends' ReferenceType
+ * WildcardBounds ::= 'super' ReferenceType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g20() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}\n" +
+		"   void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.foo(Map<? super Object,? extends String>) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.foo(Map<? super Object,? extends String>) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.foo(Map<? super Object,? extends String>) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.foo(Map<? super Object,? extends String>) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.goo(Map<? extends Object,? super String>) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.goo(Map<? extends Object,? super String>) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.goo(Map<? extends Object,? super String>) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.goo(Map<? extends Object,? super String>) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * TypeParameter ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList
+ * AdditionalBound ::= '&' ReferenceType
+ * TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList1
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void _testBug400899g22() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public interface X<U extends J<? extends X<U>>> {\n" +
+		"}\n" +
+		"interface J<T extends X<? extends J<T>>> {\n" +
+		"}\n" +
+		"class CI<U extends CJ<T, U> & @Marker J<@Marker T>,\n" +
+		"			T extends CI<U, T> & @Marker X<U>>\n" +
+		"	implements X<U> {\n" +
+		"}\n" +
+		"class CJ<T extends CI<U, T> & @Marker X<@Marker U>,\n" +
+		"			U extends CJ<T, U> & J<T>>\n" +
+		"	implements J<T> {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"TODO - ADD THE RESULT HERE"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * InstanceofExpression_NotName ::= Name 'instanceof' ReferenceType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g23() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X<E> {\n" +
+		"  class Y {\n" +
+		"    E e;\n" +
+		"    E getOtherElement(Object other) {\n" +
+		"      if (!(other instanceof @Marker X<?>.Y)) {};\n" +
+		"      return null;\n" +
+		"    }\n" +
+		"  }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java E b400899.X$Y.getOtherElement(Object) [Marker] EXACT_MATCH");	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * InstanceofExpression_NotName ::= InstanceofExpression_NotName 'instanceof' ReferenceType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g24() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X<P, C> {\n" +
+		"  public X() {\n" +
+		"    if (!(this instanceof @Marker X)) {}\n" +
+		"  }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceExpressionTypeArgumentsAndTrunk ::= OnlyTypeArguments '.' ClassOrInterfaceType Dimsopt
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void _testBug400899g25() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"	public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {\n" + 
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"TODO: ADD THE EXPECTED RESULT HERE"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs
+ * ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g26() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    public static void main(String [] args) {\n" +
+		"        X [] x = new @Marker X @Marker [5];\n" +
+		"        X [] x2 = new @Marker X @Marker [] { null };\n" +
+		"    }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g27() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    public static void main(String [] args) {\n" +
+		"        java.util.Map.Entry [] e = (java.util.Map<String, String>.@Marker Entry []) null;\n" +
+		"    }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceType1 ::= ClassOrInterface '<' TypeArgumentList2
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g28() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"import java.io.Serializable;\n" +
+		"import java.util.List;\n" +
+		"public class X<T extends Comparable<T> & Serializable> {\n" +
+		"	void foo(List<? extends @Marker Comparable<T>> p) {} \n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.foo(List<? extends Comparable<T>>) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceType2 ::= ClassOrInterface '<' TypeArgumentList3
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void _testBug400899g29() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"class Base {\n" +
+		"}\n" +
+		"class Foo<U extends Base, V extends Bar<U, @Marker Foo<U, V>>> {\n" +
+		"}\n" +
+		"class Bar<E extends Base, F extends Foo<E, @Marker Bar<E, F>>> {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"TODO: EXACT MATCH RESULTS TO BE ADDED"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ClassHeaderExtends ::= 'extends' ClassType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g30() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X extends @Marker Object {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ClassInstanceCreationExpression ::= 'new' OnlyTypeArguments ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' UnqualifiedClassBodyopt
+ * ClassInstanceCreationExpression ::= 'new' ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' UnqualifiedClassBodyopt
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g31() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    X x = new @Marker X();\n" +
+		"    X y = new <String> @Marker X();\n" +		
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X.x [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.y [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ClassInstanceCreationExpression ::= Primary '.' 'new' OnlyTypeArguments ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+ * ClassInstanceCreationExpression ::= Primary '.' 'new' ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g32() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    class Y {\n" +
+		"    }\n" +
+		"    Y y1 = new @Marker X().new @Marker Y();\n" +
+		"    Y y2 = new @Marker X().new <String> @Marker Y();\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X.y1 [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.y1 [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.y2 [Marker] POTENTIAL_MATCH\n" + 
+		"src/b400899/X.java b400899.X.y2 [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+ * ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' OnlyTypeArguments ClassType EnterInstanceCreationArgumentList '(' ArgumentListopt ')' QualifiedClassBodyopt
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g33() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    X x;\n" +
+		"    class Y {\n" +
+		"    }\n" +
+		"    Y y1 = x.new @Marker Y();\n" +
+		"    Y y2 = x.new <String> @Marker Y();\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X.y1 [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.y2 [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * MethodHeaderThrowsClause ::= 'throws' ClassTypeList
+ * ClassTypeList -> ClassTypeElt
+ * ClassTypeList ::= ClassTypeList ',' ClassTypeElt
+ * ClassTypeElt ::= ClassType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g34() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    void foo() throws @Marker NullPointerException, @Marker ArrayIndexOutOfBoundsException {}\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.foo() [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.foo() [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ClassHeaderImplements ::= 'implements' InterfaceTypeList
+ * InterfaceHeaderExtends ::= 'extends' InterfaceTypeList
+ * InterfaceTypeList -> InterfaceType
+ * InterfaceTypeList ::= InterfaceTypeList ',' InterfaceType
+ * InterfaceType ::= ClassOrInterfaceType
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g35() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"interface I {}\n" +
+		"interface J {}\n" +
+		"interface K extends @Marker I, @Marker J {}\n" +
+		"interface L {}\n" +
+		"public class X implements @Marker K, @Marker L {\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.K [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.K [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceExpression ::= Name Dimsopt '::' NonWildTypeArgumentsopt IdentifierOrNew
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g36() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"interface I {\n" +
+		"    void foo(int x);\n" +
+		"}\n" +
+		"public class X  {\n" +
+		"    public static void main(String [] args) {\n" +
+		"        I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;\n" +
+		"        i.foo(10); \n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * ReferenceExpression ::= Name BeginTypeArguments ReferenceExpressionTypeArgumentsAndTrunk '::' NonWildTypeArgumentsopt IdentifierOrNew
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g37() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"interface I {\n" +
+		"    Y foo(int x);\n" +
+		"}\n" +
+		"public class X  {\n" +
+		"    class Z extends Y {\n" +
+		"        public Z(int x) {\n" +
+		"            super(x);\n" +
+		"            System.out.println();\n" +
+		"        }\n" +
+		"    }\n" +
+		"    public static void main(String [] args) {\n" +
+		"        i = @Marker W<@Marker Integer>::<@Marker String> new;\n" +
+		"    }\n" +
+		"}\n" +
+		"class W<T> extends Y {\n" +
+		"    public W(T x) {\n" +
+		"        super(0);\n" +
+		"        System.out.println(x);\n" +
+		"    }\n" +
+		"}\n" +
+		"class Y {\n" +
+		"    public Y(int x) {\n" +
+		"        System.out.println(x);\n" +
+		"    }\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java void b400899.X.main(String[]) [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+ * @bug 400899:  [1.8][search] Search engine/indexer should evolve to support Java 8 constructs
+ * @test Ensures that the search for type use annotation finds matches in the following
+ * CastExpression ::= PushLPAREN Name PushRPAREN InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
+ * CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+ * CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression Dimsopt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+ * CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400899"
+ */
+public void testBug400899g38() throws CoreException {
+this.workingCopies = new ICompilationUnit[1];
+this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400899/X.java",
+		"import java.lang.annotation.ElementType;\n" +
+		"import java.lang.annotation.Target;\n" +
+		"public class X {\n" +
+		"    Object o = (@Marker X) null;\n" +
+		"    Object p = (@Marker X @Marker []) null;\n" +
+		"    Object q = (@Marker java. @Marker util. @Marker List<@Marker String> []) null;\n" +
+		"    Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;\n" +
+		"}\n" +
+ 		"@Target(ElementType.TYPE_USE)\n" +	
+		"@interface Marker {}\n"
+	);
+SearchPattern pattern = SearchPattern.createPattern(
+		"Marker",
+		ANNOTATION_TYPE,
+		REFERENCES,
+		EXACT_RULE);
+new SearchEngine(this.workingCopies).search(pattern,
+new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+getJavaSearchWorkingCopiesScope(),
+this.resultCollector,
+null);
+assertSearchResults(
+		"src/b400899/X.java b400899.X.o [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.p [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.p [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.q [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.q [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.q [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.q [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.r [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.r [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.r [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.r [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.r [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.r [Marker] EXACT_MATCH\n" + 
+		"src/b400899/X.java b400899.X.r [Marker] EXACT_MATCH"
+);	
+}
+
+/**
+	 * @bug 402902:  [1.8][search] Search engine fails to annotation matches in extends/implements clauses
+	 * @test Ensures that the search for type use annotation finds matches 
+	 * in extends and implements clauses. 
+	 *		
+	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=402902"
+	 */
+public void testBug400902() throws CoreException {
+	this.workingCopies = new ICompilationUnit[1];
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400902/X.java",
+			"import java.lang.annotation.ElementType;\n" +
+			"import java.lang.annotation.Target;\n" +
+			"import java.io.Serializable;\n" +
+			"@Marker1 @Marker public class X extends @Marker Object implements @Marker Serializable {\n" +
+			"	private static final long serialVersionUID = 1L;\n" +
+			"	int x = (@Marker int) 0;\n" +
+			" 	@Marker public class Y {}\n" +
+			"}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +	
+			"@interface Marker {}\n" +
+			"@Target(ElementType.TYPE)\n" +	
+			"@interface Marker1 {}"
+		);
+	SearchPattern pattern = SearchPattern.createPattern(
+			"Marker",
+			ANNOTATION_TYPE,
+			REFERENCES,
+			EXACT_RULE);
+	new SearchEngine(this.workingCopies).search(pattern,
+	new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+	getJavaSearchWorkingCopiesScope(),
+	this.resultCollector,
+	null);
+	assertSearchResults(
+			"src/b400902/X.java b400902.X [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X.x [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X$Y [Marker] EXACT_MATCH" 
+	);	
+}
+// Add new tests in JavaSearchBugs8Tests
+}
\ 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 99548b5..2f81df1 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
@@ -712,6 +716,10 @@
 	suite.addTest(new JavaSearchBugsTests("testBug345807"));
 	suite.addTest(new JavaSearchBugsTests("testBug355605"));
 	suite.addTest(new JavaSearchBugsTests("testBug241834"));
+	suite.addTest(new JavaSearchBugsTests("testBug400902a"));
+	suite.addTest(new JavaSearchBugsTests("testBug400919a"));
+	suite.addTest(new JavaSearchBugsTests("testBug400919b"));
+	suite.addTest(new JavaSearchBugsTests("testBug400919c"));
 	return suite;
 }
 class TestCollector extends JavaSearchResultCollector {
@@ -13751,5 +13759,299 @@
 		
 	}
 }
+	/**
+	 * @bug 402902:  [1.8][search] Search engine fails to annotation matches in extends/implements clauses
+	 * @test Ensures that the search for type use annotation finds matches 
+	 * in extends and implements clauses. 
+	 *		
+	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=402902"
+	 */
+public void testBug400902a() throws CoreException {
+	this.workingCopies = new ICompilationUnit[1];
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400902/X.java",
+			"import java.lang.annotation.ElementType;\n" +
+			"import java.lang.annotation.Target;\n" +
+			"import java.io.Serializable;\n" +
+			"@Marker1 @Marker public class X extends @Marker Object implements @Marker Serializable {\n" +
+			"	private static final long serialVersionUID = 1L;\n" +
+			"	int x = (@Marker int) 0;\n" +
+			" 	@Marker public class Y {}\n" +
+			"}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +	
+			"@interface Marker {}\n" +
+			"@Target(ElementType.TYPE)\n" +	
+			"@interface Marker1 {}"
+		);
+	SearchPattern pattern = SearchPattern.createPattern(
+			"Marker",
+			ANNOTATION_TYPE,
+			REFERENCES,
+			EXACT_RULE);
+	new SearchEngine(this.workingCopies).search(pattern,
+	new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+	getJavaSearchWorkingCopiesScope(),
+	this.resultCollector,
+	null);
+	assertSearchResults(
+			"src/b400902/X.java b400902.X [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X.x [Marker] EXACT_MATCH\n" +
+			"src/b400902/X.java b400902.X$Y [Marker] EXACT_MATCH" 
+	);	
+}
+
+/**
+ * @bug 400919:  [1.8][search] Search engine fails to annotation matches in type variable bounds
+ * @test Ensures that the search for type use annotation finds matches in type variable bounds
+ *		
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400919"
+ */
+public void testBug400919a() throws CoreException {
+	this.workingCopies = new ICompilationUnit[1];
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400919/X.java",
+			"import java.lang.annotation.ElementType;\n" +
+			"import java.lang.annotation.Target;\n" +
+			"import java.util.Collection;\n" +
+			"\n" +
+			"interface I {\n" +
+			"	I doit();\n" +
+			"}\n" +
+			"\n" +
+			"@Marker public class X {\n" +
+			"   @SuppressWarnings(\"unused\")\n" +
+			"	@Marker <@Existing T>  int x(@Existing T t) { return 10; };\n" +
+			"	/**\n" +
+			"	 * @param <F>  \n" +
+			"	 */\n" +
+			"	class Folder<@Existing  F extends @Existing XYZ> {  }\n" +
+			"	Collection<@Existing ? super @Existing XYZ> s;\n" +
+			"	/**\n" +
+			"	 * @param <T>  \n" +
+			"	 */\n" +
+			"	class Test <T extends Outer.@Existing Inner> {}\n" +
+			"}\n" +
+			"\n" +
+			"class Y extends  Object  {\n" +
+			"	int x = ( int) 0;\n" +
+			"}\n" +
+			"\n" +
+			"/**\n" +
+			" * @param <T>  \n" +
+			" */\n" +
+			"class XY<@Existing T> {}\n" +
+			"class XYZ {}\n" +
+			"\n" +
+			"class Outer {\n" +
+			"	class Inner {\n" +
+			"		\n" +
+			"	}\n" +
+			"}\n" +
+			"/**\n" +
+			" * @param <T> \n" +
+			" * @param <Q>  \n" +
+			" */\n" +
+			"class X2 <@Marker T extends @Marker Y2<@Marker ? extends @Marker X>, @Marker Q extends @Marker Object> {\n" +
+			"}\n" +
+			"/**\n" +
+			" * @param <T>  \n" +
+			" */\n" +
+			"class Y2<T> {}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Existing {\n" +
+			"	\n" +
+			"}\n" +
+			"@Target (ElementType.TYPE_USE)\n" +
+			"@interface Marker {}\n"
+		);
+	SearchPattern pattern = SearchPattern.createPattern(
+			"Existing",
+			ANNOTATION_TYPE,
+			REFERENCES,
+			EXACT_RULE);
+	new SearchEngine(this.workingCopies).search(pattern,
+	new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+	getJavaSearchWorkingCopiesScope(),
+	this.resultCollector,
+	null);
+	assertSearchResults(
+			"src/b400919/X.java b400919.X.s [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X.s [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java int b400919.X.x(T) [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java int b400919.X.x(T) [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X$Folder [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X$Folder [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X$Test [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.XY [Existing] EXACT_MATCH"
+	);	
+}
+/**
+ * @bug 400919:  [1.8][search] Search engine fails to annotation matches in type variable bounds
+ * @test Ensures that the search for type use annotation finds matches in type variable bounds with TYPE
+ *		
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400919"
+ */
+public void testBug400919b() throws CoreException {
+	this.workingCopies = new ICompilationUnit[1];
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400919/X.java",
+			"import java.lang.annotation.ElementType;\n" +
+			"import java.lang.annotation.Target;\n" +
+			"import java.util.Collection;\n" +
+			"\n" +
+			"interface I {\n" +
+			"	I doit();\n" +
+			"}\n" +
+			"\n" +
+			"@Marker public class X {\n" +
+			"   @SuppressWarnings(\"unused\")\n" +
+			"	@Marker <@Existing T>  int x(@Existing T t) { return 10; };\n" +
+			"	/**\n" +
+			"	 * @param <F>  \n" +
+			"	 */\n" +
+			"	class Folder<@Existing  F extends @Existing XYZ> {  }\n" +
+			"	Collection<@Existing ? super @Existing XYZ> s;\n" +
+			"	/**\n" +
+			"	 * @param <T>  \n" +
+			"	 */\n" +
+			"	class Test <T extends Outer.@Existing Inner> {}\n" +
+			"}\n" +
+			"\n" +
+			"class Y extends  Object  {\n" +
+			"	int x = ( int) 0;\n" +
+			"}\n" +
+			"\n" +
+			"/**\n" +
+			" * @param <T>  \n" +
+			" */\n" +
+			"class XY<@Existing T> {}\n" +
+			"class XYZ {}\n" +
+			"\n" +
+			"class Outer {\n" +
+			"	class Inner {\n" +
+			"		\n" +
+			"	}\n" +
+			"}\n" +
+			"/**\n" +
+			" * @param <T> \n" +
+			" * @param <Q>  \n" +
+			" */\n" +
+			"class X2 <@Marker T extends @Marker Y2<@Marker ? extends @Marker X>, @Marker Q extends @Marker Object> {\n" +
+			"}\n" +
+			"/**\n" +
+			" * @param <T>  \n" +
+			" */\n" +
+			"class Y2<T> {}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Existing {\n" +
+			"	\n" +
+			"}\n" +
+			"@Target (ElementType.TYPE_USE)\n" +
+			"@interface Marker {}\n"
+		);
+	SearchPattern pattern = SearchPattern.createPattern(
+			"Existing",
+			TYPE,
+			REFERENCES,
+			EXACT_RULE);
+	new SearchEngine(this.workingCopies).search(pattern,
+	new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+	getJavaSearchWorkingCopiesScope(),
+	this.resultCollector,
+	null);
+	assertSearchResults(
+			"src/b400919/X.java b400919.X.s [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X.s [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java int b400919.X.x(T) [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java int b400919.X.x(T) [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X$Folder [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X$Folder [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.X$Test [Existing] EXACT_MATCH\n" + 
+			"src/b400919/X.java b400919.XY [Existing] EXACT_MATCH"
+	);	
+}
+/**
+ * @bug 400919:  [1.8][search] Search engine fails to annotation matches in type variable bounds
+ * @test Ensures that the search for type use annotation finds matches in type variable bounds
+ *		
+ * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=400919"
+ */
+public void testBug400919c() throws CoreException {
+	this.workingCopies = new ICompilationUnit[1];
+	this.workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b400919/X.java",
+			"import java.lang.annotation.ElementType;\n" +
+			"import java.lang.annotation.Target;\n" +
+			"import java.util.Collection;\n" +
+			"\n" +
+			"interface I {\n" +
+			"	I doit();\n" +
+			"}\n" +
+			"\n" +
+			"@Marker public class X {\n" +
+			"   @SuppressWarnings(\"unused\")\n" +
+			"	@Marker <T>  int x(T t) { return 10; };\n" +
+			"	/**\n" +
+			"	 * @param <F>  \n" +
+			"	 */\n" +
+			"	class Folder<@Existing  F extends @Existing XYZ> {  }\n" +
+			"	Collection<? super @Existing XYZ> s;\n" +
+			"	/**\n" +
+			"	 * @param <T>  \n" +
+			"	 */\n" +
+			"	class Test <T extends Outer.@Existing Inner> {}\n" +
+			"}\n" +
+			"\n" +
+			"class Y extends  Object  {\n" +
+			"	int x = ( int) 0;\n" +
+			"}\n" +
+			"\n" +
+			"/**\n" +
+			" * @param <T>  \n" +
+			" */\n" +
+			"class XY<@Existing T> {}\n" +
+			"class XYZ {}\n" +
+			"\n" +
+			"class Outer {\n" +
+			"	class Inner {\n" +
+			"		\n" +
+			"	}\n" +
+			"}\n" +
+			"/**\n" +
+			" * @param <T> \n" +
+			" * @param <Q>  \n" +
+			" */\n" +
+			"class X2 <@Marker T extends @Marker Y2<@Marker ? extends @Marker X>, @Marker Q extends @Marker Object> {\n" +
+			"}\n" +
+			"/**\n" +
+			" * @param <T>  \n" +
+			" */\n" +
+			"class Y2<T> {}\n" +
+			"@Target(ElementType.TYPE_USE)\n" +
+			"@interface Existing {\n" +
+			"	\n" +
+			"}\n" +
+			"@Target (ElementType.TYPE_USE)\n" +
+			"@interface Marker {}\n"
+		);
+	SearchPattern pattern = SearchPattern.createPattern(
+			"Marker",
+			ANNOTATION_TYPE,
+			REFERENCES,
+			EXACT_RULE);
+	new SearchEngine(this.workingCopies).search(pattern,
+	new SearchParticipant[] {SearchEngine.getDefaultSearchParticipant()},
+	getJavaSearchWorkingCopiesScope(),
+	this.resultCollector,
+	null);
+	assertSearchResults(
+			"src/b400919/X.java b400919.X [Marker] EXACT_MATCH\n" +
+			"src/b400919/X.java int b400919.X.x(T) [Marker] EXACT_MATCH\n" +
+			"src/b400919/X.java b400919.X2 [Marker] EXACT_MATCH\n" +
+			"src/b400919/X.java b400919.X2 [Marker] EXACT_MATCH\n" +
+			"src/b400919/X.java b400919.X2 [Marker] EXACT_MATCH\n" +
+			"src/b400919/X.java b400919.X2 [Marker] EXACT_MATCH\n" +
+			"src/b400919/X.java b400919.X2 [Marker] EXACT_MATCH\n" +
+			"src/b400919/X.java b400919.X2 [Marker] EXACT_MATCH" 
+	);	
+}
 // Add new tests in JavaSearchBugsTests2
 }
\ 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 316b1c7..f397671 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
@@ -4464,4 +4464,33 @@
 	// Should have same types with these 2 searches
 	assertEquals("Found types sounds not to be correct", requestor.toString(), collector.toString());
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383908
+public void testBug383908() throws CoreException {
+	try {
+		String fileContent = "package p;\n" +
+								"public class X {\n" +
+								"  public void foobar(X this, String str) {\n" +
+								"  }\n" +
+								"}";
+		createJavaProject("P", new String[] {"src"}, new String[0], "bin");
+		createFolder("/P/src/p");
+		createFile("/P/src/p/X.java", fileContent);
+
+		IType type = getCompilationUnit("P", "src", "p", "X.java").getType("X");
+		IMethod[] methods = type.getMethods();
+		search(
+				methods[0],
+				DECLARATIONS,
+				SearchEngine.createJavaSearchScope(new IJavaElement[] {type}),
+				this.resultCollector);
+
+		assertSearchResults(
+				"src/p/X.java void p.X.foobar(String) [foobar]",
+				this.resultCollector);
+
+	} finally {
+		deleteProject("P");
+	}
+}
+
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModelTestsUtil.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModelTestsUtil.java
index bcc3d6a..8ddf3db 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModelTestsUtil.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModelTestsUtil.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -431,7 +435,15 @@
 }
 
 static public void setUpJCLClasspathVariables(String compliance) throws JavaModelException, IOException {
-	if ("1.7".equals(compliance)) {
+	if ("1.8".equals(compliance)) {
+		if (JavaCore.getClasspathVariable("JCL18_LIB") == null) {
+			setupExternalJCL("jclMin1.8");
+			JavaCore.setClasspathVariables(
+				new String[] {"JCL18_LIB", "JCL18_SRC", "JCL_SRCROOT"},
+				new IPath[] {getExternalJCLPath(compliance), getExternalJCLSourcePath(compliance), getExternalJCLRootSourcePath()},
+				null);
+		}
+	} else if ("1.7".equals(compliance)) {
 		if (JavaCore.getClasspathVariable("JCL17_LIB") == null) {
 			setupExternalJCL("jclMin1.7");
 			JavaCore.setClasspathVariables(
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 b22145f..6db0e52 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
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     Stephan Herrmann - initial API and implementation
  *******************************************************************************/
@@ -40,6 +44,7 @@
 import org.eclipse.jdt.core.dom.Modifier;
 import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
 import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.osgi.framework.Bundle;
 
 public class NullAnnotationModelTests extends ReconcilerTests {
 
@@ -59,7 +64,8 @@
 
 	public void setUp() throws Exception {
 		super.setUp();
-		File bundleFile = FileLocator.getBundleFile(Platform.getBundle("org.eclipse.jdt.annotation"));
+		Bundle[] bundles = Platform.getBundles("org.eclipse.jdt.annotation", "[1.1.0,2.0.0)");
+		File bundleFile = FileLocator.getBundleFile(bundles[0]);
 		this.ANNOTATION_LIB = bundleFile.isDirectory() ? bundleFile.getPath()+"/bin" : bundleFile.getPath();
 	}
 
@@ -113,7 +119,7 @@
 					"1. WARNING in /P/p2/C2.java (at line 8)\n" +
 					"	return arg == null ? null : arg.toString();\n" +
 					"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
-					"Null type safety: The expression of type String needs unchecked conversion to conform to \'@NonNull String\'\n" +
+					"Null type safety: The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" +
 					"----------\n");
     	} finally {
     		deleteProject("P");
@@ -155,7 +161,7 @@
 					"1. WARNING in /P/p2/C2.java (at line 8)\n" +
 					"	return arg == null ? null : arg.toString();\n" +
 					"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
-					"Null type safety: The expression of type String needs unchecked conversion to conform to \'@NonNull String\'\n" +
+					"Null type safety: The expression of type 'String' needs unchecked conversion to conform to \'@NonNull String\'\n" +
 					"----------\n");
     	} finally {
     		deleteProject("P");
@@ -276,7 +282,7 @@
 					"Buildpath problem: the type invalid, which is configured as a null annotation type, cannot be resolved\n" +
 					"----------\n");
 
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
 			parser.setProject(p);
 			parser.setResolveBindings(true);
 			parser.setSource(unit);
@@ -339,7 +345,7 @@
 			assertEquals("Should have no markers", 0, markers.length);
 
 			// Challenge CompilationUnitResolver:
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
 			parser.setProject(p);
 			parser.setResolveBindings(true);
 			parser.setSource(unit);
@@ -410,7 +416,7 @@
 			assertEquals("Unexpected marker path", "/P/p1/C1.java", markers[0].getResource().getFullPath().toString());
 
 			// Challenge CompilationUnitResolver:
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
 			parser.setProject(p);
 			parser.setResolveBindings(true);
 			parser.setSource(unit);
@@ -463,7 +469,7 @@
 			final ICompilationUnit unit = getCompilationUnit("/P/p1/C1.java").getWorkingCopy(this.wcOwner, null);
 			assertNoProblem(c1SourceString.toCharArray(), unit);
 
-			ASTParser parser = ASTParser.newParser(AST.JLS4);
+			ASTParser parser = ASTParser.newParser(AST.JLS8);
 			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/ReconcilerStatementsRecoveryTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
index 16b8801..a139d71 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerStatementsRecoveryTests.java
@@ -71,7 +71,7 @@
 }
 
 /**
- * Internal synonynm for deprecated constant AST.JSL3
+ * Internal synonym for deprecated constant AST.JSL3
  * to alleviate deprecation warnings.
  * @deprecated
  */
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 e5b5998..cdb7273 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,14 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann - contribution for bug 337868 - [compiler][model] incomplete support for package-info.java when using SearchableEnvironment
  *     Technical University Berlin - adapted for Object Teams
+ *     Stephan Herrmann - contribution for
+ *								bug 337868 - [compiler][model] incomplete support for package-info.java when using SearchableEnvironment
+ *								bug 401035 - [1.8] A few tests have started failing recently
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.model;
 
@@ -70,12 +76,7 @@
 		}
 	}
 	
-	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
-	 * to alleviate deprecation warnings.
-	 * @deprecated
-	 */
-	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+	/*package*/ static final int JLS_LATEST = AST.JLS8;
 
 	static class ReconcileParticipant extends CompilationParticipant {
 		IJavaElementDelta delta;
@@ -89,7 +90,7 @@
 		public void reconcile(ReconcileContext context) {
 			this.delta = context.getDelta();
 			try {
-				this.ast = context.getAST4();
+				this.ast = context.getAST8();
 			} catch (JavaModelException e) {
 				assertNull("Unexpected exception", e);
 			}
@@ -108,7 +109,7 @@
 		public void reconcile(ReconcileContext context) {
 			this.delta = context.getDelta();
 			try {
-				this.ast = context.getAST4();
+				this.ast = context.getAST8();
 				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) {
@@ -129,7 +130,7 @@
 		public void reconcile(ReconcileContext context) {
 			this.delta = context.getDelta();
 			try {
-				this.ast = context.getAST4();
+				this.ast = context.getAST8();
 				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) {
@@ -180,7 +181,7 @@
 		// Reconcile again to see if error goes away
 		this.problemRequestor.initialize(source);
 		unit.getBuffer().setContents(source); // need to set contents again to be sure that following reconcile will be really done
-		unit.reconcile(JLS3_INTERNAL,
+		unit.reconcile(JLS_LATEST,
 			true, // force problem detection to see errors if any
 			null,	// do not use working copy owner to not use working copies in name lookup
 			null);
@@ -791,7 +792,7 @@
 		"import p2.*;\n" +
 		"public class X {\n" +
 		"}");
-	this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
+	this.workingCopy.reconcile(JLS_LATEST, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
 	assertASTNodeEquals(
 		"Unexpected ast",
 		"package p1;\n" +
@@ -805,7 +806,7 @@
  * (case of a working copy being reconciled with NO changes, creating AST and forcing problem detection)
  */
 public void testBroadcastAST2() throws JavaModelException {
-	this.workingCopy.reconcile(JLS3_INTERNAL, true/*force problem detection*/, null/*primary owner*/, null/*no progress*/);
+	this.workingCopy.reconcile(JLS_LATEST, true/*force problem detection*/, null/*primary owner*/, null/*no progress*/);
 	assertASTNodeEquals(
 		"Unexpected ast",
 		"package p1;\n" +
@@ -821,7 +822,7 @@
  * has NO changes and NO problem detection is requested)
  */
 public void testBroadcastAST3() throws JavaModelException {
-	this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
+	this.workingCopy.reconcile(JLS_LATEST, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
 	assertASTNodeEquals(
 		"Unexpected ast",
 		"null",
@@ -835,13 +836,13 @@
 	JavaCore.run(
 		new IWorkspaceRunnable() {
 			public void run(IProgressMonitor monitor) throws CoreException {
-				ReconcilerTests.this.workingCopy.reconcile(JLS3_INTERNAL, true/*force problem detection*/, null/*primary owner*/, monitor);
+				ReconcilerTests.this.workingCopy.reconcile(JLS_LATEST, true/*force problem detection*/, null/*primary owner*/, monitor);
 				setWorkingCopyContents(
 					"package p1;\n" +
 					"import p2.*;\n" +
 					"public class X {\n" +
 					"}");
-				ReconcilerTests.this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, monitor);
+				ReconcilerTests.this.workingCopy.reconcile(JLS_LATEST, false/*don't force problem detection*/, null/*primary owner*/, monitor);
 			}
 		},
 		null/*no progress*/);
@@ -863,7 +864,7 @@
 		"import p2.*;\n" +
 		"public class X {\n" +
 		"}");
-	this.workingCopy.reconcile(JLS3_INTERNAL, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
+	this.workingCopy.reconcile(JLS_LATEST, false/*don't force problem detection*/, null/*primary owner*/, null/*no progress*/);
 	org.eclipse.jdt.core.dom.CompilationUnit compilationUnit = this.deltaListener.getCompilationUnitAST(this.workingCopy);
 	String newContents =
 		"package p1;\n" +
@@ -978,7 +979,7 @@
 	);
 }
 /**
- * Ensure an OperationCanceledException is correcly thrown when progress monitor is canceled
+ * Ensure an OperationCanceledException is correctly thrown when progress monitor is canceled
  * @deprecated using deprecated code
  */
 public void testCancel() throws JavaModelException {
@@ -2116,8 +2117,7 @@
 	this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
 	assertWorkingCopyDeltas(
 		"Unexpected delta after syntax error",
-		"X[*]: {CHILDREN | FINE GRAINED}\n" +
-		"	foo()[*]: {MODIFIERS CHANGED}"
+		"[Working copy] X.java[*]: {CONTENT | FINE GRAINED}"
 	);
 	assertProblems(
 		"Unexpected problems",
@@ -2142,6 +2142,60 @@
 	this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
 	assertWorkingCopyDeltas(
 		"Unexpected delta after fixing syntax error",
+		"[Working copy] X.java[*]: {CONTENT | FINE GRAINED}"
+	);
+	assertProblems(
+		"Unexpected problems",
+		"----------\n" +
+		"1. WARNING in /Reconciler/src/p1/X.java (at line 2)\n" +
+		"	import p2.*;\n" +
+		"	       ^^\n" +
+		"The import p2 is never used\n" +
+		"----------\n"
+	);
+}
+/**
+ * Introduces a syntax error in the modifiers of a method.
+ * Variant to force the expected modifier change.
+ */
+public void testMethodWithError01a() throws CoreException {
+	// Introduce syntax error
+	setWorkingCopyContents(
+		"package p1;\n" +
+		"import p2.*;\n" +
+		"public class X {\n" +
+		"  public_ void foo() {\n" +
+		"  }\n" +
+		"}");
+	this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+	assertWorkingCopyDeltas(
+		"Unexpected delta after syntax error",
+		"X[*]: {CHILDREN | FINE GRAINED}\n" +
+		"	foo()[*]: {MODIFIERS CHANGED}"
+	);
+	assertProblems(
+		"Unexpected problems",
+		"----------\n" + 
+		"1. ERROR in /Reconciler/src/p1/X.java (at line 4)\n" + 
+		"	public_ void foo() {\n" + 
+		"	^^^^^^^\n" + 
+		"Syntax error on token \"public_\", public expected\n" + 
+		"----------\n"
+	);
+
+	// Fix the syntax error
+	clearDeltas();
+	String contents =
+		"package p1;\n" +
+		"import p2.*;\n" +
+		"public class X {\n" +
+		"  public void foo() {\n" +
+		"  }\n" +
+		"}";
+	setWorkingCopyContents(contents);
+	this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
+	assertWorkingCopyDeltas(
+		"Unexpected delta after fixing syntax error",
 		"X[*]: {CHILDREN | FINE GRAINED}\n" +
 		"	foo()[*]: {MODIFIERS CHANGED}"
 	);
@@ -2922,7 +2976,7 @@
 		"  }\n" +
 		"}"
 	);
-	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(AST.JLS4, false, null, null);
+	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(JLS_LATEST, false, null, null);
 	assertSame(
 		"Unexpected participant ast",
 		participant.ast,
@@ -3114,7 +3168,7 @@
 		"  }\n" +
 		"}"
 	);
-	this.workingCopy.reconcile(JLS3_INTERNAL, true/*force problem detection*/, null, null);
+	this.workingCopy.reconcile(JLS_LATEST, true/*force problem detection*/, null, null);
 	assertWorkingCopyDeltas(
 		"Unexpected delta",
 		"X[*]: {CHILDREN | FINE GRAINED}\n" +
@@ -3782,7 +3836,7 @@
 		"		return false;\n" +
 		"	}\n" +
 		"}");
-	this.workingCopy.reconcile(JLS3_INTERNAL, true, this.wcOwner, null);
+	this.workingCopy.reconcile(JLS_LATEST, true, this.wcOwner, null);
 	assertProblems(
 		"Unexpected problems",
 		"----------\n" +
@@ -3801,7 +3855,7 @@
 		"	}\n" +
 		"}";
 	setWorkingCopyContents(contents);
-	this.workingCopy.reconcile(JLS3_INTERNAL, true, this.wcOwner, null);
+	this.workingCopy.reconcile(JLS_LATEST, true, this.wcOwner, null);
 	assertProblems(
 		"Unexpected problems",
 		"----------\n" +
@@ -3837,7 +3891,7 @@
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopy = getCompilationUnit("/P/Test.java").getWorkingCopy(this.wcOwner, null);
 		this.workingCopy.getBuffer().setContents(source);
-		this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
+		this.workingCopy.reconcile(JLS_LATEST, true, null, null);
 		assertNoProblem(sourceChars, this.workingCopy);
 
 		// Add new secondary type
@@ -3857,7 +3911,7 @@
 		sourceChars = source.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopy.getBuffer().setContents(source);
-		this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
+		this.workingCopy.reconcile(JLS_LATEST, true, null, null);
 		assertNoProblem(sourceChars, this.workingCopy);
 	} finally {
 		deleteProject("P");
@@ -3892,14 +3946,14 @@
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopy = getCompilationUnit("/P/Test.java").getWorkingCopy(this.wcOwner, null);
 		this.workingCopy.getBuffer().setContents(source);
-		this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
+		this.workingCopy.reconcile(JLS_LATEST, true, null, null);
 		assertNoProblem(sourceChars, this.workingCopy);
 
 		// Delete secondary type => should get a problem
 		waitUntilIndexesReady();
 		deleteFile("/P/Bar.java");
 		this.problemRequestor.initialize(source.toCharArray());
-		this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
+		this.workingCopy.reconcile(JLS_LATEST, true, null, null);
 		assertEquals("Working copy should not find secondary type 'Bar'!", 1, this.problemRequestor.problemCount);
 		assertProblems("Working copy should have problem!",
 			"----------\n" +
@@ -3920,7 +3974,7 @@
 		sourceChars = source.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopy.getBuffer().setContents(source);
-		this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
+		this.workingCopy.reconcile(JLS_LATEST, true, null, null);
 		assertNoProblem(sourceChars, this.workingCopy);
 	} finally {
 		deleteProject("P");
@@ -3967,7 +4021,7 @@
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopy = getCompilationUnit("/P2/test/Test2.java").getWorkingCopy(this.wcOwner, null);
 		this.workingCopy.getBuffer().setContents(source);
-		this.workingCopy.reconcile(JLS3_INTERNAL, true, null, null);
+		this.workingCopy.reconcile(JLS_LATEST, true, null, null);
 		assertNoProblem(sourceChars, this.workingCopy);
 	} finally {
 		deleteProject("P1");
@@ -4039,7 +4093,7 @@
 		sourceChars = source1.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopies[0].getBuffer().setContents(source1);
-		this.workingCopies[0].reconcile(JLS3_INTERNAL,
+		this.workingCopies[0].reconcile(JLS_LATEST,
 			true, // force problem detection to see errors if any
 			null,	// do not use working copy owner to not use working copies in name lookup
 			null);
@@ -4049,7 +4103,7 @@
 		sourceChars = source2.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopies[1].getBuffer().setContents(source2);
-		this.workingCopies[1].reconcile(JLS3_INTERNAL,
+		this.workingCopies[1].reconcile(JLS_LATEST,
 			true, // force problem detection to see errors if any
 			null,	// do not use working copy owner to not use working copies in name lookup
 			null);
@@ -4106,7 +4160,7 @@
 		sourceChars = source1.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopies[0].getBuffer().setContents(source1);
-		this.workingCopies[0].reconcile(JLS3_INTERNAL,
+		this.workingCopies[0].reconcile(JLS_LATEST,
 			true, // force problem detection to see errors if any
 			null,	// do not use working copy owner to not use working copies in name lookup
 			null);
@@ -4117,7 +4171,7 @@
 		sourceChars = source2.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopies[1].getBuffer().setContents(source2);
-		this.workingCopies[1].reconcile(JLS3_INTERNAL,
+		this.workingCopies[1].reconcile(JLS_LATEST,
 			true, // force problem detection to see errors if any
 			null,	// do not use working copy owner to not use working copies in name lookup
 			null);
@@ -4181,7 +4235,7 @@
 		sourceChars = source1.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopies[0].getBuffer().setContents(source1);
-		this.workingCopies[0].reconcile(JLS3_INTERNAL,
+		this.workingCopies[0].reconcile(JLS_LATEST,
 			true, // force problem detection to see errors if any
 			null,	// do not use working copy owner to not use working copies in name lookup
 			null);
@@ -4192,7 +4246,7 @@
 		sourceChars = source2.toCharArray();
 		this.problemRequestor.initialize(sourceChars);
 		this.workingCopies[1].getBuffer().setContents(source2);
-		this.workingCopies[1].reconcile(JLS3_INTERNAL,
+		this.workingCopies[1].reconcile(JLS_LATEST,
 			true, // force problem detection to see errors if any
 			null,	// do not use working copy owner to not use working copies in name lookup
 			null);
@@ -4408,7 +4462,7 @@
 		"    int i = 0;\n" + 
 		"  }\n" +
 		"}");
-	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(JLS3_INTERNAL, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
+	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(JLS_LATEST, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
 	// X.foo() not returning any value should not be reported
 	assertProblems("Working copy should have problems:",
 			"----------\n" +
@@ -4456,7 +4510,7 @@
 		"    }/*end*/;" +
 		"  }\n" +
 		"}");
-	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(JLS3_INTERNAL, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
+	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(JLS_LATEST, ICompilationUnit.IGNORE_METHOD_BODIES, null, null);
 	// methods with anonymous classes should have their statements intact
 	assertASTNodeEquals(
 			"Unexpected ast",
@@ -4488,7 +4542,7 @@
 		"  }\n" +
 		"}");
 	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(
-			JLS3_INTERNAL,
+			JLS_LATEST,
 			ICompilationUnit.IGNORE_METHOD_BODIES | ICompilationUnit.ENABLE_STATEMENTS_RECOVERY,
 			null,
 			null);
@@ -4523,7 +4577,7 @@
 		"  }\n" +
 		"}");
 	org.eclipse.jdt.core.dom.CompilationUnit ast = this.workingCopy.reconcile(
-			JLS3_INTERNAL,
+			JLS_LATEST,
 			ICompilationUnit.IGNORE_METHOD_BODIES,
 			null,
 			null);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java
index 18af11f..0876f19 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/SortCompilationUnitElementsTests.java
@@ -66,7 +66,7 @@
 }
 
 /**
- * Internal synonynm for deprecated constant AST.JSL3
+ * Internal synonym for deprecated constant AST.JSL3
  * to alleviate deprecation warnings.
  * @deprecated
  */
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java
index 10827ba..565a599 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/WorkingCopyOwnerTests.java
@@ -30,7 +30,7 @@
 public class WorkingCopyOwnerTests extends ModifyingResourceTests {
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritePropertyTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritePropertyTest.java
index 77a7b96..ee86675 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritePropertyTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritePropertyTest.java
@@ -1,17 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.rewrite.describing;
 
+
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
@@ -20,23 +24,15 @@
 
 public class ASTRewritePropertyTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritePropertyTest.class;
-
 	public ASTRewritePropertyTest(String name) {
 		super(name);
 	}
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritePropertyTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return buildModelTestSuite(THIS);
+		return createSuite(ASTRewritePropertyTest.class);
 	}
 
 	public void testProperties() throws Exception {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java
index 1f54e1e..55570c6 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingExpressionsTest.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -16,68 +20,24 @@
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
-import org.eclipse.jdt.core.dom.ArrayAccess;
-import org.eclipse.jdt.core.dom.ArrayCreation;
-import org.eclipse.jdt.core.dom.ArrayInitializer;
-import org.eclipse.jdt.core.dom.ArrayType;
-import org.eclipse.jdt.core.dom.Assignment;
-import org.eclipse.jdt.core.dom.Block;
-import org.eclipse.jdt.core.dom.BooleanLiteral;
-import org.eclipse.jdt.core.dom.CastExpression;
-import org.eclipse.jdt.core.dom.CatchClause;
-import org.eclipse.jdt.core.dom.CharacterLiteral;
-import org.eclipse.jdt.core.dom.ClassInstanceCreation;
-import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.ConditionalExpression;
-import org.eclipse.jdt.core.dom.Expression;
-import org.eclipse.jdt.core.dom.ExpressionStatement;
-import org.eclipse.jdt.core.dom.FieldAccess;
-import org.eclipse.jdt.core.dom.InfixExpression;
-import org.eclipse.jdt.core.dom.InstanceofExpression;
-import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.MethodInvocation;
-import org.eclipse.jdt.core.dom.Name;
-import org.eclipse.jdt.core.dom.NumberLiteral;
-import org.eclipse.jdt.core.dom.ParenthesizedExpression;
-import org.eclipse.jdt.core.dom.PostfixExpression;
-import org.eclipse.jdt.core.dom.PrefixExpression;
-import org.eclipse.jdt.core.dom.PrimitiveType;
-import org.eclipse.jdt.core.dom.ReturnStatement;
-import org.eclipse.jdt.core.dom.SimpleName;
-import org.eclipse.jdt.core.dom.SimpleType;
-import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
-import org.eclipse.jdt.core.dom.StringLiteral;
-import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
-import org.eclipse.jdt.core.dom.SuperFieldAccess;
-import org.eclipse.jdt.core.dom.SuperMethodInvocation;
-import org.eclipse.jdt.core.dom.ThisExpression;
-import org.eclipse.jdt.core.dom.TryStatement;
-import org.eclipse.jdt.core.dom.Type;
-import org.eclipse.jdt.core.dom.TypeDeclaration;
-import org.eclipse.jdt.core.dom.TypeLiteral;
+import org.eclipse.jdt.core.dom.*;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 public class ASTRewritingExpressionsTest extends ASTRewritingTest {
-	private static final Class THIS= ASTRewritingExpressionsTest.class;
 
 	public ASTRewritingExpressionsTest(String name) {
 		super(name);
 	}
-
-	public static Test allTests() {
-		return new Suite(THIS);
+	public ASTRewritingExpressionsTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingExpressionsTest.class);
 	}
 
-	/** @deprecated using deprecated code */
 	public void testArrayAccess() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -134,7 +94,6 @@
 	}
 
 
-	/** @deprecated using deprecated code */
 	public void testArrayCreation() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -241,6 +200,14 @@
 			rewrite.getListRewrite(arrayCreation, ArrayCreation.DIMENSIONS_PROPERTY).insertLast(literal2, null);
 
 		}
+		{	// add a new ArrayCreation
+			ArrayCreation arrayCreation= ast.newArrayCreation();
+			arrayCreation.setType(ast.newArrayType(ast.newSimpleType(ast.newSimpleName("Object")), 3));
+			arrayCreation.dimensions().add(ast.newNumberLiteral("1"));
+			arrayCreation.dimensions().add(ast.newNumberLiteral("2"));
+			
+			rewrite.getListRewrite(invocation, MethodInvocation.ARGUMENTS_PROPERTY).insertLast(arrayCreation, null);
+		}
 
 		String preview= evaluateRewrite(cu, rewrite);
 
@@ -253,14 +220,84 @@
 		buf.append("        new int[],\n");
 		buf.append("        new int[2][10][11],\n");
 		buf.append("        new int[2][][][][],\n");
-		buf.append("        new int[10][11][]);\n");
+		buf.append("        new int[10][11][], new Object[1][2][]);\n");
 		buf.append("    }\n");
 		buf.append("}\n");
 		assertEqualString(preview, buf.toString());
 
 	}
 
-	/** @deprecated using deprecated code */
+	public void testArrayCreation2_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("        goo();\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+	
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+	
+		AST ast= astRoot.getAST();
+	
+		assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);
+		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
+		MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");
+		Block block= methodDecl.getBody();
+		List statements= block.statements();
+		assertTrue("Number of statements not 1", statements.size() == 1);
+		ExpressionStatement statement= (ExpressionStatement) statements.get(0);
+		MethodInvocation invocation= (MethodInvocation) statement.getExpression();
+	
+		{	// add a new ArrayCreation with annotations
+			ArrayCreation arrayCreation= ast.newArrayCreation();
+			SimpleType elementType= ast.newSimpleType(ast.newName("java.lang.String"));
+			
+			ArrayType arrayType= ast.newArrayType(elementType);
+			NormalAnnotation annotationC= ast.newNormalAnnotation();
+			annotationC.setTypeName(ast.newSimpleName("C"));
+			MemberValuePair memberValuePair= ast.newMemberValuePair();
+			memberValuePair.setName(ast.newSimpleName("v"));
+			memberValuePair.setValue(ast.newNumberLiteral("99"));
+			annotationC.values().add(memberValuePair);
+			Dimension dim0 = (Dimension) arrayType.dimensions().get(0);
+			dim0.annotations().add(annotationC);
+			
+			SingleMemberAnnotation annotationB= ast.newSingleMemberAnnotation();
+			annotationB.setTypeName(ast.newSimpleName("B"));
+			annotationB.setValue(ast.newNumberLiteral("0"));
+			Dimension dim1 = ast.newDimension();
+			dim1.annotations().add(annotationB);
+			arrayType.dimensions().add(0, dim1);
+			
+			MarkerAnnotation annotationA= ast.newMarkerAnnotation();
+			annotationA.setTypeName(ast.newSimpleName("A"));
+			Dimension dim2 = ast.newDimension();
+			dim2.annotations().add(annotationA);
+			arrayType.dimensions().add(0, dim2);
+			
+			arrayCreation.dimensions().add(ast.newNumberLiteral("1"));
+			arrayCreation.dimensions().add(ast.newNumberLiteral("2"));
+			arrayCreation.setType(arrayType);
+			
+			rewrite.getListRewrite(invocation, MethodInvocation.ARGUMENTS_PROPERTY).insertLast(arrayCreation, null);
+		}
+	
+		String preview= evaluateRewrite(cu, rewrite);
+	
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("        goo(new java.lang.String @A[1]@B(0)[2]@C(v = 99)[]);\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	
+	}
 	public void testArrayInitializer() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -342,7 +379,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testArrayInitializer2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -421,7 +457,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testAssignment() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -485,7 +520,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testCastExpression() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -550,7 +584,6 @@
 	}
 
 
-	/** @deprecated using deprecated code */
 	public void testCastExpression_bug28824() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -606,7 +639,6 @@
 	}
 
 
-	/** @deprecated using deprecated code */
 	public void testCatchClause() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -675,7 +707,7 @@
 	}
 
 	/** @deprecated using deprecated code */
-	public void testClassInstanceCreation() throws Exception {
+	public void testClassInstanceCreation_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -763,7 +795,7 @@
 
 	}
 
-	public void testClassInstanceCreation2() throws Exception {
+	public void testClassInstanceCreation2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -777,7 +809,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -838,7 +870,6 @@
 
 
 
-	/** @deprecated using deprecated code */
 	public void testConditionalExpression() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -893,7 +924,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testFieldAccess() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -946,7 +976,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testInfixExpression() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1109,7 +1138,6 @@
 	
 	}
 
-	/** @deprecated using deprecated code */
 	public void testInstanceofExpression() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1172,7 +1200,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testMethodInvocation() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1249,7 +1276,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void _testMethodParamsRenameReorder() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1327,7 +1353,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testMethodInvocation1() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1389,7 +1414,7 @@
 
 	}
 
-	public void testMethodInvocation2() throws Exception {
+	public void testMethodInvocation2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1401,7 +1426,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -1437,7 +1462,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testParenthesizedExpression() throws Exception {
 		//System.out.println(getClass().getName()+"::" + getName() +" disabled (bug 23362)");
 
@@ -1488,7 +1512,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testPrefixExpression() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1536,7 +1559,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testPostfixExpression() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1584,7 +1606,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testSuperConstructorInvocation() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1666,7 +1687,7 @@
 
 	}
 
-	public void testSuperConstructorInvocation2() throws Exception {
+	public void testSuperConstructorInvocation2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1680,7 +1701,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -1717,7 +1738,7 @@
 
 	}
 
-	public void testSuperConstructorInvocation4() throws Exception {
+	public void testSuperConstructorInvocation4_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1731,7 +1752,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -1769,7 +1790,6 @@
 		assertEqualString(preview, buf.toString());
 
 	}
-	/** @deprecated using deprecated code */
 	public void testSuperFieldInvocation() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1819,7 +1839,6 @@
 		assertEqualString(preview, buf.toString());
 
 	}
-	/** @deprecated using deprecated code */
 	public void testSuperMethodInvocation() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1900,7 +1919,7 @@
 
 	}
 
-	public void testSuperMethodInvocation2() throws Exception {
+	public void testSuperMethodInvocation2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1912,7 +1931,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -1949,7 +1968,6 @@
 	}
 
 
-	/** @deprecated using deprecated code */
 	public void testThisExpression() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2005,7 +2023,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testTypeLiteral() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2053,7 +2070,6 @@
 	}
 
 
-	/** @deprecated using deprecated code */
 	public void testSimpleName() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2095,7 +2111,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testNumberLiteral() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2137,7 +2152,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testBooleanLiteral() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2179,7 +2193,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testStringLiteral() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2221,7 +2234,6 @@
 
 	}
 
-	/** @deprecated using deprecated code */
 	public void testCharacterLiteral() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2262,7 +2274,154 @@
 		assertEqualString(preview, buf.toString());
 
 	}
-	
+
+	public void testIntersectionCastExpression_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		String content =
+				"import java.io.Serializable;\n" +
+				"public class X {\n" +
+				"      public Serializable main(Object obj) {\n" +
+				"         Serializable o = ((@Marker1 @Marker2 Serializable & I) () -> {});\n" +
+				"    	  Serializable oo = obj;\n" +
+				"         Serializable ooo = (Serializable) obj;\n" +
+				"      }\n" +
+				"}\n" +
+				"interface I {\n" +
+				"  public void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"  public void foo();\n" +
+				"  public void bar();\n" +
+				"}\n" +
+				"interface K {\n" +
+				"  public void foo();\n" +
+				"  public void bar();\n" +
+				"}\n";
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", content, false, null);
+
+		CompilationUnit unit= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(unit.getAST());
+		AST ast= unit.getAST();
+
+		TypeDeclaration type =  (TypeDeclaration) unit.types().get(0);
+		ASTNode node = (ASTNode) type.bodyDeclarations().get(0);
+		MethodDeclaration method = (MethodDeclaration) node;
+		
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) method.getBody().statements().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+		CastExpression cast = (CastExpression) ((ParenthesizedExpression)fragment.getInitializer()).getExpression();
+		Type castType = cast.getType();
+		assertEquals("Not an intersection cast type", ASTNode.INTERSECTION_TYPE, castType.getNodeType());
+
+		{
+			// Modify intersection cast types by adding new types and removing and adding annotations
+			ListRewrite listRewrite = rewrite.getListRewrite(castType, IntersectionType.TYPES_PROPERTY);
+			SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("J"));
+			MarkerAnnotation annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker3"));
+			simpleType.annotations().add(annot);
+			listRewrite.insertLast(simpleType, null);
+
+			simpleType = (SimpleType) ((IntersectionType) castType).types().get(0);
+			listRewrite = rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY);
+			listRewrite.remove((ASTNode) simpleType.annotations().get(0), null);
+			listRewrite.remove((ASTNode) simpleType.annotations().get(1), null);
+		}
+		{
+			// Create new intersection cast types
+			IntersectionType intersection = ast.newIntersectionType();
+			SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("I"));
+			MarkerAnnotation annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker1"));
+			simpleType.annotations().add(annot);
+			intersection.types().add(simpleType);
+
+			simpleType = ast.newSimpleType(ast.newSimpleName("J"));
+			annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker2"));
+			simpleType.annotations().add(annot);
+			intersection.types().add(simpleType);
+
+			simpleType = ast.newSimpleType(ast.newSimpleName("Serializable"));
+			annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker3"));
+			simpleType.annotations().add(annot);
+			intersection.types().add(simpleType);
+
+			 statement = (VariableDeclarationStatement) method.getBody().statements().get(1);
+			fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+			CastExpression castExp = ast.newCastExpression();
+			castExp.setType(intersection);
+			castExp.setExpression(ast.newSimpleName("obj"));
+			rewrite.set(fragment, VariableDeclarationFragment.INITIALIZER_PROPERTY, castExp, null);
+		}
+		{
+			IntersectionType intersection = ast.newIntersectionType();
+			SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("I"));
+			MarkerAnnotation annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker1"));
+			simpleType.annotations().add(annot);
+			intersection.types().add(simpleType);
+			
+			simpleType = ast.newSimpleType(ast.newSimpleName("Serializable"));
+			annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker2"));
+			simpleType.annotations().add(annot);
+			intersection.types().add(simpleType);
+
+			statement = (VariableDeclarationStatement) method.getBody().statements().get(2);
+			fragment = (VariableDeclarationFragment) statement.fragments().get(0);
+			CastExpression castExp = (CastExpression) fragment.getInitializer();
+			rewrite.set(castExp, CastExpression.TYPE_PROPERTY, intersection, null);
+		}
+		{ // Add a new cast expression
+			cast = ast.newCastExpression();
+			IntersectionType intersection = ast.newIntersectionType();
+			SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("I"));
+			MarkerAnnotation annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker1"));
+			simpleType.annotations().add(annot);
+			intersection.types().add(simpleType);
+
+			simpleType = ast.newSimpleType(ast.newSimpleName("Serializable"));
+			annot = ast.newMarkerAnnotation();
+			annot.setTypeName(ast.newSimpleName("Marker2"));
+			simpleType.annotations().add(annot);
+			intersection.types().add(simpleType);
+			cast.setType(intersection);
+			cast.setExpression(ast.newSimpleName("obj"));
+
+			ReturnStatement returnSt = ast.newReturnStatement();
+			returnSt.setExpression(cast);
+			ListRewrite listRewrite = rewrite.getListRewrite(method.getBody(), Block.STATEMENTS_PROPERTY);
+			listRewrite.insertLast(returnSt, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		content =
+				"import java.io.Serializable;\n" +
+				"public class X {\n" +
+				"      public Serializable main(Object obj) {\n" +
+				"         Serializable o = ((Serializable & I & @Marker3\n" +
+				"        J) () -> {});\n" +
+				"    	  Serializable oo = (@Marker1 I & @Marker2 J & @Marker3 Serializable) obj;\n" +
+				"         Serializable ooo = (@Marker1 I & @Marker2 Serializable) obj;\n" +
+				"        return (@Marker1 I & @Marker2 Serializable) obj;\n" +
+				"      }\n" +
+				"}\n" +
+				"interface I {\n" +
+				"  public void foo();\n" +
+				"}\n" +
+				"interface J {\n" +
+				"  public void foo();\n" +
+				"  public void bar();\n" +
+				"}\n" +
+				"interface K {\n" +
+				"  public void foo();\n" +
+				"  public void bar();\n" +
+				"}\n";
+		assertEqualString(preview, content);
+	}
+
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=404251
 	public void testBug404251() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java
index 61f26cc..ce512a9 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingGroupNodeTest.java
@@ -1,21 +1,24 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.rewrite.describing;
 
+
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
-
 import org.eclipse.jdt.core.dom.AST;
 import org.eclipse.jdt.core.dom.ASTNode;
 import org.eclipse.jdt.core.dom.Block;
@@ -29,24 +32,17 @@
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 
 public class ASTRewritingGroupNodeTest extends ASTRewritingTest {
-	private static final Class THIS= ASTRewritingGroupNodeTest.class;
 
 	public ASTRewritingGroupNodeTest(String name) {
 		super(name);
 	}
 
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingGroupNodeTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingGroupNodeTest.class);
 	}
 
 	public void testCollapsedTargetNodes() throws Exception {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java
index 1e6d612..0d5a4be 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingInsertBoundTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -15,7 +19,6 @@
 import java.util.Map;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
@@ -34,24 +37,16 @@
 
 public class ASTRewritingInsertBoundTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingInsertBoundTest.class;
-
 	public ASTRewritingInsertBoundTest(String name) {
 		super(name);
 	}
 
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingInsertBoundTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingInsertBoundTest.class);
 	}
 
 	/** @deprecated using deprecated code */
@@ -73,7 +68,7 @@
 
 
 	/** @deprecated using deprecated code */
-	public void testInsert1() throws Exception {
+	public void testInsert1_only_2() throws Exception {
 		// insert first and last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -138,7 +133,7 @@
 	}
 
 	/** @deprecated using deprecated code */
-	public void testInsert3() throws Exception {
+	public void testInsert3_only_2() throws Exception {
 		// insert 2 x before
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -207,7 +202,7 @@
 	}
 
 
-	public void testInsert2() throws Exception {
+	public void testInsert2_only_2() throws Exception {
 		// insert 2 x first and 2 x last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -279,7 +274,7 @@
 
 	}
 
-	public void testInsert1Before() throws Exception {
+	public void testInsert1Before_only_2_3_4() throws Exception {
 		// insert first and last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -342,7 +337,7 @@
 
 	}
 
-	public void testInsert2Before() throws Exception {
+	public void testInsert2Before_only_2_3_4() throws Exception {
 		// insert 2x first and 2 x last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -415,7 +410,7 @@
 
 	}
 
-	public void testInsert3Before() throws Exception {
+	public void testInsert3Before_only_2_3_4() throws Exception {
 		// insert 2 x after
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -704,7 +699,7 @@
 	}
 
 
-	public void testRemoveInsert1() throws Exception {
+	public void testRemoveInsert1_only_2() throws Exception {
 		// remove first add before first, remove last add after last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -770,7 +765,7 @@
 
 	}
 
-	public void testRemoveInsert2() throws Exception {
+	public void testRemoveInsert2_only_2() throws Exception {
 		// remove first add 2x first, remove last add 2x  last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -847,7 +842,7 @@
 
 	}
 
-	public void testRemoveInsert3() throws Exception {
+	public void testRemoveInsert3_only_2() throws Exception {
 		// remove middle, add before, add after
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -917,7 +912,7 @@
 	}
 
 
-	public void testRemoveInsert1Before() throws Exception {
+	public void testRemoveInsert1Before_only_2_3_4() throws Exception {
 		// remove first add before first, remove last add after last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -984,7 +979,7 @@
 
 	}
 
-	public void testRemoveInsert2Before() throws Exception {
+	public void testRemoveInsert2Before_only_2_3_4() throws Exception {
 		// remove first add 2x first, remove last add 2x  last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1060,7 +1055,7 @@
 
 	}
 
-	public void testRemoveInsert3Before() throws Exception {
+	public void testRemoveInsert3Before_only_2_3_4() throws Exception {
 		// remove middle, add before, add after
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1129,7 +1124,7 @@
 
 	}
 
-	public void testRemoveInsert4() throws Exception {
+	public void testRemoveInsert4_only_2() throws Exception {
 		// remove first and add after first, remove last and add before last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1199,7 +1194,7 @@
 
 	}
 
-	public void testRemoveInsert4Before() throws Exception {
+	public void testRemoveInsert4Before_only_2_3_4() throws Exception {
 		// remove first and add after first, remove last and add before last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1268,7 +1263,7 @@
 
 	}
 
-	public void testRemoveInsert5() throws Exception {
+	public void testRemoveInsert5_only_2() throws Exception {
 		// remove first and add after and before first, remove last and add after and before last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1347,7 +1342,7 @@
 
 	}
 
-	public void testRemoveInsert5Before() throws Exception {
+	public void testRemoveInsert5Before_only_2_3_4() throws Exception {
 		// remove first and add after first, remove last and add before last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1426,7 +1421,7 @@
 	}
 
 
-	public void testRemoveInsert6() throws Exception {
+	public void testRemoveInsert6_only_2() throws Exception {
 		// remove all, add before first and after last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1493,7 +1488,7 @@
 
 	}
 
-	public void testRemoveInsert6Before() throws Exception {
+	public void testRemoveInsert6Before_only_2_3_4() throws Exception {
 		// remove all, add before first and after last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1561,7 +1556,7 @@
 	}
 
 
-	public void testRemoveInsert7() throws Exception {
+	public void testRemoveInsert7_only_2() throws Exception {
 		// remove all, add after first and before last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1630,7 +1625,7 @@
 
 	}
 
-	public void testRemoveInsert7Before() throws Exception {
+	public void testRemoveInsert7Before_only_2_3_4() throws Exception {
 		// remove all, add after first and before last
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java
index a68c3b7..b7ded5e 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingJavadocTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -13,35 +17,24 @@
 import java.util.List;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
-
 import org.eclipse.jdt.core.dom.*;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
 public class ASTRewritingJavadocTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingJavadocTest.class;
-
 	public ASTRewritingJavadocTest(String name) {
 		super(name);
 	}
-
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingJavadocTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingJavadocTest.class);
 	}
 
 	public void testParamName() throws Exception {
@@ -712,7 +705,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testTagRemove4() throws Exception {
+	public void testTagRemove4_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("/**\n");
@@ -721,7 +714,7 @@
 		buf.append("package test1;\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("package-info.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
@@ -792,7 +785,7 @@
 
 	}
 
-	public void testAddJavadoc() throws Exception {
+	public void testAddJavadoc_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingLambdaExpressionTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingLambdaExpressionTest.java
new file mode 100644
index 0000000..e0ac46b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingLambdaExpressionTest.java
@@ -0,0 +1,289 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * 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.IPackageFragment;
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+
+public class ASTRewritingLambdaExpressionTest extends ASTRewritingTest {
+
+	public ASTRewritingLambdaExpressionTest(String name) {
+		super(name);
+	}
+
+	public ASTRewritingLambdaExpressionTest(String name, int apiLevel) {
+		super(name, apiLevel);
+	}
+
+	public static Test suite() {
+		return createSuite(ASTRewritingLambdaExpressionTest.class);
+	}
+
+	public void testLambdaExpressions_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("interface I {\n");
+		buf.append("	int foo(int x);\n");
+		buf.append("}\n");
+		buf.append("interface J {\n");
+		buf.append("	int foo();\n");
+		buf.append("}\n");
+		buf.append("public class X {\n");
+		buf.append(" I i =  vlambda -> {return 200;};\n");
+		buf.append(" J j =  () -> 1729;\n");
+		buf.append("}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "I");
+
+		{ // change return type
+			MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "foo");
+			assertTrue("null return type: foo", methodDecl.getReturnType2() != null);
+
+			Type returnType= methodDecl.getReturnType2();
+			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
+			rewrite.replace(returnType, newReturnType, null);
+		}
+		{ // add a parameter to the singleton function in the interface.
+			MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "foo");
+			List parameters= methodDecl.parameters();
+			assertTrue("must be 1 parameter", parameters.size() == 1);
+
+			SingleVariableDeclaration decl= ast.newSingleVariableDeclaration();
+			decl.setType(ast.newPrimitiveType(PrimitiveType.INT));
+			decl.setName(ast.newSimpleName("y"));
+			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertLast(decl, null);
+		}
+
+		{ // insert a parameter
+			typedeclaration= findTypeDeclaration(astRoot, "J");
+			MethodDeclaration methodDecl = findMethodDeclaration(typedeclaration, "foo");
+			List parameters = methodDecl.parameters();
+			assertTrue("must be 0 parameters", parameters.size() == 0);
+
+			SingleVariableDeclaration newParam= ast.newSingleVariableDeclaration();
+			newParam.setName(ast.newSimpleName("x"));
+			newParam.setType(ast.newPrimitiveType(PrimitiveType.INT));
+			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertFirst(newParam, null);
+		}
+
+		typedeclaration= findTypeDeclaration(astRoot, "X");
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(0);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		Expression expression = fragment.getInitializer();
+		assertTrue(expression instanceof LambdaExpression);
+		LambdaExpression lambdaExpression = (LambdaExpression)expression;
+		
+		{// add a parameter to the lambda expression
+			List parameters= lambdaExpression.parameters();
+			assertTrue("must be 1 parameter", parameters.size() == 1);
+			ASTNode firstParam= (ASTNode) parameters.get(0);
+			VariableDeclarationFragment newParam= ast.newVariableDeclarationFragment();
+			newParam.setName(ast.newSimpleName("wlambda"));
+			rewrite.getListRewrite(lambdaExpression, LambdaExpression.PARAMETERS_PROPERTY).insertAfter(newParam, firstParam, null);		
+		}
+		
+		{// replace the block body with a float literal expression body.
+			ASTNode body = lambdaExpression.getBody();
+			ASTNode newBody = ast.newNumberLiteral("3.14");
+			rewrite.replace(body, newBody, null);
+		}
+
+		fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(1);
+		fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		expression = fragment.getInitializer();
+		assertTrue(expression instanceof LambdaExpression);
+		lambdaExpression = (LambdaExpression)expression;
+		
+		{// add a parameter to the lambda expression - border case - empty list initially
+			List parameters= lambdaExpression.parameters();
+			assertTrue("must be 0 parameter", parameters.size() == 0);
+			VariableDeclarationFragment newParam= ast.newVariableDeclarationFragment();
+			newParam.setName(ast.newSimpleName("vlambda"));
+			rewrite.getListRewrite(lambdaExpression, LambdaExpression.PARAMETERS_PROPERTY).insertFirst(newParam, null);		
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("interface I {\n");
+		buf.append("	float foo(int x, int y);\n");
+		buf.append("}\n");
+		buf.append("interface J {\n");
+		buf.append("	int foo(int x);\n");
+		buf.append("}\n");
+		buf.append("public class X {\n");
+		buf.append(" I i =  (vlambda, wlambda) -> 3.14;\n");
+		buf.append(" J j =  (vlambda) -> 1729;\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	
+	public void testLambdaExpressions_Parentheses_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("interface I {\n");
+		buf.append("	int foo(int x);\n");
+		buf.append("}\n");
+		buf.append("interface J {\n");
+		buf.append("	int foo();\n");
+		buf.append("}\n");
+		buf.append("interface K {\n");
+		buf.append("	int foo(int x, int y);\n");
+		buf.append("}\n");
+		buf.append("interface L {\n");
+		buf.append("	int foo(int x);\n");
+		buf.append("}\n");
+		buf.append("public class X {\n");
+		buf.append(" I i =  vlambda -> 22121887;\n");
+		buf.append(" I idash =  (vlambda) -> 1729;\n");
+		buf.append(" J j =  () -> 26041920;\n");
+		buf.append(" K k =  (x, y) -> 1729;\n");
+		buf.append(" K kdash =  (int x, int y) -> 1729;\n");
+		buf.append(" L l =  vlambda -> 1729;\n");
+		buf.append("}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		{ // remove a parameter
+			TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "L");
+			MethodDeclaration methodDecl = findMethodDeclaration(typedeclaration, "foo");
+			List parameters = methodDecl.parameters();
+			assertTrue("must be 1 parameter", parameters.size() == 1);
+			ASTNode param = (ASTNode) parameters.get(0);
+			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).remove(param, null);
+		}
+
+		int fCount = 0;
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "X");
+		FieldDeclaration fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(fCount++);
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		LambdaExpression lambdaExpression = (LambdaExpression)fragment.getInitializer();
+		
+		{// set parentheses
+			assertTrue("lambda expression has parantheses", lambdaExpression.hasParentheses() == false);
+			rewrite.set(lambdaExpression, LambdaExpression.PARENTHESES_PROPERTY, Boolean.TRUE, null);
+		}
+		
+		fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(fCount++);
+		fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		lambdaExpression = (LambdaExpression)fragment.getInitializer();
+		
+		{// reset parentheses - a legal operation here.
+			assertTrue("lambda expression has parantheses", lambdaExpression.hasParentheses() == true);
+			rewrite.set(lambdaExpression, LambdaExpression.PARENTHESES_PROPERTY, Boolean.FALSE, null);
+		}
+		
+		fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(fCount++);
+		fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		lambdaExpression = (LambdaExpression)fragment.getInitializer();
+
+		{// reset parentheses - an illegal operation here.
+			assertTrue("lambda expression does not have parantheses", lambdaExpression.hasParentheses() == true);
+			rewrite.set(lambdaExpression, LambdaExpression.PARENTHESES_PROPERTY, Boolean.FALSE, null);
+		}
+
+		fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(fCount++);
+		fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		lambdaExpression = (LambdaExpression)fragment.getInitializer();
+
+		{// reset parentheses - an illegal operation here.
+			assertTrue("lambda expression does not have parantheses", lambdaExpression.hasParentheses() == true);
+			rewrite.set(lambdaExpression, LambdaExpression.PARENTHESES_PROPERTY, Boolean.FALSE, null);
+		}
+		
+		{// change all the parameter to SVD ie add type info to the parameters.
+			List parameters = lambdaExpression.parameters();
+			VariableDeclaration param = (VariableDeclaration)parameters.get(0);
+			SingleVariableDeclaration newParam= ast.newSingleVariableDeclaration();
+			newParam.setName(ast.newSimpleName(new String(param.toString())));
+			newParam.setType(ast.newPrimitiveType(PrimitiveType.INT));
+			rewrite.getListRewrite(lambdaExpression, LambdaExpression.PARAMETERS_PROPERTY).replace(param, newParam, null);
+			
+			param = (VariableDeclaration)parameters.get(1);
+			newParam= ast.newSingleVariableDeclaration();
+			newParam.setName(ast.newSimpleName(new String(param.toString())));
+			newParam.setType(ast.newPrimitiveType(PrimitiveType.INT));
+			rewrite.getListRewrite(lambdaExpression, LambdaExpression.PARAMETERS_PROPERTY).replace(param, newParam, null);
+		}
+
+		{// Remove type info from the parameters.
+
+			fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(fCount++);
+			fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+			lambdaExpression = (LambdaExpression)fragment.getInitializer();
+			List parameters = lambdaExpression.parameters();
+
+			for (int i = 0; i < parameters.size(); ++i) {
+				SingleVariableDeclaration param = (SingleVariableDeclaration)parameters.get(i);
+				VariableDeclarationFragment newParam= ast.newVariableDeclarationFragment();
+				newParam.setName(ast.newSimpleName(new String(param.getName().toString())));
+				rewrite.getListRewrite(lambdaExpression, LambdaExpression.PARAMETERS_PROPERTY).replace(param, newParam, null);				
+			}
+		}
+
+		fieldDeclaration = (FieldDeclaration) typedeclaration.bodyDeclarations().get(fCount++);
+		fragment = (VariableDeclarationFragment)fieldDeclaration.fragments().get(0);
+		lambdaExpression = (LambdaExpression)fragment.getInitializer();
+	
+		{// remove the only parameter and the rewriter should automatically add the parentheses
+			List parameters = lambdaExpression.parameters();
+			ASTNode param = (ASTNode)parameters.get(0);
+			rewrite.getListRewrite(lambdaExpression, LambdaExpression.PARAMETERS_PROPERTY).remove(param,  null);
+		}
+
+		String preview= evaluateRewrite(cu, rewrite);
+
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("interface I {\n");
+		buf.append("	int foo(int x);\n");
+		buf.append("}\n");
+		buf.append("interface J {\n");
+		buf.append("	int foo();\n");
+		buf.append("}\n");
+		buf.append("interface K {\n");
+		buf.append("	int foo(int x, int y);\n");
+		buf.append("}\n");
+		buf.append("interface L {\n");
+		buf.append("	int foo();\n");
+		buf.append("}\n");
+		buf.append("public class X {\n");
+		buf.append(" I i =  (vlambda) -> 22121887;\n");
+		buf.append(" I idash =  vlambda -> 1729;\n");
+		buf.append(" J j =  () -> 26041920;\n");
+		buf.append(" K k =  (int x, int y) -> 1729;\n");
+		buf.append(" K kdash =  (x, y) -> 1729;\n");
+		buf.append(" L l =  () -> 1729;\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+}
\ No newline at end of file
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 63b0aa5..c92313a 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
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -12,43 +16,106 @@
 
 import java.util.Arrays;
 import java.util.Comparator;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.Modifier.ModifierKeyword;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 public class ASTRewritingMethodDeclTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingMethodDeclTest.class;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_FIELD_MODIFIERS_PROPERTY = FieldDeclaration.MODIFIERS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_INITIALIZER_MODIFIERS_PROPERTY = Initializer.MODIFIERS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_METHOD_MODIFIERS_PROPERTY = MethodDeclaration.MODIFIERS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_METHOD_RETURN_TYPE_PROPERTY = MethodDeclaration.RETURN_TYPE_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY = MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final ChildListPropertyDescriptor INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY = MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY;
 
 	public ASTRewritingMethodDeclTest(String name) {
 		super(name);
 	}
 
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingMethodDeclTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingMethodDeclTest.class);
 	}
 
 	/** @deprecated using deprecated code */
+	private Type getReturnType(MethodDeclaration methodDecl) { 
+		return this.apiLevel < AST.JLS3 ? methodDecl.getReturnType() : methodDecl.getReturnType2(); 
+	} 
+
+	/** @deprecated using deprecated code */
+	private ChildPropertyDescriptor getMethodReturnTypeProperty(AST ast) { 
+		return ast.apiLevel() < AST.JLS3 ? INTERNAL_METHOD_RETURN_TYPE_PROPERTY : MethodDeclaration.RETURN_TYPE2_PROPERTY; 
+	} 
+
+	private ASTNode createNewExceptionType(AST ast, String name) {
+		return ast.apiLevel() < AST.JLS8 ? ast.newSimpleName(name) : (ASTNode) ast.newSimpleType(ast.newSimpleName(name));
+	}
+
+	/** @deprecated using deprecated code */
+	private List getThrownExceptions(MethodDeclaration methodDecl) { 
+		return this.apiLevel < AST.JLS8 ? methodDecl.thrownExceptions() : methodDecl.thrownExceptionTypes(); 
+	} 
+
+	/** @deprecated using deprecated code */
+	private ChildListPropertyDescriptor getMethodThrownExceptionsProperty(AST ast) { 
+		return ast.apiLevel() < AST.JLS8 ? INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY : MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY; 
+	} 
+
+	/** @deprecated using deprecated code */
+	private void setModifiers(ASTRewrite rewrite, MethodDeclaration methodDecl, int newModifiers) {
+		if (this.apiLevel < AST.JLS3) {
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+		} else {
+			ListRewrite listRewrite = rewrite.getListRewrite(methodDecl, MethodDeclaration.MODIFIERS2_PROPERTY);
+			for (Iterator iter= listRewrite.getOriginalList().iterator(); iter.hasNext(); ) {
+				ASTNode modifier= (ASTNode) iter.next();
+				listRewrite.remove(modifier, null);
+			}
+			List newModifierNodes = methodDecl.getAST().newModifiers(newModifiers);
+			for (Iterator iter= newModifierNodes.iterator(); iter.hasNext(); ) {
+				Modifier modifier= (Modifier) iter.next();
+				listRewrite.insertLast(modifier, null);
+			}
+		}
+	}
+	
+	/** @deprecated using deprecated code */
+	private void setExtraDimensions(ASTRewrite rewrite, MethodDeclaration methodDecl, int extraDimensions) {
+		if (this.apiLevel < AST.JLS8) {
+			rewrite.set(methodDecl, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, new Integer(extraDimensions), null);
+		} else {
+			ListRewrite listRewrite = rewrite.getListRewrite(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+			for (Iterator iter= listRewrite.getOriginalList().iterator(); iter.hasNext(); ) {
+				ASTNode extraDimension= (ASTNode) iter.next();
+				listRewrite.remove(extraDimension, null);
+			}
+			for (int i= 0; i < extraDimensions; i++) {
+				listRewrite.insertFirst(methodDecl.getAST().newDimension(), null);
+			}
+		}
+	}
+
 	public void testMethodDeclChanges() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -75,20 +142,20 @@
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 
 			// from constructor to method
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, newReturnType, null);
+			rewrite.set(methodDecl, getMethodReturnTypeProperty(ast), newReturnType, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
 		}
 		{ // change return type
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "gee");
-			assertTrue("Has no return type: gee", methodDecl.getReturnType() != null);
+			assertTrue("Has no return type: gee", getReturnType(methodDecl) != null);
 
-			Type returnType= methodDecl.getReturnType();
+			Type returnType= getReturnType(methodDecl);
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 			rewrite.replace(returnType, newReturnType, null);
 		}
 		{ // remove return type
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "hee");
-			assertTrue("Has no return type: hee", methodDecl.getReturnType() != null);
+			assertTrue("Has no return type: hee", getReturnType(methodDecl) != null);
 
 			// from method to constructor
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
@@ -108,9 +175,9 @@
 			SingleVariableDeclaration newParam= createNewParam(ast, "m");
 			rewrite.replace((ASTNode) parameters.get(0), newParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 2 thrown exceptions", thrownExceptions.size() == 2);
-			Name newThrownException= ast.newSimpleName("ArrayStoreException");
+			ASTNode newThrownException= createNewExceptionType(ast, "ArrayStoreException");
 			rewrite.replace((ASTNode) thrownExceptions.get(1), newThrownException, null);
 		}
 		{ // rename first and second param & rename first and last exception
@@ -122,10 +189,10 @@
 			rewrite.replace((ASTNode) parameters.get(0), newParam1, null);
 			rewrite.replace((ASTNode) parameters.get(1), newParam2, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);
-			Name newThrownException1= ast.newSimpleName("ArrayStoreException");
-			Name newThrownException2= ast.newSimpleName("InterruptedException");
+			ASTNode newThrownException1= createNewExceptionType(ast, "ArrayStoreException");
+			ASTNode newThrownException2= createNewExceptionType(ast, "InterruptedException");
 			rewrite.replace((ASTNode) thrownExceptions.get(0), newThrownException1, null);
 			rewrite.replace((ASTNode) thrownExceptions.get(2), newThrownException2, null);
 		}
@@ -140,9 +207,9 @@
 			rewrite.replace((ASTNode) parameters.get(1), newParam2, null);
 			rewrite.replace((ASTNode) parameters.get(2), newParam3, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);
-			Name newThrownException= ast.newSimpleName("ArrayStoreException");
+			ASTNode newThrownException= createNewExceptionType(ast, "ArrayStoreException");
 			rewrite.replace((ASTNode) thrownExceptions.get(1), newThrownException, null);
 		}
 
@@ -164,7 +231,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testMethodTypeParameterAdds() throws Exception {
+	public void testMethodTypeParameterAdds_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -184,7 +251,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
@@ -220,7 +287,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testMethodTypeParameterRemoves() throws Exception {
+	public void testMethodTypeParameterRemoves_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -241,7 +308,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
 
@@ -277,7 +344,7 @@
 
 
 
-	public void testMethodReturnTypeChanges() throws Exception {
+	public void _testMethodReturnTypeChanges_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -300,64 +367,64 @@
 
 		{ // insert return type, add second modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(0);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC | Modifier.FINAL), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC | Modifier.FINAL), null);
 
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 
 			// from constructor to method
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, newReturnType, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, newReturnType, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
 
 		}
 		{ // insert return type, add (first) modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(1);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
 
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 
 			// from constructor to method
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, newReturnType, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, newReturnType, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
 		}
 
 		{ // insert return type, add second modifier with comments
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(2);
 
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
 
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 
 			// from constructor to method
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, newReturnType, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, newReturnType, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
 
 		}
 
 		{ // remove return type, add second modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(3);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC | Modifier.FINAL), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC | Modifier.FINAL), null);
 
 			// from method to constructor
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, null, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, null, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
 
 		}
 		{ // remove return type, add (first) modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(4);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
 
 			// from method to constructor
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, null, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, null, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
 		}
 
 		{ // remove return type, add second modifier with comments
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(5);
 
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.FINAL), null);
 
 			// from method to constructor
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, null, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, null, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
 		}
 
@@ -380,7 +447,7 @@
 
 	}
 
-	public void testMethodReturnTypeChanges2() throws Exception {
+	public void _testMethodReturnTypeChanges2_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -403,64 +470,64 @@
 
 		{ // insert return type, remove second modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(0);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC), null);
 
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 
 			// from constructor to method
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, newReturnType, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, newReturnType, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
 
 		}
 		{ // insert return type, remove (only) modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(1);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(0), null);
+			setModifiers(rewrite, methodDecl, 0);
 
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 
 			// from constructor to method
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, newReturnType, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, newReturnType, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
 		}
 
 		{ // insert return type, remove modifier with comments
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(2);
 
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(0), null);
+			setModifiers(rewrite, methodDecl, 0);
 
 			Type newReturnType= astRoot.getAST().newPrimitiveType(PrimitiveType.FLOAT);
 
 			// from constructor to method
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, newReturnType, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, newReturnType, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.FALSE, null);
 
 		}
 
 		{ // remove return type, remove second modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(3);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_MODIFIERS_PROPERTY, new Integer(Modifier.PUBLIC), null);
 
 			// from method to constructor
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, null, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, null, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
 
 		}
 		{ // remove return type, remove (only) modifier
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(4);
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(0), null);
+			setModifiers(rewrite, methodDecl, 0);
 
 			// from method to constructor
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, null, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, null, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
 		}
 
 		{ // remove return type, remove modifier with comments
 			MethodDeclaration methodDecl= (MethodDeclaration) list.get(5);
 
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(0), null);
+			setModifiers(rewrite, methodDecl, 0);
 
 			// from method to constructor
-			rewrite.set(methodDecl, MethodDeclaration.RETURN_TYPE_PROPERTY, null, null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_RETURN_TYPE_PROPERTY, null, null);
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
 		}
 
@@ -485,7 +552,7 @@
 
 
 
-	public void testMethodReturnTypeChangesAST3() throws Exception {
+	public void testMethodReturnTypeChanges_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -501,7 +568,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
@@ -599,7 +666,7 @@
 
 	}
 
-	public void testMethodReturnTypeChanges2AST3() throws Exception {
+	public void testMethodReturnTypeChanges2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -615,7 +682,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
 		List list= type.bodyDeclarations();
@@ -730,13 +797,13 @@
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "gee");
 
 			// change flags
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(0), null);
+			setModifiers(rewrite, methodDecl, 0);
 
 			List parameters= methodDecl.parameters();
 			assertTrue("must be 3 parameters", parameters.size() == 3);
 			rewrite.remove((ASTNode) parameters.get(1), null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 1 thrown exceptions", thrownExceptions.size() == 1);
 			rewrite.remove((ASTNode) thrownExceptions.get(0), null);
 		}
@@ -753,7 +820,7 @@
 			rewrite.remove((ASTNode) parameters.get(0), null);
 			rewrite.remove((ASTNode) parameters.get(1), null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 2 thrown exceptions", thrownExceptions.size() == 2);
 			rewrite.remove((ASTNode) thrownExceptions.get(0), null);
 		}
@@ -764,7 +831,7 @@
 			rewrite.remove((ASTNode) parameters.get(0), null);
 			rewrite.remove((ASTNode) parameters.get(2), null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 2 thrown exceptions", thrownExceptions.size() == 2);
 			rewrite.remove((ASTNode) thrownExceptions.get(1), null);
 		}
@@ -775,7 +842,7 @@
 			rewrite.remove((ASTNode) parameters.get(1), null);
 			rewrite.remove((ASTNode) parameters.get(2), null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);
 			rewrite.remove((ASTNode) thrownExceptions.get(1), null);
 		}
@@ -787,7 +854,7 @@
 			rewrite.remove((ASTNode) parameters.get(1), null);
 			rewrite.remove((ASTNode) parameters.get(2), null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);
 			rewrite.remove((ASTNode) thrownExceptions.get(0), null);
 			rewrite.remove((ASTNode) thrownExceptions.get(2), null);
@@ -812,7 +879,7 @@
 
 	}
 
-	public void testListRemoves2() throws Exception {
+	public void testListRemoves2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -923,11 +990,11 @@
 			SingleVariableDeclaration newParam= createNewParam(ast, "m");
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertFirst(newParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 0 thrown exceptions", thrownExceptions.size() == 0);
 
-			Name newThrownException= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertFirst(newThrownException, null);
+			ASTNode newThrownException= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertFirst(newThrownException, null);
 
 		}
 		{ // insert before second param & insert before first exception & add synchronized
@@ -935,7 +1002,7 @@
 
 			// change flags
 			int newModifiers= Modifier.PUBLIC | Modifier.SYNCHRONIZED;
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			setModifiers(rewrite, methodDecl, newModifiers);
 
 			List parameters= methodDecl.parameters();
 			assertTrue("must be 3 parameters", parameters.size() == 3);
@@ -944,19 +1011,19 @@
 			SingleVariableDeclaration newParam= createNewParam(ast, "m");
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertBefore(newParam, secondParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 1 thrown exceptions", thrownExceptions.size() == 1);
 
 			ASTNode firstException= (ASTNode) thrownExceptions.get(0);
-			Name newThrownException= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertBefore(newThrownException, firstException, null);
+			ASTNode newThrownException= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertBefore(newThrownException, firstException, null);
 		}
 		{ // insert after last param & insert after first exception & add synchronized, static
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "hee");
 
 			// change flags
 			int newModifiers= Modifier.PUBLIC | Modifier.SYNCHRONIZED | Modifier.STATIC;
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			setModifiers(rewrite, methodDecl, newModifiers);
 
 			List parameters= methodDecl.parameters();
 			assertTrue("must be 3 parameters", parameters.size() == 3);
@@ -964,12 +1031,12 @@
 			SingleVariableDeclaration newParam= createNewParam(ast, "m");
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertLast(newParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 1 thrown exceptions", thrownExceptions.size() == 1);
 
 			ASTNode firstException= (ASTNode) thrownExceptions.get(0);
-			Name newThrownException= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertAfter(newThrownException, firstException, null);
+			ASTNode newThrownException= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertAfter(newThrownException, firstException, null);
 
 		}
 		{ // insert 2 params before first & insert between two exception
@@ -986,12 +1053,12 @@
 			listRewrite.insertBefore(newParam1, firstParam, null);
 			listRewrite.insertBefore(newParam2, firstParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 2 thrown exceptions", thrownExceptions.size() == 2);
 
 			ASTNode firstException= (ASTNode) thrownExceptions.get(0);
-			Name newThrownException= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertAfter(newThrownException, firstException, null);
+			ASTNode newThrownException= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertAfter(newThrownException, firstException, null);
 		}
 		{ // insert 2 params after first & replace the second exception and insert new after
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "jee");
@@ -1007,13 +1074,13 @@
 			listRewrite.insertAfter(newParam2, firstParam, null);
 			listRewrite.insertAfter(newParam1, firstParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 2 thrown exceptions", thrownExceptions.size() == 2);
 
-			Name newThrownException1= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException1, null);
+			ASTNode newThrownException1= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException1, null);
 
-			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
+			ASTNode newThrownException2= createNewExceptionType(ast, "ArrayStoreException");
 			rewrite.replace((ASTNode) thrownExceptions.get(1), newThrownException2, null);
 		}
 		{ // insert 2 params after last & remove the last exception and insert new after
@@ -1030,14 +1097,14 @@
 			listRewrite.insertAfter(newParam2, lastParam, null);
 			listRewrite.insertAfter(newParam1, lastParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);
 
 			ASTNode lastException= (ASTNode) thrownExceptions.get(2);
 			rewrite.remove(lastException, null);
 
-			Name newThrownException= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertBefore(newThrownException, lastException, null);
+			ASTNode newThrownException= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertBefore(newThrownException, lastException, null);
 		}
 		{ // insert at first and last position & remove 2nd, add after 2nd, remove 3rd
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "lee");
@@ -1051,7 +1118,7 @@
 			listRewrite.insertFirst(newParam1, null);
 			listRewrite.insertLast(newParam2, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);
 
 			ASTNode secondException= (ASTNode) thrownExceptions.get(1);
@@ -1059,8 +1126,8 @@
 			rewrite.remove(secondException, null);
 			rewrite.remove(lastException, null);
 
-			Name newThrownException= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertAfter(newThrownException, secondException, null);
+			ASTNode newThrownException= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertAfter(newThrownException, secondException, null);
 
 		}
 
@@ -1109,14 +1176,14 @@
 			listRewrite.insertFirst(newParam1, null);
 			listRewrite.insertLast(newParam2, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 3 thrown exceptions", thrownExceptions.size() == 3);
 
 			rewrite.remove((ASTNode) thrownExceptions.get(1), null);
 			rewrite.remove((ASTNode) thrownExceptions.get(2), null);
 
-			Name newThrownException= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException, null);
+			ASTNode newThrownException= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException, null);
 		}
 
 
@@ -1166,14 +1233,14 @@
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertLast(newParam, null);
 
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 0 thrown exceptions", thrownExceptions.size() == 0);
 
-			Name newThrownException1= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException1, null);
+			ASTNode newThrownException1= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException1, null);
 
-			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
+			ASTNode newThrownException2= createNewExceptionType(ast, "ArrayStoreException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException2, null);
 
 		}
 		{ // delete first 2, replace last and insert after & replace first exception and insert before
@@ -1191,14 +1258,14 @@
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertLast(newParam2, null);
 
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 1 thrown exceptions", thrownExceptions.size() == 1);
 
-			Name modifiedThrownException= ast.newSimpleName("InterruptedException");
+			ASTNode modifiedThrownException= createNewExceptionType(ast, "InterruptedException");
 			rewrite.replace((ASTNode) thrownExceptions.get(0), modifiedThrownException, null);
 
-			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
+			ASTNode newThrownException2= createNewExceptionType(ast, "ArrayStoreException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException2, null);
 
 		}
 		{ // delete first 2, replace last and insert at first & remove first and insert before
@@ -1215,13 +1282,13 @@
 			SingleVariableDeclaration newParam2= createNewParam(ast, "m2");
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertFirst(newParam2, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 1 thrown exceptions", thrownExceptions.size() == 1);
 
 			rewrite.remove((ASTNode) thrownExceptions.get(0), null);
 
-			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
+			ASTNode newThrownException2= createNewExceptionType(ast, "ArrayStoreException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException2, null);
 		}
 
 
@@ -1269,14 +1336,14 @@
 			SingleVariableDeclaration newParam= createNewParam(ast, "m");
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertLast(newParam, null);
 
-			List thrownExceptions= methodDecl.thrownExceptions();
+			List thrownExceptions= getThrownExceptions(methodDecl);
 			assertTrue("must be 0 thrown exceptions", thrownExceptions.size() == 0);
 
-			Name newThrownException1= ast.newSimpleName("InterruptedException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException1, null);
+			ASTNode newThrownException1= createNewExceptionType(ast, "InterruptedException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException1, null);
 
-			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
+			ASTNode newThrownException2= createNewExceptionType(ast, "ArrayStoreException");
+			rewrite.getListRewrite(methodDecl, getMethodThrownExceptionsProperty(ast)).insertLast(newThrownException2, null);
 
 
 		}
@@ -1383,7 +1450,7 @@
 
 			// change flags
 			int newModifiers= Modifier.PUBLIC | Modifier.ABSTRACT;
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			setModifiers(rewrite, methodDecl, newModifiers);
 
 			Block body= methodDecl.getBody();
 			assertTrue("No body: gee", body != null);
@@ -1395,7 +1462,7 @@
 
 			// change flags
 			int newModifiers= Modifier.PRIVATE;
-			rewrite.set(methodDecl, MethodDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			setModifiers(rewrite, methodDecl, newModifiers);
 
 
 			Block body= methodDecl.getBody();
@@ -1424,7 +1491,7 @@
 
 	}
 
-	public void testMethodDeclarationExtraDimensions() throws Exception {
+	public void testMethodDeclarationExtraDimensions_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1447,34 +1514,34 @@
 		{ // add extra dim, add throws
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo1");
 
-			rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
 
 			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
+			rewrite.getListRewrite(methodDecl, INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
 
 		}
 		{ // add extra dim, remove throws
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo2");
 
-			rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
 
-			rewrite.remove((ASTNode) methodDecl.thrownExceptions().get(0), null);
+			rewrite.remove((ASTNode) getThrownExceptions(methodDecl).get(0), null);
 		}
 		{ // remove extra dim, add throws
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo3");
 
-			rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
 
 			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
+			rewrite.getListRewrite(methodDecl, INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
 
 		}
 		{ // add extra dim, remove throws
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo4");
 
-			rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
 
-			rewrite.remove((ASTNode) methodDecl.thrownExceptions().get(0), null);
+			rewrite.remove((ASTNode) getThrownExceptions(methodDecl).get(0), null);
 		}
 		{ // add params, add extra dim, add throws
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo5");
@@ -1483,10 +1550,10 @@
 			rewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY).insertLast(newParam1, null);
 
 
-			rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(4), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, new Integer(4), null);
 
 			Name newThrownException2= ast.newSimpleName("ArrayStoreException");
-			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
+			rewrite.getListRewrite(methodDecl, INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY).insertLast(newThrownException2, null);
 
 		}
 		{ // remove params, add extra dim, remove throws
@@ -1494,9 +1561,9 @@
 
 			rewrite.remove((ASTNode) methodDecl.parameters().get(0), null);
 
-			rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(4), null);
+			rewrite.set(methodDecl, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, new Integer(4), null);
 
-			rewrite.remove((ASTNode) methodDecl.thrownExceptions().get(0), null);
+			rewrite.remove((ASTNode) getThrownExceptions(methodDecl).get(0), null);
 		}
 		{ // remove block
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo7");
@@ -1520,7 +1587,7 @@
 
 	}
 
-	public void testModifiersAST3() throws Exception {
+	public void testModifiersAST3_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1542,7 +1609,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
@@ -1641,7 +1708,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testModifiersAST3WithAnnotations() throws Exception {
+	public void testModifiersAST3WithAnnotations_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1659,7 +1726,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
@@ -1706,7 +1773,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testModifiersAST3WithAnnotations2() throws Exception {
+	public void testModifiersAST3WithAnnotations2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1718,7 +1785,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
@@ -1766,7 +1833,7 @@
 
 
 
-	public void testFieldDeclaration() throws Exception {
+	public void testFieldDeclaration_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1792,7 +1859,7 @@
 
 			// add modifier
 			int newModifiers= Modifier.FINAL;
-			rewrite.set(decl, FieldDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_FIELD_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			PrimitiveType newType= ast.newPrimitiveType(PrimitiveType.BOOLEAN);
 			rewrite.replace(decl.getType(), newType, null);
@@ -1809,7 +1876,7 @@
 
 			// add modifier
 			int newModifiers= Modifier.FINAL | Modifier.STATIC | Modifier.TRANSIENT;
-			rewrite.set(decl, FieldDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_FIELD_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			List fragments= decl.fragments();
 			assertTrue("Number of fragments not 3", fragments.size() == 3);
@@ -1828,7 +1895,7 @@
 
 			// change modifier
 			int newModifiers= 0;
-			rewrite.set(decl, FieldDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_FIELD_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 		}
 
 		String preview= evaluateRewrite(cu, rewrite);
@@ -1845,7 +1912,7 @@
 
 	}
 
-	public void testInitializer() throws Exception {
+	public void testInitializer_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1873,7 +1940,7 @@
 
 			// add modifier
 			int newModifiers= Modifier.STATIC;
-			rewrite.set(initializer, Initializer.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(initializer, INTERNAL_INITIALIZER_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 
 			Block block= ast.newBlock();
@@ -1885,7 +1952,7 @@
 			Initializer initializer= (Initializer) declarations.get(1);
 
 			int newModifiers= 0;
-			rewrite.set(initializer, Initializer.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(initializer, INTERNAL_INITIALIZER_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 		}
 
@@ -2006,7 +2073,7 @@
 			MethodDeclaration methodDecl= findMethodDeclaration(type, "DD");
 
 			rewrite.set(methodDecl, MethodDeclaration.CONSTRUCTOR_PROPERTY, Boolean.TRUE, null);
-			rewrite.set(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(0), null);
+			setExtraDimensions(rewrite, methodDecl, 0);
 		}
 
 		String preview= evaluateRewrite(cu, rewrite);
@@ -2294,7 +2361,7 @@
 	}
 
 	/** @deprecated using deprecated code */
-	public void testInsertFieldAfter() throws Exception {
+	public void testInsertFieldAfter_only_2() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2344,7 +2411,7 @@
 	}
 
 
-	public void testVarArgs() throws Exception {
+	public void testVarArgs_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2357,7 +2424,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		TypeDeclaration type= findTypeDeclaration(astRoot, "DD");
@@ -2384,9 +2451,23 @@
 		buf.append("    }\n");
 		buf.append("}\n");
 		assertEqualString(preview, buf.toString());
+		
+		this.project1.setOption(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ELLIPSIS, JavaCore.INSERT);
+		
+		preview= evaluateRewrite(cu, rewrite);
+
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class DD {\n");
+		buf.append("    private void foo1(String format, Object args){\n");
+		buf.append("    }\n");
+		buf.append("    private void foo2(String format, int ... args) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
 	}
 
-	public void testAnnotationTypeMember() throws Exception {
+	public void testAnnotationTypeMember_since_4() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2398,7 +2479,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AnnotationTypeDeclaration type= (AnnotationTypeDeclaration) findAbstractTypeDeclaration(astRoot, "DD");
@@ -2432,7 +2513,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumConstantDeclaration1() throws Exception {
+	public void testEnumConstantDeclaration1_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -2442,7 +2523,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		EnumDeclaration type= (EnumDeclaration) findAbstractTypeDeclaration(astRoot, "DD");
@@ -2478,7 +2559,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumConstantDeclaration2() throws Exception {
+	public void testEnumConstantDeclaration2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -2510,7 +2591,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		EnumDeclaration type= (EnumDeclaration) findAbstractTypeDeclaration(astRoot, "DD");
@@ -2639,7 +2720,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumConstantDeclaration_bug114119() throws Exception {
+	public void testEnumConstantDeclaration_bug114119_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -2648,7 +2729,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		EnumDeclaration type= (EnumDeclaration) findAbstractTypeDeclaration(astRoot, "DD");
 		{
@@ -2669,6 +2750,166 @@
 		assertEqualString(preview, buf.toString());
 	}
 
+	public void testVarArgsAnnotations_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("@interface Marker {\n");
+		buf.append("}\n");
+		buf.append("public class DD {\n");
+		buf.append("    public void foo1(String format, Object @Marker... args){\n");
+		buf.append("    }\n");
+		buf.append("    public void foo2(Object... args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo3(Object @Marker ... args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo4(Object @Marker... args) {\n"); 
+		buf.append("    }\n");
+		buf.append("    public void foo5(Object... args) {\n"); 
+		buf.append("    }\n");
+		buf.append("    public void foo6(Object args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo7(Object @Marker... args) {\n");
+		buf.append("    }\n");		
+		buf.append("    public void foo8(Object @Marker... args) {\n");
+		buf.append("    }\n");		
+		buf.append("    public void foo9(@B @C int @A... a) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo10(Object args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo11(Object @Marker... args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo12(Object... args) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("DD.java", buf.toString(), false, null);
+		
+		CompilationUnit astRoot= createAST(cu, false);
+		AST ast= astRoot.getAST();
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		TypeDeclaration type= findTypeDeclaration(astRoot, "DD");
+		
+		{
+			// Remove annotation from first method args - boundary condition -
+			// - only one annotation should be present.
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo1");
+			SingleVariableDeclaration param = (SingleVariableDeclaration) methodDecl.parameters().get(1);
+			rewrite.remove((ASTNode)param.varargsAnnotations().get(0), null);
+			
+			// Add one annotation to the second method - boundary condition 
+			// - no annotation should be present
+			methodDecl= findMethodDeclaration(type, "foo2");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("X"));
+			ListRewrite listRewrite= rewrite.getListRewrite(param, SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY);
+			listRewrite.insertFirst(markerAnnotation, null);
+			
+			// Remove the varargs property - annotation(s) should disappear
+			methodDecl= findMethodDeclaration(type, "foo3");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.FALSE, null);
+			
+			// Remove the varargs property - annotation(s) should disappear
+			// - differs from the above due to the absence of a blank before ...
+			methodDecl= findMethodDeclaration(type, "foo4");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.FALSE, null);
+			
+			// Remove the varargs property - Existing functionality unchanged without annotations
+			methodDecl= findMethodDeclaration(type, "foo5");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.FALSE, null);
+			
+			// Add the varargs property  and annotation
+			methodDecl= findMethodDeclaration(type, "foo6");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.TRUE, null);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("X"));
+			listRewrite= rewrite.getListRewrite(param, SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY);
+			listRewrite.insertFirst(markerAnnotation, null);
+			
+			// Replace annotation
+			methodDecl= findMethodDeclaration(type, "foo7");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("X"));
+			rewrite.replace((ASTNode)param.varargsAnnotations().get(0), markerAnnotation, null);
+			
+			// Reset and Set Varargs - output should not change.
+			methodDecl= findMethodDeclaration(type, "foo8");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.FALSE, null);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.TRUE, null);
+			
+			// Add multiple (two) annotations, remove an existing annotation
+			methodDecl= findMethodDeclaration(type, "foo9");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			NormalAnnotation normalAnnotation = ast.newNormalAnnotation();
+			normalAnnotation.setTypeName(ast.newSimpleName("X"));
+			listRewrite= rewrite.getListRewrite(param, SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY);
+			listRewrite.insertFirst(normalAnnotation, null);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Y"));
+			listRewrite.insertFirst(markerAnnotation, null);
+			rewrite.remove((ASTNode)param.varargsAnnotations().get(0), null);
+			
+			// Add the varargs property
+			methodDecl= findMethodDeclaration(type, "foo10");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.TRUE, null);
+			
+			// Remove the annotations and varargs property as well.
+			methodDecl= findMethodDeclaration(type, "foo11");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.remove((ASTNode)param.varargsAnnotations().get(0), null);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.FALSE, null);
+			
+			// Add an annotation but remove the varargs property - should not add the annotation.
+			methodDecl= findMethodDeclaration(type, "foo12");
+			param = (SingleVariableDeclaration) methodDecl.parameters().get(0);
+			rewrite.set(param, SingleVariableDeclaration.VARARGS_PROPERTY, Boolean.FALSE, null);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("X"));
+			listRewrite= rewrite.getListRewrite(param, SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY);
+			listRewrite.insertFirst(markerAnnotation, null);
+		}
+		
+		String preview= evaluateRewrite(cu, rewrite);
+		
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("@interface Marker {\n");
+		buf.append("}\n");
+		buf.append("public class DD {\n");
+		buf.append("    public void foo1(String format, Object... args){\n");
+		buf.append("    }\n");
+		buf.append("    public void foo2(Object @X... args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo3(Object args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo4(Object args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo5(Object args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo6(Object @X... args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo7(Object @X... args) {\n");
+		buf.append("    }\n");		
+		buf.append("    public void foo8(Object @Marker... args) {\n");
+		buf.append("    }\n");		
+		buf.append("    public void foo9(@B @C int @Y @X()... a) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo10(Object... args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo11(Object args) {\n");
+		buf.append("    }\n");
+		buf.append("    public void foo12(Object args) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());	
+	}
 
 	public void testMethodDeclChangesBug77538() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -2721,7 +2962,7 @@
 		assertFalse("Invalid extended length for "+body, astRoot.getExtendedLength(body)<0);
 	}
 
-	public void testAnnotations() throws Exception {
+	public void testAnnotations_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -2734,7 +2975,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
@@ -2813,7 +3054,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testParameterAnnotations() throws Exception {
+	public void testParameterAnnotations_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -2823,7 +3064,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		MethodDeclaration methodDecl= (MethodDeclaration) findTypeDeclaration(astRoot, "E").bodyDeclarations().get(0);
@@ -2869,7 +3110,642 @@
 		buf.append("    }\n");
 		buf.append("}\n");
 		assertEqualString(preview, buf.toString());
+		
+		this.project1.setOption(DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER, JavaCore.INSERT);
+		
+		preview= evaluateRewrite(cu, rewrite);
+		
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class E {\n");
+		buf.append("    public void foo(@X\n    @A int a, @B2 int b, @X\n    int c, @X int d) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	public void testExtraDimwithAnnotations_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public abstract class E {\n");
+		buf.append("    public Object foo1()[] throws ArrayStoreException { return null; }\n");
+		buf.append("    public Object foo2()[] { return null; }\n");
+		buf.append("    public Object foo3() @Annot1 [] @Annot2 [] { return null; }\n");
+		buf.append("    public Object foo4()@Annot1 [] @Annot2 [] throws IllegalArgumentException { return null; }\n");
+		buf.append("    public Object foo5() @Annot1 []   @Annot2 [] { return null; }\n");
+		buf.append("    public Object foo6(int i)  @Annot1 [] @Annot2 [] throws IllegalArgumentException { return null; }\n");
+		buf.append("    public Object foo7(int i) @Annot1 []  @Annot2 [] { return null; }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n"); 
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
+
+		{
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo1");
+
+			ListRewrite listRewrite= rewrite.getListRewrite(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+			Dimension dim= ast.newDimension();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			dim.annotations().add(markerAnnotation);
+			listRewrite.insertAt(dim, 1, null);
+
+			dim= ast.newDimension();
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			dim.annotations().add(markerAnnotation);
+			listRewrite.insertAt(dim, 2, null);
+			
+			ASTNode exception = (ASTNode) methodDecl.thrownExceptionTypes().get(0);
+			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY).remove(exception, null);
+		}
+		{
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo2");
+			ListRewrite listRewrite= rewrite.getListRewrite(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+
+			Dimension dim= ast.newDimension();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			dim.annotations().add(markerAnnotation);
+
+			listRewrite.insertAt(dim, 1, null);
+			
+			Type exception= ast.newSimpleType(ast.newSimpleName("ArrayStoreException"));
+			rewrite.getListRewrite(methodDecl, MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY).insertFirst(exception, null);
+		}
+		{
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo3");
+			ListRewrite listRewrite= rewrite.getListRewrite(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+
+			Dimension dim= ast.newDimension();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			dim.annotations().add(markerAnnotation);
+
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			dim.annotations().add(markerAnnotation);
+			listRewrite.insertAt(dim, 1, null);
+		}
+		{
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo4");
+			Dimension dim= (Dimension) methodDecl.extraDimensions().get(0);
+			ListRewrite listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			listRewrite.insertAt(markerAnnotation, 0, null);
+
+			dim= (Dimension) methodDecl.extraDimensions().get(1);
+			listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			listRewrite.insertAt(markerAnnotation, 1, null);
+		}
+		{
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo5");
+			Dimension dim= (Dimension) methodDecl.extraDimensions().get(0);
+			Annotation annot= (Annotation) dim.annotations().get(0);
+			ListRewrite listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.remove(annot, null);
+
+			dim= (Dimension) methodDecl.extraDimensions().get(1);
+			listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.insertAt(annot, 1, null);
+		}
+		{
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo6");
+			Dimension dim= (Dimension) methodDecl.extraDimensions().get(0);
+			Annotation annot= (Annotation) dim.annotations().get(0);
+			ListRewrite listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.remove(annot, null);
+
+			dim= (Dimension) methodDecl.extraDimensions().get(1);
+			annot= (Annotation) dim.annotations().get(0);
+			listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.remove(annot, null);
+		}
+		{
+			MethodDeclaration methodDecl= findMethodDeclaration(type, "foo7");
+			ListRewrite listRewrite= rewrite.getListRewrite(methodDecl, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+			Dimension dim= (Dimension) methodDecl.extraDimensions().get(0);
+			listRewrite.remove(dim, null);
+			dim= (Dimension) methodDecl.extraDimensions().get(1);
+			listRewrite.remove(dim, null);
+		}
+
+		String preview= evaluateRewrite(cu, rewrite);
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public abstract class E {\n");
+		buf.append("    public Object foo1()[] @Annot1 [] @Annot2 [] { return null; }\n");
+		buf.append("    public Object foo2()[] @Annot1 [] throws ArrayStoreException { return null; }\n");
+		buf.append("    public Object foo3() @Annot1 [] @Annot1 @Annot2 [] @Annot2 [] { return null; }\n");
+		buf.append("    public Object foo4()@Annot2 @Annot1 [] @Annot2 @Annot1 [] throws IllegalArgumentException { return null; }\n");
+		buf.append("    public Object foo5()  []   @Annot2 @Annot1 [] { return null; }\n");
+		buf.append("    public Object foo6(int i)   []  [] throws IllegalArgumentException { return null; }\n");
+		buf.append("    public Object foo7(int i) { return null; }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n"); 
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	public void testReceiver1_since_8() throws Exception {
+		IPackageFragment pack1 = this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class X {\n");
+		buf.append("    public void foo(@A @B @C X this, int i, int j) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot = createAST(cu);
+		ASTRewrite rewrite = ASTRewrite.create(astRoot.getAST());
+		AST ast = astRoot.getAST();
+		MethodDeclaration method = (MethodDeclaration) findTypeDeclaration(astRoot, "X").bodyDeclarations().get(0);
+		Type receiverType = method.getReceiverType();
+		assertEquals("Invalid receiver type", ASTNode.SIMPLE_TYPE, receiverType.getNodeType());
+		MarkerAnnotation annot = ast.newMarkerAnnotation();
+		annot.setTypeName(ast.newSimpleName("Marker"));
+		ListRewrite listRewrite = rewrite.getListRewrite(receiverType, SimpleType.ANNOTATIONS_PROPERTY);
+		listRewrite.insertFirst(annot, null);
+
+		String preview = evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class X {\n");
+		buf.append("    public void foo(@Marker @A @B @C X this, int i, int j) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	public void testReceiver2_since_8() throws Exception {
+		IPackageFragment pack1 = this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class X {\n");
+		buf.append("	class Y {\n");
+		buf.append("    	public Y(@A X this, int i, @B boolean b, @A int j) {\n");
+		buf.append("    	}\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cu = pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot = createAST(cu);
+		ASTRewrite rewrite = ASTRewrite.create(astRoot.getAST());
+		AST ast = astRoot.getAST();
+		TypeDeclaration type = (TypeDeclaration) findTypeDeclaration(astRoot, "X").bodyDeclarations().get(0);
+		MethodDeclaration method = (MethodDeclaration) type.bodyDeclarations().get(0);
+		List params = method.parameters();
+
+		SingleVariableDeclaration first = (SingleVariableDeclaration) params.get(0);
+		SingleVariableDeclaration second = (SingleVariableDeclaration) params.get(1);
+		SingleVariableDeclaration third = (SingleVariableDeclaration) params.get(2);
+		rewrite.replace(first.getName(), ast.newSimpleName("i"), null);
+		rewrite.replace(second.getName(), ast.newSimpleName("b"), null);
+
+		ASTNode copy1 = rewrite.createCopyTarget(first);
+		ASTNode copy2 = rewrite.createCopyTarget(second);
+
+		rewrite.replace(first, copy2, null);
+		rewrite.replace(second, copy1, null);
+		rewrite.remove(third, null);
+
+		String preview = evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class X {\n");
+		buf.append("	class Y {\n");
+		buf.append("    	public Y(@A X this, @B boolean b, int i) {\n");
+		buf.append("    	}\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	public void testReceiver3_since_8() throws Exception {
+		IPackageFragment pack1 = this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class X {\n");
+		buf.append("    public void foo(X this) {}\n");
+		buf.append("    public void foo() {}\n");
+		buf.append("    public void foo(X this,/*comment*/ int i) {}\n");
+		buf.append("    public void foo(int i, int j) {}\n");
+		buf.append("    public void foo(X this) {}\n");
+		buf.append("    public void foo(X this, float f1, float f2) {}\n");
+		buf.append("    public void foo(X this, int i) {}\n");
+		buf.append("    public void foo(X this, float f) {}\n");
+		buf.append("    public void foo1(X this, float f) {}\n");
+		buf.append("}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot = createAST(cu);
+		AST ast = astRoot.getAST();
+		ASTRewrite rewrite = ASTRewrite.create(astRoot.getAST());
+		TypeDeclaration type = findTypeDeclaration(astRoot, "X");
+		MethodDeclaration method1 = (MethodDeclaration) type.bodyDeclarations().get(0);
+		MethodDeclaration method2 = (MethodDeclaration) type.bodyDeclarations().get(1);
+		MethodDeclaration method3 = (MethodDeclaration) type.bodyDeclarations().get(2);
+		MethodDeclaration method4 = (MethodDeclaration) type.bodyDeclarations().get(3);
+		MethodDeclaration method5 = (MethodDeclaration) type.bodyDeclarations().get(4);
+		MethodDeclaration method6 = (MethodDeclaration) type.bodyDeclarations().get(5);
+		MethodDeclaration method7 = (MethodDeclaration) type.bodyDeclarations().get(6);
+		MethodDeclaration method8 = (MethodDeclaration) type.bodyDeclarations().get(7);
+		MethodDeclaration method9 = (MethodDeclaration) type.bodyDeclarations().get(8);
+
+		SimpleType receiver1 = (SimpleType) method1.getReceiverType();
+		SimpleType receiver3 = (SimpleType) method3.getReceiverType();
+		SimpleType receiver5 = (SimpleType) method5.getReceiverType();
+		SimpleType receiver6 = (SimpleType) method6.getReceiverType();
+		SimpleType receiver8 = (SimpleType) method8.getReceiverType();
+		SimpleType receiver9 = (SimpleType) method9.getReceiverType();
+
+		SimpleType receiverCopy = (SimpleType) rewrite.createCopyTarget(receiver1);
+		rewrite.set(method2, MethodDeclaration.RECEIVER_TYPE_PROPERTY, receiverCopy, null);
+		rewrite.remove(receiver1, null);
+
+		receiverCopy = (SimpleType) rewrite.createCopyTarget(receiver3);
+		rewrite.set(method4, MethodDeclaration.RECEIVER_TYPE_PROPERTY, receiverCopy, null);
+		rewrite.remove(receiver3, null);
+
+		ListRewrite listRewrite = rewrite.getListRewrite(method3, MethodDeclaration.MODIFIERS2_PROPERTY);
+		listRewrite.insertLast(ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD), null);
+
+		receiverCopy = ast.newSimpleType(ast.newSimpleName("XY"));
+		rewrite.replace(receiver5, receiverCopy, null);
+
+		receiverCopy = ast.newSimpleType(ast.newSimpleName("XY"));
+		rewrite.replace(receiver6, receiverCopy, null);
+		SingleVariableDeclaration paramCopy = (SingleVariableDeclaration) rewrite.createCopyTarget((SingleVariableDeclaration) method6.parameters().get(0));
+		rewrite.remove((SingleVariableDeclaration) method6.parameters().get(0), null);
+
+		listRewrite = rewrite.getListRewrite(method7, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.insertLast(paramCopy, null);
+
+		rewrite.remove(receiver8, null);
+		rewrite.remove((SingleVariableDeclaration) method8.parameters().get(0), null);
+
+		rewrite.remove(receiver9, null);
+		rewrite.remove((SingleVariableDeclaration) method9.parameters().get(0), null);
+
+		String preview = evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class X {\n");
+		buf.append("    public void foo() {}\n");
+		buf.append("    public void foo(X this) {}\n");
+		buf.append("    public final void foo(/*comment*/ int i) {}\n");
+		buf.append("    public void foo(X this, int i, int j) {}\n");
+		buf.append("    public void foo(XY this) {}\n");
+		buf.append("    public void foo(XY this, float f2) {}\n");
+		buf.append("    public void foo(X this, int i, float f1) {}\n");
+		buf.append("    public void foo() {}\n");
+		buf.append("    public void foo1() {}\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	public void _testReceiver4_since_8() throws Exception {
+		IPackageFragment pack1 = this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class XYZ {\n");
+		buf.append("	class Y {\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B int i) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B int i, @C int j) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B float e) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B float e, @C float f) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B int i, @C float f) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B float f, @C int i) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B boolean b1) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B boolean b2, @C int i) {}\n");
+		buf.append("    	public Y(@B boolean b, @C float f) {}\n");
+		buf.append("    	public Y(@B boolean b, @C boolean c) {}\n");
+		buf.append("    	public Y(@B boolean b, String str) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B int i, @C int j, @D int k) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this) {}\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cu = pack1.createCompilationUnit("XYZ.java", buf.toString(), false, null);
+		CompilationUnit astRoot = createAST(cu);
+		ASTRewrite rewrite = ASTRewrite.create(astRoot.getAST());
+		AST ast = astRoot.getAST();
+		TypeDeclaration type = (TypeDeclaration) findTypeDeclaration(astRoot, "XYZ").bodyDeclarations().get(0);
+		MethodDeclaration method1 = (MethodDeclaration) type.bodyDeclarations().get(0); // Remove the receiver type and qualifying name
+		MethodDeclaration method2 = (MethodDeclaration) type.bodyDeclarations().get(1); // Remove the receiver but not the qualifier
+		MethodDeclaration method3 = (MethodDeclaration) type.bodyDeclarations().get(2); // Remove the qualifier only 
+		MethodDeclaration method4 = (MethodDeclaration) type.bodyDeclarations().get(3); // Remove the qualifier and receiver annotation
+		MethodDeclaration method5 = (MethodDeclaration) type.bodyDeclarations().get(4); // Remove the receiver type and all parameters
+		MethodDeclaration method6 = (MethodDeclaration) type.bodyDeclarations().get(5); // Remove the receiver type and add a param
+		MethodDeclaration method7 = (MethodDeclaration) type.bodyDeclarations().get(6); // Remove the qualifier and remove a param
+		MethodDeclaration method8 = (MethodDeclaration) type.bodyDeclarations().get(7); // Remove the qualifier and replace a param
+		MethodDeclaration method9 = (MethodDeclaration) type.bodyDeclarations().get(8); // Add a receiver type and qualifier with annotation
+		MethodDeclaration method10 = (MethodDeclaration) type.bodyDeclarations().get(9); // Add a receiver type and qualifier with annotations and add one parameter
+		MethodDeclaration method11 = (MethodDeclaration) type.bodyDeclarations().get(10); // Add a receiver type with qualifier & annotations and remove all parameters
+		MethodDeclaration method12 = (MethodDeclaration) type.bodyDeclarations().get(11); // Keep the receiver type and qualifier, but alter parameters
+		MethodDeclaration method13 = (MethodDeclaration) type.bodyDeclarations().get(12); // Keep the receiver type and qualifier, but alter parameters
+
+		rewrite.set(method1, MethodDeclaration.RECEIVER_TYPE_PROPERTY, null, null);
+		rewrite.set(method1, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, null, null);
+		rewrite.set(method2, MethodDeclaration.RECEIVER_TYPE_PROPERTY, null, null);
+		rewrite.set(method3, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, null, null);
+
+		rewrite.set(method4, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, null, null);
+		ListRewrite listRewrite = rewrite.getListRewrite(method4.getReceiverType(), SimpleType.ANNOTATIONS_PROPERTY);
+		listRewrite.remove((ASTNode) ((AnnotatableType) method4.getReceiverType()).annotations().get(0), null);
+
+		rewrite.set(method5, MethodDeclaration.RECEIVER_TYPE_PROPERTY, null, null);
+		List params = method5.parameters();
+		SingleVariableDeclaration first = (SingleVariableDeclaration) params.get(0);
+		listRewrite = rewrite.getListRewrite(method5, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.remove(first, null);
+		first = (SingleVariableDeclaration) params.get(1);
+		listRewrite.remove(first, null);
+
+		rewrite.set(method6, MethodDeclaration.RECEIVER_TYPE_PROPERTY, null, null);
+		listRewrite = rewrite.getListRewrite(method6, MethodDeclaration.PARAMETERS_PROPERTY);
+		SingleVariableDeclaration paramCopy = ast.newSingleVariableDeclaration();
+		SimpleType typeCopy = ast.newSimpleType(ast.newSimpleName("Object"));
+		MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+		markerAnnotation.setTypeName(ast.newSimpleName("A"));
+		typeCopy.annotations().add(markerAnnotation);
+		paramCopy.setType(typeCopy);
+		paramCopy.setName(ast.newSimpleName("obj"));
+		listRewrite.insertFirst(paramCopy, null);
+
+		rewrite.set(method7, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, null, null);
+		params = method7.parameters();
+		first = (SingleVariableDeclaration) params.get(0);
+		listRewrite = rewrite.getListRewrite(method7, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.remove(first, null);
+		params = method8.parameters();
+		rewrite.set(method8, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, null, null);
+		listRewrite = rewrite.getListRewrite(method8, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.remove((SingleVariableDeclaration) params.get(0), null);
+		listRewrite.remove((SingleVariableDeclaration) params.get(1), null);
+		listRewrite.insertLast(paramCopy, null);
+
+		SimpleType receiverType = ast.newSimpleType(ast.newSimpleName("XYZ"));
+		SimpleName qual = ast.newSimpleName("XYZ");
+		markerAnnotation= ast.newMarkerAnnotation();
+		markerAnnotation.setTypeName(ast.newSimpleName("A"));
+		receiverType.annotations().add(markerAnnotation);
+
+		rewrite.set(method9, MethodDeclaration.RECEIVER_TYPE_PROPERTY, receiverType, null);
+		rewrite.set(method9, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, qual, null);
+
+		rewrite.set(method10, MethodDeclaration.RECEIVER_TYPE_PROPERTY, receiverType, null);
+		rewrite.set(method10, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, qual, null);
+		listRewrite = rewrite.getListRewrite(method10, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.insertFirst(paramCopy, null);
+
+		rewrite.set(method11, MethodDeclaration.RECEIVER_TYPE_PROPERTY, receiverType, null);
+		rewrite.set(method11, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, qual, null);
+		listRewrite = rewrite.getListRewrite(method11, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.remove((ASTNode) method11.parameters().get(0), null);
+		listRewrite.remove((ASTNode) method11.parameters().get(1), null);
+
+		listRewrite = rewrite.getListRewrite(method12, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.remove((ASTNode) method12.parameters().get(1), null);
+
+		listRewrite = rewrite.getListRewrite(method13, MethodDeclaration.PARAMETERS_PROPERTY);
+		listRewrite.insertFirst(paramCopy, null);
+
+		String preview = evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class XYZ {\n");
+		buf.append("	class Y {\n");
+		buf.append("    	public Y(@B int i) {}\n");
+		buf.append("    	public Y(@B int i, @C int j) {}\n");
+		buf.append("    	public Y(@A XYZ this, @B float e) {}\n");
+		buf.append("    	public Y(XYZ this, @B float e, @C float f) {}\n");
+		buf.append("    	public Y() {}\n");
+		buf.append("    	public Y(@A Object obj, @B float f, @C int i) {}\n");
+		buf.append("    	public Y(@A XYZ this) {}\n");
+		buf.append("    	public Y(@A XYZ this, @A Object obj) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B boolean b, @C float f) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @A Object obj, @B boolean b, @C boolean c) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B int i, @D int k) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @A Object obj) {}\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	public void testReceiver5_since_8() throws Exception {
+		IPackageFragment pack1 = this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class XYZ {\n");
+		buf.append("	class Y {\n");
+		buf.append("    	public Y(@A Y Y.this, @B int i) {}\n");
+		buf.append("    	public Y(@A XYZ this, @B int i, @C int j) {}\n");
+		buf.append("    	public Y(@A XYZ Y.this, @B float e) {}\n");
+		buf.append("    	public Y(@A XYZ Y.this, @B float e, @C float f) {}\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cu = pack1.createCompilationUnit("XYZ.java", buf.toString(), false, null);
+		CompilationUnit astRoot = createAST(cu);
+		ASTRewrite rewrite = ASTRewrite.create(astRoot.getAST());
+		AST ast = astRoot.getAST();
+		TypeDeclaration type = (TypeDeclaration) findTypeDeclaration(astRoot, "XYZ").bodyDeclarations().get(0);
+		MethodDeclaration method1 = (MethodDeclaration) type.bodyDeclarations().get(0); // Change receiver type's child/children
+		MethodDeclaration method2 = (MethodDeclaration) type.bodyDeclarations().get(1); // Insert receiver qualifier
+		MethodDeclaration method3 = (MethodDeclaration) type.bodyDeclarations().get(2); // Replace receiver qualifier
+		MethodDeclaration method4 = (MethodDeclaration) type.bodyDeclarations().get(3); // Change receiver qualifier's children
+
+		Name newName = ast.newSimpleName("XYZ");
+		rewrite.replace(((SimpleType) method1.getReceiverType()).getName(), newName, null);
+		rewrite.replace(method1.getReceiverQualifier(), newName, null);
+		rewrite.set(method2, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY, newName, null);
+		rewrite.replace(method3.getReceiverQualifier(), newName, null);
+		SimpleName qualifier = method4.getReceiverQualifier();
+		rewrite.set(qualifier, SimpleName.IDENTIFIER_PROPERTY, "XYZ", null);
+
+		String preview = evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("class XYZ {\n");
+		buf.append("	class Y {\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B int i) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B int i, @C int j) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B float e) {}\n");
+		buf.append("    	public Y(@A XYZ XYZ.this, @B float e, @C float f) {}\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=403985
+	public void testBug403985_since_8() throws Exception {
+		String contents =
+			"public interface X {\n" +
+			"	static void foo(){}\n" +
+			"	public default void foo(int i){}\n" +
+			"	public default int foo2(int i) { return 0;}\n" +
+			"	public void foo3(int i);\n" +
+			"	public default int foo4(int i) { return 0;}\n" +
+			"}\n";
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", contents, false, null);
+		CompilationUnit astRoot= createAST(cu);
+		AST ast = astRoot.getAST();
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration[] methods = type.getMethods();
+		assertEquals("Incorrect no of methods", 5, methods.length);
+		MethodDeclaration method = methods[0];
+		{	// Change default method to static and vice versa
+			ListRewrite listRewrite = rewrite.getListRewrite(method, MethodDeclaration.MODIFIERS2_PROPERTY);
+			ASTNode newMod = ast.newModifier(ModifierKeyword.DEFAULT_KEYWORD);
+			listRewrite.replace((ASTNode) method.modifiers().get(0), newMod, null);
+
+			method = methods[1];
+			listRewrite = rewrite.getListRewrite(method, MethodDeclaration.MODIFIERS2_PROPERTY);
+			newMod = ast.newModifier(ModifierKeyword.STATIC_KEYWORD);
+			listRewrite.replace((ASTNode) method.modifiers().get(1), newMod, null);
+		}
+		{	// Remove default and the body
+			method = methods[2];
+			ListRewrite listRewrite = rewrite.getListRewrite(method, MethodDeclaration.MODIFIERS2_PROPERTY);
+			listRewrite.remove((ASTNode) method.modifiers().get(1), null);
+			rewrite.set(method, MethodDeclaration.BODY_PROPERTY, null, null);
+		}
+		{	// Add a default and body
+			method = methods[3];
+			ListRewrite listRewrite = rewrite.getListRewrite(method, MethodDeclaration.MODIFIERS2_PROPERTY);
+			ASTNode newMod = ast.newModifier(ModifierKeyword.DEFAULT_KEYWORD);
+			listRewrite.insertAt(newMod, 1, null);
+			Block newBlock = ast.newBlock();
+			rewrite.set(method, MethodDeclaration.BODY_PROPERTY, newBlock, null);
+		}
+		{	// Alter parameters for a default method
+			method = methods[4];
+			ListRewrite listRewrite = rewrite.getListRewrite(method, MethodDeclaration.PARAMETERS_PROPERTY);
+			listRewrite.remove((ASTNode) method.parameters().get(0), null);
+			listRewrite = rewrite.getListRewrite(method, MethodDeclaration.MODIFIERS2_PROPERTY);
+			listRewrite.remove((ASTNode) method.modifiers().get(0), null);
+		}
+		String preview = evaluateRewrite(cu, rewrite);
+		contents =
+				"public interface X {\n" +
+				"	default void foo(){}\n" +
+				"	public static void foo(int i){}\n" +
+				"	public int foo2(int i);\n" +
+				"	public default void foo3(int i) {\n    }\n" +
+				"	default int foo4() { return 0;}\n" +
+				"}\n";
+		assertEqualString(preview, contents);
 	}
 
+	public void testReceiverParam_since_8() throws Exception {
+		IPackageFragment pack1 = this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public abstract class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    }\n");
+		buf.append("\n");
+		buf.append("}\n");
+		ICompilationUnit cu = pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
+		CompilationUnit astRoot = createAST(cu);
+		AST ast = astRoot.getAST();
+		ASTRewrite rewrite = ASTRewrite.create(astRoot.getAST());
+		TypeDeclaration type = findTypeDeclaration(astRoot, "E");
+
+		MethodDeclaration newMethodDeclaration = ast.newMethodDeclaration();
+		SimpleName methodName = ast.newSimpleName("bar");
+		SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("E"));
+		MarkerAnnotation annotationC = ast.newMarkerAnnotation();
+		annotationC.setTypeName(ast.newSimpleName("C"));
+		simpleType.annotations().add(annotationC);
+		newMethodDeclaration.setName(methodName);
+		newMethodDeclaration.setReceiverType(simpleType);
+
+		MethodDeclaration[] methods = type.getMethods();
+		MethodDeclaration methodDeclaration = methods[0];
+		methodDeclaration.setReceiverType(ast.newSimpleType(ast.newSimpleName("E")));
+
+		ListRewrite listRewrite = rewrite.getListRewrite(type, TypeDeclaration.BODY_DECLARATIONS_PROPERTY);
+		listRewrite.insertLast(newMethodDeclaration, null);
+
+		String preview = evaluateRewrite(cu, rewrite);
+
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public abstract class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    }\n");
+		buf.append("\n");
+		buf.append("    void bar(@C E this);\n");
+		buf.append("\n");
+		buf.append("}\n");
+
+		assertEqualString(preview, buf.toString());
+	}
+	
+	public void testReceiverParam_InnerClass_since_8() throws Exception {
+		IPackageFragment pack1 = this.sourceFolder.createPackageFragment(
+				"test1", false, null);
+		StringBuffer buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    }\n");
+		buf.append("\n");
+		buf.append("    class Inner{\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		ICompilationUnit cu = pack1.createCompilationUnit("E.java",
+				buf.toString(), false, null);
+
+		CompilationUnit astRoot = createAST(cu);
+		AST ast = astRoot.getAST();
+		ASTRewrite rewrite = ASTRewrite.create(astRoot.getAST());
+		TypeDeclaration type = findTypeDeclaration(astRoot, "E");
+		TypeDeclaration inner = (TypeDeclaration) type.bodyDeclarations().get(1);
+		
+		MethodDeclaration newMethodDeclaration = ast.newMethodDeclaration();
+		SimpleName methodName = ast.newSimpleName("Inner");
+		SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("E"));
+		MarkerAnnotation annotationC = ast.newMarkerAnnotation();
+		annotationC.setTypeName(ast.newSimpleName("C"));
+		simpleType.annotations().add(annotationC);
+		newMethodDeclaration.setName(methodName);
+		newMethodDeclaration.setConstructor(true);
+		newMethodDeclaration.setReceiverType(simpleType);
+		newMethodDeclaration.setReceiverQualifier(ast.newSimpleName("E"));
+		newMethodDeclaration.setBody(ast.newBlock());
+
+		ListRewrite listRewrite = rewrite.getListRewrite(inner, TypeDeclaration.BODY_DECLARATIONS_PROPERTY);
+		listRewrite.insertLast(newMethodDeclaration, null);
+
+		String preview = evaluateRewrite(cu, rewrite);
+
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    }\n");
+		buf.append("\n");
+		buf.append("    class Inner{\n");
+		buf.append("\n");
+		buf.append("        Inner(@C E E.this) {\n");
+		buf.append("        }\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+
+		assertEqualString(preview, buf.toString());
+	}
+	
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java
index ed8fa35..71f6f01 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingMoveCodeTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -13,38 +17,46 @@
 import java.util.List;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
-
-import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.CastExpression;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
+import org.eclipse.jdt.core.dom.ForStatement;
+import org.eclipse.jdt.core.dom.IfStatement;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.ParenthesizedExpression;
+import org.eclipse.jdt.core.dom.PrefixExpression;
+import org.eclipse.jdt.core.dom.ReturnStatement;
+import org.eclipse.jdt.core.dom.Statement;
+import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
 public class ASTRewritingMoveCodeTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingMoveCodeTest.class;
-
 	public ASTRewritingMoveCodeTest(String name) {
 		super(name);
 	}
-
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingMoveCodeTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingMoveCodeTest.class);
 	}
 
-	public void testMove() throws Exception {
+	public void testMove_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -299,7 +311,7 @@
 	}
 
 
-	public void testMoveDeclDifferentLevelCD() throws Exception {
+	public void testMoveDeclDifferentLevelCD_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -419,7 +431,7 @@
 
 	}
 
-	public void testMoveDeclDifferentLevel() throws Exception {
+	public void testMoveDeclDifferentLevel_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1857,7 +1869,7 @@
 
 	}
 
-	public void testNestedCopies() throws Exception {
+	public void testNestedCopies_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 
 		StringBuffer buf= new StringBuffer();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingPackageDeclTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingPackageDeclTest.java
index 32b4339..1e847e5 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingPackageDeclTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingPackageDeclTest.java
@@ -1,17 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
+ * Copyright (c) 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.rewrite.describing;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
@@ -21,35 +24,27 @@
 
 public class ASTRewritingPackageDeclTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingPackageDeclTest.class;
-
 	public ASTRewritingPackageDeclTest(String name) {
 		super(name);
 	}
-
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingPackageDeclTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingPackageDeclTest.class);
 	}
+
 	/**
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=328400
 	 */
-	public void testAnnotations() throws Exception {
+	public void testAnnotations_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("package-info.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		{ // insert annotation first
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingReferenceExpressionTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingReferenceExpressionTest.java
new file mode 100644
index 0000000..a6213b3
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingReferenceExpressionTest.java
@@ -0,0 +1,619 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.rewrite.describing;
+
+import java.util.Iterator;
+
+import junit.framework.Test;
+
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IPackageFragment;
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+
+public class ASTRewritingReferenceExpressionTest extends ASTRewritingTest {
+
+	public ASTRewritingReferenceExpressionTest(String name) {
+		super(name);
+	}
+
+	public ASTRewritingReferenceExpressionTest(String name, int apiLevel) {
+		super(name, apiLevel);
+	}
+
+	public static Test suite() {
+		return createSuite(ASTRewritingReferenceExpressionTest.class);
+	}
+
+	/**
+	 * tests various aspects of CreationReference (Constructor Method Reference) with ClassType as lhs
+	 * @throws Exception
+	 */
+	public void testReferenceExpressions_test001_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test407131", false, null);
+		String contents = "package test407131;\n" +
+				"\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	static class Z {\n" +
+				"		public Z(int x) {\n" +
+				"			System.out.print(x);\n" +
+				"		}\n" +
+				"		public void foo(int x) {\n" +
+				"			System.out.print(x);\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n" +
+				"class W<T> {\n" +
+				"	public W(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		J j1 = W <Integer> :: <String> new;\n" +
+				"		J j2 = W <Integer> :: <String> new ;\n" +
+				"		J j3 = W <Integer> :: <String, Integer> new ;\n" +
+				"		J j4 = W <Integer> :: <String> new ;\n" +
+				"		J j5 = W <Integer> :: <String> new ;\n" +
+				"		J j6 = W <Integer> :: new;\n" +
+				"		J j7 = W <Integer> :: new;\n" +
+				"		J j8 = W <Integer> :: new;\n" +
+				"	}\n" +
+				"}\n" +
+				"\n" ;
+		StringBuffer buf= new StringBuffer(contents);
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "X");
+
+		MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "main");
+		{
+			// case 1: replace the type argument.
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(0);
+			VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			CreationReference creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			TypeParameter typeParameter= ast.newTypeParameter();
+			typeParameter.setName(ast.newSimpleName("Integer"));			
+			ListRewrite listRewrite = rewrite.getListRewrite(creationReference, CreationReference.TYPE_ARGUMENTS_PROPERTY);
+			listRewrite.replace((ASTNode)(creationReference.typeArguments().get(0)), typeParameter, null);
+			
+			// case 2: add a type argument.
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(1);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("Integer"));
+			listRewrite = rewrite.getListRewrite(creationReference, CreationReference.TYPE_ARGUMENTS_PROPERTY);
+			listRewrite.insertLast(simpleType, null);
+			
+			// case 3: delete a type argument.
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(2);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			listRewrite = rewrite.getListRewrite(creationReference, CreationReference.TYPE_ARGUMENTS_PROPERTY);
+			listRewrite.remove((ASTNode)(creationReference.typeArguments().get(1)), null);
+
+			// case 4: do not change existing type arg - implicit test case.
+			// case 5: delete the only type argument.
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(4);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			listRewrite = rewrite.getListRewrite(creationReference, CreationReference.TYPE_ARGUMENTS_PROPERTY);
+			for (Iterator iter= listRewrite.getOriginalList().iterator(); iter.hasNext(); ) {//loop added for general case - iterates once here.
+				ASTNode typeArgument= (ASTNode) iter.next();
+				listRewrite.remove(typeArgument, null);
+			}
+
+			// case 6: do not change a CreationReference originally having no type arguments - implicit test case.
+			// case 7: Insert a type argument for a CreationReference originally having no type arguments.
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(6);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			listRewrite = rewrite.getListRewrite(creationReference, CreationReference.TYPE_ARGUMENTS_PROPERTY);
+			simpleType = ast.newSimpleType(ast.newSimpleName("String"));
+			listRewrite.insertFirst(simpleType, null);
+
+			// case 8: change a CreationReference to a TypeMethodReference.
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(7);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			simpleType = ast.newSimpleType(ast.newQualifiedName(ast.newSimpleName("Y"), ast.newSimpleName("Z")));
+			rewrite.replace(creationReference.getType(), simpleType, null);
+		}
+		
+		String preview= evaluateRewrite(cu, rewrite);
+		contents = "package test407131;\n" +
+				"\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	static class Z {\n" +
+				"		public Z(int x) {\n" +
+				"			System.out.print(x);\n" +
+				"		}\n" +
+				"		public void foo(int x) {\n" +
+				"			System.out.print(x);\n" +
+				"		}\n" +
+				"	}\n" +
+				"}\n" +
+				"class W<T> {\n" +
+				"	public W(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		J j1 = W <Integer> :: <Integer> new;\n" +
+				"		J j2 = W <Integer> :: <String, Integer> new ;\n" +
+				"		J j3 = W <Integer> :: <String> new ;\n" +
+				"		J j4 = W <Integer> :: <String> new ;\n" +
+				"		J j5 = W <Integer> :: new ;\n" +
+				"		J j6 = W <Integer> :: new;\n" +
+				"		J j7 = W <Integer> ::<String> new;\n" +
+				"		J j8 = Y.Z :: new;\n" +
+				"	}\n" +
+				"}\n" +
+				"\n" ;
+		buf= new StringBuffer(contents);
+		assertEqualString(preview, buf.toString());
+	}
+	
+	/**
+	 * tests various aspects of CreationReference (Constructor Method Reference) with ArrayType as lhs
+	 * @throws Exception
+	 */
+	public void testReferenceExpressions_test002_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test407131", false, null);
+		String contents = "package test407131;\n" +
+				"interface I {\n" +
+				"	Object foo(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		I i1 = int[] :: new;\n" +
+				"	}\n" +
+				"}\n" +
+				"\n" ;
+		StringBuffer buf= new StringBuffer(contents);
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "X");
+
+		MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "main");
+		{
+			// replace the primitive type of lhs from int to char.
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(0);
+			VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			CreationReference creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			ArrayType arrayType = (ArrayType) creationReference.getType();
+			rewrite.replace(arrayType.getElementType(), ast.newPrimitiveType(PrimitiveType.CHAR), null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		contents = "package test407131;\n" +
+				"interface I {\n" +
+				"	Object foo(int x);\n" +
+				"}\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		I i1 = char[] :: new;\n" +
+				"	}\n" +
+				"}\n" +
+				"\n" ;
+		buf= new StringBuffer(contents);
+		assertEqualString(preview, buf.toString());
+	}
+	
+	/**
+	 * tests various aspects of {@link ExpressionMethodReference}
+	 * @throws Exception
+	 */
+	public void testReferenceExpressions_test003_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test407131", false, null);
+		String contents = "package test407131;\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	public void foo(int x) {}\n" +
+				"}\n" +
+				"class Z {\n" +
+				"	public void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		Y y = new Y();\n" +
+				"		Z z = new Z();\n" +
+				"		J j1 = y :: foo;\n" +
+				"		J j2 = z :: <String> bar;\n" +
+				"	}\n" +
+				"}\n" +
+				"\n" ;
+		StringBuffer buf= new StringBuffer(contents);
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "X");
+
+		MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "main");
+		{
+			// replace the lhs and the rhs.
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(2);
+			VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			ExpressionMethodReference expressionMethodReference = (ExpressionMethodReference) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType = ast.newSimpleType((ast.newSimpleName("String")));
+			rewrite.replace(expressionMethodReference.getExpression(), ast.newSimpleName("z"), null);
+			rewrite.getListRewrite(expressionMethodReference, ExpressionMethodReference.TYPE_ARGUMENTS_PROPERTY).insertFirst(simpleType, null);
+			rewrite.replace(expressionMethodReference.getName(), ast.newSimpleName("bar"), null);
+			
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(3);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			expressionMethodReference = (ExpressionMethodReference) variableDeclarationFragment.getInitializer();
+			rewrite.replace(expressionMethodReference.getExpression(), ast.newSimpleName("y"), null);
+			ASTNode typeArgument = (ASTNode) expressionMethodReference.typeArguments().get(0);
+			rewrite.getListRewrite(expressionMethodReference, ExpressionMethodReference.TYPE_ARGUMENTS_PROPERTY).remove(typeArgument, null);
+			rewrite.replace(expressionMethodReference.getName(), ast.newSimpleName("foo"), null);
+			
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		contents = "package test407131;\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	public void foo(int x) {}\n" +
+				"}\n" +
+				"class Z {\n" +
+				"	public void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		Y y = new Y();\n" +
+				"		Z z = new Z();\n" +
+				"		J j1 = z ::<String> bar;\n" +
+				"		J j2 = y :: foo;\n" +
+				"	}\n" +
+				"}\n" +
+				"\n" ;
+		buf= new StringBuffer(contents);
+		assertEqualString(preview, buf.toString());
+	}
+	
+	/**
+	 * tests various aspects of {@link TypeMethodReference}
+	 * @throws Exception
+	 */
+	public void testReferenceExpressions_test004_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test407131", false, null);
+		String contents = "package test407131;\n" +
+				"package test407131;\n" +
+				"\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	static class Z {\n" +
+				"		public Z(int x) {}\n" +
+				"		public static void foo(int x) {}\n" +
+				"	}\n" +
+				"}\n" +
+				"class W<T> {\n" +
+				"	public static void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		J j1 = Y.@Marker Z :: foo;\n" +
+				"		J j2 = @Marker W :: <Integer> bar;\n" +
+				"	}\n" +
+				"@Target (ElementType.TYPE_USE)\n" +
+				"@interface @Marker {}\n" +
+				"}\n" ;
+		StringBuffer buf= new StringBuffer(contents);
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "X");
+
+		MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "main");
+		{
+			// replace the lhs and the rhs.
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(0);
+			VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			TypeMethodReference typeMethodReference = (TypeMethodReference) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType = ast.newSimpleType((ast.newSimpleName("Integer")));
+			Type newType = ast.newSimpleType(ast.newSimpleName("W"));
+			rewrite.replace(typeMethodReference.getType(), newType, null);
+			rewrite.getListRewrite(typeMethodReference, TypeMethodReference.TYPE_ARGUMENTS_PROPERTY).insertFirst(simpleType, null);
+			rewrite.replace(typeMethodReference.getName(), ast.newSimpleName("bar"), null);
+			
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(1);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			typeMethodReference = (TypeMethodReference) variableDeclarationFragment.getInitializer();
+			newType = ast.newSimpleType(ast.newQualifiedName(ast.newSimpleName("Y"),ast.newSimpleName("Z")));
+			rewrite.replace(typeMethodReference.getType(), newType, null);
+			ASTNode typeArgument = (ASTNode) typeMethodReference.typeArguments().get(0);
+			rewrite.getListRewrite(typeMethodReference, TypeMethodReference.TYPE_ARGUMENTS_PROPERTY).remove(typeArgument, null);
+			rewrite.replace(typeMethodReference.getName(), ast.newSimpleName("foo"), null);			
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		contents = "package test407131;\n" +
+				"package test407131;\n" +
+				"\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	static class Z {\n" +
+				"		public Z(int x) {}\n" +
+				"		public static void foo(int x) {}\n" +
+				"	}\n" +
+				"}\n" +
+				"class W<T> {\n" +
+				"	public static void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X {\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public static void main (String [] args) {\n" +
+				"		J j1 = W ::<Integer> bar;\n" +
+				"		J j2 = Y.Z :: foo;\n" +
+				"	}\n" +
+				"@Target (ElementType.TYPE_USE)\n" +
+				"@interface @Marker {}\n" +
+				"}\n" ;
+		buf= new StringBuffer(contents);
+		assertEqualString(preview, buf.toString());
+	}
+	
+	/**
+	 * tests various aspects of SuperMethodReference
+	 * @throws Exception
+	 */
+	public void testReferenceExpressions_test005_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test407131", false, null);
+		String contents = "package test407131;\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"\n" +
+				"class XX {\n" +
+				"	public void foo(int x) {}\n" +
+				"	public void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X extends XX {\n" +
+				"       @SuppressWarnings(\"unused\")\n" +
+				"       public  void bar(int i) {\n" +
+				"           J jx = super :: <Integer> foo;\n" +
+				"           J jz = X.super :: bar;\n" +
+				"       }\n" +
+				"       public static void main (String [] args) {}\n" +
+				"}\n" +
+				"\n" ;
+		StringBuffer buf= new StringBuffer(contents);
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "X");
+
+		MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "bar");
+		{
+			// replace the lhs and the rhs, add/delete type arguments.
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(0);
+			VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			SuperMethodReference superMethodReference = (SuperMethodReference) variableDeclarationFragment.getInitializer();
+			rewrite.set(superMethodReference, SuperMethodReference.QUALIFIER_PROPERTY, ast.newSimpleName("X"), null);
+			ASTNode typeArgument = (ASTNode) superMethodReference.typeArguments().get(0);
+			rewrite.getListRewrite(superMethodReference, SuperMethodReference.TYPE_ARGUMENTS_PROPERTY).remove(typeArgument, null);
+			rewrite.replace(superMethodReference.getName(), ast.newSimpleName("bar"), null);
+			
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(1);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			superMethodReference = (SuperMethodReference) variableDeclarationFragment.getInitializer();
+			rewrite.remove(superMethodReference.getQualifier(), null);
+			SimpleType simpleType = ast.newSimpleType(ast.newSimpleName("String"));
+			rewrite.getListRewrite(superMethodReference, SuperMethodReference.TYPE_ARGUMENTS_PROPERTY).insertFirst(simpleType, null);
+			rewrite.replace(superMethodReference.getName(), ast.newSimpleName("foo"), null);
+			
+		}
+		String preview = evaluateRewrite(cu, rewrite);
+		contents = "package test407131;\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"\n" +
+				"class XX {\n" +
+				"	public void foo(int x) {}\n" +
+				"	public void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X extends XX {\n" +
+				"       @SuppressWarnings(\"unused\")\n" +
+				"       public  void bar(int i) {\n" +
+				"           J jx = X.super :: bar;\n" +
+				"           J jz = super ::<String> foo;\n" +
+				"       }\n" +
+				"       public static void main (String [] args) {}\n" +
+				"}\n" +
+				"\n" ;
+		buf = new StringBuffer(contents);
+		assertEqualString(preview, buf.toString());
+	}
+	/**
+	 * tests cross rewriting - changing from one member of reference expressions to another type.
+	 * @throws Exception
+	 */
+	public void testReferenceExpressions_test006_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test407131", false, null);
+		String contents = "package test407131;\n" +
+				"import java.lang.annotation.*;\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	static class Z {\n" +
+				"		public Z(int x) {}\n" +
+				"		public static void foo(int x) {}\n" +
+				"	}\n" +
+				"}\n" +
+				"class W<T> {\n" +
+				"	public W(int x) {}\n" +
+				"	public static void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"class XX {\n" +
+				"	public void foo(int x) {}\n" +
+				"	public void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X extends XX {\n" +
+				"	public static void main (String [] args) {}\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public void bar () {\n" +
+				"		J j1 = W <Integer> :: <String> new;\n" +
+				"		J j2 = Y.Z :: new;\n" +
+				"		J j3 = Y.@Marker Z :: foo;\n" +
+				"		J jx = super :: foo;\n" +
+				"		J jz = X.super :: bar;\n" +
+				"	}\n" +
+				"}\n" +
+				"@Target (ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"}\n";
+		StringBuffer buf= new StringBuffer(contents);
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		TypeDeclaration typedeclaration= findTypeDeclaration(astRoot, "X");
+
+		MethodDeclaration methodDecl= findMethodDeclaration(typedeclaration, "bar");
+		{
+			// case 1: creationReference to TypeMethodReference
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(0);
+			VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			CreationReference creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			TypeMethodReference typeMethodReference = ast.newTypeMethodReference();
+			QualifiedType qualifiedType = ast.newQualifiedType(ast.newSimpleType(ast.newSimpleName("Y")), ast.newSimpleName("Z"));
+			MarkerAnnotation markerAnnotation = ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Marker"));
+			qualifiedType.annotations().add(markerAnnotation);
+			typeMethodReference.setType(qualifiedType);
+			typeMethodReference.setName(ast.newSimpleName("foo"));
+			rewrite.replace(creationReference, typeMethodReference, null);
+			
+			// case 2: CreationReference to SuperMethodReference
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(1);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			creationReference = (CreationReference) variableDeclarationFragment.getInitializer();
+			SuperMethodReference superMethodReference = ast.newSuperMethodReference();
+			superMethodReference.setName(ast.newSimpleName("foo"));
+			rewrite.replace(creationReference, superMethodReference, null);
+			
+			// case 3: TypeMethodReference to SuperMethodReference
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(2);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			typeMethodReference = (TypeMethodReference) variableDeclarationFragment.getInitializer();
+			superMethodReference = ast.newSuperMethodReference();
+			superMethodReference.setName(ast.newSimpleName("bar"));
+			superMethodReference.setQualifier(ast.newSimpleName("X"));
+			rewrite.replace(typeMethodReference, superMethodReference, null);			
+			
+			// case 4: SuperMethodReference to CreationMethodReference
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(3);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			superMethodReference = (SuperMethodReference) variableDeclarationFragment.getInitializer();
+			ParameterizedType parameterizedType = ast.newParameterizedType(ast.newSimpleType(ast.newSimpleName("W")));
+			parameterizedType.typeArguments().add(ast.newSimpleType(ast.newSimpleName("Integer")));
+			creationReference = ast.newCreationReference();
+			creationReference.setType(parameterizedType);
+			creationReference.typeArguments().add(ast.newSimpleType(ast.newSimpleName("String")));
+			rewrite.replace(superMethodReference, creationReference, null);			
+			
+			// case 5: SuperMethodReference to ExpressionMethodReference
+			variableDeclarationStatement = (VariableDeclarationStatement) methodDecl.getBody().statements().get(4);
+			variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			superMethodReference = (SuperMethodReference) variableDeclarationFragment.getInitializer();
+			ExpressionMethodReference expressionMethodReference = ast.newExpressionMethodReference();
+			expressionMethodReference.setExpression(ast.newQualifiedName(ast.newSimpleName("Y"), ast.newSimpleName("Z")));
+			expressionMethodReference.setName(ast.newSimpleName("foo"));
+			rewrite.replace(superMethodReference, expressionMethodReference, null);			
+			
+		}
+		
+		String preview= evaluateRewrite(cu, rewrite);
+		contents = "package test407131;\n" +
+				"import java.lang.annotation.*;\n" +
+				"interface J {\n" +
+				"	void foo(int x);\n" +
+				"}\n" +
+				"class Y {\n" +
+				"	static class Z {\n" +
+				"		public Z(int x) {}\n" +
+				"		public static void foo(int x) {}\n" +
+				"	}\n" +
+				"}\n" +
+				"class W<T> {\n" +
+				"	public W(int x) {}\n" +
+				"	public static void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"class XX {\n" +
+				"	public void foo(int x) {}\n" +
+				"	public void bar(int x) {}\n" +
+				"}\n" +
+				"\n" +
+				"public class X extends XX {\n" +
+				"	public static void main (String [] args) {}\n" +
+				"	@SuppressWarnings(\"unused\")\n" +
+				"	public void bar () {\n" +
+				"		J j1 = Y.@Marker Z::foo;\n" +
+				"		J j2 = super::foo;\n" +
+				"		J j3 = X.super::bar;\n" +
+				"		J jx = W<Integer>::<String> new;\n" +
+				"		J jz = Y.Z::foo;\n" +
+				"	}\n" +
+				"}\n" +
+				"@Target (ElementType.TYPE_USE)\n" +
+				"@interface Marker {}\n" +
+				"}\n";
+		buf= new StringBuffer(contents);
+		assertEqualString(preview, buf.toString());
+	}	
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRevertTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRevertTest.java
index 6b7a284..0de715a 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRevertTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingRevertTest.java
@@ -1,16 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 IBM Corporation and others.
+ * Copyright (c) 2007, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.rewrite.describing;
+
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
@@ -24,28 +28,20 @@
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 
 public class ASTRewritingRevertTest extends ASTRewritingTest {
-	private static final Class THIS= ASTRewritingRevertTest.class;
 
 	public ASTRewritingRevertTest(String name) {
 		super(name);
 	}
 
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingRevertTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingRevertTest.class);
 	}
 
-
-	public void testRemoveInserted() throws Exception {
+	public void testRemoveInserted_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -55,7 +51,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -92,7 +88,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testReplaceInserted() throws Exception {
+	public void testReplaceInserted_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -102,7 +98,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
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 429dce8..fe13150 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,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * 
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -12,46 +16,97 @@
 import java.util.List;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 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.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.AbstractTypeDeclaration;
+import org.eclipse.jdt.core.dom.ArrayCreation;
+import org.eclipse.jdt.core.dom.ArrayType;
+import org.eclipse.jdt.core.dom.AssertStatement;
+import org.eclipse.jdt.core.dom.Assignment;
+import org.eclipse.jdt.core.dom.Block;
+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.ClassInstanceCreation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.ConstructorInvocation;
+import org.eclipse.jdt.core.dom.ContinueStatement;
+import org.eclipse.jdt.core.dom.DoStatement;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
+import org.eclipse.jdt.core.dom.Dimension;
+import org.eclipse.jdt.core.dom.ForStatement;
+import org.eclipse.jdt.core.dom.IfStatement;
+import org.eclipse.jdt.core.dom.InfixExpression;
+import org.eclipse.jdt.core.dom.LabeledStatement;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.ParenthesizedExpression;
+import org.eclipse.jdt.core.dom.PrefixExpression;
+import org.eclipse.jdt.core.dom.PrimitiveType;
+import org.eclipse.jdt.core.dom.ReturnStatement;
+import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SimplePropertyDescriptor;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.Statement;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.SwitchCase;
+import org.eclipse.jdt.core.dom.SwitchStatement;
+import org.eclipse.jdt.core.dom.SynchronizedStatement;
+import org.eclipse.jdt.core.dom.ThrowStatement;
+import org.eclipse.jdt.core.dom.TryStatement;
+import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
+import org.eclipse.jdt.core.dom.UnionType;
+import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WhileStatement;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
+import org.eclipse.jdt.core.formatter.CodeFormatter;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
+import org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter;
 import org.eclipse.jface.text.Document;
 import org.eclipse.text.edits.TextEdit;
 
 public class ASTRewritingStatementsTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingStatementsTest.class;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VDS_MODIFIERS_PROPERTY = VariableDeclarationStatement.MODIFIERS_PROPERTY;
 
 	public ASTRewritingStatementsTest(String name) {
 		super(name);
 	}
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingStatementsTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return buildModelTestSuite(THIS);
-//		TestSuite suite= new Suite(THIS.getClass().getName());
-//		suite.addTest(new ASTRewritingStatementsTest("testTryStatementWithResources3"));
-//		suite.addTest(new ASTRewritingStatementsTest("testTryStatementWithResources4"));
-//		suite.addTest(new ASTRewritingStatementsTest("testTryStatementWithResources5"));
-//		return suite;
+		return createSuite(ASTRewritingStatementsTest.class);
 	}
 
+	/** @deprecated using deprecated code */
+	private void internalSetExtraDimensions(VariableDeclarationFragment node, int dimensions) {
+		if (this.apiLevel < AST.JLS8) {
+			node.setExtraDimensions(dimensions);
+		} else {
+			while (dimensions > 0) {
+				node.extraDimensions().add(node.getAST().newDimension());
+			}
+		}
+	}
 	public void testInsert1() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		/* foo(): append a return statement */
@@ -1073,7 +1128,7 @@
 
 	}
 
-	public void testConstructorInvocation2() throws Exception {
+	public void testConstructorInvocation2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1087,7 +1142,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -1381,7 +1436,7 @@
 		assertEqualString(preview, buf.toString());
 
 	}
-	public void testDoStatement2() throws Exception {
+	public void testDoStatement2_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
 
@@ -1398,7 +1453,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 	
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, true);
+			CompilationUnit astRoot= createAST(cu, true);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 			AST ast= astRoot.getAST();
 	
@@ -4510,7 +4565,7 @@
 	}
 
 	/** @deprecated using deprecated code */
-	public void testThrowStatement() throws Exception {
+	public void testThrowStatement_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -4721,7 +4776,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testTryStatement2() throws Exception {
+	public void testTryStatement2_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
 
@@ -4739,7 +4794,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 	
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, false);
+			CompilationUnit astRoot= createAST(cu);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -4779,7 +4834,7 @@
 			deleteProject("P_17");
 		}
 	}
-	public void testTryStatement3() throws Exception {
+	public void testTryStatement3_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
 
@@ -4797,7 +4852,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 	
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, false);
+			CompilationUnit astRoot= createAST(cu);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 	
@@ -4841,7 +4896,7 @@
 			deleteProject("P_17");
 		}
 	}
-	public void testTryStatement4() throws Exception {
+	public void testTryStatement4_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
 
@@ -4860,7 +4915,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 	
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, false);
+			CompilationUnit astRoot= createAST(cu);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 			assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED) == 0);
@@ -4892,7 +4947,7 @@
 			deleteProject("P_17");
 		}
 	}
-	public void testTryStatementWithResources() throws Exception {
+	public void testTryStatementWithResources_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
 
@@ -4913,7 +4968,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 	
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, false);
+			CompilationUnit astRoot= createAST(cu);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -4989,7 +5044,7 @@
 		}
 	}
 
-	public void testTryStatementWithResources2() throws Exception {
+	public void testTryStatementWithResources2_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
 
@@ -5007,7 +5062,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 	
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, false);
+			CompilationUnit astRoot= createAST(cu);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -5048,7 +5103,7 @@
 	/**
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=351170
 	 */
-	public void testTryStatementWithResources3() throws Exception {
+	public void testTryStatementWithResources3_since_4() throws Exception {
 
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
@@ -5072,7 +5127,7 @@
 			buf.append("}");
 
 			ICompilationUnit cu = pack1.createCompilationUnit("X.java", buf.toString(), false, null);
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, true, true);
+			CompilationUnit astRoot= createAST(cu, true, true);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -5121,7 +5176,7 @@
 	/**
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=351170
 	 */
-	public void testTryStatementWithResources4() throws Exception {
+	public void testTryStatementWithResources4_since_4() throws Exception {
 
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
@@ -5144,7 +5199,7 @@
 			buf.append("}");
 
 			ICompilationUnit cu = pack1.createCompilationUnit("X.java", buf.toString(), false, null);
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, true, true);
+			CompilationUnit astRoot= createAST(cu, true, true);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -5156,7 +5211,7 @@
 			TryStatement tryStatement = (TryStatement) statement;
 
 			VariableDeclarationFragment fragment = ast.newVariableDeclarationFragment();
-			fragment.setExtraDimensions(0);
+			internalSetExtraDimensions(fragment, 0);
 			fragment.setName(ast.newSimpleName("reader2"));
 			ClassInstanceCreation classInstanceCreation = ast.newClassInstanceCreation();
 			classInstanceCreation.setType(ast.newSimpleType(ast.newSimpleName("FileReader")));
@@ -5199,7 +5254,7 @@
 	/**
 	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=351170
 	 */
-	public void testTryStatementWithResources5() throws Exception {
+	public void testTryStatementWithResources5_since_4() throws Exception {
 
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
@@ -5222,7 +5277,7 @@
 			buf.append("}");
 
 			ICompilationUnit cu = pack1.createCompilationUnit("X.java", buf.toString(), false, null);
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, true, true);
+			CompilationUnit astRoot= createAST(cu, true, true);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -5234,7 +5289,7 @@
 			TryStatement tryStatement = (TryStatement) statement;
 
 			VariableDeclarationFragment fragment = ast.newVariableDeclarationFragment();
-			fragment.setExtraDimensions(0);
+			internalSetExtraDimensions(fragment, 0);
 			fragment.setName(ast.newSimpleName("reader2"));
 			ClassInstanceCreation classInstanceCreation = ast.newClassInstanceCreation();
 			classInstanceCreation.setType(ast.newSimpleType(ast.newSimpleName("FileReader")));
@@ -5275,7 +5330,7 @@
 	}
 
 	/** @deprecated using deprecated code */
-	public void testTypeDeclarationStatement() throws Exception {
+	public void testTypeDeclarationStatement_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -5323,7 +5378,7 @@
 
 	}
 
-	public void testVariableDeclarationStatement() throws Exception {
+	public void testVariableDeclarationStatement_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -5355,7 +5410,7 @@
 
 			// add modifier
 			int newModifiers= Modifier.FINAL;
-			rewrite.set(decl, VariableDeclarationStatement.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_VDS_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			PrimitiveType newType= ast.newPrimitiveType(PrimitiveType.BOOLEAN);
 			rewrite.replace(decl.getType(), newType, null);
@@ -5371,7 +5426,7 @@
 
 			// add modifier
 			int newModifiers= Modifier.FINAL;
-			rewrite.set(decl, VariableDeclarationStatement.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_VDS_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			List fragments= decl.fragments();
 			assertTrue("Number of fragments not 3", fragments.size() == 3);
@@ -5390,7 +5445,7 @@
 
 			// add modifiers
 			int newModifiers= 0;
-			rewrite.set(decl, VariableDeclarationStatement.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_VDS_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 		}
 
 		String preview= evaluateRewrite(cu, rewrite);
@@ -5699,7 +5754,7 @@
 	
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=350285
 	// Test that converting a multi catch into a normal catch using complete block copy doesn't change indentation
-	public void testTryStatementWithMultiCatch1() throws Exception {
+	public void testTryStatementWithMultiCatch1_since_4() throws Exception {
 		createProject("P_17", JavaCore.VERSION_1_7);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
 		try {
@@ -5717,7 +5772,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, false);
+			CompilationUnit astRoot= createAST(cu);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -5772,7 +5827,7 @@
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=350285
 	// similar to testTryStatementWithMultiCatch1() but has a different brace position
-	public void testTryStatementWithMultiCatch2() throws Exception {
+	public void testTryStatementWithMultiCatch2_since_4() throws Exception {
 		IJavaProject project = createProject("P_17", JavaCore.VERSION_1_7);
 		project.setOption(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_BLOCK, DefaultCodeFormatterConstants.NEXT_LINE);
 		IPackageFragmentRoot currentSourceFolder = getPackageFragmentRoot("P_17", "src");
@@ -5792,7 +5847,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-			CompilationUnit astRoot= createAST(AST.JLS4, cu, false);
+			CompilationUnit astRoot= createAST(cu);
 			AST ast= astRoot.getAST();
 			ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -5846,6 +5901,261 @@
 			deleteProject("P_17");
 		}
 	}
+	public void testBug400568_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    	int [] i @Annot1 @Annot2 [] @Annot1 @Annot3 [] = new int @Annot1 @Annot2  [2] @Annot2 @Annot3 [size()] @Annot2 @Annot1 [];\n");
+		buf.append("    	int [] j [][] = new int @Annot1 @Annot2 [2] @Annot2 @Annot3 [size()] @Annot1 @Annot3 [], k [][] = new int @Annot1 @Annot2 [2] @Annot2 @Annot3 [size()] @Annot1 @Annot3 [];\n");
+		buf.append("    }\n");
+		buf.append("    public int size() { return 2; }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot3 {}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+
+		CompilationUnit astRoot= createAST(cu);
+		AST ast= astRoot.getAST();
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+
+		// Get while statement block
+		TypeDeclaration typeDecl = (TypeDeclaration) astRoot.types().get(0);
+		MethodDeclaration methodDecl= typeDecl.getMethods()[0];
+		Block block= methodDecl.getBody();
+		List statements= block.statements();
+
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(0);
+		List fragments = statement.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Type type = statement.getType();
+
+		{
+			// Add new dimension with and without annotations
+			assertEquals("Incorrect type", ASTNode.ARRAY_TYPE, type.getNodeType());
+			ArrayCreation creation = (ArrayCreation) fragment.getInitializer();
+
+			ListRewrite listRewrite= rewrite.getListRewrite(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTY);
+			Dimension dim= ast.newDimension();
+			MarkerAnnotation markerAnnotation;
+			listRewrite.insertFirst(dim, null);
+
+			ArrayType creationType = creation.getType();
+			ArrayType newArrayType = (ArrayType) ASTNode.copySubtree(ast, creationType);
+			newArrayType.dimensions().add(ast.newDimension());
+			
+			Dimension dim0 = ast.newDimension();
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot3"));
+			dim0.annotations().add(markerAnnotation);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			dim0.annotations().add(markerAnnotation);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			dim0.annotations().add(markerAnnotation);
+			newArrayType.dimensions().add(dim0);
+			rewrite.set(creation, ArrayCreation.TYPE_PROPERTY, newArrayType, null);
+
+		}
+		{
+			statement = (VariableDeclarationStatement) statements.get(1);
+			fragments = statement.fragments();
+			assertEquals("Incorrect no of fragments", 2, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+			type = statement.getType();
+
+			// Modify existing annotations by altering annotations and expressions
+			assertEquals("Incorrect type", ASTNode.ARRAY_TYPE, type.getNodeType());
+			ArrayCreation creation = (ArrayCreation) fragment.getInitializer();
+			ArrayType creationType = creation.getType();
+
+			List expressions = creation.dimensions();
+			ListRewrite listRewrite = rewrite.getListRewrite(creation, ArrayCreation.DIMENSIONS_PROPERTY);
+			Expression exp = (Expression) expressions.get(1);
+			listRewrite.remove(exp, null);
+
+			Dimension dim = (Dimension) creationType.dimensions().get(0);
+			listRewrite = rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			MarkerAnnotation annotation = (MarkerAnnotation) dim.annotations().get(0);
+			listRewrite.remove(annotation, null);
+
+			dim = (Dimension) creationType.dimensions().get(1);
+			listRewrite = rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			annotation = (MarkerAnnotation) dim.annotations().get(1);
+			listRewrite.remove(annotation, null);
+
+			dim = (Dimension) creationType.dimensions().get(2);
+			listRewrite = rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			annotation = (MarkerAnnotation) dim.annotations().get(1);
+			listRewrite.remove(annotation, null);
+
+			fragment = (VariableDeclarationFragment) fragments.get(1);
+
+			creation = (ArrayCreation) fragment.getInitializer();
+			creationType = creation.getType();
+			dim = (Dimension) creationType.dimensions().get(0);
+			listRewrite = rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			annotation = (MarkerAnnotation) dim.annotations().get(1);
+			listRewrite.remove(annotation, null);
+			annotation = (MarkerAnnotation) dim.annotations().get(0);
+			listRewrite.remove(annotation, null);
+
+			dim = (Dimension) creationType.dimensions().get(1);
+			listRewrite = rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			annotation = (MarkerAnnotation) dim.annotations().get(1);
+			listRewrite.remove(annotation, null);
+			annotation = (MarkerAnnotation) dim.annotations().get(0);
+			listRewrite.remove(annotation, null);
+
+			dim = (Dimension) creationType.dimensions().get(2);
+			listRewrite = rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			annotation = (MarkerAnnotation) dim.annotations().get(1);
+			listRewrite.remove(annotation, null);
+			annotation = (MarkerAnnotation) dim.annotations().get(0);
+			listRewrite.remove(annotation, null);
+
+			expressions = creation.dimensions();
+			listRewrite = rewrite.getListRewrite(creation, ArrayCreation.DIMENSIONS_PROPERTY);
+			Expression expression = ast.newNumberLiteral("10"); 
+			listRewrite.replace((ASTNode) expressions.get(1), expression, null);
+
+			MethodInvocation invoc = ast.newMethodInvocation();
+			invoc.setName(ast.newSimpleName("size"));
+			listRewrite.insertAt(invoc, 2, null);
+
+		}
+		// Get new code
+		String preview= evaluateRewrite(cu, rewrite);
+
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    	int [] i [] @Annot1 @Annot2 [] @Annot1 @Annot3 [] = new int @Annot1 @Annot2  [2] @Annot2 @Annot3 [size()] @Annot2 @Annot1 [][]@Annot3 @Annot2 @Annot1 [];\n");
+		buf.append("    	int [] j [][] = new int @Annot2 [2] @Annot2 [] @Annot1 [], k [][] = new int [2] [10] [size()];\n");
+		buf.append("    }\n");
+		buf.append("    public int size() { return 2; }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot3 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	public void testBug400568_a_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    	int [] i [][] = new int @Annot1 @Annot2  [2] @Annot2 @Annot3 [size(new int[][]{})] [];\n");
+		buf.append("    	int [] j [][] = new int @Annot1 @Annot2 [2] @Annot2 @Annot3 [size(new int[]{})] @Annot1 @Annot3 [], k [][] = new int @Annot1 @Annot2 [2] @Annot2 @Annot3 [10] @Annot1 @Annot3 [size(new int[][]{})];\n");
+		buf.append("    }\n");
+		buf.append("    public int size(Object obj) { return 2; }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot3 {}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+
+		TypeDeclaration typeDecl = (TypeDeclaration) astRoot.types().get(0);
+		MethodDeclaration methodDecl= typeDecl.getMethods()[0];
+		Block block= methodDecl.getBody();
+		List statements= block.statements();
+
+		VariableDeclarationStatement statement = (VariableDeclarationStatement) statements.get(0);
+		List fragments = statement.fragments();
+		VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0);
+		Type type = statement.getType();
+
+		{
+			assertEquals("Incorrect type", ASTNode.ARRAY_TYPE, type.getNodeType());
+			ArrayCreation creation = (ArrayCreation) fragment.getInitializer();
+
+			ArrayType arrayType = creation.getType();
+			Dimension dim = (Dimension) arrayType.dimensions().get(1);
+			ListRewrite listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.remove((ASTNode)dim.annotations().get(0), null);
+			listRewrite.remove((ASTNode)dim.annotations().get(1), null);
+			rewrite.set(creation, ArrayCreation.TYPE_PROPERTY, arrayType, null);
+		}
+		{
+			statement = (VariableDeclarationStatement) statements.get(1);
+			fragments = statement.fragments();
+			assertEquals("Incorrect no of fragments", 2, fragments.size());
+			fragment = (VariableDeclarationFragment) fragments.get(0);
+
+			assertEquals("Incorrect type", ASTNode.ARRAY_TYPE, type.getNodeType());
+			ArrayCreation creation = (ArrayCreation) fragment.getInitializer();
+			ArrayType creationType = creation.getType();
+			rewrite.remove((ASTNode) creationType.dimensions().get(2), null);
+			fragment = (VariableDeclarationFragment) fragments.get(1);
+			creation = (ArrayCreation) fragment.getInitializer();
+			creationType = creation.getType();
+
+			rewrite.remove((ASTNode) creationType.dimensions().get(2), null);
+		}
+		// Get new code
+		String preview= evaluateRewrite(cu, rewrite);
+
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("    	int [] i [][] = new int @Annot1 @Annot2  [2]  [size(new int[][]{})] [];\n");
+		buf.append("    	int [] j [][] = new int @Annot1 @Annot2 [2] @Annot2 @Annot3 [size(new int[]{})], k [][] = new int @Annot1 @Annot2 [2] @Annot2 @Annot3 [10];\n");
+		buf.append("    }\n");
+		buf.append("    public int size(Object obj) { return 2; }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot3 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+	
+	public void testBug413592a() throws Exception {
+		String buf = "default int func2(){return 1;}";
+		Document doc = new Document(buf);
+		String formattedString = "\tdefault int func2() {\n" +
+								 "\t\treturn 1;\n" + 
+								 "\t}";
+		TextEdit edit = new ASTRewriteFormatter(null, null, JavaCore.getOptions(), "\n").formatString(CodeFormatter.K_CLASS_BODY_DECLARATIONS, buf, 0, buf.length(), 1);
+		edit.apply(doc);
+		assertTrue("Incorrect Formatting", doc.get().equals(formattedString));
+	}
+
+	public void testBug413592b() throws Exception {
+		String buf = "default int func2(){return 2*(3+4)/5/(6+7);}";
+		Document doc = new Document(buf);
+		String formattedString = "\tdefault int func2() {\n" +
+								 "\t\treturn 2 * (3 + 4) / 5 / (6 + 7);\n" + 
+								 "\t}";
+		TextEdit edit = new ASTRewriteFormatter(null, null, JavaCore.getOptions(), "\n").formatString(CodeFormatter.K_CLASS_BODY_DECLARATIONS, buf, 0, buf.length(), 1);
+		edit.apply(doc);
+		assertTrue("Incorrect Formatting", doc.get().equals(formattedString));
+	}
+
 }
 
 
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 a4d892d..e371b4d 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,14 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.rewrite.describing;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
 import java.util.List;
 
 import junit.framework.Test;
@@ -27,53 +33,148 @@
 import org.eclipse.text.edits.TextEdit;
 
 /**
-  */
+ * Tests for ASTRewrite. Subclasses must have 2 constructors that forward to
+ * constructors with the same signature as this class's constructors.
+ * 
+ * Test methods can end with:
+ * <ul>
+ * <li>"_since_<i>n</i>", where <i>n</i> is an AST.JLS* constant value:
+ *   test will run for all AST levels >= <i>n</i>
+ * </li>
+ * <li>"_only_<i>a</i>_<i>b</i>...", where <i>a</i>, <i>b</i>, ... are AST.JLS* constant values:
+ *   test will run for all specified AST levels
+ * </li>
+ * </ul>
+ */
 public class ASTRewritingTest extends AbstractJavaModelTests {
+
+
 	/** @deprecated using deprecated code */
-	private static final int AST_INTERNAL_JLS2 = AST.JLS2;
+	private final static int JLS2_INTERNAL = AST.JLS2;
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
-	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
-	
+	private static final int JLS3_INTERNAL = AST.JLS3;
+
+	/** @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 };
+
+	private static final String ONLY_AST_STRING = "_only";
+	private static final String SINCE_AST_STRING = "_since";
+	private static final String STRING_ = "_";
+
+	protected int apiLevel;
+
 	protected IJavaProject project1;
 	protected IPackageFragmentRoot sourceFolder;
 
+	/** @deprecated using deprecated code */
+	public String getName() {
+		String name = super.getName() + " - JLS" + this.apiLevel;
+		return name;
+	}
+
+	public ASTRewritingTest(String name) {
+		super(name.substring(0, name.indexOf(" - JLS")));
+		name.indexOf(" - JLS");
+		this.apiLevel = Integer.parseInt(name.substring(name.indexOf(" - JLS") + 6));
+	}
+
+	/**
+	 * Creates an instance of a test at a particular AST level. All sub tests of ASTRewritingTest must have a constructor 
+	 * with the specified parameters.
+	 *
+	 * @param name name of the test method
+	 * @param apiLevel The JLS level
+	 */
+	public ASTRewritingTest(String name, int apiLevel) {
+		super(name);
+		this.apiLevel = apiLevel;
+	}
+
 	public static Test suite() {
 		TestSuite suite= new TestSuite(ASTRewritingTest.class.getName());
-		suite.addTest(ASTRewritingExpressionsTest.allTests());
-		suite.addTest(ASTRewritingInsertBoundTest.allTests());
-		suite.addTest(ASTRewritingMethodDeclTest.allTests());
-		suite.addTest(ASTRewritingMoveCodeTest.allTests());
-		suite.addTest(ASTRewritingStatementsTest.allTests());
-		suite.addTest(ASTRewritingTrackingTest.allTests());
-		suite.addTest(ASTRewritingJavadocTest.allTests());
-		suite.addTest(ASTRewritingTypeDeclTest.allTests());
-		suite.addTest(ASTRewritingGroupNodeTest.allTests());
-		suite.addTest(ASTRewritingRevertTest.allTests());
-		suite.addTest(SourceModifierTest.allTests());
-		suite.addTest(ImportRewriteTest.allTests());
-		suite.addTest(LineCommentOffsetsTest.allTests());
-		suite.addTest(ASTRewritingWithStatementsRecoveryTest.allTests());
-		suite.addTest(ASTRewritePropertyTest.allTests());
-		suite.addTest(ASTRewritingPackageDeclTest.allTests());
+		suite.addTest(ASTRewritingExpressionsTest.suite());
+		suite.addTest(ASTRewritingInsertBoundTest.suite());
+		suite.addTest(ASTRewritingMethodDeclTest.suite());
+		suite.addTest(ASTRewritingMoveCodeTest.suite());
+		suite.addTest(ASTRewritingStatementsTest.suite());
+		suite.addTest(ASTRewritingTrackingTest.suite());
+		suite.addTest(ASTRewritingJavadocTest.suite());
+		suite.addTest(ASTRewritingTypeAnnotationsTest.suite());
+		suite.addTest(ASTRewritingTypeDeclTest.suite());
+		suite.addTest(ASTRewritingGroupNodeTest.suite());
+		suite.addTest(ASTRewritingRevertTest.suite());
+		suite.addTest(LineCommentOffsetsTest.suite());
+		suite.addTest(ASTRewritingWithStatementsRecoveryTest.suite());
+		suite.addTest(ASTRewritePropertyTest.suite());
+		suite.addTest(ASTRewritingPackageDeclTest.suite());
+		suite.addTest(ASTRewritingLambdaExpressionTest.suite());		
+		suite.addTest(ASTRewritingReferenceExpressionTest.suite());		
+		suite.addTest(SourceModifierTest.suite());
+		suite.addTest(ImportRewriteTest.suite());
 		return suite;
 	}
 
-
-	public ASTRewritingTest(String name) {
-		super(name);
+	/**
+	 * Creates a test suite according to the rules in {@link ASTRewritingTest}.
+	 * 
+	 * @param testClass subclass of ASTRewritingTest
+	 * @return test suite that runs all tests with all supported AST levels
+	 */
+	protected static TestSuite createSuite(Class testClass) {
+		return createSuite(testClass, -1);
 	}
 
-	public void setUpSuite() throws Exception {
-		super.setUpSuite();
-	}
-
-	public void tearDownSuite() throws Exception {
-		super.tearDownSuite();
+	/**
+	 * Creates a test suite according to the rules in {@link ASTRewritingTest}.
+	 * 
+	 * @param testClass subclass of ASTRewritingTest
+	 * @param classSince smallest supported AST level for this test class, or -1 to support all levels
+	 * @return test suite that runs all tests with all supported AST levels
+	 */
+	protected static TestSuite createSuite(Class testClass, int classSince) {
+		TestSuite suite = new TestSuite(testClass.getName());
+		try {
+			Method[] methods = testClass.getMethods();
+			Constructor cons = testClass.getConstructor(new Class[]{String.class, int.class});
+			for (int i = 0, max = methods.length; i < max; i++) {
+				String name = methods[i].getName();
+				if (name.startsWith("test")) { //$NON-NLS-1$
+					
+					int index = name.indexOf(ONLY_AST_STRING);
+					if (index != -1) {
+						String suffix = name.substring(index + ONLY_AST_STRING.length() + 1);
+						String[] levels = suffix.split(STRING_);
+						for (int l= 0; l < levels.length; l++) {
+							suite.addTest((Test) cons.newInstance(new Object[]{name,  Integer.valueOf(levels[l])}));
+						}
+					
+					} else {
+						int since = -1;
+						index = name.indexOf(SINCE_AST_STRING);
+						if (index != -1) {
+							String suffix = name.substring(index + SINCE_AST_STRING.length() + 1);
+							since = Integer.parseInt(suffix);
+						}
+						for (int j= 0; j < JLS_LEVELS.length; j++) {
+							int level = JLS_LEVELS[j];
+							if (level >= since && level >= classSince) {
+								suite.addTest((Test) cons.newInstance(new Object[]{name, new Integer(level)}));
+							}
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace(); // In the unlikely case, can't do much
+		}
+		return suite;
 	}
 
 	protected void setUp() throws Exception {
@@ -83,8 +184,6 @@
 
 		this.project1 = proj;
 		this.sourceFolder = getPackageFragmentRoot("P", "src");
-
-		waitUntilIndexesReady();
 	}
 
 	protected IJavaProject createProject(String projectName, String complianceVersion) throws CoreException {
@@ -105,21 +204,16 @@
 	}
 
 	protected CompilationUnit createAST(ICompilationUnit cu) {
-		return createAST(AST_INTERNAL_JLS2, cu, false);
+		return createAST(this.apiLevel, cu, false, false);
+	}
+	protected CompilationUnit createAST(ICompilationUnit cu, boolean statementsRecovery) {
+		return createAST(this.apiLevel, cu, false, statementsRecovery);
+	}
+	protected CompilationUnit createAST(ICompilationUnit cu, boolean resolveBindings, boolean statementsRecovery) {
+		return createAST(this.apiLevel, cu, resolveBindings, statementsRecovery);
 	}
 
-	protected CompilationUnit createAST3(ICompilationUnit cu) {
-		return createAST(JLS3_INTERNAL, cu, false);
-	}
-	
-	protected CompilationUnit createAST3(ICompilationUnit cu, boolean statementsRecovery) {
-		return createAST(JLS3_INTERNAL, cu, statementsRecovery);
-	}
-	protected CompilationUnit createAST(int JLSLevel, ICompilationUnit cu, boolean statementsRecovery) {
-		return createAST(JLSLevel, cu, false, statementsRecovery);
-	}
-
-	protected CompilationUnit createAST(int JLSLevel, ICompilationUnit cu, boolean resolveBindings, boolean statementsRecovery) {
+	private CompilationUnit createAST(int JLSLevel, ICompilationUnit cu, boolean resolveBindings, boolean statementsRecovery) {
 		ASTParser parser= ASTParser.newParser(JLSLevel);
 		parser.setSource(cu);
 		parser.setResolveBindings(resolveBindings);
@@ -173,7 +267,7 @@
 		return null;
 	}
 
-	public static SingleVariableDeclaration createNewParam(AST ast, String name) {
+	protected static SingleVariableDeclaration createNewParam(AST ast, String name) {
 		SingleVariableDeclaration newParam= ast.newSingleVariableDeclaration();
 		newParam.setType(ast.newPrimitiveType(PrimitiveType.FLOAT));
 		newParam.setName(ast.newSimpleName(name));
@@ -181,20 +275,20 @@
 	}
 
 	/** @deprecated using deprecated code */
-	private void setModifiers(BodyDeclaration bodyDeclaration, int modifiers) {
+	private static void setModifiers(BodyDeclaration bodyDeclaration, int modifiers) {
 		bodyDeclaration.setModifiers(modifiers);
 	}
 
 	/** @deprecated using deprecated code */
-	private void setReturnType(MethodDeclaration methodDeclaration, Type type) {
+	private static void setReturnType(MethodDeclaration methodDeclaration, Type type) {
 		methodDeclaration.setReturnType(type);
 	}
 
-	protected FieldDeclaration createNewField(AST ast, String name) {
+	protected static FieldDeclaration createNewField(AST ast, String name) {
 		VariableDeclarationFragment frag= ast.newVariableDeclarationFragment();
 		frag.setName(ast.newSimpleName(name));
 		FieldDeclaration newFieldDecl= ast.newFieldDeclaration(frag);
-		if (ast.apiLevel() == AST_INTERNAL_JLS2) {
+		if (ast.apiLevel() == JLS2_INTERNAL) {
 			setModifiers(newFieldDecl, Modifier.PRIVATE);
 		} else {
 			newFieldDecl.modifiers().add(ast.newModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD));
@@ -203,10 +297,10 @@
 		return newFieldDecl;
 	}
 
-	protected MethodDeclaration createNewMethod(AST ast, String name, boolean isAbstract) {
+	protected static MethodDeclaration createNewMethod(AST ast, String name, boolean isAbstract) {
 		MethodDeclaration decl= ast.newMethodDeclaration();
 		decl.setName(ast.newSimpleName(name));
-		if (ast.apiLevel() == AST_INTERNAL_JLS2) {
+		if (ast.apiLevel() == JLS2_INTERNAL) {
 			setModifiers(decl, isAbstract ? (Modifier.ABSTRACT | Modifier.PRIVATE) : Modifier.PRIVATE);
 			setReturnType(decl, ast.newPrimitiveType(PrimitiveType.VOID));
 		} else {
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java
index 6382569..3073083 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTrackingTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -15,37 +19,40 @@
 import java.util.List;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
-
 import org.eclipse.jdt.core.dom.*;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ITrackedNodePosition;
 
 public class ASTRewritingTrackingTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingTrackingTest.class;
-
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_FIELD_MODIFIERS_PROPERTY = FieldDeclaration.MODIFIERS_PROPERTY;
+	
 	public ASTRewritingTrackingTest(String name) {
 		super(name);
 	}
 
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingTrackingTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingTrackingTest.class);
 	}
 
+	/** 
+	 * Internal access method to VariableDeclarationFragment#setExtraDimensions() for avoiding deprecated warnings
+	 *
+	 * @param node
+	 * @param dimensions
+	 * @deprecated
+	 */
+	private void internalSetExtraDimensions(VariableDeclarationFragment node, int dimensions) {
+		node.setExtraDimensions(dimensions);
+	}
 	public void testNamesWithDelete() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -113,7 +120,7 @@
 		}
 	}
 
-	public void testNamesWithInsert() throws Exception {
+	public void testNamesWithInsert_only_2_3_4() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -159,7 +166,7 @@
 
 		VariableDeclarationFragment newFrag= ast.newVariableDeclarationFragment();
 		newFrag.setName(ast.newSimpleName("newVariable"));
-		newFrag.setExtraDimensions(2);
+		internalSetExtraDimensions(newFrag, 2);
 
 		rewrite.getListRewrite(field, FieldDeclaration.FRAGMENTS_PROPERTY).insertFirst(newFrag, null);
 
@@ -185,7 +192,7 @@
 
 	}
 
-	public void testNamesWithReplace() throws Exception {
+	public void testNamesWithReplace_only_2() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -240,7 +247,7 @@
 
 		// change modifier
 		int newModifiers= Modifier.STATIC | Modifier.TRANSIENT | Modifier.PRIVATE;
-		rewrite.set(field, FieldDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+		rewrite.set(field, INTERNAL_FIELD_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 		String preview= evaluateRewrite(cu, rewrite);
 
@@ -262,7 +269,7 @@
 		assertCorrectTracking(names, positions, expected);
 	}
 
-	public void testNamesWithMove1() throws Exception {
+	public void testNamesWithMove1_only_2_3_4() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -405,7 +412,7 @@
 		assertCorrectTracking(names, positions, expected);
 	}
 
-	public void testNamesWithMove3() throws Exception {
+	public void testNamesWithMove3_only_2_3_4() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
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
new file mode 100644
index 0000000..cea9d59
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingTypeAnnotationsTest.java
@@ -0,0 +1,1074 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * 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.IPackageFragment;
+import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
+
+public class ASTRewritingTypeAnnotationsTest extends ASTRewritingTest {
+
+	public ASTRewritingTypeAnnotationsTest(String name) {
+		super(name);
+	}
+	public ASTRewritingTypeAnnotationsTest(String name, int apiLevel) {
+		super(name, apiLevel);
+	}
+
+	public static Test suite() {
+		return createSuite(ASTRewritingTypeAnnotationsTest.class, AST.JLS8);
+	}
+
+	public void testCastAnnotations() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class X {\n");
+		buf.append("	String myObject = \"Foo\";\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		String myString = (@Annot String) myObject;\n");
+		buf.append("		String myString1 = (@Annot1 @Annot String) myObject;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo");
+		List statements= methodDeclaration.getBody().statements();
+		{//Add an use of annotation.
+			VariableDeclarationStatement  variableDeclarationStatement= (VariableDeclarationStatement) statements.get(0);
+			VariableDeclarationFragment variableDeclarationFragment= (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			CastExpression castExpression= (CastExpression) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType= (SimpleType) castExpression.getType();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			VariableDeclarationStatement  variableDeclarationStatement= (VariableDeclarationStatement) statements.get(1);
+			VariableDeclarationFragment variableDeclarationFragment= (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			CastExpression castExpression= (CastExpression) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType= (SimpleType) castExpression.getType();
+			List annotations = simpleType.annotations();
+			//Remove the use of an Annotation
+			rewrite.remove((ASTNode)annotations.get(1), null);
+			//Replace the use of an Annotation
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.replace((ASTNode)annotations.get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class X {\n");
+		buf.append("	String myObject = \"Foo\";\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		String myString = (@Annot @Annot2 String) myObject;\n");
+		buf.append("		String myString1 = (@Annot2 String) myObject;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("@java.lang.annotation.Target(value = {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testWildcardTypeArgumentAnnotations() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Base {\n");
+		buf.append("	}\n");
+		buf.append("	public static void UnboundedWildcard1 (Helper<@Annot ?> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void UnboundedWildcard2 (Helper<@Annot1 @Annot ?> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void BoundedWildcard1 (Helper<@Annot ? extends Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void BoundedWildcard2 (Helper<@Annot1 @Annot ? extends Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		{//Add an use of an annotation.
+			MethodDeclaration methodDeclaration= findMethodDeclaration(type, "UnboundedWildcard1");
+			List parameters= methodDeclaration.parameters();
+			SingleVariableDeclaration singleVariableDeclaration= (SingleVariableDeclaration) parameters.get(0);
+			ParameterizedType parameterizedType= (ParameterizedType) singleVariableDeclaration.getType();
+			WildcardType wildcardType= (WildcardType) parameterizedType.typeArguments().get(0);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(wildcardType, WildcardType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+
+			methodDeclaration= findMethodDeclaration(type, "BoundedWildcard1");
+			parameters= methodDeclaration.parameters();
+			singleVariableDeclaration= (SingleVariableDeclaration) parameters.get(0);
+			parameterizedType= (ParameterizedType) singleVariableDeclaration.getType();
+			wildcardType= (WildcardType) parameterizedType.typeArguments().get(0);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(wildcardType, WildcardType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			MethodDeclaration methodDeclaration= findMethodDeclaration(type, "UnboundedWildcard2");
+			List parameters= methodDeclaration.parameters();
+			SingleVariableDeclaration singleVariableDeclaration= (SingleVariableDeclaration) parameters.get(0);
+			ParameterizedType parameterizedType= (ParameterizedType) singleVariableDeclaration.getType();
+			WildcardType wildcardType= (WildcardType) parameterizedType.typeArguments().get(0);
+
+			methodDeclaration= findMethodDeclaration(type, "BoundedWildcard2");
+			parameters= methodDeclaration.parameters();
+			singleVariableDeclaration= (SingleVariableDeclaration) parameters.get(0);
+			parameterizedType= (ParameterizedType) singleVariableDeclaration.getType();
+			WildcardType wildcardType2= (WildcardType) parameterizedType.typeArguments().get(0);
+
+			//Remove the use of an annotation
+			rewrite.remove((MarkerAnnotation) wildcardType.annotations().get(1), null);
+			rewrite.remove((MarkerAnnotation) wildcardType2.annotations().get(1), null);
+
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			MarkerAnnotation markerAnnotation2= ast.newMarkerAnnotation();
+			markerAnnotation2.setTypeName(ast.newSimpleName("Annot2"));
+
+			//Replace the use of an annotation
+			rewrite.replace((MarkerAnnotation) wildcardType.annotations().get(0), markerAnnotation, null);
+			rewrite.replace((MarkerAnnotation) wildcardType2.annotations().get(0), markerAnnotation2, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Base {\n");
+		buf.append("	}\n");
+		buf.append("	public static void UnboundedWildcard1 (Helper<@Annot @Annot2 ?> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void UnboundedWildcard2 (Helper<@Annot2 ?> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void BoundedWildcard1 (Helper<@Annot @Annot2 ? extends Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void BoundedWildcard2 (Helper<@Annot2 ? extends Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testWildcardBoudAnnotation() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+
+		buf.append("public class X {\n");
+		buf.append("	public class Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Base {\n");
+		buf.append("	}\n");
+		buf.append("	public static void foo1 (Helper<? extends @Annot Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void foo2 (Helper<? extends @Annot1 @Annot Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		{
+			MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo1");
+			List parameters= methodDeclaration.parameters();
+			SingleVariableDeclaration singleVariableDeclaration= (SingleVariableDeclaration) parameters.get(0);
+			ParameterizedType parameterizedType= (ParameterizedType) singleVariableDeclaration.getType();
+			WildcardType wildcardType= (WildcardType) parameterizedType.typeArguments().get(0);
+			SimpleType simpleType= (SimpleType) wildcardType.getBound();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo2");
+			List parameters= methodDeclaration.parameters();
+			SingleVariableDeclaration singleVariableDeclaration= (SingleVariableDeclaration) parameters.get(0);
+			ParameterizedType parameterizedType= (ParameterizedType) singleVariableDeclaration.getType();
+			WildcardType wildcardType= (WildcardType) parameterizedType.typeArguments().get(0);
+			SimpleType simpleType= (SimpleType) wildcardType.getBound();
+			//Remove the use of annotation
+			rewrite.remove((MarkerAnnotation) simpleType.annotations().get(1), null);
+			//Replace the use of annotation
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.replace((MarkerAnnotation) simpleType.annotations().get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("public class X {\n");
+		buf.append("	public class Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Base {\n");
+		buf.append("	}\n");
+		buf.append("	public static void foo1 (Helper<? extends @Annot @Annot2 Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("	public static void foo2 (Helper<? extends @Annot2 Base> x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testTypeParameterBoundAnnotations() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Base {\n");
+		buf.append("	}\n");
+		buf.append("	public <X extends @Annot Base> void foo1 (X x) {\n");
+		buf.append("	}\n");
+		buf.append("	public <X extends @Annot1 @Annot Base> void foo2 (X x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		{//Add an use of annotation
+			MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo1");
+			TypeParameter typeParameter= (TypeParameter) methodDeclaration.typeParameters().get(0);
+			SimpleType simpleType= (SimpleType) typeParameter.typeBounds().get(0);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo2");
+			TypeParameter typeParameter= (TypeParameter) methodDeclaration.typeParameters().get(0);
+			SimpleType simpleType= (SimpleType) typeParameter.typeBounds().get(0);
+			//Remove an use of annotation
+			rewrite.remove((MarkerAnnotation) simpleType.annotations().get(1), null);
+			//Replace an use of annotation
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.replace((MarkerAnnotation) simpleType.annotations().get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Base {\n");
+		buf.append("	}\n");
+		buf.append("	public <X extends @Annot @Annot2 Base> void foo1 (X x) {\n");
+		buf.append("	}\n");
+		buf.append("	public <X extends @Annot2 Base> void foo2 (X x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testTypeArgumentsParameterizedClassesAnnotations() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper <T1, T2> {\n");
+		buf.append("	}\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		Helper<@Annot String, @Annot @Annot1 String> x;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo");
+		List statements= methodDeclaration.getBody().statements();
+		VariableDeclarationStatement  variableDeclarationStatement= (VariableDeclarationStatement) statements.get(0);
+		ParameterizedType parameterizedType= (ParameterizedType) variableDeclarationStatement.getType();
+		{// Add an use of annotation
+			SimpleType simpleType= (SimpleType) parameterizedType.typeArguments().get(0);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+			//Replace an use of an annotation
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot3"));
+			rewrite.replace((ASTNode) simpleType.annotations().get(0), markerAnnotation, null);
+		}
+		{
+			SimpleType simpleType= (SimpleType) parameterizedType.typeArguments().get(1);
+			//Remove an use of an annotation
+			rewrite.remove((ASTNode) simpleType.annotations().get(1), null);
+			//Empty annotations list
+			rewrite.remove((ASTNode) simpleType.annotations().get(0), null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper <T1, T2> {\n");
+		buf.append("	}\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		Helper<@Annot3 @Annot2 String, String> x;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testTypeArgumentsMethodInvocation() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Bar {\n");
+		buf.append("	}\n");
+		buf.append("	\n");
+		buf.append("	public class Helper {\n");
+		buf.append("		public <T> void foo() {\n");
+		buf.append("		}\n");
+		buf.append("	}\n");
+		buf.append("	\n");
+		buf.append("	public void zoo() {\n");
+		buf.append("		Helper o = new Helper();\n");
+		buf.append("		o.<@Annot Bar>foo();\n");
+		buf.append("		o.<@Annot @Annot1 Bar>foo();\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration = findMethodDeclaration(type, "zoo");
+		List statemList = methodDeclaration.getBody().statements();
+		{// Add an use of an annotation
+			ExpressionStatement expression= (ExpressionStatement) statemList.get(1);
+			MethodInvocation methodInvocation= (MethodInvocation) expression.getExpression();
+			SimpleType simpleType = (SimpleType) methodInvocation.typeArguments().get(0);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			ExpressionStatement expression= (ExpressionStatement) statemList.get(2);
+			MethodInvocation methodInvocation= (MethodInvocation) expression.getExpression();
+			SimpleType simpleType = (SimpleType) methodInvocation.typeArguments().get(0);
+			rewrite.remove((MarkerAnnotation)simpleType.annotations().get(1), null);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.replace((MarkerAnnotation)simpleType.annotations().get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Bar {\n");
+		buf.append("	}\n");
+		buf.append("	\n");
+		buf.append("	public class Helper {\n");
+		buf.append("		public <T> void foo() {\n");
+		buf.append("		}\n");
+		buf.append("	}\n");
+		buf.append("	\n");
+		buf.append("	public void zoo() {\n");
+		buf.append("		Helper o = new Helper();\n");
+		buf.append("		o.<@Annot @Annot2 Bar>foo();\n");
+		buf.append("		o.<@Annot2 Bar>foo();\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testClassInheritenceAnnotations() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public interface Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Foo1<T> implements @Annot Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Foo2<T> implements @Annot @Annot1 Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		{//Add the use of an annotation
+			TypeDeclaration typeDeclaration= (TypeDeclaration) type.bodyDeclarations().get(1);
+			ParameterizedType parameterizedType= (ParameterizedType) typeDeclaration.superInterfaceTypes().get(0);
+			SimpleType simpleType= (SimpleType) parameterizedType.getType();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			TypeDeclaration typeDeclaration= (TypeDeclaration) type.bodyDeclarations().get(2);
+			ParameterizedType parameterizedType= (ParameterizedType) typeDeclaration.superInterfaceTypes().get(0);
+			SimpleType simpleType= (SimpleType) parameterizedType.getType();
+			//Remove the use of an annotation
+			rewrite.remove((MarkerAnnotation) simpleType.annotations().get(1), null);
+			//Replace the use of an annotation
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.replace((MarkerAnnotation) simpleType.annotations().get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public interface Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Foo1<T> implements @Annot @Annot2 Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("	public class Foo2<T> implements @Annot2 Helper<T> {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testTypeTests() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper {\n");
+		buf.append("	}\n");
+		buf.append("	\n");
+		buf.append("	public void foo() {\n");
+		buf.append("	Helper a = new @Annot Helper();\n");
+		buf.append("	boolean x = true;\n");
+		buf.append("	x = a instanceof @Annot Helper;\n");
+		buf.append("	x = a instanceof @Annot @Annot1 Helper;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo");
+		{//Add an use of annotation
+			ExpressionStatement expressionStatement= (ExpressionStatement) methodDeclaration.getBody().statements().get(2);
+			Assignment assignment= (Assignment) expressionStatement.getExpression();
+			InstanceofExpression instanceofExpression= (InstanceofExpression) assignment.getRightHandSide();
+			SimpleType simpleType = (SimpleType) instanceofExpression.getRightOperand();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			ExpressionStatement expressionStatement= (ExpressionStatement) methodDeclaration.getBody().statements().get(3);
+			Assignment assignment= (Assignment) expressionStatement.getExpression();
+			InstanceofExpression instanceofExpression= (InstanceofExpression) assignment.getRightHandSide();
+			SimpleType simpleType = (SimpleType) instanceofExpression.getRightOperand();
+			//Remove an use of annotation
+			rewrite.remove((MarkerAnnotation) simpleType.annotations().get(1), null);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			//Replace an use of annotation
+			rewrite.replace((MarkerAnnotation) simpleType.annotations().get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper {\n");
+		buf.append("	}\n");
+		buf.append("	\n");
+		buf.append("	public void foo() {\n");
+		buf.append("	Helper a = new @Annot Helper();\n");
+		buf.append("	boolean x = true;\n");
+		buf.append("	x = a instanceof @Annot @Annot2 Helper;\n");
+		buf.append("	x = a instanceof @Annot2 Helper;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testConstructorInvocation() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append(" \n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper {\n");
+		buf.append("	}	\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		Helper obj = new @Annot Helper();\n");
+		buf.append("		obj = new @Annot @Annot1 Helper();\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo");
+		List statements= methodDeclaration.getBody().statements();
+		{//Add an use of annotation
+			VariableDeclarationStatement  variableDeclarationStatement= (VariableDeclarationStatement) statements.get(0);
+			VariableDeclarationFragment variableDeclarationFragment= (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType = (SimpleType) classInstanceCreation.getType();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			ExpressionStatement expressionStatement= (ExpressionStatement) methodDeclaration.getBody().statements().get(1);
+			Assignment assignment= (Assignment) expressionStatement.getExpression();
+			ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) assignment.getRightHandSide();
+			SimpleType simpleType = (SimpleType) classInstanceCreation.getType();
+			//Remove an use of annotation
+			rewrite.remove((MarkerAnnotation) simpleType.annotations().get(1), null);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			//Replace an use of annotation
+			rewrite.replace((MarkerAnnotation) simpleType.annotations().get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append(" \n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper {\n");
+		buf.append("	}	\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		Helper obj = new @Annot @Annot2 Helper();\n");
+		buf.append("		obj = new @Annot2 Helper();\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testConstructorDeclaration() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	@Annot X () {\n");
+		buf.append("	}\n");
+		buf.append("	@Annot @Annot1 X (int x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		{//Add the use of annotation
+			MethodDeclaration methodDeclaration= (MethodDeclaration) type.bodyDeclarations().get(0);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(methodDeclaration, MethodDeclaration.MODIFIERS2_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		{
+			//Remove the use of annotation
+			MethodDeclaration methodDeclaration= (MethodDeclaration) type.bodyDeclarations().get(1);
+			rewrite.remove((MarkerAnnotation) methodDeclaration.modifiers().get(1), null);
+			//Replace the use of annotation
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.replace((MarkerAnnotation) methodDeclaration.modifiers().get(0), markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	@Annot\n");
+		buf.append("    @Annot2 X () {\n");
+		buf.append("	}\n");
+		buf.append("	@Annot2 X (int x) {\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE)\n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void testRewriteInsertAPIAnnotation() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper <T1, T2> {\n");
+		buf.append("	}\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		Helper<@Annot @Annot1 String> x;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo");
+		List statements= methodDeclaration.getBody().statements();
+		VariableDeclarationStatement variableDeclarationStatement= (VariableDeclarationStatement) statements.get(0);
+		ParameterizedType parameterizedType= (ParameterizedType) variableDeclarationStatement.getType();
+		{
+			SimpleType simpleType= (SimpleType) parameterizedType.typeArguments().get(0);
+			//Insert first
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertFirst(markerAnnotation, null);
+
+			//InsertAt
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot3"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertAt(markerAnnotation, 1, null);
+
+			//Insert after
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot4"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertAfter(markerAnnotation, (MarkerAnnotation) simpleType.annotations().get(1), null);
+
+			//Insert before
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot5"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertBefore(markerAnnotation, (MarkerAnnotation) simpleType.annotations().get(1), null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf = new StringBuffer();
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("\n");
+		buf.append("public class X {\n");
+		buf.append("	public class Helper <T1, T2> {\n");
+		buf.append("	}\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		Helper<@Annot2 @Annot3 @Annot @Annot5 @Annot1 @Annot4 String> x;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot {}\n");
+		buf.append("\n");
+		buf.append("@java.lang.annotation.Target (ElementType.TYPE_USE) \n");
+		buf.append("@interface Annot1 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	public void _testEmptyListInsertAnnotation() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class X {\n");
+		buf.append("	String myObject = \"Foo\";\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		String myString = (String) myObject;\n");
+		buf.append("	}\n");
+		buf.append("}\n");
+
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration type= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(type, "foo");
+		List statements= methodDeclaration.getBody().statements();
+		{//Add an use of annotation.
+			VariableDeclarationStatement  variableDeclarationStatement= (VariableDeclarationStatement) statements.get(0);
+			VariableDeclarationFragment variableDeclarationFragment= (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			CastExpression castExpression= (CastExpression) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType= (SimpleType) castExpression.getType();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot"));
+			rewrite.getListRewrite(simpleType, SimpleType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("public class X {\n");
+		buf.append("	String myObject = \"Foo\";\n");
+		buf.append("	public void foo() {\n");
+		buf.append("		String myString = (@Annot String) myObject;\n");//Actual: String myString = ( @AnnotString) myObject;
+		buf.append("	}\n");
+		buf.append("}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	/**
+	 * ASTRewriterTests for PackageQualifiedType
+	 * @throws Exception
+	 * 
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=406469
+	 */
+	public void testPackageQualifiedTypeAnnotations() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test406469.bug", false, null);
+		String contents = "package test406469.bug;\n" +
+				"import java.lang.annotation.*;\n" +
+				"public class X {\n" +
+				"	@Target(ElementType.TYPE_USE)\n" +
+				"	@Retention(RetentionPolicy.RUNTIME)\n" +
+				"	@Documented\n" +
+				"	static @interface NonNull { }\n" +
+				"	class Inner {}\n" +
+				"	\n" +
+				"	/**\n" +
+				" 	* @param arg  \n" +
+				" 	*/\n" +
+				"	test406469.bug.@NonNull IOException foo(\n" +
+				"			test406469.bug.@NonNull FileNotFoundException arg)\n" +
+				"		throws test406469.bug.@NonNull EOFException {\n" +
+				"		try {\n" +
+				"			test406469.bug.@NonNull IOError e = new test406469.bug.IOError();\n" +
+				"			throw e;\n" +
+				"		} catch (test406469.bug.@NonNull IOError e) {\n" +
+				"		}\n" +
+				"		return null;\n" +
+				"	} \n" +
+				"	test406469.bug.@NonNull X.@NonNull Inner fInner;\n" +
+				"} \n" +
+				"@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {} \n" +
+				"\n" +
+				"class Outer {\n" +
+				"	public class Inner {\n" +
+				"		public class Deeper {}\n" +
+				"	}\n" +
+				"}\n" +
+				"class IOException extends Exception {private static final long serialVersionUID=10001L;}\n" +
+				"class FileNotFoundException extends Exception{private static final long serialVersionUID=10002L;}\n" +
+				"class EOFException extends Exception{private static final long serialVersionUID=10003L;}\n" +
+				"class IOError extends Exception{private static final long serialVersionUID=10004L;}\n";
+		StringBuffer buf = new StringBuffer(contents);			
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu, /* resolve */ true, false);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration typeDeclaration= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(typeDeclaration, "foo");
+		{   //replace an annotation.
+			PackageQualifiedType packageQualifiedType = (PackageQualifiedType) methodDeclaration.getReturnType2();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Marker"));
+			rewrite.replace((ASTNode) packageQualifiedType.annotations().get(0), markerAnnotation, null);
+
+			// remove an annotation
+			SingleVariableDeclaration param = (SingleVariableDeclaration) methodDeclaration.parameters().get(0);
+			packageQualifiedType = (PackageQualifiedType) param.getType();
+			rewrite.remove((ASTNode) packageQualifiedType.annotations().get(0), null);
+			
+			// insert an annotation after an existing annotation
+			packageQualifiedType = (PackageQualifiedType) methodDeclaration.thrownExceptionTypes().get(0);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Marker"));
+			rewrite.getListRewrite(packageQualifiedType, PackageQualifiedType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+			
+			/* insert an annotation in a type not converted as a PackageQualifiedType. This would involve
+			 *  creation of a PackageQualifiedType from fields of the existing type.
+			 */
+			TryStatement tryStatement = (TryStatement) methodDeclaration.getBody().statements().get(0);
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) tryStatement.getBody().statements().get(0);
+			VariableDeclarationFragment variableDeclarationFragment = (VariableDeclarationFragment) variableDeclarationStatement.fragments().get(0);
+			ClassInstanceCreation classInstanceCreation = (ClassInstanceCreation) variableDeclarationFragment.getInitializer();
+			SimpleType simpleType = (SimpleType) classInstanceCreation.getType();
+			QualifiedName qualifiedName = (QualifiedName) simpleType.getName();
+			SimpleName simpleName = ast.newSimpleName(qualifiedName.getName().getIdentifier());
+			qualifiedName = (QualifiedName) qualifiedName.getQualifier();
+			qualifiedName = ast.newQualifiedName(ast.newName(qualifiedName.getQualifier().toString()), ast.newSimpleName(qualifiedName.getName().toString()));
+			packageQualifiedType = ast.newPackageQualifiedType(qualifiedName, simpleName);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Marker"));
+			rewrite.getListRewrite(packageQualifiedType, PackageQualifiedType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+			rewrite.replace(classInstanceCreation.getType(), packageQualifiedType, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		String contentsmodified = "package test406469.bug;\n" +
+				"import java.lang.annotation.*;\n" +
+				"public class X {\n" +
+				"	@Target(ElementType.TYPE_USE)\n" +
+				"	@Retention(RetentionPolicy.RUNTIME)\n" +
+				"	@Documented\n" +
+				"	static @interface NonNull { }\n" +
+				"	class Inner {}\n" +
+				"	\n" +
+				"	/**\n" +
+				" 	* @param arg  \n" +
+				" 	*/\n" +
+				"	test406469.bug.@Marker IOException foo(\n" +
+				"			test406469.bug.FileNotFoundException arg)\n" +
+				"		throws test406469.bug.@NonNull @Marker EOFException {\n" +
+				"		try {\n" +
+				"			test406469.bug.@NonNull IOError e = new test406469.bug.@Marker IOError();\n" +
+				"			throw e;\n" +
+				"		} catch (test406469.bug.@NonNull IOError e) {\n" +
+				"		}\n" +
+				"		return null;\n" +
+				"	} \n" +
+				"	test406469.bug.@NonNull X.@NonNull Inner fInner;\n" +
+				"} \n" +
+				"@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {} \n" +
+				"\n" +
+				"class Outer {\n" +
+				"	public class Inner {\n" +
+				"		public class Deeper {}\n" +
+				"	}\n" +
+				"}\n" +
+				"class IOException extends Exception {private static final long serialVersionUID=10001L;}\n" +
+				"class FileNotFoundException extends Exception{private static final long serialVersionUID=10002L;}\n" +
+				"class EOFException extends Exception{private static final long serialVersionUID=10003L;}\n" +
+				"class IOError extends Exception{private static final long serialVersionUID=10004L;}\n";
+		assertEqualString(preview, contentsmodified);
+	}
+
+	/**
+	 * ASTRewriterTests for QualifiedType
+	 * @throws Exception
+	 * 
+	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=407364
+	 */
+	public void testQualifiedTypeAnnotations() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test407364.bug", false, null);
+		String contents =  "package test0002;\n" +
+				 "import java.lang.annotation.Target;\n" +
+				 "public class X {\n" +
+				 "	public static void main(String[] args) {\n" +
+				 "		Outer outer = new Outer();\n" +
+				 "		Outer.@Marker1 Inner first = outer.new Inner();\n" +
+				 "		Outer.@Marker2 Inner second = outer.new Inner() ;\n" +
+				 "		Outer.Inner.@Marker1 Deeper deeper = second.new Deeper();\n" +
+				 "		Outer.Inner.Deeper deeper2 =  second.new Deeper();\n" +
+				 "	}\n" + "}\n" + "class Outer {\n" +
+				 "	public class Inner {\n" + 
+				 "		public class Deeper {\n" +
+				 "		}\n" + 
+				 "	}\n" + 
+				 "}\n" +
+				 "@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				 "@interface Marker {}\n" +
+				 "@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				 "@interface Marker1 {}\n" +
+				 "@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				 "@interface Marker2 {}\n";
+		
+		StringBuffer buf = new StringBuffer(contents);			
+		ICompilationUnit cu= pack1.createCompilationUnit("X.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu, /* resolve */ true, false);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+		TypeDeclaration typeDeclaration= findTypeDeclaration(astRoot, "X");
+		MethodDeclaration methodDeclaration= findMethodDeclaration(typeDeclaration, "main");
+		List statements = methodDeclaration.getBody().statements();
+		int sCount = 1;
+
+		{   //replace an annotation.
+			VariableDeclarationStatement variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+			QualifiedType qualifiedType = (QualifiedType) variableDeclarationStatement.getType();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("NewMarker"));
+			rewrite.replace((ASTNode) qualifiedType.annotations().get(0), markerAnnotation, null);
+			
+			// remove an annotation
+			variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+			qualifiedType = (QualifiedType) variableDeclarationStatement.getType();
+			rewrite.remove((ASTNode) qualifiedType.annotations().get(0), null);
+			
+			// insert an annotation after an existing annotation
+			variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+			qualifiedType = (QualifiedType) variableDeclarationStatement.getType();
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("NewMarker"));
+			rewrite.getListRewrite(qualifiedType, QualifiedType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+			
+			/* insert an annotation in a type not converted as QualifiedType. This would involve
+			 *  creation of a QualifiedType from fields of the existing type.
+			 */
+			variableDeclarationStatement = (VariableDeclarationStatement) statements.get(sCount++);
+			SimpleType simpleType = (SimpleType) variableDeclarationStatement.getType();
+			QualifiedName qualifiedName = (QualifiedName) simpleType.getName();
+			SimpleName simpleName = ast.newSimpleName(qualifiedName.getName().getIdentifier());
+			qualifiedName = (QualifiedName) qualifiedName.getQualifier();
+			qualifiedName = ast.newQualifiedName(ast.newName(qualifiedName.getQualifier().toString()), ast.newSimpleName(qualifiedName.getName().toString()));
+			qualifiedType = ast.newQualifiedType(ast.newSimpleType(qualifiedName), simpleName);
+			
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("NewMarker"));
+			rewrite.getListRewrite(qualifiedType, QualifiedType.ANNOTATIONS_PROPERTY).insertLast(markerAnnotation, null);
+			rewrite.replace(variableDeclarationStatement.getType(), qualifiedType, null);
+		}
+		String preview= evaluateRewrite(cu, rewrite);
+		String contentsmodified = "package test0002;\n" +
+				 "import java.lang.annotation.Target;\n" +
+				 "public class X {\n" +
+				 "	public static void main(String[] args) {\n" +
+				 "		Outer outer = new Outer();\n" +
+				 "		Outer.@NewMarker Inner first = outer.new Inner();\n" +
+				 "		Outer.Inner second = outer.new Inner() ;\n" +
+				 "		Outer.Inner.@Marker1 @NewMarker Deeper deeper = second.new Deeper();\n" +
+				 "		Outer. Inner.@NewMarker Deeper deeper2 =  second.new Deeper();\n" +
+				 "	}\n" + "}\n" + "class Outer {\n" +
+				 "	public class Inner {\n" + 
+				 "		public class Deeper {\n" +
+				 "		}\n" + 
+				 "	}\n" + 
+				 "}\n" +
+				 "@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				 "@interface Marker {}\n" +
+				 "@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				 "@interface Marker1 {}\n" +
+				 "@Target (java.lang.annotation.ElementType.TYPE_USE)\n" +
+				 "@interface Marker2 {}\n";
+		assertEqualString(preview, contentsmodified);
+	}
+}
\ No newline at end of file
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 f86fa4f..eacb130 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
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -17,29 +21,76 @@
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Annotation;
+import org.eclipse.jdt.core.dom.AnnotationTypeDeclaration;
+import org.eclipse.jdt.core.dom.AnnotationTypeMemberDeclaration;
+import org.eclipse.jdt.core.dom.AnonymousClassDeclaration;
+import org.eclipse.jdt.core.dom.ArrayType;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.ChildListPropertyDescriptor;
+import org.eclipse.jdt.core.dom.ChildPropertyDescriptor;
+import org.eclipse.jdt.core.dom.ClassInstanceCreation;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.EnumConstantDeclaration;
+import org.eclipse.jdt.core.dom.EnumDeclaration;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
+import org.eclipse.jdt.core.dom.Dimension;
+import org.eclipse.jdt.core.dom.FieldDeclaration;
+import org.eclipse.jdt.core.dom.ImportDeclaration;
+import org.eclipse.jdt.core.dom.MarkerAnnotation;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.Modifier;
+import org.eclipse.jdt.core.dom.Name;
+import org.eclipse.jdt.core.dom.PackageDeclaration;
+import org.eclipse.jdt.core.dom.ParameterizedType;
+import org.eclipse.jdt.core.dom.PrimitiveType;
+import org.eclipse.jdt.core.dom.SimpleName;
+import org.eclipse.jdt.core.dom.SimplePropertyDescriptor;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.StringLiteral;
+import org.eclipse.jdt.core.dom.Type;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.TypeParameter;
+import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
+import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
+import org.eclipse.jdt.core.dom.WildcardType;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
 
 public class ASTRewritingTypeDeclTest extends ASTRewritingTest {
 
-	private static final Class THIS= ASTRewritingTypeDeclTest.class;
-
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_TYPE_MODIFIERS_PROPERTY = TypeDeclaration.MODIFIERS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_TYPE_SUPERCLASS_PROPERTY = TypeDeclaration.SUPERCLASS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final ChildListPropertyDescriptor INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY = TypeDeclaration.SUPER_INTERFACES_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY = VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VARIABLE_MODIFIERS_PROPERTY = SingleVariableDeclaration.MODIFIERS_PROPERTY;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VARIABLE_EXTRA_DIMENSIONS_PROPERTY = SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY;
+	
+	
 	public ASTRewritingTypeDeclTest(String name) {
 		super(name);
 	}
-
-	public static Test allTests() {
-		return new Suite(THIS);
+	public ASTRewritingTypeDeclTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingTypeDeclTest.class);
 	}
 
 	/** @deprecated using deprecated code */
-	public void testTypeDeclChanges() throws Exception {
+	public void testTypeDeclChanges_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -100,7 +151,7 @@
 
 			// change flags
 			int newModifiers= 0;
-			rewrite.set(type, TypeDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(type, INTERNAL_TYPE_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			// change to interface
 			rewrite.set(type, TypeDeclaration.INTERFACE_PROPERTY, Boolean.TRUE, null);
@@ -118,14 +169,14 @@
 
 			// change flags
 			int newModifiers= 0;
-			rewrite.set(type, TypeDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(type, INTERNAL_TYPE_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			// change to class
 			rewrite.set(type, TypeDeclaration.INTERFACE_PROPERTY, Boolean.FALSE, null);
 
 
 			SimpleName newSuperclass= ast.newSimpleName("Object");
-			rewrite.set(type, TypeDeclaration.SUPERCLASS_PROPERTY, newSuperclass, null);
+			rewrite.set(type, INTERNAL_TYPE_SUPERCLASS_PROPERTY, newSuperclass, null);
 		}
 
 
@@ -178,14 +229,14 @@
 		assertEqualString(preview, buf.toString());
 	}
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=308754
-	public void testTypeDeclarationChange2() throws Exception {
+	public void testTypeDeclarationChange2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
 		buf.append("@A(X.class) public class C {}");
 		ICompilationUnit cu= pack1.createCompilationUnit("C.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		{
 			// change to interface
@@ -202,7 +253,7 @@
 		buf.append("@A(X.class) public interface C {}");
 		assertEqualString(preview, buf.toString());
 	}
-	public void testTypeDeclChanges2() throws Exception {
+	public void testTypeDeclChanges2_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -228,7 +279,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -313,7 +364,7 @@
 	}
 
 	/** @deprecated using deprecated code */
-	public void testTypeDeclRemoves() throws Exception {
+	public void testTypeDeclRemoves_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -346,7 +397,7 @@
 
 			// change flags
 			int newModifiers= 0;
-			rewrite.set(type, TypeDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(type, INTERNAL_TYPE_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			// change to interface
 			rewrite.set(type, TypeDeclaration.INTERFACE_PROPERTY, Boolean.TRUE, null);
@@ -374,7 +425,7 @@
 
 			// change flags
 			int newModifiers= Modifier.FINAL;
-			rewrite.set(type, TypeDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(type, INTERNAL_TYPE_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			// change to interface
 			rewrite.set(type, TypeDeclaration.INTERFACE_PROPERTY, Boolean.TRUE, null);
@@ -414,7 +465,7 @@
 
 	}
 
-	public void testTypeDeclInserts() throws Exception {
+	public void testTypeDeclInserts_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -449,11 +500,11 @@
 
 			// change flags
 			int newModifiers= Modifier.PUBLIC | Modifier.FINAL;
-			rewrite.set(type, TypeDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(type, INTERNAL_TYPE_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			SimpleName newSuperinterface= ast.newSimpleName("Cloneable");
 
-			rewrite.getListRewrite(type, TypeDeclaration.SUPER_INTERFACES_PROPERTY).insertFirst(newSuperinterface, null);
+			rewrite.getListRewrite(type, INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY).insertFirst(newSuperinterface, null);
 
 			List members= type.bodyDeclarations();
 			assertTrue("Has declarations", !members.isEmpty());
@@ -478,7 +529,7 @@
 			TypeDeclaration type= findTypeDeclaration(astRoot, "F");
 
 			SimpleName newSuperclass= ast.newSimpleName("Exception");
-			rewrite.set(type, TypeDeclaration.SUPERCLASS_PROPERTY, newSuperclass, null);
+			rewrite.set(type, INTERNAL_TYPE_SUPERCLASS_PROPERTY, newSuperclass, null);
 
 			MethodDeclaration newMethodDecl= createNewMethod(ast, "newMethod", false);
 			rewrite.getListRewrite(type, TypeDeclaration.BODY_DECLARATIONS_PROPERTY).insertLast(newMethodDecl, null);
@@ -487,7 +538,7 @@
 			TypeDeclaration type= findTypeDeclaration(astRoot, "G");
 
 			SimpleName newInterface= ast.newSimpleName("Runnable");
-			rewrite.getListRewrite(type, TypeDeclaration.SUPER_INTERFACES_PROPERTY).insertLast(newInterface, null);
+			rewrite.getListRewrite(type, INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY).insertLast(newInterface, null);
 
 			MethodDeclaration newMethodDecl= createNewMethod(ast, "newMethod", true);
 			rewrite.getListRewrite(type, TypeDeclaration.BODY_DECLARATIONS_PROPERTY).insertLast(newMethodDecl,  null);
@@ -530,7 +581,7 @@
 
 	}
 
-	public void testTypeDeclInsertFields1() throws Exception {
+	public void testTypeDeclInsertFields1_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -594,7 +645,7 @@
 	}
 
 
-	public void testTypeParameters() throws Exception {
+	public void testTypeParameters_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -606,7 +657,7 @@
 		buf.append("class J<T>extends A {}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		List types= astRoot.types();
@@ -668,7 +719,7 @@
 
 	}
 
-	public void testAnonymousClassDeclaration() throws Exception {
+	public void testAnonymousClassDeclaration_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -758,7 +809,7 @@
 
 	}
 
-	public void testImportDeclaration() throws Exception {
+	public void testImportDeclaration_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -772,7 +823,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("Z.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -925,7 +976,7 @@
 	}
 	
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=262517
-	public void testSingleMemberAnnotation1() throws Exception {
+	public void testSingleMemberAnnotation1_since_3() throws Exception {
 		String previousValue = null;
 		try {
 			previousValue = this.project1.getOption(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_ANNOTATION, false);
@@ -939,7 +990,7 @@
 			buf.append("}\n");
 			ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 	
-			CompilationUnit astRoot= createAST3(cu);
+			CompilationUnit astRoot= createAST(cu);
 			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 			AST ast= astRoot.getAST();
 	
@@ -973,7 +1024,7 @@
 		}
 	}
 
-	public void testSingleVariableDeclaration() throws Exception {
+	public void testSingleVariableDeclaration_only_2() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -997,9 +1048,9 @@
 			SingleVariableDeclaration decl= (SingleVariableDeclaration) arguments.get(0);
 
 			int newModifiers= Modifier.FINAL;
-			rewrite.set(decl, SingleVariableDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_VARIABLE_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
-			rewrite.set(decl, SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
+			rewrite.set(decl, INTERNAL_VARIABLE_EXTRA_DIMENSIONS_PROPERTY, new Integer(1), null);
 
 			ArrayType newVarType= ast.newArrayType(ast.newPrimitiveType(PrimitiveType.FLOAT), 2);
 			rewrite.replace(decl.getType(), newVarType, null);
@@ -1011,7 +1062,7 @@
 			SingleVariableDeclaration decl= (SingleVariableDeclaration) arguments.get(1);
 
 			int newModifiers= 0;
-			rewrite.set(decl, SingleVariableDeclaration.MODIFIERS_PROPERTY, new Integer(newModifiers), null);
+			rewrite.set(decl, INTERNAL_VARIABLE_MODIFIERS_PROPERTY, new Integer(newModifiers), null);
 
 			Type newVarType= ast.newPrimitiveType(PrimitiveType.FLOAT);
 			rewrite.replace(decl.getType(), newVarType, null);
@@ -1019,7 +1070,7 @@
 		{ // remove extra dim
 			SingleVariableDeclaration decl= (SingleVariableDeclaration) arguments.get(2);
 
-			rewrite.set(decl, SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY, new Integer(0), null);
+			rewrite.set(decl, INTERNAL_VARIABLE_EXTRA_DIMENSIONS_PROPERTY, new Integer(0), null);
 		}
 
 		String preview= evaluateRewrite(cu, rewrite);
@@ -1034,7 +1085,7 @@
 
 	}
 
-	public void testVariableDeclarationFragment() throws Exception {
+	public void testVariableDeclarationFragment_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1068,7 +1119,7 @@
 			ASTNode name= ast.newSimpleName("a");
 			rewrite.replace(fragment.getName(), name, null);
 
-			rewrite.set(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY, new Integer(2), null);
+			rewrite.set(fragment, INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY, new Integer(2), null);
 		}
 
 		{ // add initializer
@@ -1089,7 +1140,7 @@
 		{ // add dimension, add initializer
 			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(3);
 
-			rewrite.set(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY, new Integer(4), null);
+			rewrite.set(fragment, INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY, new Integer(4), null);
 
 			assertTrue("Has initializer", fragment.getInitializer() == null);
 
@@ -1099,7 +1150,7 @@
 		{ // remove dimension
 			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(4);
 
-			rewrite.set(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY, new Integer(0), null);
+			rewrite.set(fragment, INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY, new Integer(0), null);
 		}
 
 		String preview= evaluateRewrite(cu, rewrite);
@@ -1115,7 +1166,7 @@
 
 	}
 
-	public void testTypeDeclSpacingMethods1() throws Exception {
+	public void testTypeDeclSpacingMethods1_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1159,7 +1210,7 @@
 
 	}
 
-	public void testTypeDeclSpacingMethods2() throws Exception {
+	public void testTypeDeclSpacingMethods2_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1206,7 +1257,7 @@
 
 	}
 
-	public void testTypeDeclSpacingFields() throws Exception {
+	public void testTypeDeclSpacingFields_only_2_3_4() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1256,7 +1307,7 @@
 
 	}
 
-	public void testEnumDeclaration() throws Exception {
+	public void testEnumDeclaration_since_3() throws Exception {
 		// test the creation of an enum declaration
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1266,7 +1317,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -1310,7 +1361,7 @@
 	}
 
 
-	public void testEnumDeclaration1() throws Exception {
+	public void testEnumDeclaration1_since_3() throws Exception {
 		// test the creation of an enum declaration
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1320,7 +1371,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -1347,7 +1398,7 @@
 	}
 
 
-	public void testEnumDeclaration2() throws Exception {
+	public void testEnumDeclaration2_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1357,7 +1408,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -1392,7 +1443,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumDeclaration3() throws Exception {
+	public void testEnumDeclaration3_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1402,7 +1453,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -1437,7 +1488,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumDeclaration4() throws Exception {
+	public void testEnumDeclaration4_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1449,7 +1500,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		EnumDeclaration declaration= (EnumDeclaration) findAbstractTypeDeclaration(astRoot, "E");
@@ -1468,7 +1519,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumDeclaration5() throws Exception {
+	public void testEnumDeclaration5_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -1483,7 +1534,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		EnumDeclaration declaration= (EnumDeclaration) findAbstractTypeDeclaration(astRoot, "E");
@@ -1511,7 +1562,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumDeclaration6() throws Exception {
+	public void testEnumDeclaration6_since_3() throws Exception {
 		// test the creation of an enum declaration
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
@@ -1522,7 +1573,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		EnumDeclaration declaration= (EnumDeclaration) findAbstractTypeDeclaration(astRoot, "E");
 
@@ -1541,7 +1592,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testEnumDeclaration7() throws Exception {
+	public void testEnumDeclaration7_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1549,7 +1600,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		EnumDeclaration declaration= (EnumDeclaration) findAbstractTypeDeclaration(astRoot, "E");
 
@@ -1572,7 +1623,7 @@
 	}
 
 
-	public void testAnnotationTypeDeclaration1() throws Exception {
+	public void testAnnotationTypeDeclaration1_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1583,7 +1634,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -1621,7 +1672,7 @@
 
 	}
 
-	public void testWildcardType() throws Exception {
+	public void testWildcardType_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -1630,7 +1681,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 
@@ -1678,7 +1729,207 @@
 		assertEqualString(preview, buf.toString());
 
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=396576
+	public void testVariableDeclarationFragmentWithAnnot_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("        int i, j, k = 0, x, y [] [] [], z @Annot1 [], zz @Annot2 @Annot2[] = {0, 1};\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
 
+		assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED)== 0);
+		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
 
+		MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");
+		Block block= methodDecl.getBody();
+		List statements= block.statements();
+		assertTrue("Number of statements not 1", statements.size()== 1);
+
+		VariableDeclarationStatement variableDeclStatement= (VariableDeclarationStatement) statements.get(0);
+		List fragments= variableDeclStatement.fragments();
+		assertTrue("Number of fragments not 7", fragments.size()== 7);
+
+		{ // rename var, add dimension with annotations
+			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(0);
+			ASTNode name= ast.newSimpleName("a");
+			rewrite.replace(fragment.getName(), name, null);
+
+			ListRewrite listRewrite= rewrite.getListRewrite(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTY);
+			Dimension dim= ast.newDimension();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			dim.annotations().add(markerAnnotation);
+
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			dim.annotations().add(markerAnnotation);
+			listRewrite.insertAt(dim, 0, null);
+		}
+		{ // add initializer
+			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(1);
+			assertTrue("Has initializer", fragment.getInitializer()== null);
+			Expression initializer= ast.newNumberLiteral("1");
+			rewrite.set(fragment, VariableDeclarationFragment.INITIALIZER_PROPERTY, initializer, null);
+		}
+		{ // remove initializer and add extra dimensions with annotations
+			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(2);
+			assertTrue("Has no initializer", fragment.getInitializer() != null);
+			rewrite.remove(fragment.getInitializer(), null);
+
+			ListRewrite listRewrite= rewrite.getListRewrite(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTY);
+			Dimension dim= ast.newDimension();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			dim.annotations().add(markerAnnotation);
+			
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			dim.annotations().add(markerAnnotation);
+			listRewrite.insertAt(dim, 0, null);
+		}
+		{ // add dimension, add initializer
+			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(3);
+			assertTrue("Has initializer", fragment.getInitializer()== null);
+			Expression initializer= ast.newNullLiteral();
+			rewrite.set(fragment, VariableDeclarationFragment.INITIALIZER_PROPERTY, initializer, null);
+
+			ListRewrite listRewrite= rewrite.getListRewrite(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTY);
+
+			Dimension dim= ast.newDimension();
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			dim.annotations().add(markerAnnotation);
+
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			dim.annotations().add(markerAnnotation);
+			listRewrite.insertAt(dim, 0, null);
+		}
+		{ // remove one dimension and add annotations for the rest of the dimensions
+			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(4);
+
+			Dimension dim= (Dimension) fragment.extraDimensions().get(1);
+			ListRewrite listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			MarkerAnnotation markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot1"));
+			listRewrite.insertAt(markerAnnotation, 0, null);
+
+			dim= (Dimension) fragment.extraDimensions().get(2);
+			markerAnnotation= ast.newMarkerAnnotation();
+			markerAnnotation.setTypeName(ast.newSimpleName("Annot2"));
+			listRewrite= rewrite.getListRewrite(dim, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.insertAt(markerAnnotation, 0, null);
+
+			listRewrite= rewrite.getListRewrite(fragment, VariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTY);
+			listRewrite.remove((Dimension) fragment.extraDimensions().get(0), null);
+		}
+		{ // remove a fragment
+			ListRewrite listRewrite= rewrite.getListRewrite(variableDeclStatement, VariableDeclarationStatement.FRAGMENTS_PROPERTY);
+			VariableDeclarationFragment fragment= (VariableDeclarationFragment) fragments.get(5);
+			listRewrite.remove(fragment, null);
+		}
+
+		String preview= evaluateRewrite(cu, rewrite);
+
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo() {\n");
+		buf.append("        int a @Annot1 @Annot2 [], j = 1, k @Annot1 @Annot2 [], x @Annot1 @Annot2 [] = null, y @Annot1[] @Annot2[], zz @Annot2 @Annot2[] = {0, 1};\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
+
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=396576
+	public void testSingleVariableDeclarationWithAnnotations_since_8() throws Exception {
+		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
+		StringBuffer buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo(int i, final int[] j @Annot1 @Annot2 [], int[] k @Annot1 @Annot3 [] @Annot2 @Annot3 [], int l []) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
+		CompilationUnit astRoot= createAST(cu);
+		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
+		AST ast= astRoot.getAST();
+
+		assertTrue("Parse errors", (astRoot.getFlags() & ASTNode.MALFORMED)== 0);
+		TypeDeclaration type= findTypeDeclaration(astRoot, "E");
+		MethodDeclaration methodDecl= findMethodDeclaration(type, "foo");
+		List arguments= methodDecl.parameters();
+
+		{ // add modifier, move extra dimensions from one variable to another
+			SingleVariableDeclaration decl= (SingleVariableDeclaration) arguments.get(0);
+			SingleVariableDeclaration decl2= (SingleVariableDeclaration) arguments.get(1);
+			Dimension dim= (Dimension) decl2.extraDimensions().get(0);
+			ListRewrite listRewrite= rewrite.getListRewrite(decl, SingleVariableDeclaration.MODIFIERS2_PROPERTY);
+			listRewrite.insertFirst(ast.newModifier(Modifier.ModifierKeyword.FINAL_KEYWORD), null);
+
+			listRewrite= rewrite.getListRewrite(decl2, SingleVariableDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+			listRewrite.remove(dim, null);
+			listRewrite= rewrite.getListRewrite(decl, SingleVariableDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+			listRewrite.insertAt(dim, 0, null);
+		}
+		{ // move annotations from one dim to another
+			SingleVariableDeclaration decl= (SingleVariableDeclaration) arguments.get(2);
+			Dimension dim1= (Dimension) decl.extraDimensions().get(0);
+			Dimension dim2= (Dimension) decl.extraDimensions().get(1);
+			Annotation annot1= (Annotation) dim1.annotations().get(0);
+			Annotation annot2= (Annotation) dim2.annotations().get(0);
+
+			ListRewrite listRewrite= rewrite.getListRewrite(dim1, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.replace(annot1, annot2, null);
+
+			listRewrite= rewrite.getListRewrite(dim2, Dimension.ANNOTATIONS_PROPERTY);
+			listRewrite.replace(annot2, annot1, null);
+		}
+		{ // remove extra dim
+			SingleVariableDeclaration decl= (SingleVariableDeclaration) arguments.get(3);
+			ListRewrite listRewrite= rewrite.getListRewrite(decl, SingleVariableDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+			listRewrite.remove((Dimension) decl.extraDimensions().get(0), null);
+		}
+
+		String preview= evaluateRewrite(cu, rewrite);
+		buf= new StringBuffer();
+		buf.append("package test1;\n");
+		buf.append("import java.lang.annotation.ElementType;\n");
+		buf.append("public class E {\n");
+		buf.append("    public void foo(final int i @Annot1 @Annot2 [], final int[] j, int[] k @Annot2 @Annot3 [] @Annot1 @Annot3 [], int l) {\n");
+		buf.append("    }\n");
+		buf.append("}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot1 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		buf.append("@java.lang.annotation.Target(value= {ElementType.TYPE_USE})\n");
+		buf.append("@interface Annot2 {}\n");
+		assertEqualString(preview, buf.toString());
+	}
 
 }
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingWithStatementsRecoveryTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingWithStatementsRecoveryTest.java
index 7c262d4..3df878b 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingWithStatementsRecoveryTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/ASTRewritingWithStatementsRecoveryTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
+ * Copyright (c) 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -12,38 +16,29 @@
 import java.util.List;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
-
 import org.eclipse.jdt.core.dom.*;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 
 public class ASTRewritingWithStatementsRecoveryTest extends ASTRewritingTest {
-	private static final Class THIS= ASTRewritingWithStatementsRecoveryTest.class;
 
 	public ASTRewritingWithStatementsRecoveryTest(String name) {
 		super(name);
 	}
 
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public ASTRewritingWithStatementsRecoveryTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(ASTRewritingWithStatementsRecoveryTest.class);
 	}
 
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=272711
-	public void testBug272711_01() throws Exception {
+	public void testBug272711_01_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -54,7 +49,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu, true);
+		CompilationUnit astRoot= createAST(cu, true);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -86,7 +81,7 @@
 	}
 	
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=272711
-	public void testBug272711_02() throws Exception {
+	public void testBug272711_02_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -97,7 +92,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu, true);
+		CompilationUnit astRoot= createAST(cu, true);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
@@ -130,7 +125,7 @@
 	}
 	
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=272711
-	public void testBug272711_03() throws Exception {
+	public void testBug272711_03_since_3() throws Exception {
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
 		buf.append("package test1;\n");
@@ -142,7 +137,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu, true);
+		CompilationUnit astRoot= createAST(cu, true);
 		AST ast= astRoot.getAST();
 		ASTRewrite rewrite= ASTRewrite.create(ast);
 
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 d791a49..ae34e4c 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
@@ -41,7 +41,7 @@
 public class ImportRewriteTest extends AbstractJavaModelTests {
 
 	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
+	 * Internal synonym for deprecated constant AST.JSL3
 	 * to alleviate deprecation warnings.
 	 * @deprecated
 	 */
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java
index 2d974c7..cb04d22 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/LineCommentOffsetsTest.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -14,11 +18,27 @@
 import java.util.List;
 
 import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.dom.*;
+import org.eclipse.jdt.core.dom.AST;
+import org.eclipse.jdt.core.dom.ASTNode;
+import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.CatchClause;
+import org.eclipse.jdt.core.dom.CompilationUnit;
+import org.eclipse.jdt.core.dom.Expression;
+import org.eclipse.jdt.core.dom.ExpressionStatement;
+import org.eclipse.jdt.core.dom.IfStatement;
+import org.eclipse.jdt.core.dom.InfixExpression;
+import org.eclipse.jdt.core.dom.MethodDeclaration;
+import org.eclipse.jdt.core.dom.MethodInvocation;
+import org.eclipse.jdt.core.dom.ParenthesizedExpression;
+import org.eclipse.jdt.core.dom.SimpleType;
+import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
+import org.eclipse.jdt.core.dom.Statement;
+import org.eclipse.jdt.core.dom.TryStatement;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
+import org.eclipse.jdt.core.dom.TypeParameter;
 import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
 import org.eclipse.jdt.core.dom.rewrite.ListRewrite;
 import org.eclipse.jdt.internal.core.dom.rewrite.LineCommentEndOffsets;
@@ -28,24 +48,15 @@
  */
 public class LineCommentOffsetsTest extends ASTRewritingTest {
 
-	private static final Class THIS= LineCommentOffsetsTest.class;
-
 	public LineCommentOffsetsTest(String name) {
 		super(name);
 	}
-
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
+	public LineCommentOffsetsTest(String name, int apiLevel) {
+		super(name, apiLevel);
 	}
 
 	public static Test suite() {
-		return allTests();
+		return createSuite(LineCommentOffsetsTest.class);
 	}
 
 	public void testEmptyLineComments() throws Exception {
@@ -60,7 +71,7 @@
 		assertFalse(res);
 	}
 
-	public void testRemove() throws Exception {
+	public void testRemove_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 
@@ -72,7 +83,7 @@
 		String contents= buf.toString();
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", contents, false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 
 		LineCommentEndOffsets offsets= new LineCommentEndOffsets(astRoot.getCommentList());
 
@@ -219,7 +230,7 @@
 		assertEquals(4, count);
 	}
 
-	public void testCommentInLists() throws Exception {
+	public void testCommentInLists_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -229,7 +240,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -252,7 +263,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testCommentInType() throws Exception {
+	public void testCommentInType_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -262,7 +273,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -285,7 +296,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testBug103340() throws Exception {
+	public void testBug103340_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -295,7 +306,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -319,7 +330,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testBug95839() throws Exception {
+	public void testBug95839_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -334,7 +345,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -363,7 +374,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testBug114418() throws Exception {
+	public void testBug114418_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -378,7 +389,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -413,7 +424,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testBug128818() throws Exception {
+	public void testBug128818_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -428,7 +439,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -454,7 +465,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testBug128422() throws Exception {
+	public void testBug128422_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -468,7 +479,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -497,7 +508,7 @@
 		assertEqualString(preview, buf.toString());
 	}
 
-	public void testBug128422b() throws Exception {
+	public void testBug128422b_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -510,7 +521,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
@@ -552,7 +563,7 @@
 		return ast.newExpressionStatement(inv);
 	}
 
-	public void testCommentAtEnd() throws Exception {
+	public void testCommentAtEnd_since_3() throws Exception {
 
 		IPackageFragment pack1= this.sourceFolder.createPackageFragment("test1", false, null);
 		StringBuffer buf= new StringBuffer();
@@ -562,7 +573,7 @@
 		buf.append("}//comment");
 		ICompilationUnit cu= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 
 		AST ast= astRoot.getAST();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/SourceModifierTest.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/SourceModifierTest.java
index 15be69c..c9c1e76 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/SourceModifierTest.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/rewrite/describing/SourceModifierTest.java
@@ -1,48 +1,40 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.rewrite.describing;
 
+
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
+import org.eclipse.jdt.core.tests.model.AbstractJavaModelTests;
+import org.eclipse.jdt.internal.core.dom.rewrite.SourceModifier;
+import org.eclipse.jface.text.Document;
 import org.eclipse.text.edits.MultiTextEdit;
 import org.eclipse.text.edits.ReplaceEdit;
 
-import org.eclipse.jface.text.Document;
-
-import org.eclipse.jdt.internal.core.dom.rewrite.SourceModifier;
-
 /**
  *
  */
-public class SourceModifierTest extends ASTRewritingTest {
-
-	private static final Class THIS= SourceModifierTest.class;
+public class SourceModifierTest extends AbstractJavaModelTests {
 
 	public SourceModifierTest(String name) {
 		super(name);
 	}
 
-	public static Test allTests() {
-		return new Suite(THIS);
-	}
-
-	public static Test setUpTest(Test someTest) {
-		TestSuite suite= new Suite("one test");
-		suite.addTest(someTest);
-		return suite;
-	}
-
 	public static Test suite() {
-		return allTests();
+		return new TestSuite(SourceModifierTest.class);
 	}
 
 	public void testRemoveIndents() throws Exception {
@@ -93,7 +85,7 @@
 		buf.append("}\n");
 		String expected= buf.toString();
 
-		assertEqualString(preview, expected);
+		StringAsserts.assertEqualString(preview, expected);
 	}
 
 	public void testAddIndents() throws Exception {
@@ -144,6 +136,6 @@
 		buf.append("}\n");
 		String expected= buf.toString();
 
-		assertEqualString(preview, expected);
+		StringAsserts.assertEqualString(preview, expected);
 	}
 }
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties b/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties
deleted file mode 100644
index c2a8bb8..0000000
--- a/org.eclipse.jdt.core.tests.model/workspace/Compiler/src/org/eclipse/jdt/internal/compiler/parser/readableNames.properties
+++ /dev/null
@@ -1,296 +0,0 @@
-,opt=,
-AbstractMethodDeclaration=AbstractMethodDeclaration
-AdditionalBound1=AdditionalBound1
-AdditionalBound=AdditionalBound
-AdditionalBoundList1=AdditionalBoundList1
-AdditionalBoundList=AdditionalBoundList
-AdditiveExpression=Expression
-AdditiveExpression_NotName=Expression
-AllocationHeader=AllocationHeader
-AndExpression=Expression
-AndExpression_NotName=Expression
-Annotation=Annotation
-AnnotationTypeBody=AnnotationTypeBody
-AnnotationTypeDeclaration=AnnotationTypeDeclaration
-AnnotationTypeDeclarationHeader=AnnotationTypeDeclarationHeader
-AnnotationTypeMemberDeclaration=AnnotationTypeMemberDeclaration
-AnnotationTypeMemberDeclarationHeader=AnnotationTypeMemberDeclarationHeader
-AnnotationTypeMemberDeclarations=AnnotationTypeMemberDeclarations
-AnnotationTypeMemberDeclarationsopt=AnnotationTypeMemberDeclarationsopt
-AnnotationTypeMemberHeaderExtendedDims=AnnotationTypeMemberHeaderExtendedDims
-ArgumentList=ArgumentList
-ArgumentListopt=ArgumentList
-Arguments=Arguments
-Argumentsopt=Argumentsopt
-ArrayAccess=ArrayAccess
-ArrayCreationHeader=ArrayCreationHeader
-ArrayCreationWithArrayInitializer=ArrayCreationWithArrayInitializer
-ArrayCreationWithoutArrayInitializer=ArrayCreationWithoutArrayInitializer
-ArrayInitializer=ArrayInitializer
-ArrayType=ArrayType
-ArrayTypeWithTypeArgumentsName=ArrayTypeWithTypeArgumentsName
-AssertStatement=AssertStatement
-Assignment=Assignment
-AssignmentExpression=Expression
-AssignmentExpression_NotName=Expression
-AssignmentOperator=AssignmentOperator
-Block=Block
-BlockStatement=BlockStatement
-BlockStatements=BlockStatements
-BlockStatementsopt=BlockStatements
-BooleanLiteral=BooleanLiteral
-BreakStatement=BreakStatement
-CastExpression=CastExpression
-CatchClause=CatchClause
-CatchHeader=CatchHeader
-Catches=Catches
-Catchesopt=Catches
-ClassBody=ClassBody
-ClassBodyDeclaration=ClassBodyDeclaration
-ClassBodyDeclarations=ClassBodyDeclarations
-ClassBodyDeclarationsopt=ClassBodyDeclarations
-ClassBodySimpleNameopt=ClassBody
-ClassBodyopt=ClassBody
-ClassDeclaration=ClassDeclaration
-ClassHeader=ClassHeader
-ClassHeaderExtends=ClassHeaderExtends
-ClassHeaderExtendsopt=ClassHeaderExtends
-ClassHeaderImplements=ClassHeaderImplements
-ClassHeaderImplementsopt=ClassHeaderImplements
-ClassHeaderName1=ClassHeaderName
-ClassHeaderName=ClassHeaderName
-ClassInstanceCreationExpression=ClassInstanceCreationExpression
-ClassInstanceCreationExpressionName=ClassInstanceCreationExpressionName
-ClassMemberDeclaration=ClassMemberDeclaration
-ClassOrInterface=Type
-ClassOrInterfaceType=Type
-ClassType=ClassType
-ClassTypeElt=ClassType
-ClassTypeList=ClassTypeList
-CompilationUnit=CompilationUnit
-ConditionalAndExpression=Expression
-ConditionalAndExpression_NotName=Expression
-ConditionalExpression=Expression
-ConditionalExpression_NotName=Expression
-ConditionalOrExpression=Expression
-ConditionalOrExpression_NotName=Expression
-ConstantDeclaration=ConstantDeclaration
-ConstantExpression=ConstantExpression
-ConstructorDeclaration=ConstructorDeclaration
-ConstructorHeader=ConstructorDeclaration
-ConstructorHeaderName=ConstructorHeaderName
-ContinueStatement=ContinueStatement
-DefaultValue=DefaultValue
-DefaultValueopt=DefaultValueopt
-Diet=Diet
-DimWithOrWithOutExpr=Dimension
-DimWithOrWithOutExprs=Dimensions
-Dims=Dimensions
-DimsLoop=Dimensions
-Dimsopt=Dimensions
-DoStatement=DoStatement
-EmptyStatement=EmptyStatement
-EnhancedForStatement=EnhancedForStatement
-EnhancedForStatementHeader=EnhancedForStatementHeader
-EnhancedForStatementNoShortIf=EnhancedForStatementNoShortIf
-EnterAnonymousClassBody=EnterAnonymousClassBody
-EnterAnonymousClassBodySimpleName=EnterAnonymousClassBodySimpleName
-EnterCompilationUnit=EnterCompilationUnit
-EnterVariable=EnterVariable
-EnumBody=EnumBody
-EnumBodyDeclarationsopt=EnumBodyDeclarationsopt
-EnumConstant=EnumConstant
-EnumConstantHeader=EnumConstantHeader
-EnumConstants=EnumConstants
-EnumDeclaration=EnumDeclaration
-EnumDeclarations=EnumDeclarations
-EnumHeader=EnumHeader
-EqualityExpression=Expression
-EqualityExpression_NotName=Expression
-ExclusiveOrExpression=Expression
-ExclusiveOrExpression_NotName=Expression
-ExitTryBlock=ExitTryBlock
-ExitVariableWithInitialization=ExitVariableWithInitialization
-ExitVariableWithoutInitialization=ExitVariableWithoutInitialization
-ExplicitConstructorInvocation=ExplicitConstructorInvocation
-Expression=Expression
-ExpressionStatement=Statement
-Expression_NotName=Expression
-Expressionopt=Expression
-FieldAccess=FieldAccess
-FieldDeclaration=FieldDeclaration
-Finally=Finally
-FloatingPointType=FloatingPointType
-ForInit=ForInit
-ForInitopt=ForInit
-ForStatement=ForStatement
-ForStatementNoShortIf=ForStatement
-ForUpdate=ForUpdate
-ForUpdateopt=ForUpdate
-ForceNoDiet=ForceNoDiet
-FormalParameter=FormalParameter
-FormalParameterList=FormalParameterList
-FormalParameterListopt=FormalParameterList
-GenericMethodDeclaration=GenericMethodDeclaration
-Goal=Goal
-Header=Header
-IfThenElseStatement=IfStatement
-IfThenElseStatementNoShortIf=IfStatement
-IfThenStatement=IfStatement
-ImportDeclaration=ImportDeclaration
-ImportDeclarations=ImportDeclarations
-InclusiveOrExpression=Expression
-InclusiveOrExpression_NotName=Expression
-Initializer=Initializer
-InsideCastExpression=InsideCastExpression
-InsideCastExpressionLL1=InsideCastExpression
-InsideCastExpressionWithQualifiedGenerics=InsideCastExpression
-InstanceofExpression=Expression
-InstanceofExpression_NotName=Expression
-IntegralType=IntegralType
-InterfaceBody=InterfaceBody
-InterfaceDeclaration=InterfaceDeclaration
-InterfaceHeader=InterfaceHeader
-InterfaceHeaderExtends=InterfaceHeaderExtends
-InterfaceHeaderExtendsopt=InterfaceHeaderExtends
-InterfaceHeaderName1=InterfaceHeaderName
-InterfaceHeaderName=InterfaceHeaderName
-InterfaceMemberDeclaration=InterfaceMemberDeclaration
-InterfaceMemberDeclarations=InterfaceMemberDeclarations
-InterfaceMemberDeclarationsopt=InterfaceMemberDeclarations
-InterfaceType=InterfaceType
-InterfaceTypeList=InterfaceTypeList
-InternalCompilationUnit=CompilationUnit
-InvalidArrayInitializerAssignement=ArrayInitializerAssignement
-InvalidConstructorDeclaration=InvalidConstructorDeclaration
-InvalidInterfaceDeclaration=InvalidInterfaceDeclaration
-InvalidMethodDeclaration=InvalidMethodDeclaration
-LabeledStatement=LabeledStatement
-LabeledStatementNoShortIf=LabeledStatement
-Literal=Literal
-LocalVariableDeclaration=LocalVariableDeclaration
-LocalVariableDeclarationStatement=LocalVariableDeclarationStatement
-MarkerAnnotation=MarkerAnnotation
-MemberValue=MemberValue
-MemberValueArrayInitializer=MemberValueArrayInitializer
-MemberValuePair=MemberValuePair
-MemberValuePairs=MemberValuePairs
-MemberValuePairsopt=MemberValuePairsopt
-MemberValues=MemberValues
-MethodBody=MethodBody
-MethodDeclaration=MethodDeclaration
-MethodHeader=MethodDeclaration
-MethodHeaderExtendedDims=MethodHeaderExtendedDims
-MethodHeaderName=MethodHeaderName
-MethodHeaderRightParen=)
-MethodHeaderThrowsClause=MethodHeaderThrowsClause
-MethodHeaderThrowsClauseopt=MethodHeaderThrowsClause
-MethodInvocation=MethodInvocation
-Modifier=Modifier
-Modifiers=Modifiers
-Modifiersopt=Modifiers
-MultiplicativeExpression=Expression
-MultiplicativeExpression_NotName=Expression
-Name=Name
-NestedMethod=NestedMethod
-NestedType=NestedType
-NormalAnnotation=NormalAnnotation
-NumericType=NumericType
-OneDimLoop=Dimension
-OnlySynchronized=OnlySynchronized
-OnlyTypeArguments=TypeArguments
-OnlyTypeArgumentsForCastExpression=TypeArguments
-OpenBlock=OpenBlock
-PackageDeclaration=PackageDeclaration
-PackageDeclarationName=PackageDeclarationName
-PostDecrementExpression=PostDecrementExpression
-PostIncrementExpression=PostIncrementExpression
-PostfixExpression=Expression
-PostfixExpression_NotName=Expression
-PreDecrementExpression=PreDecrementExpression
-PreIncrementExpression=PreIncrementExpression
-Primary=Expression
-PrimaryNoNewArray=Expression
-PrimitiveType=PrimitiveType
-PushLPAREN=(
-PushLeftBrace=PushLeftBrace
-PushModifiers=PushModifiers
-PushPosition=PushPosition
-PushRPAREN=)
-PushRealModifiers=PushModifiers
-QualifiedName=QualifiedName
-ReduceImports=ReduceImports
-ReferenceType1=ReferenceType1
-ReferenceType2=ReferenceType2
-ReferenceType3=ReferenceType3
-ReferenceType=ReferenceType
-RelationalExpression=Expression
-RelationalExpression_NotName=Expression
-RestoreDiet=RestoreDiet
-ReturnStatement=ReturnStatement
-ShiftExpression=Expression
-ShiftExpression_NotName=Expression
-SimpleName=SimpleName
-SingleMemberAnnotation=SingleMemberAnnotation
-SingleStaticImportDeclaration=SingleStaticImportDeclaration
-SingleStaticImportDeclarationName=SingleStaticImportDeclarationName
-SingleTypeImportDeclaration=SingleTypeImportDeclaration
-SingleTypeImportDeclarationName=SingleTypeImportDeclarationName
-Statement=Statement
-StatementExpression=Expression
-StatementExpressionList=StatementExpressionList
-StatementNoShortIf=Statement
-StatementWithoutTrailingSubstatement=Statement
-StaticImportOnDemandDeclaration=StaticImportOnDemandDeclaration
-StaticImportOnDemandDeclarationName=StaticImportOnDemandDeclarationName
-StaticInitializer=StaticInitializer
-StaticOnly=StaticOnly
-SwitchBlock=SwitchBlock
-SwitchBlockStatement=SwitchBlockStatement
-SwitchBlockStatements=SwitchBlockStatements
-SwitchLabel=SwitchLabel
-SwitchLabels=SwitchLabels
-SwitchStatement=SwitchStatement
-SynchronizedStatement=SynchronizedStatement
-ThrowStatement=ThrowStatement
-TryBlock=Block
-TryStatement=TryStatement
-Type=Type
-TypeArgument1=TypeArgument1
-TypeArgument2=TypeArgument2
-TypeArgument3=TypeArgument3
-TypeArgument=TypeArgument
-TypeArgumentList1=TypeArgumentList1
-TypeArgumentList2=TypeArgumentList2
-TypeArgumentList3=TypeArgumentList3
-TypeArgumentList=TypeArgumentList
-TypeArguments=TypeArguments
-TypeDeclaration=TypeDeclaration
-TypeDeclarations=TypeDeclarations
-TypeImportOnDemandDeclaration=TypeImportOnDemandDeclaration
-TypeImportOnDemandDeclarationName=TypeImportOnDemandDeclarationName
-TypeParameter1=TypeParameter1
-TypeParameter=TypeParameter
-TypeParameterHeader=TypeParameter
-TypeParameterList1=TypeParameterList1
-TypeParameterList=TypeParameterList
-TypeParameters=TypeParameters
-UnaryExpression=Expression
-UnaryExpressionNotPlusMinus=Expression
-UnaryExpressionNotPlusMinus_NotName=Expression
-UnaryExpression_NotName=Expression
-VariableDeclarator=VariableDeclarator
-VariableDeclaratorId=VariableDeclaratorId
-VariableDeclarators=VariableDeclarators
-VariableInitializer=VariableInitializer
-VariableInitializers=VariableInitializers
-WhileStatement=WhileStatement
-WhileStatementNoShortIf=WhileStatement
-Wildcard1=Wildcard1
-Wildcard2=Wildcard2
-Wildcard3=Wildcard3
-Wildcard=Wildcard
-WildcardBounds1=WildcardBounds1
-WildcardBounds2=WildcardBounds2
-WildcardBounds3=WildcardBound3
-WildcardBounds=WildcardBounds
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter15/src/test404489/bug/X.java b/org.eclipse.jdt.core.tests.model/workspace/Converter15/src/test404489/bug/X.java
new file mode 100644
index 0000000..4cf542a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter15/src/test404489/bug/X.java
@@ -0,0 +1,37 @@
+package test404489.bug;
+import java.lang.annotation.*;
+public class X {
+	@Target(ElementType.TYPE_USE)
+	@Retention(RetentionPolicy.RUNTIME)
+	@Documented
+	static @interface NonNull { }
+	class Inner {}
+	
+	/**
+ 	* @param arg  
+ 	*/
+	test404489.bug.@NonNull IOException foo(
+			test404489.bug.@NonNull FileNotFoundException arg)
+		throws test404489.bug.@NonNull EOFException {
+		try {
+			test404489.bug.@NonNull IOError e = new test404489.bug.IOError();
+			throw e;
+		} catch (test404489.bug.@NonNull IOError e) {
+		}
+		return null;
+	} 
+	test404489.bug.@NonNull X.@NonNull Inner fInner;
+} 
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {} 
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface A {} 
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface B {} 
+
+class Outer {
+	public class Inner {
+		public class Deeper {}
+	}
+}
+class IOException extends Exception {private static final long serialVersionUID=10001L;}
+class FileNotFoundException extends Exception{private static final long serialVersionUID=10002L;}
+class EOFException extends Exception{private static final long serialVersionUID=10003L;}
+class IOError extends Exception{private static final long serialVersionUID=10004L;}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter18/.classpath b/org.eclipse.jdt.core.tests.model/workspace/Converter18/.classpath
new file mode 100644
index 0000000..3522bc0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter18/.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/Converter18/.project b/org.eclipse.jdt.core.tests.model/workspace/Converter18/.project
new file mode 100644
index 0000000..663fb8d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter18/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>Converter18</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/Converter18/src/X.java b/org.eclipse.jdt.core.tests.model/workspace/Converter18/src/X.java
new file mode 100644
index 0000000..5a1a888
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter18/src/X.java
@@ -0,0 +1,4 @@
+public class X {
+	public void foo(X this) {
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Converter18/src/test404489/bug/X.java b/org.eclipse.jdt.core.tests.model/workspace/Converter18/src/test404489/bug/X.java
new file mode 100644
index 0000000..4cf542a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Converter18/src/test404489/bug/X.java
@@ -0,0 +1,37 @@
+package test404489.bug;
+import java.lang.annotation.*;
+public class X {
+	@Target(ElementType.TYPE_USE)
+	@Retention(RetentionPolicy.RUNTIME)
+	@Documented
+	static @interface NonNull { }
+	class Inner {}
+	
+	/**
+ 	* @param arg  
+ 	*/
+	test404489.bug.@NonNull IOException foo(
+			test404489.bug.@NonNull FileNotFoundException arg)
+		throws test404489.bug.@NonNull EOFException {
+		try {
+			test404489.bug.@NonNull IOError e = new test404489.bug.IOError();
+			throw e;
+		} catch (test404489.bug.@NonNull IOError e) {
+		}
+		return null;
+	} 
+	test404489.bug.@NonNull X.@NonNull Inner fInner;
+} 
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface Marker {} 
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface A {} 
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface B {} 
+
+class Outer {
+	public class Inner {
+		public class Deeper {}
+	}
+}
+class IOException extends Exception {private static final long serialVersionUID=10001L;}
+class FileNotFoundException extends Exception{private static final long serialVersionUID=10002L;}
+class EOFException extends Exception{private static final long serialVersionUID=10003L;}
+class IOError extends Exception{private static final long serialVersionUID=10004L;}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/.classpath b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/.classpath
new file mode 100644
index 0000000..e4ac611
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+    <classpathentry kind="src" path=""/>
+    <classpathentry kind="var" path="JCL18_LIB" sourcepath="JCL18_SRC" rootpath="JCL_SRC18ROOT"/>
+    <classpathentry kind="output" path="bin"/>
+</classpath>
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/.project b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/.project
new file mode 100644
index 0000000..8999ad1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>FormatterJSR308</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/FormatterJSR308/test000/I_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test000/I_in.java
new file mode 100644
index 0000000..04c7c8a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test000/I_in.java
@@ -0,0 +1,12 @@
+public interface I<U extends J<? extends I<U>>> {
+}
+interface J<T extends I<? extends J<T>>> {
+}
+class CI<U extends CJ<T, U> & @Marker J<@Marker T>,
+			T extends CI<U, T> & @Marker I<U>>
+	implements I<U> {
+}
+class CJ<T extends CI<U, T> & @Marker I<@Marker U>,
+			U extends CJ<T, U> & J<T>>
+	implements J<T> {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test000/I_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test000/I_out.java
new file mode 100644
index 0000000..22f5604
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test000/I_out.java
@@ -0,0 +1,13 @@
+public interface I<U extends J<? extends I<U>>> {
+}
+
+interface J<T extends I<? extends J<T>>> {
+}
+
+class CI<U extends CJ<T, U> & @Marker J<@Marker T>, T extends CI<U, T> & @Marker I<U>>
+		implements I<U> {
+}
+
+class CJ<T extends CI<U, T> & @Marker I<@Marker U>, U extends CJ<T, U> & J<T>>
+		implements J<T> {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test001/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test001/X_in.java
new file mode 100644
index 0000000..a27fd92
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test001/X_in.java
@@ -0,0 +1,9 @@
+public class X<E> {
+  class Y {
+    E e;
+    E getOtherElement(Object other) {
+      if (!(other instanceof @Marker X<?>.Y)) {};
+      return null;
+    }
+  }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test001/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test001/X_out.java
new file mode 100644
index 0000000..a283b87
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test001/X_out.java
@@ -0,0 +1,12 @@
+public class X<E> {
+	class Y {
+		E e;
+
+		E getOtherElement(Object other) {
+			if (!(other instanceof @Marker X<?>.Y)) {
+			}
+			;
+			return null;
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test002/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test002/X_in.java
new file mode 100644
index 0000000..b9fdcd2
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test002/X_in.java
@@ -0,0 +1,6 @@
+public class X {
+    @Marker int x;
+    Zork z;
+}
+@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test002/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test002/X_out.java
new file mode 100644
index 0000000..da9ad51
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test002/X_out.java
@@ -0,0 +1,9 @@
+public class X {
+	@Marker
+	int x;
+	Zork z;
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test003/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test003/X_in.java
new file mode 100644
index 0000000..33a996f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test003/X_in.java
@@ -0,0 +1,6 @@
+public class X {
+    @Marker <T> int x() { return 10; };
+    Zork z;
+}
+interface Zork {}
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test003/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test003/X_out.java
new file mode 100644
index 0000000..d024277
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test003/X_out.java
@@ -0,0 +1,14 @@
+public class X {
+	@Marker
+	<T> int x() {
+		return 10;
+	};
+
+	Zork z;
+}
+
+interface Zork {
+}
+
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test004/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test004/X_in.java
new file mode 100644
index 0000000..cff3884
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test004/X_in.java
@@ -0,0 +1,8 @@
+public class X {
+    int x(@Marker1 int [] @Marker2 ... p) { return 10; };
+    Zork z;
+}
+interface Zork {}
+@interface Marker1 {}
+@interface Marker2 {}
+
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test004/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test004/X_out.java
new file mode 100644
index 0000000..3bf3853
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test004/X_out.java
@@ -0,0 +1,16 @@
+public class X {
+	int x(@Marker1 int[] @Marker2... p) {
+		return 10;
+	};
+
+	Zork z;
+}
+
+interface Zork {
+}
+
+@interface Marker1 {
+}
+
+@interface Marker2 {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test005/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test005/X_in.java
new file mode 100644
index 0000000..b4529db
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test005/X_in.java
@@ -0,0 +1,6 @@
+public class X {
+    int x(@Marker int ... p) { return 10; };
+    Zork z;
+}
+@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test005/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test005/X_out.java
new file mode 100644
index 0000000..ebc19a3
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test005/X_out.java
@@ -0,0 +1,11 @@
+public class X {
+	int x(@Marker int... p) {
+		return 10;
+	};
+
+	Zork z;
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test006/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test006/X_in.java
new file mode 100644
index 0000000..0b43e96
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test006/X_in.java
@@ -0,0 +1,6 @@
+public class X {
+    @Marker int x() { return 10; };
+    Zork z;
+}
+@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test006/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test006/X_out.java
new file mode 100644
index 0000000..77188c7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test006/X_out.java
@@ -0,0 +1,12 @@
+public class X {
+	@Marker
+	int x() {
+		return 10;
+	};
+
+	Zork z;
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test007/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test007/X_in.java
new file mode 100644
index 0000000..d7d5c6b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test007/X_in.java
@@ -0,0 +1,6 @@
+public class X {
+    int x(@Marker int p) { return 10; };
+    Zork z;
+}
+@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test007/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test007/X_out.java
new file mode 100644
index 0000000..2de1d7a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test007/X_out.java
@@ -0,0 +1,11 @@
+public class X {
+	int x(@Marker int p) {
+		return 10;
+	};
+
+	Zork z;
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test008/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test008/X_in.java
new file mode 100644
index 0000000..c8142b8
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test008/X_in.java
@@ -0,0 +1,9 @@
+public class X {
+    int x() {
+        try {
+        } catch (@Marker NullPointerException | @Marker ArrayIndexOutOfBoundsException e) {
+        }
+        return 10;
+    }
+    Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test008/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test008/X_out.java
new file mode 100644
index 0000000..c9943bd
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test008/X_out.java
@@ -0,0 +1,11 @@
+public class X {
+	int x() {
+		try {
+		} catch (@Marker NullPointerException
+				| @Marker ArrayIndexOutOfBoundsException e) {
+		}
+		return 10;
+	}
+
+	Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test009/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test009/X_in.java
new file mode 100644
index 0000000..be0b6a4
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test009/X_in.java
@@ -0,0 +1,11 @@
+public class X {
+    int x() {
+        @Marker int p;
+        final @Marker int q;
+        @Marker final int r;
+        return 10;
+    }
+    Zork z;
+}
+@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test009/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test009/X_out.java
new file mode 100644
index 0000000..021c085
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test009/X_out.java
@@ -0,0 +1,17 @@
+public class X {
+	int x() {
+		@Marker
+		int p;
+		final @Marker
+		int q;
+		@Marker
+		final int r;
+		return 10;
+	}
+
+	Zork z;
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test010/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test010/X_in.java
new file mode 100644
index 0000000..8b46e4f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test010/X_in.java
@@ -0,0 +1,2 @@
+public class X extends @Marker @SingleMember(0) @Normal(Value = 0) Object {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test010/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test010/X_out.java
new file mode 100644
index 0000000..8b46e4f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test010/X_out.java
@@ -0,0 +1,2 @@
+public class X extends @Marker @SingleMember(0) @Normal(Value = 0) Object {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test011/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test011/X_in.java
new file mode 100644
index 0000000..5119c32
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test011/X_in.java
@@ -0,0 +1,10 @@
+public class X {
+    int x() {
+        try (@Marker Integer p = null; final @Marker Integer q = null; @Marker final Integer r = null) {
+        }
+        return 10;
+    }
+    Zork z;
+}
+@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test011/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test011/X_out.java
new file mode 100644
index 0000000..2b542e8
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test011/X_out.java
@@ -0,0 +1,16 @@
+public class X {
+	int x() {
+		try (@Marker
+		Integer p = null; final @Marker
+		Integer q = null; @Marker
+		final Integer r = null) {
+		}
+		return 10;
+	}
+
+	Zork z;
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test012/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test012/X_in.java
new file mode 100644
index 0000000..5a7589f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test012/X_in.java
@@ -0,0 +1,11 @@
+public class X {
+    int x() {
+        for (@Marker int i: new int[3]) {}
+        for (final @Marker int i: new int[3]) {}
+        for (@Marker final int i: new int[3]) {}
+        return 10;
+    }
+    Zork z;
+}
+@java.lang.annotation.Target (java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test012/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test012/X_out.java
new file mode 100644
index 0000000..f7f03b7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test012/X_out.java
@@ -0,0 +1,20 @@
+public class X {
+	int x() {
+		for (@Marker
+		int i : new int[3]) {
+		}
+		for (final @Marker
+		int i : new int[3]) {
+		}
+		for (@Marker
+		final int i : new int[3]) {
+		}
+		return 10;
+	}
+
+	Zork z;
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_PARAMETER)
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test013/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test013/X_in.java
new file mode 100644
index 0000000..ddd9625
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test013/X_in.java
@@ -0,0 +1,6 @@
+public @interface X { 
+	public @Marker String value(); 
+	@Marker String value2(); 
+	@Marker public String value3(); 
+}
+@interface Marker {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test013/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test013/X_out.java
new file mode 100644
index 0000000..2143a07
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test013/X_out.java
@@ -0,0 +1,13 @@
+public @interface X {
+	public @Marker
+	String value();
+
+	@Marker
+	String value2();
+
+	@Marker
+	public String value3();
+}
+
+@interface Marker {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_in.java
new file mode 100644
index 0000000..6715106
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_in.java
@@ -0,0 +1,6 @@
+public class X { 
+	public void value() {
+		Object o = @Marker int.class;
+		Object o2 = @Marker int @Marker[] [] @Marker[].class;
+   }
+}
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
new file mode 100644
index 0000000..e8a3c00
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test014/X_out.java
@@ -0,0 +1,6 @@
+public class X {
+	public void value() {
+		Object o = @Marker int.class;
+		Object o2 = @Marker int @Marker[] [] @Marker[].class;
+   }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test015/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test015/X_in.java
new file mode 100644
index 0000000..324a157
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test015/X_in.java
@@ -0,0 +1,9 @@
+interface I {
+    Object copy(int [] ia);
+}
+public class X  {
+    public static void main(String [] args) {
+        I i = @Marker int @Marker []::<String>clone;
+        Zork z;
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test015/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test015/X_out.java
new file mode 100644
index 0000000..70fe5a0
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test015/X_out.java
@@ -0,0 +1,10 @@
+interface I {
+	Object copy(int[] ia);
+}
+
+public class X {
+	public static void main(String[] args) {
+		I i = @Marker int @Marker[]::<String> clone;
+		Zork z;
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test016/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test016/X_in.java
new file mode 100644
index 0000000..d9f939b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test016/X_in.java
@@ -0,0 +1,7 @@
+public class X  {
+    public static void main(String [] args) {
+        int i [] = new @Marker int @Marker [4];
+        int j [] = new @Marker int @Marker [] { 10 };
+        Zork z;
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test016/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test016/X_out.java
new file mode 100644
index 0000000..c58da4a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test016/X_out.java
@@ -0,0 +1,7 @@
+public class X {
+	public static void main(String[] args) {
+		int i[] = new @Marker int @Marker[4];
+		int j[] = new @Marker int @Marker[] { 10 };
+		Zork z;
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test017/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test017/X_in.java
new file mode 100644
index 0000000..ae4e9af
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test017/X_in.java
@@ -0,0 +1,7 @@
+public class X  {
+    public static void main(String [] args) {
+        int i = (@Marker int) 0;
+        int j [] = (@Marker int @Marker []) null;
+        Zork z;
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test017/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test017/X_out.java
new file mode 100644
index 0000000..d917b09
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test017/X_out.java
@@ -0,0 +1,7 @@
+public class X {
+	public static void main(String[] args) {
+		int i = (@Marker int) 0;
+		int j[] = (@Marker int @Marker[]) null;
+		Zork z;
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test018/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test018/X_in.java
new file mode 100644
index 0000000..11028f1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test018/X_in.java
@@ -0,0 +1,6 @@
+public class X  {
+    public static void main(String [] args) {
+        if (args instanceof @Readonly String) {
+        }
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test018/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test018/X_out.java
new file mode 100644
index 0000000..42c8905
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test018/X_out.java
@@ -0,0 +1,6 @@
+public class X {
+	public static void main(String[] args) {
+		if (args instanceof @Readonly String) {
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test019/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test019/X_in.java
new file mode 100644
index 0000000..a665ecc
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test019/X_in.java
@@ -0,0 +1,4 @@
+public class X extends Y<@Marker Integer, String> {}
+class Y<T, V> {
+    Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test019/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test019/X_out.java
new file mode 100644
index 0000000..6062152
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test019/X_out.java
@@ -0,0 +1,6 @@
+public class X extends Y<@Marker Integer, String> {
+}
+
+class Y<T, V> {
+	Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test020/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test020/X_in.java
new file mode 100644
index 0000000..0e1ced7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test020/X_in.java
@@ -0,0 +1,4 @@
+public class X extends Y<@Marker Integer> {}
+class Y<T> {
+    Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test020/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test020/X_out.java
new file mode 100644
index 0000000..672b9c5
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test020/X_out.java
@@ -0,0 +1,6 @@
+public class X extends Y<@Marker Integer> {
+}
+
+class Y<T> {
+	Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test021/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test021/X_in.java
new file mode 100644
index 0000000..c6a491e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test021/X_in.java
@@ -0,0 +1,4 @@
+public class X<T extends Object & Comparable<? super @Marker String>> {}
+class Y<T> {
+    Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test021/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test021/X_out.java
new file mode 100644
index 0000000..7af9097
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test021/X_out.java
@@ -0,0 +1,6 @@
+public class X<T extends Object & Comparable<? super @Marker String>> {
+}
+
+class Y<T> {
+	Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test022/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test022/X_in.java
new file mode 100644
index 0000000..6553270
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test022/X_in.java
@@ -0,0 +1,4 @@
+public class X<A extends X<X<X<@Marker String>>>> {}
+class Y<T> {
+    Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test022/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test022/X_out.java
new file mode 100644
index 0000000..ceeca9e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test022/X_out.java
@@ -0,0 +1,6 @@
+public class X<A extends X<X<X<@Marker String>>>> {
+}
+
+class Y<T> {
+	Zork z;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test023/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test023/X_in.java
new file mode 100644
index 0000000..8834dd1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test023/X_in.java
@@ -0,0 +1,4 @@
+public class X {
+	void foo(Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m){}
+   void goo(Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m){}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test023/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test023/X_out.java
new file mode 100644
index 0000000..48495f1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test023/X_out.java
@@ -0,0 +1,9 @@
+public class X {
+	void foo(
+			Map<@Marker ? super @Marker Object, @Marker ? extends @Marker String> m) {
+	}
+
+	void goo(
+			Map<@Marker ? extends @Marker Object, @Marker ? super @Marker String> m) {
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test024/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test024/X_in.java
new file mode 100644
index 0000000..425d878
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test024/X_in.java
@@ -0,0 +1,3 @@
+public class X <@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {
+}
+class Y<T> {}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test024/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test024/X_out.java
new file mode 100644
index 0000000..80883d9
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test024/X_out.java
@@ -0,0 +1,5 @@
+public class X<@Marker T extends @Marker Y<@Marker ?>, @Marker Q extends @Marker Integer> {
+}
+
+class Y<T> {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test025/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test025/X_in.java
new file mode 100644
index 0000000..f449181
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test025/X_in.java
@@ -0,0 +1,5 @@
+public class X<P, C> {
+  public X() {
+    if (!(this instanceof @Marker X)) {}
+  }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test025/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test025/X_out.java
new file mode 100644
index 0000000..8e82094
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test025/X_out.java
@@ -0,0 +1,6 @@
+public class X<P, C> {
+	public X() {
+		if (!(this instanceof @Marker X)) {
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test026/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test026/X_in.java
new file mode 100644
index 0000000..5ac77c1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test026/X_in.java
@@ -0,0 +1,17 @@
+interface I {
+    void foo(Y<String>.Z z, int x);
+}
+public class X  {
+    public static void main(String [] args) {
+        I i = Y<String>.@Marker Z::foo;
+        i.foo(new Y<String>().new Z(), 10); 
+        Zork z;
+    }
+}
+class Y<T> {
+    class Z {
+        void foo(int x) {
+	    System.out.println(x);
+        }
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test026/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test026/X_out.java
new file mode 100644
index 0000000..d5b9483
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test026/X_out.java
@@ -0,0 +1,19 @@
+interface I {
+	void foo(Y<String>.Z z, int x);
+}
+
+public class X {
+	public static void main(String[] args) {
+		I i = Y<String>.@Marker Z::foo;
+		i.foo(new Y<String>().new Z(), 10);
+		Zork z;
+	}
+}
+
+class Y<T> {
+	class Z {
+		void foo(int x) {
+			System.out.println(x);
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test027/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test027/X_in.java
new file mode 100644
index 0000000..7f5d990
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test027/X_in.java
@@ -0,0 +1,7 @@
+public class X  {
+    public static void main(String [] args) {
+        X [] x = new @Marker X @Marker [5];
+        X [] x2 = new @Marker X @Marker [] { null };
+        Zork z;
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test027/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test027/X_out.java
new file mode 100644
index 0000000..718190a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test027/X_out.java
@@ -0,0 +1,7 @@
+public class X {
+	public static void main(String[] args) {
+		X[] x = new @Marker X @Marker[5];
+		X[] x2 = new @Marker X @Marker[] { null };
+		Zork z;
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test028/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test028/X_in.java
new file mode 100644
index 0000000..1227a62
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test028/X_in.java
@@ -0,0 +1,5 @@
+public class X  {
+    public static void main(String [] args) {
+        java.util.Map.Entry [] e = (java.util.Map<String, String>.@Marker Entry []) null;
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test028/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test028/X_out.java
new file mode 100644
index 0000000..354334d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test028/X_out.java
@@ -0,0 +1,5 @@
+public class X {
+	public static void main(String[] args) {
+		java.util.Map.Entry[] e = (java.util.Map<String, String>.@Marker Entry[]) null;
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test029/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test029/X_in.java
new file mode 100644
index 0000000..7d0480f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test029/X_in.java
@@ -0,0 +1,5 @@
+import java.io.Serializable;
+import java.util.List;
+public class X<T extends Comparable<T> & Serializable> {
+	void foo(List<? extends @Marker Comparable<T>> p) {} 
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test029/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test029/X_out.java
new file mode 100644
index 0000000..8595614
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test029/X_out.java
@@ -0,0 +1,7 @@
+import java.io.Serializable;
+import java.util.List;
+
+public class X<T extends Comparable<T> & Serializable> {
+	void foo(List<? extends @Marker Comparable<T>> p) {
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test030/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test030/X_in.java
new file mode 100644
index 0000000..68d19e6
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test030/X_in.java
@@ -0,0 +1,6 @@
+class Base {
+}
+class Foo<U extends Base, V extends Bar<U, @Marker Foo<U, V>>> {
+}
+class Bar<E extends Base, F extends Foo<E, @Marker Bar<E, F>>> {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test030/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test030/X_out.java
new file mode 100644
index 0000000..3c3e2c2
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test030/X_out.java
@@ -0,0 +1,8 @@
+class Base {
+}
+
+class Foo<U extends Base, V extends Bar<U, @Marker Foo<U, V>>> {
+}
+
+class Bar<E extends Base, F extends Foo<E, @Marker Bar<E, F>>> {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test031/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test031/X_in.java
new file mode 100644
index 0000000..763b6a1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test031/X_in.java
@@ -0,0 +1,2 @@
+public class X extends @Marker Object {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test031/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test031/X_out.java
new file mode 100644
index 0000000..763b6a1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test031/X_out.java
@@ -0,0 +1,2 @@
+public class X extends @Marker Object {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test032/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test032/X_in.java
new file mode 100644
index 0000000..306fb63
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test032/X_in.java
@@ -0,0 +1,4 @@
+public class X {
+    X x = new @Marker X();
+    X y = new <String> @Marker X();
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test032/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test032/X_out.java
new file mode 100644
index 0000000..fb1ea48
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test032/X_out.java
@@ -0,0 +1,4 @@
+public class X {
+	X x = new @Marker X();
+	X y = new<String> @Marker X();
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test033/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test033/X_in.java
new file mode 100644
index 0000000..26b1fa7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test033/X_in.java
@@ -0,0 +1,6 @@
+public class X {
+    class Y {
+    }
+    Y y1 = new @Marker X().new @Marker Y();
+    Y y2 = new @Marker X().new <String> @Marker Y();
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test033/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test033/X_out.java
new file mode 100644
index 0000000..0a8f0cc
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test033/X_out.java
@@ -0,0 +1,7 @@
+public class X {
+	class Y {
+	}
+
+	Y y1 = new @Marker X().new @Marker Y();
+	Y y2 = new @Marker X().new<String> @Marker Y();
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test034/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test034/X_in.java
new file mode 100644
index 0000000..b4bc443
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test034/X_in.java
@@ -0,0 +1,7 @@
+public class X {
+    X x;
+    class Y {
+    }
+    Y y1 = x.new @Marker Y();
+    Y y2 = x.new <String> @Marker Y();
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test034/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test034/X_out.java
new file mode 100644
index 0000000..05b8bd7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test034/X_out.java
@@ -0,0 +1,9 @@
+public class X {
+	X x;
+
+	class Y {
+	}
+
+	Y y1 = x.new @Marker Y();
+	Y y2 = x.new<String> @Marker Y();
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test035/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test035/X_in.java
new file mode 100644
index 0000000..91acbc3
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test035/X_in.java
@@ -0,0 +1,3 @@
+public class X {
+    void foo() throws @Marker NullPointerException, @Marker ArrayIndexOutOfBoundsException {}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test035/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test035/X_out.java
new file mode 100644
index 0000000..7994b4e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test035/X_out.java
@@ -0,0 +1,5 @@
+public class X {
+	void foo() throws @Marker NullPointerException,
+			@Marker ArrayIndexOutOfBoundsException {
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test036/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test036/X_in.java
new file mode 100644
index 0000000..fb08439
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test036/X_in.java
@@ -0,0 +1,6 @@
+interface I {}
+interface J {}
+interface K extends @Marker I, @Marker J {}
+interface L {}
+public class X implements @Marker K, @Marker L {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test036/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test036/X_out.java
new file mode 100644
index 0000000..b104e33
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test036/X_out.java
@@ -0,0 +1,14 @@
+interface I {
+}
+
+interface J {
+}
+
+interface K extends @Marker I, @Marker J {
+}
+
+interface L {
+}
+
+public class X implements @Marker K, @Marker L {
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test037/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test037/X_in.java
new file mode 100644
index 0000000..034fc8e
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test037/X_in.java
@@ -0,0 +1,19 @@
+interface I {
+    void foo(int x);
+}
+public class X  {
+    public static void main(String [] args) {
+        I i = @Marker Y. @Marker Z @Marker [] [] @Marker [] ::foo;
+        I i2 = @Value("Joe") Y. @Value2(@Value("Joe")) @Marker Z @Marker [] [] @Marker [] ::foo;
+        I i3 = @Value("Duo") Y. @Value2(@Value("Joe")) @Marker Z ::foo;
+        i.foo(10); 
+        Zork z;
+    }
+}
+class Y {
+    static class Z {
+        public static void foo(int x) {
+	    System.out.println(x);
+        }
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test037/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test037/X_out.java
new file mode 100644
index 0000000..777a85d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test037/X_out.java
@@ -0,0 +1,21 @@
+interface I {
+	void foo(int x);
+}
+
+public class X {
+	public static void main(String[] args) {
+		I i = @Marker Y.@Marker Z @Marker[][]@Marker[]::foo;
+		I i2 = @Value("Joe") Y.@Value2(@Value("Joe")) @Marker Z @Marker[][]@Marker[]::foo;
+		I i3 = @Value("Duo") Y.@Value2(@Value("Joe")) @Marker Z::foo;
+		i.foo(10);
+		Zork z;
+	}
+}
+
+class Y {
+	static class Z {
+		public static void foo(int x) {
+			System.out.println(x);
+		}
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test038/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test038/X_in.java
new file mode 100644
index 0000000..8e5d1b3
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test038/X_in.java
@@ -0,0 +1,25 @@
+interface I {
+    Y foo(int x);
+}
+public class X  {
+    class Z extends Y {
+        public Z(int x) {
+            super(x);
+            System.out.println();
+        }
+    }
+    public static void main(String [] args) {
+        i = @Marker W<@Marker Integer>::<@Marker String> new;
+    }
+}
+class W<T> extends Y {
+    public W(T x) {
+        super(0);
+        System.out.println(x);
+    }
+}
+class Y {
+    public Y(int x) {
+        System.out.println(x);
+    }
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test038/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test038/X_out.java
new file mode 100644
index 0000000..e85847c
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test038/X_out.java
@@ -0,0 +1,29 @@
+interface I {
+	Y foo(int x);
+}
+
+public class X {
+	class Z extends Y {
+		public Z(int x) {
+			super(x);
+			System.out.println();
+		}
+	}
+
+	public static void main(String[] args) {
+		i = @Marker W<@Marker Integer>::<@Marker String> new;
+	}
+}
+
+class W<T> extends Y {
+	public W(T x) {
+		super(0);
+		System.out.println(x);
+	}
+}
+
+class Y {
+	public Y(int x) {
+		System.out.println(x);
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test039/X_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test039/X_in.java
new file mode 100644
index 0000000..f8ff5fb
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test039/X_in.java
@@ -0,0 +1,6 @@
+public class X  {
+    Object o = (@Marker X) null;
+    Object p = (@Marker X @Marker []) null;
+    Object q = (@Marker java. @Marker util. @Marker List<@Marker String> []) null;
+    Object r = (@Marker java. @Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker []) null;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test039/X_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test039/X_out.java
new file mode 100644
index 0000000..27a629a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/test039/X_out.java
@@ -0,0 +1,6 @@
+public class X {
+	Object o = (@Marker X) null;
+	Object p = (@Marker X @Marker[]) null;
+	Object q = (@Marker java.@Marker util.@Marker List<@Marker String>[]) null;
+	Object r = (@Marker java.@Marker util.@Marker Map<@Marker String, @Marker String>.@Marker Entry @Marker[]) null;
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testBugs/Bug403881_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testBugs/Bug403881_in.java
new file mode 100644
index 0000000..8ad6b83
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testBugs/Bug403881_in.java
@@ -0,0 +1,13 @@
+// ---
+public class X {
+	void foo(@Marker X this) {}
+	class Y {
+		Y(@Marker X X.this) {}
+		void foo(X.Y this) {}
+	}
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE)
+@interface Marker {
+	
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testBugs/Bug403881_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testBugs/Bug403881_out.java
new file mode 100644
index 0000000..bfe6fe1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testBugs/Bug403881_out.java
@@ -0,0 +1,18 @@
+// ---
+public class X {
+	void foo(@Marker X this) {
+	}
+
+	class Y {
+		Y(@Marker X X.this) {
+		}
+
+		void foo(X.Y this) {
+		}
+	}
+}
+
+@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE)
+@interface Marker {
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testLambda/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testLambda/A_in.java
new file mode 100644
index 0000000..39744d7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testLambda/A_in.java
@@ -0,0 +1,44 @@
+/**
+ * Test
+ *
+ */
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+	public void run() {
+	}
+
+	public void lambdas() {
+		Runnable a = () -> {
+			thisIsCrazy();
+			iJustMet(you);
+			here.number.callMe();
+		};
+
+		Func idA = x -> x;
+
+		Func idB = x -> { return x; };
+		
+		Func idC = x   ->   x;
+
+		Func id2 = x -> {
+			if (x == null)
+			{
+				return null;
+			}
+			else
+				return x;
+		};
+		
+		ImaginableFunction<String, Integer> f =
+			(String input) -> input.length();
+
+			ImaginableFunction<String, Integer> f2 = (String input) -> { return input.length() + new LetsPretend() { int howMany() { return 42; } }
+					
+.howMany(); };
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testLambda/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testLambda/A_out.java
new file mode 100644
index 0000000..1bcd7c3
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testLambda/A_out.java
@@ -0,0 +1,51 @@
+/**
+ * Test
+ *
+ */
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable,
+		Cloneable, Serializable {
+	public void run() {
+	}
+
+	public void lambdas() {
+		Runnable a = () -> {
+			thisIsCrazy();
+			iJustMet(you);
+			here.number.callMe();
+		};
+
+		Func idA = x -> x;
+
+		Func idB = x -> {
+			return x;
+		};
+
+		Func idC = x -> x;
+
+		Func id2 = x -> {
+			if (x == null) {
+				return null;
+			} else
+				return x;
+		};
+
+		ImaginableFunction<String, Integer> f = (String input) -> input
+				.length();
+
+		ImaginableFunction<String, Integer> f2 = (String input) -> {
+			return input.length() + new LetsPretend() {
+				int howMany() {
+					return 42;
+				}
+			}
+
+			.howMany();
+		};
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testReferenceExpression/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testReferenceExpression/A_in.java
new file mode 100644
index 0000000..4499467
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testReferenceExpression/A_in.java
@@ -0,0 +1,21 @@
+/**
+ * Test
+ *
+ */
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+	public void run() {
+	}
+
+	private static final   Functionalish<List<Integer>, Integer> WHATEVER = List< Integer > :: size ;
+	
+	public void referenceExpression() {
+		ImaginableFunction<String, Integer> func = Klazz
+				::  method; 
+	}	
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testReferenceExpression/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testReferenceExpression/A_out.java
new file mode 100644
index 0000000..2652404
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR308/testReferenceExpression/A_out.java
@@ -0,0 +1,21 @@
+/**
+ * Test
+ *
+ */
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+public abstract class A extends java.lang.Object implements Runnable,
+		Cloneable, Serializable {
+	public void run() {
+	}
+
+	private static final Functionalish<List<Integer>, Integer> WHATEVER = List<Integer>::size;
+
+	public void referenceExpression() {
+		ImaginableFunction<String, Integer> func = Klazz::method;
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/.classpath b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/.classpath
new file mode 100644
index 0000000..e4ac611
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/.classpath
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+    <classpathentry kind="src" path=""/>
+    <classpathentry kind="var" path="JCL18_LIB" sourcepath="JCL18_SRC" rootpath="JCL_SRC18ROOT"/>
+    <classpathentry kind="output" path="bin"/>
+</classpath>
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/.project b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/.project
new file mode 100644
index 0000000..f397d9d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>FormatterJSR335</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>
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402818_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402818_in.java
new file mode 100644
index 0000000..a9ae92f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402818_in.java
@@ -0,0 +1,25 @@
+// ---
+
+class I {
+	 int id(int x,      int y) 
+	{
+		return 0;
+	}
+	
+	static void foo(int x      ,      int    y) 
+	{
+		
+	}
+}
+
+interface J {
+	default int id(int x,      int y) 
+	{
+		return 0;
+	}
+	
+	static void foo(int x      ,      int    y) 
+	{
+		
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402818_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402818_out.java
new file mode 100644
index 0000000..5763137
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402818_out.java
@@ -0,0 +1,21 @@
+// ---
+
+class I {
+	int id(int x, int y) {
+		return 0;
+	}
+
+	static void foo(int x, int y) {
+
+	}
+}
+
+interface J {
+	default int id(int x, int y) {
+		return 0;
+	}
+
+	static void foo(int x, int y) {
+
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402819_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402819_in.java
new file mode 100644
index 0000000..2f55f0a
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402819_in.java
@@ -0,0 +1,12 @@
+package p1.p2.test;
+
+import java.io.Serializable;
+interface I {
+	void doit();
+}
+class Bug402819 {
+	Number n = (Serializable &  Number ) Long.parseInt("0");
+	
+	void foo(   int x   ,     int   y ) {}
+	I i = (I       &       Serializable   ) () -> {};
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402819_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402819_out.java
new file mode 100644
index 0000000..2a7e33d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testBugs/Bug402819_out.java
@@ -0,0 +1,17 @@
+package p1.p2.test;
+
+import java.io.Serializable;
+
+interface I {
+	void doit();
+}
+
+class Bug402819 {
+	Number n = (Serializable & Number) Long.parseInt("0");
+
+	void foo(int x, int y) {
+	}
+
+	I i = (I & Serializable) () -> {
+	};
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambda/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambda/A_in.java
new file mode 100644
index 0000000..2ba8f99
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambda/A_in.java
@@ -0,0 +1,48 @@
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+interface I {
+	int id(int x, int y);
+}
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+	public void run() {
+	}
+
+	public static class X {
+		I i = (x,y) -> x;
+	}
+	
+	public void lambdas() {
+		Runnable a = () -> {
+			thisIsCrazy();
+			iJustMet(you);
+			here.number.callMe();
+		};
+
+		Func idA = x -> x;
+
+		Func idB = x -> { return x; };
+		
+		Func idC = x   ->   x;
+
+		Func id2 = x -> {
+			if (x == null)
+			{
+				return null;
+			}
+			else
+				return x;
+		};
+		
+		ImaginableFunction<String, Integer> f =
+			(String input) -> input.length();
+
+			ImaginableFunction<String, Integer> f2 = (String input) -> { return input.length() + new LetsPretend() { int howMany() { return 42; } }
+					
+.howMany(); };
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambda/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambda/A_out.java
new file mode 100644
index 0000000..a2cc95f
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambda/A_out.java
@@ -0,0 +1,55 @@
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+interface I {
+	int id(int x, int y);
+}
+
+public abstract class A extends java.lang.Object implements Runnable,
+		Cloneable, Serializable {
+	public void run() {
+	}
+
+	public static class X {
+		I i = (x, y) -> x;
+	}
+
+	public void lambdas() {
+		Runnable a = () -> {
+			thisIsCrazy();
+			iJustMet(you);
+			here.number.callMe();
+		};
+
+		Func idA = x -> x;
+
+		Func idB = x -> {
+			return x;
+		};
+
+		Func idC = x -> x;
+
+		Func id2 = x -> {
+			if (x == null) {
+				return null;
+			} else
+				return x;
+		};
+
+		ImaginableFunction<String, Integer> f = (String input) -> input
+				.length();
+
+		ImaginableFunction<String, Integer> f2 = (String input) -> {
+			return input.length() + new LetsPretend() {
+				int howMany() {
+					return 42;
+				}
+			}
+
+			.howMany();
+		};
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambdaOptions/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambdaOptions/A_in.java
new file mode 100644
index 0000000..3803f58
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambdaOptions/A_in.java
@@ -0,0 +1,41 @@
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+interface I {
+	int id(int x, int y);
+}
+
+public abstract class A extends java.lang.Object implements Runnable, Cloneable, Serializable {
+	public void run() {
+	}
+
+	public static class X {
+		I i = (x,y) -> x;
+	}
+	
+	public void lambdas() {
+		Runnable a = () -> {
+			thisIsCrazy();
+			iJustMet(you);
+			here.number.callMe();
+		};
+
+		Func idA = x -> x;
+
+		Func idB = x -> { return x; };
+		
+		Func idC = x   ->   x;
+
+		Func id2 = x -> { if (x == null) { return null; } else return x; };
+		
+		ImaginableFunction<String, Integer> f =
+			(String input) -> input.length();
+
+			ImaginableFunction<String, Integer> f2 = (String input) -> { return input.length() + new LetsPretend() { int howMany() { return 42; } }
+					
+.howMany(); };
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambdaOptions/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambdaOptions/A_out.java
new file mode 100644
index 0000000..4c1ff0d
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testLambdaOptions/A_out.java
@@ -0,0 +1,58 @@
+package p1.p2.test;
+
+import java.io.Serializable;
+import java.io.IOException;
+
+interface I {
+	int id(int x, int y);
+}
+
+public abstract class A extends java.lang.Object implements Runnable,
+		Cloneable, Serializable {
+	public void run() {
+	}
+
+	public static class X {
+		I i = (x, y)->x;
+	}
+
+	public void lambdas() {
+		Runnable a = ()->
+		{
+			thisIsCrazy();
+			iJustMet(you);
+			here.number.callMe();
+		};
+
+		Func idA = x->x;
+
+		Func idB = x->
+		{
+			return x;
+		};
+
+		Func idC = x->x;
+
+		Func id2 = x->
+		{
+			if (x == null) {
+				return null;
+			} else
+				return x;
+		};
+
+		ImaginableFunction<String, Integer> f = (String input)->input.length();
+
+		ImaginableFunction<String, Integer> f2 = (String input)->
+		{
+			return input.length() + new LetsPretend() {
+				int howMany() {
+					return 42;
+				}
+			}
+
+			.howMany();
+		};
+	}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testMethodReference/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testMethodReference/A_in.java
new file mode 100644
index 0000000..7262740
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testMethodReference/A_in.java
@@ -0,0 +1,39 @@
+interface I {
+	String foo(String s);
+}
+
+interface J {
+	int length();
+}
+
+interface K {
+	int length(String s);
+}
+
+interface L {
+	String foo();
+}
+
+interface M {
+	int capacity(java.util.List<String> ls);
+}
+
+interface N {
+	java.util.List<String> newList();
+}
+
+interface O {
+	int [] vector(int x);
+}
+public class X {
+	public void main(String[] args) 
+	{
+		I i = System  ::   getProperty;
+		J j = "abc"::length;
+		K k = String    ::  <    String   ,    Integer   >    length;
+		L l = super :: toString;
+		M m = java.util.List  <   String   > ::< X>  size;
+		N n = java.util.ArrayList< String >::new;
+		O o = int[]  ::  new;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testMethodReference/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testMethodReference/A_out.java
new file mode 100644
index 0000000..67fc8d5
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/FormatterJSR335/testMethodReference/A_out.java
@@ -0,0 +1,39 @@
+interface I {
+	String foo(String s);
+}
+
+interface J {
+	int length();
+}
+
+interface K {
+	int length(String s);
+}
+
+interface L {
+	String foo();
+}
+
+interface M {
+	int capacity(java.util.List<String> ls);
+}
+
+interface N {
+	java.util.List<String> newList();
+}
+
+interface O {
+	int[] vector(int x);
+}
+
+public class X {
+	public void main(String[] args) {
+		I i = System::getProperty;
+		J j = "abc"::length;
+		K k = String::<String, Integer> length;
+		L l = super::toString;
+		M m = java.util.List<String>::<X> size;
+		N n = java.util.ArrayList<String>::new;
+		O o = int[]::new;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/.options b/org.eclipse.jdt.core/.options
index 3a18809..83d4c30 100644
--- a/org.eclipse.jdt.core/.options
+++ b/org.eclipse.jdt.core/.options
@@ -22,13 +22,13 @@
 # Reports failures during classpath variable initialization, and classpath container resolution
 org.eclipse.jdt.core/debug/cpresolution/failure=false
 
-# Reports bad node nesting in DOM AST
+# Reports bad node nesting in DOM AST (for interactive usage)
 org.eclipse.jdt.core/debug/dom/ast=false
 
-# Throws an exception in case of bad node nesting in DOM AST
+# Throws an exception in case of bad node nesting in DOM AST (enabled in tests)
 org.eclipse.jdt.core/debug/dom/ast/throw=false
 
-# Reports type errors when using ASTRewrite
+# Reports type errors when using ASTRewrite (throws exceptions; not enabled by default, since some non-typesafe operations are fine in practice)
 org.eclipse.jdt.core/debug/dom/rewrite=false
 
 # Report type hierarchy connections, refreshes and deltas
diff --git a/org.eclipse.jdt.core/.settings/.api_filters b/org.eclipse.jdt.core/.settings/.api_filters
index fdfa23c..8268b00 100644
--- a/org.eclipse.jdt.core/.settings/.api_filters
+++ b/org.eclipse.jdt.core/.settings/.api_filters
@@ -1,22 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?><component id="org.eclipse.jdt.core" version="2">
-    <resource path="model/org/eclipse/jdt/core/IAccessRule.java" type="org.eclipse.jdt.core.IAccessRule">
-        <filter id="403853384">
+    <resource path="META-INF/MANIFEST.MF">
+        <filter comment="BETA_JAVA8" id="924844039">
             <message_arguments>
-                <message_argument value="org.eclipse.jdt.core.IAccessRule"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="model/org/eclipse/jdt/core/IAnnotatable.java" type="org.eclipse.jdt.core.IAnnotatable">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.jdt.core.IAnnotatable"/>
-            </message_arguments>
-        </filter>
-    </resource>
-    <resource path="model/org/eclipse/jdt/core/IAnnotation.java" type="org.eclipse.jdt.core.IAnnotation">
-        <filter id="403853384">
-            <message_arguments>
-                <message_argument value="org.eclipse.jdt.core.IAnnotation"/>
+                <message_argument value="3.9.1"/>
+                <message_argument value="3.9.0"/>
             </message_arguments>
         </filter>
     </resource>
diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index a261eed..0d867d8 100644
--- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
-Bundle-Version: 3.10.0.v_OTDT_r230_qualifier
+Bundle-Version: 3.9.1.v_OTDT_r230_qualifier
 Bundle-Activator: org.eclipse.jdt.core.JavaCore
 Bundle-Vendor: %providerName
 Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 84024c6..8a42e1b 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Tom Tromey - Contribution for bug 125961
@@ -21,6 +25,8 @@
  *								bug 375366 - ECJ ignores unusedParameterIncludeDocCommentReference unless enableJavadoc option is set
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 381443 - [compiler][null] Allow parameter widening from @NonNull to unannotated
+ *     Jesper S Moller   - Contributions for
+ *								bug 407297 - [1.8][compiler] Control generation of parameter names by option
  *    Mat Booth - Contribution for bug 405176 
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.batch;
@@ -2079,6 +2085,16 @@
 					mode = DEFAULT;
 					continue;
 				}
+				if (currentArg.equals("-1.8") || currentArg.equals("-8") || currentArg.equals("-8.0")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+					if (didSpecifyCompliance) {
+						throw new IllegalArgumentException(
+							this.bind("configure.duplicateCompliance", currentArg)); //$NON-NLS-1$
+					}
+					didSpecifyCompliance = true;
+					this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+					mode = DEFAULT;
+					continue;
+				}
 				if (currentArg.equals("-d")) { //$NON-NLS-1$
 					if (this.destinationPath != null) {
 						StringBuffer errorMessage = new StringBuffer();
@@ -2235,6 +2251,13 @@
 							CompilerOptions.ENABLED);
 					continue;
 				}
+				if (currentArg.equals("-parameters")) { //$NON-NLS-1$
+					mode = DEFAULT;
+					this.options.put(
+							CompilerOptions.OPTION_MethodParametersAttribute,
+							CompilerOptions.GENERATE);
+					continue;
+				}
 				if (currentArg.startsWith("-g")) { //$NON-NLS-1$
 					mode = DEFAULT;
 					String debugOption = currentArg;
@@ -2516,7 +2539,10 @@
 					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
 				} else if (currentArg.equals("1.7") || currentArg.equals("7") || currentArg.equals("7.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
-				} else if (currentArg.equals("jsr14")) { //$NON-NLS-1$
+				} else if (currentArg.equals("1.8") || currentArg.equals("8") || currentArg.equals("8.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+				}
+				else if (currentArg.equals("jsr14")) { //$NON-NLS-1$
 					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_JSR14);
 				} else if (currentArg.equals("cldc1.1")) { //$NON-NLS-1$
 					this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_CLDC1_1);
@@ -2569,6 +2595,8 @@
 					this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_6);
 				} else if (currentArg.equals("1.7") || currentArg.equals("7") || currentArg.equals("7.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
 					this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
+				} else if (currentArg.equals("1.8") || currentArg.equals("8") || currentArg.equals("8.0")) { //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
+					this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
 				} else {
 					throw new IllegalArgumentException(this.bind("configure.source", currentArg)); //$NON-NLS-1$
 				}
@@ -3099,6 +3127,9 @@
 		public boolean stopOnFirstError() {
 			return false;
 		}
+		public boolean ignoreAllErrors() {
+			return false;
+		}
 	};
 }
 
@@ -4775,6 +4806,24 @@
 				this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_7);
 				if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
 			}
+		} else if (CompilerOptions.VERSION_1_8.equals(version)) {
+			if (this.didSpecifySource) {
+				Object source = this.options.get(CompilerOptions.OPTION_Source);
+				if (CompilerOptions.VERSION_1_3.equals(source)
+						|| CompilerOptions.VERSION_1_4.equals(source)) {
+					if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_4);
+				} else if (CompilerOptions.VERSION_1_5.equals(source)
+						|| CompilerOptions.VERSION_1_6.equals(source)) {
+					if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_6);
+				} else if (CompilerOptions.VERSION_1_7.equals(source)) {
+					if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
+				} else if (CompilerOptions.VERSION_1_8.equals(source)) {
+					if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+				}
+			} else {
+				this.options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_8);
+				if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
+			}
 		}
 	} else if (this.didSpecifySource) {
 		Object version = this.options.get(CompilerOptions.OPTION_Source);
@@ -4791,12 +4840,19 @@
 		} else if (CompilerOptions.VERSION_1_7.equals(version)) {
 			if (!didSpecifyCompliance) this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_7);
 			if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_7);
+		} else if (CompilerOptions.VERSION_1_8.equals(version)) {
+			if (!didSpecifyCompliance) this.options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_8);
+			if (!this.didSpecifyTarget) this.options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_8);
 		}
 	}
 
 	final Object sourceVersion = this.options.get(CompilerOptions.OPTION_Source);
 	final Object compliance = this.options.get(CompilerOptions.OPTION_Compliance);
-	if (sourceVersion.equals(CompilerOptions.VERSION_1_7)
+	if (sourceVersion.equals(CompilerOptions.VERSION_1_8)
+			&& CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK1_8) {
+		// compliance must be 1.8 if source is 1.8
+		throw new IllegalArgumentException(this.bind("configure.incompatibleComplianceForSource", (String)this.options.get(CompilerOptions.OPTION_Compliance), CompilerOptions.VERSION_1_8)); //$NON-NLS-1$
+	} else if (sourceVersion.equals(CompilerOptions.VERSION_1_7)
 			&& CompilerOptions.versionToJdkLevel(compliance) < ClassFileConstants.JDK1_7) {
 		// compliance must be 1.7 if source is 1.7
 		throw new IllegalArgumentException(this.bind("configure.incompatibleComplianceForSource", (String)this.options.get(CompilerOptions.OPTION_Compliance), CompilerOptions.VERSION_1_7)); //$NON-NLS-1$
@@ -4831,6 +4887,11 @@
 				throw new IllegalArgumentException(this.bind("configure.incompatibleComplianceForCldcTarget", (String) targetVersion, (String) sourceVersion)); //$NON-NLS-1$
 			}
 		} else {
+			// target must be 1.8 if source is 1.8
+			if (CompilerOptions.versionToJdkLevel(sourceVersion) >= ClassFileConstants.JDK1_8
+					&& CompilerOptions.versionToJdkLevel(targetVersion) < ClassFileConstants.JDK1_8){
+				throw new IllegalArgumentException(this.bind("configure.incompatibleTargetForSource", (String) targetVersion, CompilerOptions.VERSION_1_8)); //$NON-NLS-1$
+			}
 			// target must be 1.7 if source is 1.7
 			if (CompilerOptions.versionToJdkLevel(sourceVersion) >= ClassFileConstants.JDK1_7
 					&& CompilerOptions.versionToJdkLevel(targetVersion) < ClassFileConstants.JDK1_7){
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
index 260a956..6512cd0 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties
@@ -5,6 +5,10 @@
 # which accompanies this distribution, and is available at
 # http://www.eclipse.org/legal/epl-v10.html
 #
+# This is an implementation of an early-draft specification developed under the Java
+# Community Process (JCP) and is made available for testing and evaluation purposes
+# only. The code is not compatible with any specification of the JCP.
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 #     Benjamin Muskalla - Contribution for bug 239066
@@ -16,14 +20,15 @@
 #								bug 374605 - Unreasonable warning for enum-based switch statements
 #								bug 388281 - [compiler][null] inheritance of null annotations as an option
 #		Alan Moraes <alan@kelon.org> - Contribution for bug 383644
+#		Jesper S Moller - Contribution for bug 407297 - [1.8][compiler] Control generation of parameter names by option
 ###############################################################################
 ### JavaBatchCompiler messages.
 
 ### compiler
 #Format: compiler.name = word1 word2 word3
 compiler.name = Eclipse Compiler for Java(TM)
-#Format: compiler.version = (The placeholder 'bundle_qualifier' will be automatically filled. Do not remove or alter it)
-compiler.version = bundle_qualifier, 3.10.0
+#Format: compiler.version = (The placeholder 'bundle_qualifier,' will be automatically filled via pom.xml. Do not remove or alter it)
+compiler.version = bundle_qualifier, 3.9.1 BETA_JAVA8
 compiler.copyright = Copyright IBM Corp 2000, 2013. All rights reserved.
 
 ###{ObjectTeams:
@@ -59,7 +64,7 @@
 configure.duplicateCompliance = duplicate compliance setting specification: {0}
 configure.duplicateSource = duplicate source compliance setting specification: {0}
 configure.duplicateTarget = duplicate target compliance setting specification: {0}
-configure.source = source level should be comprised in between ''1.3'' and ''1.7'' (or ''5'', ''5.0'', ..., ''7'' or ''7.0''): {0}
+configure.source = source level should be comprised in between ''1.3'' and ''1.8'' (or ''5'', ''5.0'', ..., ''8'' or ''8.0''): {0}
 configure.duplicateOutputPath = duplicate output path specification: {0}
 configure.duplicateBootClasspath = duplicate bootclasspath specification: {0}
 configure.duplicateExtDirs = duplicate extdirs specification: {0}
@@ -68,7 +73,7 @@
 configure.invalidWarningConfiguration = invalid warning configuration: ''{0}''
 configure.invalidWarning = invalid warning token: ''{0}''. Ignoring warning and compiling
 configure.invalidWarningOption = invalid warning option: ''{0}''. Must specify a warning token
-configure.targetJDK = target level should be comprised in between ''1.1'' and ''1.7'' (or ''5'', ''5.0'', ..., ''7'' or ''7.0'') or cldc1.1: {0}
+configure.targetJDK = target level should be comprised in between ''1.1'' and ''1.8'' (or ''5'', ''5.0'', ..., ''8'' or ''8.0'') or cldc1.1: {0}
 configure.incompatibleTargetForSource = Target level ''{0}'' is incompatible with source level ''{1}''. A target level ''{1}'' or better is required
 configure.incompatibleTargetForGenericSource = Target level ''{0}'' is incompatible with source level ''{1}''. A source level ''1.5'' or better is required
 configure.incompatibleComplianceForSource = Compliance level ''{0}'' is incompatible with source level ''{1}''. A compliance level ''{1}'' or better is required
@@ -190,8 +195,9 @@
 \    -1.5 -5 -5.0       use 1.5 compliance (-source 1.5 -target 1.5)\n\
 \    -1.6 -6 -6.0       use 1.6 compliance (-source 1.6 -target 1.6)\n\
 \    -1.7 -7 -7.0       use 1.7 compliance (-source 1.7 -target 1.7)\n\
-\    -source <version>  set source level: 1.3 to 1.7 (or 5, 5.0, etc)\n\
-\    -target <version>  set classfile target: 1.1 to 1.7 (or 5, 5.0, etc)\n\
+\    -1.8 -8 -8.0       use 1.8 compliance (-source 1.8 -target 1.8)\n\
+\    -source <version>  set source level: 1.3 to 1.8 (or 5, 5.0, etc)\n\
+\    -target <version>  set classfile target: 1.1 to 1.8 (or 5, 5.0, etc)\n\
 \                       cldc1.1 can also be used to generate the StackMap\n\
 \                       attribute\n\
 \ \n\
@@ -264,6 +270,7 @@
 \    -repeat <n>        repeat compilation process <n> times for perf analysis\n\
 \    -inlineJSR         inline JSR bytecode (implicit if target >= 1.5)\n\
 \    -enableJavadoc     consider references in javadoc\n\
+\    -parameters        generate method parameters attribute (for target >= 1.8)\n\
 \    -Xemacs            used to enable emacs-style output in the console.\n\
 \                       It does not affect the xml log output\n\
 \    -missingNullDefault  report missing default nullness annotation\n\
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
index d867cab..ba6ca11 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: CompletionEngine.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -38,7 +41,6 @@
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.core.search.IJavaSearchConstants;
-
 import org.eclipse.jdt.internal.codeassist.complete.*;
 import org.eclipse.jdt.internal.codeassist.impl.AssistParser;
 import org.eclipse.jdt.internal.codeassist.impl.Engine;
@@ -656,6 +658,7 @@
 		public int sourceEnd() { return 0; 	}
 		public int sourceStart() { return 0; 	}
 		public TypeBinding expectedType() { return null; }
+		public boolean receiverIsImplicitThis() { return false;}
 	};
 
 	private int foundTypesCount;
@@ -1485,7 +1488,7 @@
 
 		// do not add twice the same type
 		for (int i = 0; i <= this.expectedTypesPtr; i++) {
-			if (this.expectedTypes[i] == type) return;
+			if (TypeBinding.equalsEquals(this.expectedTypes[i], type)) return;
 		}
 
 		int length = this.expectedTypes.length;
@@ -1493,7 +1496,7 @@
 			System.arraycopy(this.expectedTypes, 0, this.expectedTypes = new TypeBinding[length * 2], 0, length);
 		this.expectedTypes[this.expectedTypesPtr] = type;
 
-		if(type == scope.getJavaLangObject()) {
+		if(TypeBinding.equalsEquals(type, scope.getJavaLangObject())) {
 			this.hasJavaLangObjectAsExpectedType = true;
 		}
 	}
@@ -1543,12 +1546,12 @@
 			if (paramLength == argLength) { // accept X[] but not X or X[][]
 				TypeBinding varArgType = parameters[lastIndex]; // is an ArrayBinding by definition
 				TypeBinding lastArgument = arguments[lastIndex];
-				if (varArgType != lastArgument && !lastArgument.isCompatibleWith(varArgType))
+				if (TypeBinding.notEquals(varArgType, lastArgument) && !lastArgument.isCompatibleWith(varArgType))
 					return false;
 			} else if (paramLength < argLength) { // all remainig argument types must be compatible with the elementsType of varArgType
 				TypeBinding varArgType = ((ArrayBinding) parameters[lastIndex]).elementsType();
 				for (int i = lastIndex; i < argLength; i++)
-					if (varArgType != arguments[i] && !arguments[i].isCompatibleWith(varArgType))
+					if (TypeBinding.notEquals(varArgType, arguments[i]) && !arguments[i].isCompatibleWith(varArgType))
 						return false;
 			} else if (lastIndex != argLength) { // can call foo(int i, X ... x) with foo(1) but NOT foo();
 				return false;
@@ -1559,7 +1562,7 @@
 				return false;
 		}
 		for (int i = 0; i < lastIndex; i++)
-			if (parameters[i] != arguments[i] && !arguments[i].isCompatibleWith(parameters[i]))
+			if (TypeBinding.notEquals(parameters[i], arguments[i]) && !arguments[i].isCompatibleWith(parameters[i]))
 				return false;
 		return true;
 	}
@@ -2292,7 +2295,7 @@
 
 		findTypesAndPackages(this.completionToken, scope, true, true, new ObjectVector());
 		if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
-			findKeywordsForMember(this.completionToken, field.modifiers);
+			findKeywordsForMember(this.completionToken, field.modifiers, astNode);
 		}
 
 		if (!field.isLocalVariable && field.modifiers == ClassFileConstants.AccDefault) {
@@ -2911,7 +2914,7 @@
 		setSourceAndTokenRange(type.sourceStart, type.sourceEnd);
 		findTypesAndPackages(this.completionToken, scope.parent, true, true, new ObjectVector());
 		if (!this.requestor.isIgnored(CompletionProposal.KEYWORD)) {
-			findKeywordsForMember(this.completionToken, method.modifiers);
+			findKeywordsForMember(this.completionToken, method.modifiers, null);
 		}
 
 		if (method.modifiers == ClassFileConstants.AccDefault) {
@@ -3528,7 +3531,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -3569,7 +3572,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -4037,7 +4040,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -4123,7 +4126,7 @@
 		if (isStatic) {
 			completion.append(declarationType.sourceName());
 
-		} else if (declarationType == invocationType) {
+		} else if (TypeBinding.equalsEquals(declarationType, invocationType)) {
 			completion.append(THIS);
 
 		} else {
@@ -4213,7 +4216,7 @@
 				this.expectedTypes != null) {
 			for (int i = 0; i <= this.expectedTypesPtr; i++) {
 				if (proposalType.isEnum() &&
-						proposalType == this.expectedTypes[i]) {
+						TypeBinding.equalsEquals(proposalType, this.expectedTypes[i])) {
 					return R_ENUM + R_ENUM_CONSTANT;
 				}
 
@@ -4295,7 +4298,7 @@
 	}
 
 	private int computeRelevanceForInheritance(ReferenceBinding receiverType, ReferenceBinding declaringClass) {
-		if (receiverType == declaringClass) return R_NON_INHERITED;
+		if (TypeBinding.equalsEquals(receiverType, declaringClass)) return R_NON_INHERITED;
 		return 0;
 	}
 
@@ -4926,27 +4929,27 @@
 		completion.append(typeVariable.sourceName);
 
 //{ObjectTeams:
-		if (typeVariable.roletype != null && typeVariable.firstBound == typeVariable.roletype) {
+		if (typeVariable.roletype != null && TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.roletype)) {
 		    completion.append(' ');
 		    completion.append(BASE);
 		    completion.append(' ');
 		    createType(typeVariable.roletype, scope, completion);
 		}
 // SH}
-		if (typeVariable.superclass != null && typeVariable.firstBound == typeVariable.superclass) {
+		if (typeVariable.superclass != null && TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.superclass)) {
 		    completion.append(' ');
 		    completion.append(EXTENDS);
 		    completion.append(' ');
 		    createType(typeVariable.superclass, scope, completion);
 		}
 		if (typeVariable.superInterfaces != null && typeVariable.superInterfaces != Binding.NO_SUPERINTERFACES) {
-		   if (typeVariable.firstBound != typeVariable.superclass) {
+		   if (TypeBinding.notEquals(typeVariable.firstBound, typeVariable.superclass)) {
 			   completion.append(' ');
 			   completion.append(EXTENDS);
 			   completion.append(' ');
 		   }
 		   for (int i = 0, length = typeVariable.superInterfaces.length; i < length; i++) {
-			   if (i > 0 || typeVariable.firstBound == typeVariable.superclass) {
+			   if (i > 0 || TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.superclass)) {
 				   completion.append(' ');
 				   completion.append(EXTENDS);
 				   completion.append(' ');
@@ -6082,9 +6085,9 @@
 
 		if (searchSuperClasses) {
 			ReferenceBinding javaLangThrowable = scope.getJavaLangThrowable();
-			if (exceptionType != javaLangThrowable) {
+			if (TypeBinding.notEquals(exceptionType, javaLangThrowable)) {
 				ReferenceBinding superClass = exceptionType.superclass();
-				while(superClass != null && superClass != javaLangThrowable) {
+				while(superClass != null && TypeBinding.notEquals(superClass, javaLangThrowable)) {
 					findExceptionFromTryStatement(typeName, superClass, receiverType, invocationType, scope, typesFound, false);
 					superClass = superClass.superclass();
 				}
@@ -6120,7 +6123,7 @@
 		for (int j = typesFound.size; --j >= 0;) {
 			ReferenceBinding otherType = (ReferenceBinding) typesFound.elementAt(j);
 
-			if (exceptionType == otherType)
+			if (TypeBinding.equalsEquals(exceptionType, otherType))
 				return;
 
 			if (CharOperation.equals(exceptionType.sourceName, otherType.sourceName, true)) {
@@ -6173,7 +6176,7 @@
 								SourceTypeBinding localType =
 									((ClassScope) blockScope.subscopes[j]).referenceContext.binding;
 
-								if (localType == exceptionType) {
+								if (TypeBinding.equalsEquals(localType, exceptionType)) {
 									isQualified = false;
 									break done;
 								}
@@ -6186,7 +6189,7 @@
 						ReferenceBinding[] memberTypes = type.memberTypes();
 						if (memberTypes != null) {
 							for (int j = 0; j < memberTypes.length; j++) {
-								if (memberTypes[j] == exceptionType) {
+								if (TypeBinding.equalsEquals(memberTypes[j], exceptionType)) {
 									isQualified = false;
 									break done;
 								}
@@ -6200,7 +6203,7 @@
 						SourceTypeBinding[] types = ((CompilationUnitScope)currentScope).topLevelTypes;
 						if (types != null) {
 							for (int j = 0; j < types.length; j++) {
-								if (types[j] == exceptionType) {
+								if (TypeBinding.equalsEquals(types[j], exceptionType)) {
 									isQualified = false;
 									break done;
 								}
@@ -6484,13 +6487,13 @@
 				Object[] other = (Object[])fieldsFound.elementAt(i);
 				FieldBinding otherField = (FieldBinding) other[0];
 				ReferenceBinding otherReceiverType = (ReferenceBinding) other[1];
-				if (field == otherField && receiverType == otherReceiverType)
+				if (field == otherField && TypeBinding.equalsEquals(receiverType, otherReceiverType))
 					continue next;
 				if (CharOperation.equals(field.name, otherField.name, true)) {
 					if (field.declaringClass.isSuperclassOf(otherField.declaringClass))
 						continue next;
 					if (otherField.declaringClass.isInterface()) {
-						if (field.declaringClass == scope.getJavaLangObject())
+						if (TypeBinding.equalsEquals(field.declaringClass, scope.getJavaLangObject()))
 							continue next;
 						if (field.declaringClass.implementsInterface(otherField.declaringClass, true))
 							continue next;
@@ -6511,7 +6514,7 @@
 
 				if (CharOperation.equals(field.name, local.name, true)) {
 					SourceTypeBinding declarationType = scope.enclosingSourceType();
-					if (declarationType.isAnonymousType() && declarationType != invocationScope.enclosingSourceType()) {
+					if (declarationType.isAnonymousType() && TypeBinding.notEquals(declarationType, invocationScope.enclosingSourceType())) {
 						continue next;
 					}
 					if(canBePrefixed) {
@@ -6802,7 +6805,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -6915,7 +6918,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -8271,7 +8274,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -8349,7 +8352,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -8502,7 +8505,7 @@
 				}
 			}
 	}
-	private void findKeywordsForMember(char[] token, int modifiers) {
+	private void findKeywordsForMember(char[] token, int modifiers, ASTNode astNode) {
 		char[][] keywords = new char[Keywords.COUNT][];
 		int count = 0;
 
@@ -8517,6 +8520,13 @@
 			}
 		}
 
+		if (astNode instanceof CompletionOnFieldType && 
+	        this.compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8) {
+	        FieldBinding astNodeBinding = ((CompletionOnFieldType) astNode).binding;
+	        ReferenceBinding declaringClass = astNodeBinding != null ? astNodeBinding.declaringClass : null;
+	        if (declaringClass != null && declaringClass.isInterface() && !declaringClass.isAnnotationType())
+	            keywords[count++] = Keywords.DEFAULT;
+	    }
 		if((modifiers & ClassFileConstants.AccAbstract) == 0) {
 			// abtract
 			if((modifiers & ~(ExtraCompilerModifiers.AccVisibilityMASK | ClassFileConstants.AccStatic)) == 0) {
@@ -8968,11 +8978,11 @@
 				Object[] other = (Object[]) methodsFound.elementAt(i);
 				MethodBinding otherMethod = (MethodBinding) other[0];
 				ReferenceBinding otherReceiverType = (ReferenceBinding) other[1];
-				if (method == otherMethod && receiverType == otherReceiverType)
+				if (method == otherMethod && TypeBinding.equalsEquals(receiverType, otherReceiverType))
 					continue next;
 
 				if (CharOperation.equals(method.selector, otherMethod.selector, true)) {
-					if (receiverType == otherReceiverType) {
+					if (TypeBinding.equalsEquals(receiverType, otherReceiverType)) {
 						if (this.lookupEnvironment.methodVerifier().isMethodSubsignature(otherMethod, method)) {
 							if (!superCall || !otherMethod.declaringClass.isInterface()) {
 								continue next;
@@ -9326,7 +9336,7 @@
 					if (method == otherMethod) continue next;
 
 					if (CharOperation.equals(method.selector, otherMethod.selector, true)) {
-						if (otherMethod.declaringClass == method.declaringClass &&
+						if (TypeBinding.equalsEquals(otherMethod.declaringClass, method.declaringClass) &&
 								this.lookupEnvironment.methodVerifier().isMethodSubsignature(otherMethod, method)) {
 							continue next;
 						}
@@ -9369,7 +9379,7 @@
 				methodsFoundFromFavorites.add(new Object[]{method, receiverType});
 
 				ReferenceBinding superTypeWithSameErasure = (ReferenceBinding)receiverType.findSuperTypeOriginatingFrom(method.declaringClass);
-				if (method.declaringClass != superTypeWithSameErasure) {
+				if (TypeBinding.notEquals(method.declaringClass, superTypeWithSameErasure)) {
 					MethodBinding[] otherMethods = superTypeWithSameErasure.getMethods(method.selector);
 					for (int i = 0; i < otherMethods.length; i++) {
 						if(otherMethods[i].original() == method.original()) {
@@ -9598,7 +9608,7 @@
 				Object[] other = (Object[]) methodsFound.elementAt(i);
 				MethodBinding otherMethod = (MethodBinding) other[0];
 				ReferenceBinding otherReceiverType = (ReferenceBinding) other[1];
-				if (method == otherMethod && receiverType == otherReceiverType)
+				if (method == otherMethod && TypeBinding.equalsEquals(receiverType, otherReceiverType))
 					continue next;
 
 				if (CharOperation.equals(method.selector, otherMethod.selector, true)) {
@@ -9910,7 +9920,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -9938,7 +9948,7 @@
 		if(proposeAllMemberTypes) {
 			ReferenceBinding[] memberTypes = receiverType.memberTypes();
 			for (int i = 0; i < memberTypes.length; i++) {
-				if(memberTypes[i] != typeToIgnore) {
+				if(TypeBinding.notEquals(memberTypes[i], typeToIgnore)) {
 					findSubMemberTypes(
 						typeName,
 						memberTypes[i],
@@ -9979,7 +9989,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -10084,7 +10094,7 @@
 			for (int i = typesFound.size; --i >= 0;) {
 				ReferenceBinding otherType = (ReferenceBinding) typesFound.elementAt(i);
 
-				if (memberType == otherType)
+				if (TypeBinding.equalsEquals(memberType, otherType))
 					continue next;
 
 				if (CharOperation.equals(memberType.sourceName, otherType.sourceName, true)) {
@@ -10404,8 +10414,8 @@
 						Argument[] arguments = methodDecl.arguments;
 						parameterNames = new char[length][];
 
-//{ObjectTeams:
 						for(int i = 0 ; i < length ; i++){
+//{ObjectTeams:
 /* orig:
 							parameterNames[i] = arguments[i].name;
   :giro */
@@ -10562,6 +10572,7 @@
 			}
 		}
 		boolean hasPotentialDefaultAbstractMethods = true;
+		boolean java8Plus = this.compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8;
 		while (currentType != null) {
 //{ObjectTeams: don't let availableMethods() look in the interface part!
 			currentType = currentType.getRealClass();
@@ -10596,11 +10607,12 @@
 					receiverEnd);
 			}
 
+			/* Searching of superinterfaces for candidate proposal methods can be skipped if current type is concrete, but only for source levels below 1.8.
+			   For 1.8 even a concrete type's superinterfaces should be searched as they could have default methods which are not implemented by the concrete
+			   type.
+			*/
 			if (hasPotentialDefaultAbstractMethods &&
-					(currentType.isAbstract() ||
-							currentType.isTypeVariable() ||
-							currentType.isIntersectionType() ||
-							currentType.isEnum())){
+					(java8Plus || (currentType.isAbstract() || currentType.isTypeVariable() || currentType.isIntersectionType() || currentType.isEnum()))) {
 
 				ReferenceBinding[] superInterfaces = currentType.superInterfaces();
 				if (superInterfaces != null && currentType.isIntersectionType()) {
@@ -10632,7 +10644,8 @@
 					receiverStart,
 					receiverEnd);
 			} else {
-				hasPotentialDefaultAbstractMethods = false;
+				if (!java8Plus)
+					hasPotentialDefaultAbstractMethods = false;
 			}
 			currentType = currentType.superclass();
 		}
@@ -10704,7 +10717,7 @@
 								for (int j = typesFound.size; --j >= 0;) {
 									ReferenceBinding otherType = (ReferenceBinding) typesFound.elementAt(j);
 
-									if (localType == otherType)
+									if (TypeBinding.equalsEquals(localType, otherType))
 										continue next;
 								}
 
@@ -11018,7 +11031,7 @@
 	private void findTrueOrFalseKeywords(char[][] choices) {
 		if(choices == null || choices.length == 0) return;
 
-		if(this.expectedTypesPtr != 0 || this.expectedTypes[0] != TypeBinding.BOOLEAN) return;
+		if(this.expectedTypesPtr != 0 || TypeBinding.notEquals(this.expectedTypes[0], TypeBinding.BOOLEAN)) return;
 
 		for (int i = 0; i < choices.length; i++) {
 			if (CharOperation.equals(choices[i], Keywords.TRUE) ||
@@ -11175,7 +11188,7 @@
 				if(isForbidden(sourceType)) continue next;
 
 				if(proposeAllMemberTypes &&
-					sourceType != outerInvocationType) {
+					TypeBinding.notEquals(sourceType, outerInvocationType)) {
 					findSubMemberTypes(
 							token,
 							sourceType,
@@ -11202,7 +11215,7 @@
 				for (int j = typesFound.size; --j >= 0;) {
 					ReferenceBinding otherType = (ReferenceBinding) typesFound.elementAt(j);
 
-					if (sourceType == otherType) continue next;
+					if (TypeBinding.equalsEquals(sourceType, otherType)) continue next;
 				}
 				
 				typesFound.add(sourceType);
@@ -11609,7 +11622,7 @@
 
 					for (int j = 0; j < typesFound.size(); j++) {
 						ReferenceBinding typeFound = (ReferenceBinding)typesFound.elementAt(j);
-						if (typeFound == refBinding.erasure()) {
+						if (TypeBinding.equalsEquals(typeFound, refBinding.erasure())) {
 							continue next;
 						}
 					}
@@ -12302,7 +12315,7 @@
 			TypeBinding tb = type.resolvedType;
 
 			if (tb.problemId() == ProblemReasons.NoError &&
-					tb != Scope.getBaseType(VOID)) {
+					TypeBinding.notEquals(tb, Scope.getBaseType(VOID))) {
 				findVariableName(
 					name,
 					tb.leafComponentType().qualifiedPackageName(),
@@ -12921,7 +12934,7 @@
 					for (int i = 0; i < memberTypes.length; i++) {
 						if (CharOperation.equals(memberTypes[i].sourceName, type.sourceName()) &&
 								memberTypes[i].canBeSeenBy(scope)) {
-							return memberTypes[i] != type;
+							return TypeBinding.notEquals(memberTypes[i], type);
 						}
 					}
 				}
@@ -14226,4 +14239,4 @@
 		return completion;
 	}
 // SH}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
index 7af7a9f..503d6c0 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
@@ -1,13 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
  *******************************************************************************/
 package org.eclipse.jdt.internal.codeassist;
 
@@ -36,6 +42,7 @@
 import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.classfmt.TypeAnnotationWalker;
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
 import org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
@@ -335,7 +342,8 @@
 		try {
 
 			SignatureWrapper wrapper = new SignatureWrapper(replacePackagesDot(typeSignature.toCharArray()));
-			assignableTypeBinding = this.lookupEnvironment.getTypeFromTypeSignature(wrapper, typeVariables, this.assistScope.enclosingClassScope().referenceContext.binding, null);
+			// FIXME(stephan): do we interpret type annotations here?
+			assignableTypeBinding = this.lookupEnvironment.getTypeFromTypeSignature(wrapper, typeVariables, this.assistScope.enclosingClassScope().referenceContext.binding, null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
 			assignableTypeBinding = BinaryTypeBinding.resolveType(assignableTypeBinding, this.lookupEnvironment, true);
 		} catch (AbortCompilation e) {
 			assignableTypeBinding = null;
@@ -527,7 +535,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -573,7 +581,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -615,7 +623,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
index f28d859..271b9a7 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: SelectionEngine.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -1319,7 +1322,7 @@
 					typeParameterNames[i] = typeVariable.sourceName;
 					if (typeVariable.firstBound == null) {
 						typeParameterBoundNames[i] = new char[0][];
-					} else if (typeVariable.firstBound == typeVariable.superclass) {
+					} else if (TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.superclass)) {
 						int boundCount = 1 + (typeVariable.superInterfaces == null ? 0 : typeVariable.superInterfaces.length);
 						typeParameterBoundNames[i] = new char[boundCount][];
 						typeParameterBoundNames[i][0] = typeVariable.superclass.sourceName;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java
index 3f4004e..aca7d4b 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java
@@ -211,7 +211,7 @@
 		for (int i = 0; i < exceptions.length; i++) {
 			ReferenceBinding exception = (ReferenceBinding)exceptions[i];
 			if (exception != null) {
-				if (exception == caughtException) {
+				if (TypeBinding.equalsEquals(exception, caughtException)) {
 					this.thrownExceptions.remove(exception);
 				} else if (caughtException.isSuperclassOf(exception)) {
 					// catching the sub-exception when super has been caught already will give an error
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java
index 86a957c..7ad1ad6 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -283,7 +287,7 @@
 				boolean found = false;
 				int paramNameRefCount = 0;
 				for (int j = 0; j < paramTypeParamLength && !found; j++) {
-					if (parameter.binding == this.paramTypeParameters[j].resolvedType) {
+					if (TypeBinding.equalsEquals(parameter.binding, this.paramTypeParameters[j].resolvedType)) {
 						if (parameter.binding == paramNameRefBinding) { // do not count first occurence of param nmae reference
 							paramNameRefCount++;
 							found = paramNameRefCount > 1;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java
index 4abb8fb..62b583b 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java
@@ -5,8 +5,14 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *******************************************************************************/
 package org.eclipse.jdt.internal.codeassist.complete;
 
@@ -30,7 +36,7 @@
 		this.realName = name;
 	}
 
-	public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
+	public TypeBinding bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
 
 		super.bind(scope, typeBinding, used);
 		throw new CompletionNodeFound(this, scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java
index 9501162..2a46134 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -33,11 +37,13 @@
  */
 
 import org.eclipse.jdt.internal.compiler.ast.*;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 
 public class CompletionOnMessageSend extends MessageSend {
 
 	public TypeBinding resolveType(BlockScope scope) {
+		this.constant = Constant.NotAConstant;
 		if (this.arguments != null) {
 			int argsLength = this.arguments.length;
 			for (int a = argsLength; --a >= 0;)
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java
index dd68571..b90eafb 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -11,6 +15,7 @@
 package org.eclipse.jdt.internal.codeassist.complete;
 
 import org.eclipse.jdt.internal.compiler.ast.MessageSend;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 
@@ -25,6 +30,8 @@
 
 	public TypeBinding resolveType(BlockScope scope) {
 
+		this.constant = Constant.NotAConstant;
+		
 		if (this.receiver.isImplicitThis())
 			throw new CompletionNodeFound();
 
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java
index f584192..3b2a95e 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -52,7 +56,7 @@
 /*
  * No expansion of the completion reference into an array one
  */
-public TypeReference copyDims(int dim){
+public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
 	return this;
 }
 protected TypeBinding getTypeBinding(Scope scope) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java
index 4345fd2..4f4afa5 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -55,7 +59,7 @@
 /*
  * No expansion of the completion reference into an array one
  */
-public TypeReference copyDims(int dim){
+public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
 	return this;
 }
 protected TypeBinding getTypeBinding(Scope scope) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
index 4aa23fd..e8c854f 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
@@ -5,10 +5,16 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *		Stephan Herrmann - Contribution for
+ *								bug 401035 - [1.8] A few tests have started failing recently
  *******************************************************************************/
 package org.eclipse.jdt.internal.codeassist.complete;
 
@@ -96,6 +102,7 @@
 	protected static final int K_INSIDE_FOR_CONDITIONAL = COMPLETION_PARSER + 40;
 	// added for https://bugs.eclipse.org/bugs/show_bug.cgi?id=261534
 	protected static final int K_BETWEEN_INSTANCEOF_AND_RPAREN = COMPLETION_PARSER + 41;
+	protected static final int K_INSIDE_IMPORT_STATEMENT = COMPLETION_PARSER + 43;
 
 //{ObjectTeams: OT specific kinds
 	protected static final int K_BETWEEN_WITH_AND_RIGHT_PAREN = COMPLETION_PARSER + 42;
@@ -190,6 +197,7 @@
 
 	private boolean storeSourceEnds;
 	public HashtableOfObjectToInt sourceEnds;
+	private boolean inReferenceExpression;
 
 public CompletionParser(ProblemReporter problemReporter, boolean storeExtraSourceEnds) {
 	super(problemReporter);
@@ -782,6 +790,17 @@
 									this.identifierLengthPtr--;
 								} else {
 									this.identifierLengthStack[this.identifierLengthPtr]--;
+									length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--];
+									Annotation [] typeAnnotations;
+									if (length != 0) {
+										System.arraycopy(
+												this.typeAnnotationStack,
+												(this.typeAnnotationPtr -= length) + 1,
+												typeAnnotations = new Annotation[length],
+												0,
+												length);
+										problemReporter().misplacedTypeAnnotations(typeAnnotations[0], typeAnnotations[typeAnnotations.length - 1]);
+									}
 								}
 								// consume the receiver
 								int identifierLength = this.identifierLengthStack[this.identifierLengthPtr];
@@ -1200,7 +1219,7 @@
 						if (consumeTypeArguments) consumeTypeArguments();
 						TypeReference ref = this.getTypeReference(0);
 						if(prevKind == K_PARAMETERIZED_CAST) {
-							ref = computeQualifiedGenericsFromRightSide(ref, 0);
+							ref = computeQualifiedGenericsFromRightSide(ref, 0, null);
 						}
 						if(this.currentElement instanceof RecoveredType) {
 							this.currentElement = this.currentElement.add(new CompletionOnFieldType(ref, false), 0);
@@ -1327,6 +1346,13 @@
 		this.hasUnusedModifiers = true;
 	}
 }
+protected void consumePushCombineModifiers() {
+	super.consumePushCombineModifiers();
+
+	if (isInsideMethod()) {
+		this.hasUnusedModifiers = true;
+	}
+}
 /**
  * Checks if the completion is on the type following a 'new'.
  * Returns whether we found a completion node.
@@ -1408,7 +1434,8 @@
 		if ((length = this.identifierLengthStack[this.identifierLengthPtr-1]) < 0) {
 			// build the primitive type node
 			int dim = isAfterArrayType() ? this.intStack[this.intPtr--] : 0;
-			SingleTypeReference typeRef = (SingleTypeReference)TypeReference.baseTypeReference(-length, dim);
+			Annotation [][] annotationsOnDimensions = dim == 0 ? null : getAnnotationsOnDimensions(dim);
+			SingleTypeReference typeRef = (SingleTypeReference)TypeReference.baseTypeReference(-length, dim, annotationsOnDimensions);
 			typeRef.sourceStart = this.intStack[this.intPtr--];
 			if (dim == 0) {
 				typeRef.sourceEnd = this.intStack[this.intPtr--];
@@ -1617,6 +1644,17 @@
 						this.identifierLengthPtr--;
 					} else {
 						this.identifierLengthStack[this.identifierLengthPtr]--;
+						int length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--];
+						Annotation [] typeAnnotations;
+						if (length != 0) {
+							System.arraycopy(
+									this.typeAnnotationStack,
+									(this.typeAnnotationPtr -= length) + 1,
+									typeAnnotations = new Annotation[length],
+									0,
+									length);
+							problemReporter().misplacedTypeAnnotations(typeAnnotations[0], typeAnnotations[typeAnnotations.length - 1]);
+						}
 					}
 					// consume the receiver
 					messageSend.receiver = getUnspecifiedReference();
@@ -2917,6 +2955,10 @@
 // SH}
 }
 protected void consumeFormalParameter(boolean isVarArgs) {
+	
+	this.invocationType = NO_RECEIVER;
+	this.qualifier = -1;
+	
 	if (this.indexOfAssistIdentifier() < 0) {
 		super.consumeFormalParameter(isVarArgs);
 		if (this.pendingAnnotation != null) {
@@ -2924,20 +2966,43 @@
 			this.pendingAnnotation = null;
 		}
 	} else {
-
+		boolean isReceiver = this.intStack[this.intPtr--] == 0;
+	    if (isReceiver) {
+	    	this.expressionPtr--;
+	    	this.expressionLengthPtr --;
+	    }
 		this.identifierLengthPtr--;
 		char[] identifierName = this.identifierStack[this.identifierPtr];
 		long namePositions = this.identifierPositionStack[this.identifierPtr--];
 		int extendedDimensions = this.intStack[this.intPtr--];
+		Annotation [][] annotationsOnExtendedDimensions = extendedDimensions == 0 ? null : getAnnotationsOnDimensions(extendedDimensions);
+		Annotation [] varArgsAnnotations = null;
+		int length;
 		int endOfEllipsis = 0;
 		if (isVarArgs) {
 			endOfEllipsis = this.intStack[this.intPtr--];
+			if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+				System.arraycopy(
+					this.typeAnnotationStack,
+					(this.typeAnnotationPtr -= length) + 1,
+					varArgsAnnotations = new Annotation[length],
+					0,
+					length);
+			} 
 		}
 		int firstDimensions = this.intStack[this.intPtr--];
-		final int typeDimensions = firstDimensions + extendedDimensions;
-		TypeReference type = getTypeReference(typeDimensions);
+		TypeReference type = getTypeReference(firstDimensions);
+		
+		if (isVarArgs || extendedDimensions != 0) {
+			if (isVarArgs) {
+				type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);	
+			}
+			if (extendedDimensions != 0) { // combination illegal.
+				type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
+			}
+			type.sourceEnd = type.isParameterizedTypeReference() ? this.endStatementPosition : this.endPosition;
+		}
 		if (isVarArgs) {
-			type = copyDims(type, typeDimensions + 1);
 			if (extendedDimensions == 0) {
 				type.sourceEnd = endOfEllipsis;
 			}
@@ -2951,7 +3016,6 @@
 				type,
 				this.intStack[this.intPtr + 1] & ~ClassFileConstants.AccDeprecated); // modifiers
 		// consume annotations
-		int length;
 		if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
 			System.arraycopy(
 				this.expressionStack,
@@ -3006,6 +3070,14 @@
 	}
 }
 protected void consumeInsideCastExpression() {
+	TypeReference[] bounds = null;
+	int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (additionalBoundsLength > 0) {
+		bounds = new TypeReference[additionalBoundsLength + 1];
+		this.genericsPtr -= additionalBoundsLength;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
+	}
+	
 	int end = this.intStack[this.intPtr--];
 	boolean isParameterized =(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_PARAMETERIZED_CAST);
 	if(isParameterized) {
@@ -3021,6 +3093,10 @@
 		}
 	}
 	Expression castType = getTypeReference(this.intStack[this.intPtr--]);
+	if (additionalBoundsLength > 0) {
+		bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
+		castType = createIntersectionCastTypeReference(bounds); 
+	}
 	if(isParameterized) {
 		this.intPtr--;
 	}
@@ -3053,6 +3129,29 @@
 	}
 	pushOnElementStack(K_CAST_STATEMENT);
 }
+protected void consumeInsideCastExpressionLL1WithBounds() {
+	if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_PARAMETERIZED_CAST) {
+		popElement(K_PARAMETERIZED_CAST);
+	}
+	if (!this.record) {
+		super.consumeInsideCastExpressionLL1WithBounds();
+	} else {
+		boolean temp = this.skipRecord;
+		try {
+			this.skipRecord = true;
+			super.consumeInsideCastExpressionLL1WithBounds();
+			if (this.record) {
+				Expression typeReference = this.expressionStack[this.expressionPtr];
+				if (!isAlreadyPotentialName(typeReference.sourceStart)) {
+					addPotentialName(null, typeReference.sourceStart, typeReference.sourceEnd);
+				}
+			}
+		} finally {
+			this.skipRecord = temp;
+		}
+	}
+	pushOnElementStack(K_CAST_STATEMENT);
+}
 protected void consumeInsideCastExpressionWithQualifiedGenerics() {
 	popElement(K_PARAMETERIZED_CAST);
 
@@ -3060,9 +3159,23 @@
 	int end = this.intStack[this.intPtr--];
 
 	int dim = this.intStack[this.intPtr--];
+	Annotation[][] annotationsOnDimensions = dim == 0 ? null : getAnnotationsOnDimensions(dim);
+	
+	TypeReference[] bounds = null;
+	int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (additionalBoundsLength > 0) {
+		bounds = new TypeReference[additionalBoundsLength + 1];
+		this.genericsPtr -= additionalBoundsLength;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
+	}
+	
 	TypeReference rightSide = getTypeReference(0);
 
-	castType = computeQualifiedGenericsFromRightSide(rightSide, dim);
+	castType = computeQualifiedGenericsFromRightSide(rightSide, dim, annotationsOnDimensions);
+	if (additionalBoundsLength > 0) {
+		bounds[0] = (TypeReference) castType;
+		castType = createIntersectionCastTypeReference(bounds); 
+	} 
 	this.intPtr--;
 	castType.sourceEnd = end - 1;
 	castType.sourceStart = this.intStack[this.intPtr--] + 1;
@@ -3409,6 +3522,9 @@
 		return;
 	}
 
+	if (isInImportStatement()) {
+		return;
+	}
 	MarkerAnnotation markerAnnotation = null;
 	int length = this.identifierLengthStack[this.identifierLengthPtr];
 	TypeReference typeReference;
@@ -3475,14 +3591,14 @@
 	pushOnLabelStack(this.identifierStack[this.identifierPtr]);
 	this.pushOnElementStack(K_LABEL, this.labelPtr);
 }
-protected void consumeMarkerAnnotation() {
+protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
 	if (this.topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN &&
 			(this.topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) & ANNOTATION_NAME_COMPLETION) != 0 ) {
 		popElement(K_BETWEEN_ANNOTATION_NAME_AND_RPAREN);
 		this.restartRecovery = true;
 	} else {
 		popElement(K_BETWEEN_ANNOTATION_NAME_AND_RPAREN);
-		super.consumeMarkerAnnotation();
+		super.consumeMarkerAnnotation(isTypeAnnotation);
 	}
 }
 protected void consumeMemberValuePair() {
@@ -3531,11 +3647,11 @@
 	super.consumeMethodHeader();
 	pushOnElementStack(K_BLOCK_DELIMITER);
 }
-protected void consumeMethodDeclaration(boolean isNotAbstract) {
+protected void consumeMethodDeclaration(boolean isNotAbstract, boolean isDefaultMethod) {
 	if (!isNotAbstract) {
 		popElement(K_BLOCK_DELIMITER);
 	}
-	super.consumeMethodDeclaration(isNotAbstract);
+	super.consumeMethodDeclaration(isNotAbstract, isDefaultMethod);
 }
 protected void consumeModifiers() {
 	super.consumeModifiers();
@@ -3572,14 +3688,14 @@
 		popElement(K_LOCAL_INITIALIZER_DELIMITER);
 	}
 }
-protected void consumeSingleMemberAnnotation() {
+protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
 	if (this.topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN &&
 			(this.topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) & ANNOTATION_NAME_COMPLETION) != 0 ) {
 		popElement(K_BETWEEN_ANNOTATION_NAME_AND_RPAREN);
 		this.restartRecovery = true;
 	} else {
 		popElement(K_BETWEEN_ANNOTATION_NAME_AND_RPAREN);
-		super.consumeSingleMemberAnnotation();
+		super.consumeSingleMemberAnnotation(isTypeAnnotation);
 	}
 }
 protected void consumeSingleStaticImportDeclarationName() {
@@ -3636,14 +3752,14 @@
 	super.consumeNestedMethod();
 	if(!(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BLOCK_DELIMITER)) pushOnElementStack(K_BLOCK_DELIMITER);
 }
-protected void consumeNormalAnnotation() {
+protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
 	if (this.topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN &&
 			(this.topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) & ANNOTATION_NAME_COMPLETION) != 0 ) {
 		popElement(K_BETWEEN_ANNOTATION_NAME_AND_RPAREN);
 		this.restartRecovery = true;
 	} else {
 		popElement(K_BETWEEN_ANNOTATION_NAME_AND_RPAREN);
-		super.consumeNormalAnnotation();
+		super.consumeNormalAnnotation(isTypeAnnotation);
 	}
 }
 protected void consumePackageDeclarationName() {
@@ -3755,6 +3871,9 @@
 			&& isIndirectlyInsideFieldInitialization()) {
 		this.scanner.eofPosition = this.cursorLocation < Integer.MAX_VALUE ? this.cursorLocation+1 : this.cursorLocation;
 	}
+	if (token == TokenNameimport) {
+		pushOnElementStack(K_INSIDE_IMPORT_STATEMENT);
+	}
 
 	// if in a method or if in a field initializer
 	if (isInsideMethod() || isInsideFieldInitialization() || isInsideAttributeValue()) {
@@ -3786,7 +3905,12 @@
 						break;
 				}
 				break;
+			case TokenNameCOLON_COLON:
+				this.inReferenceExpression = true;
+				break;
 			case TokenNameIdentifier:
+				if (this.inReferenceExpression)
+					break;
 				if (previous == TokenNameDOT) { // e.g. foo().[fred]()
 					if (this.invocationType != SUPER_RECEIVER // e.g. not super.[fred]()
 //{ObjectTeams: base:
@@ -3815,6 +3939,8 @@
 				}
 				break;
 			case TokenNamenew:
+				if (this.inReferenceExpression)
+					break;
 				pushOnElementStack(K_BETWEEN_NEW_AND_LEFT_BRACKET);
 				this.qualifier = this.expressionPtr; // NB: even if there is no qualification, set it to the expression ptr so that the number of arguments are correctly computed
 				if (previous == TokenNameDOT) { // e.g. fred().[new] X()
@@ -4258,6 +4384,10 @@
 		}
 	}
 }
+protected void consumeIdentifierOrNew(boolean newForm) {
+	this.inReferenceExpression = false;
+	super.consumeIdentifierOrNew(newForm);
+}
 protected void consumeOnlySynchronized() {
 	super.consumeOnlySynchronized();
 	this.hasUnusedModifiers = false;
@@ -4317,6 +4447,10 @@
 	super.consumeTypeImportOnDemandDeclarationName();
 	this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
 }
+protected void consumeImportDeclaration() {
+	super.consumeImportDeclaration();
+	popElement(K_INSIDE_IMPORT_STATEMENT);
+}
 protected void consumeTypeParameters() {
 	super.consumeTypeParameters();
 	popElement(K_BINARY_OPERATOR);
@@ -4816,11 +4950,11 @@
 	}
 	return super.createStringLiteral(token, start, end, lineNumber);
 }
-protected TypeReference copyDims(TypeReference typeRef, int dim) {
+protected TypeReference augmentTypeWithAdditionalDimensions(TypeReference typeRef, int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
 	if (this.assistNode == typeRef) {
 		return typeRef;
 	}
-	TypeReference result = super.copyDims(typeRef, dim);
+	TypeReference result = super.augmentTypeWithAdditionalDimensions(typeRef, additionalDimensions, additionalAnnotations, isVarargs);
 	if (this.assistNodeParent == typeRef) {
 		this.assistNodeParent = result;
 	}
@@ -4883,8 +5017,8 @@
 
 	return ref;
 }
-protected NameReference getUnspecifiedReference() {
-	NameReference nameReference = super.getUnspecifiedReference();
+protected NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
+	NameReference nameReference = super.getUnspecifiedReference(rejectTypeAnnotations);
 	if (this.record) {
 		recordReference(nameReference);
 	}
@@ -5462,7 +5596,16 @@
 	}
 	return false;	
 }
-
+protected boolean isInImportStatement() {
+	int i = this.elementPtr;
+	while (i > -1) {
+		if (this.elementKindStack[i] == K_INSIDE_IMPORT_STATEMENT) {
+			return true;
+		}
+		i--;
+	}
+	return false;
+}
 //{ObjectTeams: OT completion
 @Override
 protected LiftingTypeReference completeLiftingTypeReference(int dims) {
@@ -5524,4 +5667,4 @@
 	return spec;
 }
 // SH}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
index 88a632d..0952659 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
- * $Id: CompletionScanner.java 22741 2009-10-13 22:23:05Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -105,7 +109,7 @@
 	}
 	return super.getCurrentTokenSourceString();
 }
-public int getNextToken() throws InvalidInputException {
+protected int getNextToken0() throws InvalidInputException {
 
 	this.wasAcr = false;
 	this.unicodeCharSize = 0;
@@ -238,6 +242,9 @@
 							return TokenNameDOT;
 						}
 					} else {
+//{ObjectTeams: record the one '.':
+						this._dotSeen = 2; // now
+// SH}
 						this.currentPosition = temp;
 						return TokenNameDOT;
 					}
@@ -257,13 +264,20 @@
 							return TokenNameMINUS_MINUS;
 						if (test > 0)
 							return TokenNameMINUS_EQUAL;
-//{ObjectTeams: check for callout binding after '-' tokens
-						else {
-							if (test < 0 && this._isOTSource)
-								if (getNextChar('>')) {
-									this._calloutSeen = true;
-									return TokenNameBINDOUT;
+//{ObjectTeams: set _calloutSeen?
+/* orig:
+						if (getNextChar('>'))
+							return TokenNameARROW;
+  :giro */
+						if (getNextChar('>')) {
+							if (this._isOTSource) {
+								this._calloutSeen = true; // TODO distinguish from ARROW?
+								if (this._insideParameterMapping) {
+									this._bindoutLookahead = new BindoutLookahead();
+									return this._bindoutLookahead.getNextToken();
 								}
+							}
+							return TokenNameARROW;
 						}
 // Markus Witte}
 						return TokenNameMINUS;
@@ -368,6 +382,8 @@
 				case '?' :
 					return TokenNameQUESTION;
 				case ':' :
+					if (getNextChar(':'))
+						return TokenNameCOLON_COLON;
 					return TokenNameCOLON;
 				case '\'' :
 					{
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
index 698ff4c..bf268d2 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -396,11 +400,11 @@
 	super.consumeMethodBody();
 	popElement(K_METHOD_DELIMITER);
 }
-protected void consumeMethodDeclaration(boolean isNotAbstract) {
+protected void consumeMethodDeclaration(boolean isNotAbstract, boolean isDefaultMethod) {
 	if (!isNotAbstract) {
 		popElement(K_METHOD_DELIMITER);
 	}
-	super.consumeMethodDeclaration(isNotAbstract);
+	super.consumeMethodDeclaration(isNotAbstract, isDefaultMethod);
 }
 protected void consumeMethodHeader() {
 	super.consumeMethodHeader();
@@ -991,7 +995,7 @@
 
 	/* no need to take action if not inside completed identifiers */
 	if ((index = indexOfAssistIdentifier(true)) < 0) {
-/*
+/* orig: 
 		return super.getTypeReference(dim);
  :giro */
 		return super.getTypeReference(dim, liftingTypeAllowed);
@@ -1154,6 +1158,8 @@
 		return super.getUnspecifiedReferenceOptimized();
 	}
 
+	consumeNonTypeUseName();
+	
 	/* retrieve identifiers subset and whole positions, the completion node positions
 		should include the entire replaced source. */
 	int length = this.identifierLengthStack[this.identifierLengthPtr];
@@ -1796,6 +1802,8 @@
 	this.astLengthPtr = -1;
 	this.expressionPtr = -1;
 	this.expressionLengthPtr = -1;
+	this.typeAnnotationLengthPtr = -1;
+	this.typeAnnotationPtr = -1;
 	this.identifierPtr = -1;
 	this.identifierLengthPtr	= -1;
 	this.intPtr = -1;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java
index bbbce40..98d8147 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java
@@ -5,8 +5,14 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *******************************************************************************/
 package org.eclipse.jdt.internal.codeassist.select;
 
@@ -23,7 +29,7 @@
 		super(name, posNom, tr, modifiers);
 	}
 
-	public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
+	public TypeBinding bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
 
 		super.bind(scope, typeBinding, used);
 		throw new SelectionNodeFound(this.binding);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java
index fca2f0f..ead885d 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java
@@ -1,11 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: SelectionOnMessageSend.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -71,7 +74,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
index 930a18d..3645f2e 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -291,6 +295,10 @@
 	popElement(K_CAST_STATEMENT);
 	super.consumeCastExpressionLL1();
 }
+protected void consumeCastExpressionLL1WithBounds() {
+	popElement(K_CAST_STATEMENT);
+	super.consumeCastExpressionLL1WithBounds();
+}
 protected void consumeCastExpressionWithGenericsArray() {
 	popElement(K_CAST_STATEMENT);
 	super.consumeCastExpressionWithGenericsArray();
@@ -349,9 +357,6 @@
 				arg.annotations = new Annotation[length],
 				0,
 				length);
-			RecoveredType currentRecoveryType = this.currentRecoveryType();
-			if (currentRecoveryType != null)
-				currentRecoveryType.annotationsConsumed(arg.annotations);
 		}
 
 		pushOnAstStack(arg);
@@ -635,19 +640,43 @@
 			}
 		}
 	} else {
+		boolean isReceiver = this.intStack[this.intPtr--] == 0;
+	    if (isReceiver) {
+	    	this.expressionPtr--;
+	    	this.expressionLengthPtr --;
+	    }
 		this.identifierLengthPtr--;
 		char[] identifierName = this.identifierStack[this.identifierPtr];
 		long namePositions = this.identifierPositionStack[this.identifierPtr--];
 		int extendedDimensions = this.intStack[this.intPtr--];
+		Annotation [][] annotationsOnExtendedDimensions = extendedDimensions == 0 ? null : getAnnotationsOnDimensions(extendedDimensions);
+		Annotation [] varArgsAnnotations = null;
+		int length;
 		int endOfEllipsis = 0;
 		if (isVarArgs) {
 			endOfEllipsis = this.intStack[this.intPtr--];
+			if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+				System.arraycopy(
+					this.typeAnnotationStack,
+					(this.typeAnnotationPtr -= length) + 1,
+					varArgsAnnotations = new Annotation[length],
+					0,
+					length);
+			} 
 		}
 		int firstDimensions = this.intStack[this.intPtr--];
-		final int typeDimensions = firstDimensions + extendedDimensions;
-		TypeReference type = getTypeReference(typeDimensions);
+		TypeReference type = getTypeReference(firstDimensions);
+
+		if (isVarArgs || extendedDimensions != 0) {
+			if (isVarArgs) {
+				type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);	
+			} 
+			if (extendedDimensions != 0) { // combination illegal.
+				type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
+			}
+			type.sourceEnd = type.isParameterizedTypeReference() ? this.endStatementPosition : this.endPosition;
+		}
 		if (isVarArgs) {
-			type = copyDims(type, typeDimensions + 1);
 			if (extendedDimensions == 0) {
 				type.sourceEnd = endOfEllipsis;
 			}
@@ -664,7 +693,6 @@
 		arg.declarationSourceStart = modifierPositions;
 
 		// consume annotations
-		int length;
 		if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
 			System.arraycopy(
 				this.expressionStack,
@@ -672,6 +700,9 @@
 				arg.annotations = new Annotation[length],
 				0,
 				length);
+			RecoveredType currentRecoveryType = this.currentRecoveryType();
+			if (currentRecoveryType != null)
+				currentRecoveryType.annotationsConsumed(arg.annotations);
 		}
 
 		pushOnAstStack(arg);
@@ -707,6 +738,10 @@
 	super.consumeInsideCastExpressionLL1();
 	pushOnElementStack(K_CAST_STATEMENT);
 }
+protected void consumeInsideCastExpressionLL1WithBounds() {
+	super.consumeInsideCastExpressionLL1WithBounds();
+	pushOnElementStack(K_CAST_STATEMENT);
+}
 protected void consumeInsideCastExpressionWithQualifiedGenerics() {
 	super.consumeInsideCastExpressionWithQualifiedGenerics();
 	pushOnElementStack(K_CAST_STATEMENT);
@@ -744,11 +779,11 @@
 		}
 	}
 }
-protected void consumeMarkerAnnotation() {
+protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
 	int index;
 
 	if ((index = this.indexOfAssistIdentifier()) < 0) {
-		super.consumeMarkerAnnotation();
+		super.consumeMarkerAnnotation(isTypeAnnotation);
 		return;
 	}
 
@@ -789,7 +824,11 @@
 
 	markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
 	markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
-	pushOnExpressionStack(markerAnnotation);
+	if (isTypeAnnotation) {
+		pushOnTypeAnnotationStack(markerAnnotation);
+	} else {
+		pushOnExpressionStack(markerAnnotation);
+	}
 }
 protected void consumeMemberValuePair() {
 	if (this.indexOfAssistIdentifier() < 0) {
@@ -929,11 +968,11 @@
 	this.lastCheckPoint = constructorCall.sourceEnd + 1;
 	this.isOrphanCompletionNode = true;
 }
-protected void consumeNormalAnnotation() {
+protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
 	int index;
 
 	if ((index = this.indexOfAssistIdentifier()) < 0) {
-		super.consumeNormalAnnotation();
+		super.consumeNormalAnnotation(isTypeAnnotation);
 		return;
 	}
 
@@ -982,13 +1021,17 @@
 			length);
 	}
 	normalAnnotation.declarationSourceEnd = this.rParenPos;
-	pushOnExpressionStack(normalAnnotation);
+	if (isTypeAnnotation) {
+		pushOnTypeAnnotationStack(normalAnnotation);
+	} else {
+		pushOnExpressionStack(normalAnnotation);
+	}
 }
-protected void consumeSingleMemberAnnotation() {
+protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
 	int index;
 
 	if ((index = this.indexOfAssistIdentifier()) < 0) {
-		super.consumeSingleMemberAnnotation();
+		super.consumeSingleMemberAnnotation(isTypeAnnotation);
 		return;
 	}
 
@@ -1031,7 +1074,11 @@
 	singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
 	this.expressionLengthPtr--;
 	singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
-	pushOnExpressionStack(singleMemberAnnotation);
+	if (isTypeAnnotation) {
+		pushOnTypeAnnotationStack(singleMemberAnnotation);
+	} else {
+		pushOnExpressionStack(singleMemberAnnotation);
+	}
 }
 protected void consumeStaticImportOnDemandDeclarationName() {
 	// TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
@@ -1227,25 +1274,32 @@
 	selectionScanner.selectionEnd = end;
 	return this.dietParse(sourceUnit, compilationResult);
 }
-protected NameReference getUnspecifiedReference() {
+protected NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
 	/* build a (unspecified) NameReference which may be qualified*/
 
 	int completionIndex;
 
 	/* no need to take action if not inside completed identifiers */
 	if ((completionIndex = indexOfAssistIdentifier()) < 0) {
-		return super.getUnspecifiedReference();
+		return super.getUnspecifiedReference(rejectTypeAnnotations);
 	}
 
+	if (rejectTypeAnnotations) {
+		consumeNonTypeUseName();
+	}
 	int length = this.identifierLengthStack[this.identifierLengthPtr];
 	if (CharOperation.equals(assistIdentifier(), SUPER)){
 		Reference reference;
 		if (completionIndex > 0){ // qualified super
 			// discard 'super' from identifier stacks
+			// There is some voodoo going on here in combination with SelectionScanne#scanIdentifierOrKeyword, do in Rome as Romans do and leave the stacks at the right depth.
 			this.identifierLengthStack[this.identifierLengthPtr] = completionIndex;
 			int ptr = this.identifierPtr -= (length - completionIndex);
 			pushOnGenericsLengthStack(0);
 			pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+			for (int i = 0; i < completionIndex; i++) {
+				pushOnTypeAnnotationLengthStack(0);
+			}
 			reference =
 				new SelectionOnQualifiedSuperReference(
 					getTypeReference(0),
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
index 1ea0562..c7928b3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: IProblem.java 23306 2010-01-23 13:45:42Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -152,6 +155,17 @@
  *									UninitializedLocalVariableHintMissingDefault
  *									UninitializedBlankFinalFieldHintMissingDefault
  *									ShouldReturnValueHintMissingDefault
+ *									IllegalModifierForInterfaceDefaultMethod
+ *									InheritedDefaultMethodConflictsWithOtherInherited
+ *									ConflictingNullAnnotations
+ *									ConflictingInheritedNullAnnotations
+ *									UnsafeElementTypeConversion
+ *									ArrayReferencePotentialNullReference
+ *									DereferencingNullableExpression
+ *									NullityMismatchingTypeAnnotation
+ *									NullityMismatchingTypeAnnotationSuperHint
+ *									NullityUncheckedTypeAnnotationDetail
+ *									NullityUncheckedTypeAnnotationDetailSuperHint
  *									NullableFieldReference
  *									UninitializedNonNullField
  *									UninitializedNonNullFieldHintMissingDefault
@@ -160,6 +174,13 @@
  *									NonNullSpecdFieldComparisonYieldsFalse
  *									NonNullExpressionComparisonYieldsFalse
  *									RedundantNullCheckOnNonNullExpression
+ *									ReferenceExpressionParameterMismatchPromisedNullable
+ *									ReferenceExpressionParameterRequiredNonnullUnchecked
+ *									ReferenceExpressionReturnNullRedef
+ *									ReferenceExpressionReturnNullRedefUnchecked
+ *									DuplicateInheritedDefaultMethods
+ *									SuperAccessCannotBypassDirectSuper
+ *									SuperCallCannotBypassOverride
  *									ConflictingNullAnnotations
  *									ConflictingInheritedNullAnnotations
  *									UnsafeElementTypeConversion
@@ -167,7 +188,29 @@
  *									NullUnboxing
  *									NullExpressionReference
  *									PotentialNullExpressionReference
- *******************************************************************************/
+ *									RedundantNullCheckAgainstNonNullType
+ *									NullAnnotationUnsupportedLocation
+ *									NullAnnotationUnsupportedLocationAtType
+ *									NullityMismatchTypeArgument
+ *									ContradictoryNullAnnotationsOnBound
+ *									UnsafeNullnessCast
+ *      Jesper S Moller  - added the following constants
+ *									TargetTypeNotAFunctionalInterface
+ *									OuterLocalMustBeEffectivelyFinal
+ *									IllegalModifiersForPackage
+ *									DuplicateAnnotationNotMarkedRepeatable
+ *									DisallowedTargetForContainerAnnotation
+ *									RepeatedAnnotationWithContainerAnnotation
+ *									ContainingAnnotationMustHaveValue
+ *									ContainingAnnotationHasNonDefaultMembers
+ *									ContainingAnnotationHasWrongValueType
+ *								 	ContainingAnnotationHasShorterRetention
+ *									RepeatableAnnotationHasTargets
+ *									RepeatableAnnotationTargetMismatch
+ *									RepeatableAnnotationIsDocumented
+ *									RepeatableAnnotationIsInherited
+ *									RepeatableAnnotationWithRepeatingContainerAnnotation
+*******************************************************************************/
 package org.eclipse.jdt.core.compiler;
 
 import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
@@ -411,7 +454,8 @@
 	int DuplicateBlankFinalFieldInitialization = FieldRelated + 82;
 	/** @since 3.6 */
 	int UnresolvedVariable = FieldRelated + 83;
-
+	/** @since 3.9 BETA_JAVA8 */
+	int NonStaticOrAlienTypeReceiver = MethodRelated + 84;
 	// variable hiding
 	/** @since 3.0 */
 	int LocalVariableHidingLocalVariable = Internal + 90;
@@ -427,6 +471,12 @@
 	int ArgumentHidingField = Internal + 95;
 	/** @since 3.1 */
 	int MissingSerialVersion = Internal + 96;
+	/** @since 3.9 BETA_JAVA8 */
+	int LambdaRedeclaresArgument = Internal + 97;
+	/** @since 3.9 BETA_JAVA8 */
+	int LambdaRedeclaresLocal = Internal + 98;
+	/** @since 3.9 BETA_JAVA8 */
+	int LambdaDescriptorMentionsUnmentionable = 99;
 
 	// methods
 	int UndefinedMethod = MethodRelated + 100;
@@ -457,6 +507,18 @@
 	int MethodCanBeStatic = Internal + MethodRelated + 121;
 	/** @since 3.7 */
 	int MethodCanBePotentiallyStatic = Internal + MethodRelated + 122;
+	/** @since 3.9 BETA_JAVA8 */
+	int MethodReferenceSwingsBothWays = Internal + MethodRelated + 123;
+	/** @since 3.9 BETA_JAVA8 */
+	int StaticMethodShouldBeAccessedStatically = Internal + MethodRelated + 124;
+	/** @since 3.9 BETA_JAVA8 */
+	int InvalidArrayConstructorReference = Internal + MethodRelated + 125;
+	/** @since 3.9 BETA_JAVA8 */
+	int ConstructedArrayIncompatible = Internal + MethodRelated + 126;
+	/** @since 3.9 BETA_JAVA8 */
+	int DanglingReference = Internal + MethodRelated + 127;
+	/** @since 3.9 BETA_JAVA8 */
+	int IncompatibleMethodReference = Internal + MethodRelated + 128;
 
 	// constructors
 	/** @since 3.4 */
@@ -888,8 +950,11 @@
 	/** @since 3.2 */
 	int EnumConstantsCannotBeSurroundedByParenthesis = Syntax + Internal + 442;
 
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalUseOfUnderscoreAsAnIdentifier = Syntax + Internal + 443;
+
 	 /** @since 3.10 */
-	int UninternedIdentityComparison = Syntax + Internal + 443;
+	int UninternedIdentityComparison = Syntax + Internal + 444;
 
 	// detected task
 	/** @since 2.1 */
@@ -1317,8 +1382,53 @@
 	int UnusedWarningToken = Internal + 635;
 	/** @since 3.6 */
 	int MissingOverrideAnnotationForInterfaceMethodImplementation = MethodRelated + 636;
-
-	/**
+	/** @since 3.9 BETA_JAVA8 */
+    int InvalidUsageOfTypeAnnotations = Syntax + Internal + 637;
+    /** @since 3.9 BETA_JAVA8 */
+    int DisallowedExplicitThisParameter = Syntax + Internal + 638;
+    /** @since 3.9 BETA_JAVA8 */
+    int MisplacedTypeAnnotations = Syntax + Internal + 639;
+    /** @since 3.9 BETA_JAVA8 */
+    int IllegalTypeAnnotationsInStaticMemberAccess = Internal + Syntax + 640;
+    /** @since 3.9 BETA_JAVA8 */
+    int IllegalUsageOfTypeAnnotations = Internal + Syntax + 641;
+    /** @since 3.9 BETA_JAVA8 */
+    int IllegalDeclarationOfThisParameter = Internal + Syntax + 642;
+    /** @since 3.9 BETA_JAVA8 */
+    int ExplicitThisParameterNotBelow18 = Internal + Syntax + 643;
+    /** @since 3.9 BETA_JAVA8 */
+    int DefaultMethodNotBelow18 = Internal + Syntax + 644;
+    /** @since 3.9 BETA_JAVA8 */
+    int LambdaExpressionNotBelow18 = Internal + Syntax + 645;
+    /** @since 3.9 BETA_JAVA8 */
+    int MethodReferenceNotBelow18 = Internal + Syntax + 646;
+    /** @since 3.9 BETA_JAVA8 */
+    int ConstructorReferenceNotBelow18 = Internal + Syntax + 647;
+    /** @since 3.9 BETA_JAVA8 */
+    int ExplicitThisParameterNotInLambda = Internal + Syntax + 648;
+    /** @since 3.9 BETA_JAVA8 */
+    int ExplicitAnnotationTargetRequired = TypeRelated + 649;
+    /** @since 3.9 BETA_JAVA8 */
+    int IllegalTypeForExplicitThis = Internal + Syntax + 650;
+    /** @since 3.9 BETA_JAVA8 */
+    int IllegalQualifierForExplicitThis = Internal + Syntax + 651;
+    /** @since 3.9 BETA_JAVA8 */
+    int IllegalQualifierForExplicitThis2 = Internal + Syntax + 652;
+    /** @since 3.9 BETA_JAVA8 */
+    int TargetTypeNotAFunctionalInterface = Internal + TypeRelated + 653;
+    /** @since 3.9 BETA_JAVA8 */
+    int IllegalVarargInLambda = Internal + TypeRelated + 654;
+    /** @since 3.9 BETA_JAVA8 */
+    int illFormedParameterizationOfFunctionalInterface = Internal + TypeRelated + 655;
+    /** @since 3.9 BETA_JAVA8 */
+    int lambdaSignatureMismatched = Internal + TypeRelated + 656;
+    /** @since 3.9 BETA_JAVA8 */
+    int lambdaParameterTypeMismatched = Internal + TypeRelated + 657;
+    /** @since 3.9 BETA_JAVA8 */
+    int IncompatibleLambdaParameterType = Internal + TypeRelated + 658;
+    /** @since 3.9 BETA_JAVA8 */
+    int NoGenericLambda = Internal + TypeRelated + 659;
+    /**
 	 * More problems in generics
 	 */
     /** @since 3.4 */
@@ -1327,6 +1437,15 @@
 	int UnusedTypeParameter = TypeRelated + 661;
 	/** @since 3.9 */
 	int IllegalArrayOfUnionType = TypeRelated + 662;
+	/** @since 3.9 BETA_JAVA8 */
+	int OuterLocalMustBeEffectivelyFinal = Internal + 663;
+	/** @since 3.9 BETA_JAVA8 */
+	int InterfaceNotFunctionalInterface = Internal + TypeRelated + 664;
+	/** @since 3.9 BETA_JAVA8 */
+	int ConstructionTypeMismatch = Internal + TypeRelated + 665;
+    /** @since 3.9 BETA_JAVA8 */
+    int ToleratedMisplacedTypeAnnotations = Syntax + Internal + 666;
+
 
 	/**
 	 * Null analysis for other kinds of expressions, syntactically nonnull
@@ -1368,7 +1487,7 @@
 	int IllegalModifierForEnum = TypeRelated + 750;
 	/** @since 3.1 */
 	int IllegalModifierForEnumConstant = FieldRelated + 751;
-	/** @deprecated - problem could not be reported, enums cannot be local takes precedence
+	/** @deprecated - problem could not be reported, enums cannot be local takes precedence 
 	 *   @since 3.1 */
 	int IllegalModifierForLocalEnum = TypeRelated + 752;
 	/** @since 3.1 */
@@ -1500,6 +1619,54 @@
 	int ExplicitlyClosedAutoCloseable = Internal + 889;
 	/** @since 3.8 */
 	int SwitchOnEnumNotBelow15 = TypeRelated + 890;	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=360317
+	/** @since 3.9 BETA_JAVA8 */
+	int IntersectionCastNotBelow18 = TypeRelated + 891;
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalBasetypeInIntersectionCast = TypeRelated + 892;
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalArrayTypeInIntersectionCast = TypeRelated + 893;
+	/** @since 3.9 BETA_JAVA8 */
+	int DuplicateBoundInIntersectionCast = TypeRelated + 894;
+	/** @since 3.9 BETA_JAVA8 */
+	int MultipleFunctionalInterfaces = TypeRelated + 895;
+	/** @since 3.9 BETA_JAVA8 */
+	int StaticInterfaceMethodNotBelow18 = Internal + Syntax + 896;
+	/** @since 3.9 BETA_JAVA8 */
+	int DuplicateAnnotationNotMarkedRepeatable = TypeRelated + 897;
+	/** @since 3.9 BETA_JAVA8 */
+	int DisallowedTargetForContainerAnnotationType = TypeRelated + 898;
+	/** @since 3.9 BETA_JAVA8 */
+	int RepeatedAnnotationWithContainerAnnotation = TypeRelated + 899;
+	
+	/**
+	 * External problems -- These are problems defined by other plugins
+	 */
+
+	/** @since 3.2 */
+	int ExternalProblemNotFixable = 900;
+
+	// indicates an externally defined problem that has a quick-assist processor
+	// associated with it
+	/** @since 3.2 */
+	int ExternalProblemFixable = 901;
+	
+	/** @since 3.9 BETA_JAVA8 */
+	int ContainerAnnotationTypeHasWrongValueType = TypeRelated + 902;
+	/** @since 3.9 BETA_JAVA8 */
+	int ContainerAnnotationTypeMustHaveValue = TypeRelated + 903;
+	/** @since 3.9 BETA_JAVA8 */
+	int ContainerAnnotationTypeHasNonDefaultMembers = TypeRelated + 904;
+	/** @since 3.9 BETA_JAVA8 */
+	int ContainerAnnotationTypeHasShorterRetention = TypeRelated + 905;
+	/** @since 3.9 BETA_JAVA8 */
+	int RepeatableAnnotationTypeTargetMismatch = TypeRelated + 906;
+	/** @since 3.9 BETA_JAVA8 */
+	int RepeatableAnnotationTypeIsDocumented = TypeRelated + 907;
+	/** @since 3.9 BETA_JAVA8 */
+	int RepeatableAnnotationTypeIsInherited = TypeRelated + 908;
+	/** @since 3.9 BETA_JAVA8 */
+	int RepeatableAnnotationWithRepeatingContainerAnnotation = TypeRelated + 909;
+	
 	/**
 	 * Errors/warnings from annotation based null analysis
 	 */
@@ -1565,18 +1732,73 @@
 	int ConflictingNullAnnotations = MethodRelated + 939;
 	/** @since 3.9 */
 	int ConflictingInheritedNullAnnotations = MethodRelated + 940;
+	/** @since 3.9 BETA_JAVA8 */
+	int RedundantNullCheckOnField = Internal + 941;
+	/** @since 3.9 BETA_JAVA8 */
+	int FieldComparisonYieldsFalse = Internal + 942;
+	
+	/** @since 3.9 BETA_JAVA8 */
+	int ArrayReferencePotentialNullReference = Internal + 951;
+	/** @since 3.9 BETA_JAVA8 */
+	int DereferencingNullableExpression = Internal + 952;
+	/** @since 3.9 BETA_JAVA8 */
+	int NullityMismatchingTypeAnnotation = Internal + 953;
+	/** @since 3.9 BETA_JAVA8 */
+	int NullityMismatchingTypeAnnotationSuperHint = Internal + 954;
+	/** @since 3.9 BETA_JAVA8 */
+	int NullityUncheckedTypeAnnotationDetail = Internal + 955;
+	/** @since 3.9 BETA_JAVA8 */
+	int NullityUncheckedTypeAnnotationDetailSuperHint = Internal + 956;
+	/** @since 3.9 BETA_JAVA8 */
+	int ReferenceExpressionParameterMismatchPromisedNullable = MethodRelated + 957;
+	/** @since 3.9 BETA_JAVA8 */
+	int ReferenceExpressionParameterRequiredNonnullUnchecked = MethodRelated + 958;
+	/** @since 3.9 BETA_JAVA8 */
+	int ReferenceExpressionReturnNullRedef = MethodRelated + 959;
+	/** @since 3.9 BETA_JAVA8 */
+	int ReferenceExpressionReturnNullRedefUnchecked = MethodRelated + 960;
+	/** @since 3.9 BETA_JAVA8 */
+	int RedundantNullCheckAgainstNonNullType = Internal + 961;
+	/** @since 3.9 BETA_JAVA8 */
+	int NullAnnotationUnsupportedLocation = Internal + 962;
+	/** @since 3.9 BETA_JAVA8 */
+	int NullAnnotationUnsupportedLocationAtType = Internal + 963;
+	/** @since 3.9 BETA_JAVA8 */
+	int NullityMismatchTypeArgument = Internal + 964;
+	/** @since 3.9 BETA_JAVA8 */
+	int ContradictoryNullAnnotationsOnBound = Internal + 965;
+	/** @since 3.9 BETA_JAVA8 */
+	int UnsafeNullnessCast = Internal + 966;
 
-	/**
-	 * External problems -- These are problems defined by other plugins
-	 */
+	// Java 8 work
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalModifiersForElidedType = Internal + 1001;
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalModifiers = Internal + 1002;
 
-	/** @since 3.2 */
-	int ExternalProblemNotFixable = 900;
+	// default methods:
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalModifierForInterfaceMethod18 = MethodRelated + 1050;
 
-	// indicates an externally defined problem that has a quick-assist processor
-	// associated with it
-	/** @since 3.2 */
-	int ExternalProblemFixable = 901;
+	/** @since 3.9 BETA_JAVA8 */
+	int DefaultMethodOverridesObjectMethod = MethodRelated + 1051;
+	
+	/** @since 3.9 BETA_JAVA8 */
+	int InheritedDefaultMethodConflictsWithOtherInherited = MethodRelated + 1052;
+	
+	/** @since 3.9 BETA_JAVA8 */
+	int DuplicateInheritedDefaultMethods = MethodRelated + 1053;
+
+	/** @since 3.9 BETA_JAVA8 */
+	int SuperAccessCannotBypassDirectSuper = TypeRelated + 1054;
+	/** @since 3.9 BETA_JAVA8 */
+	int SuperCallCannotBypassOverride = MethodRelated + 1055;
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalModifierCombinationForInterfaceMethod = MethodRelated + 1056;
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalStrictfpForAbstractInterfaceMethod = MethodRelated + 1057;
+	/** @since 3.9 BETA_JAVA8 */
+	int IllegalDefaultModifierSpecification = MethodRelated + 1058;
 
 //{ObjectTeams:
 	int OTJ_RELATED = 1000000;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
index cb0c895..a30fc4a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ASTVisitor.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -68,6 +72,9 @@
 	public void endVisit(ArrayInitializer arrayInitializer, BlockScope scope) {
 		// do nothing by default
 	}
+	public void endVisit(ArrayInitializer arrayInitializer, ClassScope scope) {
+		// do nothing by default
+	}
 	public void endVisit(
 		ArrayQualifiedTypeReference arrayQualifiedTypeReference,
 		BlockScope scope) {
@@ -288,12 +295,26 @@
 		// do nothing by default
 	}
 	/**
+	 * @param annotation
+	 * @param scope
+	 */
+	public void endVisit(MarkerAnnotation annotation, ClassScope scope) {
+		// do nothing by default
+	}
+	/**
 	 * @param pair
 	 * @param scope
 	 */
 	public void endVisit(MemberValuePair pair, BlockScope scope) {
 		// do nothing by default
 	}
+	/**
+	 * @param pair
+	 * @param scope
+	 */
+	public void endVisit(MemberValuePair pair, ClassScope scope) {
+		// do nothing by default
+	}
 	public void endVisit(MessageSend messageSend, BlockScope scope) {
 		// do nothing by default
 	}
@@ -311,6 +332,9 @@
 	public void endVisit(NormalAnnotation annotation, BlockScope scope) {
 		// do nothing by default
 	}
+	public void endVisit(NormalAnnotation annotation, ClassScope scope) {
+		// do nothing by default
+	}
 	public void endVisit(NullLiteral nullLiteral, BlockScope scope) {
 		// do nothing by default
 	}
@@ -391,6 +415,13 @@
 	public void endVisit(SingleMemberAnnotation annotation, BlockScope scope) {
 		// do nothing by default
 	}
+	/**
+	 * @param annotation
+	 * @param scope
+	 */
+	public void endVisit(SingleMemberAnnotation annotation, ClassScope scope) {
+		// do nothing by default
+	}
 	public void endVisit(
     		SingleNameReference singleNameReference,
     		BlockScope scope) {
@@ -483,6 +514,18 @@
 	public void endVisit(Wildcard wildcard, ClassScope scope) {
 		// do nothing by default
 	}
+	public void endVisit(LambdaExpression lambdaExpression, BlockScope blockScope) {
+		// do nothing by default
+	}
+	public void endVisit(ReferenceExpression referenceExpression, BlockScope blockScope) {
+		// do nothing by default	
+	}
+	public void endVisit(IntersectionCastTypeReference intersectionCastTypeReference, ClassScope scope) {
+		// do nothing by default
+	}
+	public void endVisit(IntersectionCastTypeReference intersectionCastTypeReference, BlockScope scope) {
+		// do nothing by default
+	}
 
 //{ObjectTeams:  visit new ast nodes:
 	public void endVisit(LiftingTypeReference  liftingTypeReference, BlockScope scope) {
@@ -552,6 +595,9 @@
 	public boolean visit(ArrayInitializer arrayInitializer, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
+	public boolean visit(ArrayInitializer arrayInitializer, ClassScope scope) {
+		return true; // do nothing by default, keep traversing
+	}
 	public boolean visit(
 		ArrayQualifiedTypeReference arrayQualifiedTypeReference,
 		BlockScope scope) {
@@ -772,6 +818,13 @@
 		return true;
 	}
 	/**
+	 * @param annotation
+	 * @param scope
+	 */
+	public boolean visit(MarkerAnnotation annotation, ClassScope scope) {
+		return true;
+	}
+	/**
 	 * @param pair
 	 * @param scope
 	 * @since 3.1
@@ -779,6 +832,13 @@
 	public boolean visit(MemberValuePair pair, BlockScope scope) {
 		return true;
 	}
+	/**
+	 * @param pair
+	 * @param scope
+	 */
+	public boolean visit(MemberValuePair pair, ClassScope scope) {
+		return true;
+	}
 	public boolean visit(MessageSend messageSend, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
@@ -798,6 +858,13 @@
 	public boolean visit(NormalAnnotation annotation, BlockScope scope) {
 		return true;
 	}
+	/**
+	 * @param annotation
+	 * @param scope
+	 */
+	public boolean visit(NormalAnnotation annotation, ClassScope scope) {
+		return true;
+	}
 	public boolean visit(NullLiteral nullLiteral, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
@@ -878,6 +945,13 @@
 	public boolean visit(SingleMemberAnnotation annotation, BlockScope scope) {
 		return true;
 	}
+	/**
+	 * @param annotation
+	 * @param scope
+	 */
+	public boolean visit(SingleMemberAnnotation annotation, ClassScope scope) {
+		return true;
+	}
 	public boolean visit(
 		SingleNameReference singleNameReference,
 		BlockScope scope) {
@@ -970,6 +1044,18 @@
 	public boolean visit(Wildcard wildcard, ClassScope scope) {
 		return true; // do nothing by default, keep traversing
 	}
+	public boolean visit(LambdaExpression lambdaExpression, BlockScope blockScope) {
+		return true; // do nothing by default, keep traversing
+	}
+	public boolean visit(ReferenceExpression referenceExpression, BlockScope blockScope) {
+		return true; // do nothing by default, keep traversing
+	}
+	public boolean visit(IntersectionCastTypeReference intersectionCastTypeReference, ClassScope scope) {
+		return true; // do nothing by default, keep traversing
+	}
+	public boolean visit(IntersectionCastTypeReference intersectionCastTypeReference, BlockScope scope) {
+		return true; // do nothing by default, keep traversing
+	}
 //{ObjectTeams: visit new ast nodes:
 	public boolean visit(LiftingTypeReference liftingTypeReference, BlockScope scope) {
 		return true; // do nothing by default, keep traversing
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index b870f7f..48d51ed 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -4,12 +4,27 @@
  * 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
- * $Id: ClassFile.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Jesper S Moller - Contributions for
+ *							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335             
+ *							Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
+ *							Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
+ *							Bug 412149 - [1.8][compiler] Emit repeated annotations into the designated container
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
+ *                          Bug 409246 - [1.8][compiler] Type annotations on catch parameters not handled properly
+ *                          Bug 415541 - [1.8][compiler] Type annotations in the body of static initializer get dropped
+ *                          Bug 415399 - [1.8][compiler] Type annotations on constructor results dropped by the code generator
+ *                          Bug 415470 - [1.8][compiler] Type annotations on class declaration go vanishing
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler;
 
@@ -36,14 +51,22 @@
 import org.eclipse.jdt.internal.compiler.ast.ClassLiteralAccess;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.FunctionalExpression;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
+import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.MemberValuePair;
 import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.NormalAnnotation;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
+import org.eclipse.jdt.internal.compiler.ast.Receiver;
 import org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationContext;
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
 import org.eclipse.jdt.internal.compiler.codegen.AttributeNamesConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
@@ -51,6 +74,7 @@
 import org.eclipse.jdt.internal.compiler.codegen.Opcodes;
 import org.eclipse.jdt.internal.compiler.codegen.StackMapFrame;
 import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream;
+import org.eclipse.jdt.internal.compiler.codegen.TypeAnnotationCodeStream;
 import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream.ExceptionMarker;
 import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream.StackDepthMarker;
 import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream.StackMarker;
@@ -136,6 +160,7 @@
 	// that collection contains all the remaining bytes of the .class file
 	public int headerOffset;
 	public Set innerClassesBindings;
+	public List bootstrapMethods = null;
 	public int methodCount;
 	public int methodCountOffset;
 	// pool managment
@@ -216,36 +241,34 @@
 		System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
 
 		AbstractMethodDeclaration[] methodDecls = typeDeclaration.methods;
+		boolean abstractMethodsOnly = false;
 		if (methodDecls != null) {
 			if (typeBinding.isInterface()) {
-				// we cannot create problem methods for an interface. So we have to generate a clinit
-				// which should contain all the problem
+				if (typeBinding.scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8)
+					abstractMethodsOnly = true;
+				// We generate a clinit which contains all the problems, since we may not be able to generate problem methods (< 1.8) and problem constructors (all levels).
 				classFile.addProblemClinit(problemsCopy);
-				for (int i = 0, length = methodDecls.length; i < length; i++) {
-					AbstractMethodDeclaration methodDecl = methodDecls[i];
-					MethodBinding method = methodDecl.binding;
-					if (method == null || method.isConstructor()) continue;
+			}
+			for (int i = 0, length = methodDecls.length; i < length; i++) {
+				AbstractMethodDeclaration methodDecl = methodDecls[i];
+				MethodBinding method = methodDecl.binding;
+				if (method == null) continue;
 //{ObjectTeams: may still need to keep abstract flag:
-					boolean isAbstractRoleModel = method.isStatic() && method.declaringClass.isRole();
+				boolean isAbstractRoleModel = method.isStatic() && method.declaringClass.isRole();
 // orig:
+				if (abstractMethodsOnly) {
 					method.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
-// :giro//
-					if (isAbstractRoleModel) method.modifiers |= ClassFileConstants.AccStatic;
-// SH}
-					classFile.addAbstractMethod(methodDecl, method);
 				}
-			} else {
-				for (int i = 0, length = methodDecls.length; i < length; i++) {
-					AbstractMethodDeclaration methodDecl = methodDecls[i];
-					MethodBinding method = methodDecl.binding;
-					if (method == null) continue;
-					if (method.isConstructor()) {
-						classFile.addProblemConstructor(methodDecl, method, problemsCopy);
-					} else if (method.isAbstract()) {
-						classFile.addAbstractMethod(methodDecl, method);
-					} else {
-						classFile.addProblemMethod(methodDecl, method, problemsCopy);
-					}
+// :giro
+				if (isAbstractRoleModel) method.modifiers |= ClassFileConstants.AccStatic;
+// SH}
+				if (method.isConstructor()) {
+					if (typeBinding.isInterface()) continue;
+					classFile.addProblemConstructor(methodDecl, method, problemsCopy);
+				} else if (method.isAbstract()) {
+					classFile.addAbstractMethod(methodDecl, method);
+				} else {
+					classFile.addProblemMethod(methodDecl, method, problemsCopy);
 				}
 			}
 			// add abstract methods
@@ -286,7 +309,15 @@
 		this.isNestedType = typeBinding.isNestedType();
 		if (this.targetJDK >= ClassFileConstants.JDK1_6) {
 			this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE;
-			this.codeStream = new StackMapFrameCodeStream(this);
+			if (this.targetJDK >= ClassFileConstants.JDK1_8) {
+				this.produceAttributes |= ClassFileConstants.ATTR_TYPE_ANNOTATION;
+				this.codeStream = new TypeAnnotationCodeStream(this);
+				if (options.produceMethodParameters) {
+					this.produceAttributes |= ClassFileConstants.ATTR_METHOD_PARAMETERS;
+				}
+			} else {
+				this.codeStream = new StackMapFrameCodeStream(this);
+			}
 		} else if (this.targetJDK == ClassFileConstants.CLDC_1_1) {
 			this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3
 			this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
@@ -392,7 +423,14 @@
 			if (typeDeclaration != null) {
 				final Annotation[] annotations = typeDeclaration.annotations;
 				if (annotations != null) {
-					attributesNumber += generateRuntimeAnnotations(annotations);
+					long targetMask;
+					if (typeDeclaration.isPackageInfo())
+						targetMask = TagBits.AnnotationForPackage;
+					else if (this.referenceBinding.isAnnotationType())
+						targetMask = TagBits.AnnotationForType | TagBits.AnnotationForAnnotationType;
+					else
+						targetMask = TagBits.AnnotationForType | TagBits.AnnotationForTypeUse;
+					attributesNumber += generateRuntimeAnnotations(annotations, targetMask); 
 				}
 			}
 		}
@@ -408,6 +446,10 @@
 			}
 			attributesNumber += generateHierarchyInconsistentAttribute();
 		}
+		// Functional expression and lambda bootstrap methods
+		if (this.bootstrapMethods != null && !this.bootstrapMethods.isEmpty()) {
+			attributesNumber += generateBootstrapMethods(this.bootstrapMethods);
+		}
 		// Inner class attribute
 		int numberOfInnerClasses = this.innerClassesBindings == null ? 0 : this.innerClassesBindings.size();
 		if (numberOfInnerClasses != 0) {
@@ -426,6 +468,9 @@
 			generateMissingTypesAttribute();
 			attributesNumber++;
 		}
+		
+		attributesNumber += generateTypeAnnotationAttributeForTypeDeclaration();
+		
 		// update the number of attributes
 		if (attributeOffset + 2 >= this.contents.length) {
 			resizeContents(2);
@@ -481,7 +526,39 @@
 			if (fieldDeclaration != null) {
 				Annotation[] annotations = fieldDeclaration.annotations;
 				if (annotations != null) {
-					attributesNumber += generateRuntimeAnnotations(annotations);
+					attributesNumber += generateRuntimeAnnotations(annotations, TagBits.AnnotationForField);
+				}
+
+				if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
+					List allTypeAnnotationContexts = new ArrayList();
+					if (annotations != null && (fieldDeclaration.bits & ASTNode.HasTypeAnnotations) != 0) {
+						fieldDeclaration.getAllAnnotationContexts(AnnotationTargetTypeConstants.FIELD, allTypeAnnotationContexts);
+					}
+					int invisibleTypeAnnotationsCounter = 0;
+					int visibleTypeAnnotationsCounter = 0;
+					TypeReference fieldType = fieldDeclaration.type;
+					if (fieldType != null && ((fieldType.bits & ASTNode.HasTypeAnnotations) != 0)) {
+						fieldType.getAllAnnotationContexts(AnnotationTargetTypeConstants.FIELD, allTypeAnnotationContexts);
+					}
+					int size = allTypeAnnotationContexts.size();
+					if (size != 0) {
+						AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
+						allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
+						for (int i = 0, max = allTypeAnnotationContextsArray.length; i < max; i++) {
+							AnnotationContext annotationContext = allTypeAnnotationContextsArray[i];
+							if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
+								invisibleTypeAnnotationsCounter++;
+								allTypeAnnotationContexts.add(annotationContext);
+							} else {
+								visibleTypeAnnotationsCounter++;
+								allTypeAnnotationContexts.add(annotationContext);
+							}
+						}
+						attributesNumber += generateRuntimeTypeAnnotations(
+								allTypeAnnotationContextsArray,
+								visibleTypeAnnotationsCounter,
+								invisibleTypeAnnotationsCounter);
+					}
 				}
 			}
 		}
@@ -687,6 +764,10 @@
 		AbstractMethodDeclaration method,
 		MethodBinding methodBinding,
 		CategorizedProblem[] problems) {
+		
+		if (methodBinding.declaringClass.isInterface()) {
+			method.abort(ProblemSeverities.AbortType, null);
+		}
 
 		// always clear the strictfp/native/abstract bit for a problem method
 		generateMethodInfoHeader(methodBinding, methodBinding.modifiers & ~(ClassFileConstants.AccStrictfp | ClassFileConstants.AccNative | ClassFileConstants.AccAbstract));
@@ -856,6 +937,7 @@
 	 * They are:
 	 * - synthetic access methods
 	 * - default abstract methods
+	 * - lambda methods.
 	 */
 	public void addSpecialMethods() {
 
@@ -872,57 +954,148 @@
 			int attributeNumber = generateMethodInfoAttributes(methodBinding);
 			completeMethodInfo(methodBinding, methodAttributeOffset, attributeNumber);
 		}
+		
 		// add synthetic methods infos
-		SyntheticMethodBinding[] syntheticMethods = this.referenceBinding.syntheticMethods();
-		if (syntheticMethods != null) {
-			for (int i = 0, max = syntheticMethods.length; i < max; i++) {
-				SyntheticMethodBinding syntheticMethod = syntheticMethods[i];
-				switch (syntheticMethod.purpose) {
-					case SyntheticMethodBinding.FieldReadAccess :
-					case SyntheticMethodBinding.SuperFieldReadAccess :
-						// generate a method info to emulate an reading access to
-						// a non-accessible field
-						addSyntheticFieldReadAccessMethod(syntheticMethod);
-						break;
-					case SyntheticMethodBinding.FieldWriteAccess :
-					case SyntheticMethodBinding.SuperFieldWriteAccess :
-						// generate a method info to emulate an writing access to
-						// a non-accessible field
-						addSyntheticFieldWriteAccessMethod(syntheticMethod);
-						break;
-					case SyntheticMethodBinding.MethodAccess :
-					case SyntheticMethodBinding.SuperMethodAccess :
-					case SyntheticMethodBinding.BridgeMethod :
+		int emittedSyntheticsCount = 0;
+		boolean continueScanningSynthetics = true;
+		while (continueScanningSynthetics) {
+			continueScanningSynthetics = false;
+			SyntheticMethodBinding[] syntheticMethods = this.referenceBinding.syntheticMethods();
+			int currentSyntheticsCount = syntheticMethods == null ? 0: syntheticMethods.length;
+			if (emittedSyntheticsCount != currentSyntheticsCount) {
+				for (int i = emittedSyntheticsCount, max = currentSyntheticsCount; i < max; i++) {
+					SyntheticMethodBinding syntheticMethod = syntheticMethods[i];
+					switch (syntheticMethod.purpose) {
+						case SyntheticMethodBinding.FieldReadAccess :
+						case SyntheticMethodBinding.SuperFieldReadAccess :
+							// generate a method info to emulate an reading access to
+							// a non-accessible field
+							addSyntheticFieldReadAccessMethod(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.FieldWriteAccess :
+						case SyntheticMethodBinding.SuperFieldWriteAccess :
+							// generate a method info to emulate an writing access to
+							// a non-accessible field
+							addSyntheticFieldWriteAccessMethod(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.MethodAccess :
+						case SyntheticMethodBinding.SuperMethodAccess :
+						case SyntheticMethodBinding.BridgeMethod :
 //{ObjectTeams: more kinds:
-					case SyntheticMethodBinding.RoleMethodBridgeInner :
-					case SyntheticMethodBinding.RoleMethodBridgeOuter :
+						case SyntheticMethodBinding.RoleMethodBridgeInner :
+						case SyntheticMethodBinding.RoleMethodBridgeOuter :
 // SH}
-						// generate a method info to emulate an access to a non-accessible method / super-method or bridge method
-						addSyntheticMethodAccessMethod(syntheticMethod);
-						break;
-					case SyntheticMethodBinding.ConstructorAccess :
-						// generate a method info to emulate an access to a non-accessible constructor
-						addSyntheticConstructorAccessMethod(syntheticMethod);
-						break;
-					case SyntheticMethodBinding.EnumValues :
-						// generate a method info to define <enum>#values()
-						addSyntheticEnumValuesMethod(syntheticMethod);
-						break;
-					case SyntheticMethodBinding.EnumValueOf :
-						// generate a method info to define <enum>#valueOf(String)
-						addSyntheticEnumValueOfMethod(syntheticMethod);
-						break;
-					case SyntheticMethodBinding.SwitchTable :
-						// generate a method info to define the switch table synthetic method
-						addSyntheticSwitchTable(syntheticMethod);
-						break;
-					case SyntheticMethodBinding.TooManyEnumsConstants :
-						addSyntheticEnumInitializationMethod(syntheticMethod);
+							// generate a method info to emulate an access to a non-accessible method / super-method or bridge method
+							addSyntheticMethodAccessMethod(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.ConstructorAccess :
+							// generate a method info to emulate an access to a non-accessible constructor
+							addSyntheticConstructorAccessMethod(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.EnumValues :
+							// generate a method info to define <enum>#values()
+							addSyntheticEnumValuesMethod(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.EnumValueOf :
+							// generate a method info to define <enum>#valueOf(String)
+							addSyntheticEnumValueOfMethod(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.SwitchTable :
+							// generate a method info to define the switch table synthetic method
+							addSyntheticSwitchTable(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.TooManyEnumsConstants :
+							addSyntheticEnumInitializationMethod(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.LambdaMethod:
+							syntheticMethod.lambda.generateCode(this.referenceBinding.scope, this);
+							continueScanningSynthetics = true; // lambda code generation could schedule additional nested lambdas for code generation.
+							break;
+						case SyntheticMethodBinding.ArrayConstructor:
+							addSyntheticArrayConstructor(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.ArrayClone:
+							addSyntheticArrayClone(syntheticMethod);
+							break;
+						case SyntheticMethodBinding.FactoryMethod:
+							addSyntheticFactoryMethod(syntheticMethod);
+							break;	
+					}
 				}
+				emittedSyntheticsCount = currentSyntheticsCount;
 			}
 		}
 	}
 
+	public void addSyntheticArrayConstructor(SyntheticMethodBinding methodBinding) {
+		generateMethodInfoHeader(methodBinding);
+		int methodAttributeOffset = this.contentsOffset;
+		// this will add exception attribute, synthetic attribute, deprecated attribute,...
+		int attributeNumber = generateMethodInfoAttributes(methodBinding);
+		// Code attribute
+		int codeAttributeOffset = this.contentsOffset;
+		attributeNumber++; // add code attribute
+		generateCodeAttributeHeader();
+		this.codeStream.init(this);
+		this.codeStream.generateSyntheticBodyForArrayConstructor(methodBinding);
+		completeCodeAttributeForSyntheticMethod(
+			methodBinding,
+			codeAttributeOffset,
+			((SourceTypeBinding) methodBinding.declaringClass)
+				.scope
+				.referenceCompilationUnit()
+				.compilationResult
+				.getLineSeparatorPositions());
+		// update the number of attributes
+		this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8);
+		this.contents[methodAttributeOffset] = (byte) attributeNumber;
+	}
+	public void addSyntheticArrayClone(SyntheticMethodBinding methodBinding) {
+		generateMethodInfoHeader(methodBinding);
+		int methodAttributeOffset = this.contentsOffset;
+		// this will add exception attribute, synthetic attribute, deprecated attribute,...
+		int attributeNumber = generateMethodInfoAttributes(methodBinding);
+		// Code attribute
+		int codeAttributeOffset = this.contentsOffset;
+		attributeNumber++; // add code attribute
+		generateCodeAttributeHeader();
+		this.codeStream.init(this);
+		this.codeStream.generateSyntheticBodyForArrayClone(methodBinding);
+		completeCodeAttributeForSyntheticMethod(
+			methodBinding,
+			codeAttributeOffset,
+			((SourceTypeBinding) methodBinding.declaringClass)
+				.scope
+				.referenceCompilationUnit()
+				.compilationResult
+				.getLineSeparatorPositions());
+		// update the number of attributes
+		this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8);
+		this.contents[methodAttributeOffset] = (byte) attributeNumber;
+	}
+	public void addSyntheticFactoryMethod(SyntheticMethodBinding methodBinding) {
+		generateMethodInfoHeader(methodBinding);
+		int methodAttributeOffset = this.contentsOffset;
+		// this will add exception attribute, synthetic attribute, deprecated attribute,...
+		int attributeNumber = generateMethodInfoAttributes(methodBinding);
+		// Code attribute
+		int codeAttributeOffset = this.contentsOffset;
+		attributeNumber++; // add code attribute
+		generateCodeAttributeHeader();
+		this.codeStream.init(this);
+		this.codeStream.generateSyntheticBodyForFactoryMethod(methodBinding);
+		completeCodeAttributeForSyntheticMethod(
+			methodBinding,
+			codeAttributeOffset,
+			((SourceTypeBinding) methodBinding.declaringClass)
+				.scope
+				.referenceCompilationUnit()
+				.compilationResult
+				.getLineSeparatorPositions());
+		// update the number of attributes
+		this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8);
+		this.contents[methodAttributeOffset] = (byte) attributeNumber;
+	}
 	/**
 	 * INTERNAL USE-ONLY
 	 * Generate the bytes for a synthetic method that provides an access to a private constructor.
@@ -979,6 +1152,9 @@
 				.compilationResult
 				.getLineSeparatorPositions());
 		// update the number of attributes
+		if ((this.produceAttributes & ClassFileConstants.ATTR_METHOD_PARAMETERS) != 0) {
+			attributeNumber += generateMethodParameters(methodBinding);
+		}
 		this.contents[methodAttributeOffset++] = (byte) (attributeNumber >> 8);
 		this.contents[methodAttributeOffset] = (byte) attributeNumber;
 	}
@@ -1179,8 +1355,11 @@
 		// to get the right position, 6 for the max_stack etc...
 		int code_length = this.codeStream.position;
 		if (code_length > 65535) {
-			this.codeStream.methodDeclaration.scope.problemReporter().bytecodeExceeds64KLimit(
-				this.codeStream.methodDeclaration);
+			if (this.codeStream.methodDeclaration != null) {
+				this.codeStream.methodDeclaration.scope.problemReporter().bytecodeExceeds64KLimit(this.codeStream.methodDeclaration);
+			} else {
+				this.codeStream.lambdaExpression.scope.problemReporter().bytecodeExceeds64KLimit(this.codeStream.lambdaExpression);
+			}
 		}
 		if (localContentsOffset + 20 >= this.contents.length) {
 			resizeContents(20);
@@ -1216,9 +1395,15 @@
 			if (exceptionLabel != null) {
 				int iRange = 0, maxRange = exceptionLabel.getCount();
 				if ((maxRange & 1) != 0) {
-					this.codeStream.methodDeclaration.scope.problemReporter().abortDueToInternalError(
-							Messages.bind(Messages.abort_invalidExceptionAttribute, new String(this.codeStream.methodDeclaration.selector)),
-							this.codeStream.methodDeclaration);
+					if (this.codeStream.methodDeclaration != null) {
+						this.codeStream.methodDeclaration.scope.problemReporter().abortDueToInternalError(
+								Messages.bind(Messages.abort_invalidExceptionAttribute, new String(this.codeStream.methodDeclaration.selector)),
+								this.codeStream.methodDeclaration);
+					} else {
+						this.codeStream.lambdaExpression.scope.problemReporter().abortDueToInternalError(
+								Messages.bind(Messages.abort_invalidExceptionAttribute, new String(this.codeStream.lambdaExpression.binding.selector)),
+								this.codeStream.lambdaExpression);
+					}
 				}
 				while (iRange < maxRange) {
 					int start = exceptionLabel.ranges[iRange++]; // even ranges are start positions
@@ -1270,13 +1455,13 @@
 		}
 		// then we do the local variable attribute
 		if ((this.produceAttributes & ClassFileConstants.ATTR_VARS) != 0) {
-			final boolean methodDeclarationIsStatic = this.codeStream.methodDeclaration.isStatic();
+			final boolean methodDeclarationIsStatic = this.codeStream.methodDeclaration != null ? this.codeStream.methodDeclaration.isStatic() : this.codeStream.lambdaExpression.binding.isStatic();
 			attributesNumber += generateLocalVariableTableAttribute(code_length, methodDeclarationIsStatic, false);
 		}
 
 		if (addStackMaps) {
 			attributesNumber += generateStackMapTableAttribute(
-					this.codeStream.methodDeclaration.binding,
+					this.codeStream.methodDeclaration != null ? this.codeStream.methodDeclaration.binding : this.codeStream.lambdaExpression.binding,
 					code_length,
 					codeAttributeOffset,
 					max_locals,
@@ -1285,12 +1470,16 @@
 
 		if ((this.produceAttributes & ClassFileConstants.ATTR_STACK_MAP) != 0) {
 			attributesNumber += generateStackMapAttribute(
-					this.codeStream.methodDeclaration.binding,
+					this.codeStream.methodDeclaration != null ? this.codeStream.methodDeclaration.binding : this.codeStream.lambdaExpression.binding,
 					code_length,
 					codeAttributeOffset,
 					max_locals,
 					false);
 		}
+		
+		if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
+			attributesNumber += generateTypeAnnotationsOnCodeAttribute();
+		}
 
 		this.contents[codeAttributeAttributeOffset++] = (byte) (attributesNumber >> 8);
 		this.contents[codeAttributeAttributeOffset] = (byte) attributesNumber;
@@ -1302,6 +1491,55 @@
 		this.contents[codeAttributeOffset + 4] = (byte) (codeAttributeLength >> 8);
 		this.contents[codeAttributeOffset + 5] = (byte) codeAttributeLength;
 	}
+	
+	public int generateTypeAnnotationsOnCodeAttribute() {
+		int attributesNumber = 0;
+		
+		List allTypeAnnotationContexts = ((TypeAnnotationCodeStream) this.codeStream).allTypeAnnotationContexts;
+		int invisibleTypeAnnotationsCounter = 0;
+		int visibleTypeAnnotationsCounter = 0;
+
+		for (int i = 0, max = this.codeStream.allLocalsCounter; i < max; i++) {
+			LocalVariableBinding localVariable = this.codeStream.locals[i];
+			if (localVariable.isCatchParameter()) continue;
+			LocalDeclaration declaration = localVariable.declaration;
+			if (declaration == null
+					|| (declaration.isArgument() && ((declaration.bits & ASTNode.IsUnionType) == 0))
+					|| (localVariable.initializationCount == 0)
+					|| ((declaration.bits & ASTNode.HasTypeAnnotations) == 0)) {
+				continue;
+			}
+			int targetType = ((localVariable.tagBits & TagBits.IsResource) == 0) ? AnnotationTargetTypeConstants.LOCAL_VARIABLE : AnnotationTargetTypeConstants.RESOURCE_VARIABLE;
+			declaration.getAllAnnotationContexts(targetType, localVariable, allTypeAnnotationContexts);
+		}
+		
+		ExceptionLabel[] exceptionLabels = this.codeStream.exceptionLabels;
+		for (int i = 0, max = this.codeStream.exceptionLabelsCounter; i < max; i++) {
+			ExceptionLabel exceptionLabel = exceptionLabels[i];
+			if (exceptionLabel.exceptionTypeReference != null && (exceptionLabel.exceptionTypeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+				exceptionLabel.exceptionTypeReference.getAllAnnotationContexts(AnnotationTargetTypeConstants.EXCEPTION_PARAMETER, i, allTypeAnnotationContexts, exceptionLabel.se7Annotations);
+			}
+		}
+		
+		int size = allTypeAnnotationContexts.size();
+		if (size != 0) {
+			AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
+			allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
+			for (int j = 0, max2 = allTypeAnnotationContextsArray.length; j < max2; j++) {
+				AnnotationContext annotationContext = allTypeAnnotationContextsArray[j];
+				if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
+					invisibleTypeAnnotationsCounter++;
+				} else {
+					visibleTypeAnnotationsCounter++;
+				}
+			}
+			attributesNumber += generateRuntimeTypeAnnotations(
+					allTypeAnnotationContextsArray,
+					visibleTypeAnnotationsCounter,
+					invisibleTypeAnnotationsCounter);
+		}
+		return attributesNumber;
+	}
 
 	/**
 	 * INTERNAL USE-ONLY
@@ -1437,6 +1675,10 @@
 					true);
 		}
 
+		if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
+			attributesNumber += generateTypeAnnotationsOnCodeAttribute();
+		}
+
 		// update the number of attributes
 		// ensure first that there is enough space available inside the contents array
 		if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
@@ -1547,6 +1789,10 @@
 					true);
 		}
 
+		if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
+			attributesNumber += generateTypeAnnotationsOnCodeAttribute();
+		}
+		
 		// update the number of attributes
 		// ensure first that there is enough space available inside the contents array
 		if (codeAttributeAttributeOffset + 2 >= this.contents.length) {
@@ -1892,6 +2138,7 @@
 		}
 		this.contents[codeAttributeAttributeOffset++] = (byte) (attributesNumber >> 8);
 		this.contents[codeAttributeAttributeOffset] = (byte) attributesNumber;
+
 		// update the attribute length
 		int codeAttributeLength = this.contentsOffset - (codeAttributeOffset + 6);
 		this.contents[codeAttributeOffset + 2] = (byte) (codeAttributeLength >> 24);
@@ -1936,10 +2183,201 @@
 			MethodBinding binding,
 			int methodAttributeOffset,
 			int attributesNumber) {
+		
+		if ((this.produceAttributes & ClassFileConstants.ATTR_TYPE_ANNOTATION) != 0) {
+			List allTypeAnnotationContexts = new ArrayList();
+			int invisibleTypeAnnotationsCounter = 0;
+			int visibleTypeAnnotationsCounter = 0;
+			AbstractMethodDeclaration methodDeclaration = binding.sourceMethod();
+			if (methodDeclaration != null) {
+				if ((methodDeclaration.bits & ASTNode.HasTypeAnnotations) != 0) {
+					Argument[] arguments = methodDeclaration.arguments;
+					if (arguments != null) {
+						for (int i = 0, max = arguments.length; i < max; i++) {
+							Argument argument = arguments[i];
+							if ((argument.bits & ASTNode.HasTypeAnnotations) != 0) {
+								argument.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER, i, allTypeAnnotationContexts);
+							}
+						}
+					}
+					Receiver receiver = methodDeclaration.receiver;
+					if (receiver != null && (receiver.type.bits & ASTNode.HasTypeAnnotations) != 0) {
+						receiver.type.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_RECEIVER, allTypeAnnotationContexts);
+					}
+				}
+				Annotation[] annotations = methodDeclaration.annotations;
+				if (annotations != null && !methodDeclaration.isClinit() && (methodDeclaration.isConstructor() || binding.returnType.id != T_void)) {
+					methodDeclaration.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_RETURN, allTypeAnnotationContexts);
+				}
+				if (!methodDeclaration.isConstructor() && !methodDeclaration.isClinit() && binding.returnType.id != T_void) {
+					MethodDeclaration declaration = (MethodDeclaration) methodDeclaration;
+					TypeReference typeReference = declaration.returnType;
+					if ((typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+						typeReference.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_RETURN, allTypeAnnotationContexts);
+					}
+				}
+				TypeReference[] thrownExceptions = methodDeclaration.thrownExceptions;
+				if (thrownExceptions != null) {
+					for (int i = 0, max = thrownExceptions.length; i < max; i++) {
+						TypeReference thrownException = thrownExceptions[i];
+						thrownException.getAllAnnotationContexts(AnnotationTargetTypeConstants.THROWS, i, allTypeAnnotationContexts);
+					}
+				}
+				TypeParameter[] typeParameters = methodDeclaration.typeParameters();
+				if (typeParameters != null) {
+					for (int i = 0, max = typeParameters.length; i < max; i++) {
+						TypeParameter typeParameter = typeParameters[i];
+						if ((typeParameter.bits & ASTNode.HasTypeAnnotations) != 0) {
+							typeParameter.getAllAnnotationContexts(AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER, i, allTypeAnnotationContexts);
+						}
+					}
+				}
+			}
+			int size = allTypeAnnotationContexts.size();
+			if (size != 0) {
+				AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
+				allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
+				for (int j = 0, max2 = allTypeAnnotationContextsArray.length; j < max2; j++) {
+					AnnotationContext annotationContext = allTypeAnnotationContextsArray[j];
+					if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
+						invisibleTypeAnnotationsCounter++;
+					} else {
+						visibleTypeAnnotationsCounter++;
+					}
+				}
+				attributesNumber += generateRuntimeTypeAnnotations(
+						allTypeAnnotationContextsArray,
+						visibleTypeAnnotationsCounter,
+						invisibleTypeAnnotationsCounter);
+			}
+		}
+		if ((this.produceAttributes & ClassFileConstants.ATTR_METHOD_PARAMETERS) != 0) {
+			attributesNumber += generateMethodParameters(binding);
+		}
 		// update the number of attributes
 		this.contents[methodAttributeOffset++] = (byte) (attributesNumber >> 8);
 		this.contents[methodAttributeOffset] = (byte) attributesNumber;
 	}
+	
+	private void dumpLocations(int[] locations) {
+		if (locations == null) {
+			// no type path
+			if (this.contentsOffset + 1 >= this.contents.length) {
+				resizeContents(1);
+			}
+			this.contents[this.contentsOffset++] = (byte) 0;
+		} else {
+			int length = locations.length;
+			if (this.contentsOffset + length >= this.contents.length) {
+				resizeContents(length + 1);
+			}
+			this.contents[this.contentsOffset++] = (byte) (locations.length / 2);
+			for (int i = 0; i < length; i++) {
+				this.contents[this.contentsOffset++] = (byte) locations[i];
+			}
+		}
+	}
+	private void dumpTargetTypeContents(int targetType, AnnotationContext annotationContext) {
+		switch(targetType) {
+			case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER :
+			case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER :
+				// parameter index
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				break;
+
+			case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND :
+				// type_parameter_index
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				// bound_index
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info2;
+				break;				
+			case AnnotationTargetTypeConstants.FIELD :
+			case AnnotationTargetTypeConstants.METHOD_RECEIVER :
+			case AnnotationTargetTypeConstants.METHOD_RETURN :
+				 // target_info is empty_target
+				break;
+			case AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER :
+				// target_info is parameter index
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				break;
+				
+			case AnnotationTargetTypeConstants.INSTANCEOF :
+			case AnnotationTargetTypeConstants.NEW :
+			case AnnotationTargetTypeConstants.EXCEPTION_PARAMETER :
+			case AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE :
+			case AnnotationTargetTypeConstants.METHOD_REFERENCE :
+				// bytecode offset for new/instanceof/method_reference
+				// exception table entry index for exception_parameter
+				this.contents[this.contentsOffset++] = (byte) (annotationContext.info >> 8);
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				break;
+			case AnnotationTargetTypeConstants.CAST :
+				// bytecode offset
+				this.contents[this.contentsOffset++] = (byte) (annotationContext.info >> 8);
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info2;
+				break;
+				
+			case AnnotationTargetTypeConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT :
+			case AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT :
+			case AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT :
+			case AnnotationTargetTypeConstants.METHOD_REFERENCE_TYPE_ARGUMENT :
+				// bytecode offset
+				this.contents[this.contentsOffset++] = (byte) (annotationContext.info >> 8);
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				// type_argument_index 
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info2;
+				break;
+				
+			case AnnotationTargetTypeConstants.CLASS_EXTENDS :
+			case AnnotationTargetTypeConstants.THROWS :			
+				// For CLASS_EXTENDS - info is supertype index (-1 = superclass)
+				// For THROWS - info is exception table index
+				this.contents[this.contentsOffset++] = (byte) (annotationContext.info >> 8);
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				break;
+				
+			case AnnotationTargetTypeConstants.LOCAL_VARIABLE :
+			case AnnotationTargetTypeConstants.RESOURCE_VARIABLE :
+				int localVariableTableOffset = this.contentsOffset;
+				LocalVariableBinding localVariable = annotationContext.variableBinding;
+				int actualSize = 0;
+				int initializationCount = localVariable.initializationCount;
+				actualSize += 6 * initializationCount;
+				// reserve enough space
+				if (this.contentsOffset + actualSize >= this.contents.length) {
+					resizeContents(actualSize);
+				}
+				this.contentsOffset += 2;
+				int numberOfEntries = 0;
+				for (int j = 0; j < initializationCount; j++) {
+					int startPC = localVariable.initializationPCs[j << 1];
+					int endPC = localVariable.initializationPCs[(j << 1) + 1];
+					if (startPC != endPC) { // only entries for non zero length
+						// now we can safely add the local entry
+						numberOfEntries++;
+						this.contents[this.contentsOffset++] = (byte) (startPC >> 8);
+						this.contents[this.contentsOffset++] = (byte) startPC;
+						int length = endPC - startPC;
+						this.contents[this.contentsOffset++] = (byte) (length >> 8);
+						this.contents[this.contentsOffset++] = (byte) length;
+						int resolvedPosition = localVariable.resolvedPosition;
+						this.contents[this.contentsOffset++] = (byte) (resolvedPosition >> 8);
+						this.contents[this.contentsOffset++] = (byte) resolvedPosition;
+					}
+				}
+				this.contents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8);
+				this.contents[localVariableTableOffset] = (byte) numberOfEntries;
+				break;
+			case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND :
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info;
+				this.contents[this.contentsOffset++] = (byte) annotationContext.info2;
+				break;
+		}
+	}
+
+
+
 	/**
 	 * INTERNAL USE-ONLY
 	 * This methods returns a char[] representing the file name of the receiver
@@ -2502,6 +2940,73 @@
 		this.contentsOffset = localContentsOffset;
 		return 1;
 	}
+
+	private int generateBootstrapMethods(List functionalExpressionList) {
+		/* See JVM spec 4.7.21
+		   The BootstrapMethods attribute has the following format:
+		   BootstrapMethods_attribute {
+		      u2 attribute_name_index;
+		      u4 attribute_length;
+		      u2 num_bootstrap_methods;
+		      {   u2 bootstrap_method_ref;
+		          u2 num_bootstrap_arguments;
+		          u2 bootstrap_arguments[num_bootstrap_arguments];
+		      } bootstrap_methods[num_bootstrap_methods];
+		 }
+		*/
+		// Record inner classes for MethodHandles$Lookup
+		ReferenceBinding methodHandlesLookup = this.referenceBinding.scope.getJavaLangInvokeMethodHandlesLookup();
+		if (methodHandlesLookup == null) return 0; // skip bootstrap section, class path problem already reported, just avoid NPE.
+		recordInnerClasses(methodHandlesLookup); // Should be done, it's what javac does also
+		ReferenceBinding javaLangInvokeLambdaMetafactory = this.referenceBinding.scope.getJavaLangInvokeLambdaMetafactory(); 
+		int indexForMetaFactory = this.constantPool.literalIndexForMethodHandle(ClassFileConstants.MethodHandleRefKindInvokeStatic, javaLangInvokeLambdaMetafactory, 
+				ConstantPool.METAFACTORY, ConstantPool.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_METAFACTORY_SIGNATURE, false);
+
+		int numberOfBootstraps = functionalExpressionList.size();
+		int localContentsOffset = this.contentsOffset;
+		// Generate the boot strap attribute - since we are only making lambdas and
+		// functional expressions, we know the size ahead of time - this less general
+		// than the full invokedynamic scope, but fine for Java 8
+		int exSize = 10 * numberOfBootstraps + 8;
+		if (exSize + localContentsOffset >= this.contents.length) {
+			resizeContents(exSize);
+		}
+		this.contentsOffset += exSize;
+		
+		int attributeNameIndex =
+			this.constantPool.literalIndex(AttributeNamesConstants.BootstrapMethodsName);
+		this.contents[localContentsOffset++] = (byte) (attributeNameIndex >> 8);
+		this.contents[localContentsOffset++] = (byte) attributeNameIndex;
+		int value = (numberOfBootstraps * 10) + 2;
+		this.contents[localContentsOffset++] = (byte) (value >> 24);
+		this.contents[localContentsOffset++] = (byte) (value >> 16);
+		this.contents[localContentsOffset++] = (byte) (value >> 8);
+		this.contents[localContentsOffset++] = (byte) value;
+		this.contents[localContentsOffset++] = (byte) (numberOfBootstraps >> 8);
+		this.contents[localContentsOffset++] = (byte) numberOfBootstraps;
+		for (int i = 0; i < numberOfBootstraps; i++) {
+			FunctionalExpression functional = (FunctionalExpression) functionalExpressionList.get(i);
+			this.contents[localContentsOffset++] = (byte) (indexForMetaFactory >> 8);
+			this.contents[localContentsOffset++] = (byte) indexForMetaFactory;
+			
+			this.contents[localContentsOffset++] = 0;
+			this.contents[localContentsOffset++] = (byte) 3;
+			
+			int functionalDescriptorIndex = this.constantPool.literalIndexForMethodType(functional.descriptor.original().signature());
+			this.contents[localContentsOffset++] = (byte) (functionalDescriptorIndex >> 8);
+			this.contents[localContentsOffset++] = (byte) functionalDescriptorIndex;
+
+			int methodHandleIndex = this.constantPool.literalIndexForMethodHandle(functional.binding.original()); // Speak of " implementation" (erased) version here, adaptations described below.
+			this.contents[localContentsOffset++] = (byte) (methodHandleIndex >> 8);
+			this.contents[localContentsOffset++] = (byte) methodHandleIndex;
+
+			char [] instantiatedSignature = functional.descriptor.signature();
+			int methodTypeIndex = this.constantPool.literalIndexForMethodType(instantiatedSignature);
+			this.contents[localContentsOffset++] = (byte) (methodTypeIndex >> 8);
+			this.contents[localContentsOffset++] = (byte) methodTypeIndex;
+		}
+		return 1;
+	}
 	private int generateLineNumberAttribute() {
 		int localContentsOffset = this.contentsOffset;
 		int attributesNumber = 0;
@@ -2616,7 +3121,8 @@
 			nameIndex = this.constantPool.literalIndex(ConstantPool.This);
 			this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
 			this.contents[localContentsOffset++] = (byte) nameIndex;
-			declaringClassBinding = (SourceTypeBinding) this.codeStream.methodDeclaration.binding.declaringClass;
+			declaringClassBinding = (SourceTypeBinding) 
+					(this.codeStream.methodDeclaration != null ? this.codeStream.methodDeclaration.binding.declaringClass : this.codeStream.lambdaExpression.binding.declaringClass);
 			descriptorIndex =
 				this.constantPool.literalIndex(
 					declaringClassBinding.signature());
@@ -2808,7 +3314,7 @@
 			if (methodDeclaration != null) {
 				Annotation[] annotations = methodDeclaration.annotations;
 				if (annotations != null) {
-					attributesNumber += generateRuntimeAnnotations(annotations);
+					attributesNumber += generateRuntimeAnnotations(annotations, methodBinding.isConstructor() ? TagBits.AnnotationForConstructor : TagBits.AnnotationForMethod);
 				}
 				if ((methodBinding.tagBits & TagBits.HasParameterAnnotations) != 0) {
 					Argument[] arguments = methodDeclaration.arguments;
@@ -2816,6 +3322,24 @@
 						attributesNumber += generateRuntimeAnnotationsForParameters(arguments);
 					}
 				}
+			} else {
+				LambdaExpression lambda = methodBinding.sourceLambda();
+				if (lambda != null) {
+					if ((methodBinding.tagBits & TagBits.HasParameterAnnotations) != 0) {
+						Argument[] arguments = lambda.arguments;
+						if (arguments != null) {
+							int parameterCount = methodBinding.parameters.length;
+							int argumentCount = arguments.length;
+							if (parameterCount > argumentCount) { // synthetics prefixed 
+								int redShift = parameterCount - argumentCount;
+								System.arraycopy(arguments, 0, arguments = new Argument[parameterCount], redShift, argumentCount);
+								for (int i = 0; i < redShift; i++)
+									arguments[i] = new Argument(CharOperation.NO_CHAR, 0, null, 0);
+							}
+							attributesNumber += generateRuntimeAnnotationsForParameters(arguments);
+						}
+					}	
+				}
 			}
 		}
 		if ((methodBinding.tagBits & TagBits.HasMissingType) != 0) {
@@ -3000,19 +3524,22 @@
 
 	/**
 	 * @param annotations
+	 * @param targetMask allowed targets
 	 * @return the number of attributes created while dumping the annotations in the .class file
 	 */
-	private int generateRuntimeAnnotations(final Annotation[] annotations) {
+	private int generateRuntimeAnnotations(final Annotation[] annotations, final long targetMask) {
 		int attributesNumber = 0;
 		final int length = annotations.length;
 		int visibleAnnotationsCounter = 0;
 		int invisibleAnnotationsCounter = 0;
-
 		for (int i = 0; i < length; i++) {
-			Annotation annotation = annotations[i];
-			if (annotation.isRuntimeInvisible()) {
+			Annotation annotation;
+			if ((annotation = annotations[i].getPersistibleAnnotation()) == null) continue; // already packaged into container.
+			long annotationMask = annotation.resolvedType != null ? annotation.resolvedType.getAnnotationTagBits() & TagBits.AnnotationTargetMASK : 0;
+			if (annotationMask != 0 && (annotationMask & targetMask) == 0) continue;
+			if (annotation.isRuntimeInvisible() || annotation.isRuntimeTypeInvisible()) {
 				invisibleAnnotationsCounter++;
-			} else if (annotation.isRuntimeVisible()) {
+			} else if (annotation.isRuntimeVisible() || annotation.isRuntimeTypeVisible()) {
 				visibleAnnotationsCounter++;
 			}
 		}
@@ -3037,8 +3564,11 @@
 			int counter = 0;
 			loop: for (int i = 0; i < length; i++) {
 				if (invisibleAnnotationsCounter == 0) break loop;
-				Annotation annotation = annotations[i];
-				if (annotation.isRuntimeInvisible()) {
+				Annotation annotation;
+				if ((annotation = annotations[i].getPersistibleAnnotation()) == null) continue; // already packaged into container.
+				long annotationMask = annotation.resolvedType != null ? annotation.resolvedType.getAnnotationTagBits() & TagBits.AnnotationTargetMASK : 0;
+				if (annotationMask != 0 && (annotationMask & targetMask) == 0) continue;
+				if (annotation.isRuntimeInvisible() || annotation.isRuntimeTypeInvisible()) {
 					int currentAnnotationOffset = this.contentsOffset;
 					generateAnnotation(annotation, currentAnnotationOffset);
 					invisibleAnnotationsCounter--;
@@ -3084,8 +3614,11 @@
 			int counter = 0;
 			loop: for (int i = 0; i < length; i++) {
 				if (visibleAnnotationsCounter == 0) break loop;
-				Annotation annotation = annotations[i];
-				if (annotation.isRuntimeVisible()) {
+				Annotation annotation;
+				if ((annotation = annotations[i].getPersistibleAnnotation()) == null) continue; // already packaged into container.
+				long annotationMask = annotation.resolvedType != null ? annotation.resolvedType.getAnnotationTagBits() & TagBits.AnnotationTargetMASK : 0;
+				if (annotationMask != 0 && (annotationMask & targetMask) == 0) continue;
+				if (annotation.isRuntimeVisible() || annotation.isRuntimeTypeVisible()) {
 					visibleAnnotationsCounter--;
 					int currentAnnotationOffset = this.contentsOffset;
 					generateAnnotation(annotation, currentAnnotationOffset);
@@ -3111,6 +3644,7 @@
 		}
 		return attributesNumber;
 	}
+	
 	private int generateRuntimeAnnotationsForParameters(Argument[] arguments) {
 		final int argumentsLength = arguments.length;
 		final int VISIBLE_INDEX = 0;
@@ -3123,7 +3657,10 @@
 			Annotation[] annotations = argument.annotations;
 			if (annotations != null) {
 				for (int j = 0, max2 = annotations.length; j < max2; j++) {
-					Annotation annotation = annotations[j];
+					Annotation annotation;
+					if ((annotation = annotations[j].getPersistibleAnnotation()) == null) continue; // already packaged into container.
+					long annotationMask = annotation.resolvedType != null ? annotation.resolvedType.getAnnotationTagBits() & TagBits.AnnotationTargetMASK : 0;
+					if (annotationMask != 0 && (annotationMask & TagBits.AnnotationForParameter) == 0) continue;
 					if (annotation.isRuntimeInvisible()) {
 						annotationsCounters[i][INVISIBLE_INDEX]++;
 						invisibleParametersAnnotationsCounter++;
@@ -3166,7 +3703,10 @@
 						Argument argument = arguments[i];
 						Annotation[] annotations = argument.annotations;
 						for (int j = 0, max = annotations.length; j < max; j++) {
-							Annotation annotation = annotations[j];
+							Annotation annotation;
+							if ((annotation = annotations[j].getPersistibleAnnotation()) == null) continue; // already packaged into container.
+							long annotationMask = annotation.resolvedType != null ? annotation.resolvedType.getAnnotationTagBits() & TagBits.AnnotationTargetMASK : 0;
+							if (annotationMask != 0 && (annotationMask & TagBits.AnnotationForParameter) == 0) continue;
 							if (annotation.isRuntimeInvisible()) {
 								int currentAnnotationOffset = this.contentsOffset;
 								generateAnnotation(annotation, currentAnnotationOffset);
@@ -3224,7 +3764,10 @@
 						Argument argument = arguments[i];
 						Annotation[] annotations = argument.annotations;
 						for (int j = 0, max = annotations.length; j < max; j++) {
-							Annotation annotation = annotations[j];
+							Annotation annotation;
+							if ((annotation = annotations[j].getPersistibleAnnotation()) == null) continue; // already packaged into container.
+							long annotationMask = annotation.resolvedType != null ? annotation.resolvedType.getAnnotationTagBits() & TagBits.AnnotationTargetMASK : 0;
+							if (annotationMask != 0 && (annotationMask & TagBits.AnnotationForParameter) == 0) continue;
 							if (annotation.isRuntimeVisible()) {
 								int currentAnnotationOffset = this.contentsOffset;
 								generateAnnotation(annotation, currentAnnotationOffset);
@@ -3254,6 +3797,230 @@
 		}
 		return attributesNumber;
 	}
+	
+	/**
+	 * @param annotationContexts the given annotation contexts
+	 * @param visibleTypeAnnotationsNumber the given number of visible type annotations
+	 * @param invisibleTypeAnnotationsNumber the given number of invisible type annotations
+	 * @return the number of attributes created while dumping the annotations in the .class file
+	 */
+	private int generateRuntimeTypeAnnotations(
+			final AnnotationContext[] annotationContexts, 
+			int visibleTypeAnnotationsNumber, 
+			int invisibleTypeAnnotationsNumber) {
+		int attributesNumber = 0;
+		final int length = annotationContexts.length;
+
+		int visibleTypeAnnotationsCounter = visibleTypeAnnotationsNumber;
+		int invisibleTypeAnnotationsCounter = invisibleTypeAnnotationsNumber;
+		int annotationAttributeOffset = this.contentsOffset;
+		int constantPOffset = this.constantPool.currentOffset;
+		int constantPoolIndex = this.constantPool.currentIndex;
+		if (invisibleTypeAnnotationsCounter != 0) {
+			if (this.contentsOffset + 10 >= this.contents.length) {
+				resizeContents(10);
+			}
+			int runtimeInvisibleAnnotationsAttributeNameIndex =
+				this.constantPool.literalIndex(AttributeNamesConstants.RuntimeInvisibleTypeAnnotationsName);
+			this.contents[this.contentsOffset++] = (byte) (runtimeInvisibleAnnotationsAttributeNameIndex >> 8);
+			this.contents[this.contentsOffset++] = (byte) runtimeInvisibleAnnotationsAttributeNameIndex;
+			int attributeLengthOffset = this.contentsOffset;
+			this.contentsOffset += 4; // leave space for the attribute length
+
+			int annotationsLengthOffset = this.contentsOffset;
+			this.contentsOffset += 2; // leave space for the annotations length
+
+			int counter = 0;
+			loop: for (int i = 0; i < length; i++) {
+				if (invisibleTypeAnnotationsCounter == 0) break loop;
+				AnnotationContext annotationContext = annotationContexts[i];
+				if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
+					int currentAnnotationOffset = this.contentsOffset;
+					generateTypeAnnotation(annotationContext, currentAnnotationOffset);
+					invisibleTypeAnnotationsCounter--;
+					if (this.contentsOffset != currentAnnotationOffset) {
+						counter++;
+					}
+				}
+			}
+			if (counter != 0) {
+				this.contents[annotationsLengthOffset++] = (byte) (counter >> 8);
+				this.contents[annotationsLengthOffset++] = (byte) counter;
+
+				int attributeLength = this.contentsOffset - attributeLengthOffset - 4;
+				this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 24);
+				this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 16);
+				this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 8);
+				this.contents[attributeLengthOffset++] = (byte) attributeLength;
+				attributesNumber++;
+			} else {
+				this.contentsOffset = annotationAttributeOffset;
+				// reset the constant pool to its state before the clinit
+				this.constantPool.resetForAttributeName(AttributeNamesConstants.RuntimeInvisibleTypeAnnotationsName, constantPoolIndex, constantPOffset);
+			}
+		}
+
+		annotationAttributeOffset = this.contentsOffset;
+		constantPOffset = this.constantPool.currentOffset;
+		constantPoolIndex = this.constantPool.currentIndex;
+		if (visibleTypeAnnotationsCounter != 0) {
+			if (this.contentsOffset + 10 >= this.contents.length) {
+				resizeContents(10);
+			}
+			int runtimeVisibleAnnotationsAttributeNameIndex =
+				this.constantPool.literalIndex(AttributeNamesConstants.RuntimeVisibleTypeAnnotationsName);
+			this.contents[this.contentsOffset++] = (byte) (runtimeVisibleAnnotationsAttributeNameIndex >> 8);
+			this.contents[this.contentsOffset++] = (byte) runtimeVisibleAnnotationsAttributeNameIndex;
+			int attributeLengthOffset = this.contentsOffset;
+			this.contentsOffset += 4; // leave space for the attribute length
+
+			int annotationsLengthOffset = this.contentsOffset;
+			this.contentsOffset += 2; // leave space for the annotations length
+
+			int counter = 0;
+			loop: for (int i = 0; i < length; i++) {
+				if (visibleTypeAnnotationsCounter == 0) break loop;
+				AnnotationContext annotationContext = annotationContexts[i];
+				if ((annotationContext.visibility & AnnotationContext.VISIBLE) != 0) {
+					visibleTypeAnnotationsCounter--;
+					int currentAnnotationOffset = this.contentsOffset;
+					generateTypeAnnotation(annotationContext, currentAnnotationOffset);
+					if (this.contentsOffset != currentAnnotationOffset) {
+						counter++;
+					}
+				}
+			}
+			if (counter != 0) {
+				this.contents[annotationsLengthOffset++] = (byte) (counter >> 8);
+				this.contents[annotationsLengthOffset++] = (byte) counter;
+
+				int attributeLength = this.contentsOffset - attributeLengthOffset - 4;
+				this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 24);
+				this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 16);
+				this.contents[attributeLengthOffset++] = (byte) (attributeLength >> 8);
+				this.contents[attributeLengthOffset++] = (byte) attributeLength;
+				attributesNumber++;
+			} else {
+				this.contentsOffset = annotationAttributeOffset;
+				this.constantPool.resetForAttributeName(AttributeNamesConstants.RuntimeVisibleTypeAnnotationsName, constantPoolIndex, constantPOffset);
+			}
+		}
+		return attributesNumber;
+	}
+
+	/**
+	 * @param binding the given method binding
+	 * @return the number of attributes created while dumping he method's parameters in the .class file (0 or 1)
+	 */
+	private int generateMethodParameters(final MethodBinding binding) {
+		
+		int initialContentsOffset = this.contentsOffset;
+		int length = 0; // count of actual parameters
+		
+		AbstractMethodDeclaration methodDeclaration = binding.sourceMethod();
+		
+		boolean isConstructor = binding.isConstructor();
+		TypeBinding[] targetParameters = binding.parameters;
+		ReferenceBinding declaringClass = binding.declaringClass;
+
+		if (declaringClass.isEnum()) {
+			if (isConstructor) { // insert String name,int ordinal
+				length = writeArgumentName(ConstantPool.EnumName, ClassFileConstants.AccSynthetic, length);
+				length = writeArgumentName(ConstantPool.EnumOrdinal, ClassFileConstants.AccSynthetic, length);
+			} else if (CharOperation.equals(ConstantPool.ValueOf, binding.selector)) { // insert String name
+				length = writeArgumentName(ConstantPool.Name, ClassFileConstants.AccMandated, length);
+				targetParameters =  Binding.NO_PARAMETERS; // Override "unknown" synthetics below
+			}
+		}
+
+		boolean needSynthetics = isConstructor && declaringClass.isNestedType();
+		if (needSynthetics) {
+			// Take into account the synthetic argument names
+			// This tracks JLS8, paragraph 8.8.9
+			boolean anonymousWithLocalSuper = declaringClass.isAnonymousType() && declaringClass.superclass().isLocalType();
+			boolean anonymousWithNestedSuper = declaringClass.isAnonymousType() && declaringClass.superclass().isNestedType();
+			boolean isImplicitlyDeclared = ((! declaringClass.isPrivate()) || declaringClass.isAnonymousType()) && !anonymousWithLocalSuper;
+			ReferenceBinding[] syntheticArgumentTypes = declaringClass.syntheticEnclosingInstanceTypes();
+			if (syntheticArgumentTypes != null) {
+				for (int i = 0, count = syntheticArgumentTypes.length; i < count; i++) {
+					// This behaviour tracks JLS 15.9.5.1
+					// This covers that the parameter ending up in a nested class must be mandated "on the way in", even if it
+					// isn't the first. The practical relevance of this is questionable, since the constructor call will be
+					// generated by the same constructor.
+					boolean couldForwardToMandated = anonymousWithNestedSuper ? declaringClass.superclass().enclosingType().equals(syntheticArgumentTypes[i]) : true;
+					int modifier = couldForwardToMandated && isImplicitlyDeclared ? ClassFileConstants.AccMandated : ClassFileConstants.AccSynthetic;
+					char[] name = CharOperation.concat(
+							TypeConstants.SYNTHETIC_ENCLOSING_INSTANCE_PREFIX,
+							String.valueOf(i).toCharArray()); // cannot use depth, can be identical
+					length = writeArgumentName(name, modifier | ClassFileConstants.AccFinal, length);
+				}
+			}
+			if (binding instanceof SyntheticMethodBinding) {
+				targetParameters = ((SyntheticMethodBinding)binding).targetMethod.parameters;
+				methodDeclaration = ((SyntheticMethodBinding)binding).targetMethod.sourceMethod();
+			}
+		}
+		if (targetParameters != Binding.NO_PARAMETERS) {
+			for (int i = 0, max = targetParameters.length; i < max; i++) {
+				if (methodDeclaration != null && methodDeclaration.arguments != null && methodDeclaration.arguments.length > i && methodDeclaration.arguments[i] != null) {
+					Argument argument = methodDeclaration.arguments[i];
+					length = writeArgumentName(argument.name, argument.binding.modifiers, length);
+				} else {
+					length = writeArgumentName(null, ClassFileConstants.AccSynthetic, length);
+				}
+			}
+		}
+		if (needSynthetics) {
+			SyntheticArgumentBinding[] syntheticOuterArguments = declaringClass.syntheticOuterLocalVariables();
+			int count = syntheticOuterArguments == null ? 0 : syntheticOuterArguments.length;
+			for (int i = 0; i < count; i++) {
+				length = writeArgumentName(syntheticOuterArguments[i].name, syntheticOuterArguments[i].modifiers  | ClassFileConstants.AccSynthetic, length);
+			}
+			// move the extra padding arguments of the synthetic constructor invocation to the end
+			for (int i = targetParameters.length, extraLength = binding.parameters.length; i < extraLength; i++) {
+				TypeBinding parameter = binding.parameters[i];
+				length = writeArgumentName(parameter.constantPoolName(), ClassFileConstants.AccSynthetic, length);
+			}
+		}
+
+		if (length > 0) {
+			// so we actually output the parameter
+	 		int attributeLength = 1 + 4 * length; // u1 for count, u2+u2 per parameter
+			if (this.contentsOffset + 6 + attributeLength >= this.contents.length) {
+				resizeContents(6 + attributeLength);
+			}
+			int methodParametersNameIndex = this.constantPool.literalIndex(AttributeNamesConstants.MethodParametersName);
+			this.contents[initialContentsOffset++] = (byte) (methodParametersNameIndex >> 8);
+			this.contents[initialContentsOffset++] = (byte) methodParametersNameIndex;
+			this.contents[initialContentsOffset++] = (byte) (attributeLength >> 24);
+			this.contents[initialContentsOffset++] = (byte) (attributeLength >> 16);
+			this.contents[initialContentsOffset++] = (byte) (attributeLength >> 8);
+			this.contents[initialContentsOffset++] = (byte) attributeLength;
+			this.contents[initialContentsOffset++] = (byte) length;
+			return 1;
+		}
+		else {
+			return 0;
+		}
+	}
+	private int writeArgumentName(char[] name, int modifiers, int oldLength) {
+		int ensureRoomForBytes = 4;
+		if (oldLength == 0) {
+			// Make room for 
+			ensureRoomForBytes += 7;
+			this.contentsOffset += 7; // Make room for attribute header + count byte
+		}
+		if (this.contentsOffset + ensureRoomForBytes > this.contents.length) {
+				resizeContents(ensureRoomForBytes);
+		}
+		int parameterNameIndex = name == null ? 0 : this.constantPool.literalIndex(name);
+		this.contents[this.contentsOffset++] = (byte) (parameterNameIndex >> 8);
+		this.contents[this.contentsOffset++] = (byte) parameterNameIndex;
+		int flags = modifiers & (ClassFileConstants.AccFinal | ClassFileConstants.AccSynthetic | ClassFileConstants.AccMandated);
+		this.contents[this.contentsOffset++] = (byte) (flags >> 8);
+		this.contents[this.contentsOffset++] = (byte) flags;
+		return oldLength + 1;
+	}
 
 	private int generateSignatureAttribute(char[] genericSignature) {
 		int localContentsOffset = this.contentsOffset;
@@ -3853,6 +4620,83 @@
 		this.contentsOffset = localContentsOffset;
 		return 1;
 	}
+	
+	private void generateTypeAnnotation(AnnotationContext annotationContext, int currentOffset) {
+		Annotation annotation = annotationContext.annotation.getPersistibleAnnotation();
+		if (annotation == null || annotation.resolvedType == null)
+			return;
+		
+		int targetType = annotationContext.targetType;
+
+		int[] locations = Annotation.getLocations(
+			annotationContext.typeReference,
+			annotationContext.annotation);
+
+		if (this.contentsOffset + 5 >= this.contents.length) {
+			resizeContents(5);
+		}
+		this.contents[this.contentsOffset++] = (byte) targetType;
+		dumpTargetTypeContents(targetType, annotationContext);
+		dumpLocations(locations);
+		generateAnnotation(annotation, currentOffset);
+	}
+
+	private int generateTypeAnnotationAttributeForTypeDeclaration() {
+		TypeDeclaration typeDeclaration = this.referenceBinding.scope.referenceContext;
+		if ((typeDeclaration.bits & ASTNode.HasTypeAnnotations) == 0) {
+			return 0;
+		}
+		int attributesNumber = 0;
+		int visibleTypeAnnotationsCounter = 0;
+		int invisibleTypeAnnotationsCounter = 0;
+		TypeReference superclass = typeDeclaration.superclass;
+		List allTypeAnnotationContexts = new ArrayList();
+		if (superclass != null && (superclass.bits & ASTNode.HasTypeAnnotations) != 0) {
+			superclass.getAllAnnotationContexts(AnnotationTargetTypeConstants.CLASS_EXTENDS, -1, allTypeAnnotationContexts);
+		}
+		TypeReference[] superInterfaces = typeDeclaration.superInterfaces;
+		if (superInterfaces != null) {
+			for (int i = 0; i < superInterfaces.length; i++) {
+				TypeReference superInterface = superInterfaces[i];
+				if ((superInterface.bits & ASTNode.HasTypeAnnotations) == 0) {
+					continue;
+				}
+				superInterface.getAllAnnotationContexts(AnnotationTargetTypeConstants.CLASS_EXTENDS, i, allTypeAnnotationContexts);
+			}
+		}
+		TypeParameter[] typeParameters = typeDeclaration.typeParameters;
+		if (typeParameters != null) {
+			for (int i = 0, max = typeParameters.length; i < max; i++) {
+				TypeParameter typeParameter = typeParameters[i];
+				if ((typeParameter.bits & ASTNode.HasTypeAnnotations) != 0) {
+					typeParameter.getAllAnnotationContexts(AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER, i, allTypeAnnotationContexts);
+				}
+			}
+		}
+		int size = allTypeAnnotationContexts.size();
+		if (size != 0) {
+			AnnotationContext[] allTypeAnnotationContextsArray = new AnnotationContext[size];
+			allTypeAnnotationContexts.toArray(allTypeAnnotationContextsArray);
+			for (int j = 0, max = allTypeAnnotationContextsArray.length; j < max; j++) {
+				AnnotationContext annotationContext = allTypeAnnotationContextsArray[j];
+				if ((annotationContext.visibility & AnnotationContext.INVISIBLE) != 0) {
+					invisibleTypeAnnotationsCounter++;
+					allTypeAnnotationContexts.add(annotationContext);
+				} else {
+					visibleTypeAnnotationsCounter++;
+					allTypeAnnotationContexts.add(annotationContext);
+				}
+			}
+			attributesNumber += generateRuntimeTypeAnnotations(
+					allTypeAnnotationContextsArray,
+					visibleTypeAnnotationsCounter,
+					invisibleTypeAnnotationsCounter);
+		}
+		return attributesNumber;
+	}
+	
+	
+	
 
 	private int generateVarargsAttribute() {
 		int localContentsOffset = this.contentsOffset;
@@ -4279,11 +5123,11 @@
 			this.innerClassesBindings = new HashSet(INNER_CLASSES_SIZE);
 		}
 		ReferenceBinding innerClass = (ReferenceBinding) binding;
-		this.innerClassesBindings.add(innerClass.erasure());
+		this.innerClassesBindings.add(innerClass.erasure().unannotated());  // should not emit yet another inner class for Outer.@Inner Inner.
 		ReferenceBinding enclosingType = innerClass.enclosingType();
 		while (enclosingType != null
 				&& enclosingType.isNestedType()) {
-			this.innerClassesBindings.add(enclosingType.erasure());
+			this.innerClassesBindings.add(enclosingType.erasure().unannotated());
 			enclosingType = enclosingType.enclosingType();
 		}
 	}
@@ -4295,6 +5139,14 @@
 	}
 //MW}
 
+	public int recordBootstrapMethod(FunctionalExpression expression) {
+		if (this.bootstrapMethods == null) {
+			this.bootstrapMethods = new ArrayList();
+		}
+		this.bootstrapMethods.add(expression);
+		return this.bootstrapMethods.size() - 1;
+	}
+
 	public void reset(SourceTypeBinding typeBinding) {
 		// the code stream is reinitialized for each method
 		final CompilerOptions options = typeBinding.scope.compilerOptions();
@@ -4304,6 +5156,9 @@
 		this.produceAttributes = options.produceDebugAttributes;
 		if (this.targetJDK >= ClassFileConstants.JDK1_6) {
 			this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE;
+			if (this.targetJDK >= ClassFileConstants.JDK1_8) {
+				this.produceAttributes |= ClassFileConstants.ATTR_TYPE_ANNOTATION;
+			}
 		} else if (this.targetJDK == ClassFileConstants.CLDC_1_1) {
 			this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3
 			this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
@@ -4321,6 +5176,9 @@
 		if (this.innerClassesBindings != null) {
 			this.innerClassesBindings.clear();
 		}
+		if (this.bootstrapMethods != null) {
+			this.bootstrapMethods.clear();
+		}
 		this.missingTypes = null;
 		this.visitedTypes = null;
 	}
@@ -5305,6 +6163,55 @@
 					}
 					pc += 3;
 					break;
+				case Opcodes.OPC_invokedynamic:
+					index = u2At(bytecodes, 1, pc);
+					nameAndTypeIndex = u2At(poolContents, 3,
+							constantPoolOffsets[index]);
+					utf8index = u2At(poolContents, 3,
+							constantPoolOffsets[nameAndTypeIndex]);
+					descriptor = utf8At(poolContents,
+							constantPoolOffsets[utf8index] + 3, u2At(
+									poolContents, 1,
+									constantPoolOffsets[utf8index]));
+					frame.numberOfStackItems -= getParametersCount(descriptor);
+					returnType = getReturnType(descriptor);
+					if (returnType.length == 1) {
+						// base type
+						switch(returnType[0]) {
+							case 'Z':
+								frame.addStackItem(TypeBinding.BOOLEAN);
+								break;
+							case 'B':
+								frame.addStackItem(TypeBinding.BYTE);
+								break;
+							case 'C':
+								frame.addStackItem(TypeBinding.CHAR);
+								break;
+							case 'D':
+								frame.addStackItem(TypeBinding.DOUBLE);
+								break;
+							case 'F':
+								frame.addStackItem(TypeBinding.FLOAT);
+								break;
+							case 'I':
+								frame.addStackItem(TypeBinding.INT);
+								break;
+							case 'J':
+								frame.addStackItem(TypeBinding.LONG);
+								break;
+							case 'S':
+								frame.addStackItem(TypeBinding.SHORT);
+								break;
+						}
+					} else {
+						if (returnType[0] == '[') {
+							frame.addStackItem(new VerificationTypeInfo(0, returnType));
+						} else {
+							frame.addStackItem(new VerificationTypeInfo(0, CharOperation.subarray(returnType, 1, returnType.length - 1)));
+						}
+					}
+					pc += 5;
+					break;
 				case Opcodes.OPC_invokespecial:
 					index = u2At(bytecodes, 1, pc);
 					nameAndTypeIndex = u2At(poolContents, 3,
@@ -5656,15 +6563,27 @@
 					addRealJumpTarget(realJumpTarget, pc - codeOffset); // handle infinite loop
 					break;
 				default: // should not occur
-					this.codeStream.methodDeclaration.scope.problemReporter().abortDueToInternalError(
-							Messages.bind(
-									Messages.abort_invalidOpcode,
-									new Object[] {
-										new Byte(opcode),
-										new Integer(pc),
-										new String(methodBinding.shortReadableName()),
-									}),
-							this.codeStream.methodDeclaration);
+					if (this.codeStream.methodDeclaration != null) {
+						this.codeStream.methodDeclaration.scope.problemReporter().abortDueToInternalError(
+								Messages.bind(
+										Messages.abort_invalidOpcode,
+										new Object[] {
+												new Byte(opcode),
+												new Integer(pc),
+												new String(methodBinding.shortReadableName()),
+										}),
+										this.codeStream.methodDeclaration);
+					} else {
+						this.codeStream.lambdaExpression.scope.problemReporter().abortDueToInternalError(
+								Messages.bind(
+										Messages.abort_invalidOpcode,
+										new Object[] {
+												new Byte(opcode),
+												new Integer(pc),
+												new String(methodBinding.shortReadableName()),
+										}),
+										this.codeStream.lambdaExpression);
+					}
 				break;
 			}
 			if (pc >= (codeLength + codeOffset)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java
index f374c4c..f5acdae 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -27,6 +31,9 @@
 		public boolean proceedOnErrors(){
 			return false;
 		}
+		public boolean ignoreAllErrors() {
+			return false;
+		}
 	};
 }
 /*
@@ -42,6 +49,9 @@
 		public boolean proceedOnErrors(){
 			return false;
 		}
+		public boolean ignoreAllErrors() {
+			return false;
+		}
 	};
 }
 /*
@@ -56,6 +66,9 @@
 		public boolean proceedOnErrors(){
 			return true;
 		}
+		public boolean ignoreAllErrors() {
+			return false;
+		}
 	};
 }
 /*
@@ -70,6 +83,26 @@
 		public boolean proceedOnErrors(){
 			return true;
 		}
+		public boolean ignoreAllErrors() {
+			return false;
+		}
+	};
+}
+/*
+ * Accumulate all problems, then proceed with them, but never report them.
+ *
+ */
+public static IErrorHandlingPolicy ignoreAllProblems() {
+	return new IErrorHandlingPolicy() {
+		public boolean stopOnFirstError() {
+			return false;
+		}
+		public boolean proceedOnErrors(){
+			return true;
+		}
+		public boolean ignoreAllErrors() {
+			return true;
+		}
 	};
 }
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/IErrorHandlingPolicy.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/IErrorHandlingPolicy.java
index f8afdf2..de68aba 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/IErrorHandlingPolicy.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/IErrorHandlingPolicy.java
@@ -1,21 +1,26 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler;
 
 /*
- * Handler policy is responsible to answer the 2 following
+ * Handler policy is responsible to answer the 3 following
  * questions:
  * 1. should the handler stop on first problem which appears
  *	to be a real error (that is, not a warning),
  * 2. should it proceed once it has gathered all problems
+ * 3. Should problems be reported at all ?
  *
  * The intent is that one can supply its own policy to implement
  * some interactive error handling strategy where some UI would
@@ -25,4 +30,5 @@
 public interface IErrorHandlingPolicy {
 	boolean proceedOnErrors();
 	boolean stopOnFirstError();
+	boolean ignoreAllErrors();
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
index 16a0aa5..803b328 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Matt McCutchen - partial fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=122995
@@ -18,14 +22,25 @@
  *								bug 374605 - Unreasonable warning for enum-based switch statements
  *								bug 384870 - [compiler] @Deprecated annotation not detected if preceded by other annotation
  *								bug 393719 - [compiler] inconsistent warnings on iteration variables
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *     Jesper S Moller - Contributions for
+ *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
+ *								bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
+ *								bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
+ *								bug 412149 - [1.8][compiler] Emit repeated annotations into the designated container
+ *								bug 419209 - [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.env.AccessRestriction;
 import org.eclipse.jdt.internal.compiler.lookup.*;
-import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.CallinCalloutBinding;
 
 /**
@@ -43,8 +58,8 @@
 
 	// storage for internal flags (32 bits)				BIT USAGE
 	public final static int Bit1 = 0x1;					// return type (operator) | name reference kind (name ref) | add assertion (type decl) | useful empty statement (empty statement)
-	public final static int Bit2 = 0x2;					// return type (operator) | name reference kind (name ref) | has local type (type, method, field decl)
-	public final static int Bit3 = 0x4;					// return type (operator) | name reference kind (name ref) | implicit this (this ref)
+	public final static int Bit2 = 0x2;					// return type (operator) | name reference kind (name ref) | has local type (type, method, field decl) | if type elided (local)
+	public final static int Bit3 = 0x4;					// return type (operator) | name reference kind (name ref) | implicit this (this ref) | is argument(local)
 	public final static int Bit4 = 0x8;					// return type (operator) | first assignment to local (name ref,local decl) | undocumented empty block (block, type and method decl)
 	public final static int Bit5 = 0x10;					// value for return (expression) | has all method bodies (unit) | supertype ref (type ref) | resolved (field decl)
 	public final static int Bit6 = 0x20;					// depth (name ref, msg) | ignore need cast check (cast expression) | error in signature (method declaration/ initializer) | is recovered (annotation reference)
@@ -61,9 +76,9 @@
 	public final static int Bit17 = 0x10000;			// compound assigned (reference lhs) | unchecked (msg, alloc, explicit constr call)
 	public final static int Bit18 = 0x20000;			// non null (expression) | onDemand (import reference)
 	public final static int Bit19 = 0x40000;			// didResolve (parameterized qualified type ref/parameterized single type ref)  | empty (javadoc return statement) | needReceiverGenericCast (msg/fieldref)
-	public final static int Bit20 = 0x80000;			// contains syntax errors (method declaration, type declaration, field declarations, initializer)
+	public final static int Bit20 = 0x80000;			// contains syntax errors (method declaration, type declaration, field declarations, initializer), typeref: <> name ref: lambda capture)
 	public final static int Bit21 = 0x100000;
-	public final static int Bit22 = 0x200000;			// parenthesis count (expression) | used (import reference)
+	public final static int Bit22 = 0x200000;			// parenthesis count (expression) | used (import reference) shadows outer local (local declarations)
 	public final static int Bit23 = 0x400000;			// parenthesis count (expression)
 	public final static int Bit24 = 0x800000;			// parenthesis count (expression)
 	public final static int Bit25 = 0x1000000;		// parenthesis count (expression)
@@ -129,8 +144,11 @@
 	public static final int RestrictiveFlagMASK = Bit1|Bit2|Bit3;
 
 	// for local decls
+	public static final int IsTypeElided = Bit2;  // type elided lambda argument.
 	public static final int IsArgument = Bit3;
+	public static final int IsLocalDeclarationReachable = Bit31;
 	public static final int IsForeachElementVariable = Bit5;
+	public static final int ShadowsOuterLocal = Bit22;
 
 	// for name refs or local decls
 	public static final int FirstAssignmentToLocal = Bit4;
@@ -144,6 +162,7 @@
 	// for single name references
 	public static final int DepthSHIFT = 5;	// Bit6 -> Bit13
 	public static final int DepthMASK = Bit6|Bit7|Bit8|Bit9|Bit10|Bit11|Bit12|Bit13; // 8 bits for actual depth value (max. 255)
+	public static final int IsCapturedOuterLocal = Bit20;
 
 	// for statements
 	public static final int IsReachable = Bit32;
@@ -151,8 +170,6 @@
 	public static final int DocumentedFallthrough = Bit30; // switch statement
 	public static final int DocumentedCasesOmitted = Bit31; // switch statement
 
-	// local decls
-	public static final int IsLocalDeclarationReachable = Bit31;
 
 	// try statements
 	public static final int IsSubRoutineEscaping = Bit15;
@@ -281,6 +298,9 @@
 	public static final int INVOCATION_ARGUMENT_UNCHECKED = 1;
 	public static final int INVOCATION_ARGUMENT_WILDCARD = 2;
 
+	// for all declarations that can contain type references that have type annotations
+	public static final int HasTypeAnnotations = Bit21;
+	
 	// for type reference (diamond case) - Java 7
 	public static final int IsUnionType = Bit30;
 	// Used to tag ParameterizedSingleTypeReference or ParameterizedQualifiedTypeReference when they are
@@ -293,6 +313,8 @@
 
 	// for annotation reference, signal if annotation was created from a default:
 	public static final int IsSynthetic = ASTNode.Bit7;
+	
+	public static final Argument [] NO_ARGUMENTS = new Argument [0];
 
 	public ASTNode() {
 
@@ -308,7 +330,7 @@
 			}
 		}
 		TypeBinding checkedParameterType = parameterType; // originalParameterType == null ? parameterType : originalParameterType;
-		if (argumentType != checkedParameterType && argumentType.needsUncheckedConversion(checkedParameterType)) {
+		if (TypeBinding.notEquals(argumentType, checkedParameterType) && argumentType.needsUncheckedConversion(checkedParameterType)) {
 			scope.problemReporter().unsafeTypeConversion(argument, argumentType, checkedParameterType);
 			return INVOCATION_ARGUMENT_UNCHECKED;
 		}
@@ -390,8 +412,8 @@
 						if (varargsType.dimensions < dimensions) {
 							scope.problemReporter().varargsArgumentNeedCast(method, lastArgType, invocationSite);
 						} else if (varargsType.dimensions == dimensions
-										&& lastArgType != varargsType
-										&& lastArgType.leafComponentType().erasure() != varargsType.leafComponentType.erasure()
+										&& TypeBinding.notEquals(lastArgType, varargsType)
+										&& TypeBinding.notEquals(lastArgType.leafComponentType().erasure(), varargsType.leafComponentType.erasure())
 										&& lastArgType.isCompatibleWith(varargsType.elementsType())
 										&& lastArgType.isCompatibleWith(varargsType)) {
 							scope.problemReporter().varargsArgumentNeedCast(method, lastArgType, invocationSite);
@@ -472,6 +494,11 @@
 		return false;
 	}
 
+	public boolean receiverIsImplicitThis() {
+
+		return false;
+	}
+
 	/* Answer true if the method use is considered deprecated.
 	* An access in the same compilation unit is allowed.
 	*/
@@ -595,8 +622,15 @@
 	public static StringBuffer printAnnotations(Annotation[] annotations, StringBuffer output) {
 		int length = annotations.length;
 		for (int i = 0; i < length; i++) {
-			annotations[i].print(0, output);
-			output.append(" "); //$NON-NLS-1$
+			if (i > 0) {
+				output.append(" "); //$NON-NLS-1$
+			}
+			Annotation annotation2 = annotations[i];
+			if (annotation2 != null) {
+				annotation2.print(0, output);
+			} else {
+				output.append('?');
+			}
 		}
 		return output;
 	}
@@ -646,24 +680,62 @@
 	}
 // Markus Witte+SH}
 
+	public static boolean polyExpressionsHaveErrors(BlockScope scope, MethodBinding methodBinding, Expression [] arguments, TypeBinding[] argumentTypes) {
+		boolean polyExpressionsHaveErrors = false;
+		MethodBinding candidateMethod;
+		if (methodBinding.isValidBinding()) {
+			candidateMethod = methodBinding;
+		} else if (methodBinding instanceof ProblemMethodBinding) {
+			candidateMethod = ((ProblemMethodBinding) methodBinding).closestMatch;
+		} else {
+			candidateMethod = null;
+		}
+		if (candidateMethod != null) {
+			boolean variableArity = candidateMethod.isVarargs();
+			final TypeBinding[] parameters = candidateMethod.parameters;
+			final int parametersLength = parameters.length;
+			for (int i = 0, length = arguments == null ? 0 : arguments.length; i < length; i++) {
+				if (argumentTypes[i] instanceof PolyTypeBinding) {
+					Expression argument = arguments[i];
+					TypeBinding parameterType = i < parametersLength ? parameters[i] : variableArity ? parameters[parametersLength - 1] : null;
+					argument.setExpressionContext(parameterType != null ? ExpressionContext.INVOCATION_CONTEXT: ExpressionContext.ASSIGNMENT_CONTEXT); // force the errors to surface.
+					if (variableArity && i >= parametersLength - 1)
+						argument.tagAsEllipsisArgument();
+					argument.setExpectedType(parameterType);
+					TypeBinding argumentType = argument.resolveType(scope);
+					if (argumentType == null || !argumentType.isValidBinding())
+						polyExpressionsHaveErrors = true;
+					if (argument instanceof LambdaExpression && ((LambdaExpression) argument).hasErrors())
+						polyExpressionsHaveErrors = true;
+				}
+			}
+		}
+		return polyExpressionsHaveErrors;
+	}
+
+	public static void resolveAnnotations(BlockScope scope, Annotation[] sourceAnnotations, Binding recipient) {
+		resolveAnnotations(scope, sourceAnnotations, recipient, false);
+	}
+	
 	/**
 	 * Resolve annotations, and check duplicates, answers combined tagBits
-	 * for recognized standard annotations
+	 * for recognized standard annotations. Return null if nothing new is
+	 * resolved.
 	 */
-	public static void resolveAnnotations(BlockScope scope, Annotation[] sourceAnnotations, Binding recipient) {
+	public static AnnotationBinding [] resolveAnnotations(BlockScope scope, Annotation[] sourceAnnotations, Binding recipient, boolean copySE8AnnotationsToType) {
 		AnnotationBinding[] annotations = null;
 		int length = sourceAnnotations == null ? 0 : sourceAnnotations.length;
 		if (recipient != null) {
 			switch (recipient.kind()) {
 				case Binding.PACKAGE :
 					PackageBinding packageBinding = (PackageBinding) recipient;
-					if ((packageBinding.tagBits & TagBits.AnnotationResolved) != 0) return;
+					if ((packageBinding.tagBits & TagBits.AnnotationResolved) != 0) return annotations;
 					packageBinding.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
 					break;
 				case Binding.TYPE :
 				case Binding.GENERIC_TYPE :
 					ReferenceBinding type = (ReferenceBinding) recipient;
-					if ((type.tagBits & TagBits.AnnotationResolved) != 0) return;
+					if ((type.tagBits & TagBits.AnnotationResolved) != 0) return annotations;
 					type.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
 					if (length > 0) {
 						annotations = new AnnotationBinding[length];
@@ -672,7 +744,7 @@
 					break;
 				case Binding.METHOD :
 					MethodBinding method = (MethodBinding) recipient;
-					if ((method.tagBits & TagBits.AnnotationResolved) != 0) return;
+					if ((method.tagBits & TagBits.AnnotationResolved) != 0) return annotations;
 					method.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
 					if (length > 0) {
 						annotations = new AnnotationBinding[length];
@@ -682,7 +754,8 @@
 //{ObjectTeams:	method mappings
 				case Binding.BINDING :
 					CallinCalloutBinding mapping = (CallinCalloutBinding) recipient;
-					if ((mapping.tagBits & TagBits.AnnotationResolved) != 0) return;
+					if ((mapping.tagBits & TagBits.AnnotationResolved) != 0) 
+						return annotations;
 					mapping.tagBits |= TagBits.AnnotationResolved;
 					if (length > 0) {
 						annotations = new AnnotationBinding[length];
@@ -692,7 +765,7 @@
 // SH}
 				case Binding.FIELD :
 					FieldBinding field = (FieldBinding) recipient;
-					if ((field.tagBits & TagBits.AnnotationResolved) != 0) return;
+					if ((field.tagBits & TagBits.AnnotationResolved) != 0) return annotations;
 					field.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
 					if (length > 0) {
 						annotations = new AnnotationBinding[length];
@@ -701,27 +774,42 @@
 					break;
 				case Binding.LOCAL :
 					LocalVariableBinding local = (LocalVariableBinding) recipient;
-					if ((local.tagBits & TagBits.AnnotationResolved) != 0) return;
+					if ((local.tagBits & TagBits.AnnotationResolved) != 0) return annotations;
 					local.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
 					if (length > 0) {
 						annotations = new AnnotationBinding[length];
 						local.setAnnotations(annotations, scope);
 					}
 					break;
+				case Binding.TYPE_PARAMETER :
+				case Binding.TYPE_USE :
+					// deliberately don't set the annotation resolved tagbits, it is not material and also we are working with a dummy static object.
+					annotations = new AnnotationBinding[length];
+					break;
 				default :
-					return;
+					return annotations;
 			}
 		}
 		if (sourceAnnotations == null)
-			return;
+			return annotations;
 		for (int i = 0; i < length; i++) {
 			Annotation annotation = sourceAnnotations[i];
 			final Binding annotationRecipient = annotation.recipient;
 			if (annotationRecipient != null && recipient != null) {
-				// only local and field can share annnotations
+				// only local and field can share annnotations and their types.
 				switch (recipient.kind()) {
+					case Binding.TYPE_USE:
+						if (annotations != null) {
+							// need to fill the instances array
+							for (int j = 0; j < length; j++) {
+								annotations[j] = sourceAnnotations[j].getCompilerAnnotation();
+							}
+						}
+						break;
 					case Binding.FIELD :
 						FieldBinding field = (FieldBinding) recipient;
+						if (!(annotationRecipient instanceof FieldBinding))
+							break;
 						field.tagBits = ((FieldBinding) annotationRecipient).tagBits;
 						if (annotations != null) {
 							// need to fill the instances array
@@ -733,6 +821,8 @@
 						break;
 					case Binding.LOCAL :
 						LocalVariableBinding local = (LocalVariableBinding) recipient;
+						if (!(annotationRecipient instanceof LocalVariableBinding))
+							break;
 						long otherLocalTagBits = ((LocalVariableBinding) annotationRecipient).tagBits;
 						local.tagBits = otherLocalTagBits;
 						if ((otherLocalTagBits & TagBits.AnnotationSuppressWarnings) == 0) {
@@ -767,7 +857,7 @@
 						}
 						break;
 				}
-				return;
+				return annotations;
 			} else {
 				annotation.recipient = recipient;
 				annotation.resolveType(scope);
@@ -777,31 +867,221 @@
 				}
 			}
 		}
+
+		/* See if the recipient is meta-annotated with @Repeatable and if so validate constraints. We can't do this during resolution of @Repeatable itself as @Target and 
+		   @Retention etc could come later
+		*/   
+		if (recipient != null && recipient.isTaggedRepeatable()) {
+			for (int i = 0; i < length; i++) {
+				Annotation annotation = sourceAnnotations[i];
+				ReferenceBinding annotationType = annotations[i] != null ? annotations[i].getAnnotationType() : null;
+				if (annotationType != null && annotationType.id == TypeIds.T_JavaLangAnnotationRepeatable)
+					annotation.checkRepeatableMetaAnnotation(scope);
+			}
+		}
+		
 		// check duplicate annotations
-		if (annotations != null) {
+		if (annotations != null && length > 1) {
 			AnnotationBinding[] distinctAnnotations = annotations; // only copy after 1st duplicate is detected
+			Map implicitContainerAnnotations = null;
 			for (int i = 0; i < length; i++) {
 				AnnotationBinding annotation = distinctAnnotations[i];
 				if (annotation == null) continue;
-				TypeBinding annotationType = annotation.getAnnotationType();
+				ReferenceBinding annotationType = annotation.getAnnotationType();
 				boolean foundDuplicate = false;
+				ContainerAnnotation container = null;
 				for (int j = i+1; j < length; j++) {
 					AnnotationBinding otherAnnotation = distinctAnnotations[j];
 					if (otherAnnotation == null) continue;
-					if (otherAnnotation.getAnnotationType() == annotationType) {
-						foundDuplicate = true;
+					if (TypeBinding.equalsEquals(otherAnnotation.getAnnotationType(), annotationType)) {
 						if (distinctAnnotations == annotations) {
 							System.arraycopy(distinctAnnotations, 0, distinctAnnotations = new AnnotationBinding[length], 0, length);
 						}
-						distinctAnnotations[j] = null; // report it only once
-						scope.problemReporter().duplicateAnnotation(sourceAnnotations[j]);
+						distinctAnnotations[j] = null; // report/process it only once
+						if (annotationType.isRepeatableAnnotationType()) {
+							Annotation persistibleAnnotation = sourceAnnotations[i].getPersistibleAnnotation();
+							if (persistibleAnnotation instanceof ContainerAnnotation)
+								container = (ContainerAnnotation) persistibleAnnotation;
+							if (container == null) {  // first encounter with a duplicate.
+								ReferenceBinding containerAnnotationType = annotationType.containerAnnotationType();
+								container = new ContainerAnnotation(sourceAnnotations[i], containerAnnotationType, scope);
+								if (implicitContainerAnnotations == null) implicitContainerAnnotations = new HashMap(3);
+								implicitContainerAnnotations.put(containerAnnotationType, sourceAnnotations[i]);
+								Annotation.checkForInstancesOfRepeatableWithRepeatingContainerAnnotation(scope, annotationType, sourceAnnotations);
+							}
+							container.addContainee(sourceAnnotations[j]);
+						} else {
+							foundDuplicate = true;
+							scope.problemReporter().duplicateAnnotation(sourceAnnotations[j], scope.compilerOptions().sourceLevel);
+						}
 					}
 				}
+				if (container != null) {
+					container.resolveType(scope);
+				}
 				if (foundDuplicate) {
-					scope.problemReporter().duplicateAnnotation(sourceAnnotations[i]);
+					scope.problemReporter().duplicateAnnotation(sourceAnnotations[i], scope.compilerOptions().sourceLevel);
+				}
+			}
+			// Check for presence of repeating annotation together with the containing annotation
+			if (implicitContainerAnnotations != null) {
+				for (int i = 0; i < length; i++) {
+					if (distinctAnnotations[i] == null) continue;
+					Annotation annotation = sourceAnnotations[i];
+					ReferenceBinding annotationType = distinctAnnotations[i].getAnnotationType();
+					if (implicitContainerAnnotations.containsKey(annotationType)) {
+						scope.problemReporter().repeatedAnnotationWithContainer((Annotation) implicitContainerAnnotations.get(annotationType), annotation);
+					}
 				}
 			}
 		}
+		if (copySE8AnnotationsToType)
+			copySE8AnnotationsToType(scope, recipient, sourceAnnotations);
+		return annotations;
+	}
+	
+	/**	Resolve JSR308 annotations on a type reference, array creation expression or a wildcard. Type parameters go directly to the subroutine,
+	    By construction the bindings associated with QTR, PQTR etc get resolved first and then annotations for different levels get resolved
+	    and applied at one go. Likewise for multidimensional arrays.
+	    
+	    @Returns the annotated type binding. 
+	*/
+	public static TypeBinding resolveAnnotations(BlockScope scope, Annotation[][] sourceAnnotations, TypeBinding type) {
+		int levels = sourceAnnotations == null ? 0 : sourceAnnotations.length;
+		if (type == null || levels == 0)
+			return type;
+		AnnotationBinding [][] annotationBindings = new AnnotationBinding [levels][];
+
+		for (int i = 0; i < levels; i++) {
+			Annotation[] annotations = sourceAnnotations[i];
+			if (annotations != null && annotations.length > 0) {
+				annotationBindings[i] = resolveAnnotations(scope, annotations, TypeBinding.TYPE_USE_BINDING, false);
+			}
+		}
+		return scope.environment().createAnnotatedType(type, annotationBindings);
+	}
+
+	// When SE8 annotations feature in SE7 locations, they get attributed to the declared entity. Copy/move these to the type of the declared entity (field, local, argument etc.)
+	public static void copySE8AnnotationsToType(BlockScope scope, Binding recipient, Annotation[] annotations) {
+		
+		if (annotations == null || annotations.length == 0 || recipient == null)
+			return;
+		
+		long recipientTargetMask = 0;
+		switch (recipient.kind()) {
+			case Binding.LOCAL:
+				recipientTargetMask = recipient.isParameter() ? TagBits.AnnotationForParameter : TagBits.AnnotationForLocalVariable;
+				break;
+			case Binding.FIELD:
+				recipientTargetMask = TagBits.AnnotationForField;
+				break;
+			case Binding.METHOD:
+				recipientTargetMask = TagBits.AnnotationForMethod;
+				break;
+			default:
+				return;
+		}
+		
+		AnnotationBinding [] se8Annotations = null;
+		int se8count = 0;
+		long se8nullBits = 0;
+		Annotation se8NullAnnotation = null;
+		for (int i = 0, length = annotations.length; i < length; i++) {
+			AnnotationBinding annotation = annotations[i].getCompilerAnnotation();
+			if (annotation == null) continue;
+			final ReferenceBinding annotationType = annotation.getAnnotationType();
+			long metaTagBits = annotationType.getAnnotationTagBits();
+			if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) {
+				if (se8Annotations == null) {
+					se8Annotations = new AnnotationBinding[] { annotation };
+					se8count = 1;
+				} else {
+					System.arraycopy(se8Annotations, 0, se8Annotations = new AnnotationBinding[se8count + 1], 0, se8count);
+					se8Annotations[se8count++] = annotation;
+				}
+				if (annotationType.id == TypeIds.T_ConfiguredAnnotationNonNull) {
+					se8nullBits = TagBits.AnnotationNonNull;
+					se8NullAnnotation = annotations[i];
+				} else if (annotationType.id == TypeIds.T_ConfiguredAnnotationNullable) {
+					se8nullBits = TagBits.AnnotationNullable;
+					se8NullAnnotation = annotations[i];
+				}
+			}
+		}
+		if (se8Annotations != null) {
+			switch (recipient.kind()) {
+				case Binding.LOCAL:
+					LocalVariableBinding local = (LocalVariableBinding) recipient;
+					TypeReference typeRef = local.declaration.type;
+					if (Annotation.isTypeUseCompatible(typeRef, scope)) { // discard hybrid annotations on package qualified types.
+						local.declaration.bits |= HasTypeAnnotations;
+						typeRef.bits |= HasTypeAnnotations;
+						local.type = mergeAnnotationsIntoType(scope, se8Annotations, se8nullBits, se8NullAnnotation, typeRef, local.type);
+					}
+					break;
+				case Binding.FIELD:
+					FieldBinding field = (FieldBinding) recipient;
+					SourceTypeBinding sourceType = (SourceTypeBinding) field.declaringClass;
+					FieldDeclaration fieldDeclaration = sourceType.scope.referenceContext.declarationOf(field);
+					if (Annotation.isTypeUseCompatible(fieldDeclaration.type, scope)) { // discard hybrid annotations on package qualified types.
+						fieldDeclaration.bits |= HasTypeAnnotations;
+						fieldDeclaration.type.bits |= HasTypeAnnotations;
+						field.type = mergeAnnotationsIntoType(scope, se8Annotations, se8nullBits, se8NullAnnotation, fieldDeclaration.type, field.type);
+					}
+					break;
+				case Binding.METHOD:
+					MethodBinding method = (MethodBinding) recipient;
+					if (!method.isConstructor()) {
+						sourceType = (SourceTypeBinding) method.declaringClass;
+						MethodDeclaration methodDecl = (MethodDeclaration) sourceType.scope.referenceContext.declarationOf(method);
+						if (Annotation.isTypeUseCompatible(methodDecl.returnType, scope)) {
+							methodDecl.bits |= HasTypeAnnotations;
+							methodDecl.returnType.bits |= HasTypeAnnotations;
+							method.returnType = mergeAnnotationsIntoType(scope, se8Annotations, se8nullBits, se8NullAnnotation, methodDecl.returnType, method.returnType);
+						}
+					}
+					break;
+			}
+			AnnotationBinding [] recipientAnnotations = recipient.getAnnotations();
+			int length = recipientAnnotations == null ? 0 : recipientAnnotations.length;
+			int newLength = 0;
+			for (int i = 0; i < length; i++) {
+				final AnnotationBinding recipientAnnotation = recipientAnnotations[i];
+				if (recipientAnnotation == null)
+					continue;
+				long annotationTargetMask = recipientAnnotation.getAnnotationType().getAnnotationTagBits() & TagBits.AnnotationTargetMASK;
+				if (annotationTargetMask == 0 || (annotationTargetMask & recipientTargetMask) != 0)
+					recipientAnnotations[newLength++] = recipientAnnotation;
+			}
+			if (newLength != length) {
+				System.arraycopy(recipientAnnotations, 0, recipientAnnotations = new AnnotationBinding[newLength],  0, newLength);
+				recipient.setAnnotations(recipientAnnotations, scope);
+			}
+		}
+	}
+
+	private static TypeBinding mergeAnnotationsIntoType(BlockScope scope, AnnotationBinding[] se8Annotations, long se8nullBits, Annotation se8NullAnnotation,
+			TypeReference typeRef, TypeBinding existingType) 
+	{
+		if (existingType == null || !existingType.isValidBinding()) return existingType;
+		TypeReference unionRef = typeRef.isUnionType() ? ((UnionTypeReference) typeRef).typeReferences[0] : null;
+		
+		long prevNullBits = existingType.tagBits & TagBits.AnnotationNullMASK;
+		if (se8nullBits != 0 && prevNullBits != se8nullBits && ((prevNullBits | se8nullBits) == TagBits.AnnotationNullMASK)) {
+			scope.problemReporter().contradictoryNullAnnotations(se8NullAnnotation);
+		}
+		TypeBinding oldLeafType = (unionRef == null) ? existingType.leafComponentType() : unionRef.resolvedType;
+		AnnotationBinding [][] goodies = new AnnotationBinding[typeRef.getAnnotatableLevels()][];
+		goodies[0] = se8Annotations;  // @T X.Y.Z local; ==> @T should annotate X
+		TypeBinding newLeafType = scope.environment().createAnnotatedType(oldLeafType, goodies);
+
+		if (unionRef == null) {
+			typeRef.resolvedType = existingType.isArrayType() ? scope.environment().createArrayType(newLeafType, existingType.dimensions(), existingType.getTypeAnnotations()) : newLeafType;
+		} else {
+			unionRef.resolvedType = newLeafType;
+			unionRef.bits |= HasTypeAnnotations;
+		}
+		return typeRef.resolvedType;
 	}
 
 /**
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
index eb924d1..c0907ae 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -14,7 +18,14 @@
  *								bug 367203 - [compiler][null] detect assigning null to nonnull argument
  *								bug 365519 - editorial cleanup after bug 186342 and bug 365387
  *								bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
+ *								bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
+ *								bug 401030 - [1.8][null] Null analysis support for lambda methods.
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 403216 - [1.8][null] TypeReference#captureTypeAnnotations treats type annotations as type argument annotations
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -182,6 +193,8 @@
 	public int modifiers;
 	public int modifiersSourceStart;
 	public Annotation[] annotations;
+	// jsr 308
+	public Receiver receiver;
 	public Argument[] arguments;
 	public TypeReference[] thrownExceptions;
 	public Statement[] statements;
@@ -221,17 +234,25 @@
 	 * we create the argument binding and resolve annotations in order to compute null annotation tagbits.
 	 */
 	public void createArgumentBindings() {
-		if (this.arguments != null && this.binding != null) {
-			for (int i = 0, length = this.arguments.length; i < length; i++) {
-				Argument argument = this.arguments[i];
-				argument.createBinding(this.scope, this.binding.parameters[i]);
+		createArgumentBindings(this.arguments, this.binding, this.scope);
+	}
+	// version for invocation from LambdaExpression:
+	static void createArgumentBindings(Argument[] arguments, MethodBinding binding, MethodScope scope) {
+		boolean useTypeAnnotations = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8;
+		if (arguments != null && binding != null) {
+			for (int i = 0, length = arguments.length; i < length; i++) {
+				Argument argument = arguments[i];
+				binding.parameters[i] = argument.createBinding(scope, binding.parameters[i]);
+				if (useTypeAnnotations)
+					continue; // no business with SE7 null annotations in the 1.8 case.
 				// createBinding() has resolved annotations, now transfer nullness info from the argument to the method:
-				if ((argument.binding.tagBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable)) != 0) {
-					if (this.binding.parameterNonNullness == null) {
-						this.binding.parameterNonNullness = new Boolean[this.arguments.length];
-						this.binding.tagBits |= TagBits.IsNullnessKnown;
+				long argTypeTagBits = (argument.binding.tagBits & TagBits.AnnotationNullMASK);
+				if (argTypeTagBits != 0) {
+					if (binding.parameterNonNullness == null) {
+						binding.parameterNonNullness = new Boolean[arguments.length];
+						binding.tagBits |= TagBits.IsNullnessKnown;
 					}
-					this.binding.parameterNonNullness[i] = Boolean.valueOf((argument.binding.tagBits & TagBits.AnnotationNonNull) != 0);
+					binding.parameterNonNullness[i] = Boolean.valueOf(argTypeTagBits == TagBits.AnnotationNonNull);
 				}
 			}
 		}
@@ -260,7 +281,7 @@
 			AnnotationBinding[][] paramAnnotations = null;
 			for (int i = 0, length = this.arguments.length; i < length; i++) {
 				Argument argument = this.arguments[i];
-				argument.bind(this.scope, this.binding.parameters[i], used);
+				this.binding.parameters[i] = argument.bind(this.scope, this.binding.parameters[i], used);
 				if (argument.annotations != null) {
 					if (paramAnnotations == null) {
 						paramAnnotations = new AnnotationBinding[length][];
@@ -322,21 +343,42 @@
 	/**
 	 * Feed null information from argument annotations into the analysis and mark arguments as assigned.
 	 */
-	void analyseArguments(FlowInfo flowInfo) {
-		if (this.arguments != null) {
-			for (int i = 0, count = this.arguments.length; i < count; i++) {
-				if (this.binding.parameterNonNullness != null) {
+	static void analyseArguments(FlowInfo flowInfo, Argument[] methodArguments, MethodBinding methodBinding) {
+		if (methodArguments != null) {
+			for (int i = 0, count = methodArguments.length; i < count; i++) {
+				if (methodBinding.parameterNonNullness != null) {
 					// leverage null-info from parameter annotations:
-					Boolean nonNullNess = this.binding.parameterNonNullness[i];
+					Boolean nonNullNess = methodBinding.parameterNonNullness[i];
 					if (nonNullNess != null) {
 						if (nonNullNess.booleanValue())
-							flowInfo.markAsDefinitelyNonNull(this.arguments[i].binding);
+							flowInfo.markAsDefinitelyNonNull(methodArguments[i].binding);
 						else
-							flowInfo.markPotentiallyNullBit(this.arguments[i].binding);
+							flowInfo.markPotentiallyNullBit(methodArguments[i].binding);
 					}
 				}
 				// tag parameters as being set:
-				flowInfo.markAsDefinitelyAssigned(this.arguments[i].binding);
+				flowInfo.markAsDefinitelyAssigned(methodArguments[i].binding);
+			}
+		}
+	}
+
+	/**
+	 * Feed null information from argument annotations into the analysis and mark arguments as assigned.
+	 * Variant for Java 8 using type annotations
+	 */
+	static void analyseArguments18(FlowInfo flowInfo, Argument[] methodArguments, MethodBinding methodBinding) {
+		if (methodArguments != null) {
+			int length = Math.min(methodBinding.parameters.length, methodArguments.length);
+			for (int i = 0; i < length; i++) {
+				// leverage null type annotations:
+				long tagBits = methodBinding.parameters[i].tagBits & TagBits.AnnotationNullMASK;
+				if (tagBits == TagBits.AnnotationNonNull)
+					flowInfo.markAsDefinitelyNonNull(methodArguments[i].binding);
+				else if (tagBits == TagBits.AnnotationNullable)
+					flowInfo.markPotentiallyNullBit(methodArguments[i].binding);
+	
+				// tag parameters as being set:
+				flowInfo.markAsDefinitelyAssigned(methodArguments[i].binding);
 			}
 		}
 	}
@@ -574,6 +616,10 @@
 	}
 // SH}
 
+	public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
+		// do nothing
+	}
+
 	private void checkArgumentsSize() {
 		TypeBinding[] parameters = this.binding.parameters;
 		int size = 1; // an abstract method or a native method cannot be static
@@ -631,6 +677,10 @@
 		return false;
 	}
 
+	public boolean isDefaultMethod() {
+		return false;
+	}
+
 	public boolean isInitializationMethod() {
 
 		return false;
@@ -669,7 +719,10 @@
 		}
 		printIndent(tab, output);
 		printModifiers(this.modifiers, output);
-		if (this.annotations != null) printAnnotations(this.annotations, output);
+		if (this.annotations != null) {
+			printAnnotations(this.annotations, output);
+			output.append(' ');
+		}
 
 		TypeParameter[] typeParams = typeParameters();
 		if (typeParams != null) {
@@ -684,6 +737,9 @@
 		}
 
 		printReturnType(0, output).append(this.selector).append('(');
+		if (this.receiver != null) {
+			this.receiver.print(0, output);
+		}
 		if (this.arguments != null) {
 //{ObjectTeams: retrench enhanced callin args:
 			int firstArg = 0;
@@ -694,7 +750,7 @@
 			for (int i = 0; i < this.arguments.length; i++) {
   :giro */
 // SH}
-				if (i > 0) output.append(", "); //$NON-NLS-1$
+				if (i > 0 || this.receiver != null) output.append(", "); //$NON-NLS-1$
 				this.arguments[i].print(0, output);
 			}
 		}
@@ -750,19 +806,23 @@
 
 		try {
 			bindArguments();
+			resolveReceiver();
 			bindThrownExceptions();
 //{ObjectTeams: no javadoc in generated / copied methods
 		  if (!(this.isGenerated || this.isCopied))
 // SH}
 			resolveJavadoc();
 			resolveAnnotations(this.scope, this.annotations, this.binding);
-			validateNullAnnotations();
+			
+			long sourceLevel = this.scope.compilerOptions().sourceLevel;
+			validateNullAnnotations(sourceLevel);
+
 			resolveStatements();
 			// check @Deprecated annotation presence
 			if (this.binding != null
 					&& (this.binding.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0
 					&& (this.binding.modifiers & ClassFileConstants.AccDeprecated) != 0
-					&& this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
+					&& sourceLevel >= ClassFileConstants.JDK1_5) {
 				this.scope.problemReporter().missingDeprecatedAnnotationForMethod(this);
 			}
 		} catch (AbortMethod e) {
@@ -771,6 +831,54 @@
 		}
 	}
 
+	public void resolveReceiver() {
+		if (this.receiver == null) return;
+
+		if (this.receiver.modifiers != 0) {
+			this.scope.problemReporter().illegalModifiers(this.receiver.declarationSourceStart, this.receiver.declarationSourceEnd);
+		}
+
+		TypeBinding resolvedReceiverType = this.receiver.type.resolvedType;
+		if (this.binding == null || resolvedReceiverType == null || !resolvedReceiverType.isValidBinding()) {
+			return;
+		}
+
+		ReferenceBinding declaringClass = this.binding.declaringClass;
+		/* neither static methods nor methods in anonymous types can have explicit 'this' */
+		if (this.isStatic() || declaringClass.isAnonymousType()) {
+			this.scope.problemReporter().disallowedThisParameter(this.receiver);
+			this.receiver = null;
+			return; // No need to do further validation
+		}
+
+		ReferenceBinding enclosingReceiver = this.scope.enclosingReceiverType();
+		if (this.isConstructor()) {
+			/* Only non static member types or local types can declare explicit 'this' params in constructors */
+			if (declaringClass.isStatic()
+					|| (declaringClass.tagBits & (TagBits.IsLocalType | TagBits.IsMemberType)) == 0) { /* neither member nor local type */
+				this.scope.problemReporter().disallowedThisParameter(this.receiver);
+				this.receiver = null;
+				return; // No need to do further validation
+			}
+			enclosingReceiver = enclosingReceiver.enclosingType();
+		}
+
+		char[][] tokens = (this.receiver.qualifyingName == null) ? null : this.receiver.qualifyingName.getName();
+		if (this.isConstructor()) {
+			if (tokens == null || tokens.length > 1 || !CharOperation.equals(enclosingReceiver.sourceName(), tokens[0])) {
+				this.scope.problemReporter().illegalQualifierForExplicitThis(this.receiver, enclosingReceiver);
+				this.receiver.qualifyingName = null;
+			}
+		} else if (tokens != null && tokens.length > 0) {
+			this.scope.problemReporter().illegalQualifierForExplicitThis2(this.receiver);
+			this.receiver.qualifyingName = null;
+		}
+
+		if (TypeBinding.notEquals(enclosingReceiver, resolvedReceiverType)) {
+			this.scope.problemReporter().illegalTypeForExplicitThis(this.receiver, enclosingReceiver);
+			this.receiver = null;
+		}
+	}
 	public void resolveJavadoc() {
 
 		if (this.binding == null) return;
@@ -841,6 +949,10 @@
 	public void tagAsHavingErrors() {
 		this.ignoreFurtherInvestigation = true;
 	}
+	
+	public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
+		// Nothing to do for this context;
+	}
 
 //{ObjectTeams: and remove it again:
 	public void resetErrorFlag() {
@@ -858,17 +970,28 @@
 	    return null;
 	}
 
-	void validateNullAnnotations() {
+	void validateNullAnnotations(long sourceLevel) {
+		if (this.binding == null) return;
 		// null annotations on parameters?
-		if (this.binding != null && this.binding.parameterNonNullness != null) {
-			int length = this.binding.parameters.length;
-			for (int i=0; i<length; i++) {
-				if (this.binding.parameterNonNullness[i] != null) {
-					long nullAnnotationTagBit =  this.binding.parameterNonNullness[i].booleanValue()
-							? TagBits.AnnotationNonNull : TagBits.AnnotationNullable;
-					this.scope.validateNullAnnotation(nullAnnotationTagBit, this.arguments[i].type, this.arguments[i].annotations);
+		if (sourceLevel < ClassFileConstants.JDK1_8) {
+			if (this.binding.parameterNonNullness != null) {
+				int length = this.binding.parameters.length;
+				for (int i=0; i<length; i++) {
+					if (this.binding.parameterNonNullness[i] != null) {
+						long nullAnnotationTagBit =  this.binding.parameterNonNullness[i].booleanValue()
+								? TagBits.AnnotationNonNull : TagBits.AnnotationNullable;
+						if (!this.scope.validateNullAnnotation(nullAnnotationTagBit, this.arguments[i].type, this.arguments[i].annotations))
+							this.binding.parameterNonNullness[i] = null;
+					}
 				}
 			}
+		} else {
+			int length = this.binding.parameters.length;
+			for (int i=0; i<length; i++) {
+				this.scope.validateNullAnnotation(this.binding.parameters[i].tagBits, this.arguments[i].type, this.arguments[i].annotations);
+// TODO(stephan) remove once we're sure:
+//					this.binding.parameters[i] = this.binding.parameters[i].unannotated();
+			}			
 		}
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
index 8910eb1..d3c7ded 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
@@ -1,11 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: AbstractVariableDeclaration.java 19881 2009-04-13 23:35:46Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -20,7 +23,7 @@
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 
-public abstract class AbstractVariableDeclaration extends Statement implements InvocationSite {
+public abstract class AbstractVariableDeclaration extends Statement implements InvocationSite, ExpressionContext {
 	public int declarationEnd;
 	/**
 	 * For local declarations (outside of for statement initialization) and field declarations,
@@ -93,7 +96,10 @@
 	public StringBuffer printAsExpression(int indent, StringBuffer output) {
 		printIndent(indent, output);
 		printModifiers(this.modifiers, output);
-		if (this.annotations != null) printAnnotations(this.annotations, output);
+		if (this.annotations != null) {
+			printAnnotations(this.annotations, output);
+			output.append(' ');
+		}
 
 		if (this.type != null) {
 			this.type.print(0, output).append(' ');
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
index 46fc8ea..742a466 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -20,9 +24,14 @@
  *							bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
  *							bug 388996 - [compiler][resource] Incorrect 'potential resource leak'
  *							bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *							Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *							Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *							Bug 418235 - [compiler][null] Unreported nullness error when using generic
  *     Jesper S Moller <jesper@selskabet.org> - Contributions for
  *							bug 378674 - "The method can be declared as static" is wrong
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
  *     Till Brychcy - Contributions for
  *     						bug 413460 - NonNullByDefault is not inherited to Constructors when accessed via Class File
  *******************************************************************************/
@@ -80,6 +89,7 @@
 	public boolean inferredReturnType;
 
 	public FakedTrackingVariable closeTracker;	// when allocation a Closeable store a pre-liminary tracking variable here
+	private ExpressionContext expressionContext = VANILLA_CONTEXT;
 
 //{ObjectTeams: alternate AST in case the creation needs to be redirected through a creator call:
 	private MessageSend roleCreatorCall = null;
@@ -110,7 +120,7 @@
 				flowInfo = FakedTrackingVariable.markPassedToOutside(currentScope, this.arguments[i], flowInfo, flowContext, false);
 			}
 			this.arguments[i].checkNPEbyUnboxing(currentScope, flowContext, flowInfo);
-		}
+			}
 		analyseArguments(currentScope, flowContext, flowInfo, this.binding, this.arguments);
 	}
 
@@ -136,7 +146,7 @@
 	if (this.binding.declaringClass.isMemberType() && !this.binding.declaringClass.isStatic()) {
 		// allocating a non-static member type without an enclosing instance of parent type
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=335845
-		currentScope.resetDeclaringClassMethodStaticFlag(this.binding.declaringClass.enclosingType());
+		currentScope.tagAsAccessingEnclosingInstanceStateOf(this.binding.declaringClass.enclosingType(), false /* type variable access */);
 		// Reviewed for https://bugs.eclipse.org/bugs/show_bug.cgi?id=378674 :
 		// The corresponding problem (when called from static) is not produced until during code generation
 	}
@@ -184,7 +194,7 @@
 	MethodBinding codegenBinding = this.binding.original();
 	ReferenceBinding allocatedType = codegenBinding.declaringClass;
 
-	codeStream.new_(allocatedType);
+	codeStream.new_(this.type, allocatedType);
 	boolean isUnboxing = (this.implicitConversion & TypeIds.UNBOXING) != 0;
 	if (valueRequired || isUnboxing) {
 		codeStream.dup();
@@ -221,7 +231,7 @@
 	}
 	// invoke constructor
 	if (this.syntheticAccessor == null) {
-		codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */);
+		codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
 	} else {
 		// synthetic accessor got some extra arguments appended to its signature, which need values
 		for (int i = 0,
@@ -230,7 +240,7 @@
 			i++) {
 			codeStream.aconst_null();
 		}
-		codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */);
+		codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
 	}
 	if (valueRequired) {
 		codeStream.generateImplicitConversion(this.implicitConversion);
@@ -308,7 +318,7 @@
 // SH}
 
 	ReferenceBinding declaringClass;
-	if (codegenBinding.isPrivate() && currentScope.enclosingSourceType() != (declaringClass = codegenBinding.declaringClass)) {
+	if (codegenBinding.isPrivate() && TypeBinding.notEquals(currentScope.enclosingSourceType(), (declaringClass = codegenBinding.declaringClass))) {
 
 		// from 1.4 on, local type constructor can lose their private flag to ease emulation
 		if ((declaringClass.tagBits & TagBits.IsLocalType) != 0 && currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
@@ -359,6 +369,7 @@
 		this.type.bits |= IsAllocationType;
 // SH}
 		this.resolvedType = this.type.resolveType(scope, true /* check bounds*/);
+		checkIllegalNullAnnotation(scope, this.resolvedType);
 		checkParameterizedAllocation: {
 			if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>()
 				ReferenceBinding currentType = (ReferenceBinding)this.resolvedType;
@@ -424,19 +435,24 @@
 	// buffering the arguments' types
 	boolean argsContainCast = false;
 	TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
+	boolean polyExpressionSeen = false;
 	if (this.arguments != null) {
 		boolean argHasError = false;
 		int length = this.arguments.length;
 		argumentTypes = new TypeBinding[length];
+		TypeBinding argumentType;
 		for (int i = 0; i < length; i++) {
 			Expression argument = this.arguments[i];
 			if (argument instanceof CastExpression) {
 				argument.bits |= DisableUnnecessaryCastCheck; // will check later on
 				argsContainCast = true;
 			}
-			if ((argumentTypes[i] = argument.resolveType(scope)) == null) {
+			argument.setExpressionContext(INVOCATION_CONTEXT);
+			if ((argumentType = argumentTypes[i] = argument.resolveType(scope)) == null) {
 				argHasError = true;
 			}
+			if (argumentType != null && argumentType.kind() == Binding.POLY_TYPE)
+				polyExpressionSeen = true;
 		}
 		if (argHasError) {
 			/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=345359, if arguments have errors, completely bail out in the <> case.
@@ -497,7 +513,10 @@
 	  // ensure allocation type has methods:
 	  Dependencies.ensureBindingState(allocationType, ITranslationStates.STATE_LENV_DONE_FIELDS_AND_METHODS);
 // SH}
-	if (!(this.binding = scope.getConstructor(allocationType, argumentTypes, this)).isValidBinding()) {
+	this.binding = scope.getConstructor(allocationType, argumentTypes, this);
+	if (polyExpressionSeen && polyExpressionsHaveErrors(scope, this.binding, this.arguments, argumentTypes))
+		return null;
+	if (!this.binding.isValidBinding()) {
 //{ObjectTeams: baseclass decapsulation?
 	  boolean baseclassDecapsulationAllowed =
 						   this.type != null // null happens for enum constants
@@ -578,6 +597,20 @@
 	return allocationType;
 }
 
+/**
+ * Check if 'allocationType' illegally has a top-level null annotation.
+ */
+void checkIllegalNullAnnotation(BlockScope scope, TypeBinding allocationType) {
+	if (allocationType != null) {
+		// only check top-level null annotation (annots on details are OK):
+		long nullTagBits = allocationType.tagBits & TagBits.AnnotationNullMASK;
+		if (nullTagBits != 0) {
+			Annotation annotation = this.type.findAnnotation(nullTagBits);
+			scope.problemReporter().nullAnnotationUnsupportedLocation(annotation);
+		}
+	}
+}
+
 public TypeBinding[] inferElidedTypes(ReferenceBinding allocationType, ReferenceBinding enclosingType, TypeBinding[] argumentTypes, final BlockScope scope) {
 	/* Given the allocation type and the arguments to the constructor, see if we can synthesize a generic static factory
 	   method that would, given the argument types and the invocation site, manufacture a parameterized object of type allocationType.
@@ -605,7 +638,7 @@
 			// eg. X<String> x = new X<String>()
 			int i;
 			for (i = 0; i < allocationType.arguments.length; i++) {
-				if (allocationType.arguments[i] != expected.arguments[i])
+				if (TypeBinding.notEquals(allocationType.arguments[i], expected.arguments[i]))
 					break;
 			}
 			if (i == allocationType.arguments.length) {
@@ -619,7 +652,7 @@
 		return;
 	}
 	for (int i = 0; i < inferredTypes.length; i++) {
-		if (inferredTypes[i] != allocationType.arguments[i])
+		if (TypeBinding.notEquals(inferredTypes[i], allocationType.arguments[i]))
 			return;
 	}
 	reporter.redundantSpecificationOfTypeArguments(this.type, allocationType.arguments);
@@ -733,6 +766,19 @@
 public void setExpectedType(TypeBinding expectedType) {
 	this.typeExpected = expectedType;
 }
+
+public void setExpressionContext(ExpressionContext context) {
+	this.expressionContext = context;
+}
+
+public boolean isPolyExpression() {
+	return (this.expressionContext == ASSIGNMENT_CONTEXT || this.expressionContext == INVOCATION_CONTEXT) &&
+			this.type != null && (this.type.bits & ASTNode.IsDiamond) != 0;
+}
+
+public boolean tIsMoreSpecific(TypeBinding t, TypeBinding s) {
+	return isPolyExpression() ? !t.isBaseType() && s.isBaseType() : super.tIsMoreSpecific(t, s);
+}
 /**
  * @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#expectedType()
  */
@@ -740,4 +786,8 @@
 	return this.typeExpected;
 }
 
+public boolean statementExpression() {
+	return true;
+}
+
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
index e644f83..3c7b40a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -13,9 +17,26 @@
  *								bug 186342 - [compiler][null] Using annotations for null checking
  *								bug 365662 - [compiler][null] warn on contradictory and redundant null annotations
  *								bug 331649 - [compiler][null] consider null annotations for fields
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409517 - [1.8][compiler] Type annotation problems on more elaborate array references
+ *                          Bug 415397 - [1.8][compiler] Type Annotations on wildcard type argument dropped
+ *                          Bug 414384 - [1.8] type annotation on abbreviated inner class is not marked as inner type
+ *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
+ *                          Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
+ *                          Bug 412151 - [1.8][compiler] Check repeating annotation's collection type
+ *                          Bug 412149 - [1.8][compiler] Emit repeated annotations into the designated container
+ *                          Bug 419209 - [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.Stack;
+
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
@@ -33,10 +54,188 @@
  * Annotation
  */
 public abstract class Annotation extends Expression {
+	
+	Annotation persistibleAnnotation = this;  // Emit this into class file, unless this is a repeating annotation, in which case package this into the designated container.
+	
+	/**
+	 * Return the location for the corresponding annotation inside the type reference, <code>null</code> if none.
+	 */
+	public static int[] getLocations(
+			final Expression reference,
+			final Annotation annotation) {
+	
+		class LocationCollector extends ASTVisitor {
+			Stack typePathEntries;
+			Annotation searchedAnnotation;
+			boolean continueSearch = true;
+			
+			public LocationCollector(Annotation currentAnnotation) {
+				this.typePathEntries = new Stack();
+				this.searchedAnnotation = currentAnnotation;
+			}
+			
+			private int[] computeNestingDepth(TypeReference typeReference) {
+				TypeBinding type = typeReference.resolvedType == null ? null : typeReference.resolvedType.leafComponentType(); 
+				int[] nestingDepths = new int[typeReference.getAnnotatableLevels()];
+				if (type != null && type.isNestedType()) {
+					int depth = 0;
+					TypeBinding currentType = type;
+					while (currentType != null) {
+						depth += (currentType.isStatic()) ? 0 : 1;
+						currentType = currentType.enclosingType();
+					}
+					// Work backwards computing whether a INNER_TYPE entry is required for each level
+					int counter = nestingDepths.length - 1;
+					while (type != null && counter >= 0) {
+						nestingDepths[counter--] = depth;
+						depth -= type.isStatic() ? 0 : 1;
+						type = type.enclosingType();
+					}
+				}
+				return nestingDepths;
+			}
+			
+
+			private void inspectAnnotations(Annotation [] annotations) {
+				for (int i = 0, length = annotations == null ? 0 : annotations.length; this.continueSearch && i < length; i++) {
+					if (annotations[i] == this.searchedAnnotation)
+						this.continueSearch = false;
+				}
+			}
+
+			private void inspectArrayDimensions(Annotation [][] annotationsOnDimensions, int dimensions) {
+				for (int i = 0; this.continueSearch && i < dimensions; i++) {
+					Annotation[] annotations = annotationsOnDimensions == null ? null : annotationsOnDimensions[i];
+					inspectAnnotations(annotations);
+					if (!this.continueSearch) return;
+					this.typePathEntries.push(TYPE_PATH_ELEMENT_ARRAY);
+				}
+			}
+			
+			private void inspectTypeArguments(TypeReference[] typeReferences) {
+				for (int i = 0, length = typeReferences == null ? 0 : typeReferences.length; this.continueSearch && i < length; i++) {
+					int size = this.typePathEntries.size();
+					this.typePathEntries.add(new int[]{3,i});
+					typeReferences[i].traverse(this, (BlockScope) null);
+					if (!this.continueSearch) return;
+					this.typePathEntries.setSize(size);
+				}
+			}
+			
+			public boolean visit(TypeReference typeReference, BlockScope scope) {
+				if (this.continueSearch) {
+					inspectArrayDimensions(typeReference.getAnnotationsOnDimensions(), typeReference.dimensions());
+					if (this.continueSearch) {
+						int[] nestingDepths = computeNestingDepth(typeReference);
+						Annotation[][] annotations = typeReference.annotations;
+						TypeReference [][] typeArguments = typeReference.getTypeArguments();
+						int levels = typeReference.getAnnotatableLevels();
+						int size = this.typePathEntries.size();
+						for (int i = levels - 1; this.continueSearch && i >= 0; i--) {  // traverse outwards, see comment below about type annotations from SE7 locations.
+							this.typePathEntries.setSize(size);
+							for (int j = 0, depth = nestingDepths[i]; j < depth; j++)
+								this.typePathEntries.add(TYPE_PATH_INNER_TYPE);
+							if (annotations != null)
+								inspectAnnotations(annotations[i]);
+							if (this.continueSearch && typeArguments != null) {
+								inspectTypeArguments(typeArguments[i]);
+							}
+						}
+					}
+				}
+				return false; // if annotation is not found in the type reference, it must be one from SE7 location, typePathEntries captures the proper path entries for them. 
+			}	
+			public boolean visit(SingleTypeReference typeReference, BlockScope scope) {
+				return visit((TypeReference) typeReference, scope);
+			}
+			
+			public boolean visit(ArrayTypeReference typeReference, BlockScope scope) {
+				return visit((TypeReference) typeReference, scope);
+			}
+			
+			public boolean visit(ParameterizedSingleTypeReference typeReference, BlockScope scope) {
+				return visit((TypeReference) typeReference, scope);
+			}
+
+			public boolean visit(QualifiedTypeReference typeReference, BlockScope scope) {
+				return visit((TypeReference) typeReference, scope);
+			}
+			
+			public boolean visit(ArrayQualifiedTypeReference typeReference, BlockScope scope) {
+				return visit((TypeReference) typeReference, scope);
+			}
+			
+			public boolean visit(ParameterizedQualifiedTypeReference typeReference, BlockScope scope) {
+				return visit((TypeReference) typeReference, scope);
+			}
+			
+			public boolean visit(Wildcard typeReference, BlockScope scope) {
+				visit((TypeReference) typeReference, scope);
+				if (this.continueSearch) {
+					TypeReference bound = typeReference.bound;
+					if (bound != null) {
+						int size = this.typePathEntries.size();
+						this.typePathEntries.push(TYPE_PATH_ANNOTATION_ON_WILDCARD_BOUND);
+						bound.traverse(this, scope);
+						if (this.continueSearch)
+							this.typePathEntries.setSize(size);
+					}
+				}
+				return false;
+			}
+
+			public boolean visit(ArrayAllocationExpression allocationExpression, BlockScope scope) {
+				if (this.continueSearch) {
+					inspectArrayDimensions(allocationExpression.getAnnotationsOnDimensions(), allocationExpression.dimensions.length);
+					if (this.continueSearch) {
+						allocationExpression.type.traverse(this, scope);
+					}
+					if (this.continueSearch) throw new IllegalStateException();
+				}
+				return false;
+			}
+						
+			public String toString() {
+				StringBuffer buffer = new StringBuffer();
+				buffer
+					.append("search location for ") //$NON-NLS-1$
+					.append(this.searchedAnnotation)
+					.append("\ncurrent type_path entries : "); //$NON-NLS-1$
+				for (int i = 0, maxi = this.typePathEntries.size(); i < maxi; i++) {
+					int[] typePathEntry = (int[]) this.typePathEntries.get(i);
+					buffer
+						.append('(')
+						.append(typePathEntry[0])
+						.append(',')
+						.append(typePathEntry[1])
+						.append(')');
+				}
+				return String.valueOf(buffer);
+			}
+		}
+		if (reference == null) return null;
+		LocationCollector collector = new LocationCollector(annotation);
+		reference.traverse(collector, (BlockScope) null);
+		if (collector.typePathEntries.isEmpty()) {
+			return null;
+		}
+		int size = collector.typePathEntries.size();
+		int[] result = new int[size*2];
+		int offset=0;
+		for (int i = 0; i < size; i++) {
+			int[] pathElement = (int[])collector.typePathEntries.get(i);
+			result[offset++] = pathElement[0];
+			result[offset++] = pathElement[1];
+		}
+		return result;
+	}
 
 	final static MemberValuePair[] NoValuePairs = new MemberValuePair[0];
-	private static final long TAGBITS_NULLABLE_OR_NONNULL = TagBits.AnnotationNullable|TagBits.AnnotationNonNull;
 
+	static final int[] TYPE_PATH_ELEMENT_ARRAY = new int[]{0,0};
+	static final int[] TYPE_PATH_INNER_TYPE = new int[]{1,0};
+	static final int[] TYPE_PATH_ANNOTATION_ON_WILDCARD_BOUND = new int[]{2,0};
+	
 	public int declarationSourceEnd;
 	public Binding recipient;
 
@@ -44,7 +243,7 @@
 	/**
 	 *  The representation of this annotation in the type system.
 	 */
-	private AnnotationBinding compilerAnnotation = null;
+	protected AnnotationBinding compilerAnnotation = null;
 
 	public static long getRetentionPolicy(char[] policyName) {
 		if (policyName == null || policyName.length == 0)
@@ -99,6 +298,10 @@
 			case 'T' :
 				if (CharOperation.equals(elementName, TypeConstants.TYPE))
 					return TagBits.AnnotationForType;
+				if (CharOperation.equals(elementName, TypeConstants.TYPE_USE_TARGET))
+					return TagBits.AnnotationForTypeUse;
+				if (CharOperation.equals(elementName, TypeConstants.TYPE_PARAMETER_TARGET))
+					return TagBits.AnnotationForTypeParameter;
 				break;
 		}
 		return 0; // unknown
@@ -171,6 +374,12 @@
 			case TypeIds.T_JavaLangOverride :
 				tagBits |= TagBits.AnnotationOverride;
 				break;
+			case TypeIds.T_JavaLangFunctionalInterface :
+				tagBits |= TagBits.AnnotationFunctionalInterface;
+				break;
+			case TypeIds.T_JavaLangAnnotationRepeatable:
+				tagBits |= TagBits.AnnotationRepeatable;
+				break;
 			case TypeIds.T_JavaLangSuppressWarnings :
 				tagBits |= TagBits.AnnotationSuppressWarnings;
 				break;
@@ -205,6 +414,165 @@
 		return tagBits;
 	}
 
+	static String getRetentionName(long tagBits) {
+		if ((tagBits & TagBits.AnnotationRuntimeRetention) == TagBits.AnnotationRuntimeRetention) {
+			// TagBits.AnnotationRuntimeRetention combines both TagBits.AnnotationClassRetention & TagBits.AnnotationSourceRetention
+			return new String(UPPER_RUNTIME);
+		} else if ((tagBits & TagBits.AnnotationSourceRetention) != 0) {
+			return new String(UPPER_SOURCE);
+		} else {
+			return new String(TypeConstants.UPPER_CLASS);
+		}
+	}
+
+	private static long getAnnotationRetention(ReferenceBinding binding) {
+		long retention = binding.getAnnotationTagBits() & TagBits.AnnotationRetentionMASK;
+		// Retention defaults to CLASS
+		return retention != 0 ? retention : TagBits.AnnotationClassRetention;
+	}
+
+	public void checkRepeatableMetaAnnotation(BlockScope scope) {
+		
+		// `this' is the @Repeatable meta annotation, its recipient is the *repeatable* annotation type - we are at the declaration site, not the repeating use site.
+		
+		ReferenceBinding repeatableAnnotationType = (ReferenceBinding) this.recipient; // know it to be an annotation type. On target miss we don't get here
+		
+		MemberValuePair[] valuePairs = this.memberValuePairs();
+		if (valuePairs == null || valuePairs.length != 1)
+			return;
+		
+		Object value = valuePairs[0].compilerElementPair.value;
+		if (!(value instanceof ReferenceBinding))
+			return; // Has deeper problems, will bark elsewhere.
+		ReferenceBinding containerAnnotationType = (ReferenceBinding) value;
+		if (!containerAnnotationType.isAnnotationType())
+			return; // Has deeper problems, will bark elsewhere.
+		
+		repeatableAnnotationType.setContainerAnnotationType(containerAnnotationType); // For now. May be reset later to PRB in case of problems.
+		checkContainerAnnotationType(valuePairs[0], scope, containerAnnotationType, repeatableAnnotationType, false); // false => not use site, i.e declaration site error reporting requested.
+	}
+
+	public static void checkContainerAnnotationType(ASTNode culpritNode, BlockScope scope, ReferenceBinding containerAnnotationType, ReferenceBinding repeatableAnnotationType, boolean useSite) {
+		MethodBinding[] annotationMethods = containerAnnotationType.methods();
+		boolean sawValue = false;
+		for (int i = 0, length = annotationMethods.length; i < length; ++i) {
+			MethodBinding method = annotationMethods[i];
+			if (CharOperation.equals(method.selector, TypeConstants.VALUE)) {
+				sawValue = true;
+				if (method.returnType.isArrayType() && method.returnType.dimensions() == 1) {
+					ArrayBinding array = (ArrayBinding) method.returnType;
+					if (TypeBinding.equalsEquals(array.elementsType(), repeatableAnnotationType)) continue;
+				}
+				repeatableAnnotationType.tagAsHavingDefectiveContainerType();
+				scope.problemReporter().containerAnnotationTypeHasWrongValueType(culpritNode, containerAnnotationType, repeatableAnnotationType, method.returnType);
+			} else {
+				// Not the value() - must have default (or else isn't suitable as container)
+				if ((method.modifiers & ClassFileConstants.AccAnnotationDefault) == 0) {
+					repeatableAnnotationType.tagAsHavingDefectiveContainerType();
+					scope.problemReporter().containerAnnotationTypeHasNonDefaultMembers(culpritNode, containerAnnotationType, method.selector);
+				}
+			}
+		}
+		if (!sawValue) {
+			repeatableAnnotationType.tagAsHavingDefectiveContainerType();
+			scope.problemReporter().containerAnnotationTypeMustHaveValue(culpritNode, containerAnnotationType);
+		}
+
+		if (useSite)
+			checkContainingAnnotationTargetAtUse((Annotation) culpritNode, scope, containerAnnotationType, repeatableAnnotationType);
+		else 
+			checkContainerAnnotationTypeTarget(culpritNode, scope, containerAnnotationType, repeatableAnnotationType);
+		
+		long annotationTypeBits = getAnnotationRetention(repeatableAnnotationType);
+		long containerTypeBits = getAnnotationRetention(containerAnnotationType); 
+		// Due to clever layout of the bits, we can compare the absolute value directly
+		if (containerTypeBits < annotationTypeBits) {
+			repeatableAnnotationType.tagAsHavingDefectiveContainerType();
+			scope.problemReporter().containerAnnotationTypeHasShorterRetention(culpritNode, repeatableAnnotationType, getRetentionName(annotationTypeBits), containerAnnotationType, getRetentionName(containerTypeBits));
+		}
+		
+		if ((repeatableAnnotationType.getAnnotationTagBits() & TagBits.AnnotationDocumented) != 0 && (containerAnnotationType.getAnnotationTagBits() & TagBits.AnnotationDocumented) == 0) {
+			repeatableAnnotationType.tagAsHavingDefectiveContainerType();
+			scope.problemReporter().repeatableAnnotationTypeIsDocumented(culpritNode, repeatableAnnotationType, containerAnnotationType);
+		}
+		
+		if ((repeatableAnnotationType.getAnnotationTagBits() & TagBits.AnnotationInherited) != 0 && (containerAnnotationType.getAnnotationTagBits() & TagBits.AnnotationInherited) == 0) {
+			repeatableAnnotationType.tagAsHavingDefectiveContainerType();
+			scope.problemReporter().repeatableAnnotationTypeIsInherited(culpritNode, repeatableAnnotationType, containerAnnotationType);
+		}
+	}
+	
+	// This is for error reporting for bad targets at annotation type declaration site (as opposed to the repeat site)
+	private static void checkContainerAnnotationTypeTarget(ASTNode culpritNode, Scope scope, ReferenceBinding containerType, ReferenceBinding repeatableAnnotationType) {
+		long tagBits = repeatableAnnotationType.getAnnotationTagBits();
+		if ((tagBits & TagBits.AnnotationTargetMASK) == 0)
+			tagBits = TagBits.SE7AnnotationTargetMASK; // absence of @Target meta-annotation implies all SE7 targets not all targets.
+		
+		long containerAnnotationTypeTypeTagBits = containerType.getAnnotationTagBits();
+		if ((containerAnnotationTypeTypeTagBits & TagBits.AnnotationTargetMASK) == 0)
+			containerAnnotationTypeTypeTagBits = TagBits.SE7AnnotationTargetMASK;
+
+		final long targets = tagBits & TagBits.AnnotationTargetMASK;
+		final long containerAnnotationTypeTargets = containerAnnotationTypeTypeTagBits & TagBits.AnnotationTargetMASK;
+
+		if ((containerAnnotationTypeTargets & ~targets) != 0) {
+			class MissingTargetBuilder {
+				StringBuffer targetBuffer = new StringBuffer();
+				void check(long targetMask, char[] targetName) {
+					if ((containerAnnotationTypeTargets & targetMask & ~targets) != 0) {
+						add(targetName);
+					}
+				}
+				void checkAnnotationType(char[] targetName) {
+					if ((containerAnnotationTypeTargets & TagBits.AnnotationForAnnotationType) != 0 &&
+							((targets & (TagBits.AnnotationForAnnotationType | TagBits.AnnotationForType))) == 0) {
+						add(targetName);
+					}
+				}
+				private void add(char[] targetName) {
+					if (this.targetBuffer.length() != 0) {
+						this.targetBuffer.append(", "); //$NON-NLS-1$
+					}
+					this.targetBuffer.append(targetName);
+				}
+				public String toString() {
+					return this.targetBuffer.toString();
+				}
+				public boolean hasError() {
+					return this.targetBuffer.length() != 0;
+				}
+			}
+			MissingTargetBuilder builder = new MissingTargetBuilder();
+
+			builder.check(TagBits.AnnotationForType, TypeConstants.TYPE);
+			builder.check(TagBits.AnnotationForField, TypeConstants.UPPER_FIELD);
+			builder.check(TagBits.AnnotationForMethod, TypeConstants.UPPER_METHOD);
+			builder.check(TagBits.AnnotationForParameter, TypeConstants.UPPER_PARAMETER);
+			builder.check(TagBits.AnnotationForConstructor, TypeConstants.UPPER_CONSTRUCTOR);
+			builder.check(TagBits.AnnotationForLocalVariable, TypeConstants.UPPER_LOCAL_VARIABLE);
+			builder.checkAnnotationType(TypeConstants.UPPER_ANNOTATION_TYPE);
+			builder.check(TagBits.AnnotationForPackage, TypeConstants.UPPER_PACKAGE);
+			builder.check(TagBits.AnnotationForTypeParameter, TypeConstants.TYPE_PARAMETER_TARGET);
+			builder.check(TagBits.AnnotationForTypeUse, TypeConstants.TYPE_USE_TARGET);
+			if (builder.hasError()) {
+				repeatableAnnotationType.tagAsHavingDefectiveContainerType();
+				scope.problemReporter().repeatableAnnotationTypeTargetMismatch(culpritNode, repeatableAnnotationType, containerType, builder.toString());
+			}
+		}
+	}
+	
+	// This is for error reporting for bad targets at the repeated annotation use site (as opposed to repeatable annotation type declaration site) - Leads to better message.
+	public static void checkContainingAnnotationTargetAtUse(Annotation repeatingAnnotation, BlockScope scope, TypeBinding containerAnnotationType, TypeBinding repeatingAnnotationType) {
+		// check (meta)target compatibility
+		if (!repeatingAnnotationType.isValidBinding()) {
+			// no need to check annotation usage if missing
+			return;
+		}
+		if (! isAnnotationTargetAllowed(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotation.recipient.kind())) {
+			scope.problemReporter().disallowedTargetForContainerAnnotation(repeatingAnnotation, containerAnnotationType);
+		}
+	}
+
 	public AnnotationBinding getCompilerAnnotation() {
 		return this.compilerAnnotation;
 	}
@@ -215,18 +583,71 @@
 			return false;
 		}
 		long metaTagBits = annotationBinding.getAnnotationTagBits(); // could be forward reference
+
+		// we need to filter out only "pure" type use and type parameter annotations, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=392119
+		if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) != 0) {
+			if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) == 0) {  // not a hybrid target. 
+				return false;
+			}
+		}
+
 		if ((metaTagBits & TagBits.AnnotationRetentionMASK) == 0)
 			return true; // by default the retention is CLASS
 
 		return (metaTagBits & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationClassRetention;
 	}
 
+	public boolean isRuntimeTypeInvisible() {
+		final TypeBinding annotationBinding = this.resolvedType;
+		if (annotationBinding == null) {
+			return false;
+		}
+		long metaTagBits = annotationBinding.getAnnotationTagBits(); // could be forward reference
+
+		if ((metaTagBits & (TagBits.AnnotationTargetMASK)) == 0) { // explicit target required for JSR308 style annotations.
+			return false;
+		}
+		if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) == 0) {
+			return false;
+		}
+
+		if ((metaTagBits & TagBits.AnnotationRetentionMASK) == 0)
+			return true; // by default the retention is CLASS
+
+		return (metaTagBits & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationClassRetention;
+	}
+
+	public boolean isRuntimeTypeVisible() {
+		final TypeBinding annotationBinding = this.resolvedType;
+		if (annotationBinding == null) {
+			return false;
+		}
+		long metaTagBits = annotationBinding.getAnnotationTagBits();
+
+		if ((metaTagBits & (TagBits.AnnotationTargetMASK)) == 0) { // explicit target required for JSR308 style annotations.
+			return false;
+		}
+		if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) == 0) {
+			return false;
+		}
+		if ((metaTagBits & TagBits.AnnotationRetentionMASK) == 0)
+			return false; // by default the retention is CLASS
+
+		return (metaTagBits & TagBits.AnnotationRetentionMASK) == TagBits.AnnotationRuntimeRetention;
+	}
+
 	public boolean isRuntimeVisible() {
 		final TypeBinding annotationBinding = this.resolvedType;
 		if (annotationBinding == null) {
 			return false;
 		}
 		long metaTagBits = annotationBinding.getAnnotationTagBits();
+		// we need to filter out only "pure" type use and type parameter annotations, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=392119
+		if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) != 0) {
+			if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) == 0) { // not a hybrid target.
+				return false;
+			}
+		}
 		if ((metaTagBits & TagBits.AnnotationRetentionMASK) == 0)
 			return false; // by default the retention is CLASS
 
@@ -283,7 +704,6 @@
 				break pairLoop;
 			}
 		}
-
 		if (isSuppressingWarnings && suppressWarningIrritants != null) {
 			scope.referenceCompilationUnit().recordSuppressWarnings(suppressWarningIrritants, this, startSuppresss, endSuppress);
 		}
@@ -355,16 +775,19 @@
 					}
 				}
 			}
-			if (!foundValue &&
-					(method.modifiers & ClassFileConstants.AccAnnotationDefault) == 0 &&
-					(this.bits & IsRecovered) == 0) {
+			if (!foundValue
+					&& (method.modifiers & ClassFileConstants.AccAnnotationDefault) == 0
+					&& (this.bits & IsRecovered) == 0
+					&& annotationType.isValidBinding()) {
 				scope.problemReporter().missingValueForAnnotationMember(this, selector);
 			}
 		}
 		// check unused pairs
 		for (int i = 0; i < pairsLength; i++) {
 			if (pairs[i] != null) {
-				scope.problemReporter().undefinedAnnotationValue(annotationType, pairs[i]);
+				if (annotationType.isValidBinding()) {
+					scope.problemReporter().undefinedAnnotationValue(annotationType, pairs[i]);
+				}
 				pairs[i].resolveTypeExpecting(scope, null); // resilient
 			}
 		}
@@ -376,16 +799,18 @@
 		// record annotation positions in the compilation result
 		scope.referenceCompilationUnit().recordSuppressWarnings(IrritantSet.NLS, null, this.sourceStart, this.declarationSourceEnd);
 		if (this.recipient != null) {
+			int kind = this.recipient.kind();
 			if (tagBits != 0) {
 				// tag bits onto recipient
-				switch (this.recipient.kind()) {
+				switch (kind) {
 					case Binding.PACKAGE :
 						((PackageBinding)this.recipient).tagBits |= tagBits;
 						break;
 					case Binding.TYPE :
 					case Binding.GENERIC_TYPE :
 						SourceTypeBinding sourceType = (SourceTypeBinding) this.recipient;
-						sourceType.tagBits |= tagBits;
+						if ((tagBits & TagBits.AnnotationRepeatable) == 0 || sourceType.isAnnotationType()) // don't set AnnotationRepeatable on non-annotation types.
+							sourceType.tagBits |= tagBits;
 						if ((tagBits & TagBits.AnnotationSuppressWarnings) != 0) {
 							TypeDeclaration typeDeclaration =  sourceType.scope.referenceContext;
 							int start;
@@ -410,9 +835,16 @@
 							AbstractMethodDeclaration methodDeclaration = sourceType.scope.referenceContext.declarationOf(sourceMethod);
 							recordSuppressWarnings(scope, methodDeclaration.declarationSourceStart, methodDeclaration.declarationSourceEnd, scope.compilerOptions().suppressWarnings);
 						}
-						if ((sourceMethod.tagBits & TAGBITS_NULLABLE_OR_NONNULL) == TAGBITS_NULLABLE_OR_NONNULL) {
+						long nullBits = sourceMethod.tagBits & TagBits.AnnotationNullMASK;
+						if (nullBits == TagBits.AnnotationNullMASK) {
 							scope.problemReporter().contradictoryNullAnnotations(this);
-							sourceMethod.tagBits &= ~TAGBITS_NULLABLE_OR_NONNULL; // avoid secondary problems
+							sourceMethod.tagBits &= ~TagBits.AnnotationNullMASK; // avoid secondary problems
+						}
+						if (nullBits != 0 && sourceMethod.isConstructor()) {
+							if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8)
+								scope.problemReporter().nullAnnotationUnsupportedLocation(this);
+							// for declaration annotations the inapplicability will be reported below
+							sourceMethod.tagBits &= ~TagBits.AnnotationNullMASK;
 						}
 						break;
 //{ObjectTeams: method mappings
@@ -434,85 +866,234 @@
 							FieldDeclaration fieldDeclaration = sourceType.scope.referenceContext.declarationOf(sourceField);
 							recordSuppressWarnings(scope, fieldDeclaration.declarationSourceStart, fieldDeclaration.declarationSourceEnd, scope.compilerOptions().suppressWarnings);
 						}
-						if ((sourceField.tagBits & TAGBITS_NULLABLE_OR_NONNULL) == TAGBITS_NULLABLE_OR_NONNULL) {
+						// fields don't yet have their type resolved, in 1.8 null annotations
+						// will be transfered from the field to its type during STB.resolveTypeFor().
+						if ((sourceField.tagBits & TagBits.AnnotationNullMASK) == TagBits.AnnotationNullMASK) {
 							scope.problemReporter().contradictoryNullAnnotations(this);
-							sourceField.tagBits &= ~TAGBITS_NULLABLE_OR_NONNULL; // avoid secondary problems
+							sourceField.tagBits &= ~TagBits.AnnotationNullMASK; // avoid secondary problems
 						}
 						break;
 					case Binding.LOCAL :
 						LocalVariableBinding variable = (LocalVariableBinding) this.recipient;
 						variable.tagBits |= tagBits;
+						if ((variable.tagBits & TagBits.AnnotationNullMASK) == TagBits.AnnotationNullMASK) {
+							scope.problemReporter().contradictoryNullAnnotations(this);
+							variable.tagBits &= ~TagBits.AnnotationNullMASK; // avoid secondary problems
+						}
 						if ((tagBits & TagBits.AnnotationSuppressWarnings) != 0) {
-							 LocalDeclaration localDeclaration = variable.declaration;
+							LocalDeclaration localDeclaration = variable.declaration;
 							recordSuppressWarnings(scope, localDeclaration.declarationSourceStart, localDeclaration.declarationSourceEnd, scope.compilerOptions().suppressWarnings);
 						}
-						if ((variable.tagBits & TAGBITS_NULLABLE_OR_NONNULL) == TAGBITS_NULLABLE_OR_NONNULL) {
-							scope.problemReporter().contradictoryNullAnnotations(this);
-							variable.tagBits &= ~TAGBITS_NULLABLE_OR_NONNULL; // avoid secondary problems
-						}
 						break;
 				}
 			}
-			// check (meta)target compatibility
-			checkTargetCompatibility: {
-				long metaTagBits = annotationType.getAnnotationTagBits(); // could be forward reference
-				if ((metaTagBits & TagBits.AnnotationTargetMASK) == 0) // does not specify any target restriction
-					break checkTargetCompatibility;
-
-				switch (this.recipient.kind()) {
-					case Binding.PACKAGE :
-						if ((metaTagBits & TagBits.AnnotationForPackage) != 0)
-							break checkTargetCompatibility;
-						break;
-					case Binding.TYPE :
-					case Binding.GENERIC_TYPE :
-						if (((ReferenceBinding)this.recipient).isAnnotationType()) {
-							if ((metaTagBits & (TagBits.AnnotationForAnnotationType|TagBits.AnnotationForType)) != 0)
-							break checkTargetCompatibility;
-						} else if ((metaTagBits & TagBits.AnnotationForType) != 0) {
-							break checkTargetCompatibility;
-						} else if ((metaTagBits & TagBits.AnnotationForPackage) != 0) {
-							if (CharOperation.equals(((ReferenceBinding)this.recipient).sourceName, TypeConstants.PACKAGE_INFO_NAME))
-								break checkTargetCompatibility;
-						}
-//{ObjectTeams: allow @Override for roles:
-						if (   (((ReferenceBinding)this.recipient).isRole())
-							&& (tagBits & TagBits.AnnotationOverride) != 0)
-							break checkTargetCompatibility;
-// SH}
-						break;
-					case Binding.METHOD :
-						if (((MethodBinding)this.recipient).isConstructor()) {
-							if ((metaTagBits & TagBits.AnnotationForConstructor) != 0)
-								break checkTargetCompatibility;
-						} else 	if ((metaTagBits & TagBits.AnnotationForMethod) != 0)
-							break checkTargetCompatibility;
-						break;
-//{ObjectTeams: method mappings
-					// TODO(SH): should annotations for method mappings be controlled separately?
-					case Binding.BINDING :
-						if ((metaTagBits & TagBits.AnnotationForMethod) != 0)
-							break checkTargetCompatibility;
-						break;
-// SH}
-					case Binding.FIELD :
-						if ((metaTagBits & TagBits.AnnotationForField) != 0)
-							break checkTargetCompatibility;
-						break;
-					case Binding.LOCAL :
-						if ((((LocalVariableBinding)this.recipient).tagBits & TagBits.IsArgument) != 0) {
-							if ((metaTagBits & TagBits.AnnotationForParameter) != 0)
-								break checkTargetCompatibility;
-						} else 	if ((annotationType.tagBits & TagBits.AnnotationForLocalVariable) != 0)
-							break checkTargetCompatibility;
-						break;
-				}
-				scope.problemReporter().disallowedTargetForAnnotation(this);
-			}
+			checkAnnotationTarget(this, scope, annotationType, kind);
 		}
 		return this.resolvedType;
 	}
 
+	static boolean isAnnotationTargetAllowed(Annotation annotation, BlockScope scope, TypeBinding annotationType, int kind) {
+		long metaTagBits = annotationType.getAnnotationTagBits(); // could be forward reference
+		if ((metaTagBits & TagBits.AnnotationTargetMASK) == 0) {
+			// does not specify any target restriction - all locations supported in Java 7 and before are possible
+			if (kind == Binding.TYPE_PARAMETER || kind == Binding.TYPE_USE) {
+				scope.problemReporter().explitAnnotationTargetRequired(annotation);
+			}
+			return true;
+		}
+
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391201
+		if ((metaTagBits & TagBits.SE7AnnotationTargetMASK) == 0
+				&& (metaTagBits & (TagBits.AnnotationForTypeUse | TagBits.AnnotationForTypeParameter)) != 0) {
+			if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8) {
+				switch (kind) {
+					case Binding.PACKAGE :
+					case Binding.TYPE :
+					case Binding.GENERIC_TYPE :
+					case Binding.METHOD :
+					case Binding.FIELD :
+					case Binding.LOCAL :
+						scope.problemReporter().invalidUsageOfTypeAnnotations(annotation);
+				}
+			}
+		}
+		switch (kind) {
+			case Binding.PACKAGE :
+				if ((metaTagBits & TagBits.AnnotationForPackage) != 0)
+					return true;
+				break;
+			case Binding.TYPE_USE :
+				if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) {
+					// jsr 308
+					return true;
+				}
+				break;
+			case Binding.TYPE :
+			case Binding.GENERIC_TYPE :
+				if (((ReferenceBinding)annotation.recipient).isAnnotationType()) {
+					if ((metaTagBits & (TagBits.AnnotationForAnnotationType | TagBits.AnnotationForType)) != 0)
+					return true;
+				} else if ((metaTagBits & (TagBits.AnnotationForType | TagBits.AnnotationForTypeUse)) != 0) {
+					return true;
+				} else if ((metaTagBits & TagBits.AnnotationForPackage) != 0) {
+					if (CharOperation.equals(((ReferenceBinding) annotation.recipient).sourceName, TypeConstants.PACKAGE_INFO_NAME))
+						return true;
+				}
+//{ObjectTeams: allow @Override for roles:
+				if (   (((ReferenceBinding)annotation.recipient).isRole())
+					&& (annotation.resolvedType.id == TypeIds.T_JavaLangOverride))
+					return true;
+//SH}
+				break;
+//{ObjectTeams: method mappings
+			// TODO(SH): should annotations for method mappings be controlled separately?
+			case Binding.BINDING :
+				if ((metaTagBits & TagBits.AnnotationForMethod) != 0)
+					return true;
+				break;
+//SH}
+			case Binding.METHOD :
+				MethodBinding methodBinding = (MethodBinding) annotation.recipient;
+				if (methodBinding.isConstructor()) {
+					if ((metaTagBits & (TagBits.AnnotationForConstructor | TagBits.AnnotationForTypeUse)) != 0)
+						return true;
+				} else if ((metaTagBits & TagBits.AnnotationForMethod) != 0) {
+					return true;
+				} else if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) {
+					SourceTypeBinding sourceType = (SourceTypeBinding) methodBinding.declaringClass;
+					MethodDeclaration methodDecl = (MethodDeclaration) sourceType.scope.referenceContext.declarationOf(methodBinding);
+					if (isTypeUseCompatible(methodDecl.returnType, scope)) {
+						return true;
+					}
+				}
+				break;
+			case Binding.FIELD :
+				if ((metaTagBits & TagBits.AnnotationForField) != 0) {
+					return true;
+				} else if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) {
+					FieldBinding sourceField = (FieldBinding) annotation.recipient;
+					SourceTypeBinding sourceType = (SourceTypeBinding) sourceField.declaringClass;
+					FieldDeclaration fieldDeclaration = sourceType.scope.referenceContext.declarationOf(sourceField);
+					if (isTypeUseCompatible(fieldDeclaration.type, scope)) {
+						return true;
+					}
+				}
+				break;
+			case Binding.LOCAL :
+				LocalVariableBinding localVariableBinding = (LocalVariableBinding) annotation.recipient;
+				if ((localVariableBinding.tagBits & TagBits.IsArgument) != 0) {
+					if ((metaTagBits & TagBits.AnnotationForParameter) != 0) {
+						return true;
+					} else if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) {
+						if (isTypeUseCompatible(localVariableBinding.declaration.type, scope)) {
+							return true;
+						}
+					}
+				} else if ((annotationType.tagBits & TagBits.AnnotationForLocalVariable) != 0) {
+					return true;
+				} else if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0) {
+					if (isTypeUseCompatible(localVariableBinding.declaration.type, scope)) {
+						return true;
+					}
+				}
+				break;
+			case Binding.TYPE_PARAMETER : // jsr308
+				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391196
+				if ((metaTagBits & (TagBits.AnnotationForTypeParameter | TagBits.AnnotationForTypeUse)) != 0) {
+					return true;
+				}
+		}
+		return false;
+	}
+
+	static void checkAnnotationTarget(Annotation annotation, BlockScope scope, ReferenceBinding annotationType, int kind) {
+		// check (meta)target compatibility
+		if (!annotationType.isValidBinding()) {
+			// no need to check annotation usage if missing
+			return;
+		}
+		if (! isAnnotationTargetAllowed(annotation, scope, annotationType, kind)) {
+			scope.problemReporter().disallowedTargetForAnnotation(annotation);
+		}
+	}
+
+	/**
+	 * Check to see if a repeating annotation is in fact of a container annotation type for an annotation which is also present at the same target.
+	 * @param scope The scope (for error reporting)
+	 * @param repeatedAnnotationType Type of annotation which has been repeated (to check for possibly being a container for a repeatable annotation)
+	 * @param sourceAnnotations The annotations to check
+	 */
+	public static void checkForInstancesOfRepeatableWithRepeatingContainerAnnotation(BlockScope scope, ReferenceBinding repeatedAnnotationType, Annotation[] sourceAnnotations) {
+		// Fail fast if the repeating annotation type can't be a container, anyway
+		MethodBinding[] valueMethods = repeatedAnnotationType.getMethods(TypeConstants.VALUE);
+		if (valueMethods.length != 1) return; // No violations possible
+		
+		TypeBinding methodReturnType = valueMethods[0].returnType;
+		// value must be an array 
+		if (! methodReturnType.isArrayType() || methodReturnType.dimensions() != 1) return;
+		
+		ArrayBinding array = (ArrayBinding) methodReturnType;
+		TypeBinding elementsType = array.elementsType();
+		if (! elementsType.isRepeatableAnnotationType()) return; // Can't be a problem, then
+		
+		for (int i= 0; i < sourceAnnotations.length; ++i) {
+			Annotation annotation = sourceAnnotations[i];
+			if (TypeBinding.equalsEquals(elementsType, annotation.resolvedType)) {
+				scope.problemReporter().repeatableAnnotationWithRepeatingContainer(annotation, repeatedAnnotationType);
+				return; // One is enough for this annotation type
+			}
+		}
+	}
+
+	// Check and answer if an attempt to annotate a package is being made. Error should be reported by caller.
+	public static boolean isTypeUseCompatible(TypeReference reference, Scope scope) {
+		if (reference != null && !(reference instanceof SingleTypeReference)) {
+			Binding binding = scope.getPackage(reference.getTypeName());
+			// In case of ProblemReferenceBinding, don't report additional error
+			if (binding instanceof PackageBinding) {
+				return false;
+			}
+		}
+		return true;
+	}
+	
+	// Complain if an attempt to annotate the enclosing type of a static member type is being made.
+	public static void isTypeUseCompatible(TypeReference reference, Scope scope, Annotation[] annotations) {
+		if (annotations == null || reference == null || reference.getAnnotatableLevels() == 1)
+			return;
+		if (scope.environment().globalOptions.sourceLevel < ClassFileConstants.JDK1_8)
+			return;
+
+		TypeBinding resolvedType = reference.resolvedType == null ? null : reference.resolvedType.leafComponentType();
+		if (resolvedType == null || !resolvedType.isNestedType())
+			return;
+
+		nextAnnotation:
+			for (int i = 0, annotationsLength = annotations.length; i < annotationsLength; i++) {
+				Annotation annotation = annotations[i];
+				long metaTagBits = annotation.resolvedType.getAnnotationTagBits();
+				if ((metaTagBits & TagBits.AnnotationForTypeUse) != 0 && (metaTagBits & TagBits.SE7AnnotationTargetMASK) == 0) {
+					ReferenceBinding currentType = (ReferenceBinding) resolvedType;
+					while (currentType.isNestedType()) {
+						if (currentType.isStatic()) {
+							QualifiedTypeReference.rejectAnnotationsOnStaticMemberQualififer(scope, currentType, new Annotation [] { annotation });
+							continue nextAnnotation;
+						}
+						currentType = currentType.enclosingType();
+					}
+				}
+			}
+	}
+
 	public abstract void traverse(ASTVisitor visitor, BlockScope scope);
 
+	public abstract void traverse(ASTVisitor visitor, ClassScope scope);
+
+	public Annotation getPersistibleAnnotation() {
+		return this.persistibleAnnotation;      // will be this for non-repeating annotation, the container for the first of the repeating ones and null for the followers.
+	}
+	
+	public void setPersistibleAnnotation(ContainerAnnotation container) {
+		this.persistibleAnnotation = container; // will be a legitimate container for the first of the repeating ones and null for the followers.
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
index 8860ec6..69840bb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -55,7 +59,10 @@
 
 		printIndent(tab, output);
 		printModifiers(this.modifiers, output);
-		if (this.annotations != null) printAnnotations(this.annotations, output);
+		if (this.annotations != null) {
+			printAnnotations(this.annotations, output);
+			output.append(' ');
+		}
 
 		TypeParameter[] typeParams = typeParameters();
 		if (typeParams != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
index f00b176..9301e71 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -12,6 +16,9 @@
  *     Stephan Herrmann - Contributions for
  *								bug 186342 - [compiler][null] Using annotations for null checking
  *								bug 365519 - editorial cleanup after bug 186342 and bug 365387
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 409246 - [1.8][compiler] Type annotations on catch parameters not handled properly
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -41,9 +48,24 @@
 		this.declarationSourceEnd = (int) posNom;
 		this.modifiers = modifiers;
 		this.type = tr;
+		if (tr != null) {
+			this.bits |= (tr.bits & ASTNode.HasTypeAnnotations);
+		}
 		this.bits |= (IsLocalDeclarationReachable | IsArgument);
 	}
 
+	public Argument(char[] name, long posNom, TypeReference tr, int modifiers, boolean typeElided) {
+
+		super(name, (int) (posNom >>> 32), (int) posNom);
+		this.declarationSourceEnd = (int) posNom;
+		this.modifiers = modifiers;
+		this.type = tr;
+		if (tr != null) {
+			this.bits |= (tr.bits & ASTNode.HasTypeAnnotations);
+		}
+		this.bits |= (IsLocalDeclarationReachable | IsArgument | IsTypeElided);
+	}
+
 //{ObjectTeams: consistent updating of name
 	public void updateName(char[] newName) {
 		this.name = newName;
@@ -52,10 +74,10 @@
 	}
 // SH}
 
-	public void createBinding(MethodScope scope, TypeBinding typeBinding) {
+	public TypeBinding createBinding(MethodScope scope, TypeBinding typeBinding) {
 		if (this.binding == null) {
 			// for default constructors and fake implementation of abstract methods 
-			this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, true /*isArgument*/);
+			this.binding = new LocalVariableBinding(this, typeBinding, this.modifiers, scope);
 //{ObjectTeams: NPE occurred in Java5.testA119_nestedValueParameter8() ff.
 /* orig:
 //	    When we are called from RoleTypeCreator.resolveTypeAnchoredToArgument(AbstractMethodDeclaration, int)
@@ -72,12 +94,19 @@
 				}
 			}
 		}
-		resolveAnnotations(scope, this.annotations, this.binding);
+		if ((this.binding.tagBits & TagBits.AnnotationResolved) == 0) {
+			resolveAnnotations(scope, this.annotations, this.binding, true);
+			if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
+				Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
+				scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
+			}
+		}
 		this.binding.declaration = this;
+		return this.binding.type; // might have been updated during resolveAnnotations (for typeAnnotations)
 	}
 
-	public void bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
-		createBinding(scope, typeBinding); // basically a no-op if createBinding() was called before
+	public TypeBinding bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
+		TypeBinding newTypeBinding = createBinding(scope, typeBinding); // basically a no-op if createBinding() was called before
 
 		// record the resolved type into the type reference
 //{ObjectTeams:
@@ -86,7 +115,7 @@
 		// SourceTypeBinding.resolveTypesFor already sets the binding,
 		// without entering it into the method scope.
 		if ((this.bits & ASTNode.HasBeenResolved) != 0)
-			return;
+			return this.binding.type;
 		this.bits |= ASTNode.HasBeenResolved;
 
 //		// lifting type needs some further analysis now:
@@ -96,7 +125,10 @@
 
 		Binding existingVariable = scope.getBinding(this.name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
 		if (existingVariable != null && existingVariable.isValidBinding()){
-			if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
+			final boolean localExists = existingVariable instanceof LocalVariableBinding;
+			if (localExists && (this.bits & ASTNode.ShadowsOuterLocal) != 0 && scope.isLambdaSubscope()) {
+				scope.problemReporter().lambdaRedeclaresArgument(this);
+			} else if (localExists && this.hiddenVariableDepth == 0) {
 				scope.problemReporter().redefineArgument(this);
 			} else {
 				boolean isSpecialArgument = false;
@@ -119,6 +151,7 @@
 		}
 		scope.addLocalVariable(this.binding);
 		this.binding.useFlag = used ? LocalVariableBinding.USED : LocalVariableBinding.UNUSED;
+		return newTypeBinding;
 	}
 
 	/**
@@ -128,15 +161,26 @@
 		return (this.bits & ASTNode.IsArgument) != 0 ? PARAMETER : LOCAL_VARIABLE;
 	}
 
+	public boolean isArgument() {
+		return true;
+	}
+
 	public boolean isVarArgs() {
 		return this.type != null &&  (this.type.bits & IsVarArgs) != 0;
 	}
+	
+	public boolean hasElidedType() {
+		return (this.bits & IsTypeElided) != 0;
+	}
 
 	public StringBuffer print(int indent, StringBuffer output) {
 
 		printIndent(indent, output);
 		printModifiers(this.modifiers, output);
-		if (this.annotations != null) printAnnotations(this.annotations, output);
+		if (this.annotations != null) {
+			printAnnotations(this.annotations, output);
+			output.append(' ');
+		}
 
 		if (this.type == null) {
 			output.append("<no type> "); //$NON-NLS-1$
@@ -197,7 +241,8 @@
 		} else {
 			this.binding = new CatchParameterBinding(this, exceptionType, this.modifiers, false); // argument decl, but local var  (where isArgument = false)
 		}
-		resolveAnnotations(scope, this.annotations, this.binding);
+		resolveAnnotations(scope, this.annotations, this.binding, true);
+		Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
 
 		scope.addLocalVariable(this.binding);
 		this.binding.setConstant(Constant.NotAConstant);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java
index d71c242..55b07c3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java
@@ -4,8 +4,11 @@
  * 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
- * $Id: ArrayAllocationExpression.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -14,11 +17,18 @@
  *								bug 319201 - [null] no warning when unboxing SingleNameReference causes NPE
  *								bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *								Bug 417758 - [1.8][null] Null safety compromise during array creation.
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.List;
+
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.impl.*;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference.AnnotationCollector;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
 import org.eclipse.jdt.internal.compiler.lookup.*;
@@ -38,6 +48,7 @@
 	//dimensions.length gives the number of dimensions, but the
 	// last ones may be nulled as in new int[4][5][][]
 	public Expression[] dimensions;
+	public Annotation [][] annotationsOnDimensions; // jsr308 style annotations.
 	public ArrayInitializer initializer;
 
 	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
@@ -64,7 +75,7 @@
 		int pc = codeStream.position;
 
 		if (this.initializer != null) {
-			this.initializer.generateCode(currentScope, codeStream, valueRequired);
+			this.initializer.generateCode(this.type, this, currentScope, codeStream, valueRequired);
 			return;
 		}
 
@@ -79,10 +90,10 @@
 		// array allocation
 		if (explicitDimCount == 1) {
 			// Mono-dimensional array
-			codeStream.newArray((ArrayBinding)this.resolvedType);
+			codeStream.newArray(this.type, this, (ArrayBinding)this.resolvedType);
 		} else {
 			// Multi-dimensional array
-			codeStream.multianewarray(this.resolvedType, explicitDimCount);
+			codeStream.multianewarray(this.type, this.resolvedType, explicitDimCount, this);
 		}
 		if (valueRequired) {
 			codeStream.generateImplicitConversion(this.implicitConversion);
@@ -97,6 +108,11 @@
 		output.append("new "); //$NON-NLS-1$
 		this.type.print(0, output);
 		for (int i = 0; i < this.dimensions.length; i++) {
+			if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[i] != null) {
+				output.append(' ');
+				printAnnotations(this.annotationsOnDimensions[i], output);
+				output.append(' ');
+			}
 			if (this.dimensions[i] == null)
 				output.append("[]"); //$NON-NLS-1$
 			else {
@@ -171,6 +187,10 @@
 // SH}
 			this.resolvedType = scope.createArrayType(referenceType, this.dimensions.length);
 
+			if (this.annotationsOnDimensions != null) {
+				this.resolvedType = resolveAnnotations(scope, this.annotationsOnDimensions, this.resolvedType);
+			}
+
 			// check the initializer
 			if (this.initializer != null) {
 				if ((this.initializer.resolveTypeExpecting(scope, this.resolvedType)) != null)
@@ -189,6 +209,11 @@
 			int dimensionsLength = this.dimensions.length;
 			this.type.traverse(visitor, scope);
 			for (int i = 0; i < dimensionsLength; i++) {
+				Annotation [] annotations = this.annotationsOnDimensions == null ? null : this.annotationsOnDimensions[i];
+				int annotationsLength = annotations == null ? 0 : annotations.length;
+				for (int j = 0; j < annotationsLength; j++) {
+					annotations[j].traverse(visitor, scope);
+				}
 				if (this.dimensions[i] != null)
 					this.dimensions[i].traverse(visitor, scope);
 			}
@@ -197,4 +222,23 @@
 		}
 		visitor.endVisit(this, scope);
 	}
+
+	public void getAllAnnotationContexts(int targetType, int info, List allTypeAnnotationContexts) {
+		AnnotationCollector collector = new AnnotationCollector(this, targetType, info, allTypeAnnotationContexts);
+		this.type.traverse(collector, (BlockScope) null);
+		if (this.annotationsOnDimensions != null)  {
+			int dimensionsLength = this.dimensions.length;
+			for (int i = 0; i < dimensionsLength; i++) {
+				Annotation [] annotations = this.annotationsOnDimensions[i];
+				int annotationsLength = annotations == null ? 0 : annotations.length;
+				for (int j = 0; j < annotationsLength; j++) {
+					annotations[j].traverse(collector, (BlockScope) null);
+				}
+			}
+		}
+	}
+
+	public Annotation[][] getAnnotationsOnDimensions() {
+		return this.annotationsOnDimensions;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
index f35b7b1..0da505f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
@@ -1,22 +1,31 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for 
  *								bug 368546 - [compiler][resource] Avoid remaining false positives found when compiling the Eclipse SDK
  *								bug 370639 - [compiler][resource] restore the default for resource leak warnings
  *								bug 388996 - [compiler][resource] Incorrect 'potential resource leak'
+ *								Bug 417758 - [1.8][null] Null safety compromise during array creation.
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 
@@ -36,28 +45,38 @@
 	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
 
 		if (this.expressions != null) {
-			boolean analyseResources = currentScope.compilerOptions().analyseResourceLeaks;
+			CompilerOptions compilerOptions = currentScope.compilerOptions();
+			boolean analyseResources = compilerOptions.analyseResourceLeaks;
+			boolean evalNullTypeAnnotations = compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8 
+												&& compilerOptions.isAnnotationBasedNullAnalysisEnabled;
 			for (int i = 0, max = this.expressions.length; i < max; i++) {
 				flowInfo = this.expressions[i].analyseCode(currentScope, flowContext, flowInfo).unconditionalInits();
 
 				if (analyseResources && FakedTrackingVariable.isAnyCloseable(this.expressions[i].resolvedType)) {
 					flowInfo = FakedTrackingVariable.markPassedToOutside(currentScope, this.expressions[i], flowInfo, flowContext, false);
 				}
+				if (evalNullTypeAnnotations) {
+					checkAgainstNullTypeAnnotation(currentScope, this.binding.elementsType(), this.expressions[i], flowContext, flowInfo);
+				}
 			}
 		}
 		return flowInfo;
 	}
 
+	public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+		generateCode(null, null, currentScope, codeStream, valueRequired);
+	}
+	
 	/**
 	 * Code generation for a array initializer
 	 */
-	public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+	public void generateCode(TypeReference typeReference, ArrayAllocationExpression allocationExpression, BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
 
 		// Flatten the values and compute the dimensions, by iterating in depth into nested array initializers
 		int pc = codeStream.position;
 		int expressionLength = (this.expressions == null) ? 0: this.expressions.length;
 		codeStream.generateInlinedValue(expressionLength);
-		codeStream.newArray(this.binding);
+		codeStream.newArray(typeReference, allocationExpression, this.binding);
 		if (this.expressions != null) {
 			// binding is an ArrayType, so I can just deal with the dimension
 			int elementsTypeID = this.binding.dimensions > 1 ? -1 : this.binding.leafComponentType.id;
@@ -162,6 +181,7 @@
 			TypeBinding elementType = this.binding.elementsType();
 			for (int i = 0, length = this.expressions.length; i < length; i++) {
 				Expression expression = this.expressions[i];
+				expression.setExpressionContext(ASSIGNMENT_CONTEXT);
 				expression.setExpectedType(elementType);
 				TypeBinding expressionType = expression instanceof ArrayInitializer
 						? expression.resolveTypeExpecting(scope, elementType)
@@ -170,7 +190,7 @@
 					continue;
 
 				// Compile-time conversion required?
-				if (elementType != expressionType) // must call before computeConversion() and typeMismatchError()
+				if (TypeBinding.notEquals(elementType, expressionType)) // must call before computeConversion() and typeMismatchError()
 					scope.compilationUnitScope().recordTypeConversion(elementType, expressionType);
 
 				if (expression.isConstantValueOfTypeAssignableToType(expressionType, elementType) 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
index 1cb1fe2..b13244d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -18,17 +22,44 @@
 
 public class ArrayQualifiedTypeReference extends QualifiedTypeReference {
 	int dimensions;
+	private Annotation[][] annotationsOnDimensions;  // jsr308 style type annotations on dimensions
+	public int extendedDimensions;
 
 	public ArrayQualifiedTypeReference(char[][] sources , int dim, long[] poss) {
 
 		super( sources , poss);
 		this.dimensions = dim ;
+		this.annotationsOnDimensions = null; 
+	}
+
+	public ArrayQualifiedTypeReference(char[][] sources, int dim, Annotation[][] annotationsOnDimensions, long[] poss) {
+		this(sources, dim, poss);
+		this.annotationsOnDimensions = annotationsOnDimensions;
+		if (annotationsOnDimensions != null)
+			this.bits |= ASTNode.HasTypeAnnotations;
 	}
 
 	public int dimensions() {
 
 		return this.dimensions;
 	}
+	
+	/**
+	 @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getAnnotationsOnDimensions(boolean)
+	*/
+	public Annotation[][] getAnnotationsOnDimensions(boolean useSourceOrder) {
+		if (useSourceOrder || this.annotationsOnDimensions == null || this.annotationsOnDimensions.length == 0 || this.extendedDimensions == 0 || this.extendedDimensions == this.dimensions)
+			return this.annotationsOnDimensions;
+		Annotation [][] externalAnnotations = new Annotation[this.dimensions][];
+		final int baseDimensions = this.dimensions - this.extendedDimensions;
+		System.arraycopy(this.annotationsOnDimensions, baseDimensions, externalAnnotations, 0, this.extendedDimensions);
+		System.arraycopy(this.annotationsOnDimensions, 0, externalAnnotations, this.extendedDimensions, baseDimensions);
+		return externalAnnotations;
+	}
+	
+	public void setAnnotationsOnDimensions(Annotation [][] annotationsOnDimensions) {
+		this.annotationsOnDimensions = annotationsOnDimensions;
+	}
 
 	/**
 	 * @return char[][]
@@ -71,16 +102,36 @@
 		}
 	}
 
+	protected TypeBinding internalResolveType(Scope scope) {
+		TypeBinding internalResolveType = super.internalResolveType(scope);
+		return internalResolveType;
+	}
+
 	public StringBuffer printExpression(int indent, StringBuffer output){
 
 		super.printExpression(indent, output);
 		if ((this.bits & IsVarArgs) != 0) {
 			for (int i= 0 ; i < this.dimensions - 1; i++) {
+				if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[i] != null) {
+					output.append(' ');
+					printAnnotations(this.annotationsOnDimensions[i], output);
+					output.append(' ');
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
+			if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[this.dimensions - 1] != null) {
+				output.append(' ');
+				printAnnotations(this.annotationsOnDimensions[this.dimensions - 1], output);
+				output.append(' ');
+			}
 			output.append("..."); //$NON-NLS-1$
 		} else {
 			for (int i= 0 ; i < this.dimensions; i++) {
+				if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[i] != null) {
+					output.append(" "); //$NON-NLS-1$
+					printAnnotations(this.annotationsOnDimensions[i], output);
+					output.append(" "); //$NON-NLS-1$
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
 		}
@@ -88,14 +139,48 @@
 	}
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
-
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
+			}
+			if (this.annotationsOnDimensions != null) {
+				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = this.annotationsOnDimensions[i];
+					for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) {
+						Annotation annotation = annotations2[j];
+						annotation.traverse(visitor, scope);
+					}
+				}
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
-
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
+			}
+			if (this.annotationsOnDimensions != null) {
+				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = this.annotationsOnDimensions[i];
+					for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) {
+						Annotation annotation = annotations2[j];
+						annotation.traverse(visitor, scope);
+					}
+				}
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java
index 0f80187..4c896b1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java
@@ -5,10 +5,15 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
  *******************************************************************************/
@@ -21,6 +26,7 @@
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 
@@ -42,12 +48,19 @@
 	if (assignment.expression == null) {
 		return analyseCode(currentScope, flowContext, flowInfo);
 	}
-	return assignment
+	flowInfo = assignment
 		.expression
 		.analyseCode(
 			currentScope,
 			flowContext,
 			analyseCode(currentScope, flowContext, flowInfo).unconditionalInits());
+	if ((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) {
+		int nullStatus = assignment.expression.nullStatus(flowInfo, flowContext);
+		if (nullStatus != FlowInfo.NON_NULL) {
+			currentScope.problemReporter().nullityMismatch(this, assignment.expression.resolvedType, this.resolvedType, nullStatus, currentScope.environment().getNonNullAnnotationName());
+		}
+	}
+	return flowInfo;
 }
 
 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
@@ -60,6 +73,15 @@
 	return flowInfo;
 }
 
+public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) {
+	if ((this.resolvedType.tagBits & TagBits.AnnotationNullable) != 0) {
+		scope.problemReporter().arrayReferencePotentialNullReference(this);
+		return true;
+	} else {
+		return super.checkNPE(scope, flowContext, flowInfo);
+	}
+}
+
 public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
 	int pc = codeStream.position;
 	this.receiver.generateCode(currentScope, codeStream, true);
@@ -170,10 +192,6 @@
 	codeStream.arrayAtPut(this.resolvedType.id, false);
 }
 
-public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
-	return FlowInfo.UNKNOWN;
-}
-
 public StringBuffer printExpression(int indent, StringBuffer output) {
 	this.receiver.printExpression(0, output).append('[');
 	return this.position.printExpression(0, output).append(']');
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
index fa6c8d5..011600f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -19,7 +23,9 @@
 
 public class ArrayTypeReference extends SingleTypeReference {
 	public int dimensions;
+	private Annotation[][] annotationsOnDimensions; // jsr308 style type annotations on dimensions.
 	public int originalSourceEnd;
+	public int extendedDimensions;
 
 	/**
 	 * ArrayTypeReference constructor comment.
@@ -32,12 +38,38 @@
 		super(source, pos);
 		this.originalSourceEnd = this.sourceEnd;
 		this.dimensions = dimensions ;
+		this.annotationsOnDimensions = null;
+	}
+
+	public ArrayTypeReference(char[] source, int dimensions, Annotation[][] annotationsOnDimensions, long pos) {
+		this(source, dimensions, pos);
+		if (annotationsOnDimensions != null) {
+			this.bits |= ASTNode.HasTypeAnnotations;
+		}
+		this.annotationsOnDimensions = annotationsOnDimensions;
 	}
 
 	public int dimensions() {
 
 		return this.dimensions;
 	}
+	
+	/**
+	 @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getAnnotationsOnDimensions(boolean)
+	*/
+	public Annotation[][] getAnnotationsOnDimensions(boolean useSourceOrder) {
+		if (useSourceOrder || this.annotationsOnDimensions == null || this.annotationsOnDimensions.length == 0 || this.extendedDimensions == 0 || this.extendedDimensions == this.dimensions)
+			return this.annotationsOnDimensions;
+		Annotation [][] externalAnnotations = new Annotation[this.dimensions][];
+		final int baseDimensions = this.dimensions - this.extendedDimensions;
+		System.arraycopy(this.annotationsOnDimensions, baseDimensions, externalAnnotations, 0, this.extendedDimensions);
+		System.arraycopy(this.annotationsOnDimensions, 0, externalAnnotations, this.extendedDimensions, baseDimensions);
+		return externalAnnotations;
+	}
+	
+	public void setAnnotationsOnDimensions(Annotation [][] annotationsOnDimensions) {
+		this.annotationsOnDimensions = annotationsOnDimensions;
+	}
 	/**
 	 * @return char[][]
 	 */
@@ -69,11 +101,26 @@
 		super.printExpression(indent, output);
 		if ((this.bits & IsVarArgs) != 0) {
 			for (int i= 0 ; i < this.dimensions - 1; i++) {
+				if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[i] != null) {
+					output.append(' ');
+					printAnnotations(this.annotationsOnDimensions[i], output);
+					output.append(' ');
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
+			if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[this.dimensions - 1] != null) {
+				output.append(' ');
+				printAnnotations(this.annotationsOnDimensions[this.dimensions - 1], output);
+				output.append(' ');
+			}
 			output.append("..."); //$NON-NLS-1$
 		} else {
 			for (int i= 0 ; i < this.dimensions; i++) {
+				if (this.annotationsOnDimensions != null && this.annotationsOnDimensions[i] != null) {
+					output.append(" "); //$NON-NLS-1$
+					printAnnotations(this.annotationsOnDimensions[i], output);
+					output.append(" "); //$NON-NLS-1$
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
 		}
@@ -81,14 +128,53 @@
 	}
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
-
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++) {
+					typeAnnotations[i].traverse(visitor, scope);
+				}
+			}
+			if (this.annotationsOnDimensions != null) {
+				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = this.annotationsOnDimensions[i];
+					if (annotations2 != null) {
+						for (int j = 0, max2 = annotations2.length; j < max2; j++) {
+							Annotation annotation = annotations2[j];
+							annotation.traverse(visitor, scope);
+						}
+					}
+				}
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
-
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++) {
+					typeAnnotations[i].traverse(visitor, scope);
+				}
+			}
+			if (this.annotationsOnDimensions != null) {
+				for (int i = 0, max = this.annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = this.annotationsOnDimensions[i];
+					if (annotations2 != null) {
+						for (int j = 0, max2 = annotations2.length; j < max2; j++) {
+							Annotation annotation = annotations2[j];
+							annotation.traverse(visitor, scope);
+						}
+					}
+				}
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
+
+	protected TypeBinding internalResolveType(Scope scope) {
+		TypeBinding internalResolveType = super.internalResolveType(scope);
+		return internalResolveType;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
index fc1b5fc..7e884bb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -27,10 +31,12 @@
  *							bug 383368 - [compiler][null] syntactic null analysis for field references
  *							bug 402993 - [null] Follow up of bug 401088: Missing warning about redundant null check
  *							bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *							Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -121,9 +127,9 @@
 		}
 	}
 	if (compilerOptions.isAnnotationBasedNullAnalysisEnabled) {
-		VariableBinding var = this.lhs.nullAnnotatedVariableBinding();
+		VariableBinding var = this.lhs.nullAnnotatedVariableBinding(compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8);
 		if (var != null) {
-			nullStatus = checkAssignmentAgainstNullAnnotation(currentScope, flowContext, var, nullStatus, this.expression, this.expression.resolvedType);
+			nullStatus = NullAnnotationMatching.checkAssignment(currentScope, flowContext, var, nullStatus, this.expression, this.expression.resolvedType);
 			if (nullStatus == FlowInfo.NON_NULL
 					&& var instanceof FieldBinding
 					&& this.lhs instanceof Reference
@@ -219,13 +225,14 @@
 		return null;
 	}
 	TypeBinding lhsType = this.lhs.resolveType(scope);
+	this.expression.setExpressionContext(ASSIGNMENT_CONTEXT);
 	this.expression.setExpectedType(lhsType); // needed in case of generic method invocation
 	if (lhsType != null) {
 		this.resolvedType = lhsType.capture(scope, this.sourceEnd);
 	}
 	LocalVariableBinding localVariableBinding = this.lhs.localVariableBinding();
-	if (localVariableBinding != null) {
-		localVariableBinding.tagBits &= ~TagBits.IsEffectivelyFinal;
+	if (localVariableBinding != null && localVariableBinding.isCatchParameter()) { 
+		localVariableBinding.tagBits &= ~TagBits.IsEffectivelyFinal;  // as it is already definitely assigned, we can conclude already. Also note: catch parameter cannot be compound assigned.
 	}
 	TypeBinding rhsType = this.expression.resolveType(scope);
 	if (lhsType == null || rhsType == null) {
@@ -242,7 +249,7 @@
 
 	// Compile-time conversion of base-types : implicit narrowing integer into byte/short/character
 	// may require to widen the rhs expression at runtime
-	if (lhsType != rhsType) { // must call before computeConversion() and typeMismatchError()
+	if (TypeBinding.notEquals(lhsType, rhsType)) { // must call before computeConversion() and typeMismatchError()
 		scope.compilationUnitScope().recordTypeConversion(lhsType, rhsType);
 	}
 	if (this.expression.isConstantValueOfTypeAssignableToType(rhsType, lhsType)
@@ -297,8 +304,8 @@
 	TypeBinding lhsType = this.resolvedType;
 	TypeBinding rhsType = this.expression.resolvedType;
 	// signal possible accidental boolean assignment (instead of using '==' operator)
-	if (expectedType == TypeBinding.BOOLEAN
-			&& lhsType == TypeBinding.BOOLEAN
+	if (TypeBinding.equalsEquals(expectedType, TypeBinding.BOOLEAN)
+			&& TypeBinding.equalsEquals(lhsType, TypeBinding.BOOLEAN)
 			&& (this.lhs.bits & IsStrictlyAssigned) != 0) {
 		scope.problemReporter().possibleAccidentalBooleanAssignment(this);
 	}
@@ -316,4 +323,7 @@
 public LocalVariableBinding localVariableBinding() {
 	return this.lhs.localVariableBinding();
 }
+public boolean statementExpression() {
+	return true;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
index b327ad7..9404a33 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
@@ -1670,13 +1670,13 @@
 	if (((this.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT) == OperatorIds.PLUS) {
 		if (leftTypeID == TypeIds.T_JavaLangString) {
 			this.left.computeConversion(scope, leftType, leftType);
-			if (rightType.isArrayType() && ((ArrayBinding) rightType).elementsType() == TypeBinding.CHAR) {
+			if (rightType.isArrayType() && TypeBinding.equalsEquals(((ArrayBinding) rightType).elementsType(), TypeBinding.CHAR)) {
 				scope.problemReporter().signalNoImplicitStringConversionForCharArrayExpression(this.right);
 			}
 		}
 		if (rightTypeID == TypeIds.T_JavaLangString) {
 			this.right.computeConversion(scope, rightType, rightType);
-			if (leftType.isArrayType() && ((ArrayBinding) leftType).elementsType() == TypeBinding.CHAR) {
+			if (leftType.isArrayType() && TypeBinding.equalsEquals(((ArrayBinding) leftType).elementsType(), TypeBinding.CHAR)) {
 				scope.problemReporter().signalNoImplicitStringConversionForCharArrayExpression(this.left);
 			}
 		}
@@ -1692,7 +1692,7 @@
 	int operator = (this.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT;
 	int operatorSignature = OperatorExpression.OperatorSignatures[operator][(leftTypeID << 4) + rightTypeID];
 
-	this.left.computeConversion(scope, TypeBinding.wellKnownType(scope, (operatorSignature >>> 16) & 0x0000F), leftType);
+	this.left.computeConversion(scope, 	TypeBinding.wellKnownType(scope, (operatorSignature >>> 16) & 0x0000F), leftType);
 	this.right.computeConversion(scope, TypeBinding.wellKnownType(scope, (operatorSignature >>> 8) & 0x0000F), rightType);
 	this.bits |= operatorSignature & 0xF;
 	switch (operatorSignature & 0xF) { // record the current ReturnTypeID
@@ -1849,13 +1849,13 @@
 	if (((this.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT) == OperatorIds.PLUS) {
 		if (leftTypeID == TypeIds.T_JavaLangString) {
 			this.left.computeConversion(scope, leftType, leftType);
-			if (rightType.isArrayType() && ((ArrayBinding) rightType).elementsType() == TypeBinding.CHAR) {
+			if (rightType.isArrayType() && TypeBinding.equalsEquals(((ArrayBinding) rightType).elementsType(), TypeBinding.CHAR)) {
 				scope.problemReporter().signalNoImplicitStringConversionForCharArrayExpression(this.right);
 			}
 		}
 		if (rightTypeID == TypeIds.T_JavaLangString) {
 			this.right.computeConversion(scope, rightType, rightType);
-			if (leftType.isArrayType() && ((ArrayBinding) leftType).elementsType() == TypeBinding.CHAR) {
+			if (leftType.isArrayType() && TypeBinding.equalsEquals(((ArrayBinding) leftType).elementsType(), TypeBinding.CHAR)) {
 				scope.problemReporter().signalNoImplicitStringConversionForCharArrayExpression(this.left);
 			}
 		}
@@ -1871,7 +1871,7 @@
 	int operator = (this.bits & ASTNode.OperatorMASK) >> ASTNode.OperatorSHIFT;
 	int operatorSignature = OperatorExpression.OperatorSignatures[operator][(leftTypeID << 4) + rightTypeID];
 
-	this.left.computeConversion(scope, 	TypeBinding.wellKnownType(scope, (operatorSignature >>> 16) & 0x0000F), leftType);
+	this.left.computeConversion(scope, TypeBinding.wellKnownType(scope, (operatorSignature >>> 16) & 0x0000F), leftType);
 	this.right.computeConversion(scope, TypeBinding.wellKnownType(scope, (operatorSignature >>> 8) & 0x0000F), rightType);
 	this.bits |= operatorSignature & 0xF;
 	switch (operatorSignature & 0xF) { // record the current ReturnTypeID
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
index 0cf4643..9ac8f3d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: CastExpression.java 23405 2010-02-03 17:02:18Z stephan $
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -18,10 +21,16 @@
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								bug 401017 - [compiler][null] casted reference to @Nullable field lacks a warning
  *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 415541 - [1.8][compiler] Type annotations in the body of static initializer get dropped
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.flow.FlowContext;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
@@ -160,7 +169,8 @@
  * Complain if assigned expression is cast, but not actually used as such, e.g. Object o = (List) object;
  */
 public static void checkNeedForAssignedCast(BlockScope scope, TypeBinding expectedType, CastExpression rhs) {
-	if (scope.compilerOptions().getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore) return;
+	CompilerOptions compilerOptions = scope.compilerOptions();
+	if (compilerOptions.getSeverity(CompilerOptions.UnnecessaryTypeCheck) == ProblemSeverities.Ignore) return;
 
 	TypeBinding castedExpressionType = rhs.expression.resolvedType;
 	//	int i = (byte) n; // cast still had side effect
@@ -168,6 +178,11 @@
 	if (castedExpressionType == null || rhs.resolvedType.isBaseType()) return;
 	//if (castedExpressionType.id == T_null) return; // tolerate null expression cast
 	if (castedExpressionType.isCompatibleWith(expectedType, scope)) {
+		if (compilerOptions.isAnnotationBasedNullAnalysisEnabled && compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8) {
+			// are null annotations compatible, too?
+			if (NullAnnotationMatching.analyse(expectedType, castedExpressionType, -1).isAnyMismatch())
+				return; // already reported unchecked cast (nullness), say no more.
+		}
 		scope.problemReporter().unnecessaryCast(rhs);
 	}
 }
@@ -199,7 +214,7 @@
 	TypeBinding castedExpressionType = ((CastExpression)enclosingInstance).expression.resolvedType;
 	if (castedExpressionType == null) return; // cannot do better
 	// obvious identity cast
-	if (castedExpressionType == enclosingInstanceType) {
+	if (TypeBinding.equalsEquals(castedExpressionType, enclosingInstanceType)) {
 		scope.problemReporter().unnecessaryCast((CastExpression)enclosingInstance);
 	} else if (castedExpressionType == TypeBinding.NULL){
 		return; // tolerate null enclosing instance cast
@@ -207,7 +222,7 @@
 		TypeBinding alternateEnclosingInstanceType = castedExpressionType;
 		if (castedExpressionType.isBaseType() || castedExpressionType.isArrayType()) return; // error case
 //{ObjectTeams: don't use beautified name.
-		if (memberType == scope.getMemberType(memberType.internalName(), (ReferenceBinding) alternateEnclosingInstanceType)) {
+		if (TypeBinding.equalsEquals(memberType, scope.getMemberType(memberType.internalName(), (ReferenceBinding) alternateEnclosingInstanceType))) {
 // SH}
 			scope.problemReporter().unnecessaryCast((CastExpression)enclosingInstance);
 		}
@@ -255,7 +270,7 @@
 			TypeBinding castedExpressionType = ((CastExpression)argument).expression.resolvedType;
 			if (castedExpressionType == null) return; // cannot do better
 			// obvious identity cast
-			if (castedExpressionType == argumentTypes[i]) {
+			if (TypeBinding.equalsEquals(castedExpressionType, argumentTypes[i])) {
 				scope.problemReporter().unnecessaryCast((CastExpression)argument);
 			} else if (castedExpressionType == TypeBinding.NULL){
 				continue; // tolerate null argument cast
@@ -356,6 +371,7 @@
 			public int sourceStart() { return 0; }
 			public int sourceEnd() { return 0; }
 			public TypeBinding expectedType() { return invocationSite.expectedType(); }
+			public boolean receiverIsImplicitThis() { return invocationSite.receiverIsImplicitThis();}
 		};
 		MethodBinding bindingIfNoCast;
 		if (binding.isConstructor()) {
@@ -385,7 +401,7 @@
 				}
 			}
 			for (int i = 0; i < argumentLength; i++) {
-				if (originalArgumentTypes[i] != alternateArgumentTypes[i]
+				if (TypeBinding.notEquals(originalArgumentTypes[i], alternateArgumentTypes[i])
                        /*&& !originalArgumentTypes[i].needsUncheckedConversion(alternateArgumentTypes[i])*/) {
 					scope.problemReporter().unnecessaryCast((CastExpression)arguments[i]);
 				}
@@ -400,7 +416,7 @@
 	if (castType instanceof WeakenedTypeBinding)
 		castType = ((WeakenedTypeBinding)castType).getStrongType();
 // SH}
-	if (match == castType) {
+	if (TypeBinding.equalsEquals(match, castType)) {
 		if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
 			tagAsUnnecessaryCast(scope, castType);
 		}
@@ -453,7 +469,7 @@
 									alternateArguments[i] = scope.getJavaLangObject();
 									LookupEnvironment environment = scope.environment();
 									ParameterizedTypeBinding alternateCastType = environment.createParameterizedType((ReferenceBinding)castType.erasure(), alternateArguments, castType.enclosingType());
-									if (alternateCastType.findSuperTypeOriginatingFrom(expressionType) == match) {
+									if (TypeBinding.equalsEquals(alternateCastType.findSuperTypeOriginatingFrom(expressionType), match)) {
 										this.bits |= ASTNode.UnsafeCast;
 										break;
 									}
@@ -499,7 +515,7 @@
 //			}
 //			break;
 	}
-	if (!isNarrowing && match == this.resolvedType.leafComponentType()) { // do not tag as unnecessary when recursing through upper bounds
+	if (!isNarrowing && TypeBinding.equalsEquals(match, this.resolvedType.leafComponentType())) { // do not tag as unnecessary when recursing through upper bounds
 		tagAsUnnecessaryCast(scope, castType);
 	}
 	return true;
@@ -514,12 +530,13 @@
  */
 public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
 	int pc = codeStream.position;
+	boolean annotatedCast = (this.type.bits & ASTNode.HasTypeAnnotations) != 0;
 	boolean needRuntimeCheckcast = (this.bits & ASTNode.GenerateCheckcast) != 0;
 	if (this.constant != Constant.NotAConstant) {
-		if (valueRequired || needRuntimeCheckcast) { // Added for: 1F1W9IG: IVJCOM:WINNT - Compiler omits casting check
+		if (valueRequired || needRuntimeCheckcast || annotatedCast) { // Added for: 1F1W9IG: IVJCOM:WINNT - Compiler omits casting check
 			codeStream.generateConstant(this.constant, this.implicitConversion);
-			if (needRuntimeCheckcast) {
-				codeStream.checkcast(this.resolvedType);
+			if (needRuntimeCheckcast || annotatedCast) {
+				codeStream.checkcast(this.type, this.resolvedType);
 			}
 			if (!valueRequired) {
 				// the resolveType cannot be double or long
@@ -529,9 +546,9 @@
 		codeStream.recordPositionsFrom(pc, this.sourceStart);
 		return;
 	}
-	this.expression.generateCode(currentScope, codeStream, valueRequired || needRuntimeCheckcast);
-	if (needRuntimeCheckcast && this.expression.postConversionType(currentScope) != this.resolvedType.erasure()) { // no need to issue a checkcast if already done as genericCast
-		codeStream.checkcast(this.resolvedType);
+	this.expression.generateCode(currentScope, codeStream, annotatedCast || valueRequired || needRuntimeCheckcast);
+	if (annotatedCast || (needRuntimeCheckcast && TypeBinding.notEquals(this.expression.postConversionType(currentScope), this.resolvedType.erasure()))) { // no need to issue a checkcast if already done as genericCast
+		codeStream.checkcast(this.type, this.resolvedType);
 	}
 	if (valueRequired) {
 		codeStream.generateImplicitConversion(this.implicitConversion);
@@ -573,18 +590,20 @@
 }
 
 public StringBuffer printExpression(int indent, StringBuffer output) {
+	int parenthesesCount = (this.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+	String suffix = ""; //$NON-NLS-1$
+	for(int i = 0; i < parenthesesCount; i++) {
+		output.append('(');
+		suffix += ')';
+	}
 	output.append('(');
 	this.type.print(0, output).append(") "); //$NON-NLS-1$
-	return this.expression.printExpression(0, output);
+	return this.expression.printExpression(0, output).append(suffix);
 }
 
 public TypeBinding resolveType(BlockScope scope) {
 	// compute a new constant if the cast is effective
 
-	// due to the fact an expression may start with ( and that a cast can also start with (
-	// the field is an expression....it can be a TypeReference OR a NameReference Or
-	// any kind of Expression <-- this last one is invalid.......
-
 	this.constant = Constant.NotAConstant;
 	this.implicitConversion = TypeIds.T_undefined;
 
@@ -630,7 +649,13 @@
 	}
 /*orig*/TypeBinding castType = this.resolvedType;
 // SH}
-	//expression.setExpectedType(this.resolvedType); // needed in case of generic method invocation
+	if (scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
+		this.expression.setExpressionContext(CASTING_CONTEXT);
+		if (this.expression instanceof FunctionalExpression) {
+			this.expression.setExpectedType(this.resolvedType);
+			this.bits |= ASTNode.DisableUnnecessaryCastCheck;
+		}
+	}
 	if (this.expression instanceof CastExpression) {
 		this.expression.bits |= ASTNode.DisableUnnecessaryCastCheck;
 		exprContainCast = true;
@@ -641,7 +666,7 @@
 		MethodBinding methodBinding = messageSend.binding;
 		if (methodBinding != null && methodBinding.isPolymorphic()) {
 			messageSend.binding = scope.environment().updatePolymorphicMethodReturnType((PolymorphicMethodBinding) methodBinding, castType);
-			if (expressionType != castType) {
+			if (TypeBinding.notEquals(expressionType, castType)) {
 				expressionType = castType;
 				this.bits |= ASTNode.DisableUnnecessaryCastCheck;
 			}
@@ -664,6 +689,9 @@
 // SH}
 	if (castType != null) {
 		if (expressionType != null) {
+
+			boolean nullAnnotationMismatch = NullAnnotationMatching.analyse(castType, expressionType, -1).isAnyMismatch();
+
 			boolean isLegal = checkCastTypesCompatibility(scope, castType, expressionType, this.expression);
 			if (isLegal) {
 				this.expression.computeConversion(scope, castType, expressionType);
@@ -675,6 +703,9 @@
 							|| !(expressionType.isRawType() && this.expression.forcedToBeRaw(scope.referenceContext()))) {
 						scope.problemReporter().unsafeCast(this, scope);
 					}
+				} else if (nullAnnotationMismatch) {
+					// report null annotation issue at medium priority
+					scope.problemReporter().unsafeNullnessCast(this, scope);
 				} else {
 					if (castType.isRawType() && scope.compilerOptions().getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore){
 						scope.problemReporter().rawTypeReference(this.type, castType);
@@ -730,7 +761,7 @@
 					&& ((ParameterizedGenericMethodBinding)method).inferredReturnType) {
 			if (this.expectedType == null)
 				return true;
-			if (this.resolvedType != this.expectedType)
+			if (TypeBinding.notEquals(this.resolvedType, this.expectedType))
 				return true;
 		}
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
index 7eb295d..675e9d4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
@@ -280,14 +280,18 @@
 						case AbstractVariableDeclaration.ENUM_CONSTANT :
 							break;
 						case AbstractVariableDeclaration.INITIALIZER :
-							if (!fieldDecl.isStatic())
+							if (!fieldDecl.isStatic()) {
 								break;
+							}
+							remainingFieldCount--;
 							sourcePosition = ((Initializer) fieldDecl).block.sourceEnd;
 							fieldDecl.generateCode(staticInitializerScope, codeStream);
 							break;
 						case AbstractVariableDeclaration.FIELD :
-							if (!fieldDecl.binding.isStatic())
+							if (!fieldDecl.binding.isStatic()) {
 								break;
+							}
+							remainingFieldCount--;
 							sourcePosition = fieldDecl.declarationEnd;
 							fieldDecl.generateCode(staticInitializerScope, codeStream);
 							break;
@@ -312,6 +316,7 @@
 //{ObjectTeams: roles cannot initialize static fields with non-constant values:
 							int previousPosition = codeStream.position;
 // orig:
+							sourcePosition = fieldDecl.declarationEnd;
 							fieldDecl.generateCode(staticInitializerScope, codeStream);
 // :giro
 							if (  previousPosition != codeStream.position // field has indeed generated code
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
index 07b90bf..5c9539b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
@@ -1,16 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: CompilationUnitDeclaration.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann  - Contribution for bug 295551
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann  - Contribution for bug 295551
+ *     Jesper S Moller   - Contributions for
+ *							  Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335             
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -186,6 +191,7 @@
 		// null out the classfile backpointer to a type binding
 		classFile.referenceBinding = null;
 		classFile.innerClassesBindings = null;
+		classFile.bootstrapMethods = null;
 		classFile.missingTypes = null;
 		classFile.visitedTypes = null;
 	}
@@ -517,6 +523,11 @@
 			if (currentImport.isStatic()) {
 				output.append("static "); //$NON-NLS-1$
 			}
+//{ObjectTeams:
+			else if (currentImport.isBase()) {
+				output.append("base "); //$NON-NLS-1$
+			}
+// SH}
 			currentImport.print(0, output).append(";\n"); //$NON-NLS-1$
 		}
 
@@ -799,6 +810,10 @@
 	this.ignoreFurtherInvestigation = true;
 }
 
+public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
+	// Nothing to do for this context;
+}
+
 //{ObjectTeams: and let us remove it again:
 public void resetErrorFlag() {
 	this.ignoreFurtherInvestigation = false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
index f6aaeb1..bc287ea 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
@@ -5,11 +5,17 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
+ *     Jesper S Moller - Contributions for
+ *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
  *								bug 402993 - [null] Follow up of bug 401088: Missing warning about redundant null check
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
@@ -55,7 +61,7 @@
 		if (local != null) {
 			// compound assignment results in a definitely non null value for String
 			flowInfo.markAsDefinitelyNonNull(local);
-			flowContext.markFinallyNullStatus(local, FlowInfo.NON_NULL);
+				flowContext.markFinallyNullStatus(local, FlowInfo.NON_NULL);
 		}
 	}
 	return flowInfo;
@@ -130,10 +136,6 @@
 		TypeBinding originalExpressionType = this.expression.resolveType(scope);
 		if (originalLhsType == null || originalExpressionType == null)
 			return null;
-		LocalVariableBinding localVariableBinding = this.lhs.localVariableBinding();
-		if (localVariableBinding != null) {
-			localVariableBinding.tagBits &= ~TagBits.IsEffectivelyFinal;
-		}
 		// autoboxing support
 		LookupEnvironment env = scope.environment();
 		TypeBinding lhsType = originalLhsType, expressionType = originalExpressionType;
@@ -142,7 +144,7 @@
 		if (use15specifics) {
 			if (!lhsType.isBaseType() && expressionType.id != T_JavaLangString && expressionType.id != T_null) {
 				TypeBinding unboxedType = env.computeBoxingType(lhsType);
-				if (unboxedType != lhsType) {
+				if (TypeBinding.notEquals(unboxedType, lhsType)) {
 					lhsType = unboxedType;
 					unboxedLhs = true;
 				}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
index 078c2c4..06f318c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
@@ -4,12 +4,13 @@
  * 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
- * $Id: ConditionalExpression.java 23404 2010-02-03 14:10:22Z stephan $
- *
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Fraunhofer FIRST - extended API and implementation
- *     Technical University Berlin - extended API and implementation
  *     Stephen Herrmann <stephan@cs.tu-berlin.de> -  Contributions for
  *     						bug 133125 - [compiler][null] need to report the null status of expressions and analyze them simultaneously
  *     						bug 292478 - Report potentially null across variable assignment
@@ -19,6 +20,9 @@
  *							bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
  *							bug 383368 - [compiler][null] syntactic null analysis for field references
  *							bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
+ *							Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *							Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *							Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -29,13 +33,6 @@
 import org.eclipse.jdt.internal.compiler.flow.*;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 
-/**
- * OTDT changes:
- * What: adjust stack balance for pop-expressions of a lowering translation.
- * Why:  see Lowering.PopExpression (additional null-checks reusing existing value).
- *
- * @version $Id: ConditionalExpression.java 23404 2010-02-03 14:10:22Z stephan $
- */
 public class ConditionalExpression extends OperatorExpression {
 
 	public Expression condition, valueIfTrue, valueIfFalse;
@@ -50,6 +47,11 @@
 	
 	// we compute and store the null status during analyseCode (https://bugs.eclipse.org/324178):
 	private int nullStatus = FlowInfo.UNKNOWN;
+	private TypeBinding expectedType;
+	private ExpressionContext expressionContext = VANILLA_CONTEXT;
+	private boolean isPolyExpression = false;
+	private TypeBinding originalValueIfTrueType;
+	private TypeBinding originalValueIfFalseType;
 
 	public ConditionalExpression(
 		Expression condition,
@@ -428,24 +430,49 @@
 
 	public TypeBinding resolveType(BlockScope scope) {
 		// JLS3 15.25
-		this.constant = Constant.NotAConstant;
 		LookupEnvironment env = scope.environment();
-		boolean use15specifics = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5;
-		TypeBinding conditionType = this.condition.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
-		this.condition.computeConversion(scope, TypeBinding.BOOLEAN, conditionType);
+		final long sourceLevel = scope.compilerOptions().sourceLevel;
+		boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5;
+		boolean use18specifics = sourceLevel >= ClassFileConstants.JDK1_8;
+		
+		if (use18specifics) {
+			if (this.expressionContext == ASSIGNMENT_CONTEXT || this.expressionContext == INVOCATION_CONTEXT) {
+				this.valueIfTrue.setExpressionContext(this.expressionContext);
+				this.valueIfTrue.setExpectedType(this.expectedType);
+				this.valueIfFalse.setExpressionContext(this.expressionContext);
+				this.valueIfFalse.setExpectedType(this.expectedType);
+			}
+		}
+		
+		if (this.constant != Constant.NotAConstant) {
+			this.constant = Constant.NotAConstant;
 
-		if (this.valueIfTrue instanceof CastExpression) this.valueIfTrue.bits |= DisableUnnecessaryCastCheck; // will check later on
-		TypeBinding originalValueIfTrueType = this.valueIfTrue.resolveType(scope);
+			TypeBinding conditionType = this.condition.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
+			this.condition.computeConversion(scope, TypeBinding.BOOLEAN, conditionType);
 
-		if (this.valueIfFalse instanceof CastExpression) this.valueIfFalse.bits |= DisableUnnecessaryCastCheck; // will check later on
-		TypeBinding originalValueIfFalseType = this.valueIfFalse.resolveType(scope);
+			if (this.valueIfTrue instanceof CastExpression) this.valueIfTrue.bits |= DisableUnnecessaryCastCheck; // will check later on
+			this.originalValueIfTrueType = this.valueIfTrue.resolveType(scope);
 
-		if (conditionType == null || originalValueIfTrueType == null || originalValueIfFalseType == null)
-			return null;
+			if (this.valueIfFalse instanceof CastExpression) this.valueIfFalse.bits |= DisableUnnecessaryCastCheck; // will check later on
+			this.originalValueIfFalseType = this.valueIfFalse.resolveType(scope);
 
-		TypeBinding valueIfTrueType = originalValueIfTrueType;
-		TypeBinding valueIfFalseType = originalValueIfFalseType;
-		if (use15specifics && valueIfTrueType != valueIfFalseType) {
+			if (conditionType == null || this.originalValueIfTrueType == null || this.originalValueIfFalseType == null)
+				return null;
+			
+			if (this.originalValueIfTrueType.kind() == Binding.POLY_TYPE || this.originalValueIfFalseType.kind() == Binding.POLY_TYPE) {
+				this.isPolyExpression = true;
+				return new PolyTypeBinding(this);
+			}
+		} else {
+			if (this.originalValueIfTrueType.kind() == Binding.POLY_TYPE)
+				this.originalValueIfTrueType = this.valueIfTrue.resolveType(scope);
+			if (this.originalValueIfFalseType.kind() == Binding.POLY_TYPE)
+				this.originalValueIfFalseType = this.valueIfFalse.resolveType(scope);
+		}
+		
+		TypeBinding valueIfTrueType = this.originalValueIfTrueType;
+		TypeBinding valueIfFalseType = this.originalValueIfFalseType;
+		if (use15specifics && TypeBinding.notEquals(valueIfTrueType, valueIfFalseType)) {
 			if (valueIfTrueType.isBaseType()) {
 				if (valueIfFalseType.isBaseType()) {
 					// bool ? baseType : baseType
@@ -490,10 +517,10 @@
 			// from valueIFTrue or valueIfFalse to the receiver constant
 			this.constant = condConstant.booleanValue() ? trueConstant : falseConstant;
 		}
-		if (valueIfTrueType == valueIfFalseType) { // harmed the implicit conversion
-			this.valueIfTrue.computeConversion(scope, valueIfTrueType, originalValueIfTrueType);
-			this.valueIfFalse.computeConversion(scope, valueIfFalseType, originalValueIfFalseType);
-			if (valueIfTrueType == TypeBinding.BOOLEAN) {
+		if (TypeBinding.equalsEquals(valueIfTrueType, valueIfFalseType)) { // harmed the implicit conversion
+			this.valueIfTrue.computeConversion(scope, valueIfTrueType, this.originalValueIfTrueType);
+			this.valueIfFalse.computeConversion(scope, valueIfFalseType, this.originalValueIfFalseType);
+			if (TypeBinding.equalsEquals(valueIfTrueType, TypeBinding.BOOLEAN)) {
 				this.optimizedIfTrueConstant = this.valueIfTrue.optimizedBooleanConstant();
 				this.optimizedIfFalseConstant = this.valueIfFalse.optimizedBooleanConstant();
 				if (this.optimizedIfTrueConstant != Constant.NotAConstant
@@ -507,60 +534,60 @@
 						: this.optimizedIfFalseConstant;
 				}
 			}
-			return this.resolvedType = valueIfTrueType;
+			return this.resolvedType = NullAnnotationMatching.moreDangerousType(valueIfTrueType, valueIfFalseType);
 		}
 		// Determine the return type depending on argument types
 		// Numeric types
 		if (valueIfTrueType.isNumericType() && valueIfFalseType.isNumericType()) {
 			// (Short x Byte) or (Byte x Short)"
-			if ((valueIfTrueType == TypeBinding.BYTE && valueIfFalseType == TypeBinding.SHORT)
-				|| (valueIfTrueType == TypeBinding.SHORT && valueIfFalseType == TypeBinding.BYTE)) {
-				this.valueIfTrue.computeConversion(scope, TypeBinding.SHORT, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, TypeBinding.SHORT, originalValueIfFalseType);
+			if ((TypeBinding.equalsEquals(valueIfTrueType, TypeBinding.BYTE) && TypeBinding.equalsEquals(valueIfFalseType, TypeBinding.SHORT))
+				|| (TypeBinding.equalsEquals(valueIfTrueType, TypeBinding.SHORT) && TypeBinding.equalsEquals(valueIfFalseType, TypeBinding.BYTE))) {
+				this.valueIfTrue.computeConversion(scope, TypeBinding.SHORT, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, TypeBinding.SHORT, this.originalValueIfFalseType);
 				return this.resolvedType = TypeBinding.SHORT;
 			}
 			// <Byte|Short|Char> x constant(Int)  ---> <Byte|Short|Char>   and reciprocally
-			if ((valueIfTrueType == TypeBinding.BYTE || valueIfTrueType == TypeBinding.SHORT || valueIfTrueType == TypeBinding.CHAR)
-					&& (valueIfFalseType == TypeBinding.INT
+			if ((TypeBinding.equalsEquals(valueIfTrueType, TypeBinding.BYTE) || TypeBinding.equalsEquals(valueIfTrueType, TypeBinding.SHORT) || TypeBinding.equalsEquals(valueIfTrueType, TypeBinding.CHAR))
+					&& (TypeBinding.equalsEquals(valueIfFalseType, TypeBinding.INT)
 						&& this.valueIfFalse.isConstantValueOfTypeAssignableToType(valueIfFalseType, valueIfTrueType))) {
-				this.valueIfTrue.computeConversion(scope, valueIfTrueType, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, valueIfTrueType, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, valueIfTrueType, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, valueIfTrueType, this.originalValueIfFalseType);
 				return this.resolvedType = valueIfTrueType;
 			}
-			if ((valueIfFalseType == TypeBinding.BYTE
-					|| valueIfFalseType == TypeBinding.SHORT
-					|| valueIfFalseType == TypeBinding.CHAR)
-					&& (valueIfTrueType == TypeBinding.INT
+			if ((TypeBinding.equalsEquals(valueIfFalseType, TypeBinding.BYTE)
+					|| TypeBinding.equalsEquals(valueIfFalseType, TypeBinding.SHORT)
+					|| TypeBinding.equalsEquals(valueIfFalseType, TypeBinding.CHAR))
+					&& (TypeBinding.equalsEquals(valueIfTrueType, TypeBinding.INT)
 						&& this.valueIfTrue.isConstantValueOfTypeAssignableToType(valueIfTrueType, valueIfFalseType))) {
-				this.valueIfTrue.computeConversion(scope, valueIfFalseType, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, valueIfFalseType, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, valueIfFalseType, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, valueIfFalseType, this.originalValueIfFalseType);
 				return this.resolvedType = valueIfFalseType;
 			}
 			// Manual binary numeric promotion
 			// int
 			if (BaseTypeBinding.isNarrowing(valueIfTrueType.id, T_int)
 					&& BaseTypeBinding.isNarrowing(valueIfFalseType.id, T_int)) {
-				this.valueIfTrue.computeConversion(scope, TypeBinding.INT, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, TypeBinding.INT, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, TypeBinding.INT, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, TypeBinding.INT, this.originalValueIfFalseType);
 				return this.resolvedType = TypeBinding.INT;
 			}
 			// long
 			if (BaseTypeBinding.isNarrowing(valueIfTrueType.id, T_long)
 					&& BaseTypeBinding.isNarrowing(valueIfFalseType.id, T_long)) {
-				this.valueIfTrue.computeConversion(scope, TypeBinding.LONG, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, TypeBinding.LONG, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, TypeBinding.LONG, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, TypeBinding.LONG, this.originalValueIfFalseType);
 				return this.resolvedType = TypeBinding.LONG;
 			}
 			// float
 			if (BaseTypeBinding.isNarrowing(valueIfTrueType.id, T_float)
 					&& BaseTypeBinding.isNarrowing(valueIfFalseType.id, T_float)) {
-				this.valueIfTrue.computeConversion(scope, TypeBinding.FLOAT, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, TypeBinding.FLOAT, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, TypeBinding.FLOAT, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, TypeBinding.FLOAT, this.originalValueIfFalseType);
 				return this.resolvedType = TypeBinding.FLOAT;
 			}
 			// double
-			this.valueIfTrue.computeConversion(scope, TypeBinding.DOUBLE, originalValueIfTrueType);
-			this.valueIfFalse.computeConversion(scope, TypeBinding.DOUBLE, originalValueIfFalseType);
+			this.valueIfTrue.computeConversion(scope, TypeBinding.DOUBLE, this.originalValueIfTrueType);
+			this.valueIfFalse.computeConversion(scope, TypeBinding.DOUBLE, this.originalValueIfFalseType);
 			return this.resolvedType = TypeBinding.DOUBLE;
 		}
 		// Type references (null null is already tested)
@@ -591,19 +618,19 @@
 				commonType = scope.lowerUpperBound(new TypeBinding[] { valueIfTrueType, valueIfFalseType });
 			}
 			if (commonType != null) {
-				this.valueIfTrue.computeConversion(scope, commonType, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, commonType, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, commonType, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, commonType, this.originalValueIfFalseType);
 				return this.resolvedType = commonType.capture(scope, this.sourceEnd);
 			}
 		} else {
 			// < 1.5 : one operand must be convertible to the other
 			if (valueIfFalseType.isCompatibleWith(valueIfTrueType)) {
-				this.valueIfTrue.computeConversion(scope, valueIfTrueType, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, valueIfTrueType, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, valueIfTrueType, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, valueIfTrueType, this.originalValueIfFalseType);
 				return this.resolvedType = valueIfTrueType;
 			} else if (valueIfTrueType.isCompatibleWith(valueIfFalseType)) {
-				this.valueIfTrue.computeConversion(scope, valueIfFalseType, originalValueIfTrueType);
-				this.valueIfFalse.computeConversion(scope, valueIfFalseType, originalValueIfFalseType);
+				this.valueIfTrue.computeConversion(scope, valueIfFalseType, this.originalValueIfTrueType);
+				this.valueIfFalse.computeConversion(scope, valueIfFalseType, this.originalValueIfFalseType);
 				return this.resolvedType = valueIfFalseType;
 			}
 		}
@@ -614,6 +641,36 @@
 		return null;
 	}
 
+	public void setExpectedType(TypeBinding expectedType) {
+		this.expectedType = expectedType;
+	}
+	
+	public void setExpressionContext(ExpressionContext context) {
+		this.expressionContext = context;
+	}
+	
+	public boolean isPolyExpression() throws UnsupportedOperationException {
+		if (this.expressionContext != ASSIGNMENT_CONTEXT && this.expressionContext != INVOCATION_CONTEXT)
+			return false;
+		
+		return this.isPolyExpression;
+	}
+	
+	public boolean isCompatibleWith(TypeBinding left, Scope scope) {
+		return this.valueIfTrue.isCompatibleWith(left, scope) && this.valueIfFalse.isCompatibleWith(left, scope);
+	}
+	
+	public boolean tIsMoreSpecific(TypeBinding t, TypeBinding s) {
+		return isPolyExpression() ?
+				this.valueIfTrue.tIsMoreSpecific(t, s) && this.valueIfFalse.tIsMoreSpecific(t, s):
+				super.tIsMoreSpecific(t, s);
+	}
+	
+	public void tagAsEllipsisArgument() {
+		this.valueIfTrue.tagAsEllipsisArgument();
+		this.valueIfFalse.tagAsEllipsisArgument();
+	}
+
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
 			this.condition.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index 7c9bed3..cfe58d2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -19,13 +19,19 @@
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								bug 400421 - [compiler] Null analysis for fields does not take @com.google.inject.Inject into account
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 415399 - [1.8][compiler] Type annotations on constructor results dropped by the code generator
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
 import java.util.ArrayList;
+import java.util.List;
 
 import org.eclipse.jdt.core.compiler.*;
 import org.eclipse.jdt.internal.compiler.*;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference.AnnotationCollector;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
@@ -260,7 +266,10 @@
 		}
 
 		// nullity and mark as assigned
-		analyseArguments(flowInfo);
+		if (classScope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8)
+			analyseArguments(flowInfo, this.arguments, this.binding);
+		else
+			analyseArguments18(flowInfo, this.arguments, this.binding);
 
 		// propagate to constructor call
 		if (this.constructorCall != null) {
@@ -649,7 +658,7 @@
 		codeStream.recordPositionsFrom(0, this.bodyEnd);
 		try {
 			classFile.completeCodeAttribute(codeAttributeOffset);
-		} catch (NegativeArraySizeException e) {
+		} catch(NegativeArraySizeException e) {
 			throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);
 		}
 //{ObjectTeams
@@ -681,6 +690,14 @@
 }
 // SH}
 
+public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
+	AnnotationCollector collector = new AnnotationCollector(null, targetType, allAnnotationContexts);
+	for (int i = 0, max = this.annotations.length; i < max; i++) {
+		Annotation annotation = this.annotations[i];
+		annotation.traverse(collector, (BlockScope) null);
+	}
+}
+
 public boolean isConstructor() {
 	return true;
 }
@@ -819,11 +836,7 @@
     if (this.isCopied)
         return;
 // SH}
-	if (this.typeParameters != null) {
-		for (int i = 0, length = this.typeParameters.length; i < length; i++) {
-			this.typeParameters[i].resolve(this.scope);
-		}
-	}
+	// typeParameters are already resolved from Scope#connectTypeVariables()
 	if (this.binding != null && !this.binding.isPrivate()) {
 		sourceType.tagBits |= TagBits.HasNonPrivateConstructor;
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
new file mode 100644
index 0000000..ea0de63
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper S Moller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Jesper S Moller <jesper@selskabet.org> - initial API and implementation
+ ********************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+
+public class ContainerAnnotation extends SingleMemberAnnotation {
+	
+	private Annotation [] containees;
+	private ArrayInitializer memberValues;
+	
+	public ContainerAnnotation(Annotation repeatingAnnotation, ReferenceBinding containerAnnotationType, BlockScope scope) {
+		
+		char [][] containerTypeName = containerAnnotationType.compoundName;
+		if (containerTypeName.length == 1) {
+			this.type = new SingleTypeReference(containerTypeName[0], 0);
+		} else {
+			this.type = new QualifiedTypeReference(containerTypeName, new long [containerTypeName.length]);
+		}
+		
+		this.sourceStart = repeatingAnnotation.sourceStart;
+		this.sourceEnd = repeatingAnnotation.sourceEnd;
+		
+		this.resolvedType = containerAnnotationType;
+		this.recipient = repeatingAnnotation.recipient;
+		this.containees = new Annotation[0];
+		this.memberValue = this.memberValues = new ArrayInitializer();
+		addContainee(repeatingAnnotation);
+	}
+	
+	public void addContainee(Annotation repeatingAnnotation) {
+		final int length = this.containees.length;
+		System.arraycopy(this.containees, 0, this.containees = new Annotation[length + 1], 0, length);
+		this.containees[length] = repeatingAnnotation;
+		this.memberValues.expressions = this.containees;
+		repeatingAnnotation.setPersistibleAnnotation(length == 0 ? this : null);
+	}
+	
+	// Resolve the compiler synthesized container annotation.
+	public TypeBinding resolveType(BlockScope scope) {
+
+		if (this.compilerAnnotation != null)
+			return this.resolvedType;
+
+		this.constant = Constant.NotAConstant;
+
+		ReferenceBinding containerAnnotationType = (ReferenceBinding) this.resolvedType;
+		if (!containerAnnotationType.isValidBinding())
+			containerAnnotationType = (ReferenceBinding) containerAnnotationType.closestMatch();
+		Annotation repeatingAnnotation = this.containees[0];
+		ReferenceBinding repeatingAnnotationType = (ReferenceBinding) repeatingAnnotation.resolvedType;
+		if (!repeatingAnnotationType.isDeprecated() && isTypeUseDeprecated(containerAnnotationType, scope)) {
+			scope.problemReporter().deprecatedType(containerAnnotationType, repeatingAnnotation);
+		}
+		checkContainerAnnotationType(repeatingAnnotation, scope, containerAnnotationType, repeatingAnnotationType, true); // true => repeated *use* site error reporting requested.
+		this.resolvedType = containerAnnotationType = repeatingAnnotationType.containerAnnotationType();
+		if (!this.resolvedType.isValidBinding())
+			return this.resolvedType;
+		
+		// OK, the declaration site of the repeating annotation type as well as the use site where the annotations actually repeat pass muster. 
+		MethodBinding[] methods = containerAnnotationType.methods();
+		MemberValuePair pair = memberValuePairs()[0];
+		
+		for (int i = 0, length = methods.length; i < length; i++) {
+			MethodBinding method = methods[i];
+			if (CharOperation.equals(method.selector, TypeConstants.VALUE)) {
+				pair.binding = method;
+				pair.resolveTypeExpecting(scope, method.returnType);
+			}
+		}
+		this.compilerAnnotation = scope.environment().createAnnotation((ReferenceBinding) this.resolvedType, computeElementValuePairs());
+		return this.resolvedType;
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
index 85f7c4e..b82b864 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -42,10 +46,12 @@
 		// - allocation expression, some literals, this reference (see inside expressionNonNullComparison(..))
 		// these checks do not leverage the flowInfo.
 		boolean checkEquality = ((this.bits & OperatorMASK) >> OperatorSHIFT) == EQUAL_EQUAL;
-		if (leftStatus == FlowInfo.NON_NULL && rightStatus == FlowInfo.NULL) {
-			leftNonNullChecked = scope.problemReporter().expressionNonNullComparison(this.left, checkEquality);
-		} else if (leftStatus == FlowInfo.NULL && rightStatus == FlowInfo.NON_NULL) {
-			rightNonNullChecked = scope.problemReporter().expressionNonNullComparison(this.right, checkEquality);
+		if ((flowContext.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING_MASK) == 0) {
+			if (leftStatus == FlowInfo.NON_NULL && rightStatus == FlowInfo.NULL) {
+				leftNonNullChecked = scope.problemReporter().expressionNonNullComparison(this.left, checkEquality);
+			} else if (leftStatus == FlowInfo.NULL && rightStatus == FlowInfo.NON_NULL) {
+				rightNonNullChecked = scope.problemReporter().expressionNonNullComparison(this.right, checkEquality);
+			}
 		}
 		
 		boolean contextualCheckEquality = checkEquality ^ ((flowContext.tagBits & FlowContext.INSIDE_NEGATION) != 0);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
index 97f0f5a..48803de 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
@@ -4,8 +4,11 @@
  * 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
- * $Id: ExplicitConstructorCall.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -17,6 +20,8 @@
  *								bug 370639 - [compiler][resource] restore the default for resource leak warnings
  *								bug 388996 - [compiler][resource] Incorrect 'potential resource leak'
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -91,7 +96,7 @@
  *
  * @version $Id: ExplicitConstructorCall.java 23405 2010-02-03 17:02:18Z stephan $
  */
-public class ExplicitConstructorCall extends Statement implements InvocationSite {
+public class ExplicitConstructorCall extends Statement implements InvocationSite, ExpressionContext {
 
 	public Expression[] arguments;
 	public Expression qualification;
@@ -234,9 +239,9 @@
 					i++) {
 					codeStream.aconst_null();
 				}
-				codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */);
+				codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
 			} else {
-				codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */);
+				codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
 			}
 			codeStream.recordPositionsFrom(pc, this.sourceStart);
 		} finally {
@@ -463,19 +468,24 @@
 			// arguments buffering for the method lookup
 			TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
 			boolean argsContainCast = false;
+			boolean polyExpressionSeen = false;
 			if (this.arguments != null) {
 				boolean argHasError = false; // typeChecks all arguments
 				int length = this.arguments.length;
 				argumentTypes = new TypeBinding[length];
+				TypeBinding argumentType;
 				for (int i = 0; i < length; i++) {
 					Expression argument = this.arguments[i];
 					if (argument instanceof CastExpression) {
 						argument.bits |= ASTNode.DisableUnnecessaryCastCheck; // will check later on
 						argsContainCast = true;
 					}
-					if ((argumentTypes[i] = argument.resolveType(scope)) == null) {
+					argument.setExpressionContext(INVOCATION_CONTEXT);
+					if ((argumentType = argumentTypes[i] = argument.resolveType(scope)) == null) {
 						argHasError = true;
 					}
+					if (argumentType != null && argumentType.kind() == Binding.POLY_TYPE)
+						polyExpressionSeen = true;
 				}
 				if (argHasError) {
 					if (receiverType == null) {
@@ -555,7 +565,11 @@
             try {
                 anchorMapping = AnchorMapping.setupNewMapping(
 	                    receiver, this.arguments, scope);
-	/*~orig~*/  this.binding = scope.getConstructor(receiverType, argumentTypes, this);
+    // orig:
+    			this.binding = scope.getConstructor(receiverType, argumentTypes, this);
+    			if (polyExpressionSeen && polyExpressionsHaveErrors(scope, this.binding, this.arguments, argumentTypes))
+    				return;
+	// giro:
 
 				// check different reasons for changing the accessMode
 
@@ -622,8 +636,9 @@
                 AnchorMapping.removeCurrentMapping(anchorMapping);
             }
 
-
-/*~orig~*/  if (this.binding.isValidBinding()) {
+  // orig:
+			if (this.binding.isValidBinding()) {
+  // giro:
 
                 // record chainTSuperMarkArgPos if needed
                 if (   scope.enclosingSourceType().isRole()
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
index 3f98fdc..0a79e7f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
@@ -6,22 +6,28 @@
  * http://www.eclipse.org/legal/epl-v10.html
  * $Id: Expression.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
- *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
+ *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for 
  *								bug 292478 - Report potentially null across variable assignment
  *								bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
  *								bug 402993 - [null] Follow up of bug 401088: Missing warning about redundant null check
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
-
 import java.util.ArrayList;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
@@ -97,7 +103,7 @@
  *
  * @version $Id: Expression.java 23404 2010-02-03 14:10:22Z stephan $
  */
-public abstract class Expression extends Statement {
+public abstract class Expression extends Statement implements ExpressionContext {
 
 //{ObjectTeams: baseclass decapsulation support:
 	/**
@@ -393,7 +399,7 @@
 	boolean use17specifics = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_7;
 	if (castType.isBaseType()) {
 		if (expressionType.isBaseType()) {
-			if (expressionType == castType) {
+			if (TypeBinding.equalsEquals(expressionType, castType)) {
 				if (expression != null) {
 					this.constant = expression.constant; //use the same constant
 				}
@@ -429,6 +435,15 @@
 		return true;
 	}
 
+	if (castType.isIntersectionCastType()) {
+		ReferenceBinding [] intersectingTypes = castType.getIntersectingTypes();
+		for (int i = 0, length = intersectingTypes.length; i < length; i++) {
+			if (!checkCastTypesCompatibility(scope, intersectingTypes[i], expressionType, expression))
+				return false;
+		}
+		return true;
+	}
+	
 	switch(expressionType.kind()) {
 		case Binding.BASE_TYPE :
 			//-----------cast to something which is NOT a base type--------------------------
@@ -439,7 +454,7 @@
 			return false;
 
 		case Binding.ARRAY_TYPE :
-			if (castType == expressionType) {
+			if (TypeBinding.equalsEquals(castType, expressionType)) {
 				tagAsUnnecessaryCast(scope, castType);
 				return true; // identity conversion
 			}
@@ -449,7 +464,7 @@
 					TypeBinding castElementType = ((ArrayBinding) castType).elementsType();
 					TypeBinding exprElementType = ((ArrayBinding) expressionType).elementsType();
 					if (exprElementType.isBaseType() || castElementType.isBaseType()) {
-						if (castElementType == exprElementType) {
+						if (TypeBinding.equalsEquals(castElementType, exprElementType)) {
 							tagAsNeedCheckCast();
 							return true;
 						}
@@ -501,7 +516,13 @@
 			}
 			// recursively on the type variable upper bound
 			return checkCastTypesCompatibility(scope, castType, ((WildcardBinding)expressionType).bound, expression);
-
+		case Binding.INTERSECTION_CAST_TYPE:
+			ReferenceBinding [] intersectingTypes = expressionType.getIntersectingTypes();
+			for (int i = 0, length = intersectingTypes.length; i < length; i++) {
+				if (checkCastTypesCompatibility(scope, castType, intersectingTypes[i], expression))
+					return true;
+			}
+			return false;
 		default:
 			if (expressionType.isInterface()) {
 				switch (castType.kind()) {
@@ -558,7 +579,7 @@
 								int exprMethodsLength = expressionTypeMethods.length;
 								for (int i = 0, castMethodsLength = castTypeMethods.length; i < castMethodsLength; i++) {
 									for (int j = 0; j < exprMethodsLength; j++) {
-										if ((castTypeMethods[i].returnType != expressionTypeMethods[j].returnType)
+										if ((TypeBinding.notEquals(castTypeMethods[i].returnType, expressionTypeMethods[j].returnType))
 												&& (CharOperation.equals(castTypeMethods[i].selector, expressionTypeMethods[j].selector))
 												&& castTypeMethods[i].areParametersEqual(expressionTypeMethods[j])) {
 											return false;
@@ -725,9 +746,19 @@
  * @return could this expression be checked by the current implementation?
  */
 public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) {
+	boolean isNullable = false;
+	if (this.resolvedType != null) {
+		// 1. priority: @NonNull
+		if ((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) {
+			return true; // no danger
+		} else if ((this.resolvedType.tagBits & TagBits.AnnotationNullable) != 0) {
+			isNullable = true;
+		}
+	}
 	LocalVariableBinding local = localVariableBinding();
 	if (local != null &&
 			(local.type.tagBits & TagBits.IsBaseType) == 0) {
+		// 2. priority: local with flow analysis (via the FlowContext)
 		if ((this.bits & ASTNode.IsNonNull) == 0) {
 			flowContext.recordUsingNullReference(scope, local, this,
 					FlowContext.MAY_NULL, flowInfo);
@@ -740,6 +771,10 @@
 			// from thereon it is set
 		flowContext.markFinallyNullStatus(local, FlowInfo.NON_NULL);
 		return true;
+	} else if (isNullable) {
+		// 3. priority: @Nullable without a local
+		scope.problemReporter().dereferencingNullableExpression(this);
+		return true;
 	}
 	return false; // not checked
 }
@@ -756,7 +791,7 @@
 }
 
 public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
-	if (match == castType) {
+	if (TypeBinding.equalsEquals(match, castType)) {
 		if (!isNarrowing) tagAsUnnecessaryCast(scope, castType);
 		return true;
 	}
@@ -792,7 +827,7 @@
 		}
 	} else if (compileTimeType != TypeBinding.NULL && compileTimeType.isBaseType()) {
 		TypeBinding boxedType = scope.environment().computeBoxingType(runtimeType);
-		if (boxedType == runtimeType) // Object o = 12;
+		if (TypeBinding.equalsEquals(boxedType, runtimeType)) // Object o = 12;
 			boxedType = compileTimeType;
 		this.implicitConversion = TypeIds.BOXING | (boxedType.id << 4) + compileTimeType.id;
 		scope.problemReporter().autoboxing(this, compileTimeType, scope.environment().computeBoxingType(boxedType));
@@ -802,7 +837,7 @@
 		return;
 	}
 	int compileTimeTypeID, runtimeTypeID;
-	if ((compileTimeTypeID = compileTimeType.id) == TypeIds.NoId) { // e.g. ? extends String  ==> String (103227)
+	if ((compileTimeTypeID = compileTimeType.id) >= TypeIds.T_LastWellKnownTypeId) { // e.g. ? extends String  ==> String (103227); >= TypeIds.T_LastWellKnownTypeId implies TypeIds.NoId
 		compileTimeTypeID = compileTimeType.erasure().id == TypeIds.T_JavaLangString ? TypeIds.T_JavaLangString : TypeIds.T_JavaLangObject;
 	}
 	switch (runtimeTypeID = runtimeType.id) {
@@ -1042,7 +1077,7 @@
 
 	if (this.constant == Constant.NotAConstant)
 		return false;
-	if (constantType == targetType)
+	if (TypeBinding.equalsEquals(constantType, targetType))
 		return true;
 	//No free assignment conversion from anything but to integral ones.
 	if (BaseTypeBinding.isWidening(TypeIds.T_int, constantType.id)
@@ -1053,6 +1088,14 @@
 	return false;
 }
 
+public boolean isAssignmentCompatible (TypeBinding left, Scope scope) {
+	if (this.resolvedType == null)
+		return false;
+	return isConstantValueOfTypeAssignableToType(this.resolvedType, left) || 
+				this.resolvedType.isCompatibleWith(left) || 
+				isBoxingCompatible(this.resolvedType, left, this, scope);
+}
+
 public boolean isTypeReference() {
 	return false;
 }
@@ -1075,14 +1118,7 @@
 }
 
 public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
-
-	if (/* (this.bits & IsNonNull) != 0 || */
-		this.constant != null && this.constant != Constant.NotAConstant)
-		return FlowInfo.NON_NULL; // constant expression cannot be null
-
-	LocalVariableBinding local = localVariableBinding();
-	if (local != null)
-		return flowInfo.nullStatus(local);
+	// many kinds of expression need no analysis / are always non-null, make it the default:
 	return FlowInfo.NON_NULL;
 }
 
@@ -1184,7 +1220,7 @@
 	setExpectedType(expectedType); // needed in case of generic method invocation
 	TypeBinding expressionType = this.resolveType(scope);
 	if (expressionType == null) return null;
-	if (expressionType == expectedType) return expressionType;
+	if (TypeBinding.equalsEquals(expressionType, expectedType)) return expressionType;
 
 	if (!expressionType.isCompatibleWith(expectedType)) {
 		if (scope.isBoxingCompatibleWith(expressionType, expectedType)) {
@@ -1211,12 +1247,12 @@
 			if (field.type.isRawType()) {
 				if (referenceContext instanceof AbstractMethodDeclaration) {
 					AbstractMethodDeclaration methodDecl = (AbstractMethodDeclaration) referenceContext;
-					if (field.declaringClass != methodDecl.binding.declaringClass) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
+					if (TypeBinding.notEquals(field.declaringClass, methodDecl.binding.declaringClass)) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
 						return true;
 					}
 				} else if (referenceContext instanceof TypeDeclaration) {
 					TypeDeclaration type = (TypeDeclaration) referenceContext;
-					if (field.declaringClass != type.binding) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
+					if (TypeBinding.notEquals(field.declaringClass, type.binding)) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
 						return true;
 					}
 				}
@@ -1236,12 +1272,12 @@
 		if (field.type.isRawType()) {
 			if (referenceContext instanceof AbstractMethodDeclaration) {
 				AbstractMethodDeclaration methodDecl = (AbstractMethodDeclaration) referenceContext;
-				if (field.declaringClass != methodDecl.binding.declaringClass) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
+				if (TypeBinding.notEquals(field.declaringClass, methodDecl.binding.declaringClass)) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
 					return true;
 				}
 			} else if (referenceContext instanceof TypeDeclaration) {
 				TypeDeclaration type = (TypeDeclaration) referenceContext;
-				if (field.declaringClass != type.binding) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
+				if (TypeBinding.notEquals(field.declaringClass, type.binding)) { // inherited raw field, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=337962
 					return true;
 				}
 			}
@@ -1279,6 +1315,41 @@
     // do nothing by default
 }
 
+public void setExpressionContext(ExpressionContext context) {
+	// don't care. Subclasses that are poly expressions in specific contexts should listen in and make note.
+}
+
+public boolean isCompatibleWith(TypeBinding left, Scope scope) {
+	throw new UnsupportedOperationException("Unexpected control flow, should not have reached Expression.isCompatibleWith"); //$NON-NLS-1$
+}
+
+public boolean tIsMoreSpecific(TypeBinding t, TypeBinding s) {
+	TypeBinding expressionType = this.resolvedType;
+	if (expressionType == null || !expressionType.isValidBinding()) // Shouldn't get here, just to play it safe
+		return false; // trigger ambiguity.
+	
+	if (TypeBinding.equalsEquals(t.findSuperTypeOriginatingFrom(s), s))
+		return true;
+	
+	final boolean tIsBaseType = t.isBaseType();
+	final boolean sIsBaseType = s.isBaseType();
+	
+	return expressionType.isBaseType() ? tIsBaseType && !sIsBaseType : !tIsBaseType && sIsBaseType;
+}
+
+public void tagAsEllipsisArgument() {
+	// don't care. Subclasses that are poly expressions in specific contexts should listen in and make note.
+}
+
+/* Answer if the receiver is a poly expression in the prevailing context. Caveat emptor: Some constructs (notably method calls)
+   cannot answer this question until after resolution is over and may throw unsupported operation exception if queried ahead of 
+   resolution. Default implementation here returns false which is true for vast majority of AST nodes. The ones that are poly
+   expressions under one or more contexts should override and return suitable value.  
+ */
+public boolean isPolyExpression() throws UnsupportedOperationException {
+	return false;
+}
+
 public void tagAsNeedCheckCast() {
     // do nothing by default
 }
@@ -1321,13 +1392,19 @@
 public void traverse(ASTVisitor visitor, ClassScope scope) {
 	// nothing to do
 }
+// return true if this expression can be a stand alone statement when terminated with a semicolon
+public boolean statementExpression() {
+	return false;
+}
 
 /**
  * Used on the lhs of an assignment for detecting null spec violation.
  * If this expression represents a null-annotated variable return the variable binding,
  * otherwise null.
+ * @param supportTypeAnnotations if true this causes any variable binding to be used
+ *   independent of declaration annotations (for in-depth analysis of type annotations)
 */
-public VariableBinding nullAnnotatedVariableBinding() {
+public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations) {
 	return null;
 }
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
new file mode 100644
index 0000000..6fe1a8a
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+public interface ExpressionContext {
+	
+	/* Assignment context: potential poly-expressions are: method invocations, lambdas, reference expressions, 
+	   conditional expressions and allocation expressions. This is the only Java 7 context where target type
+	   influenced evaluation of some expression.
+	   
+	   Context induced by: ReturnStatement, ArrayInitializer, Assignment, FieldDeclaration and LocalDeclaration. 
+	*/
+	public static final ExpressionContext ASSIGNMENT_CONTEXT = 
+								new ExpressionContext() {
+									public String toString() {
+										return "assignment context"; //$NON-NLS-1$
+									}
+								};
+	
+	/* Invocation context: potential poly-expressions are: method invocations, lambdas, reference expressions, 
+	   conditional expressions and allocation expressions. At this point, we don't distinguish between strict 
+	   and loose invocation contexts - we may have to cross the bridge some day.
+	   
+	   Context induced by: AllocationExpression, QualifiedAllocationExpression, ExplicitConstructorCall, MessageSend
+	   CodeSnippetAllocationExpression and CodeSnippetMessageSend.
+	*/													
+	public static final ExpressionContext INVOCATION_CONTEXT = 
+								new ExpressionContext() {
+									public String toString() {
+										return "invocation context"; //$NON-NLS-1$
+									}
+								};
+	
+	/* Casting context: potential poly-expressions are: lambdas and reference expressions
+	   Context induced by: CastExpression.
+	*/
+	public static final ExpressionContext CASTING_CONTEXT = 
+								new ExpressionContext() {
+									public String toString() {
+										return "casting context"; //$NON-NLS-1$
+									}
+								};
+	
+	/* Vanilla context (string, numeric): potential poly-expressions are: NONE. This is the nonpoly context in which 
+	   expressions get evaluated, unless they feature in one of the above contexts. 
+	*/
+	public static final ExpressionContext VANILLA_CONTEXT = 
+								new ExpressionContext() {
+									public String toString() {
+										return "vanilla context"; //$NON-NLS-1$
+									}
+								};
+		
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
index 3dc5fc9..617379f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
@@ -4,8 +4,11 @@
  * 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
- * $Id: FieldDeclaration.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -14,13 +17,18 @@
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *								Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.List;
+
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.impl.*;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference.AnnotationCollector;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
@@ -161,7 +169,13 @@
 	}
 	codeStream.recordPositionsFrom(pc, this.sourceStart);
 }
-
+public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
+	AnnotationCollector collector = new AnnotationCollector(this.type, targetType, allAnnotationContexts);
+	for (int i = 0, max = this.annotations.length; i < max; i++) {
+		Annotation annotation = this.annotations[i];
+		annotation.traverse(collector, (BlockScope) null);
+	}
+}
 /**
  * @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
  */
@@ -253,6 +267,17 @@
 		initializationScope.lastVisibleFieldID = this.binding.id;
 
 		resolveAnnotations(initializationScope, this.annotations, this.binding);
+		// Check if this declaration should now have the type annotations bit set
+		if (this.annotations != null) {
+			for (int i = 0, max = this.annotations.length; i < max; i++) {
+				TypeBinding resolvedAnnotationType = this.annotations[i].resolvedType;
+				if (resolvedAnnotationType != null && (resolvedAnnotationType.getAnnotationTagBits() & TagBits.AnnotationForTypeUse) != 0) {
+					this.bits |= ASTNode.HasTypeAnnotations;
+					break;
+				}
+			}
+		}
+		
 		// check @Deprecated annotation presence
 		if ((this.binding.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0
 				&& (this.binding.modifiers & ClassFileConstants.AccDeprecated) != 0
@@ -273,6 +298,7 @@
         	Config oldConfig = Config.createOrResetConfig(this);
 			try {
 // SH}
+			this.initialization.setExpressionContext(ASSIGNMENT_CONTEXT);
 			this.initialization.setExpectedType(fieldType); // needed in case of generic method invocation
 			if (this.initialization instanceof ArrayInitializer) {
 
@@ -282,7 +308,7 @@
 				}
 			} else if ((initializationType = this.initialization.resolveType(initializationScope)) != null) {
 
-				if (fieldType != initializationType) // must call before computeConversion() and typeMismatchError()
+				if (TypeBinding.notEquals(fieldType, initializationType)) // must call before computeConversion() and typeMismatchError()
 					initializationScope.compilationUnitScope().recordTypeConversion(fieldType, initializationType);
 				if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, fieldType)
 						|| initializationType.isCompatibleWith(fieldType, classScope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
index 22149ad..7b049bd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
@@ -4,7 +4,6 @@
  * 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
- * $Id: FieldReference.java 23405 2010-02-03 17:02:18Z stephan $
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -167,7 +166,7 @@
 		if (   !isCompound
 			&& this.receiver.isThis()
 			&& !(this.receiver instanceof QualifiedThisReference)
-			&& this.receiver.resolvedType == this.binding.declaringClass // inherited fields are not tracked here
+			&& TypeBinding.equalsEquals(this.receiver.resolvedType, this.binding.declaringClass) // inherited fields are not tracked here
 			&& ((this.receiver.bits & ASTNode.ParenthesizedMASK) == 0)) { // (this).x is forbidden
 			flowInfo.markAsDefinitelyAssigned(this.binding);
 		}		
@@ -335,7 +334,7 @@
 		if (isThisReceiver) {
 			if (isStatic){
 				// if no valueRequired, still need possible side-effects of <clinit> invocation, if field belongs to different class
-				if (this.binding.original().declaringClass != this.actualReceiverType.erasure()) {
+				if (TypeBinding.notEquals(this.binding.original().declaringClass, this.actualReceiverType.erasure())) {
 					MethodBinding accessor = this.syntheticAccessors == null ? null : this.syntheticAccessors[FieldReference.READ];
 					if (accessor == null) {
 						TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
@@ -562,7 +561,7 @@
 	// if field from parameterized type got found, use the original field at codegen time
 	FieldBinding codegenBinding = this.binding.original();
 	if (this.binding.isPrivate()) {
-		if ((currentScope.enclosingSourceType() != codegenBinding.declaringClass)
+		if ((TypeBinding.notEquals(currentScope.enclosingSourceType(), codegenBinding.declaringClass))
 				&& this.binding.constant() == Constant.NotAConstant) {
 			if (this.syntheticAccessors == null)
 				this.syntheticAccessors = new MethodBinding[2];
@@ -715,7 +714,7 @@
 // SH}
 	if (receiverCast) {
 		 // due to change of declaring class with receiver type, only identity cast should be notified
-		if (((CastExpression)this.receiver).expression.resolvedType == this.actualReceiverType) {
+		if (TypeBinding.equalsEquals(((CastExpression)this.receiver).expression.resolvedType, this.actualReceiverType)) {
 				scope.problemReporter().unnecessaryCast((CastExpression)this.receiver);
 		}
 	}
@@ -785,7 +784,7 @@
 	TypeBinding oldReceiverType = this.actualReceiverType;
 	this.actualReceiverType = this.actualReceiverType.getErasureCompatibleType(fieldBinding.declaringClass);
 	this.receiver.computeConversion(scope, this.actualReceiverType, this.actualReceiverType);
-	if (this.actualReceiverType != oldReceiverType && this.receiver.postConversionType(scope) != this.actualReceiverType) { // record need for explicit cast at codegen since receiver could not handle it
+	if (TypeBinding.notEquals(this.actualReceiverType, oldReceiverType) && TypeBinding.notEquals(this.receiver.postConversionType(scope), this.actualReceiverType)) { // record need for explicit cast at codegen since receiver could not handle it
 		this.bits |= NeedReceiverGenericCast;
 	}
 	if (isFieldUseDeprecated(fieldBinding, scope, this.bits)) {
@@ -802,7 +801,7 @@
 		}
 		ReferenceBinding declaringClass = this.binding.declaringClass;
 		if (!isImplicitThisRcv
-				&& declaringClass != this.actualReceiverType
+				&& TypeBinding.notEquals(declaringClass, this.actualReceiverType)
 				&& declaringClass.canBeSeenBy(scope)) {
 			scope.problemReporter().indirectAccessToStaticField(this, fieldBinding);
 		}
@@ -812,7 +811,7 @@
 			SourceTypeBinding sourceType = scope.enclosingSourceType();
 			if (this.constant == Constant.NotAConstant
 					&& !methodScope.isStatic
-					&& (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
+					&& (TypeBinding.equalsEquals(sourceType, declaringClass) || TypeBinding.equalsEquals(sourceType.superclass, declaringClass)) // enum constant body
 					&& methodScope.isInsideInitializerOrConstructor()) {
 				scope.problemReporter().enumStaticFieldUsedDuringInitialization(this.binding, this);
 			}
@@ -889,10 +888,12 @@
 	visitor.endVisit(this, scope);
 }
 
-public VariableBinding nullAnnotatedVariableBinding() {
-	if (this.binding != null
-			&& ((this.binding.tagBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable)) != 0)) {
-		return this.binding;
+public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations) {
+	if (this.binding != null) {
+		if (supportTypeAnnotations
+				|| ((this.binding.tagBits & TagBits.AnnotationNullMASK) != 0)) {
+			return this.binding;
+		}
 	}
 	return null;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
index acfc3c5..11def6b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -14,6 +18,8 @@
  *								bug 365859 - [compiler][null] distinguish warnings based on flow analysis vs. null annotations
  *								bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
  *								bug 393719 - [compiler] inconsistent warnings on iteration variables
+ *								Bug 411964 - [1.8][null] leverage null type annotation in foreach statement
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *     Jesper S Moller -  Contribution for
  *								bug 401853 - Eclipse Java compiler creates invalid bytecode (java.lang.VerifyError)
  *******************************************************************************/
@@ -121,11 +127,9 @@
 			condInfo.nullInfoLessUnconditionalCopy();
 		actionInfo.markAsDefinitelyUnknown(elementVarBinding);
 		if (currentScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled) {
-			// this currently produces an unavoidable warning against all @NonNull element vars:
-			int nullStatus = this.elementVariable.checkAssignmentAgainstNullAnnotation(currentScope, flowContext, 
-															elementVarBinding, FlowInfo.UNKNOWN, this.collection, this.collectionElementType);
-			// TODO (stephan): 	once we have JSR 308 fetch nullStatus from the collection element type
-			//              	and feed the result into the above check (instead of FlowInfo.UNKNOWN)
+			int elementNullStatus = FlowInfo.tagBitsToNullStatus(this.collectionElementType.tagBits);
+			int nullStatus = NullAnnotationMatching.checkAssignment(currentScope, flowContext, elementVarBinding, elementNullStatus,
+																		this.collection, this.collectionElementType);
 			if ((elementVarBinding.type.tagBits & TagBits.IsBaseType) == 0) {
 				actionInfo.markNullStatus(elementVarBinding, nullStatus);
 			}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
new file mode 100644
index 0000000..b2e589d
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
@@ -0,0 +1,176 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - Contributions for
+ *							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335        
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.DefaultErrorHandlingPolicies;
+import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
+import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
+import org.eclipse.jdt.internal.compiler.lookup.RawTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBindingVisitor;
+import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+
+public abstract class FunctionalExpression extends Expression {
+	
+	TypeBinding expectedType;
+	public MethodBinding descriptor;
+	public MethodBinding binding;                 // Code generation binding. May include synthetics. See getMethodBinding()
+	protected MethodBinding actualMethodBinding;  // void of synthetics.
+	boolean ignoreFurtherInvestigation;
+	protected ExpressionContext expressionContext = VANILLA_CONTEXT;
+	protected SimpleLookupTable resultExpressions;
+	protected boolean hasIgnoredMandatoryErrors = false;
+	protected CompilationResult compilationResult;
+	protected BlockScope enclosingScope;
+	protected boolean ellipsisArgument;
+	protected static IErrorHandlingPolicy silentErrorHandlingPolicy = DefaultErrorHandlingPolicies.ignoreAllProblems();
+	
+	public FunctionalExpression(CompilationResult compilationResult) {
+		this.compilationResult = compilationResult;
+	}
+	// Return the actual (non-code generation) method binding that is void of synthetics.
+	public MethodBinding getMethodBinding() {
+		return null;
+	}
+	public void setExpectedType(TypeBinding expectedType) {
+		this.expectedType = this.ellipsisArgument ? ((ArrayBinding) expectedType).elementsType() : expectedType;
+	}
+	
+	public void setExpressionContext(ExpressionContext context) {
+		this.expressionContext = context;
+	}
+	
+	public void tagAsEllipsisArgument() {
+		this.ellipsisArgument = true;
+	}
+	public boolean isPolyExpression() {
+		return this.expressionContext != VANILLA_CONTEXT;
+	}
+
+	public TypeBinding expectedType() {
+		return this.expectedType;
+	}
+	
+	public TypeBinding resolveType(BlockScope blockScope) {
+		this.constant = Constant.NotAConstant;
+		MethodBinding sam = this.expectedType == null ? null : this.expectedType.getSingleAbstractMethod(blockScope);
+		if (sam == null) {
+			blockScope.problemReporter().targetTypeIsNotAFunctionalInterface(this);
+			return null;
+		}
+		if (!sam.isValidBinding()) {
+			switch (sam.problemId()) {
+				case ProblemReasons.NoSuchSingleAbstractMethod:
+					blockScope.problemReporter().targetTypeIsNotAFunctionalInterface(this);
+					break;
+				case ProblemReasons.NotAWellFormedParameterizedType:
+					blockScope.problemReporter().illFormedParameterizationOfFunctionalInterface(this);
+					break;
+				case ProblemReasons.IntersectionHasMultipleFunctionalInterfaces:
+					blockScope.problemReporter().multipleFunctionalInterfaces(this);
+					break;
+			}
+			return null;
+		}
+		
+		this.descriptor = sam;
+		if (kosherDescriptor(blockScope, sam, true)) {
+			return this.resolvedType = this.expectedType;		
+		}
+		
+		return this.resolvedType = null;
+	}
+
+	class VisibilityInspector extends TypeBindingVisitor {
+
+		private Scope scope;
+		private boolean shouldChatter;
+        private boolean visible = true;
+		private FunctionalExpression expression;
+        
+		public VisibilityInspector(FunctionalExpression expression, Scope scope, boolean shouldChatter) {
+			this.scope = scope;
+			this.shouldChatter = shouldChatter;
+			this.expression = expression;
+		}
+
+		private void checkVisibility(ReferenceBinding referenceBinding) {
+			if (!referenceBinding.canBeSeenBy(this.scope)) {
+				this.visible = false;
+				if (this.shouldChatter)
+					this.scope.problemReporter().descriptorHasInvisibleType(this.expression, referenceBinding);
+			}
+		}
+		
+		public boolean visit(ReferenceBinding referenceBinding) {
+			checkVisibility(referenceBinding);
+			return true;
+		}
+
+		
+		public boolean visit(ParameterizedTypeBinding parameterizedTypeBinding) {
+			checkVisibility(parameterizedTypeBinding);
+			return true;
+		}
+		
+		public boolean visit(RawTypeBinding rawTypeBinding) {
+			checkVisibility(rawTypeBinding);
+			return true;
+		}
+
+		public boolean visible(TypeBinding type) {
+			TypeBindingVisitor.visit(this, type);
+			return this.visible;
+		}
+
+		public boolean visible(TypeBinding[] types) {
+			TypeBindingVisitor.visit(this, types);
+			return this.visible;
+		}
+		
+	}
+
+	public boolean kosherDescriptor(Scope scope, MethodBinding sam, boolean shouldChatter) {
+	
+		VisibilityInspector inspector = new VisibilityInspector(this, scope, shouldChatter);
+		
+		boolean status = true;
+		
+		if (!inspector.visible(sam.returnType))
+			status = false;
+		if (!inspector.visible(sam.parameters))
+			status = false;
+		if (!inspector.visible(sam.thrownExceptions))
+			status = false;
+		
+		return status;
+	}
+
+	public int nullStatus(FlowInfo flowInfo) {
+		return FlowInfo.NON_NULL;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
index 7d70f0e..4bd5b2d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
@@ -113,15 +113,15 @@
 
 	// process the ELSE part
 	if (this.elseStatement != null) {
-	    // signal else clause unnecessarily nested, tolerate else-if code pattern
-	    if (thenFlowInfo == FlowInfo.DEAD_END
-	            && (this.bits & IsElseIfStatement) == 0 	// else of an else-if
-	            && !(this.elseStatement instanceof IfStatement)) {
+		// signal else clause unnecessarily nested, tolerate else-if code pattern
+		if (thenFlowInfo == FlowInfo.DEAD_END
+				&& (this.bits & IsElseIfStatement) == 0 	// else of an else-if
+				&& !(this.elseStatement instanceof IfStatement)) {
 //{ObjectTeams: silent for generated methods:
 	      if (!currentScope.isGeneratedScope())
 // SH}
-	        currentScope.problemReporter().unnecessaryElse(this.elseStatement);
-	    }
+			currentScope.problemReporter().unnecessaryElse(this.elseStatement);
+		}
 		// Save info for code gen
 		this.elseInitStateIndex = currentScope.methodScope().recordInitializationStates(elseFlowInfo);
 		if (isConditionOptimizedTrue || ((this.bits & ASTNode.IsElseStatementUnreachable) != 0)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java
index dc2342a..cc1f5f3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java
@@ -82,12 +82,6 @@
 	}
 
 	public StringBuffer print(int tab, StringBuffer output, boolean withOnDemand) {
-//{ObjectTeams:
-		if (isStatic())
-			output.append("static "); //$NON-NLS-1$
-		else if (isBase())
-			output.append("base "); //$NON-NLS-1$
-// SH}
 		/* when withOnDemand is false, only the name is printed */
 		for (int i = 0; i < this.tokens.length; i++) {
 			if (i > 0) output.append('.');
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
index 6cb2c16..8a14ea4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
@@ -5,6 +5,9 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -87,7 +90,10 @@
 		if (this.modifiers != 0) {
 			printIndent(indent, output);
 			printModifiers(this.modifiers, output);
-			if (this.annotations != null) printAnnotations(this.annotations, output);
+			if (this.annotations != null) {
+				printAnnotations(this.annotations, output);
+				output.append(' ');
+			}
 			output.append("{\n"); //$NON-NLS-1$
 			if (this.block != null) {
 				this.block.printBody(indent, output);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index cabf550..d8a595c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: InstanceOfExpression.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -12,6 +15,12 @@
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -128,7 +137,7 @@
 // SH}
 	int pc = codeStream.position;
 	this.expression.generateCode(currentScope, codeStream, true);
-	codeStream.instance_of(this.type.resolvedType);
+	codeStream.instance_of(this.type, this.type.resolvedType);
 	if (valueRequired) {
 		codeStream.generateImplicitConversion(this.implicitConversion);
 	} else {
@@ -146,6 +155,9 @@
 	this.constant = Constant.NotAConstant;
 	TypeBinding expressionType = this.expression.resolveType(scope);
 	TypeBinding checkedType = this.type.resolveType(scope, true /* check bounds*/);
+	if (expressionType != null && checkedType != null && NullAnnotationMatching.analyse(checkedType, expressionType, -1).isAnyMismatch()) {
+		scope.problemReporter().nullAnnotationUnsupportedLocation(this.type);
+	}
 	if (expressionType == null || checkedType == null)
 		return null;
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
new file mode 100644
index 0000000..78645d0
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+
+public class IntersectionCastTypeReference extends TypeReference {
+	public TypeReference[] typeReferences;
+
+	public IntersectionCastTypeReference(TypeReference[] typeReferences) {
+		this.typeReferences = typeReferences;
+		this.sourceStart = typeReferences[0].sourceStart;
+		int length = typeReferences.length;
+		this.sourceEnd = typeReferences[length - 1].sourceEnd;
+		for (int i = 0, max = typeReferences.length; i < max; i++) {
+			if ((typeReferences[i].bits & ASTNode.HasTypeAnnotations) != 0) {
+				this.bits |= ASTNode.HasTypeAnnotations;
+				break;
+			}
+		}
+	}
+
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
+		throw new UnsupportedOperationException(); // no syntax for this.
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getLastToken()
+	 */
+	public char[] getLastToken() {
+		return null;
+	}
+
+	/**
+	 * @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
+	 */
+	protected TypeBinding getTypeBinding(Scope scope) {
+		return null; // not supported here - combined with resolveType(...)
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
+	 */
+	public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {
+
+		int length = this.typeReferences.length;
+		ReferenceBinding[] intersectingTypes = new ReferenceBinding[length];
+		boolean hasError = false;
+		
+		int typeCount = 0;
+		nextType:
+		for (int i = 0; i < length; i++) {
+			final TypeReference typeReference = this.typeReferences[i];
+			TypeBinding type = typeReference.resolveType(scope, checkBounds);
+			if (type == null || ((type.tagBits & TagBits.HasMissingType) != 0)) {
+				hasError = true;
+				continue;
+			}
+			if (i == 0) {
+				if (type.isBaseType()) { // rejected in grammar for i > 0
+					scope.problemReporter().onlyReferenceTypesInIntersectionCast(typeReference);
+					hasError = true;
+					continue;
+				}
+				if (type.isArrayType()) { // javac rejects the pedantic cast: (X[] & Serializable & Cloneable) new X[0], what is good for the goose ...
+					scope.problemReporter().illegalArrayTypeInIntersectionCast(typeReference);
+					hasError = true;
+					continue;
+				}
+			} else if (!type.isInterface()) {
+				scope.problemReporter().boundMustBeAnInterface(typeReference, type);
+				hasError = true;
+				continue;
+			}
+			for (int j = 0; j < typeCount; j++) {
+				final ReferenceBinding priorType = intersectingTypes[j];
+				if (TypeBinding.equalsEquals(priorType, type)) {
+					scope.problemReporter().duplicateBoundInIntersectionCast(typeReference);
+					hasError = true;
+					continue;
+				}
+				if (!priorType.isInterface())
+					continue;
+				if (type.findSuperTypeOriginatingFrom(priorType) != null) {
+					intersectingTypes[j] = (ReferenceBinding) type;
+					continue nextType;
+				}
+				if (priorType.findSuperTypeOriginatingFrom(type) != null)
+					continue nextType;
+			}
+			intersectingTypes[typeCount++] = (ReferenceBinding) type;
+		}
+		if (hasError) {
+			return null;
+		}
+		if (typeCount != length) {
+			if (typeCount == 1) {
+				return this.resolvedType = intersectingTypes[0];
+			}
+			System.arraycopy(intersectingTypes, 0, intersectingTypes = new ReferenceBinding[typeCount], 0, typeCount);
+		}
+		return (this.resolvedType = scope.environment().createIntersectionCastType(intersectingTypes));
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeName()
+	 */
+	public char[][] getTypeName() {
+		// we need to keep a return value that is a char[][]
+		return this.typeReferences[0].getTypeName();
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
+	 */
+	public void traverse(ASTVisitor visitor, BlockScope scope) {
+		if (visitor.visit(this, scope)) {
+			int length = this.typeReferences == null ? 0 : this.typeReferences.length;
+			for (int i = 0; i < length; i++) {
+				this.typeReferences[i].traverse(visitor, scope);
+			}
+		}
+		visitor.endVisit(this, scope);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.ClassScope)
+	 */
+	public void traverse(ASTVisitor visitor, ClassScope scope) {
+		throw new UnsupportedOperationException("Unexpected traversal request: IntersectionTypeReference in class scope"); //$NON-NLS-1$
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.internal.compiler.ast.Expression#printExpression(int, java.lang.StringBuffer)
+	 */
+	public StringBuffer printExpression(int indent, StringBuffer output) {
+		int length = this.typeReferences == null ? 0 : this.typeReferences.length;
+		printIndent(indent, output);
+		for (int i = 0; i < length; i++) {
+			this.typeReferences[i].printExpression(0, output);
+			if (i != length - 1) {
+				output.append(" & "); //$NON-NLS-1$
+			}
+		}
+		return output;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
index 96edbc1..7379f43 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
@@ -342,7 +342,7 @@
 						if (messageSend.binding != null && messageSend.binding.isValidBinding() && messageSend.actualReceiverType instanceof ReferenceBinding) {
 							ReferenceBinding methodReceiverType = (ReferenceBinding) messageSend.actualReceiverType;
 							TypeBinding superType = methDecl.binding.declaringClass.findSuperTypeOriginatingFrom(methodReceiverType);
-							if (superType != null && superType.original() != methDecl.binding.declaringClass && CharOperation.equals(messageSend.selector, methDecl.selector)) {
+							if (superType != null && TypeBinding.notEquals(superType.original(), methDecl.binding.declaringClass) && CharOperation.equals(messageSend.selector, methDecl.selector)) {
 								if (methScope.environment().methodVerifier().doesMethodOverride(methDecl.binding, messageSend.binding.original())) {
 									superRef = true;
 								}
@@ -355,7 +355,7 @@
 					if (allocationExpr.binding != null && allocationExpr.binding.isValidBinding()) {
 						ReferenceBinding allocType = (ReferenceBinding) allocationExpr.resolvedType.original();
 						ReferenceBinding superType = (ReferenceBinding) methDecl.binding.declaringClass.findSuperTypeOriginatingFrom(allocType);
-						if (superType != null && superType.original() != methDecl.binding.declaringClass) {
+						if (superType != null && TypeBinding.notEquals(superType.original(), methDecl.binding.declaringClass)) {
 							MethodBinding superConstructor = methScope.getConstructor(superType, methDecl.binding.parameters, allocationExpr);
 							if (superConstructor.isValidBinding() && superConstructor.original() == allocationExpr.binding.original()) {
 								if (superConstructor.areParametersEqual(methDecl.binding)) {
@@ -668,7 +668,7 @@
 							// Verify duplicated tags
 							boolean duplicate = false;
 							for (int j = 0; j < i && !duplicate; j++) {
-								if (bindings[j] == param.resolvedType) {
+								if (TypeBinding.equalsEquals(bindings[j], param.resolvedType)) {
 									scope.problemReporter().javadocDuplicatedParamTag(param.token, param.sourceStart, param.sourceEnd, modifiers);
 									duplicate = true;
 								}
@@ -687,7 +687,7 @@
 					TypeParameter parameter = parameters[i];
 					boolean found = false;
 					for (int j = 0; j < paramTypeParamLength && !found; j++) {
-						if (parameter.binding == bindings[j]) {
+						if (TypeBinding.equalsEquals(parameter.binding, bindings[j])) {
 							found = true;
 							bindings[j] = null;
 						}
@@ -742,7 +742,7 @@
 					ReferenceBinding exceptionBinding = md.binding.thrownExceptions[i];
 					if (exceptionBinding != null && exceptionBinding.isValidBinding()) { // flag only valid class name
 						int j=i;
-						while (j<thrownExceptionLength && exceptionBinding != md.thrownExceptions[j].resolvedType) j++;
+						while (j<thrownExceptionLength && TypeBinding.notEquals(exceptionBinding, md.thrownExceptions[j].resolvedType)) j++;
 						if (j<thrownExceptionLength) {
 							methScope.problemReporter().javadocMissingThrowsTag(md.thrownExceptions[j], md.binding.modifiers);
 						}
@@ -773,7 +773,7 @@
 				for (int j = 0; j < maxRef && !found; j++) {
 					if (typeReferences[j] != null) {
 						TypeBinding typeBinding = typeReferences[j].resolvedType;
-						if (exceptionBinding == typeBinding) {
+						if (TypeBinding.equalsEquals(exceptionBinding, typeBinding)) {
 							found = true;
 							typeReferences[j] = null;
 						}
@@ -782,7 +782,7 @@
 				if (!found && reportMissing) {
 					if (exceptionBinding != null && exceptionBinding.isValidBinding()) { // flag only valid class name
 						int k=i;
-						while (k<thrownExceptionLength && exceptionBinding != md.thrownExceptions[k].resolvedType) k++;
+						while (k<thrownExceptionLength && TypeBinding.notEquals(exceptionBinding, md.thrownExceptions[k].resolvedType)) k++;
 						if (k<thrownExceptionLength) {
 							methScope.problemReporter().javadocMissingThrowsTag(md.thrownExceptions[k], md.binding.modifiers);
 						}
@@ -856,7 +856,7 @@
 					topLevelScope = topLevelScope.outerMostClassScope();
 					if (typeReference instanceof JavadocSingleTypeReference) {
 						// inner class single reference can only be done in same unit
-						if ((!source15 && depth == 1) || topLevelType != topLevelScope.referenceContext.binding) {
+						if ((!source15 && depth == 1) || TypeBinding.notEquals(topLevelType, topLevelScope.referenceContext.binding)) {
 							// search for corresponding import
 							boolean hasValidImport = false;
 							if (source15) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java
index a5022f4..005fcc8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java
@@ -128,8 +128,8 @@
 			if (paramMethodBinding.hasSubstitutedParameters()) {
 				int length = argumentTypes.length;
 				for (int i=0; i<length; i++) {
-					if (paramMethodBinding.parameters[i] != argumentTypes[i] &&
-							paramMethodBinding.parameters[i].erasure() != argumentTypes[i].erasure()) {
+					if (TypeBinding.notEquals(paramMethodBinding.parameters[i], argumentTypes[i]) &&
+							TypeBinding.notEquals(paramMethodBinding.parameters[i].erasure(), argumentTypes[i].erasure())) {
 						MethodBinding problem = new ProblemMethodBinding(this.binding, this.binding.selector, argumentTypes, ProblemReasons.NotFound);
 						scope.problemReporter().javadocInvalidConstructor(this, problem, scope.getDeclarationModifiers());
 						break;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
index 696a693..cfb139c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -24,10 +28,8 @@
 		this.sourceStart = pos;
 		this.sourceEnd = pos;
 	}
-	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#copyDims(int)
-	 */
-	public TypeReference copyDims(int dim) {
+	
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
 		return null;
 	}
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
index 65f5b3b..ef5ed42 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
@@ -187,7 +187,7 @@
 		} else {
 			int length = argumentTypes.length;
 			for (int i=0; i<length; i++) {
-				if (this.binding.parameters[i].erasure() != argumentTypes[i].erasure()) {
+				if (TypeBinding.notEquals(this.binding.parameters[i].erasure(), argumentTypes[i].erasure())) {
 					MethodBinding problem = new ProblemMethodBinding(this.binding, this.selector, argumentTypes, ProblemReasons.NotFound);
 					scope.problemReporter().javadocInvalidMethod(this, problem, scope.getDeclarationModifiers());
 					break;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
new file mode 100644
index 0000000..e6ffe70
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
@@ -0,0 +1,807 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - Contributions for
+ *							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *							bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
+ *							Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
+ *     Stephan Herrmann - Contribution for
+ *							bug 401030 - [1.8][null] Null analysis support for lambda methods.
+ *							Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *							Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.core.compiler.IProblem;
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.ClassFile;
+import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.jdt.internal.compiler.flow.ExceptionHandlingFlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Binding;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
+import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
+import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
+import org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.SyntheticArgumentBinding;
+import org.eclipse.jdt.internal.compiler.lookup.SyntheticMethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
+import org.eclipse.jdt.internal.compiler.parser.Parser;
+import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
+import org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit;
+import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
+import org.eclipse.jdt.internal.compiler.problem.AbortType;
+import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+
+public class LambdaExpression extends FunctionalExpression implements ReferenceContext, ProblemSeverities {
+	public Argument [] arguments;
+	public Statement body;
+	public boolean hasParentheses;
+	public MethodScope scope;
+	private boolean voidCompatible = true;
+	private boolean valueCompatible = false;
+	private boolean shapeAnalysisComplete = false;
+	private boolean returnsValue;
+	private boolean returnsVoid;
+	private boolean throwsException;
+	private LambdaExpression original = this;
+	private SyntheticArgumentBinding[] outerLocalVariables = NO_SYNTHETIC_ARGUMENTS;
+	private int outerLocalVariablesSlotSize = 0;
+	public boolean shouldCaptureInstance = false;
+	private static final SyntheticArgumentBinding [] NO_SYNTHETIC_ARGUMENTS = new SyntheticArgumentBinding[0];
+	
+	public LambdaExpression(CompilationResult compilationResult, Argument [] arguments, Statement body) {
+		super(compilationResult);
+		this.arguments = arguments != null ? arguments : ASTNode.NO_ARGUMENTS;
+		this.body = body;
+	}
+	
+	protected FunctionalExpression original() {
+		return this.original;
+	}
+	
+	public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+		if (this.shouldCaptureInstance) {
+			this.binding.modifiers &= ~ClassFileConstants.AccStatic;
+		} else {
+			this.binding.modifiers |= ClassFileConstants.AccStatic;
+		}
+		SourceTypeBinding sourceType = currentScope.enclosingSourceType();
+		this.binding = sourceType.addSyntheticMethod(this);
+		int pc = codeStream.position;
+		StringBuffer signature = new StringBuffer();
+		signature.append('(');
+		if (this.shouldCaptureInstance) {
+			codeStream.aload_0();
+			signature.append(sourceType.signature());
+		}
+		for (int i = 0, length = this.outerLocalVariables == null ? 0 : this.outerLocalVariables.length; i < length; i++) {
+			SyntheticArgumentBinding syntheticArgument = this.outerLocalVariables[i];
+			if (this.shouldCaptureInstance) {
+				syntheticArgument.resolvedPosition++;
+			}
+			signature.append(syntheticArgument.type.signature());
+			LocalVariableBinding capturedOuterLocal = syntheticArgument.actualOuterLocalVariable;
+			VariableBinding[] path = currentScope.getEmulationPath(capturedOuterLocal);
+			codeStream.generateOuterAccess(path, this, capturedOuterLocal, currentScope);
+		}
+		signature.append(')');
+		signature.append(this.expectedType.signature());
+		int invokeDynamicNumber = codeStream.classFile.recordBootstrapMethod(this);
+		codeStream.invokeDynamic(invokeDynamicNumber, (this.shouldCaptureInstance ? 1 : 0) + this.outerLocalVariablesSlotSize, 1, this.descriptor.selector, signature.toString().toCharArray());
+		codeStream.recordPositionsFrom(pc, this.sourceStart);		
+	}
+
+	public boolean kosherDescriptor(Scope currentScope, MethodBinding sam, boolean shouldChatter) {
+		if (sam.typeVariables != Binding.NO_TYPE_VARIABLES) {
+			if (shouldChatter)
+				currentScope.problemReporter().lambdaExpressionCannotImplementGenericMethod(this, sam);
+			return false;
+		}
+		return super.kosherDescriptor(currentScope, sam, shouldChatter);
+	}
+	
+	/* This code is arranged so that we can continue with as much analysis as possible while avoiding 
+	 * mine fields that would result in a slew of spurious messages. This method is a merger of:
+	 * @see org.eclipse.jdt.internal.compiler.lookup.MethodScope.createMethod(AbstractMethodDeclaration)
+	 * @see org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(MethodBinding)
+	 * @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(ClassScope)
+	 */
+	public TypeBinding resolveType(BlockScope blockScope) {
+		
+		this.constant = Constant.NotAConstant;
+		this.enclosingScope = blockScope;
+		
+		if (this.expectedType == null && this.expressionContext == INVOCATION_CONTEXT) {
+			return new PolyTypeBinding(this);
+		} 
+		
+		MethodScope methodScope = blockScope.methodScope();
+		this.scope = new MethodScope(blockScope, this, methodScope.isStatic);
+		this.scope.isConstructorCall = methodScope.isConstructorCall;
+
+		super.resolveType(blockScope); // compute & capture interface function descriptor in singleAbstractMethod.
+		
+		final boolean argumentsTypeElided = argumentsTypeElided();
+		final boolean haveDescriptor = this.descriptor != null;
+		
+		if (haveDescriptor && this.descriptor.typeVariables != Binding.NO_TYPE_VARIABLES) // already complained in kosher*
+			return null;
+		
+		if (!haveDescriptor && argumentsTypeElided) 
+			return null; // FUBAR, bail out...
+
+		this.binding = new MethodBinding(ClassFileConstants.AccPrivate | ClassFileConstants.AccSynthetic | ExtraCompilerModifiers.AccUnresolved,
+							TypeConstants.ANONYMOUS_METHOD, // will be fixed up later.
+							haveDescriptor ? this.descriptor.returnType : null, 
+							Binding.NO_PARAMETERS, // for now. 
+							haveDescriptor ? this.descriptor.thrownExceptions : Binding.NO_EXCEPTIONS, 
+							blockScope.enclosingSourceType());
+		this.binding.typeVariables = Binding.NO_TYPE_VARIABLES;
+		
+		if (haveDescriptor) {
+			int descriptorParameterCount = this.descriptor.parameters.length;
+			int lambdaArgumentCount = this.arguments != null ? this.arguments.length : 0;
+            if (descriptorParameterCount != lambdaArgumentCount) {
+            	this.scope.problemReporter().lambdaSignatureMismatched(this);
+            	if (argumentsTypeElided) 
+            		return null; // FUBAR, bail out ...
+            }
+		}
+		
+		boolean buggyArguments = false;
+		int length = this.arguments == null ? 0 : this.arguments.length;
+		TypeBinding[] newParameters = new TypeBinding[length];
+
+		AnnotationBinding [][] parameterAnnotations = null;
+		for (int i = 0; i < length; i++) {
+			Argument argument = this.arguments[i];
+			if (argument.isVarArgs()) {
+				if (i == length - 1) {
+					this.binding.modifiers |= ClassFileConstants.AccVarargs;
+				} else {
+					this.scope.problemReporter().illegalVarargInLambda(argument);
+					buggyArguments = true;
+				}
+			}
+			
+			TypeBinding parameterType;
+			final TypeBinding expectedParameterType = haveDescriptor && i < this.descriptor.parameters.length ? this.descriptor.parameters[i] : null;
+			parameterType = argumentsTypeElided ? expectedParameterType : argument.type.resolveType(this.scope, true /* check bounds*/);
+			if (parameterType == null) {
+				buggyArguments = true;
+			} else if (parameterType == TypeBinding.VOID) {
+				this.scope.problemReporter().argumentTypeCannotBeVoid(this, argument);
+				buggyArguments = true;
+			} else {
+				if (!parameterType.isValidBinding()) {
+					this.binding.tagBits |= TagBits.HasUnresolvedArguments;
+				}
+				if ((parameterType.tagBits & TagBits.HasMissingType) != 0) {
+					this.binding.tagBits |= TagBits.HasMissingType;
+				}
+				if (haveDescriptor && expectedParameterType != null && parameterType.isValidBinding() && TypeBinding.notEquals(parameterType, expectedParameterType)) {
+					this.scope.problemReporter().lambdaParameterTypeMismatched(argument, argument.type, expectedParameterType);
+				}
+
+				TypeBinding leafType = parameterType.leafComponentType();
+				if (leafType instanceof ReferenceBinding && (((ReferenceBinding) leafType).modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
+					this.binding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
+				newParameters[i] = argument.bind(this.scope, parameterType, false);				
+				if (argument.annotations != null) {
+					this.binding.tagBits |= TagBits.HasParameterAnnotations;
+					if (parameterAnnotations == null) {
+						parameterAnnotations = new AnnotationBinding[length][];
+						for (int j = 0; j < i; j++) {
+							parameterAnnotations[j] = Binding.NO_ANNOTATIONS;
+						}
+					}
+					parameterAnnotations[i] = argument.binding.getAnnotations();
+				} else if (parameterAnnotations != null) {
+					parameterAnnotations[i] = Binding.NO_ANNOTATIONS;
+				}
+			}
+		}
+		// only assign parameters if no problems are found
+		if (!buggyArguments) {
+			this.binding.parameters = newParameters;
+			if (parameterAnnotations != null)
+				this.binding.setParameterAnnotations(parameterAnnotations);
+		}
+	
+		if (!argumentsTypeElided && this.binding.isVarargs()) {
+			if (!this.binding.parameters[this.binding.parameters.length - 1].isReifiable()) {
+				this.scope.problemReporter().possibleHeapPollutionFromVararg(this.arguments[this.arguments.length - 1]);
+			}
+		}
+
+		ReferenceBinding [] exceptions = this.binding.thrownExceptions;
+		length = exceptions.length;
+		for (int i = 0; i < length; i++) {
+			ReferenceBinding exception = exceptions[i];
+			if ((exception.tagBits & TagBits.HasMissingType) != 0) {
+				this.binding.tagBits |= TagBits.HasMissingType;
+			}
+			this.binding.modifiers |= (exception.modifiers & ExtraCompilerModifiers.AccGenericSignature);
+		}
+		
+		TypeBinding returnType = this.binding.returnType;
+		if (returnType != null) {
+			if ((returnType.tagBits & TagBits.HasMissingType) != 0) {
+				this.binding.tagBits |= TagBits.HasMissingType;
+			}
+			TypeBinding leafType = returnType.leafComponentType();
+			if (leafType instanceof ReferenceBinding && (((ReferenceBinding) leafType).modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
+				this.binding.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
+		} // TODO (stephan): else? (can that happen?)
+
+		if (haveDescriptor && blockScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled) {
+			if (!argumentsTypeElided) {
+				AbstractMethodDeclaration.createArgumentBindings(this.arguments, this.binding, this.scope);
+				validateNullAnnotations();
+				// no application of null-ness default, hence also no warning regarding redundant null annotation
+				mergeParameterNullAnnotations(blockScope);
+			}
+			this.binding.tagBits |= (this.descriptor.tagBits & TagBits.AnnotationNullMASK);
+		}
+
+		this.binding.modifiers &= ~ExtraCompilerModifiers.AccUnresolved;
+		
+		if (this.body instanceof Expression) {
+			Expression expression = (Expression) this.body;
+			new ReturnStatement(expression, expression.sourceStart, expression.sourceEnd, true).resolve(this.scope); // :-) ;-)
+		} else {
+			this.body.resolve(this.scope);
+		}
+		return this.resolvedType;
+	}
+	
+	private boolean argumentsTypeElided() {
+		return this.arguments.length > 0 && this.arguments[0].hasElidedType();
+	}
+
+	private boolean doesNotCompleteNormally() {
+		return this.body.analyseCode(this.scope, 
+									 new ExceptionHandlingFlowContext(null, this, Binding.NO_EXCEPTIONS, null, this.scope, FlowInfo.DEAD_END), 
+									 FlowInfo.initial(this.scope.referenceType().maxFieldCount)) == FlowInfo.DEAD_END; 
+	}
+	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
+		
+		if (this.ignoreFurtherInvestigation) 
+			return flowInfo;
+		
+		FlowInfo lambdaInfo = flowInfo.copy(); // what happens in vegas, stays in vegas ...
+		ExceptionHandlingFlowContext methodContext =
+				new ExceptionHandlingFlowContext(
+						flowContext,
+						this,
+						this.binding.thrownExceptions,
+						null,
+						this.scope,
+						FlowInfo.DEAD_END);
+
+		// nullity and mark as assigned
+		MethodBinding methodWithParameterDeclaration = argumentsTypeElided() ? this.descriptor : this.binding;
+		AbstractMethodDeclaration.analyseArguments18(lambdaInfo, this.arguments, methodWithParameterDeclaration);
+
+		if (this.arguments != null) {
+			for (int i = 0, count = this.arguments.length; i < count; i++) {
+				this.bits |= (this.arguments[i].bits & ASTNode.HasTypeAnnotations);
+			}
+		}
+		
+		lambdaInfo = this.body.analyseCode(this.scope, methodContext, lambdaInfo);
+		
+		// check for missing returning path for block body's ...
+		if (this.body instanceof Block) {
+			TypeBinding returnTypeBinding = expectedResultType();
+			if ((returnTypeBinding == TypeBinding.VOID)) {
+				if ((lambdaInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0 || ((Block) this.body).statements == null) {
+					this.bits |= ASTNode.NeedFreeReturn;
+				}
+			} else {
+				if (lambdaInfo != FlowInfo.DEAD_END) {
+					this.scope.problemReporter().shouldReturn(returnTypeBinding, this);
+				}
+			}
+		} else { // Expression
+			if (currentScope.compilerOptions().isAnnotationBasedNullAnalysisEnabled 
+					&& flowInfo.reachMode() == FlowInfo.REACHABLE)
+			{
+				Expression expression = (Expression)this.body;
+				checkAgainstNullAnnotation(flowContext, expression, expression.nullStatus(flowInfo, flowContext));
+			}
+		}
+		return flowInfo;
+	}
+
+	// cf. AbstractMethodDeclaration.validateNullAnnotations()
+	// pre: !argumentTypeElided()
+	void validateNullAnnotations() {
+		// null annotations on parameters?
+		if (this.binding != null) {
+			int length = this.binding.parameters.length;
+			for (int i=0; i<length; i++) {
+				if (!this.scope.validateNullAnnotation(this.binding.returnType.tagBits, this.arguments[i].type, this.arguments[i].annotations))
+					this.binding.returnType = this.binding.returnType.unannotated();
+			}
+		}
+	}
+
+	// pre: !argumentTypeElided()
+	// try to merge null annotations from descriptor into binding, complaining about any incompatibilities found
+	private void mergeParameterNullAnnotations(BlockScope currentScope) {
+		LookupEnvironment env = currentScope.environment();
+		TypeBinding[] ourParameters = this.binding.parameters;
+		TypeBinding[] descParameters = this.descriptor.parameters;
+		int len = Math.min(ourParameters.length, descParameters.length);
+		for (int i = 0; i < len; i++) {
+			long ourTagBits = ourParameters[i].tagBits & TagBits.AnnotationNullMASK;
+			long descTagBits = descParameters[i].tagBits & TagBits.AnnotationNullMASK;
+			if (ourTagBits == 0L) {
+				if (descTagBits != 0L && !ourParameters[i].isBaseType()) {
+					AnnotationBinding [] annotations = descParameters[i].getTypeAnnotations();
+					for (int j = 0, length = annotations.length; j < length; j++) {
+						AnnotationBinding annotation = annotations[j];
+						if (annotation != null) {
+							switch (annotation.getAnnotationType().id) {
+								case TypeIds.T_ConfiguredAnnotationNullable :
+								case TypeIds.T_ConfiguredAnnotationNonNull :
+									ourParameters[i] = env.createAnnotatedType(ourParameters[i], new AnnotationBinding [] { annotation });
+									break;
+							}
+						}
+					}
+				}
+			} else if (ourTagBits != descTagBits) {
+				if (ourTagBits == TagBits.AnnotationNonNull) { // requested @NonNull not provided
+					char[][] inheritedAnnotationName = null;
+					if (descTagBits == TagBits.AnnotationNullable)
+						inheritedAnnotationName = env.getNullableAnnotationName();
+					currentScope.problemReporter().illegalRedefinitionToNonNullParameter(this.arguments[i], this.descriptor.declaringClass, inheritedAnnotationName);
+				}
+			}			
+		}
+	}
+
+	// simplified version of ReturnStatement.checkAgainstNullAnnotation()
+	void checkAgainstNullAnnotation(FlowContext flowContext, Expression expression, int nullStatus) {
+		if (nullStatus != FlowInfo.NON_NULL) {
+			// if we can't prove non-null check against declared null-ness of the descriptor method:
+			// Note that this.binding never has a return type declaration, always inherit null-ness from the descriptor
+			if ((this.descriptor.returnType.tagBits & TagBits.AnnotationNonNull) != 0) {
+				flowContext.recordNullityMismatch(this.scope, expression, expression.resolvedType, this.descriptor.returnType, nullStatus);
+			}
+		}
+	}
+
+	public StringBuffer printExpression(int tab, StringBuffer output) {
+		int parenthesesCount = (this.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+		String suffix = ""; //$NON-NLS-1$
+		for(int i = 0; i < parenthesesCount; i++) {
+			output.append('(');
+			suffix += ')';
+		}
+		output.append('(');
+		if (this.arguments != null) {
+			for (int i = 0; i < this.arguments.length; i++) {
+				if (i > 0) output.append(", "); //$NON-NLS-1$
+				this.arguments[i].print(0, output);
+			}
+		}
+		output.append(") -> " ); //$NON-NLS-1$
+		this.body.print(this.body instanceof Block ? tab : 0, output);
+		return output.append(suffix);
+	}
+
+	public TypeBinding expectedResultType() {
+		return this.descriptor != null && this.descriptor.isValidBinding() ? this.descriptor.returnType : null;
+	}
+	
+	public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+
+			if (visitor.visit(this, blockScope)) {
+				if (this.arguments != null) {
+					int argumentsLength = this.arguments.length;
+					for (int i = 0; i < argumentsLength; i++)
+						this.arguments[i].traverse(visitor, this.scope);
+				}
+
+				if (this.body != null) {
+					this.body.traverse(visitor, this.scope);
+				}
+			}
+			visitor.endVisit(this, blockScope);
+	}
+	
+	public MethodScope getScope() {
+		return this.scope;
+	}
+		
+	protected boolean errorEqualsIncompatibility() {
+		return this.original.shapeAnalysisComplete; // so as not to abort shape analysis.
+	}
+	
+	public boolean isCompatibleWith(final TypeBinding left, final Scope someScope) {
+		
+		final MethodBinding sam = left.getSingleAbstractMethod(this.enclosingScope);
+		
+		if (sam == null || !sam.isValidBinding())
+			return false;
+		if (sam.parameters.length != this.arguments.length)
+			return false;
+		
+		if (!this.shapeAnalysisComplete && this.body instanceof Expression) {
+			Expression expression = (Expression) this.body;
+			this.voidCompatible = expression.statementExpression();
+			this.valueCompatible = true;
+			this.shapeAnalysisComplete = true;
+		}
+
+		if (this.shapeAnalysisComplete) {
+			if (squarePegInRoundHole(sam))
+				return false;
+		} 
+
+		IErrorHandlingPolicy oldPolicy = this.enclosingScope.problemReporter().switchErrorHandlingPolicy(silentErrorHandlingPolicy);
+		this.hasIgnoredMandatoryErrors = false;
+		try {
+			final LambdaExpression copy = copy();
+			if (copy == null)
+				return false;
+			copy.setExpressionContext(this.expressionContext);
+			copy.setExpectedType(left);
+			if (this.resultExpressions == null)
+				this.resultExpressions = new SimpleLookupTable(); // gather result expressions for most specific method analysis.
+			this.resultExpressions.put(left, new Expression[0]);
+			copy.resolveType(this.enclosingScope);
+			if (!this.shapeAnalysisComplete) {
+				boolean lambdaIsFubar = this.hasIgnoredMandatoryErrors; // capture now, before doesNotCompleteNormally which runs analyzeCode on lambda body *without* the enclosing context being analyzed 
+				if (!this.returnsVoid && !this.returnsValue && this.throwsException) {  // () -> { throw new Exception(); } is value compatible.
+					Block block = (Block) this.body;
+					final Statement[] statements = block.statements;
+					final int statementsLength = statements == null ? 0 : statements.length;
+					Statement ultimateStatement = statementsLength == 0 ? null : statements[statementsLength - 1];
+					this.valueCompatible = ultimateStatement instanceof ThrowStatement ? true: copy.doesNotCompleteNormally(); 
+				}
+				this.shapeAnalysisComplete = true;
+				if (squarePegInRoundHole(sam) || lambdaIsFubar)
+					return false;
+			}
+		} catch (IncongruentLambdaException e) {
+			return false;
+		} finally {
+			this.enclosingScope.problemReporter().switchErrorHandlingPolicy(oldPolicy);
+			this.hasIgnoredMandatoryErrors = false;
+		}
+		return true;
+	}
+	
+	public boolean tIsMoreSpecific(TypeBinding t, TypeBinding s) {
+		/* 15.12.2.5 t is more specific than s iff ... Some of the checks here are redundant by the very fact of control reaching here, 
+		   but have been left in for completeness/documentation sakes. These should be cheap anyways. 
+		*/
+		
+		// Both t and s are functional interface types ... 
+		MethodBinding tSam = t.getSingleAbstractMethod(this.enclosingScope);
+		if (tSam == null || !tSam.isValidBinding())
+			return false;
+		MethodBinding sSam = s.getSingleAbstractMethod(this.enclosingScope);
+		if (sSam == null || !sSam.isValidBinding())
+			return false;
+		
+		// t should neither be a subinterface nor a superinterface of s
+		if (t.findSuperTypeOriginatingFrom(s) != null || s.findSuperTypeOriginatingFrom(t) != null)
+			return false;
+
+		// If the lambda expression's parameters have inferred types, then the descriptor parameter types of t are the same as the descriptor parameter types of s.
+		if (argumentsTypeElided()) {
+			if (tSam.parameters.length != sSam.parameters.length)
+				return false;
+			for (int i = 0, length = tSam.parameters.length; i < length; i++) {
+				if (TypeBinding.notEquals(tSam.parameters[i], sSam.parameters[i]))
+					return false;
+			}
+		}
+		
+		// either the descriptor return type of s is void or ...
+		if (sSam.returnType.id == TypeIds.T_void)
+			return true;
+		
+		/* ... or for all result expressions in the lambda body (or for the body itself if the body is an expression), 
+           the descriptor return type of the capture of T is more specific than the descriptor return type of S.
+		*/
+		Expression [] returnExpressions = (Expression[]) this.resultExpressions.get(t); // should be same as for s
+		int returnExpressionsLength = returnExpressions == null ? 0 : returnExpressions.length;
+		if (returnExpressionsLength == 0)
+			return true; // as good as or as bad as false.
+		
+		t = t.capture(this.enclosingScope, this.sourceEnd);
+		tSam = t.getSingleAbstractMethod(this.enclosingScope);
+		for (int i = 0; i < returnExpressionsLength; i++) {
+			Expression resultExpression = returnExpressions[i];
+			if (!resultExpression.tIsMoreSpecific(tSam.returnType, sSam.returnType))
+				return false;
+		}
+		return true;
+	}
+
+	private boolean squarePegInRoundHole(final MethodBinding sam) {
+		if (sam.returnType.id == TypeIds.T_void) {
+			if (!this.voidCompatible)
+				return true;
+		} else {
+			if (!this.valueCompatible)
+				return true;
+		}
+		return false;
+	}
+
+	LambdaExpression copy() {
+		final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
+		final char[] source = this.compilationResult.getCompilationUnit().getContents();
+		LambdaExpression copy =  (LambdaExpression) parser.parseLambdaExpression(source, this.sourceStart, this.sourceEnd - this.sourceStart + 1, 
+										this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
+
+		if (copy != null) { // ==> syntax errors == null
+			copy.original = this;
+		}
+		return copy;
+	}
+
+	public void returnsExpression(Expression expression, TypeBinding resultType) {
+		if (this.original == this) // not in overload resolution context.
+			return;
+		if (expression != null) {
+			this.original.returnsValue = true;
+			this.original.voidCompatible = false;
+			this.original.valueCompatible = !this.original.returnsVoid;
+			if (resultType != null) {
+				Expression [] results = (Expression[]) this.original.resultExpressions.get(this.expectedType);
+				int resultsLength = results.length;
+				System.arraycopy(results, 0, results = new Expression[resultsLength + 1], 0, resultsLength);
+				results[resultsLength] = expression;
+			}
+		} else {
+			this.original.returnsVoid = true;
+			this.original.valueCompatible = false;
+			this.original.voidCompatible = !this.original.returnsValue;
+		}
+	}
+
+	public void throwsException(TypeBinding exceptionType) {
+		if (this.expressionContext != INVOCATION_CONTEXT)
+			return;
+		this.original.throwsException = true;
+	}
+	
+	public CompilationResult compilationResult() {
+		return this.compilationResult;
+	}
+
+	public void abort(int abortLevel, CategorizedProblem problem) {
+	
+		switch (abortLevel) {
+			case AbortCompilation :
+				throw new AbortCompilation(this.compilationResult, problem);
+			case AbortCompilationUnit :
+				throw new AbortCompilationUnit(this.compilationResult, problem);
+			case AbortType :
+				throw new AbortType(this.compilationResult, problem);
+			default :
+				throw new AbortMethod(this.compilationResult, problem);
+		}
+	}
+
+	public CompilationUnitDeclaration getCompilationUnitDeclaration() {
+		return this.enclosingScope == null ? null : this.enclosingScope.compilationUnitScope().referenceContext;
+	}
+
+	public boolean hasErrors() {
+		return this.ignoreFurtherInvestigation;
+	}
+
+	//{ObjectTeams: and remove it again:
+	public void resetErrorFlag() {
+		this.ignoreFurtherInvestigation = false;
+	}
+// SH}
+
+	public void tagAsHavingErrors() {
+		this.ignoreFurtherInvestigation = true;
+		Scope parent = this.enclosingScope.parent;
+		while (parent != null) {
+			switch(parent.kind) {
+				case Scope.CLASS_SCOPE:
+				case Scope.METHOD_SCOPE:
+					parent.referenceContext().tagAsHavingErrors();
+					return;
+				default:
+					parent = parent.parent;
+					break;
+			}
+		}
+	}
+	
+	public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
+		// 15.27.3 requires exception throw related errors to not influence congruence. Other errors should. Also don't abort shape analysis.
+		switch (problemId) {
+			case IProblem.UnhandledExceptionOnAutoClose:
+			case IProblem.UnhandledExceptionInDefaultConstructor:
+			case IProblem.UnhandledException:
+				return;
+			default: 
+				if (errorEqualsIncompatibility())
+					throw new IncongruentLambdaException();
+				this.original().hasIgnoredMandatoryErrors = true;
+				return;
+		}
+	}
+
+	public void generateCode(ClassScope classScope, ClassFile classFile) {
+		int problemResetPC = 0;
+		classFile.codeStream.wideMode = false;
+		boolean restart = false;
+		do {
+			try {
+				problemResetPC = classFile.contentsOffset;
+				this.generateCode(classFile);
+				restart = false;
+			} catch (AbortMethod e) {
+				// Restart code generation if possible ...
+				if (e.compilationResult == CodeStream.RESTART_IN_WIDE_MODE) {
+					// a branch target required a goto_w, restart code generation in wide mode.
+					classFile.contentsOffset = problemResetPC;
+					classFile.methodCount--;
+					classFile.codeStream.resetInWideMode(); // request wide mode
+					restart = true;
+				} else if (e.compilationResult == CodeStream.RESTART_CODE_GEN_FOR_UNUSED_LOCALS_MODE) {
+					classFile.contentsOffset = problemResetPC;
+					classFile.methodCount--;
+					classFile.codeStream.resetForCodeGenUnusedLocals();
+					restart = true;
+				} else {
+					throw new AbortType(this.compilationResult, e.problem);
+				}
+			}
+		} while (restart);
+	}
+	
+	public void generateCode(ClassFile classFile) {
+		classFile.generateMethodInfoHeader(this.binding);
+		int methodAttributeOffset = classFile.contentsOffset;
+		int attributeNumber = classFile.generateMethodInfoAttributes(this.binding);
+		int codeAttributeOffset = classFile.contentsOffset;
+		classFile.generateCodeAttributeHeader();
+		CodeStream codeStream = classFile.codeStream;
+		codeStream.reset(this, classFile);
+		// initialize local positions
+		this.scope.computeLocalVariablePositions(this.outerLocalVariablesSlotSize + (this.binding.isStatic() ? 0 : 1), codeStream);
+		if (this.outerLocalVariables != null) {
+			for (int i = 0, max = this.outerLocalVariables.length; i < max; i++) {
+				LocalVariableBinding argBinding;
+				codeStream.addVisibleLocalVariable(argBinding = this.outerLocalVariables[i]);
+				codeStream.record(argBinding);
+				argBinding.recordInitializationStartPC(0);
+			}
+		}
+		// arguments initialization for local variable debug attributes
+		if (this.arguments != null) {
+			for (int i = 0, max = this.arguments.length; i < max; i++) {
+				LocalVariableBinding argBinding;
+				codeStream.addVisibleLocalVariable(argBinding = this.arguments[i].binding);
+				argBinding.recordInitializationStartPC(0);
+			}
+		}
+		if (this.body instanceof Block) {
+			this.body.generateCode(this.scope, codeStream);
+			if ((this.bits & ASTNode.NeedFreeReturn) != 0) {
+				codeStream.return_();
+			}
+		} else {
+			Expression expression = (Expression) this.body;
+			expression.generateCode(this.scope, codeStream, true);
+			if (this.binding.returnType == TypeBinding.VOID) {
+				codeStream.return_();
+			} else {
+				codeStream.generateReturnBytecode(expression);
+			}
+		}
+		// local variable attributes
+		codeStream.exitUserScope(this.scope);
+		codeStream.recordPositionsFrom(0, this.sourceEnd); // WAS declarationSourceEnd.
+		try {
+			classFile.completeCodeAttribute(codeAttributeOffset);
+		} catch(NegativeArraySizeException e) {
+			throw new AbortMethod(this.scope.referenceCompilationUnit().compilationResult, null);
+		}
+		attributeNumber++;
+
+		classFile.completeMethodInfo(this.binding, methodAttributeOffset, attributeNumber);
+	}
+	
+	public void addSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
+		
+		if (this.original != this || this.binding == null) 
+			return; // Do not bother tracking outer locals for clones created during overload resolution.
+		
+		SyntheticArgumentBinding syntheticLocal = null;
+		int newSlot = this.outerLocalVariables.length;
+		for (int i = 0; i < newSlot; i++) {
+			if (this.outerLocalVariables[i].actualOuterLocalVariable == actualOuterLocalVariable)
+				return;
+		}
+		System.arraycopy(this.outerLocalVariables, 0, this.outerLocalVariables = new SyntheticArgumentBinding[newSlot + 1], 0, newSlot);
+		this.outerLocalVariables[newSlot] = syntheticLocal = new SyntheticArgumentBinding(actualOuterLocalVariable);
+		syntheticLocal.resolvedPosition = this.outerLocalVariablesSlotSize; // may need adjusting later if we need to generate an instance method for the lambda.
+		syntheticLocal.declaringScope = this.scope;
+		int parameterCount = this.binding.parameters.length;
+		TypeBinding [] newParameters = new TypeBinding[parameterCount + 1];
+		newParameters[newSlot] = actualOuterLocalVariable.type;
+		for (int i = 0, j = 0; i < parameterCount; i++, j++) {
+			if (i == newSlot) j++;
+			newParameters[j] = this.binding.parameters[i];
+		}
+		this.binding.parameters = newParameters;
+		switch (syntheticLocal.type.id) {
+			case TypeIds.T_long :
+			case TypeIds.T_double :
+				this.outerLocalVariablesSlotSize  += 2;
+				break;
+			default :
+				this.outerLocalVariablesSlotSize++;
+				break;
+		}		
+	}
+
+	public SyntheticArgumentBinding getSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
+		for (int i = 0, length = this.outerLocalVariables == null ? 0 : this.outerLocalVariables.length; i < length; i++)
+			if (this.outerLocalVariables[i].actualOuterLocalVariable == actualOuterLocalVariable)
+				return this.outerLocalVariables[i];
+		return null;
+	}
+
+	// Return the actual method binding devoid of synthetics. 
+	public MethodBinding getMethodBinding() {
+		if (this.actualMethodBinding == null) {
+			this.actualMethodBinding = new MethodBinding(this.binding.modifiers, this.binding.selector, this.binding.returnType, 
+					this.binding instanceof SyntheticMethodBinding ? this.descriptor.parameters : this.binding.parameters,  // retain any faults in parameter list.
+							this.binding.thrownExceptions, this.binding.declaringClass);
+			this.actualMethodBinding.tagBits = this.binding.tagBits;
+		}
+		return this.actualMethodBinding;
+	}
+}
+class IncongruentLambdaException extends RuntimeException {
+	private static final long serialVersionUID = 4145723509219836114L;
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
index 22ef5bc..4aa54cc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
@@ -4,8 +4,11 @@
  * 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
- * $Id: LocalDeclaration.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -24,13 +27,20 @@
  *							bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
  *							bug 383368 - [compiler][null] syntactic null analysis for field references
  *							bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
+ *							Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *							Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *     Jesper S Moller - Contributions for
  *							Bug 378674 - "The method can be declared as static" is wrong
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *							Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.List;
+
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.impl.*;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference.AnnotationCollector;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
@@ -93,42 +103,6 @@
 	if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
 		this.bits |= ASTNode.IsLocalDeclarationReachable; // only set if actually reached
 	}
-	if (this.binding != null && this.type.resolvedType instanceof TypeVariableBinding) {
-		TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.type.resolvedType;
-		MethodScope methodScope= this.binding.declaringScope.methodScope();
-		if (methodScope != null && methodScope.referenceContext instanceof TypeDeclaration) {
-			// initialization scope
-			methodScope = methodScope.enclosingMethodScope();
-		}
-		AbstractMethodDeclaration methodDeclaration = (methodScope != null) ? methodScope.referenceMethod() : null;
-		if (methodDeclaration != null && methodDeclaration.binding != null) {
-			TypeVariableBinding[] typeVariables = methodDeclaration.binding.typeVariables();
-			if (typeVariables == null) typeVariables = Binding.NO_TYPE_VARIABLES;
-			if (typeVariables == Binding.NO_TYPE_VARIABLES) {
-				// Method declares no type variables.
-				if (typeVariableBinding != null && typeVariableBinding.declaringElement instanceof TypeBinding)
-					currentScope.resetDeclaringClassMethodStaticFlag((TypeBinding) typeVariableBinding.declaringElement);
-				else
-					currentScope.resetEnclosingMethodStaticFlag();
-			} else {
-				// to check whether the resolved type for this is declared by enclosing method as a type variable
-				boolean usesEnclosingTypeVar = false; 
-				for (int i = 0; i < typeVariables.length ; i ++) {
-					if (typeVariables[i] == this.type.resolvedType){
-						usesEnclosingTypeVar = true;
-						break;
-					}
-				}
-				if (!usesEnclosingTypeVar) {
-					// uses a type variable not declared by enclosing method
-					if (typeVariableBinding != null && typeVariableBinding.declaringElement instanceof TypeBinding)
-						currentScope.resetDeclaringClassMethodStaticFlag((TypeBinding) typeVariableBinding.declaringElement);
-					else
-						currentScope.resetEnclosingMethodStaticFlag();
-				}
-			}
-		}
-	}
 //{ObjectTeams: pretend place holder is used:
 	if (this.isPlaceHolder)
 		this.binding.useFlag = LocalVariableBinding.USED;
@@ -169,7 +143,7 @@
 		this.bits &= ~FirstAssignmentToLocal;  // int i = (i = 0);
 	}
 	flowInfo.markAsDefinitelyAssigned(this.binding);
-	nullStatus = checkAssignmentAgainstNullAnnotation(currentScope, flowContext, this.binding, nullStatus, this.initialization, this.initialization.resolvedType);
+	nullStatus = NullAnnotationMatching.checkAssignment(currentScope, flowContext, this.binding, nullStatus, this.initialization, this.initialization.resolvedType);
 	if ((this.binding.type.tagBits & TagBits.IsBaseType) == 0) {
 		flowInfo.markNullStatus(this.binding, nullStatus);
 		// no need to inform enclosing try block since its locals won't get
@@ -253,6 +227,22 @@
 		return LOCAL_VARIABLE;
 	}
 
+	// for local variables
+	public void getAllAnnotationContexts(int targetType, LocalVariableBinding localVariable, List allAnnotationContexts) {
+		AnnotationCollector collector = new AnnotationCollector(this, targetType, localVariable, allAnnotationContexts);
+		this.traverse(collector, (BlockScope) null);
+	}
+	// for arguments
+	public void getAllAnnotationContexts(int targetType, int parameterIndex, List allAnnotationContexts) {
+		AnnotationCollector collector = new AnnotationCollector(this, targetType, parameterIndex, allAnnotationContexts);
+		this.traverse(collector, (BlockScope) null);
+	}
+	public boolean isArgument() {
+		return false;
+	}
+	public boolean isReceiver() {
+		return false;
+	}
 	public void resolve(BlockScope scope) {
 //{ObjectTeams: avoid duplicate resolving:
 	  TypeBinding variableType = null;
@@ -260,7 +250,7 @@
 		variableType = this.type.resolveType(scope, true /* check bounds*/);
 /* orig:
 		// create a binding and add it to the scope
-		TypeBinding variableType = type.resolveType(scope, true /* check bounds* /);
+		TypeBinding variableType = this.type.resolveType(scope, true /* check bounds* /);
   :giro */
 // SH}
 
@@ -272,6 +262,7 @@
 			variableType = RoleTypeCreator.maybeWrapUnqualifiedRoleType(variableType, typeScope, this);
 		}
 // SH}
+		this.bits |= (this.type.bits & ASTNode.HasTypeAnnotations);
 		checkModifiers();
 		if (variableType != null) {
 			if (variableType == TypeBinding.VOID) {
@@ -286,8 +277,11 @@
 
 		Binding existingVariable = scope.getBinding(this.name, Binding.VARIABLE, this, false /*do not resolve hidden field*/);
 		if (existingVariable != null && existingVariable.isValidBinding()){
-			if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) {
-				scope.problemReporter().redefineLocal(this);
+			boolean localExists = existingVariable instanceof LocalVariableBinding; 
+			if (localExists && (this.bits & ASTNode.ShadowsOuterLocal) != 0 && scope.isLambdaSubscope()) {
+					scope.problemReporter().lambdaRedeclaresLocal(this);
+			} else if (localExists && this.hiddenVariableDepth == 0) {
+					scope.problemReporter().redefineLocal(this);
 			} else {
 				scope.problemReporter().localVariableHiding(this, existingVariable, false);
 			}
@@ -322,13 +316,14 @@
 					this.initialization.computeConversion(scope, variableType, initializationType);
 				}
 			} else {
-			    this.initialization.setExpectedType(variableType);
+				this.initialization.setExpressionContext(ASSIGNMENT_CONTEXT);
+				this.initialization.setExpectedType(variableType);
 				TypeBinding initializationType = this.initialization.resolveType(scope);
 				if (initializationType != null) {
 //{ObjectTeams: wrap rhs type:
 					initializationType = RoleTypeCreator.maybeWrapUnqualifiedRoleType(initializationType, scope, this.initialization);
 // SH}
-					if (variableType != initializationType) // must call before computeConversion() and typeMismatchError()
+					if (TypeBinding.notEquals(variableType, initializationType)) // must call before computeConversion() and typeMismatchError()
 						scope.compilationUnitScope().recordTypeConversion(variableType, initializationType);
 					if (this.initialization.isConstantValueOfTypeAssignableToType(initializationType, variableType)
 						|| initializationType.isCompatibleWith(variableType, scope)) {
@@ -374,8 +369,10 @@
 // SH}
 		}
 		// only resolve annotation at the end, for constant to be positioned before (96991)
-		resolveAnnotations(scope, this.annotations, this.binding);
-		scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations);
+		resolveAnnotations(scope, this.annotations, this.binding, true);
+		Annotation.isTypeUseCompatible(this.type, scope, this.annotations);
+		if (!scope.validateNullAnnotation(this.binding.tagBits, this.type, this.annotations))
+			this.binding.tagBits &= ~TagBits.AnnotationNullMASK;
 	}
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java
index 2a48484..eae5b91 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2008 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -42,4 +46,12 @@
 		}
 		visitor.endVisit(this, scope);
 	}
+	public void traverse(ASTVisitor visitor, ClassScope scope) {
+		if (visitor.visit(this, scope)) {
+			if (this.type != null) {
+				this.type.traverse(visitor, scope);
+			}
+		}
+		visitor.endVisit(this, scope);
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
index e0f7cfb..21871fe 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -17,6 +21,7 @@
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
 import org.eclipse.jdt.internal.compiler.lookup.ElementValuePair;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
@@ -74,7 +79,7 @@
 			return;
 		}
 
-		this.value.setExpectedType(requiredType); // needed in case of generic method invocation
+		this.value.setExpectedType(requiredType); // needed in case of generic method invocation - looks suspect, generic method invocation here ???
 		TypeBinding valueType;
 		if (this.value instanceof ArrayInitializer) {
 			ArrayInitializer initializer = (ArrayInitializer) this.value;
@@ -241,4 +246,12 @@
 		}
 		visitor.endVisit(this, scope);
 	}
+	public void traverse(ASTVisitor visitor, ClassScope scope) {
+		if (visitor.visit(this, scope)) {
+			if (this.value != null) {
+				this.value.traverse(visitor, scope);
+			}
+		}
+		visitor.endVisit(this, scope);
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index c20ea5a..d55f768 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Nick Teryaev - fix for bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=40752)
@@ -21,17 +25,27 @@
  *								bug 379784 - [compiler] "Method can be static" is not getting reported
  *								bug 379834 - Wrong "method can be static" in presence of qualified super and different staticness of nested super class.
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 394768 - [compiler][resource] Incorrect resource leak warning when creating stream in conditional
  *								bug 381445 - [compiler][resource] Can the resource leak check be made aware of Closeables.closeQuietly?
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								bug 382069 - [null] Make the null analysis consider JUnit's assertNotNull similarly to assertions
+ *								bug 382350 - [1.8][compiler] Unable to invoke inherited default method via I.super.m() syntax
+ *								bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
  *								bug 403086 - [compiler][null] include the effect of 'assert' in syntactic null analysis for fields
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
  *								Bug 405569 - Resource leak check false positive when using DbUtils.closeQuietly
+ *								Bug 411964 - [1.8][null] leverage null type annotation in foreach statement
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *								Bug 418235 - [compiler][null] Unreported nullness error when using generic
  *     Jesper S Moller - Contributions for
  *								Bug 378674 - "The method can be declared as static" is wrong
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -53,13 +67,14 @@
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
+import org.eclipse.jdt.internal.compiler.lookup.ImplicitNullAnnotationVerifier;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.InvocationSite;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
 import org.eclipse.jdt.internal.compiler.lookup.MissingTypeBinding;
-import org.eclipse.jdt.internal.compiler.lookup.ImplicitNullAnnotationVerifier;
+import org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.PolymorphicMethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemMethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
@@ -160,6 +175,7 @@
 	public TypeBinding valueCast; // extra reference type cast to perform on method returned value
 	public TypeReference[] typeArguments;
 	public TypeBinding[] genericTypeArguments;
+	private ExpressionContext expressionContext = VANILLA_CONTEXT;
 
 //{ObjectTeams:
 	private boolean isDecapsulation = false;
@@ -173,7 +189,8 @@
 	flowInfo = this.receiver.analyseCode(currentScope, flowContext, flowInfo, nonStatic).unconditionalInits();
 
 	// recording the closing of AutoCloseable resources:
-	boolean analyseResources = currentScope.compilerOptions().analyseResourceLeaks;
+	CompilerOptions compilerOptions = currentScope.compilerOptions();
+	boolean analyseResources = compilerOptions.analyseResourceLeaks;
 	if (analyseResources) {
 		if (nonStatic) {
 			// closeable.close()
@@ -445,7 +462,7 @@
 
 public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) {
 	// message send as a receiver
-	if ((nullStatus(flowInfo, flowContext) & FlowInfo.POTENTIALLY_NULL) != 0)
+	if ((nullStatus(flowInfo, flowContext) & FlowInfo.POTENTIALLY_NULL) != 0) // note that flowInfo is not used inside nullStatus(..)
 		scope.problemReporter().messageSendPotentialNullReference(this.binding, this);
 	return true; // done all possible checking
 }
@@ -554,7 +571,7 @@
 			if (constantPoolDeclaringClass.isRole())
 				constantPoolDeclaringClass = ((ReferenceBinding)constantPoolDeclaringClass).getRealClass();
 // SH}
-			codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass);
+			codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
 //{ObjectTeams: decapsulated methods will not be private in the JVM any more:
 /* orig:
 		} else if((this.receiver.isSuper()) || codegenBinding.isPrivate()){
@@ -562,7 +579,7 @@
 		} else if((this.receiver.isSuper()) || (codegenBinding.isPrivate() && !this.isDecapsulation)) 
 		{
 // SH}
-			codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass);
+			codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
 //{ObjectTeams: always use interface methods of role type binding:
 /* orig:
 		} else if (constantPoolDeclaringClass.isInterface()) { // interface or annotation type
@@ -571,12 +588,12 @@
 				   || constantPoolDeclaringClass instanceof RoleTypeBinding)
 		{
 // SH}
-			codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass);
+			codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
 		} else {
-			codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass);
+			codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
 		}
 	} else {
-		codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessor, null /* default declaringClass */);
+		codeStream.invoke(Opcodes.OPC_invokestatic, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
 	}
 	// required cast must occur even if no value is required
 	if (this.valueCast != null) codeStream.checkcast(this.valueCast);
@@ -632,14 +649,15 @@
 	{
 
 		// depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy)
-		if (currentScope.enclosingSourceType() != codegenBinding.declaringClass){
+		if (TypeBinding.notEquals(currentScope.enclosingSourceType(), codegenBinding.declaringClass)){
 			this.syntheticAccessor = ((SourceTypeBinding)codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, false /* not super access there */);
 			currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
 			return;
 		}
 
-	} else if (this.receiver instanceof QualifiedSuperReference){ // qualified super
-
+	} else if (this.receiver instanceof QualifiedSuperReference) { 	// qualified super
+		if (this.actualReceiverType.isInterface()) 
+			return; // invoking an overridden default method, which is accessible/public by definition
 		// qualified super need emulation always
 		SourceTypeBinding destinationType = (SourceTypeBinding)(((QualifiedSuperReference)this.receiver).currentCompatibleType);
 		this.syntheticAccessor = destinationType.addSyntheticMethod(codegenBinding, isSuperAccess());
@@ -682,10 +700,9 @@
 	if (this.binding.isValidBinding()) {
 		// try to retrieve null status of this message send from an annotation of the called method:
 		long tagBits = this.binding.tagBits;
-		if ((tagBits & TagBits.AnnotationNonNull) != 0)
-			return FlowInfo.NON_NULL;
-		if ((tagBits & TagBits.AnnotationNullable) != 0)
-			return FlowInfo.POTENTIALLY_NULL | FlowInfo.POTENTIALLY_NON_NULL;
+		if ((tagBits & TagBits.AnnotationNullMASK) == 0L) // alternatively look for type annotation (will only be present in 1.8+):
+			tagBits = this.binding.returnType.tagBits;
+		return FlowInfo.tagBitsToNullStatus(tagBits);
 	}
 	return FlowInfo.UNKNOWN;
 }
@@ -781,7 +798,7 @@
 // MW,JH,SH}
 	if (receiverCast && this.actualReceiverType != null) {
 		 // due to change of declaring class with receiver type, only identity cast should be notified
-		if (((CastExpression)this.receiver).expression.resolvedType == this.actualReceiverType) {
+		if (TypeBinding.equalsEquals(((CastExpression)this.receiver).expression.resolvedType, this.actualReceiverType)) {
 			scope.problemReporter().unnecessaryCast((CastExpression)this.receiver);
 		}
 	}
@@ -810,27 +827,32 @@
 	}
 	// will check for null after args are resolved
 	TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
+	boolean polyExpressionSeen = false;
 	if (this.arguments != null) {
 		boolean argHasError = false; // typeChecks all arguments
 		int length = this.arguments.length;
 		argumentTypes = new TypeBinding[length];
+		TypeBinding argumentType;
 		for (int i = 0; i < length; i++){
 			Expression argument = this.arguments[i];
 			if (argument instanceof CastExpression) {
 				argument.bits |= ASTNode.DisableUnnecessaryCastCheck; // will check later on
 				argsContainCast = true;
 			}
+			argument.setExpressionContext(INVOCATION_CONTEXT);
 //{ObjectTeams: arguments might already be resolved, see e.g. CastExpression.createRoleCheck
 		  if (argument.resolvedType != null) {
-			argumentTypes[i] = argument.resolvedType;
+			argumentType = argumentTypes[i] = argument.resolvedType;
 		  } else {
 // orig:
-			if ((argumentTypes[i] = argument.resolveType(scope)) == null){
+			if ((argumentType = argumentTypes[i] = argument.resolveType(scope)) == null){
 				argHasError = true;
 			}
 // :giro
 		  }
 // SH}
+			if (argumentType != null && argumentType.kind() == Binding.POLY_TYPE)
+				polyExpressionSeen = true;
 		}
 		if (argHasError) {
 			if (this.actualReceiverType instanceof ReferenceBinding) {
@@ -975,6 +997,10 @@
 		}
 	}
 // SH}
+
+	if (polyExpressionSeen && polyExpressionsHaveErrors(scope, this.binding, this.arguments, argumentTypes))
+		return null;
+
 	if (!this.binding.isValidBinding()) {
 		if (this.binding.declaringClass == null) {
 			if (this.actualReceiverType instanceof ReferenceBinding) {
@@ -1082,10 +1108,19 @@
 		return null;
 	}
 
-	if (compilerOptions.isAnnotationBasedNullAnalysisEnabled && (this.binding.tagBits & TagBits.IsNullnessKnown) == 0) {
-		// not interested in reporting problems against this.binding:
-		new ImplicitNullAnnotationVerifier(scope.environment(), compilerOptions.inheritNullAnnotations)
-				.checkImplicitNullAnnotations(this.binding, null/*srcMethod*/, false, scope);
+	if (compilerOptions.isAnnotationBasedNullAnalysisEnabled) {
+		if ((this.binding.tagBits & TagBits.IsNullnessKnown) == 0) {
+			// not interested in reporting problems against this.binding:
+			new ImplicitNullAnnotationVerifier(scope.environment(), compilerOptions.inheritNullAnnotations)
+					.checkImplicitNullAnnotations(this.binding, null/*srcMethod*/, false, scope);
+		}
+		if (compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8) {
+			if (this.binding instanceof ParameterizedGenericMethodBinding && this.typeArguments != null) {
+				TypeVariableBinding[] typeVariables = this.binding.original().typeVariables();
+				for (int i = 0; i < this.typeArguments.length; i++)
+					this.typeArguments[i].checkNullConstraints(scope, typeVariables, i);
+			}
+		}
 	}
 	
 	if (((this.bits & ASTNode.InsideExpressionStatement) != 0)
@@ -1111,7 +1146,7 @@
 			TypeBinding oldReceiverType = this.actualReceiverType;
 			this.actualReceiverType = this.actualReceiverType.getErasureCompatibleType(this.binding.declaringClass);
 			this.receiver.computeConversion(scope, this.actualReceiverType, this.actualReceiverType);
-			if (this.actualReceiverType != oldReceiverType && this.receiver.postConversionType(scope) != this.actualReceiverType) { // record need for explicit cast at codegen since receiver could not handle it
+			if (TypeBinding.notEquals(this.actualReceiverType, oldReceiverType) && TypeBinding.notEquals(this.receiver.postConversionType(scope), this.actualReceiverType)) { // record need for explicit cast at codegen since receiver could not handle it
 				this.bits |= NeedReceiverGenericCast;
 			}
 		}
@@ -1120,7 +1155,7 @@
 		if (!(this.receiver.isImplicitThis() || this.receiver.isSuper() || receiverIsType)) {
 			scope.problemReporter().nonStaticAccessToStaticMethod(this, this.binding);
 		}
-		if (!this.receiver.isImplicitThis() && this.binding.declaringClass != this.actualReceiverType) {
+		if (!this.receiver.isImplicitThis() && TypeBinding.notEquals(this.binding.declaringClass, this.actualReceiverType)) {
 			scope.problemReporter().indirectAccessToStaticMethod(this, this.binding);
 		}
 	}
@@ -1212,6 +1247,10 @@
 			}
 		}
 	}
+	if (this.receiver.isSuper() && this.actualReceiverType.isInterface()) {
+		// 15.12.3 (Java 8)
+		scope.checkAppropriateMethodAgainstSupers(this.selector, this.binding, argumentTypes, this);
+	}
 	if (this.typeArguments != null && this.binding.original().typeVariables == Binding.NO_TYPE_VARIABLES) {
 		scope.problemReporter().unnecessaryTypeArgumentsForMethodInvocation(this.binding, this.genericTypeArguments, this.typeArguments);
 	}
@@ -1297,9 +1336,10 @@
 	if (this.binding.isStatic() && this.actualReceiverType.isInterface()) {
 		// static method in an interface can only occur in a role.
 		ReferenceBinding receiverType = (ReferenceBinding)this.actualReceiverType;
-		assert receiverType.isRole();
-		ReferenceBinding classPart = receiverType.roleModel.getClassPartBinding();
-		this.actualReceiverType = classPart; // used when calling getUpdatedMethodBinding() and during codeGen
+		if (receiverType.isRole()) {
+			ReferenceBinding classPart = receiverType.roleModel.getClassPartBinding();
+			this.actualReceiverType = classPart; // used when calling getUpdatedMethodBinding() and during codeGen
+		}
 	}
 
 	// check role-type return type in non-generated methods:
@@ -1401,6 +1441,41 @@
 public void setExpectedType(TypeBinding expectedType) {
     this.expectedType = expectedType;
 }
+
+public void setExpressionContext(ExpressionContext context) {
+	this.expressionContext = context;
+}
+
+public boolean isPolyExpression() {
+	
+	/* 15.12 has four requirements: 1) The invocation appears in an assignment context or an invocation context
+       2) The invocation elides NonWildTypeArguments 3) the method to be invoked is a generic method (8.4.4).
+       4) The return type of the method to be invoked mentions at least one of the method's type parameters.
+
+       We are in no position to ascertain the last two until after resolution has happened. So no client should
+       depend on asking this question before resolution.
+	*/
+	if (this.expressionContext != ASSIGNMENT_CONTEXT && this.expressionContext != INVOCATION_CONTEXT)
+		return false;
+	
+	if (this.typeArguments != null && this.typeArguments.length > 0)
+		return false;
+	
+	if (this.constant != Constant.NotAConstant)
+		throw new UnsupportedOperationException("Unresolved MessageSend can't be queried if it is a polyexpression"); //$NON-NLS-1$
+	
+	if (this.binding != null && this.binding instanceof ParameterizedGenericMethodBinding) {
+		ParameterizedGenericMethodBinding pgmb = (ParameterizedGenericMethodBinding) this.binding;
+		return pgmb.inferredReturnType;
+	}
+	
+	return false;
+}
+
+public boolean tIsMoreSpecific(TypeBinding t, TypeBinding s) {
+	return isPolyExpression() ? !t.isBaseType() && s.isBaseType() : super.tIsMoreSpecific(t, s);
+}
+
 public void setFieldIndex(int depth) {
 	// ignore for here
 }
@@ -1424,4 +1499,10 @@
 	}
 	visitor.endVisit(this, blockScope);
 }
+public boolean statementExpression() {
+	return true;
+}
+public boolean receiverIsImplicitThis() {
+	return this.receiver.isImplicitThis();
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
index 598c51a..e6a1533 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
@@ -4,8 +4,11 @@
  * 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
- * $Id: MethodDeclaration.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -15,7 +18,11 @@
  *								bug 186342 - [compiler][null] Using annotations for null checking
  *								bug 365519 - editorial cleanup after bug 186342 and bug 365387
  *								bug 368546 - [compiler][resource] Avoid remaining false positives found when compiling the Eclipse SDK
+ *								bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
  *     Jesper S Moller <jesper@selskabet.org> - Contributions for
  *								bug 378674 - "The method can be declared as static" is wrong
  *******************************************************************************/
@@ -24,6 +31,8 @@
 import static org.eclipse.objectteams.otdt.core.compiler.IOTConstants.CALLIN_FLAG_DEFINITELY_MISSING_BASECALL;
 import static org.eclipse.objectteams.otdt.core.compiler.IOTConstants.CALLIN_FLAG_POTENTIALLY_MISSING_BASECALL;
 
+import java.util.List;
+
 import org.eclipse.jdt.core.compiler.*;
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.CompilationResult;
@@ -32,6 +41,7 @@
 import org.eclipse.jdt.internal.compiler.flow.FlowContext;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.LocalTypeBinding;
@@ -43,6 +53,7 @@
 import org.eclipse.jdt.internal.compiler.parser.Parser;
 import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
 import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference.AnnotationCollector;
 import org.eclipse.objectteams.otdt.core.compiler.IOTConstants;
 import org.eclipse.objectteams.otdt.internal.core.compiler.ast.BaseCallTrackingVariable;
 import org.eclipse.objectteams.otdt.internal.core.compiler.ast.GuardPredicateDeclaration;
@@ -147,7 +158,10 @@
 					FlowInfo.DEAD_END);
 
 			// nullity and mark as assigned
-			analyseArguments(flowInfo);
+			if (classScope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8)
+				analyseArguments(flowInfo, this.arguments, this.binding);
+			else
+				analyseArguments18(flowInfo, this.arguments, this.binding);
 
 			if (this.binding.declaringClass instanceof MemberTypeBinding && !this.binding.declaringClass.isStatic()) {
 				// method of a non-static member type can't be static.
@@ -189,7 +203,7 @@
 			// check unused parameters
 			this.scope.checkUnusedParameters(this.binding);
 			// check if the method could have been static
-			if (!this.binding.isStatic() && (this.bits & ASTNode.CanBeStatic) != 0) {
+			if (!this.binding.isStatic() && (this.bits & ASTNode.CanBeStatic) != 0 && !this.isDefaultMethod()) {
 				if(!this.binding.isOverriding() && !this.binding.isImplementing()) {
 					if (this.binding.isPrivate() || this.binding.isFinal() || this.binding.declaringClass.isFinal()) {
 						this.scope.problemReporter().methodCanBeDeclaredStatic(this);
@@ -224,6 +238,18 @@
 	}
 // SH}
 
+	public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
+		AnnotationCollector collector = new AnnotationCollector(this.returnType, targetType, allAnnotationContexts);
+		for (int i = 0, max = this.annotations.length; i < max; i++) {
+			Annotation annotation = this.annotations[i];
+			annotation.traverse(collector, (BlockScope) null);
+		}
+	}
+
+	public boolean isDefaultMethod() {
+		return (this.modifiers & ExtraCompilerModifiers.AccDefaultMethod) != 0;
+	}
+
 	public boolean isMethod() {
 		return true;
 	}
@@ -241,6 +267,7 @@
 	public void resolveStatements() {
 		// ========= abort on fatal error =============
 		if (this.returnType != null && this.binding != null) {
+			this.bits |= (this.returnType.bits & ASTNode.HasTypeAnnotations);
 			this.returnType.resolvedType = this.binding.returnType;
 			// record the return type binding
 		}
@@ -258,8 +285,10 @@
 		}
 		if (this.typeParameters != null) {
 			for (int i = 0, length = this.typeParameters.length; i < length; i++) {
-				this.typeParameters[i].resolve(this.scope);
-				if (returnsUndeclTypeVar && this.typeParameters[i].binding == this.returnType.resolvedType) {
+				TypeParameter typeParameter = this.typeParameters[i];
+				this.bits |= (typeParameter.bits & ASTNode.HasTypeAnnotations);
+				// typeParameter is already resolved from Scope#connectTypeVariables()
+				if (returnsUndeclTypeVar && TypeBinding.equalsEquals(this.typeParameters[i].binding, this.returnType.resolvedType)) {
 					returnsUndeclTypeVar = false;
 				}
 			}
@@ -313,7 +342,6 @@
 								&& compilerOptions.reportMissingOverrideAnnotationForInterfaceMethodImplementation
 								&& this.binding.isImplementing()) {
 									// actually overrides, but did not claim to do so
-
 									this.scope.problemReporter().missingOverrideAnnotationForInterfaceMethodImplementation(this);
 							}
 							
@@ -332,7 +360,6 @@
 			}
 		}
 
-		// by grammatical construction, interface methods are always abstract
 		switch (TypeDeclaration.kind(this.scope.referenceType().modifiers)) {
 			case TypeDeclaration.ENUM_DECL :
 				if (this.selector == TypeConstants.VALUES) break;
@@ -354,6 +381,15 @@
 						this.bits &= ~ASTNode.CanBeStatic;
 					}
 				}
+				break;
+			case TypeDeclaration.INTERFACE_DECL :
+				if (compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8
+						&& (this.modifiers & (ExtraCompilerModifiers.AccSemicolonBody | ClassFileConstants.AccAbstract)) == ExtraCompilerModifiers.AccSemicolonBody) {
+					if ((this.modifiers & (ClassFileConstants.AccStatic | ExtraCompilerModifiers.AccDefaultMethod)) != 0) {
+							this.scope.problemReporter().methodNeedBody(this);
+					}
+				}
+				break;
 		}
 		super.resolveStatements();
 
@@ -422,11 +458,4 @@
 	public TypeParameter[] typeParameters() {
 	    return this.typeParameters;
 	}
-	
-	void validateNullAnnotations() {
-		super.validateNullAnnotations();
-		// null-annotations on the return type?
-		if (this.binding != null)
-			this.scope.validateNullAnnotation(this.binding.tagBits, this.returnType, this.annotations);
-	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
index 9a50264..2b6d7c1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: NameReference.java 19881 2009-04-13 23:35:46Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -12,10 +15,13 @@
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 331649 - [compiler][null] consider null annotations for fields
+ *     Jesper S Moller - Contributions for
+ *							bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
 import org.eclipse.jdt.internal.compiler.lookup.*;
+import org.eclipse.jdt.internal.compiler.problem.AbortMethod;
 
 /**
  * OTDT changes:
@@ -119,6 +125,20 @@
 
 public abstract String unboundReferenceErrorName();
 
+public abstract char[][] getName();
+
+/* Called during code generation to ensure that outer locals's effectively finality is guaranteed. 
+   Aborts if constraints are violated. Due to various complexities, this check is not conveniently
+   implementable in resolve/analyze phases.
+*/
+protected void checkEffectiveFinality(LocalVariableBinding localBinding, Scope scope) {
+	if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+		if (!localBinding.isFinal() && !localBinding.isEffectivelyFinal()) {
+			scope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this);
+			throw new AbortMethod(scope.referenceCompilationUnit().compilationResult, null);
+		}
+	}
+}
 //{ObjectTeams: hook after this reference has been fully resolved
 public void resolveFinished() { /* noop  */ }
 // SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java
index a1d1bd1..381cc9a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -71,4 +75,17 @@
 		}
 		visitor.endVisit(this, scope);
 	}
+	public void traverse(ASTVisitor visitor, ClassScope scope) {
+		if (visitor.visit(this, scope)) {
+			if (this.type != null) {
+				this.type.traverse(visitor, scope);
+			}
+			if (this.memberValuePairs != null) {
+				int memberValuePairsLength = this.memberValuePairs.length;
+				for (int i = 0; i < memberValuePairsLength; i++)
+					this.memberValuePairs[i].traverse(visitor, scope);
+			}
+		}
+		visitor.endVisit(this, scope);
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java
new file mode 100644
index 0000000..85f1b11
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullAnnotationMatching.java
@@ -0,0 +1,206 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.flow.FlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.WildcardBinding;
+
+/**
+ * Performs matching of null type annotations.
+ * Instances are used to encode result from this analysis.
+ * @since 3.9 BETA_JAVA8
+ */
+public class NullAnnotationMatching {
+	
+	public static final NullAnnotationMatching NULL_ANNOTATIONS_OK = new NullAnnotationMatching(0, null);
+	public static final NullAnnotationMatching NULL_ANNOTATIONS_UNCHECKED = new NullAnnotationMatching(1, null);
+	public static final NullAnnotationMatching NULL_ANNOTATIONS_MISMATCH = new NullAnnotationMatching(2, null);
+
+	/** 0 = OK, 1 = unchecked, 2 = definite mismatch */
+	public final int severity;
+	
+	/** If non-null this field holds the supertype of the provided type which was used for direct matching. */
+	public final TypeBinding superTypeHint;
+	
+	public NullAnnotationMatching(int severity, TypeBinding superTypeHint) {
+		this.severity = severity;
+		this.superTypeHint = superTypeHint;
+	}
+
+	public boolean isAnyMismatch()      { return this.severity != 0; }
+	public boolean isUnchecked()        { return this.severity == 1; }
+	public boolean isDefiniteMismatch() { return this.severity == 2; }
+	
+	public String superTypeHintName(CompilerOptions options, boolean shortNames) {
+		return String.valueOf(this.superTypeHint.nullAnnotatedReadableName(options, shortNames));
+	}
+	
+	/** Check null-ness of 'var' against a possible null annotation */
+	public static int checkAssignment(BlockScope currentScope, FlowContext flowContext,
+									   VariableBinding var, int nullStatus, Expression expression, TypeBinding providedType)
+	{
+		long lhsTagBits = 0L;
+		boolean hasReported = false;
+		if (currentScope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8) {
+			lhsTagBits = var.tagBits & TagBits.AnnotationNullMASK;
+		} else {
+			lhsTagBits = var.type.tagBits & TagBits.AnnotationNullMASK;
+			NullAnnotationMatching annotationStatus = analyse(var.type, providedType, nullStatus);
+			if (annotationStatus.isDefiniteMismatch()) {
+				currentScope.problemReporter().nullityMismatchingTypeAnnotation(expression, providedType, var.type, annotationStatus);
+				hasReported = true;
+			} else if (annotationStatus.isUnchecked()) {
+				flowContext.recordNullityMismatch(currentScope, expression, providedType, var.type, nullStatus);
+				hasReported = true;
+			}
+		}
+		if (lhsTagBits == TagBits.AnnotationNonNull && nullStatus != FlowInfo.NON_NULL) {
+			if (!hasReported)
+				flowContext.recordNullityMismatch(currentScope, expression, providedType, var.type, nullStatus);
+			return FlowInfo.NON_NULL;
+		} else if (lhsTagBits == TagBits.AnnotationNullable && nullStatus == FlowInfo.UNKNOWN) {	// provided a legacy type?
+			return FlowInfo.POTENTIALLY_NULL;			// -> use more specific info from the annotation
+		}
+		return nullStatus;
+	}
+
+	/**
+	 * Find any mismatches between the two given types, which are caused by null type annotations.
+	 * @param requiredType
+	 * @param providedType
+	 * @param nullStatus we are only interested in NULL or NON_NULL, -1 indicates that we are in a recursion, where flow info is ignored
+	 * @return a status object representing the severity of mismatching plus optionally a supertype hint
+	 */
+	public static NullAnnotationMatching analyse(TypeBinding requiredType, TypeBinding providedType, int nullStatus) {
+		int severity = 0;
+		TypeBinding superTypeHint = null;
+		if (requiredType instanceof ArrayBinding) {
+			long[] requiredDimsTagBits = ((ArrayBinding)requiredType).nullTagBitsPerDimension;
+			if (requiredDimsTagBits != null) {
+				int dims = requiredType.dimensions();
+				if (requiredType.dimensions() == providedType.dimensions()) {
+					long[] providedDimsTagBits = ((ArrayBinding)providedType).nullTagBitsPerDimension;
+					if (providedDimsTagBits == null) {
+						severity = 1; // required is annotated, provided not, need unchecked conversion
+					} else {
+						for (int i=0; i<=dims; i++) {
+							long requiredBits = validNullTagBits(requiredDimsTagBits[i]);
+							long providedBits = validNullTagBits(providedDimsTagBits[i]);
+							if (i > 0)
+								nullStatus = -1; // don't use beyond the outermost dimension
+							severity = Math.max(severity, computeNullProblemSeverity(requiredBits, providedBits, nullStatus));
+							if (severity == 2)
+								return NullAnnotationMatching.NULL_ANNOTATIONS_MISMATCH;
+						}
+					}
+				} else if (providedType.id == TypeIds.T_null) {
+					if (dims > 0 && requiredDimsTagBits[0] == TagBits.AnnotationNonNull)
+						return NullAnnotationMatching.NULL_ANNOTATIONS_MISMATCH;
+				}
+			}
+		} else if (requiredType.hasNullTypeAnnotations() || providedType.hasNullTypeAnnotations()) {
+			long requiredBits = validNullTagBits(requiredType.tagBits);
+			if (requiredBits != TagBits.AnnotationNullable // nullable lhs accepts everything, ...
+					|| nullStatus == -1) // only at detail/recursion even nullable must be matched exactly
+			{
+				long providedBits = validNullTagBits(providedType.tagBits);
+				severity = computeNullProblemSeverity(requiredBits, providedBits, nullStatus);
+			}
+			if (severity < 2) {
+				TypeBinding providedSuper = providedType.findSuperTypeOriginatingFrom(requiredType);
+				if (providedSuper != providedType) //$IDENTITY-COMPARISON$
+					superTypeHint = providedSuper;
+				if (requiredType.isParameterizedType()  && providedSuper instanceof ParameterizedTypeBinding) { // TODO(stephan): handle providedType.isRaw()
+					TypeBinding[] requiredArguments = ((ParameterizedTypeBinding) requiredType).arguments;
+					TypeBinding[] providedArguments = ((ParameterizedTypeBinding) providedSuper).arguments;
+					if (requiredArguments != null && providedArguments != null && requiredArguments.length == providedArguments.length) {
+						for (int i = 0; i < requiredArguments.length; i++) {
+							NullAnnotationMatching status = analyse(requiredArguments[i], providedArguments[i], -1);
+							severity = Math.max(severity, status.severity);
+							if (severity == 2)
+								return new NullAnnotationMatching(severity, superTypeHint);
+						}
+					}
+				} else 	if (requiredType instanceof WildcardBinding) {
+					WildcardBinding wildcardBinding = (WildcardBinding) requiredType;
+					if (wildcardBinding.bound != null) {
+						NullAnnotationMatching status = analyse(wildcardBinding.bound, providedType, nullStatus);
+						severity = Math.max(severity, status.severity);
+					}
+					// TODO(stephan): what about otherBounds? Do we accept "? extends @NonNull I1 & @Nullable I2" in the first place??
+				}
+				TypeBinding requiredEnclosing = requiredType.enclosingType();
+				TypeBinding providedEnclosing = providedType.enclosingType();
+				if (requiredEnclosing != null && providedEnclosing != null) {
+					NullAnnotationMatching status = analyse(requiredEnclosing, providedEnclosing, -1);
+					severity = Math.max(severity, status.severity);
+				}
+			}
+		}
+		if (severity == 0)
+			return NullAnnotationMatching.NULL_ANNOTATIONS_OK;
+		return new NullAnnotationMatching(severity, superTypeHint);
+	}
+
+	public static long validNullTagBits(long bits) {
+		bits &= TagBits.AnnotationNullMASK;
+		return bits == TagBits.AnnotationNullMASK ? 0 : bits;
+	}
+	
+	/** Provided that both types are {@link TypeBinding#equalsEquals}, return the one that is more likely to show null at runtime. */
+	public static TypeBinding moreDangerousType(TypeBinding one, TypeBinding two) {
+		if (one == null) return null;
+		long oneNullBits = validNullTagBits(one.tagBits);
+		long twoNullBits = validNullTagBits(two.tagBits);
+		if (oneNullBits != twoNullBits) {
+			if (oneNullBits == TagBits.AnnotationNullable)
+				return one;			// nullable is dangerous
+			if (twoNullBits == TagBits.AnnotationNullable)
+				return two;			// nullable is dangerous
+			// below this point we have unknown vs. nonnull, which is which?
+			if (oneNullBits == 0)
+				return one;			// unknown is more dangerous than nonnull
+			return two;				// unknown is more dangerous than nonnull
+		} else if (one != two) { //$IDENTITY-COMPARISON$
+			if (analyse(one, two, -1).isAnyMismatch())
+				return two;			// two doesn't snugly fit into one, so it must be more dangerous
+		}
+		return one;
+	}
+
+	private static int computeNullProblemSeverity(long requiredBits, long providedBits, int nullStatus) {
+		if (requiredBits != 0 && requiredBits != providedBits) {
+			if (requiredBits == TagBits.AnnotationNonNull && nullStatus == FlowInfo.NON_NULL) {
+				return 0; // OK by flow analysis
+			}
+			if (providedBits != 0) {
+				return 2; // mismatching annotations
+			} else {
+				return 1; // need unchecked conversion regarding type detail
+			}
+		}
+		return 0; // OK by tagBits
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java
index 284984c..7835b6f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java
@@ -13,8 +13,6 @@
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
-import org.eclipse.jdt.internal.compiler.flow.FlowContext;
-import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
 import org.eclipse.jdt.internal.compiler.util.Util;
 
 public abstract class OperatorExpression extends Expression implements OperatorIds {
@@ -1559,10 +1557,6 @@
 		return "unknown operator"; //$NON-NLS-1$
 	}
 
-	public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
-		return FlowInfo.NON_NULL;
-	}
-
 	public StringBuffer printExpression(int indent, StringBuffer output){
 
 		output.append('(');
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
index 343e02e..b1dc981 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
@@ -1,15 +1,25 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann - Contribution for Bug 342671 - ClassCastException: org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.ArrayBinding
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contributions for
+ *								bug 342671 - ClassCastException: org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.ArrayBinding
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 416181 – [1.8][compiler][null] Invalid assignment is not rejected by the compiler
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -52,6 +62,24 @@
 
 		super(tokens, dim, positions);
 		this.typeArguments = typeArguments;
+		annotationSearch: for (int i = 0, max = typeArguments.length; i < max; i++) {
+			TypeReference[] typeArgumentsOnTypeComponent = typeArguments[i];
+			if (typeArgumentsOnTypeComponent != null) {
+				for (int j = 0, max2 = typeArgumentsOnTypeComponent.length; j < max2; j++) {
+					if ((typeArgumentsOnTypeComponent[j].bits & ASTNode.HasTypeAnnotations) != 0) {
+						this.bits |= ASTNode.HasTypeAnnotations;
+						break annotationSearch;
+					}
+				}
+			}
+		}
+	}
+	public ParameterizedQualifiedTypeReference(char[][] tokens, TypeReference[][] typeArguments, int dim, Annotation[][] annotationsOnDimensions, long[] positions) {
+		this(tokens, typeArguments, dim, positions);
+		setAnnotationsOnDimensions(annotationsOnDimensions);
+		if (annotationsOnDimensions != null) {
+			this.bits |= ASTNode.HasTypeAnnotations;
+		}
 	}
 	public void checkBounds(Scope scope) {
 		if (this.resolvedType == null) return;
@@ -75,8 +103,18 @@
 			}
 		}
 	}
-	public TypeReference copyDims(int dim){
-		return new ParameterizedQualifiedTypeReference(this.tokens, this.typeArguments, dim, this.sourcePositions);
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
+		int totalDimensions = this.dimensions() + additionalDimensions;
+		Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
+		ParameterizedQualifiedTypeReference pqtr = new ParameterizedQualifiedTypeReference(this.tokens, this.typeArguments, totalDimensions, allAnnotations, this.sourcePositions);
+		pqtr.annotations = this.annotations;
+		pqtr.bits |= (this.bits & ASTNode.HasTypeAnnotations);
+		if (!isVarargs)
+			pqtr.extendedDimensions = additionalDimensions;
+		return pqtr;
+	}
+	public boolean isParameterizedTypeReference() {
+		return true;
 	}
 
 	/**
@@ -116,6 +154,10 @@
 		return qParamName;
 	}
 
+	public TypeReference[][] getTypeArguments() {
+		return this.typeArguments;
+	}
+	
 	/* (non-Javadoc)
      * @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
      */
@@ -149,6 +191,10 @@
 		this.bits |= ASTNode.DidResolve;
 		TypeBinding type = internalResolveLeafType(scope, checkBounds);
 		createArrayType(scope);
+		resolveAnnotations(scope);
+		if (this.typeArguments != null)
+			// relevant null annotations are on the inner most type:
+			checkNullConstraints(scope, this.typeArguments[this.typeArguments.length-1]); 
 		return type == null ? type : this.resolvedType;
 	}
 	private TypeBinding internalResolveLeafType(Scope scope, boolean checkBounds) {
@@ -176,6 +222,8 @@
 		}
 
 		PackageBinding packageBinding = binding == null ? null : (PackageBinding) binding;
+		rejectAnnotationsOnPackageQualifiers(scope, packageBinding);
+
 		boolean typeIsConsistent = true;
 		ReferenceBinding qualifyingType = null;
 		for (int i = packageBinding == null ? 0 : packageBinding.compoundName.length, max = this.tokens.length; i < max; i++) {
@@ -208,13 +256,15 @@
 						: scope.environment().convertToParameterizedType(qualifyingType);
 				}
 			} else {
+				if (this.annotations != null)
+					rejectAnnotationsOnStaticMemberQualififer(scope, currentType, this.annotations[i-1]);
 				if (typeIsConsistent && currentType.isStatic()
 						&& (qualifyingType.isParameterizedTypeWithActualArguments() || qualifyingType.isGenericType())) {
 					scope.problemReporter().staticMemberOfParameterizedType(this, scope.environment().createParameterizedType((ReferenceBinding)currentType.erasure(), null, qualifyingType), i);
 					typeIsConsistent = false;
 				}
 				ReferenceBinding enclosingType = currentType.enclosingType();
-				if (enclosingType != null && enclosingType.erasure() != qualifyingType.erasure()) { // qualifier != declaring/enclosing
+				if (enclosingType != null && TypeBinding.notEquals(enclosingType.erasure(), qualifyingType.erasure())) { // qualifier != declaring/enclosing
 					qualifyingType = enclosingType; // inherited member type, leave it associated with its enclosing rather than subtype
 				}
 			}
@@ -321,6 +371,10 @@
 	public StringBuffer printExpression(int indent, StringBuffer output) {
 		int length = this.tokens.length;
 		for (int i = 0; i < length - 1; i++) {
+			if (this.annotations != null && this.annotations[i] != null) {
+				printAnnotations(this.annotations[i], output);
+				output.append(' ');
+			}
 			output.append(this.tokens[i]);
 			TypeReference[] typeArgument = this.typeArguments[i];
 			if (typeArgument != null) {
@@ -338,6 +392,11 @@
 			}
 			output.append('.');
 		}
+		if (this.annotations != null && this.annotations[length - 1] != null) {
+			output.append(" "); //$NON-NLS-1$
+			printAnnotations(this.annotations[length - 1], output);
+			output.append(' ');
+		}
 		output.append(this.tokens[length - 1]);
 		TypeReference[] typeArgument = this.typeArguments[length - 1];
 		if (typeArgument != null) {
@@ -353,13 +412,29 @@
 			}
 			output.append('>');
 		}
+		Annotation [][] annotationsOnDimensions = this.getAnnotationsOnDimensions();
 		if ((this.bits & IsVarArgs) != 0) {
 			for (int i= 0 ; i < this.dimensions - 1; i++) {
+				if (annotationsOnDimensions != null && annotationsOnDimensions[i] != null) {
+					output.append(" "); //$NON-NLS-1$
+					printAnnotations(annotationsOnDimensions[i], output);
+					output.append(" "); //$NON-NLS-1$
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
+			if (annotationsOnDimensions != null && annotationsOnDimensions[this.dimensions - 1] != null) {
+				output.append(" "); //$NON-NLS-1$
+				printAnnotations(annotationsOnDimensions[this.dimensions - 1], output);
+				output.append(" "); //$NON-NLS-1$
+			}
 			output.append("..."); //$NON-NLS-1$
 		} else {
 			for (int i= 0 ; i < this.dimensions; i++) {
+				if (annotationsOnDimensions != null && annotationsOnDimensions[i] != null) {
+					output.append(" "); //$NON-NLS-1$
+					printAnnotations(annotationsOnDimensions[i], output);
+					output.append(" "); //$NON-NLS-1$
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
 		}
@@ -374,6 +449,24 @@
 	}
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
+			}
+			Annotation [][] annotationsOnDimensions = getAnnotationsOnDimensions(true);
+			if (annotationsOnDimensions != null) {
+				for (int i = 0, max = annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = annotationsOnDimensions[i];
+					for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) {
+						Annotation annotation = annotations2[j];
+						annotation.traverse(visitor, scope);
+					}
+				}
+			}
 			for (int i = 0, max = this.typeArguments.length; i < max; i++) {
 				if (this.typeArguments[i] != null) {
 					for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) {
@@ -387,6 +480,24 @@
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
+			}
+			Annotation [][] annotationsOnDimensions = getAnnotationsOnDimensions(true);
+			if (annotationsOnDimensions != null) {
+				for (int i = 0, max = annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = annotationsOnDimensions[i];
+					for (int j = 0, max2 = annotations2 == null ? 0 : annotations2.length; j < max2; j++) {
+						Annotation annotation = annotations2[j];
+						annotation.traverse(visitor, scope);
+					}
+				}
+			}
 			for (int i = 0, max = this.typeArguments.length; i < max; i++) {
 				if (this.typeArguments[i] != null) {
 					for (int j = 0, max2 = this.typeArguments[i].length; j < max2; j++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
index 445c410..7dbbe88 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
@@ -1,15 +1,24 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann - Contribution for Bug 342671 - ClassCastException: org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.ArrayBinding
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contributions for
+ *								bug 342671 - ClassCastException: org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.ArrayBinding
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -22,6 +31,7 @@
 import org.eclipse.objectteams.otdt.internal.core.compiler.ast.TypeAnchorReference;
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies;
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.ITranslationStates;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.OTClassScope;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ProblemAnchorBinding;
@@ -59,6 +69,19 @@
 		super(name, dim, pos);
 		this.originalSourceEnd = this.sourceEnd;
 		this.typeArguments = typeArguments;
+		for (int i = 0, max = typeArguments.length; i < max; i++) {
+			if ((typeArguments[i].bits & ASTNode.HasTypeAnnotations) != 0) {
+				this.bits |= ASTNode.HasTypeAnnotations;
+				break;
+			}
+		}
+	}
+	public ParameterizedSingleTypeReference(char[] name, TypeReference[] typeArguments, int dim, Annotation[][] annotationsOnDimensions, long pos) {
+		this(name, typeArguments, dim, pos);
+		setAnnotationsOnDimensions(annotationsOnDimensions);
+		if (annotationsOnDimensions != null) {
+			this.bits |= ASTNode.HasTypeAnnotations;
+		}
 	}
 	public void checkBounds(Scope scope) {
 		if (this.resolvedType == null) return;
@@ -73,11 +96,16 @@
 			}
 		}
 	}
-	/**
-	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#copyDims(int)
-	 */
-	public TypeReference copyDims(int dim) {
-		return new ParameterizedSingleTypeReference(this.token, this.typeArguments, dim, (((long)this.sourceStart)<<32)+this.sourceEnd);
+	
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation [][] additionalAnnotations, boolean isVarargs) {
+		int totalDimensions = this.dimensions() + additionalDimensions;
+		Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
+		ParameterizedSingleTypeReference parameterizedSingleTypeReference = new ParameterizedSingleTypeReference(this.token, this.typeArguments, totalDimensions, allAnnotations, (((long) this.sourceStart) << 32) + this.sourceEnd);
+		parameterizedSingleTypeReference.annotations = this.annotations;
+		parameterizedSingleTypeReference.bits |= (this.bits & ASTNode.HasTypeAnnotations);
+		if (!isVarargs)
+			parameterizedSingleTypeReference.extendedDimensions = additionalDimensions;
+		return parameterizedSingleTypeReference;
 	}
 
 	/**
@@ -121,12 +149,21 @@
 		}
 		return new char[][]{ name };
 	}
+	
+	public TypeReference[][] getTypeArguments() {
+		return new TypeReference[][] { this.typeArguments };
+	}
+	
 	/**
      * @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
      */
     protected TypeBinding getTypeBinding(Scope scope) {
         return null; // not supported here - combined with resolveType(...)
     }
+    
+    public boolean isParameterizedTypeReference() {
+    	return true;
+    }
 
     /*
      * No need to check for reference to raw type per construction
@@ -229,19 +266,29 @@
 		}
 		TypeBinding type = internalResolveLeafType(importScope, scope, enclosingType, checkBounds);
 /* orig:
-		TypeBinding type = internalResolveLeafType(enclosingType, checkBounds);
+		TypeBinding type = internalResolveLeafType(scope, enclosingType, checkBounds);
   :giro */
 // SH}
+
 		// handle three different outcomes:
 		if (type == null) {
 			this.resolvedType = createArrayType(scope, this.resolvedType);
+			resolveAnnotations(scope);
+			checkNullConstraints(scope, this.typeArguments);
 			return null;							// no useful type, but still captured dimensions into this.resolvedType
 		} else {
 			type = createArrayType(scope, type);
-			if (!this.resolvedType.isValidBinding())
+			if (!this.resolvedType.isValidBinding()) {
+				resolveAnnotations(scope);
+				checkNullConstraints(scope, this.typeArguments);
 				return type;						// found some error, but could recover useful type (like closestMatch)
-			else 
-				return this.resolvedType = type; 	// no complaint, keep fully resolved type (incl. dimensions)
+			} else {
+				this.resolvedType = type; 	// no complaint, keep fully resolved type (incl. dimensions)
+				resolveAnnotations(scope);
+				checkNullConstraints(scope, this.typeArguments);
+				return this.resolvedType; // pick up any annotated type.
+			}
+
 		}
 	}
 //{ObjectTeams: consider two scopes (base imports, regular):
@@ -302,7 +349,7 @@
 			if (isTypeUseDeprecated(currentType, scope))
 				scope.problemReporter().deprecatedType(currentType, this);
 			ReferenceBinding currentEnclosing = currentType.enclosingType();
-			if (currentEnclosing != null && currentEnclosing.erasure() != enclosingType.erasure()) {
+			if (currentEnclosing != null && TypeBinding.notEquals(currentEnclosing.erasure(), enclosingType.erasure())) {
 				enclosingType = currentEnclosing; // inherited member type, leave it associated with its enclosing rather than subtype
 			}
 		}
@@ -331,13 +378,14 @@
 		    TypeBinding argType = isClassScope
 				? typeArgument.resolveTypeArgument((ClassScope) scope, currentOriginal, i)
 				: typeArgument.resolveTypeArgument((BlockScope) scope, currentOriginal, i);
+			this.bits |= (typeArgument.bits & ASTNode.HasTypeAnnotations);
 		     if (argType == null) {
 		         argHasError = true;
 		     } else {
 //{ObjectTeams:
-		    	argType = RoleTypeCreator.maybeWrapUnqualifiedRoleType(scope, argType, typeArgument);
+		    	 argType = RoleTypeCreator.maybeWrapUnqualifiedRoleType(scope, argType, typeArgument);
 // SH}
-			    argTypes[i] = argType;
+		    	 argTypes[i] = argType;
 		     }
 		}
 		if (argHasError) {
@@ -383,9 +431,20 @@
 //{ObjectTeams: already done?
 		if (!isDiamond && argLength == 0)
 			return this.resolvedType;
-// SH}
 
-    	ParameterizedTypeBinding parameterizedType = scope.environment().createParameterizedType(currentOriginal, argTypes, enclosingType);
+		// feed more parameters into createParameterizedType:
+		AnnotationBinding[] currentAnnotations = currentType.getAnnotations();
+		ITeamAnchor anchor = null;
+		int valParPos = -1;
+		if (DependentTypeBinding.isDependentType(currentType)) {
+			anchor = ((DependentTypeBinding)currentType)._teamAnchor;
+			valParPos = ((DependentTypeBinding)currentType)._valueParamPosition;
+		}
+		ParameterizedTypeBinding parameterizedType = scope.environment().createParameterizedType(currentOriginal, argTypes, anchor, valParPos, enclosingType,  currentAnnotations);
+/* orig:
+		ParameterizedTypeBinding parameterizedType = scope.environment().createParameterizedType(currentOriginal, argTypes, enclosingType);
+  :giro */
+// SH}
 		// check argument type compatibility for non <> cases - <> case needs no bounds check, we will scream foul if needed during inference.
     	if (!isDiamond) {
     		if (checkBounds) // otherwise will do it in Scope.connectTypeVariables() or generic method resolution
@@ -411,6 +470,10 @@
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output){
+		if (this.annotations != null && this.annotations[0] != null) {
+			printAnnotations(this.annotations[0], output);
+			output.append(' ');
+		}
 		output.append(this.token);
 		output.append("<"); //$NON-NLS-1$
 		int length = this.typeArguments.length;
@@ -433,13 +496,29 @@
 			this.typeArguments[max].print(0, output);
 		}
 		output.append(">"); //$NON-NLS-1$
+		Annotation [][] annotationsOnDimensions = getAnnotationsOnDimensions();
 		if ((this.bits & IsVarArgs) != 0) {
 			for (int i= 0 ; i < this.dimensions - 1; i++) {
+				if (annotationsOnDimensions != null && annotationsOnDimensions[i] != null) {
+					output.append(" "); //$NON-NLS-1$
+					printAnnotations(annotationsOnDimensions[i], output);
+					output.append(" "); //$NON-NLS-1$
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
+			if (annotationsOnDimensions != null && annotationsOnDimensions[this.dimensions - 1] != null) {
+				output.append(" "); //$NON-NLS-1$
+				printAnnotations(annotationsOnDimensions[this.dimensions - 1], output);
+				output.append(" "); //$NON-NLS-1$
+			}
 			output.append("..."); //$NON-NLS-1$
 		} else {
 			for (int i= 0 ; i < this.dimensions; i++) {
+				if (annotationsOnDimensions != null && annotationsOnDimensions[i] != null) {
+					output.append(" "); //$NON-NLS-1$
+					printAnnotations(annotationsOnDimensions[i], output);
+					output.append(" "); //$NON-NLS-1$
+				}
 				output.append("[]"); //$NON-NLS-1$
 			}
 		}
@@ -521,6 +600,24 @@
 // SH}
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++) {
+					typeAnnotations[i].traverse(visitor, scope);
+				}
+			}
+			Annotation [][] annotationsOnDimensions = getAnnotationsOnDimensions(true);
+			if (annotationsOnDimensions != null) {
+				for (int i = 0, max = annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = annotationsOnDimensions[i];
+					if (annotations2 != null) {
+						for (int j = 0, max2 = annotations2.length; j < max2; j++) {
+							Annotation annotation = annotations2[j];
+							annotation.traverse(visitor, scope);
+						}
+					}
+				}
+			}
 			for (int i = 0, max = this.typeArguments.length; i < max; i++) {
 				this.typeArguments[i].traverse(visitor, scope);
 			}
@@ -530,6 +627,22 @@
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++) {
+					typeAnnotations[i].traverse(visitor, scope);
+				}
+			}
+			Annotation [][] annotationsOnDimensions = getAnnotationsOnDimensions(true);
+			if (annotationsOnDimensions != null) {
+				for (int i = 0, max = annotationsOnDimensions.length; i < max; i++) {
+					Annotation[] annotations2 = annotationsOnDimensions[i];
+					for (int j = 0, max2 = annotations2.length; j < max2; j++) {
+						Annotation annotation = annotations2[j];
+						annotation.traverse(visitor, scope);
+					}
+				}
+			}
 			for (int i = 0, max = this.typeArguments.length; i < max; i++) {
 				this.typeArguments[i].traverse(visitor, scope);
 			}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
index 3fd2fd4..2994364 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -18,11 +22,20 @@
  *								bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
  *								bug 388996 - [compiler][resource] Incorrect 'potential resource leak'
  *								bug 395977 - [compiler][resource] Resource leak warning behavior possibly incorrect for anonymous inner class
+ *								Bug 416267 - NPE in QualifiedAllocationExpression.resolveType
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *								Bug 416267 - NPE in QualifiedAllocationExpression.resolveType
  *								Bug 418235 - [compiler][null] Unreported nullness error when using generic
  *     Jesper S Moller <jesper@selskabet.org> - Contributions for
  *								bug 378674 - "The method can be declared as static" is wrong
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
  *     Till Brychcy - Contributions for
  *     							bug 413460 - NonNullByDefault is not inherited to Constructors when accessed via Class File
  ******************************************************************************/
@@ -150,7 +163,7 @@
 				ReferenceBinding superclass = this.binding.declaringClass.superclass();
 				if (superclass != null && superclass.isMemberType() && !superclass.isStatic()) {
 					// creating an anonymous type of a non-static member type without an enclosing instance of parent type
-					currentScope.resetDeclaringClassMethodStaticFlag(superclass.enclosingType());
+					currentScope.tagAsAccessingEnclosingInstanceStateOf(superclass.enclosingType(), false /* type variable access */);
 					// Reviewed for https://bugs.eclipse.org/bugs/show_bug.cgi?id=378674 :
 					// The corresponding problem (when called from static) is not produced until during code generation
 				}
@@ -228,7 +241,7 @@
 		int pc = codeStream.position;
 		MethodBinding codegenBinding = this.binding.original();
 		ReferenceBinding allocatedType = codegenBinding.declaringClass;
-		codeStream.new_(allocatedType);
+		codeStream.new_(this.type, allocatedType);
 		boolean isUnboxing = (this.implicitConversion & TypeIds.UNBOXING) != 0;
 		if (valueRequired || isUnboxing) {
 			codeStream.dup();
@@ -265,7 +278,7 @@
 
 		// invoke constructor
 		if (this.syntheticAccessor == null) {
-			codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */);
+			codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
 		} else {
 			// synthetic accessor got some extra arguments appended to its signature, which need values
 			for (int i = 0,
@@ -274,7 +287,7 @@
 				i++) {
 				codeStream.aconst_null();
 			}
-			codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */);
+			codeStream.invoke(Opcodes.OPC_invokespecial, this.syntheticAccessor, null /* default declaringClass */, this.typeArguments);
 		}
 		if (valueRequired) {
 			codeStream.generateImplicitConversion(this.implicitConversion);
@@ -400,6 +413,7 @@
 				hasError = true;
 			} else {
 				receiverType = ((SingleTypeReference) this.type).resolveTypeEnclosing(scope, (ReferenceBinding) enclosingInstanceType);
+				checkIllegalNullAnnotation(scope, receiverType);
 				if (receiverType != null && enclosingInstanceContainsCast) {
 					CastExpression.checkNeedForEnclosingInstanceCast(scope, this.enclosingInstance, enclosingInstanceType, receiverType);
 				}
@@ -410,6 +424,7 @@
 				receiverType = scope.enclosingSourceType();
 			} else {
 				receiverType = this.type.resolveType(scope, true /* check bounds*/);
+				checkIllegalNullAnnotation(scope, receiverType);
 				checkParameterizedAllocation: {
 					if (receiverType == null || !receiverType.isValidBinding()) break checkParameterizedAllocation;
 					if (this.type instanceof ParameterizedQualifiedTypeReference) { // disallow new X<String>.Y<Integer>()
@@ -465,18 +480,23 @@
 
 		// will check for null after args are resolved
 		TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
+		boolean polyExpressionSeen = false;
 		if (this.arguments != null) {
 			int length = this.arguments.length;
 			argumentTypes = new TypeBinding[length];
+			TypeBinding argumentType;
 			for (int i = 0; i < length; i++) {
 				Expression argument = this.arguments[i];
 				if (argument instanceof CastExpression) {
 					argument.bits |= ASTNode.DisableUnnecessaryCastCheck; // will check later on
 					argsContainCast = true;
 				}
-				if ((argumentTypes[i] = argument.resolveType(scope)) == null){
+				argument.setExpressionContext(INVOCATION_CONTEXT);
+				if ((argumentType = argumentTypes[i] = argument.resolveType(scope)) == null){
 					hasError = true;
 				}
+				if (argumentType != null && argumentType.kind() == Binding.POLY_TYPE)
+					polyExpressionSeen = true;
 			}
 		}
 
@@ -551,16 +571,17 @@
                         ITranslationStates.STATE_TYPES_ADJUSTED);
             AnchorMapping anchorMapping = AnchorMapping.setupNewMapping(
                     null, this.arguments, scope);
-/*original
-			if ((this.binding = scope.getConstructor(allocationType, argumentTypes, this)).isValidBinding()) {
-*/
-            try {
-	            this.binding = scope.getConstructor(allocationType, argumentTypes, this);
-            } finally {
+          try {
+   	// orig:
+  			this.binding = scope.getConstructor(allocationType, argumentTypes, this);
+    // :giro
+          } finally {
                 AnchorMapping.removeCurrentMapping(anchorMapping);
-            }
-			if (this.binding.isValidBinding()) {
+          }
 // SH}
+			if (polyExpressionSeen && polyExpressionsHaveErrors(scope, this.binding, this.arguments, argumentTypes))
+				return null;
+			if (this.binding.isValidBinding()) {	
 				if (isMethodUseDeprecated(this.binding, scope, true)) {
 					scope.problemReporter().deprecatedMethod(this.binding, this);
 				}
@@ -599,7 +620,7 @@
 		 	}
 			// The enclosing instance must be compatible with the innermost enclosing type
 			ReferenceBinding expectedType = this.binding.declaringClass.enclosingType();
-			if (expectedType != enclosingInstanceType) // must call before computeConversion() and typeMismatchError()
+			if (TypeBinding.notEquals(expectedType, enclosingInstanceType)) // must call before computeConversion() and typeMismatchError()
 				scope.compilationUnitScope().recordTypeConversion(expectedType, enclosingInstanceType);
 			if (enclosingInstanceType.isCompatibleWith(expectedType) || scope.isBoxingCompatibleWith(enclosingInstanceType, expectedType)) {
 				this.enclosingInstance.computeConversion(scope, expectedType, enclosingInstanceType);
@@ -642,6 +663,8 @@
 			return null; // stop secondary errors
 		}
 		MethodBinding inheritedBinding = scope.getConstructor(anonymousSuperclass, argumentTypes, this);
+		if (polyExpressionSeen && polyExpressionsHaveErrors(scope, inheritedBinding, this.arguments, argumentTypes))
+			return null;
 		if (!inheritedBinding.isValidBinding()) {
 			if (inheritedBinding.declaringClass == null) {
 				inheritedBinding.declaringClass = anonymousSuperclass;
@@ -681,7 +704,6 @@
 	}
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
-
 //{ObjectTeams: use the concrete class for this:
 		if (visitor.visit(_this(), scope)) {
 // SH}
@@ -709,4 +731,4 @@
 }
 //{ObjectTeams: end enclosing wrapper class
 }
-// SH}
\ No newline at end of file
+// SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index 51405bc..712384c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: QualifiedNameReference.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -16,6 +19,9 @@
  *								bug 365519 - editorial cleanup after bug 186342 and bug 365387
  *								bug 368546 - [compiler][resource] Avoid remaining false positives found when compiling the Eclipse SDK
  *								bug 345305 - [compiler][null] Compiler misidentifies a case of "variable can only be null"
+ *								Bug 414380 - [compiler][internal] QualifiedNameReference#indexOfFirstFieldBinding does not point to the first field
+ *     Jesper S Moller - Contributions for
+ *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								bug 402993 - [null] Follow up of bug 401088: Missing warning about redundant null check
@@ -94,7 +100,9 @@
 	public long[] sourcePositions;
 	public FieldBinding[] otherBindings;
 	int[] otherDepths;
-	public int indexOfFirstFieldBinding;//points (into tokens) for the first token that corresponds to first FieldBinding
+	public int indexOfFirstFieldBinding; 	// points into tokens & sourcePositions for the first token that corresponds to first FieldBinding
+										  	// *** the index is 1-based ***
+											// during BlockScope#getBinding(..) it will walk through positions until it finds the first field
 	public SyntheticMethodBinding syntheticWriteAccessor;
 	public SyntheticMethodBinding[] syntheticReadAccessors;
 	public TypeBinding genericCast;
@@ -284,12 +292,12 @@
 	if (this.otherBindings != null) {
 		if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.FIELD) {
 			// is the first field dereferenced annotated Nullable? If so, report immediately
-			checkNullableFieldDereference(scope, (FieldBinding) this.binding, this.sourcePositions[0]);
+			checkNullableFieldDereference(scope, (FieldBinding) this.binding, this.sourcePositions[this.indexOfFirstFieldBinding-1]);
 		}
 		// look for annotated fields, they do not depend on flow context -> check immediately:
 		int length = this.otherBindings.length - 1; // don't check the last binding
 		for (int i = 0; i < length; i++) {
-			checkNullableFieldDereference(scope, this.otherBindings[i], this.sourcePositions[i+1]);
+			checkNullableFieldDereference(scope, this.otherBindings[i], this.sourcePositions[this.indexOfFirstFieldBinding+i]);
 		}
 	}
 }
@@ -389,7 +397,7 @@
 				}
 			} else {
 				boolean isFirst = lastFieldBinding == this.binding
-												&& (this.indexOfFirstFieldBinding == 1 || lastFieldBinding.declaringClass == currentScope.enclosingReceiverType())
+												&& (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
 												&& this.otherBindings == null; // could be dup: next.next.next
 				TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length);
 				if (valueRequired
@@ -455,7 +463,7 @@
 	// check if compound assignment is the only usage of a private field
 	reportOnlyUselesslyReadPrivateField(currentScope, lastFieldBinding, valueRequired);
 	boolean isFirst = lastFieldBinding == this.binding
-		&& (this.indexOfFirstFieldBinding == 1 || lastFieldBinding.declaringClass == currentScope.enclosingReceiverType())
+		&& (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
 		&& this.otherBindings == null; // could be dup: next.next.next
 	TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);			
 	SyntheticMethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[this.syntheticReadAccessors.length - 1];
@@ -508,7 +516,7 @@
 	// check if this post increment is the only usage of a private field
 	reportOnlyUselesslyReadPrivateField(currentScope, lastFieldBinding, valueRequired);
 	boolean isFirst = lastFieldBinding == this.binding
-		&& (this.indexOfFirstFieldBinding == 1 || lastFieldBinding.declaringClass == currentScope.enclosingReceiverType())
+		&& (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
 		&& this.otherBindings == null; // could be dup: next.next.next
 	TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, getFinalReceiverType(), isFirst);			
 	SyntheticMethodBinding accessor = this.syntheticReadAccessors == null
@@ -617,7 +625,8 @@
 				// no implicit conversion
 			} else {
 				// outer local?
-				if ((this.bits & ASTNode.DepthMASK) != 0) {
+				if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+					checkEffectiveFinality(localBinding, currentScope);
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
@@ -674,7 +683,7 @@
 						if (lastFieldBinding == initialFieldBinding) {
 							if (lastFieldBinding.isStatic()){
 								// if no valueRequired, still need possible side-effects of <clinit> invocation, if field belongs to different class
-								if (initialFieldBinding.declaringClass != this.actualReceiverType.erasure()) {
+								if (TypeBinding.notEquals(initialFieldBinding.declaringClass, this.actualReceiverType.erasure())) {
 									MethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[i];
 									if (accessor == null) {
 										TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, lastFieldBinding, lastReceiverType, i == 0 && this.indexOfFirstFieldBinding == 1);
@@ -790,7 +799,7 @@
 				TypeBinding oldReceiverType = fieldReceiverType;
 				fieldReceiverType = fieldReceiverType.getErasureCompatibleType(field.declaringClass);// handle indirect inheritance thru variable secondary bound
 				FieldBinding originalBinding = previousField.original();
-				if (fieldReceiverType != oldReceiverType || originalBinding.type.leafComponentType().isTypeVariable()) { // record need for explicit cast at codegen
+				if (TypeBinding.notEquals(fieldReceiverType, oldReceiverType) || originalBinding.type.leafComponentType().isTypeVariable()) { // record need for explicit cast at codegen
 			    	setGenericCast(index-1,originalBinding.type.genericCast(fieldReceiverType)); // type cannot be base-type even in boxing case
 				}				
 		    }
@@ -809,14 +818,14 @@
 					MethodScope methodScope = scope.methodScope();
 					SourceTypeBinding sourceType = methodScope.enclosingSourceType();
 					if ((this.bits & ASTNode.IsStrictlyAssigned) == 0
-							&& sourceType == declaringClass
+							&& TypeBinding.equalsEquals(sourceType, declaringClass)
 							&& methodScope.lastVisibleFieldID >= 0
 							&& field.id >= methodScope.lastVisibleFieldID
 							&& (!field.isStatic() || methodScope.isStatic)) {
 						scope.problemReporter().forwardReference(this, index, field);
 					}					
 					// check if accessing enum static field in initializer
-					if ((sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
+					if ((TypeBinding.equalsEquals(sourceType, declaringClass) || TypeBinding.equalsEquals(sourceType.superclass, declaringClass)) // enum constant body
 							&& field.constant() == Constant.NotAConstant
 							&& !methodScope.isStatic
 							&& methodScope.isInsideInitializerOrConstructor()) {
@@ -826,7 +835,7 @@
 				// static field accessed through receiver? legal but unoptimal (optional warning)
 				scope.problemReporter().nonStaticAccessToStaticField(this, field, index);
 				// indirect static reference ?
-				if (field.declaringClass != type) {
+				if (TypeBinding.notEquals(field.declaringClass, type)) {
 					scope.problemReporter().indirectAccessToStaticField(this, field);
 				}
 			}
@@ -975,7 +984,7 @@
 
 public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
 	//If inlinable field, forget the access emulation, the code gen will directly target it
-	if (((this.bits & ASTNode.DepthMASK) == 0) || (this.constant != Constant.NotAConstant)) {
+	if (((this.bits & ASTNode.DepthMASK) == 0 && (this.bits & ASTNode.IsCapturedOuterLocal) == 0) || (this.constant != Constant.NotAConstant)) {
 		return;
 	}
 	if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) {
@@ -1049,7 +1058,7 @@
 	if (fieldBinding.isPrivate()) { // private access
 	    FieldBinding codegenField = getCodegenBinding(index < 0 ? (this.otherBindings == null ? 0 : this.otherBindings.length) : index);
 	    ReferenceBinding declaringClass = codegenField.declaringClass;
-		if (declaringClass != currentScope.enclosingSourceType()) {
+		if (TypeBinding.notEquals(declaringClass, currentScope.enclosingSourceType())) {
 		    setSyntheticAccessor(fieldBinding, index, ((SourceTypeBinding) declaringClass).addSyntheticMethod(codegenField, index >= 0 /*read-access?*/, false /*not super access*/,
 //{ObjectTeams: added 3. arg (externalizedReceiver):
 								true));
@@ -1185,8 +1194,9 @@
 					this.bits &= ~ASTNode.RestrictiveFlagMASK; // clear bits
 					this.bits |= Binding.LOCAL;
 					LocalVariableBinding local = (LocalVariableBinding) this.binding;
-					if (!local.isFinal() && ((this.bits & ASTNode.DepthMASK) != 0)) {
-						scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding) this.binding, this);
+					if (!local.isFinal() && (this.bits & ASTNode.IsCapturedOuterLocal) != 0) { 
+						if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8) // for 8, defer till effective finality could be ascertained.
+							scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding) this.binding, this);
 					}
 					if (local.type != null && (local.type.tagBits & TagBits.HasMissingType) != 0) {
 						// only complain if field reference (for local, its type got flagged already)
@@ -1209,7 +1219,7 @@
 					SourceTypeBinding sourceType = methodScope.enclosingSourceType();
 					// check for forward references
 					if ((this.indexOfFirstFieldBinding == 1 || (fieldBinding.modifiers & ClassFileConstants.AccEnum) != 0 || (!fieldBinding.isFinal() && declaringClass.isEnum())) // enum constants are checked even when qualified
-							&& sourceType == declaringClass
+							&& TypeBinding.equalsEquals(sourceType, declaringClass)
 							&& methodScope.lastVisibleFieldID >= 0
 							&& fieldBinding.id >= methodScope.lastVisibleFieldID
 							&& (!fieldBinding.isStatic() || methodScope.isStatic)) {
@@ -1226,7 +1236,7 @@
 						// only last field is actually a write access if any
 						// check if accessing enum static field in initializer
 						if (declaringClass.isEnum()) {
-							if ((sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
+							if ((TypeBinding.equalsEquals(sourceType, declaringClass) || TypeBinding.equalsEquals(sourceType.superclass, declaringClass)) // enum constant body
 									&& fieldBinding.constant() == Constant.NotAConstant
 									&& !methodScope.isStatic
 									&& methodScope.isInsideInitializerOrConstructor()) {
@@ -1234,17 +1244,23 @@
 							}
 						}
 						if (this.indexOfFirstFieldBinding > 1
-								&& fieldBinding.declaringClass != this.actualReceiverType
+								&& TypeBinding.notEquals(fieldBinding.declaringClass, this.actualReceiverType)
 								&& fieldBinding.declaringClass.canBeSeenBy(scope)) {
 							scope.problemReporter().indirectAccessToStaticField(this, fieldBinding);
 						}						
 					} else {
-						if (this.indexOfFirstFieldBinding == 1 && scope.compilerOptions().getSeverity(CompilerOptions.UnqualifiedFieldAccess) != ProblemSeverities.Ignore) {
-							scope.problemReporter().unqualifiedFieldAccess(this, fieldBinding);
+						boolean inStaticContext = scope.methodScope().isStatic;
+						if (this.indexOfFirstFieldBinding == 1) {
+							if (scope.compilerOptions().getSeverity(CompilerOptions.UnqualifiedFieldAccess) != ProblemSeverities.Ignore) {
+								scope.problemReporter().unqualifiedFieldAccess(this, fieldBinding);
+							}
+							if (!inStaticContext) {
+								scope.tagAsAccessingEnclosingInstanceStateOf(fieldBinding.declaringClass, false /* type variable access */);
+							}
 						}
 						//must check for the static status....
 						if (this.indexOfFirstFieldBinding > 1  //accessing to a field using a type as "receiver" is allowed only with static field
-								 || scope.methodScope().isStatic) { 	// the field is the first token of the qualified reference....
+								 || inStaticContext) { 	// the field is the first token of the qualified reference....
 							scope.problemReporter().staticFieldAccessToNonStaticVariable(this, fieldBinding);
 							return null;
 						 }
@@ -1358,7 +1374,11 @@
 	return new String(this.tokens[0]);
 }
 
-public VariableBinding nullAnnotatedVariableBinding() {
+public char[][] getName() {
+	return this.tokens;
+}
+
+public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations) {
 	if (this.binding != null && isFieldAccess()) {
 		FieldBinding fieldBinding;
 		if (this.otherBindings == null) {
@@ -1366,7 +1386,7 @@
 		} else {
 			fieldBinding = this.otherBindings[this.otherBindings.length - 1];
 		}
-		if (fieldBinding.isNullable() || fieldBinding.isNonNull()) {
+		if (supportTypeAnnotations || fieldBinding.isNullable() || fieldBinding.isNonNull()) {
 			return fieldBinding;
 		}
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
index c7bc168..86101de 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
@@ -1,12 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 382350 - [1.8][compiler] Unable to invoke inherited default method via I.super.m() syntax
+ *								bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
+ *								bug 404728 - [1.8]NPE on QualifiedSuperReference error
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -37,6 +45,10 @@
 		return null;
 	}
 	super.resolveType(scope);
+	if (this.resolvedType != null && !this.resolvedType.isValidBinding()) {
+		scope.problemReporter().illegalSuperAccess(this.qualification.resolvedType, this.resolvedType, this);
+		return null;
+	}
 	if (this.currentCompatibleType == null)
 		return null; // error case
 
@@ -44,7 +56,42 @@
 		scope.problemReporter().cannotUseSuperInJavaLangObject(this);
 		return null;
 	}
-	return this.resolvedType = this.currentCompatibleType.superclass();
+	return this.resolvedType = (this.currentCompatibleType.isInterface()
+			? this.currentCompatibleType
+			: this.currentCompatibleType.superclass());
+}
+
+int findCompatibleEnclosing(ReferenceBinding enclosingType, TypeBinding type) {
+	if (type.isInterface()) {
+		// super call to an overridden default method? (not considering outer enclosings)
+		ReferenceBinding[] supers = enclosingType.superInterfaces();
+		int length = supers.length;
+		boolean isLegal = true; // false => compoundName != null && closestMatch != null
+		char[][] compoundName = null;
+		ReferenceBinding closestMatch = null;
+		for (int i = 0; i < length; i++) {
+			if (TypeBinding.equalsEquals(supers[i].erasure(), type)) {
+				this.currentCompatibleType = closestMatch = supers[i];
+			} else if (supers[i].erasure().isCompatibleWith(type)) {
+				isLegal = false;
+				compoundName = supers[i].compoundName;
+				if (closestMatch == null)
+					closestMatch = supers[i];
+				// keep looking to ensure we always find the referenced type (even if illegal) 
+			}
+		}
+		if (!isLegal) {
+			this.currentCompatibleType = null;
+			// Please note the slightly unconventional use of the ProblemReferenceBinding:
+			// we use the problem's compoundName to report the type being illegally bypassed,
+			// whereas the closestMatch denotes the resolved (though illegal) target type
+			// for downstream resolving.
+			this.resolvedType =  new ProblemReferenceBinding(compoundName, 
+					closestMatch, ProblemReasons.AttemptToBypassDirectSuper);
+		}
+		return 0; // never an outer enclosing type
+	}
+	return super.findCompatibleEnclosing(enclosingType, type);
 }
 
 public void traverse(
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
index 7049f44..2922b23 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
@@ -6,10 +6,17 @@
  * http://www.eclipse.org/legal/epl-v10.html
  * $Id: QualifiedThisReference.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 382350 - [1.8][compiler] Unable to invoke inherited default method via I.super.m() syntax
+ *								bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
  *     Jesper S Moller <jesper@selskabet.org> - Contributions for
  *								bug 378674 - "The method can be declared as static" is wrong
  *******************************************************************************/
@@ -122,29 +129,27 @@
 
 		// the qualification MUST exactly match some enclosing type name
 		// It is possible to qualify 'this' by the name of the current class
-		int depth = 0;
-		this.currentCompatibleType = scope.referenceType().binding;
 //{ObjectTeams: use class part to avoid roles to be reported as static:
-		this.currentCompatibleType = this.currentCompatibleType.getRealClass();
+/* orig:
+		int depth = findCompatibleEnclosing(scope.referenceType().binding, type);
+  :giro */
+		int depth = findCompatibleEnclosing(scope.referenceType().binding.getRealClass(), type);
 // SH}
-		while (this.currentCompatibleType != null && this.currentCompatibleType != type) {
-			depth++;
-			this.currentCompatibleType = this.currentCompatibleType.isStatic() ? null : this.currentCompatibleType.enclosingType();
-		}
 		this.bits &= ~DepthMASK; // flush previous depth if any
 		this.bits |= (depth & 0xFF) << DepthSHIFT; // encoded depth into 8 bits
 
 		if (this.currentCompatibleType == null) {
-			scope.problemReporter().noSuchEnclosingInstance(type, this, false);
+			if (this.resolvedType.isValidBinding())
+				scope.problemReporter().noSuchEnclosingInstance(type, this, false);
+			// otherwise problem will be reported by the caller
 			return this.resolvedType;
 		} else {
-			// Mark all methods between here and the declared type as not static
-			scope.resetDeclaringClassMethodStaticFlag(this.currentCompatibleType);
+			scope.tagAsAccessingEnclosingInstanceStateOf(this.currentCompatibleType, false /* type variable access */);
 		}
 
 		// Ensure one cannot write code like: B() { super(B.this); }
 		if (depth == 0) {
-			checkAccess(scope.methodScope());
+			checkAccess(scope, null);
 		} // if depth>0, path emulation will diagnose bad scenarii
 
 //{ObjectTeams: wrap role type:
@@ -156,6 +161,16 @@
 		return this.resolvedType;
 	}
 
+	int findCompatibleEnclosing(ReferenceBinding enclosingType, TypeBinding type) {
+		int depth = 0;
+		this.currentCompatibleType = enclosingType;
+		while (this.currentCompatibleType != null && TypeBinding.notEquals(this.currentCompatibleType, type)) {
+			depth++;
+			this.currentCompatibleType = this.currentCompatibleType.isStatic() ? null : this.currentCompatibleType.enclosingType();
+		}
+		return depth;
+	}
+
 	public StringBuffer printExpression(int indent, StringBuffer output) {
 
 		return this.qualification.print(0, output).append(".this"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
index 6421176..b8677b5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
@@ -1,15 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: QualifiedTypeReference.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -44,11 +49,17 @@
 		this.sourceEnd = (int)(this.sourcePositions[this.sourcePositions.length-1] & 0x00000000FFFFFFFFL ) ;
 	}
 
-	public TypeReference copyDims(int dim){
-		//return a type reference copy of me with some dimensions
-		//warning : the new type ref has a null binding
-		return new ArrayQualifiedTypeReference(this.tokens, dim, this.sourcePositions);
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
+		int totalDimensions = this.dimensions() + additionalDimensions;
+		Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
+		ArrayQualifiedTypeReference arrayQualifiedTypeReference = new ArrayQualifiedTypeReference(this.tokens, totalDimensions, allAnnotations, this.sourcePositions);
+		arrayQualifiedTypeReference.annotations = this.annotations;
+		arrayQualifiedTypeReference.bits |= (this.bits & ASTNode.HasTypeAnnotations);
+		if (!isVarargs)
+			arrayQualifiedTypeReference.extendedDimensions = additionalDimensions;
+		return arrayQualifiedTypeReference;
 	}
+
 //{ObjectTeams:
 	/**
 	 * Try to resolve this type reference as an anchored type "t.R".
@@ -112,6 +123,29 @@
 	public char[] getLastToken() {
 		return this.tokens[this.tokens.length-1];
 	}
+
+	protected void rejectAnnotationsOnPackageQualifiers(Scope scope, PackageBinding packageBinding) {
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=390882
+		if (packageBinding == null || this.annotations == null) return;
+
+		int i = packageBinding.compoundName.length;
+		for (int j = 0; j < i; j++) {
+			Annotation[] qualifierAnnot = this.annotations[j];
+			if (qualifierAnnot != null && qualifierAnnot.length > 0) {
+				scope.problemReporter().misplacedTypeAnnotations(qualifierAnnot[0], qualifierAnnot[qualifierAnnot.length - 1]);
+				this.annotations[j] = null;
+			}
+		}
+	}
+
+	protected static void rejectAnnotationsOnStaticMemberQualififer(Scope scope, ReferenceBinding currentType, Annotation[] qualifierAnnot) {
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=385137
+		if (currentType.isMemberType() && currentType.isStatic() && qualifierAnnot != null && qualifierAnnot.length > 0) {
+			scope.problemReporter().illegalTypeAnnotationsInStaticMemberAccess(qualifierAnnot[0],
+					qualifierAnnot[qualifierAnnot.length - 1]);
+		}
+	}
+
 	protected TypeBinding getTypeBinding(Scope scope) {
 
 		if (this.resolvedType != null) {
@@ -147,6 +181,8 @@
 			return (ReferenceBinding) binding; // not found
 		}
 	    PackageBinding packageBinding = binding == null ? null : (PackageBinding) binding;
+	    rejectAnnotationsOnPackageQualifiers(scope, packageBinding);
+
 	    boolean isClassScope = scope.kind == Scope.CLASS_SCOPE;
 	    ReferenceBinding qualifiedType = null;
 		for (int i = packageBinding == null ? 0 : packageBinding.compoundName.length, max = this.tokens.length, last = max-1; i < max; i++) {
@@ -176,8 +212,11 @@
 					return null;
 			ReferenceBinding currentType = (ReferenceBinding) this.resolvedType;
 			if (qualifiedType != null) {
+				if (this.annotations != null) {
+					rejectAnnotationsOnStaticMemberQualififer(scope, currentType, this.annotations[i-1]);
+				}
 				ReferenceBinding enclosingType = currentType.enclosingType();
-				if (enclosingType != null && enclosingType.erasure() != qualifiedType.erasure()) {
+				if (enclosingType != null && TypeBinding.notEquals(enclosingType.erasure(), qualifiedType.erasure())) {
 					qualifiedType = enclosingType; // inherited member type, leave it associated with its enclosing rather than subtype
 				}
 				boolean rawQualified;
@@ -185,7 +224,7 @@
 					qualifiedType = scope.environment().createRawType(currentType, qualifiedType);
 				} else if ((rawQualified = qualifiedType.isRawType()) && !currentType.isStatic()) {
 					qualifiedType = scope.environment().createRawType((ReferenceBinding)currentType.erasure(), qualifiedType);
-				} else if ((rawQualified || qualifiedType.isParameterizedType()) && qualifiedType.erasure() == currentType.enclosingType().erasure()) {
+				} else if ((rawQualified || qualifiedType.isParameterizedType()) && TypeBinding.equalsEquals(qualifiedType.erasure(), currentType.enclosingType().erasure())) {
 					qualifiedType = scope.environment().createParameterizedType((ReferenceBinding)currentType.erasure(), null, qualifiedType);
 				} else {
 					qualifiedType = currentType;
@@ -217,9 +256,12 @@
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output) {
-
 		for (int i = 0; i < this.tokens.length; i++) {
 			if (i > 0) output.append('.');
+			if (this.annotations != null && this.annotations[i] != null) {
+				printAnnotations(this.annotations[i], output);
+				output.append(' ');
+			}
 //{ObjectTeams: suppress prefix:
 		  if (CharOperation.equals(this.tokens[i], IOTConstants._OT_BASE))
 			output.append(IOTConstants.BASE);
@@ -231,14 +273,33 @@
 	}
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
-
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
-
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLevels = this.annotations.length;
+				for (int i = 0; i < annotationsLevels; i++) {
+					int annotationsLength = this.annotations[i] == null ? 0 : this.annotations[i].length;
+					for (int j = 0; j < annotationsLength; j++)
+						this.annotations[i][j].traverse(visitor, scope);
+				}
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
+	public int getAnnotatableLevels() {
+		return this.tokens.length;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
new file mode 100644
index 0000000..15ab52c
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.compiler.ast;
+
+public class Receiver extends Argument {
+	public NameReference qualifyingName;
+	public Receiver(char[] name, long posNom, TypeReference typeReference, NameReference qualifyingName, int modifiers) {
+		super(name, posNom, typeReference, modifiers);
+		this.qualifyingName = qualifyingName;
+	}
+	public boolean isReceiver() {
+		return true;
+	}
+	
+	public StringBuffer print(int indent, StringBuffer output) {
+
+		printIndent(indent, output);
+		printModifiers(this.modifiers, output);
+
+		if (this.type == null) {
+			output.append("<no type> "); //$NON-NLS-1$
+		} else {
+			this.type.print(0, output).append(' ');
+		}
+		if (this.qualifyingName != null) {
+			this.qualifyingName.print(indent, output);
+			output.append('.');
+		}
+		return output.append(this.name);
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
index 5714216..6dae5dc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
@@ -5,14 +5,22 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
  *								bug 185682 - Increment/decrement operators mark local variables as read
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis 
+ *								Bug 411964 - [1.8][null] leverage null type annotation in foreach statement
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -71,6 +79,11 @@
 }
 
 protected boolean checkNullableFieldDereference(Scope scope, FieldBinding field, long sourcePosition) {
+	// preference to type annotations if we have any
+	if ((field.type.tagBits & TagBits.AnnotationNullable) != 0) {
+		scope.problemReporter().dereferencingNullableExpression(sourcePosition, scope.environment());
+		return true;
+	}
 	if ((field.tagBits & TagBits.AnnotationNullable) != 0) {
 		scope.problemReporter().nullableFieldDereference(field, sourcePosition);
 		return true;
@@ -155,9 +168,11 @@
 		} else if (fieldBinding.isNullable()) {
 			return FlowInfo.POTENTIALLY_NULL;
 		}
-		return FlowInfo.UNKNOWN;
 	}
-	return super.nullStatus(flowInfo, flowContext);
+	if (this.resolvedType != null) {
+		return FlowInfo.tagBitsToNullStatus(this.resolvedType.tagBits);
+	}
+	return FlowInfo.UNKNOWN;
 }
 
 /* report if a private field is only read from a 'special operator',
@@ -206,7 +221,7 @@
 	if (localBinding.declaration instanceof Argument) {
 		// check compiler options to report against unused arguments
 		MethodScope methodScope = currentScope.methodScope();
-		if (methodScope != null) {
+		if (methodScope != null && !methodScope.isLambdaScope()) { // lambda must be congruent with the descriptor.
 			MethodBinding method = ((AbstractMethodDeclaration)methodScope.referenceContext()).binding;
 			
 			boolean shouldReport = !method.isMain();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
new file mode 100644
index 0000000..ac23bf2
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
@@ -0,0 +1,647 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - Contributions for
+ *							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *                          Bug 384687 - [1.8] Wildcard type arguments should be rejected for lambda and reference expressions
+ *							Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
+ *	   Stephan Herrmann - Contribution for
+ *							bug 402028 - [1.8][compiler] null analysis for reference expressions 
+ *							bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super via I.super.m() syntax
+ *							Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *							Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contribution for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.compiler.ast;
+
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
+import org.eclipse.jdt.internal.compiler.flow.FlowContext;
+import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Binding;
+import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.InvocationSite;
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.NestedTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ProblemReasons;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.SyntheticMethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
+import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
+import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+
+public class ReferenceExpression extends FunctionalExpression implements InvocationSite {
+	
+	public Expression lhs;
+	public TypeReference [] typeArguments;
+	public char [] selector;
+	
+	private TypeBinding receiverType;
+	private boolean haveReceiver;
+	public TypeBinding[] resolvedTypeArguments;
+	private boolean typeArgumentsHaveErrors;
+	
+	MethodBinding syntheticAccessor;	// synthetic accessor for inner-emulation
+	private int depth;
+	
+	public ReferenceExpression(CompilationResult compilationResult, Expression lhs, TypeReference [] typeArguments, char [] selector, int sourceEnd) {
+		super(compilationResult);
+		this.lhs = lhs;
+		this.typeArguments = typeArguments;
+		this.selector = selector;
+		this.sourceStart = lhs.sourceStart;
+		this.sourceEnd = sourceEnd;
+	}
+ 
+	public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
+		this.actualMethodBinding = this.binding; // grab before synthetics come into play.
+		SourceTypeBinding sourceType = currentScope.enclosingSourceType();
+		if (this.receiverType.isArrayType()) {
+			if (isConstructorReference()) {
+				this.binding = sourceType.addSyntheticArrayMethod((ArrayBinding) this.receiverType, SyntheticMethodBinding.ArrayConstructor);
+			} else if (CharOperation.equals(this.selector, TypeConstants.CLONE)) {
+				this.binding = sourceType.addSyntheticArrayMethod((ArrayBinding) this.receiverType, SyntheticMethodBinding.ArrayClone);
+			}
+		} else if (this.syntheticAccessor != null) {
+			if (this.lhs.isSuper() || isMethodReference())
+				this.binding = this.syntheticAccessor;
+		}
+		
+		int pc = codeStream.position;
+		StringBuffer buffer = new StringBuffer();
+		int argumentsSize = 0;
+		buffer.append('(');
+		if (this.haveReceiver) {
+			this.lhs.generateCode(currentScope, codeStream, true);
+			if (this.lhs.isSuper()) {
+				if (this.lhs instanceof QualifiedSuperReference) {
+					QualifiedSuperReference qualifiedSuperReference = (QualifiedSuperReference) this.lhs;
+					TypeReference qualification = qualifiedSuperReference.qualification;
+					if (qualification.resolvedType.isInterface()) {
+						buffer.append(sourceType.signature());
+					} else {
+						buffer.append(((QualifiedSuperReference) this.lhs).currentCompatibleType.signature());
+					}
+				} else { 
+					buffer.append(sourceType.signature());
+				}
+			} else {
+				buffer.append(this.receiverType.signature());
+			}
+			argumentsSize = 1;
+		} else {
+			if (this.isConstructorReference()) {
+				ReferenceBinding[] enclosingInstances = Binding.UNINITIALIZED_REFERENCE_TYPES;
+				if (this.receiverType.isNestedType()) {
+					NestedTypeBinding nestedType = null;
+					if (this.receiverType instanceof ParameterizedTypeBinding) {
+						nestedType = (NestedTypeBinding)((ParameterizedTypeBinding) this.receiverType).genericType();
+					} else {
+						nestedType = (NestedTypeBinding) this.receiverType;
+					}
+					if ((enclosingInstances = nestedType.syntheticEnclosingInstanceTypes()) != null) {
+						int length = enclosingInstances.length;
+						argumentsSize = length;
+						for (int i = 0 ; i < length; i++) {
+							ReferenceBinding syntheticArgumentType = enclosingInstances[i];
+							buffer.append(syntheticArgumentType.signature());
+							Object[] emulationPath = currentScope.getEmulationPath(
+									syntheticArgumentType,
+									false /* allow compatible match */,
+									true /* disallow instance reference in explicit constructor call */);
+							codeStream.generateOuterAccess(emulationPath, this, syntheticArgumentType, currentScope);
+						}
+					}
+					// Reject types that capture outer local arguments, these cannot be manufactured by the metafactory.
+					if (nestedType.syntheticOuterLocalVariables() != null) {
+						currentScope.problemReporter().noSuchEnclosingInstance(nestedType.enclosingType, this, false);
+						return;
+					}
+				}
+				if (this.syntheticAccessor != null) {
+					this.binding = sourceType.addSyntheticFactoryMethod(this.binding, this.syntheticAccessor, enclosingInstances);
+				}
+			}
+		}
+		buffer.append(')');
+		buffer.append('L');
+		buffer.append(this.resolvedType.constantPoolName());
+		buffer.append(';');
+		int invokeDynamicNumber = codeStream.classFile.recordBootstrapMethod(this);
+		codeStream.invokeDynamic(invokeDynamicNumber, argumentsSize, 1, this.descriptor.selector, buffer.toString().toCharArray(), 
+				this.isConstructorReference(), (this.lhs instanceof TypeReference? (TypeReference) this.lhs : null), this.typeArguments);
+		codeStream.recordPositionsFrom(pc, this.sourceStart);
+	}
+	
+	public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
+		
+		if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) != 0 || this.binding == null || !this.binding.isValidBinding()) 
+			return;
+		
+		MethodBinding codegenBinding = this.binding.original();
+		SourceTypeBinding enclosingSourceType = currentScope.enclosingSourceType();
+		
+		if (this.isConstructorReference()) {
+			ReferenceBinding allocatedType = codegenBinding.declaringClass;
+			if (codegenBinding.isPrivate() && TypeBinding.notEquals(enclosingSourceType, (allocatedType = codegenBinding.declaringClass))) {
+				if ((allocatedType.tagBits & TagBits.IsLocalType) != 0) {
+					codegenBinding.tagBits |= TagBits.ClearPrivateModifier;
+				} else {
+					this.syntheticAccessor = ((SourceTypeBinding) allocatedType).addSyntheticMethod(codegenBinding, false);
+					currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
+				}
+			}
+			return;
+		}
+	
+		// -----------------------------------   Only method references from now on -----------
+		if (this.binding.isPrivate()) {
+			if (TypeBinding.notEquals(enclosingSourceType, codegenBinding.declaringClass)){
+				this.syntheticAccessor = ((SourceTypeBinding)codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, false /* not super access */);
+				currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
+			}
+			return;
+		}
+		
+		if (this.lhs.isSuper()) {
+			SourceTypeBinding destinationType = enclosingSourceType;
+			if (this.lhs instanceof QualifiedSuperReference) { 	// qualified super
+				QualifiedSuperReference qualifiedSuperReference = (QualifiedSuperReference) this.lhs;
+				TypeReference qualification = qualifiedSuperReference.qualification;
+				if (!qualification.resolvedType.isInterface()) // we can't drop the bridge in I, it may not even be a source type.
+					destinationType = (SourceTypeBinding) (qualifiedSuperReference.currentCompatibleType);
+			}
+			
+			this.syntheticAccessor = destinationType.addSyntheticMethod(codegenBinding, true);
+			currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
+			return;
+		}
+		
+		if (this.binding.isProtected() && (this.bits & ASTNode.DepthMASK) != 0 && codegenBinding.declaringClass.getPackage() != enclosingSourceType.getPackage()) {
+			SourceTypeBinding currentCompatibleType = (SourceTypeBinding) enclosingSourceType.enclosingTypeAt((this.bits & ASTNode.DepthMASK) >> ASTNode.DepthSHIFT);
+			this.syntheticAccessor = currentCompatibleType.addSyntheticMethod(codegenBinding, isSuperAccess());
+			currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
+			return;
+		}
+	}
+	
+	public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
+		// static methods with receiver value never get here
+		if (this.haveReceiver) {
+			this.lhs.checkNPE(currentScope, flowContext, flowInfo);
+			this.lhs.analyseCode(currentScope, flowContext, flowInfo, true);
+		}
+		manageSyntheticAccessIfNecessary(currentScope, flowInfo);
+		return flowInfo;
+	}
+
+	public TypeBinding resolveType(BlockScope scope) {
+		
+		final CompilerOptions compilerOptions = scope.compilerOptions();
+		TypeBinding lhsType;
+    	if (this.constant != Constant.NotAConstant) {
+    		this.constant = Constant.NotAConstant;
+    		this.enclosingScope = scope;
+    		if (isConstructorReference())
+    			this.lhs.bits |= ASTNode.IgnoreRawTypeCheck; // raw types in constructor references are to be treated as though <> were specified.
+
+    		lhsType = this.lhs.resolveType(scope);
+    		if (this.typeArguments != null) {
+    			int length = this.typeArguments.length;
+    			this.typeArgumentsHaveErrors = compilerOptions.sourceLevel < ClassFileConstants.JDK1_5;
+    			this.resolvedTypeArguments = new TypeBinding[length];
+    			for (int i = 0; i < length; i++) {
+    				TypeReference typeReference = this.typeArguments[i];
+    				if ((this.resolvedTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) {
+    					this.typeArgumentsHaveErrors = true;
+    				}
+    				if (this.typeArgumentsHaveErrors && typeReference instanceof Wildcard) { // resolveType on wildcard always return null above, resolveTypeArgument is the real workhorse.
+    					scope.problemReporter().illegalUsageOfWildcard(typeReference);
+    				}
+    			}
+    			if (this.typeArgumentsHaveErrors)
+    				return this.resolvedType = null;
+    		}
+    	} else {
+    		if (this.typeArgumentsHaveErrors)
+				return this.resolvedType = null;
+    		lhsType = this.lhs.resolvedType;
+    	}
+
+    	if (this.expectedType == null && this.expressionContext == INVOCATION_CONTEXT) {
+			return new PolyTypeBinding(this);
+		}
+		super.resolveType(scope);
+		
+    	if (lhsType == null) 
+			return this.resolvedType = null; 	// no hope
+		if (lhsType.problemId() == ProblemReasons.AttemptToBypassDirectSuper)
+			lhsType = lhsType.closestMatch();	// improve resolving experience
+    	if (!lhsType.isValidBinding()) 
+			return this.resolvedType = null;	// nope, no useful type found
+		
+		final TypeBinding[] descriptorParameters = this.descriptor != null ? this.descriptor.parameters : Binding.NO_PARAMETERS;
+		if (lhsType.isBaseType()) {
+			scope.problemReporter().errorNoMethodFor(this.lhs, lhsType, this.selector, descriptorParameters);
+			return this.resolvedType = null;
+		}
+		
+		if (isConstructorReference() && !lhsType.canBeInstantiated()) {
+			scope.problemReporter().cannotInstantiate(this.lhs, lhsType);
+			return this.resolvedType = null;
+		}
+		
+		/* 15.28: "It is a compile-time error if a method reference of the form super :: NonWildTypeArgumentsopt Identifier or of the form 
+		   TypeName . super :: NonWildTypeArgumentsopt Identifier occurs in a static context.": This is nop since the primary when it resolves
+		   itself will complain automatically.
+		
+		   15.28: "The immediately enclosing instance of an inner class instance (15.9.2) must be provided for a constructor reference by a lexically 
+		   enclosing instance of this (8.1.3)", we will actually implement this check in code generation. Emulation path computation will fail if there
+		   is no suitable enclosing instance. While this could be pulled up to here, leaving it to code generation is more consistent with Java 5,6,7 
+		   modus operandi.
+		*/
+		
+		// handle the special case of array construction first.
+        this.receiverType = lhsType;
+		final int parametersLength = descriptorParameters.length;
+        if (isConstructorReference() && lhsType.isArrayType()) {
+        	final TypeBinding leafComponentType = lhsType.leafComponentType();
+			if (!leafComponentType.isReifiable()) {
+        		scope.problemReporter().illegalGenericArray(leafComponentType, this);
+        		return this.resolvedType = null;
+        	}
+        	if (parametersLength != 1 || scope.parameterCompatibilityLevel(descriptorParameters[0], TypeBinding.INT) == Scope.NOT_COMPATIBLE) {
+        		scope.problemReporter().invalidArrayConstructorReference(this, lhsType, descriptorParameters);
+        		return this.resolvedType = null;
+        	}
+        	if (!lhsType.isCompatibleWith(this.descriptor.returnType)) {
+        		scope.problemReporter().constructedArrayIncompatible(this, lhsType, this.descriptor.returnType);
+        		return this.resolvedType = null;
+        	}
+        	return this.resolvedType; // No binding construction possible right now. Code generator will have to conjure up a rabbit.
+        }
+		
+		this.haveReceiver = true;
+		if (this.lhs instanceof NameReference) {
+			if ((this.lhs.bits & ASTNode.RestrictiveFlagMASK) == Binding.TYPE) {
+				this.haveReceiver = false;
+			}
+		} else if (this.lhs instanceof TypeReference) {
+			this.haveReceiver = false;
+		}
+
+		/* For Reference expressions unlike other call sites, we always have a receiver _type_ since LHS of :: cannot be empty. 
+		   LHS's resolved type == actual receiver type. All code below only when a valid descriptor is available.
+		 */
+        if (this.descriptor == null || !this.descriptor.isValidBinding())
+        	return this.resolvedType =  null;
+        
+        // 15.28.1
+        final boolean isMethodReference = isMethodReference();
+        this.depth = 0;
+        MethodBinding someMethod = isMethodReference ? scope.getMethod(this.receiverType, this.selector, descriptorParameters, this) :
+        											       scope.getConstructor((ReferenceBinding) this.receiverType, descriptorParameters, this);
+        int someMethodDepth = this.depth, anotherMethodDepth = 0;
+    	if (someMethod != null && someMethod.isValidBinding()) {
+        	final boolean isStatic = someMethod.isStatic();
+        	if (isStatic && (this.haveReceiver || this.receiverType.isParameterizedType())) {
+    			scope.problemReporter().methodMustBeAccessedStatically(this, someMethod);
+    			return this.resolvedType = null;
+    		}
+        	if (!this.haveReceiver) {
+        		if (!isStatic && !someMethod.isConstructor()) {
+        			scope.problemReporter().methodMustBeAccessedWithInstance(this, someMethod);
+        			return this.resolvedType = null;
+        		}
+        	} 
+        } else {
+        	if (this.lhs instanceof NameReference && !this.haveReceiver && isMethodReference() && this.receiverType.isRawType()) {
+        		if ((this.lhs.bits & ASTNode.IgnoreRawTypeCheck) == 0 && compilerOptions.getSeverity(CompilerOptions.RawTypeReference) != ProblemSeverities.Ignore) {
+        			scope.problemReporter().rawTypeReference(this.lhs, this.receiverType);
+        		}
+        	}
+        }
+    	if (this.lhs.isSuper() && this.lhs.resolvedType.isInterface()) {
+    		scope.checkAppropriateMethodAgainstSupers(this.selector, someMethod, this.descriptor.parameters, this);
+    	}
+
+        MethodBinding anotherMethod = null;
+        int paramOffset = 0;
+        if (!this.haveReceiver && isMethodReference && parametersLength > 0) {
+        	final TypeBinding potentialReceiver = descriptorParameters[0];
+        	if (potentialReceiver.isCompatibleWith(this.receiverType, scope)) {
+        		TypeBinding typeToSearch = this.receiverType;
+        		if (this.receiverType.isRawType()) {
+        			TypeBinding superType = potentialReceiver.findSuperTypeOriginatingFrom(this.receiverType);
+        			if (superType != null)
+        				typeToSearch = superType;
+        		}
+        		TypeBinding [] parameters = Binding.NO_PARAMETERS;
+        		if (parametersLength > 1) {
+        			parameters = new TypeBinding[parametersLength - 1];
+        			System.arraycopy(descriptorParameters, 1, parameters, 0, parametersLength - 1);
+        		}
+        		this.depth = 0;
+        		anotherMethod = scope.getMethod(typeToSearch, this.selector, parameters, this);
+        		anotherMethodDepth = this.depth;
+        		this.depth = 0;
+        		paramOffset = 1; // 0 is receiver, real parameters start at 1
+        	}
+        	if (anotherMethod != null && anotherMethod.isValidBinding() && anotherMethod.isStatic()) {
+        		scope.problemReporter().methodMustBeAccessedStatically(this, anotherMethod);
+        		return this.resolvedType = null;
+        	}
+        }
+        
+        if (someMethod != null && someMethod.isValidBinding() && anotherMethod != null && anotherMethod.isValidBinding()) {
+        	scope.problemReporter().methodReferenceSwingsBothWays(this, anotherMethod, someMethod);
+        	return this.resolvedType = null;
+        }
+        
+        if (someMethod != null && someMethod.isValidBinding()) {
+        	this.binding = someMethod;
+        	this.bits &= ~ASTNode.DepthMASK;
+        	if (someMethodDepth > 0) {
+        		this.bits |= (someMethodDepth & 0xFF) << ASTNode.DepthSHIFT;
+        	}
+        } else if (anotherMethod != null && anotherMethod.isValidBinding()) {
+        	this.binding = anotherMethod;
+        	this.bits &= ~ASTNode.DepthMASK;
+        	if (anotherMethodDepth > 0) {
+        		this.bits |= (anotherMethodDepth & 0xFF) << ASTNode.DepthSHIFT;
+        	}
+        } else {
+        	this.binding = null;
+        	this.bits &= ~ASTNode.DepthMASK;
+        }
+
+        if (this.binding == null) {
+        	char [] visibleName = isConstructorReference() ? this.receiverType.sourceName() : this.selector;
+        	scope.problemReporter().danglingReference(this, this.receiverType, visibleName, descriptorParameters);
+			return this.resolvedType = null;
+        }
+        
+        // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=382350#c2, I.super::abstractMethod will be handled there.
+
+        if (this.binding.isAbstract() && this.lhs.isSuper())
+        	scope.problemReporter().cannotDireclyInvokeAbstractMethod(this, this.binding);
+        
+        if (this.binding.isStatic()) {
+        	if (TypeBinding.notEquals(this.binding.declaringClass, this.receiverType))
+        		scope.problemReporter().indirectAccessToStaticMethod(this, this.binding);
+        } else {
+        	AbstractMethodDeclaration srcMethod = this.binding.sourceMethod();
+        	if (srcMethod != null && srcMethod.isMethod())
+        		srcMethod.bits &= ~ASTNode.CanBeStatic;
+        }
+        
+    	if (isMethodUseDeprecated(this.binding, scope, true))
+    		scope.problemReporter().deprecatedMethod(this.binding, this);
+
+    	if (this.typeArguments != null && this.binding.original().typeVariables == Binding.NO_TYPE_VARIABLES)
+    		scope.problemReporter().unnecessaryTypeArgumentsForMethodInvocation(this.binding, this.resolvedTypeArguments, this.typeArguments);
+    	
+    	if ((this.binding.tagBits & TagBits.HasMissingType) != 0)
+    		scope.problemReporter().missingTypeInMethod(this, this.binding);
+    	
+
+        // OK, we have a compile time declaration, see if it passes muster.
+        TypeBinding [] methodExceptions = this.binding.thrownExceptions;
+        TypeBinding [] kosherExceptions = this.descriptor.thrownExceptions;
+        next: for (int i = 0, iMax = methodExceptions.length; i < iMax; i++) {
+        	if (methodExceptions[i].isUncheckedException(true)) {
+        		continue next;
+    		}
+        	for (int j = 0, jMax = kosherExceptions.length; j < jMax; j++) {
+        		if (methodExceptions[i].isCompatibleWith(kosherExceptions[j], scope))
+        			continue next;
+        	}
+        	scope.problemReporter().unhandledException(methodExceptions[i], this);
+        }
+        if (scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled) {
+        	int len = this.binding.parameters.length;
+    		for (int i = 0; i < len; i++) {
+    			long declared = this.descriptor.parameters[i+paramOffset].tagBits & TagBits.AnnotationNullMASK;
+    			long implemented = this.binding.parameters[i].tagBits & TagBits.AnnotationNullMASK;
+    			if (declared == TagBits.AnnotationNullable) { // promise to accept null
+    				if (implemented != TagBits.AnnotationNullable) {
+    					char[][] requiredAnnot = implemented == 0L ? null : scope.environment().getNonNullAnnotationName();
+    					scope.problemReporter().parameterLackingNullableAnnotation(this, this.descriptor, i, paramOffset, 
+    							scope.environment().getNullableAnnotationName(),
+    							requiredAnnot, this.binding.parameters[i]);
+    				}
+    			} else if (declared == 0L) {
+    				if (implemented == TagBits.AnnotationNonNull) {
+    					scope.problemReporter().parameterRequiresNonnull(this, this.descriptor, i+paramOffset,
+    							scope.environment().getNonNullAnnotationName(), this.binding.parameters[i]);
+    				}
+    			}
+    		}
+        	if ((this.descriptor.returnType.tagBits & TagBits.AnnotationNonNull) != 0) {
+        		if ((this.binding.returnType.tagBits & TagBits.AnnotationNonNull) == 0) {
+        			char[][] providedAnnotationName = ((this.binding.returnType.tagBits & TagBits.AnnotationNullable) != 0) ?
+        					scope.environment().getNullableAnnotationName() : null;
+        			scope.problemReporter().illegalReturnRedefinition(this, this.descriptor,
+        					scope.environment().getNonNullAnnotationName(),
+        					providedAnnotationName, this.binding.returnType);
+        		}
+        	}
+        }
+        
+    	if (checkInvocationArguments(scope, null, this.receiverType, this.binding, null, descriptorParameters, false, this))
+    		this.bits |= ASTNode.Unchecked;
+
+    	if (this.descriptor.returnType.id != TypeIds.T_void) {
+    		// from 1.5 source level on, array#clone() returns the array type (but binding still shows Object)
+    		TypeBinding returnType = null;
+    		if (this.binding == scope.environment().arrayClone || this.binding.isConstructor()) {
+    			returnType = this.receiverType;
+    		} else {
+    			if ((this.bits & ASTNode.Unchecked) != 0 && this.resolvedTypeArguments == null) {
+    				returnType = this.binding.returnType;
+    				if (returnType != null) {
+    					returnType = scope.environment().convertToRawType(returnType.erasure(), true);
+    				}
+    			} else {
+    				returnType = this.binding.returnType;
+    				if (returnType != null) {
+    					returnType = returnType.capture(scope, this.sourceEnd);
+    				}
+    			}
+    		}
+    		if (!returnType.isCompatibleWith(this.descriptor.returnType, scope) && !isBoxingCompatible(returnType, this.descriptor.returnType, this, scope)) {
+    			scope.problemReporter().incompatibleReturnType(this, this.binding, this.descriptor.returnType);
+    			this.binding = null;
+    			this.resolvedType = null;
+    		}
+    	}
+
+    	return this.resolvedType; // Phew !
+	}
+
+	public final boolean isConstructorReference() {
+		return CharOperation.equals(this.selector,  ConstantPool.Init);
+	}
+	
+	public final boolean isMethodReference() {
+		return !CharOperation.equals(this.selector,  ConstantPool.Init);
+	}
+	
+	public TypeBinding[] genericTypeArguments() {
+		return this.resolvedTypeArguments;
+	}
+
+	public boolean isSuperAccess() {
+		return false;
+	}
+
+	public boolean isTypeAccess() {
+		return false;
+	}
+
+	public void setActualReceiverType(ReferenceBinding receiverType) {
+		return;
+	}
+
+	public void setDepth(int depth) {
+		this.depth = depth;
+	}
+
+	public void setFieldIndex(int depth) {
+		return;
+	}
+
+	public StringBuffer printExpression(int tab, StringBuffer output) {
+		
+		this.lhs.print(0, output);
+		output.append("::"); //$NON-NLS-1$
+		if (this.typeArguments != null) {
+			output.append('<');
+			int max = this.typeArguments.length - 1;
+			for (int j = 0; j < max; j++) {
+				this.typeArguments[j].print(0, output);
+				output.append(", ");//$NON-NLS-1$
+			}
+			this.typeArguments[max].print(0, output);
+			output.append('>');
+		}
+		if (isConstructorReference())
+			output.append("new"); //$NON-NLS-1$
+		else 
+			output.append(this.selector);
+		
+		return output;
+	}
+		
+	public void traverse(ASTVisitor visitor, BlockScope blockScope) {
+
+		if (visitor.visit(this, blockScope)) {
+			
+			this.lhs.traverse(visitor, blockScope);
+			
+			int length = this.typeArguments == null ? 0 : this.typeArguments.length;
+			for (int i = 0; i < length; i++) {
+				this.typeArguments[i].traverse(visitor, blockScope);
+			}
+		}
+		visitor.endVisit(this, blockScope);
+	}
+
+	public boolean isCompatibleWith(TypeBinding left, Scope scope) {
+		// 15.28.1
+		final MethodBinding sam = left.getSingleAbstractMethod(this.enclosingScope);
+		if (sam == null || !sam.isValidBinding())
+			return false;
+		boolean isCompatible;
+		setExpectedType(left);
+		IErrorHandlingPolicy oldPolicy = this.enclosingScope.problemReporter().switchErrorHandlingPolicy(silentErrorHandlingPolicy);
+		try {
+			this.binding = null;
+			resolveType(this.enclosingScope);
+		} catch (IncongruentLambdaException e) {
+			return false;
+		} finally {
+			this.enclosingScope.problemReporter().switchErrorHandlingPolicy(oldPolicy);
+			isCompatible = this.binding != null && this.binding.isValidBinding();
+			if (isCompatible) {
+				if (this.resultExpressions == null)
+					this.resultExpressions = new SimpleLookupTable(); // gather for more specific analysis later.
+				this.resultExpressions.put(left, this.binding.returnType);
+			}
+			this.binding = null;
+			setExpectedType(null);
+		}
+		return isCompatible;
+	}
+	public boolean tIsMoreSpecific(TypeBinding t, TypeBinding s) {
+		/* 15.12.2.5 t is more specific than s iff ... Some of the checks here are redundant by the very fact of control reaching here, 
+		   but have been left in for completeness/documentation sakes. These should be cheap anyways. 
+		*/
+		
+		// Both t and s are functional interface types ... 
+		MethodBinding tSam = t.getSingleAbstractMethod(this.enclosingScope);
+		if (tSam == null || !tSam.isValidBinding())
+			return false;
+		MethodBinding sSam = s.getSingleAbstractMethod(this.enclosingScope);
+		if (sSam == null || !sSam.isValidBinding())
+			return false;
+		
+		// t should neither be a subinterface nor a superinterface of s
+		if (t.findSuperTypeOriginatingFrom(s) != null || s.findSuperTypeOriginatingFrom(t) != null)
+			return false;
+
+		// The descriptor parameter types of t are the same as the descriptor parameter types of s.
+		if (tSam.parameters.length != sSam.parameters.length)
+			return false;
+		for (int i = 0, length = tSam.parameters.length; i < length; i++) {
+			if (TypeBinding.notEquals(tSam.parameters[i], sSam.parameters[i]))
+				return false;
+		}
+		
+		// Either the descriptor return type of s is void or ...
+		if (sSam.returnType.id == TypeIds.T_void)
+			return true;
+		
+		/* ... or the descriptor return type of the capture of T is more specific than the descriptor return type of S for 
+		   an invocation expression of the same form as the method reference..
+		*/
+		Expression resultExpression = (Expression) this.resultExpressions.get(t); // should be same as for s
+		
+		t = t.capture(this.enclosingScope, this.sourceEnd);
+		tSam = t.getSingleAbstractMethod(this.enclosingScope);
+		return resultExpression.tIsMoreSpecific(tSam.returnType, sSam.returnType);
+	}
+
+	public org.eclipse.jdt.internal.compiler.lookup.MethodBinding getMethodBinding() {
+		if (this.actualMethodBinding == null)  // array new/clone, no real binding.
+			this.actualMethodBinding = this.binding;
+		return this.actualMethodBinding;
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
index 665a0c5..8e4673e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -24,10 +28,18 @@
  *								bug 394768 - [compiler][resource] Incorrect resource leak warning when creating stream in conditional
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
+ *								bug 401030 - [1.8][null] Null analysis support for lambda methods.
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+ *								Bug 417758 - [1.8][null] Null safety compromise during array creation.
+ *     Jesper S Moller - Contributions for
+ *								bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
@@ -38,17 +50,23 @@
  * OTDT changes:
  * What: compensate generalization of callin return
  */
-public class ReturnStatement extends Statement {
+public class ReturnStatement extends Statement implements ExpressionContext {
 
 	public Expression expression;
 	public SubRoutineStatement[] subroutines;
 	public LocalVariableBinding saveValueVariable;
 	public int initStateIndex = -1;
+	private boolean implicitReturn;
 
 public ReturnStatement(Expression expression, int sourceStart, int sourceEnd) {
+	this(expression, sourceStart, sourceEnd, false);
+}
+
+public ReturnStatement(Expression expression, int sourceStart, int sourceEnd, boolean implicitReturn) {
 	this.sourceStart = sourceStart;
 	this.sourceEnd = sourceEnd;
-	this.expression = expression ;
+	this.expression = expression;
+	this.implicitReturn = implicitReturn;
 }
 
 public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {	// here requires to generate a sequence of finally blocks invocations depending corresponding
@@ -61,7 +79,7 @@
 		flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo);
 		this.expression.checkNPEbyUnboxing(currentScope, flowContext, flowInfo);
 		if (flowInfo.reachMode() == FlowInfo.REACHABLE)
-			checkAgainstNullAnnotation(currentScope, flowContext, this.expression.nullStatus(flowInfo, flowContext));
+			checkAgainstNullAnnotation(currentScope, flowContext, flowInfo);
 		if (currentScope.compilerOptions().analyseResourceLeaks) {
 			FakedTrackingVariable trackingVariable = FakedTrackingVariable.getCloseTrackingVariable(this.expression, flowInfo, flowContext);
 			if (trackingVariable != null) {
@@ -137,7 +155,7 @@
 		}
 	} else {
 		this.saveValueVariable = null;
-		if (((this.bits & ASTNode.IsSynchronized) == 0) && this.expression != null && this.expression.resolvedType == TypeBinding.BOOLEAN) {
+		if (((this.bits & ASTNode.IsSynchronized) == 0) && this.expression != null && TypeBinding.equalsEquals(this.expression.resolvedType, TypeBinding.BOOLEAN)) {
 			if (noAutoCloseables) { // can't abruptly return in the presence of autocloseables. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=367566
 				this.expression.bits |= ASTNode.IsReturnedValue;
 			}
@@ -148,19 +166,23 @@
 	flowContext.recordAbruptExit();
 	return FlowInfo.DEAD_END;
 }
-void checkAgainstNullAnnotation(BlockScope scope, FlowContext flowContext, int nullStatus) {
-	if (nullStatus != FlowInfo.NON_NULL) {
+void checkAgainstNullAnnotation(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) {
+	int nullStatus = this.expression.nullStatus(flowInfo, flowContext);
+	long tagBits;
+	MethodBinding methodBinding = null;
+	boolean useTypeAnnotations = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8;
+	try {
+		methodBinding = scope.methodScope().referenceMethodBinding();
+		tagBits = (useTypeAnnotations) ? methodBinding.returnType.tagBits : methodBinding.tagBits;
+	} catch (NullPointerException npe) {
+		// chain of references in try-block has several potential nulls;
+		// any null means we cannot perform the following check
+		return;			
+	}
+	if (useTypeAnnotations) {
+		checkAgainstNullTypeAnnotation(scope, methodBinding.returnType, this.expression, flowContext, flowInfo);
+	} else if (nullStatus != FlowInfo.NON_NULL) {
 		// if we can't prove non-null check against declared null-ness of the enclosing method:
-		long tagBits;
-		MethodBinding methodBinding;
-		try {
-			methodBinding = scope.methodScope().referenceMethod().binding;
-			tagBits = methodBinding.tagBits;
-		} catch (NullPointerException npe) {
-			// chain of references in try-block has several potential nulls;
-			// any null means we cannot perform the following check
-			return;			
-		}
 		if ((tagBits & TagBits.AnnotationNonNull) != 0) {
 			flowContext.recordNullityMismatch(scope, this.expression, this.expression.resolvedType, methodBinding.returnType, nullStatus);
 		}
@@ -264,27 +286,49 @@
 public void resolve(BlockScope scope) {
 	MethodScope methodScope = scope.methodScope();
 	MethodBinding methodBinding;
+	LambdaExpression lambda = methodScope.referenceContext instanceof LambdaExpression ? (LambdaExpression) methodScope.referenceContext : null;
 	TypeBinding methodType =
+		lambda != null ? lambda.expectedResultType() :
 		(methodScope.referenceContext instanceof AbstractMethodDeclaration)
 			? ((methodBinding = ((AbstractMethodDeclaration) methodScope.referenceContext).binding) == null
 				? null
 				: methodBinding.returnType)
 			: TypeBinding.VOID;
 	TypeBinding expressionType;
+	
+	if (this.expression != null) {
+		this.expression.setExpressionContext(ASSIGNMENT_CONTEXT);
+		this.expression.setExpectedType(methodType);
+	}
+	
 	if (methodType == TypeBinding.VOID) {
-		// the expression should be null
-		if (this.expression == null)
+		// the expression should be null, exceptions exist for lambda expressions.
+		if (this.expression == null) {
+			if (lambda != null)
+				lambda.returnsExpression(null, TypeBinding.VOID);
 			return;
-		if ((expressionType = this.expression.resolveType(scope)) != null)
+		}
+		expressionType = this.expression.resolveType(scope);
+		if (lambda != null && !this.implicitReturn)
+			lambda.returnsExpression(this.expression, expressionType);
+		if (this.implicitReturn && (expressionType == TypeBinding.VOID || this.expression.statementExpression()))
+			return;
+		if (expressionType != null)
 			scope.problemReporter().attemptToReturnNonVoidExpression(this, expressionType);
 		return;
 	}
 	if (this.expression == null) {
+		if (lambda != null)
+			lambda.returnsExpression(null,  methodType);
 		if (methodType != null) scope.problemReporter().shouldReturn(methodType, this);
 		return;
 	}
-	this.expression.setExpectedType(methodType); // needed in case of generic method invocation
-	if ((expressionType = this.expression.resolveType(scope)) == null) return;
+	
+	expressionType = this.expression.resolveType(scope);
+	if (lambda != null)
+		lambda.returnsExpression(this.expression, expressionType);
+	
+	if (expressionType == null) return;
 	if (expressionType == TypeBinding.VOID) {
 		scope.problemReporter().attemptToReturnVoidValue(this);
 		return;
@@ -292,7 +336,7 @@
 	if (methodType == null)
 		return;
 
-	if (methodType != expressionType) // must call before computeConversion() and typeMismatchError()
+	if (TypeBinding.notEquals(methodType, expressionType)) // must call before computeConversion() and typeMismatchError()
 		scope.compilationUnitScope().recordTypeConversion(methodType, expressionType);
 	if (this.expression.isConstantValueOfTypeAssignableToType(expressionType, methodType)
 			|| expressionType.isCompatibleWith(methodType)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
index e64bf0c..abb6ad5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Jesper Steen Moller - Contributions for:
+ *          Bug 412149: [1.8][compiler] Emit repeated annotations into the designated container
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -26,6 +32,10 @@
 		this.sourceStart = sourceStart;
 		this.sourceEnd = type.sourceEnd;
 	}
+	
+	public SingleMemberAnnotation() {
+		// for subclasses.
+	}
 
 	public ElementValuePair[] computeElementValuePairs() {
 		return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair};
@@ -62,4 +72,16 @@
 		}
 		visitor.endVisit(this, scope);
 	}
+
+	public void traverse(ASTVisitor visitor, ClassScope scope) {
+		if (visitor.visit(this, scope)) {
+			if (this.type != null) {
+				this.type.traverse(visitor, scope);
+			}
+			if (this.memberValue != null) {
+				this.memberValue.traverse(visitor, scope);
+			}
+		}
+		visitor.endVisit(this, scope);
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index 541e4b7..b369c77 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -15,8 +19,10 @@
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *								Bug 412203 - [compiler] Internal compiler error: java.lang.IllegalArgumentException: info cannot be null
- *     Jesper S Moller <jesper@selskabet.org> - Contributions for
+ *     Jesper S Moller - <jesper@selskabet.org>   - Contributions for
+ *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
  *								bug 378674 - "The method can be declared as static" is wrong
+ *								bug 404657 - [1.8][compiler] Analysis for effectively final variables fails to consider loops
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -140,25 +146,36 @@
 					currentScope.problemReporter().cannotAssignToFinalField(fieldBinding, this);
 				}
 			} else if (!isCompound && fieldBinding.isNonNull()
-						&& fieldBinding.declaringClass == currentScope.enclosingReceiverType()) { // inherited fields are not tracked here
+						&& TypeBinding.equalsEquals(fieldBinding.declaringClass, currentScope.enclosingReceiverType())) { // inherited fields are not tracked here
 				// record assignment for detecting uninitialized non-null fields:
 				flowInfo.markAsDefinitelyAssigned(fieldBinding);
 			}
 			break;
 		case Binding.LOCAL : // assigning to a local variable
 			LocalVariableBinding localBinding = (LocalVariableBinding) this.binding;
+			final boolean isFinal = localBinding.isFinal();
 			if (!flowInfo.isDefinitelyAssigned(localBinding)){// for local variable debug attributes
 				this.bits |= ASTNode.FirstAssignmentToLocal;
 			} else {
 				this.bits &= ~ASTNode.FirstAssignmentToLocal;
 			}
-			if (localBinding.isFinal()) {
+			if (flowInfo.isPotentiallyAssigned(localBinding) || (this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+				localBinding.tagBits &= ~TagBits.IsEffectivelyFinal;
+				if (!isFinal && (this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+					currentScope.problemReporter().cannotReferToNonEffectivelyFinalOuterLocal(localBinding, this);
+				}
+			}
+			if (! isFinal && (localBinding.tagBits & TagBits.IsEffectivelyFinal) != 0 && (localBinding.tagBits & TagBits.IsArgument) == 0) {
+				flowContext.recordSettingFinal(localBinding, this, flowInfo);
+			} else if (isFinal) {
 				if ((this.bits & ASTNode.DepthMASK) == 0) {
 					// tolerate assignment to final local in unreachable code (45674)
 					if ((isReachable && isCompound) || !localBinding.isBlankFinal()){
 						currentScope.problemReporter().cannotAssignToFinalLocal(localBinding, this);
 					} else if (flowInfo.isPotentiallyAssigned(localBinding)) {
 						currentScope.problemReporter().duplicateInitializationOfFinalLocal(localBinding, this);
+					} else if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+						currentScope.problemReporter().cannotAssignToFinalOuterLocal(localBinding, this);
 					} else {
 						flowContext.recordSettingFinal(localBinding, this, flowInfo);
 					}
@@ -225,7 +242,7 @@
 			SourceTypeBinding sourceType = scope.enclosingSourceType();
 			if (this.constant == Constant.NotAConstant
 					&& !methodScope.isStatic
-					&& (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
+					&& (TypeBinding.equalsEquals(sourceType, declaringClass) || TypeBinding.equalsEquals(sourceType.superclass, declaringClass)) // enum constant body
 					&& methodScope.isInsideInitializerOrConstructor()) {
 				scope.problemReporter().enumStaticFieldUsedDuringInitialization(fieldBinding, this);
 			}
@@ -242,6 +259,8 @@
 		{
 			scope.problemReporter().staticFieldAccessToNonStaticVariable(this, fieldBinding);
 			return fieldBinding.type;
+		} else {
+			scope.tagAsAccessingEnclosingInstanceStateOf(fieldBinding.declaringClass, false /* type variable access */);
 		}
 	}
 
@@ -249,7 +268,7 @@
 		scope.problemReporter().deprecatedField(fieldBinding, this);
 
 	if ((this.bits & ASTNode.IsStrictlyAssigned) == 0
-			&& methodScope.enclosingSourceType() == fieldBinding.original().declaringClass
+			&& TypeBinding.equalsEquals(methodScope.enclosingSourceType(), fieldBinding.original().declaringClass)
 			&& methodScope.lastVisibleFieldID >= 0
 			&& fieldBinding.id >= methodScope.lastVisibleFieldID
 			&& (!fieldBinding.isStatic() || methodScope.isStatic)) {
@@ -262,10 +281,13 @@
 
 public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) {
 	if (!super.checkNPE(scope, flowContext, flowInfo)) {
-		VariableBinding var = nullAnnotatedVariableBinding();
-		if (var instanceof FieldBinding) {
-			checkNullableFieldDereference(scope, (FieldBinding) var, ((long)this.sourceStart<<32)+this.sourceEnd);
-			return true;
+		CompilerOptions compilerOptions = scope.compilerOptions();
+		if (compilerOptions.isAnnotationBasedNullAnalysisEnabled) {
+			VariableBinding var = nullAnnotatedVariableBinding(compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8);
+			if (var instanceof FieldBinding) {
+				checkNullableFieldDereference(scope, (FieldBinding) var, ((long)this.sourceStart<<32)+this.sourceEnd);
+				return true;
+			}
 		}
 	}
 	return false;
@@ -428,7 +450,7 @@
 				if (codegenField.isStatic()) {
 					if (!valueRequired
 							// if no valueRequired, still need possible side-effects of <clinit> invocation, if field belongs to different class
-							&& ((FieldBinding)this.binding).original().declaringClass == this.actualReceiverType.erasure()
+							&& TypeBinding.equalsEquals(((FieldBinding)this.binding).original().declaringClass, this.actualReceiverType.erasure())
 							&& ((this.implicitConversion & TypeIds.UNBOXING) == 0)
 							&& this.genericCast == null) {
 						// if no valueRequired, optimize out entire gen
@@ -489,7 +511,8 @@
 					return;
 				}
 				// outer local?
-				if ((this.bits & ASTNode.DepthMASK) != 0) {
+				if ((this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+					checkEffectiveFinality(localBinding, currentScope);
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
@@ -790,7 +813,7 @@
 			}
 
 			// using incr bytecode if possible
-			if (localBinding.type == TypeBinding.INT) {
+			if (TypeBinding.equalsEquals(localBinding.type, TypeBinding.INT)) {
 				if (valueRequired) {
 					codeStream.load(localBinding);
 				}
@@ -859,19 +882,28 @@
 	return null;
 }
 
-public VariableBinding nullAnnotatedVariableBinding() {
+public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations) {
 	switch (this.bits & ASTNode.RestrictiveFlagMASK) {
 		case Binding.FIELD : // reading a field
 		case Binding.LOCAL : // reading a local variable
-			if ((((VariableBinding)this.binding).tagBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable)) != 0)
+			if (supportTypeAnnotations 
+					|| (((VariableBinding)this.binding).tagBits & TagBits.AnnotationNullMASK) != 0)
 				return (VariableBinding) this.binding;
 	}
 	return null;
 }
 
+public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
+	LocalVariableBinding local = localVariableBinding();
+	if (local != null) {
+		return flowInfo.nullStatus(local);
+	}
+	return super.nullStatus(flowInfo, flowContext);
+}
+
 public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
 	//If inlinable field, forget the access emulation, the code gen will directly target it
-	if (((this.bits & ASTNode.DepthMASK) == 0) || (this.constant != Constant.NotAConstant)) {
+	if (((this.bits & ASTNode.DepthMASK) == 0 && (this.bits & ASTNode.IsCapturedOuterLocal) == 0) || (this.constant != Constant.NotAConstant)) {
 		return;
 	}
 	if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) {
@@ -931,7 +963,7 @@
 	}
 }
 
-/**
+	/**
  * @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
  */
 public TypeBinding postConversionType(Scope scope) {
@@ -1011,8 +1043,9 @@
 					if (this.binding instanceof LocalVariableBinding) {
 						this.bits &= ~ASTNode.RestrictiveFlagMASK;  // clear bits
 						this.bits |= Binding.LOCAL;
-						if (!variable.isFinal() && (this.bits & ASTNode.DepthMASK) != 0) {
-							scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding)variable, this);
+						if (!variable.isFinal() && (this.bits & ASTNode.IsCapturedOuterLocal) != 0) {
+							if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8) // for 8, defer till effective finality could be ascertained.
+								scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding)variable, this);
 						}
 						variableType = variable.type;
 						this.constant = (this.bits & ASTNode.IsStrictlyAssigned) == 0 ? variable.constant() : Constant.NotAConstant;
@@ -1092,4 +1125,8 @@
 public String unboundReferenceErrorName(){
 	return new String(this.token);
 }
+
+public char[][] getName() {
+	return new char[][] {this.token};
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
index 5f8c0e1..8d0517e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
@@ -1,14 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -37,11 +43,15 @@
 
 	}
 
-	public TypeReference copyDims(int dim){
-		//return a type reference copy of me with some dimensions
-		//warning : the new type ref has a null binding
-
-		return new ArrayTypeReference(this.token, dim,(((long)this.sourceStart)<<32)+this.sourceEnd);
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
+		int totalDimensions = this.dimensions() + additionalDimensions;
+		Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
+		ArrayTypeReference arrayTypeReference = new ArrayTypeReference(this.token, totalDimensions, allAnnotations, (((long) this.sourceStart) << 32) + this.sourceEnd);
+		arrayTypeReference.annotations = this.annotations;
+		arrayTypeReference.bits |= (this.bits & ASTNode.HasTypeAnnotations);
+		if (!isVarargs)
+			arrayTypeReference.extendedDimensions = additionalDimensions;
+		return arrayTypeReference;
 	}
 
 	public char[] getLastToken() {
@@ -52,6 +62,13 @@
 			return this.resolvedType;
 
 		this.resolvedType = scope.getType(this.token);
+		
+		if (this.resolvedType instanceof TypeVariableBinding) {
+			TypeVariableBinding typeVariable = (TypeVariableBinding) this.resolvedType;
+			if (typeVariable.declaringElement instanceof SourceTypeBinding) {
+				scope.tagAsAccessingEnclosingInstanceStateOf((ReferenceBinding) typeVariable.declaringElement, true /* type variable access */);
+			}
+		}
 
 		if (scope.kind == Scope.CLASS_SCOPE && this.resolvedType.isValidBinding())
 			if (((ClassScope) scope).detectHierarchyCycle(this.resolvedType, this))
@@ -64,24 +81,30 @@
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output){
-
+		if (this.annotations != null && this.annotations[0] != null) {
+			printAnnotations(this.annotations[0], output);
+			output.append(' ');
+		}
 		return output.append(this.token);
 	}
 
 	public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
-		TypeBinding memberType = this.resolvedType = scope.getMemberType(this.token, enclosingType);
+		this.resolvedType = scope.getMemberType(this.token, enclosingType);
 //{ObjectTeams: decapsulation:
-		if (memberType.problemId() ==  ProblemReasons.NotVisible) {
+		if (this.resolvedType.problemId() ==  ProblemReasons.NotVisible) {
 			switch(this.getBaseclassDecapsulation()) {
 			case ALLOWED:
 				scope.problemReporter().decapsulation(this);
 				//$FALL-THROUGH$
 			case REPORTED:
-				memberType= ((ProblemReferenceBinding)memberType).closestMatch();
+				this.resolvedType= ((ProblemReferenceBinding)this.resolvedType).closestMatch();
 			}
 		}
 // SH}
 		boolean hasError = false;
+		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391500
+		resolveAnnotations(scope);
+		TypeBinding memberType = this.resolvedType; // load after possible update in resolveAnnotations()
 		if (!memberType.isValidBinding()) {
 			hasError = true;
 			scope.problemReporter().invalidEnclosingType(this, memberType, enclosingType);
@@ -133,12 +156,24 @@
 // SH}
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++)
+					typeAnnotations[i].traverse(visitor, scope);
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
-		visitor.visit(this, scope);
+		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++)
+					typeAnnotations[i].traverse(visitor, scope);
+			}
+		}
 		visitor.endVisit(this, scope);
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
index 682a8a9..19b2704 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: Statement.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -18,14 +21,26 @@
  *								bug 368546 - [compiler][resource] Avoid remaining false positives found when compiling the Eclipse SDK
  *								bug 370930 - NonNull annotation not considered for enhanced for loops
  *								bug 365859 - [compiler][null] distinguish warnings based on flow analysis vs. null annotations
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+ *								Bug 417758 - [1.8][null] Null safety compromise during array creation.
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.*;
 import org.eclipse.jdt.internal.compiler.flow.*;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.*;
 import org.eclipse.objectteams.otdt.core.compiler.IOTConstants;
@@ -81,51 +96,75 @@
 protected void analyseArguments(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, MethodBinding methodBinding, Expression[] arguments)
 {
 	// compare actual null-status against parameter annotations of the called method:
-	if (arguments != null && methodBinding.parameterNonNullness != null) {
-
-		// check if varargs need special treatment:
+	if (arguments != null) {
+		CompilerOptions compilerOptions = currentScope.compilerOptions();
+		boolean considerTypeAnnotations = compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8
+				&& compilerOptions.isAnnotationBasedNullAnalysisEnabled;
+		boolean hasJDK15NullAnnotations = methodBinding.parameterNonNullness != null;
 		int numParamsToCheck = methodBinding.parameters.length;
+		TypeBinding varArgsType = null;
 		boolean passThrough = false;
-		if (methodBinding.isVarargs()) {
-			int varArgPos = numParamsToCheck-1;
-			// this if-block essentially copied from generateArguments(..):
-			if (numParamsToCheck == arguments.length) {
-				TypeBinding varArgsType = methodBinding.parameters[varArgPos];
-				TypeBinding lastType = arguments[varArgPos].resolvedType;
-				if (lastType == TypeBinding.NULL
-						|| (varArgsType.dimensions() == lastType.dimensions()
-						&& lastType.isCompatibleWith(varArgsType)))
-					passThrough = true; // pass directly as-is
+		if (considerTypeAnnotations || hasJDK15NullAnnotations) {
+			// check if varargs need special treatment:
+			if (methodBinding.isVarargs()) {
+				int varArgPos = numParamsToCheck-1;
+				// this if-block essentially copied from generateArguments(..):
+				if (numParamsToCheck == arguments.length) {
+					varArgsType = methodBinding.parameters[varArgPos];
+					TypeBinding lastType = arguments[varArgPos].resolvedType;
+					if (lastType == TypeBinding.NULL
+							|| (varArgsType.dimensions() == lastType.dimensions()
+							&& lastType.isCompatibleWith(varArgsType)))
+						passThrough = true; // pass directly as-is
+				}
+				if (!passThrough)
+					numParamsToCheck--; // with non-passthrough varargs last param is fed from individual args -> don't check
 			}
-			if (!passThrough)
-				numParamsToCheck--; // with non-passthrough varargs last param is fed from individual args -> don't check
 		}
-
-		for (int i = 0; i < numParamsToCheck; i++) {
-			if (methodBinding.parameterNonNullness[i] == Boolean.TRUE) {
+		if (considerTypeAnnotations) {
+			for (int i=0; i<numParamsToCheck; i++) {
 				TypeBinding expectedType = methodBinding.parameters[i];
-				Expression argument = arguments[i];
-				int nullStatus = argument.nullStatus(flowInfo, flowContext); // slight loss of precision: should also use the null info from the receiver.
-				if (nullStatus != FlowInfo.NON_NULL) // if required non-null is not provided
-					flowContext.recordNullityMismatch(currentScope, argument, argument.resolvedType, expectedType, nullStatus);
+				analyseOneArgument18(currentScope, flowContext, flowInfo, expectedType, arguments[i]);
 			}
-		}
+			if (!passThrough && varArgsType instanceof ArrayBinding) {
+				TypeBinding expectedType = ((ArrayBinding) varArgsType).elementsType();
+				for (int i = numParamsToCheck; i < arguments.length; i++) {
+					analyseOneArgument18(currentScope, flowContext, flowInfo, expectedType, arguments[i]);
+				}
+			}
+		} else if (hasJDK15NullAnnotations) {
+			for (int i = 0; i < numParamsToCheck; i++) {
+				if (methodBinding.parameterNonNullness[i] == Boolean.TRUE) {
+					TypeBinding expectedType = methodBinding.parameters[i];
+					Expression argument = arguments[i];
+					int nullStatus = argument.nullStatus(flowInfo, flowContext); // slight loss of precision: should also use the null info from the receiver.
+					if (nullStatus != FlowInfo.NON_NULL) // if required non-null is not provided
+						flowContext.recordNullityMismatch(currentScope, argument, argument.resolvedType, expectedType, nullStatus);
+				}
+			}
+		} 
+	}
+}
+void analyseOneArgument18(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo,
+		TypeBinding expectedType, Expression argument) {
+	int nullStatus = argument.nullStatus(flowInfo, flowContext);
+	NullAnnotationMatching annotationStatus = NullAnnotationMatching.analyse(expectedType, argument.resolvedType, nullStatus);
+	if (annotationStatus.isDefiniteMismatch()) {
+		// immediate reporting:
+		currentScope.problemReporter().nullityMismatchingTypeAnnotation(argument, argument.resolvedType, expectedType, annotationStatus);
+	} else if (annotationStatus.isUnchecked()) {
+		flowContext.recordNullityMismatch(currentScope, argument, argument.resolvedType, expectedType, nullStatus);
 	}
 }
 
-/** Check null-ness of 'var' against a possible null annotation */
-protected int checkAssignmentAgainstNullAnnotation(BlockScope currentScope, FlowContext flowContext,
-												   VariableBinding var, int nullStatus, Expression expression, TypeBinding providedType)
-{
-	if ((var.tagBits & TagBits.AnnotationNonNull) != 0
-			&& nullStatus != FlowInfo.NON_NULL) {
-		flowContext.recordNullityMismatch(currentScope, expression, providedType, var.type, nullStatus);
-		return FlowInfo.NON_NULL;
-	} else if ((var.tagBits & TagBits.AnnotationNullable) != 0
-			&& nullStatus == FlowInfo.UNKNOWN) {	// provided a legacy type?
-		return FlowInfo.POTENTIALLY_NULL;			// -> use more specific info from the annotation
+protected void checkAgainstNullTypeAnnotation(BlockScope scope, TypeBinding requiredType, Expression expression, FlowContext flowContext, FlowInfo flowInfo) {
+	int nullStatus = expression.nullStatus(flowInfo, flowContext);
+	NullAnnotationMatching annotationStatus = NullAnnotationMatching.analyse(requiredType, expression.resolvedType, nullStatus);
+	if (annotationStatus.isDefiniteMismatch()) {
+		scope.problemReporter().nullityMismatchingTypeAnnotation(expression, expression.resolvedType, requiredType, annotationStatus);
+	} else if (annotationStatus.isUnchecked()) {
+		flowContext.recordNullityMismatch(scope, expression, expression.resolvedType, requiredType, nullStatus);
 	}
-	return nullStatus;
 }
 
 /**
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
index 6dafc92..a7069ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -54,9 +58,9 @@
 	public TypeBinding resolveType(BlockScope scope) {
 
 		this.constant = Constant.NotAConstant;
-		if (!checkAccess(scope.methodScope()))
-			return null;
 		ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
+		if (!checkAccess(scope, enclosingReceiverType))
+			return null;
 		if (enclosingReceiverType.id == T_JavaLangObject) {
 			scope.problemReporter().cannotUseSuperInJavaLangObject(this);
 			return null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
index 87f1ec9..27c4f79 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -53,8 +57,9 @@
 		return flowInfo; // this cannot be assigned
 	}
 
-	public boolean checkAccess(MethodScope methodScope) {
+	public boolean checkAccess(BlockScope scope, ReferenceBinding receiverType) {
 
+		MethodScope methodScope = scope.methodScope();
 		// this/super cannot be used in constructor call
 		if (methodScope.isConstructorCall) {
 			methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
@@ -66,7 +71,8 @@
 			methodScope.problemReporter().errorThisSuperInStatic(this);
 			return false;
 		}
-		methodScope.resetEnclosingMethodStaticFlag();
+		if (receiverType != null)
+			scope.tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
 		return true;
 	}
 
@@ -116,6 +122,10 @@
 		return true ;
 	}
 
+	public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
+		return FlowInfo.NON_NULL;
+	}
+
 	public StringBuffer printExpression(int indent, StringBuffer output){
 
 		if (isImplicitThis()) return output;
@@ -125,13 +135,15 @@
 	public TypeBinding resolveType(BlockScope scope) {
 
 		this.constant = Constant.NotAConstant;
-		if (!isImplicitThis() &&!checkAccess(scope.methodScope())) {
+		
+		ReferenceBinding enclosingReceiverType = scope.enclosingReceiverType();
+		if (!isImplicitThis() &&!checkAccess(scope, enclosingReceiverType)) {
 			return null;
 		}
 //{ObjectTeams: only implicit this returned directly:
 	  if (isImplicitThis())
 // orig:
-		return this.resolvedType = scope.enclosingReceiverType();
+		return this.resolvedType = enclosingReceiverType;
 // : giro
 		this.resolvedType = RoleTypeCreator.maybeWrapUnqualifiedRoleType(
                 scope.enclosingReceiverType(),
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java
index 4e13e41..307b49f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: ThrowStatement.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -23,6 +27,7 @@
 import org.eclipse.jdt.internal.compiler.flow.FlowContext;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
+import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
@@ -78,6 +83,11 @@
 
 public void resolve(BlockScope scope) {
 	this.exceptionType = this.exception.resolveType(scope);
+	MethodScope methodScope = scope.methodScope();
+	LambdaExpression lambda = methodScope.referenceContext instanceof LambdaExpression ? (LambdaExpression) methodScope.referenceContext : null;
+	if (lambda != null) {
+		lambda.throwsException(this.exceptionType);
+	}
 	if (this.exceptionType != null && this.exceptionType.isValidBinding()) {
 //{ObjectTeams: lowering roles of exceptions:
 		if (this.exceptionType.isRole()) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
index 08087a9..ad875f9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -23,6 +27,9 @@
  *								bug 384380 - False positive on a ?? Potential null pointer access ?? after a continue
  *     Jesper Steen Moller - Contributions for
  *								bug 404146 - [1.7][compiler] nested try-catch-finally-blocks leads to unrunnable Java byte code
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -517,10 +524,10 @@
 			ExceptionLabel exceptionLabel = null;
 			if ((argument.binding.tagBits & TagBits.MultiCatchParameter) != 0) {
 				MultiCatchExceptionLabel multiCatchExceptionLabel = new MultiCatchExceptionLabel(codeStream, argument.binding.type);
-				multiCatchExceptionLabel.initialize((UnionTypeReference) argument.type);
+				multiCatchExceptionLabel.initialize((UnionTypeReference) argument.type, argument.annotations);
 				exceptionLabel = multiCatchExceptionLabel;
 			} else {
-				exceptionLabel = new ExceptionLabel(codeStream, argument.binding.type);
+				exceptionLabel = new ExceptionLabel(codeStream, argument.binding.type, argument.type, argument.annotations);
 			}
 			exceptionLabel.placeStart();
 			exceptionLabels[i] = exceptionLabel;
@@ -1081,8 +1088,9 @@
 			this.anyExceptionVariable.setConstant(Constant.NotAConstant); // not inlinable
 
 			if (!methodScope.isInsideInitializer()) {
-				MethodBinding methodBinding =
-					((AbstractMethodDeclaration) methodScope.referenceContext).binding;
+				MethodBinding methodBinding = methodScope.referenceContext instanceof AbstractMethodDeclaration ?
+					((AbstractMethodDeclaration) methodScope.referenceContext).binding : (methodScope.referenceContext instanceof LambdaExpression ? 
+							((LambdaExpression)methodScope.referenceContext).binding : null);
 				if (methodBinding != null) {
 					TypeBinding methodReturnType = methodBinding.returnType;
 					if (methodReturnType.id != TypeIds.T_void) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
index b8b2124..0a592e2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -12,6 +16,8 @@
  *     Stephan Herrmann - Contributions for
  *								Bug 360328 - [compiler][null] detect null problems in nested code (local class inside a loop)
  *								Bug 388630 - @NonNull diagnostics at line 0
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
  *     Keigo Imai - Contribution for  bug 388903 - Cannot extend inner class as an anonymous class when it extends the outer class
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
@@ -791,6 +797,7 @@
 		System.arraycopy(inheritedConstructorBinding.parameterNonNullness, 0, 
 				constructor.binding.parameterNonNullness = new Boolean[len], 0, len);
 	}
+	// TODO(stephan): do argument types already carry sufficient info about type annotations?
 
 	constructor.scope = new MethodScope(this.scope, constructor, true);
 	constructor.bindArguments();
@@ -835,7 +842,7 @@
 	if (memberTypeBinding != null && this.memberTypes != null) {
 		for (int i = 0, max = this.memberTypes.length; i < max; i++) {
 			TypeDeclaration memberTypeDecl;
-			if ((memberTypeDecl = this.memberTypes[i]).binding == memberTypeBinding)
+			if (TypeBinding.equalsEquals((memberTypeDecl = this.memberTypes[i]).binding, memberTypeBinding))
 				return memberTypeDecl;
 		}
 	}
@@ -1595,10 +1602,13 @@
 
 public StringBuffer printHeader(int indent, StringBuffer output) {
 	printModifiers(this.modifiers, output);
+	if (this.annotations != null) {
+		printAnnotations(this.annotations, output);
+		output.append(' ');
+	}
 //{ObjectTeams: role/team:
 	printTypeKind(this.modifiers, output);
 // SH}
-	if (this.annotations != null) printAnnotations(this.annotations, output);
 
 	switch (kind(this.modifiers)) {
 		case TypeDeclaration.CLASS_DECL :
@@ -1681,11 +1691,29 @@
 			this.staticInitializerScope.insideTypeAnnotation = old;
 		}
 		// check @Deprecated annotation
-		if ((sourceType.getAnnotationTagBits() & TagBits.AnnotationDeprecated) == 0
+		long annotationTagBits = sourceType.getAnnotationTagBits();
+		if ((annotationTagBits & TagBits.AnnotationDeprecated) == 0
 				&& (sourceType.modifiers & ClassFileConstants.AccDeprecated) != 0
 				&& this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
 			this.scope.problemReporter().missingDeprecatedAnnotationForType(this);
 		}
+		if ((annotationTagBits & TagBits.AnnotationFunctionalInterface) != 0) {
+			if(!this.binding.isFunctionalInterface(this.scope)) {
+				this.scope.problemReporter().notAFunctionalInterface(this);
+			}
+		}
+		if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8) {
+			if ((annotationTagBits & TagBits.AnnotationNullMASK) != 0) {
+				for (int i = 0; i < this.annotations.length; i++) {
+					ReferenceBinding annotationType = this.annotations[i].getCompilerAnnotation().getAnnotationType();
+					if (annotationType != null) {
+						if (annotationType.id == TypeIds.T_ConfiguredAnnotationNonNull
+								|| annotationType.id == TypeIds.T_ConfiguredAnnotationNullable)
+						this.scope.problemReporter().nullAnnotationUnsupportedLocation(this.annotations[i]);
+					}
+				}
+			}
+		}
 //{ObjectTeams: check @Override annotation:
 		boolean hasOverrideAnnotation = (this.binding.tagBits & TagBits.AnnotationOverride) != 0;
 		if (isSourceRole()) {
@@ -1697,6 +1725,7 @@
 				this.scope.problemReporter().missingOverrideAnnotationForRole(this);
 		} // @Override on non-role types is detected by Annotation.resolveType
 // SH}
+
 		if ((this.bits & ASTNode.UndocumentedEmptyBlock) != 0) {
 			this.scope.problemReporter().undocumentedEmptyBlock(this.bodyStart-1, this.bodyEnd);
 		}
@@ -1781,11 +1810,6 @@
 		boolean hasEnumConstants = false;
 		FieldDeclaration[] enumConstantsWithoutBody = null;
 
-		if (this.typeParameters != null) {
-			for (int i = 0, count = this.typeParameters.length; i < count; i++) {
-				this.typeParameters[i].resolve(this.scope);
-			}
-		}
 		if (this.memberTypes != null) {
 //{ObjectTeams: don't cache count, array may grow during this loop!
 /* orig:
@@ -1824,7 +1848,7 @@
 						if (needSerialVersion
 								&& ((fieldBinding.modifiers & (ClassFileConstants.AccStatic | ClassFileConstants.AccFinal)) == (ClassFileConstants.AccStatic | ClassFileConstants.AccFinal))
 								&& CharOperation.equals(TypeConstants.SERIALVERSIONUID, fieldBinding.name)
-								&& TypeBinding.LONG == fieldBinding.type) {
+								&& TypeBinding.equalsEquals(TypeBinding.LONG, fieldBinding.type)) {
 							needSerialVersion = false;
 						}
 						localMaxFieldCount++;
@@ -1852,7 +1876,7 @@
 			if (javaxRmiCorbaStub.isValidBinding()) {
 				ReferenceBinding superclassBinding = this.binding.superclass;
 				loop: while (superclassBinding != null) {
-					if (superclassBinding == javaxRmiCorbaStub) {
+					if (TypeBinding.equalsEquals(superclassBinding, javaxRmiCorbaStub)) {
 						needSerialVersion = false;
 						break loop;
 					}
@@ -1992,7 +2016,7 @@
 					outerScope = outerScope.parent;
 				}
 			} else if (existingType instanceof LocalTypeBinding
-						&& ((LocalTypeBinding) existingType).scope.methodScope() == blockScope.methodScope()) {
+						&& (((LocalTypeBinding) existingType).scope.methodScope() == blockScope.methodScope() || blockScope.isLambdaSubscope())) {
 					// dup in same method
 					blockScope.problemReporter().duplicateNestedType(this);
 			} else if (blockScope.isDefinedInType(existingType)) {
@@ -2057,6 +2081,9 @@
 	this.ignoreFurtherInvestigation = true;
 }
 
+public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
+	// Nothing to do for this context;
+}
 
 //{ObjectTeams: untag class and interface part:
 public void resetErrorFlag() {
@@ -2296,6 +2323,9 @@
 	}
 }
 
+public boolean isPackageInfo() {
+	return CharOperation.equals(this.name,  TypeConstants.PACKAGE_INFO_NAME);
+}
 /**
  * Returns whether the type is a secondary one or not.
  */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
index f525543..227cd72 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
@@ -5,14 +5,28 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 415543 - [1.8][compiler] Incorrect bound index in RuntimeInvisibleTypeAnnotations attribute
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.List;
+
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference.AnnotationCollector;
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
@@ -61,6 +75,42 @@
 		}
 	}
 
+	public void getAllAnnotationContexts(int targetType, int typeParameterIndex, List allAnnotationContexts) {
+		AnnotationCollector collector = new AnnotationCollector(this, targetType, typeParameterIndex, allAnnotationContexts);
+		if (this.annotations != null) {
+			int annotationsLength = this.annotations.length;
+			for (int i = 0; i < annotationsLength; i++)
+				this.annotations[i].traverse(collector, (BlockScope) null);
+		}
+		switch(collector.targetType) {
+			case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER :
+				collector.targetType = AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND;
+				break;
+			case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER :
+				collector.targetType = AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND;
+		}
+		int boundIndex = 0;
+		if (this.type != null) {
+			// boundIndex 0 is always a class
+			if (this.type.resolvedType.isInterface())
+				boundIndex = 1;
+			if ((this.type.bits & ASTNode.HasTypeAnnotations) != 0) {
+				collector.info2 = boundIndex;
+				this.type.traverse(collector, (BlockScope) null);
+			}
+		}
+		if (this.bounds != null) {
+			int boundsLength = this.bounds.length;
+			for (int i = 0; i < boundsLength; i++) {
+				TypeReference bound = this.bounds[i];
+				if ((bound.bits & ASTNode.HasTypeAnnotations) == 0) {
+					continue;
+				}
+				collector.info2 = ++boundIndex;
+				bound.traverse(collector, (BlockScope) null);
+			}
+		}
+	}
 	private void internalResolve(Scope scope, boolean staticContext) {
 	    // detect variable/type name collisions
 		if (this.binding != null) {
@@ -75,6 +125,9 @@
 				scope.problemReporter().typeHiding(this, existingType);
 			}
 		}
+		if (this.annotations != null) {
+			resolveAnnotations(scope);
+		}
 	}
 
 	public void resolve(BlockScope scope) {
@@ -85,10 +138,26 @@
 		internalResolve(scope, scope.enclosingSourceType().isStatic());
 	}
 
+	public void resolveAnnotations(Scope scope) {
+		BlockScope resolutionScope = Scope.typeAnnotationsResolutionScope(scope);
+		if (resolutionScope != null) {
+			AnnotationBinding [] annotationBindings = resolveAnnotations(resolutionScope, this.annotations, this.binding, false);
+			if (annotationBindings != null && annotationBindings.length > 0) {
+				this.binding.setTypeAnnotations(annotationBindings, scope.environment().globalOptions.isAnnotationBasedNullAnalysisEnabled);
+				scope.referenceCompilationUnit().compilationResult.hasAnnotations = true;
+				if (this.binding != null && this.binding.isValidBinding())
+					this.binding.evaluateNullAnnotations(scope, this);
+			}
+		}	
+	}
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.internal.compiler.ast.AstNode#print(int, java.lang.StringBuffer)
 	 */
 	public StringBuffer printStatement(int indent, StringBuffer output) {
+		if (this.annotations != null) {
+			printAnnotations(this.annotations, output);
+			output.append(' ');
+		}
 		output.append(this.name);
 		if (this.type != null) {
 //{ObjectTeams: role type bound:
@@ -114,6 +183,11 @@
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLength = this.annotations.length;
+				for (int i = 0; i < annotationsLength; i++)
+					this.annotations[i].traverse(visitor, scope);
+			}
 			if (this.type != null) {
 				this.type.traverse(visitor, scope);
 			}
@@ -129,6 +203,11 @@
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				int annotationsLength = this.annotations.length;
+				for (int i = 0; i < annotationsLength; i++)
+					this.annotations[i].traverse(visitor, scope);
+			}
 			if (this.type != null) {
 				this.type.traverse(visitor, scope);
 			}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
index 10a0ada..4214bf6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
@@ -1,22 +1,43 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
+ *                          Bug 415399 - [1.8][compiler] Type annotations on constructor results dropped by the code generator
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.internal.codeassist.select.SelectionNodeFound;
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.CompilationResult;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationContext;
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.flow.FlowContext;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
@@ -42,8 +63,208 @@
  * @version $Id: TypeReference.java 23404 2010-02-03 14:10:22Z stephan $
  */
 public abstract class TypeReference extends Expression {
-
 	public static final TypeReference[] NO_TYPE_ARGUMENTS = new TypeReference[0];
+static class AnnotationCollector extends ASTVisitor {
+	List annotationContexts;
+	Expression typeReference;
+	int targetType;
+	int info = 0;
+	int info2 = 0;
+	LocalVariableBinding localVariable;
+	Annotation[][] annotationsOnDimensions;
+	int dimensions;
+	Wildcard currentWildcard;
+
+	public AnnotationCollector(
+			TypeParameter typeParameter,
+			int targetType,
+			int typeParameterIndex,
+			List annotationContexts) {
+		this.annotationContexts = annotationContexts;
+		this.typeReference = typeParameter.type;
+		this.targetType = targetType;
+		this.info = typeParameterIndex;
+	}
+
+	public AnnotationCollector(
+			LocalDeclaration localDeclaration,
+			int targetType,
+			LocalVariableBinding localVariable,
+			List annotationContexts) {
+		this.annotationContexts = annotationContexts;
+		this.typeReference = localDeclaration.type;
+		this.targetType = targetType;
+		this.localVariable = localVariable;
+	}
+
+	public AnnotationCollector(
+			LocalDeclaration localDeclaration,
+			int targetType,
+			int parameterIndex,
+			List annotationContexts) {
+		this.annotationContexts = annotationContexts;
+		this.typeReference = localDeclaration.type;
+		this.targetType = targetType;
+		this.info = parameterIndex;
+	}
+
+	public AnnotationCollector(
+			TypeReference typeReference,
+			int targetType,
+			List annotationContexts) {
+		this.annotationContexts = annotationContexts;
+		this.typeReference = typeReference;
+		this.targetType = targetType;
+	}
+	public AnnotationCollector(
+			Expression typeReference,
+			int targetType,
+			int info,
+			List annotationContexts) {
+		this.annotationContexts = annotationContexts;
+		this.typeReference = typeReference;
+		this.info = info;
+		this.targetType = targetType;
+	}
+	public AnnotationCollector(
+			TypeReference typeReference,
+			int targetType,
+			int info,
+			int typeIndex,
+			List annotationContexts) {
+		this.annotationContexts = annotationContexts;
+		this.typeReference = typeReference;
+		this.info = info;
+		this.targetType = targetType;
+		this.info2 = typeIndex;
+	}
+	public AnnotationCollector(
+			TypeReference typeReference,
+			int targetType,
+			int info,
+			List annotationContexts,
+			Annotation[][] annotationsOnDimensions,
+			int dimensions) {
+		this.annotationContexts = annotationContexts;
+		this.typeReference = typeReference;
+		this.info = info;
+		this.targetType = targetType;
+		this.annotationsOnDimensions = annotationsOnDimensions;
+		// Array references like 'new String[]' manifest as an ArrayAllocationExpression
+		// with a 'type' of String.  When the type is not carrying the dimensions count
+		// it is passed in via the dimensions parameter.  It is not possible to use
+		// annotationsOnDimensions as it will be null if there are no annotations on any
+		// of the dimensions.
+		this.dimensions = dimensions;
+	}
+	
+	private boolean internalVisit(Annotation annotation) {
+		AnnotationContext annotationContext = null;
+		if (annotation.isRuntimeTypeInvisible()) {
+			annotationContext = new AnnotationContext(annotation, this.typeReference, this.targetType, AnnotationContext.INVISIBLE);
+		} else if (annotation.isRuntimeTypeVisible()) {
+			annotationContext = new AnnotationContext(annotation, this.typeReference, this.targetType, AnnotationContext.VISIBLE);
+		}
+		if (annotationContext != null) {
+			annotationContext.wildcard = this.currentWildcard;
+			switch(this.targetType) {
+				case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER :
+				case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER :
+				case AnnotationTargetTypeConstants.CLASS_EXTENDS:
+				case AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER :
+				case AnnotationTargetTypeConstants.THROWS :
+				case AnnotationTargetTypeConstants.EXCEPTION_PARAMETER :
+				case AnnotationTargetTypeConstants.INSTANCEOF:
+				case AnnotationTargetTypeConstants.NEW :
+				case AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE :
+				case AnnotationTargetTypeConstants.METHOD_REFERENCE :
+					annotationContext.info = this.info;
+					break;
+				case AnnotationTargetTypeConstants.LOCAL_VARIABLE :
+				case AnnotationTargetTypeConstants.RESOURCE_VARIABLE :
+					annotationContext.variableBinding = this.localVariable;
+					break;
+				case AnnotationTargetTypeConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT :
+				case AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT :
+				case AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT :
+				case AnnotationTargetTypeConstants.METHOD_REFERENCE_TYPE_ARGUMENT :
+				case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND :
+				case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND :
+				case AnnotationTargetTypeConstants.CAST:
+					annotationContext.info2 = this.info2;
+					annotationContext.info = this.info;
+					break;
+				case AnnotationTargetTypeConstants.FIELD :
+				case AnnotationTargetTypeConstants.METHOD_RETURN :
+				case AnnotationTargetTypeConstants.METHOD_RECEIVER :
+					break;
+					
+			}
+			this.annotationContexts.add(annotationContext);
+		}
+		return true;
+	}
+	public boolean visit(MarkerAnnotation annotation, BlockScope scope) {
+		return internalVisit(annotation);
+	}
+	public boolean visit(NormalAnnotation annotation, BlockScope scope) {
+		return internalVisit(annotation);
+	}
+	public boolean visit(SingleMemberAnnotation annotation, BlockScope scope) {
+		return internalVisit(annotation);
+	}
+	public boolean visit(Wildcard wildcard, BlockScope scope) {
+		this.currentWildcard = wildcard;
+		return true;
+	}
+	public boolean visit(IntersectionCastTypeReference intersectionCastTypeReference, BlockScope scope) {
+		int length = intersectionCastTypeReference.typeReferences == null ? 0 : intersectionCastTypeReference.typeReferences.length;
+		for (int i = 0; i < length; i++) {
+			this.info2 = i;
+			intersectionCastTypeReference.typeReferences[i].traverse(this, scope);
+		}
+		return false; // iteration was done here, do not repeat in the caller
+	}
+	public boolean visit(Argument argument, BlockScope scope) {
+		if ((argument.bits & ASTNode.IsUnionType) == 0) {
+			return true;
+		}
+		for (int i = 0, max = this.localVariable.initializationCount; i < max; i++) {
+			int startPC = this.localVariable.initializationPCs[i << 1];
+			int endPC = this.localVariable.initializationPCs[(i << 1) + 1];
+			if (startPC != endPC) { // only entries for non zero length
+				return true;
+			}
+		}
+		return false;
+	}
+	public boolean visit(Argument argument, ClassScope scope) {
+		if ((argument.bits & ASTNode.IsUnionType) == 0) {
+			return true;
+		}
+		for (int i = 0, max = this.localVariable.initializationCount; i < max; i++) {
+			int startPC = this.localVariable.initializationPCs[i << 1];
+			int endPC = this.localVariable.initializationPCs[(i << 1) + 1];
+			if (startPC != endPC) { // only entries for non zero length
+				return true;
+			}
+		}
+		return false;
+	}
+	public boolean visit(LocalDeclaration localDeclaration, BlockScope scope) {
+		for (int i = 0, max = this.localVariable.initializationCount; i < max; i++) {
+			int startPC = this.localVariable.initializationPCs[i << 1];
+			int endPC = this.localVariable.initializationPCs[(i << 1) + 1];
+			if (startPC != endPC) { // only entries for non zero length
+				return true;
+			}
+		}
+		return false;
+	}
+	public void endVisit(Wildcard wildcard, BlockScope scope) {
+		this.currentWildcard = null;
+	}
+}
 
 //{ObjectTeams: for baseclass decapsulation (implement interface from Expression):
 private DecapsulationState baseclassDecapsulation = DecapsulationState.NONE;
@@ -64,7 +285,7 @@
 /*
  * Answer a base type reference (can be an array of base type).
  */
-public static final TypeReference baseTypeReference(int baseType, int dim) {
+public static final TypeReference baseTypeReference(int baseType, int dim, Annotation [][] dimAnnotations) {
 
 	if (dim == 0) {
 		switch (baseType) {
@@ -90,26 +311,29 @@
 	}
 	switch (baseType) {
 		case (TypeIds.T_void) :
-			return new ArrayTypeReference(TypeBinding.VOID.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.VOID.simpleName, dim, dimAnnotations, 0);
 		case (TypeIds.T_boolean) :
-			return new ArrayTypeReference(TypeBinding.BOOLEAN.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.BOOLEAN.simpleName, dim, dimAnnotations, 0);
 		case (TypeIds.T_char) :
-			return new ArrayTypeReference(TypeBinding.CHAR.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.CHAR.simpleName, dim, dimAnnotations, 0);
 		case (TypeIds.T_float) :
-			return new ArrayTypeReference(TypeBinding.FLOAT.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.FLOAT.simpleName, dim, dimAnnotations, 0);
 		case (TypeIds.T_double) :
-			return new ArrayTypeReference(TypeBinding.DOUBLE.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.DOUBLE.simpleName, dim, dimAnnotations, 0);
 		case (TypeIds.T_byte) :
-			return new ArrayTypeReference(TypeBinding.BYTE.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.BYTE.simpleName, dim, dimAnnotations, 0);
 		case (TypeIds.T_short) :
-			return new ArrayTypeReference(TypeBinding.SHORT.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.SHORT.simpleName, dim, dimAnnotations, 0);
 		case (TypeIds.T_int) :
-			return new ArrayTypeReference(TypeBinding.INT.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.INT.simpleName, dim, dimAnnotations, 0);
 		default : //T_long
-			return new ArrayTypeReference(TypeBinding.LONG.simpleName, dim, 0);
+			return new ArrayTypeReference(TypeBinding.LONG.simpleName, dim, dimAnnotations, 0);
 	}
 }
 
+// JSR308 type annotations...
+public Annotation[][] annotations = null;
+
 // allows us to trap completion & selection nodes
 public void aboutToResolve(Scope scope) {
 	// default implementation: do nothing
@@ -120,10 +344,39 @@
 public void checkBounds(Scope scope) {
 	// only parameterized type references have bounds
 }
-public abstract TypeReference copyDims(int dim);
+public abstract TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs);
+
+protected Annotation[][] getMergedAnnotationsOnDimensions(int additionalDimensions, Annotation[][] additionalAnnotations) {
+	/* Note, we actually concatenate the additional annotations after base annotations, in bindings, they should appear before base annotations.
+	   Given @English int @Nullable [] x @NonNull []; the type x is a @NonNull arrays of of @Nullable arrays of @English Strings, not the other
+	   way about. Changing this in the compiler AST representation will cause too many ripples, so we leave it as is. On the bindings, the type
+	   will reflect rotated (i.e will reflect correctly). See AnnotatableTypeSystem.flattenedAnnotations
+	*/
+	Annotation[][] annotationsOnDimensions = this.getAnnotationsOnDimensions(true);
+	int dimensions = this.dimensions();
+	
+	if (annotationsOnDimensions == null && additionalAnnotations == null)
+		return null;
+
+	final int totalDimensions = dimensions + additionalDimensions;
+	Annotation [][] mergedAnnotations = new Annotation[totalDimensions][];
+	if (annotationsOnDimensions != null) {
+		for (int i = 0; i < dimensions; i++) {
+			mergedAnnotations[i] = annotationsOnDimensions[i];
+		} 
+	}
+	if (additionalAnnotations != null) {
+		for (int i = dimensions, j = 0; i < totalDimensions; i++, j++) {
+			mergedAnnotations[i] = additionalAnnotations[j];
+		}
+	}
+	return mergedAnnotations;
+}
+
 public int dimensions() {
 	return 0;
 }
+
 //{ObjectTeams: synthetic AST can use TypeReference as receiver for static method:
 @Override
 public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
@@ -131,6 +384,79 @@
 }
 // SH}
 
+public AnnotationContext[] getAllAnnotationContexts(int targetType) {
+	List allAnnotationContexts = new ArrayList();
+	AnnotationCollector collector = new AnnotationCollector(this, targetType, allAnnotationContexts);
+	this.traverse(collector, (BlockScope) null);
+	return (AnnotationContext[]) allAnnotationContexts.toArray(new AnnotationContext[allAnnotationContexts.size()]);
+}
+/**
+ * info can be either a type index (superclass/superinterfaces) or a pc into the bytecode
+ * @param targetType
+ * @param info
+ * @param allAnnotationContexts
+ */
+public void getAllAnnotationContexts(int targetType, int info, List allAnnotationContexts) {
+	AnnotationCollector collector = new AnnotationCollector(this, targetType, info, allAnnotationContexts);
+	this.traverse(collector, (BlockScope) null);
+}
+public void getAllAnnotationContexts(int targetType, int info, List allAnnotationContexts, Annotation [] se7Annotations) {
+	AnnotationCollector collector = new AnnotationCollector(this, targetType, info, allAnnotationContexts);
+	for (int i = 0, length = se7Annotations == null ? 0 : se7Annotations.length; i < length; i++) {
+		Annotation annotation = se7Annotations[i];
+		annotation.traverse(collector, (BlockScope) null);
+	}
+	this.traverse(collector, (BlockScope) null);
+}
+/**
+ * info can be either a type index (superclass/superinterfaces) or a pc into the bytecode
+ */
+public void getAllAnnotationContexts(int targetType, int info, List allAnnotationContexts, Annotation[][] annotationsOnDimensions, int dimensions) {
+	AnnotationCollector collector = new AnnotationCollector(this, targetType, info, allAnnotationContexts, annotationsOnDimensions, dimensions);
+	this.traverse(collector, (BlockScope) null);
+	if (annotationsOnDimensions != null) {
+		for (int i = 0, max = annotationsOnDimensions.length; i < max; i++) {
+			Annotation[] annotationsOnDimension = annotationsOnDimensions[i];
+			if (annotationsOnDimension != null) {
+				for (int j = 0, max2 = annotationsOnDimension.length; j< max2; j++) {
+					annotationsOnDimension[j].traverse(collector, (BlockScope) null);
+				}
+			}
+		}
+	}
+}
+public void getAllAnnotationContexts(int targetType, int info, int typeIndex, List allAnnotationContexts) {
+	AnnotationCollector collector = new AnnotationCollector(this, targetType, info, typeIndex, allAnnotationContexts);
+	this.traverse(collector, (BlockScope) null);
+}
+public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
+	AnnotationCollector collector = new AnnotationCollector(this, targetType, allAnnotationContexts);
+	this.traverse(collector, (BlockScope) null);
+}
+public Annotation[][] getAnnotationsOnDimensions() {
+	return getAnnotationsOnDimensions(false);
+}
+
+public TypeReference [][] getTypeArguments() {
+	return null;
+}
+/**
+ * @param useSourceOrder if true annotations on dimensions are returned in source order, otherwise they are returned per
+ * how they ought to be interpreted by a type system, or external persistence view. For example, given the following:
+ * int @Nullable [] f @NonNull [] ==> f is really a @NonNull array of @Nullable arrays of ints. This is the type system
+ * view since extended dimensions bind more readily than type components that precede the identifier. This is how it ought
+ * to be encoded in bindings and how it ought to be persisted in class files. However for DOM/AST construction, we need the
+ * dimensions in source order, so we provide a way for the clients to ask what they want. 
+ * 
+ */
+public Annotation[][] getAnnotationsOnDimensions(boolean useSourceOrder) {
+	return null;
+}
+
+public void setAnnotationsOnDimensions(Annotation [][] annotationsOnDimensions) {
+	// nothing to do. Subtypes should react suitably.
+}
+
 public abstract char[] getLastToken();
 
 /**
@@ -271,10 +597,14 @@
 		scope.problemReporter().rawTypeReference(this, type);
 	}
 	if (hasError) {
-		// do not store the computed type, keep the problem type instead
+		resolveAnnotations(scope);		
 		return type;
+	} else {
+		// store the computed type only if no error, otherwise keep the problem type instead
+		this.resolvedType = type;
+		resolveAnnotations(scope);
+		return this.resolvedType; // pick up value that may have been changed in resolveAnnotations(..)
 	}
-	return this.resolvedType = type;
 }
 
 //{ObjectTeams: alternative strategies for resolving:
@@ -317,7 +647,18 @@
 	  return false;
 }
 //Markus Witte}
-
+public boolean isWildcard() {
+	return false;
+}
+public boolean isUnionType() {
+	return false;
+}
+public boolean isVarargs() {
+	return (this.bits & ASTNode.IsVarArgs) != 0;
+}
+public boolean isParameterizedTypeReference() {
+	return false;
+}
 protected void reportDeprecatedType(TypeBinding type, Scope scope, int index) {
 	scope.problemReporter().deprecatedType(type, this, index);
 }
@@ -406,4 +747,66 @@
 public abstract void traverse(ASTVisitor visitor, BlockScope scope);
 
 public abstract void traverse(ASTVisitor visitor, ClassScope scope);
+
+protected void resolveAnnotations(Scope scope) {
+	Annotation[][] annotationsOnDimensions = getAnnotationsOnDimensions();
+	if (this.annotations != null || annotationsOnDimensions != null) {
+		BlockScope resolutionScope = Scope.typeAnnotationsResolutionScope(scope);
+		if (resolutionScope != null) {
+			int dimensions = this.dimensions();
+			if (this.annotations != null) {
+				TypeBinding leafComponentType = this.resolvedType.leafComponentType();
+				leafComponentType = resolveAnnotations(resolutionScope, this.annotations, leafComponentType);
+				this.resolvedType = dimensions > 0 ? scope.environment().createArrayType(leafComponentType, dimensions) : leafComponentType;
+			}
+			if (annotationsOnDimensions != null) {
+				this.resolvedType = resolveAnnotations(resolutionScope, annotationsOnDimensions, this.resolvedType);		
+			}
+		}
+	}
+}
+public int getAnnotatableLevels() {
+	return 1;
+}
+/** Check all typeArguments against null constraints on their corresponding type variables. */
+protected void checkNullConstraints(Scope scope, TypeReference[] typeArguments) {
+	CompilerOptions compilerOptions = scope.compilerOptions();
+	if (compilerOptions.isAnnotationBasedNullAnalysisEnabled
+			&& compilerOptions.sourceLevel >= ClassFileConstants.JDK1_8
+			&& typeArguments != null)
+	{
+		TypeVariableBinding[] typeVariables = this.resolvedType.original().typeVariables();
+		for (int i = 0; i < typeArguments.length; i++) {
+			TypeReference arg = typeArguments[i];
+			if (arg.resolvedType != null && arg.resolvedType.hasNullTypeAnnotations())
+				arg.checkNullConstraints(scope, typeVariables, i);
+		}
+	}
+}
+/** Check whether this type reference conforms to all null constraints defined for any of the given type variables. */
+protected void checkNullConstraints(Scope scope, TypeBinding[] variables, int rank) {
+	if (variables != null && variables.length > rank) {
+		if (variables[rank].hasNullTypeAnnotations()) {
+			if (NullAnnotationMatching.validNullTagBits(this.resolvedType.tagBits) != NullAnnotationMatching.validNullTagBits(variables[rank].tagBits)) {
+				scope.problemReporter().nullityMismatchTypeArgument(variables[rank], this.resolvedType, this);
+			}
+    	}
+	}
+}
+/** Retrieve the null annotation that has been translated to the given nullTagBits. */
+public Annotation findAnnotation(long nullTagBits) {
+	if (this.annotations != null) {
+		Annotation[] innerAnnotations = this.annotations[this.annotations.length-1];
+		if (innerAnnotations != null) {
+			int annId = nullTagBits == TagBits.AnnotationNonNull ? TypeIds.T_ConfiguredAnnotationNonNull : TypeIds.T_ConfiguredAnnotationNullable;
+			for (int i = 0; i < innerAnnotations.length; i++) {
+				if (innerAnnotations[i] != null 
+						&& innerAnnotations[i].resolvedType != null 
+						&& innerAnnotations[i].resolvedType.id == annId)
+					return innerAnnotations[i];
+			}
+		}
+	}
+	return null;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
index f1d7415..945d553 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2012 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -30,13 +34,6 @@
 	}
 
 	/* (non-Javadoc)
-	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#copyDims(int)
-	 */
-	public TypeReference copyDims(int dim) {
-		return this;
-	}
-
-	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getLastToken()
 	 */
 	public char[] getLastToken() {
@@ -155,5 +152,11 @@
 		}
 		return output;
 	}
+	public boolean isUnionType() {
+		return true;
+	}
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
+		return this; // arrays are not legal as union types.
+	}
 
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
index 73b985d..4bf06d1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
@@ -1,12 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 415397 - [1.8][compiler] Type Annotations on wildcard type argument dropped
+ *        Stephan Herrmann - Contribution for
+ *							Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *							Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.ast;
 
@@ -59,16 +68,27 @@
 			boundType = scope.kind == Scope.CLASS_SCOPE
 					? this.bound.resolveType((ClassScope)scope)
 					: this.bound.resolveType((BlockScope)scope, true /* check bounds*/);
-
+			this.bits |= (this.bound.bits & ASTNode.HasTypeAnnotations);
 			if (boundType == null) {
 				return null;
 			}
 		}
-		WildcardBinding wildcard = scope.environment().createWildcard(genericType, rank, boundType, null /*no extra bound*/, this.kind);
-		return this.resolvedType = wildcard;
+		this.resolvedType = scope.environment().createWildcard(genericType, rank, boundType, null /*no extra bound*/, this.kind);
+		resolveAnnotations(scope);
+		if (boundType != null && boundType.hasNullTypeAnnotations() && this.resolvedType.hasNullTypeAnnotations()) {
+			if (((boundType.tagBits | this.resolvedType.tagBits) & TagBits.AnnotationNullMASK) == TagBits.AnnotationNullMASK) { // are both set?
+				Annotation annotation = this.bound.findAnnotation(boundType.tagBits & TagBits.AnnotationNullMASK);
+				scope.problemReporter().contradictoryNullAnnotationsOnBounds(annotation, this.resolvedType.tagBits);
+			}
+		}
+		return this.resolvedType;
 	}
 
 	public StringBuffer printExpression(int indent, StringBuffer output){
+		if (this.annotations != null && this.annotations[0] != null) {
+			printAnnotations(this.annotations[0], output);
+			output.append(' ');
+		}
 		switch (this.kind) {
 			case Wildcard.UNBOUND :
 				output.append(WILDCARD_NAME);
@@ -89,6 +109,7 @@
 	public TypeBinding resolveType(BlockScope scope, boolean checkBounds) {
 		if (this.bound != null) {
 			this.bound.resolveType(scope, checkBounds);
+			this.bits |= (this.bound.bits & ASTNode.HasTypeAnnotations);
 		}
 		return null;
 	}
@@ -96,6 +117,7 @@
 	public TypeBinding resolveType(ClassScope scope) {
 		if (this.bound != null) {
 			this.bound.resolveType(scope);
+			this.bits |= (this.bound.bits & ASTNode.HasTypeAnnotations);
 		}
 		return null;
 	}
@@ -109,6 +131,12 @@
 
 	public void traverse(ASTVisitor visitor, BlockScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++) {
+					typeAnnotations[i].traverse(visitor, scope);
+				}
+			}
 			if (this.bound != null) {
 				this.bound.traverse(visitor, scope);
 			}
@@ -118,10 +146,19 @@
 
 	public void traverse(ASTVisitor visitor, ClassScope scope) {
 		if (visitor.visit(this, scope)) {
+			if (this.annotations != null) {
+				Annotation [] typeAnnotations = this.annotations[0];
+				for (int i = 0, length = typeAnnotations == null ? 0 : typeAnnotations.length; i < length; i++) {
+					typeAnnotations[i].traverse(visitor, scope);
+				}
+			}
 			if (this.bound != null) {
 				this.bound.traverse(visitor, scope);
 			}
 		}
 		visitor.endVisit(this, scope);
 	}
+	public boolean isWildcard() {
+		return true;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
index 6d1ad34..2525bb8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileConstants.java
@@ -1,15 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: ClassFileConstants.java 19873 2009-04-13 16:51:05Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Jesper S Moller - Contributions for
+ *							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335             
+ *							Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.classfmt;
 
@@ -58,12 +64,19 @@
 // SH}
 
 	/**
+	 * From classfile version 52 (compliance 1.8 up), meaning that a formal parameter is mandated
+	 * by a language specification, so all compilers for the language must emit it.
+	 */
+	int AccMandated     = 0x8000;
+
+	
+	/**
 	 * Other VM flags.
 	 */
 	int AccSuper = 0x0020;
 
 	/**
-	 * Extra flags for types and members attributes.
+	 * Extra flags for types and members attributes (not from the JVMS, should have been defined in ExtraCompilerModifiers).
 	 */
 	int AccAnnotationDefault = ASTNode.Bit18; // indicate presence of an attribute  "DefaultValue" (annotation method)
 	int AccDeprecated = ASTNode.Bit21; // indicate presence of an attribute "Deprecated"
@@ -98,6 +111,17 @@
 	int ConstantMethodTypeFixedSize = 3;
 	int ConstantInvokeDynamicFixedSize = 5;
 
+	// JVMS 4.4.8
+	int MethodHandleRefKindGetField = 1;
+	int MethodHandleRefKindGetStatic = 2;
+	int MethodHandleRefKindPutField = 3;
+	int MethodHandleRefKindPutStatic = 4;
+	int MethodHandleRefKindInvokeVirtual = 5;
+	int MethodHandleRefKindInvokeStatic = 6;
+	int MethodHandleRefKindInvokeSpecial = 7;
+	int MethodHandleRefKindNewInvokeSpecial = 8;
+	int MethodHandleRefKindInvokeInterface = 9;
+
 	int MAJOR_VERSION_1_1 = 45;
 	int MAJOR_VERSION_1_2 = 46;
 	int MAJOR_VERSION_1_3 = 47;
@@ -105,7 +129,7 @@
 	int MAJOR_VERSION_1_5 = 49;
 	int MAJOR_VERSION_1_6 = 50;
 	int MAJOR_VERSION_1_7 = 51;
-	int MAJOR_VERSION_1_8 = 52;  // Oracle has not updated this as of JDK8b39, i.e it still says 51.
+	int MAJOR_VERSION_1_8 = 52;
 
 	int MINOR_VERSION_0 = 0;
 	int MINOR_VERSION_1 = 1;
@@ -149,4 +173,6 @@
 	int ATTR_VARS = 0x4; // LocalVariableTableAttribute
 	int ATTR_STACK_MAP_TABLE = 0x8; // Stack map table attribute
 	int ATTR_STACK_MAP = 0x10; // Stack map attribute: cldc
+	int ATTR_TYPE_ANNOTATION = 0x20; // type annotation attribute (jsr 308)
+	int ATTR_METHOD_PARAMETERS = 0x40; // method parameters attribute (jep 118)
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
index fa7f112..e923ed3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/ClassFileReader.java
@@ -54,6 +54,7 @@
 	private int classNameIndex;
 	private int constantPoolCount;
 	private AnnotationInfo[] annotations;
+	private TypeAnnotationInfo[] typeAnnotations;
 	private FieldInfo[] fields;
 	private int fieldsCount;
 
@@ -601,6 +602,30 @@
 	}
 }
 
+private void decodeTypeAnnotations(int offset, boolean runtimeVisible) {
+	int numberOfAnnotations = u2At(offset + 6);
+	if (numberOfAnnotations > 0) {
+		int readOffset = offset + 8;
+		TypeAnnotationInfo[] newInfos = null;
+		newInfos = new TypeAnnotationInfo[numberOfAnnotations];
+		for (int i = 0; i < numberOfAnnotations; i++) {
+			// With the last parameter being 'false', the data structure will not be flushed out
+			TypeAnnotationInfo newInfo = new TypeAnnotationInfo(this.reference, this.constantPoolOffsets, readOffset, runtimeVisible, false);
+			readOffset += newInfo.readOffset;
+			newInfos[i] = newInfo;
+		}
+		if (this.typeAnnotations == null) {
+			this.typeAnnotations = newInfos;
+		} else {
+			int length = this.typeAnnotations.length;
+			TypeAnnotationInfo[] temp = new TypeAnnotationInfo[length + numberOfAnnotations];
+			System.arraycopy(this.typeAnnotations, 0, temp, 0, length);
+			System.arraycopy(newInfos, 0, temp, length, numberOfAnnotations);
+			this.typeAnnotations = temp;
+		}
+	}
+}
+
 /**
  * @return the annotations or null if there is none.
  */
@@ -609,6 +634,13 @@
 }
 
 /**
+ * @return the type annotations or null if there is none.
+ */
+public IBinaryTypeAnnotation[] getTypeAnnotations() {
+	return this.typeAnnotations;
+}
+
+/**
  * Answer the char array that corresponds to the class name of the constant class.
  * constantPoolIndex is the index in the constant pool that is a constant class entry.
  *
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
index 8ea8f57..0aa94e4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfo.java
@@ -19,6 +19,7 @@
 import org.eclipse.jdt.internal.compiler.codegen.AttributeNamesConstants;
 import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
 import org.eclipse.jdt.internal.compiler.env.IBinaryField;
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
 import org.eclipse.jdt.internal.compiler.impl.*;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
@@ -53,10 +54,65 @@
 
 public static FieldInfo createField(byte classFileBytes[], int offsets[], int offset) {
 	FieldInfo fieldInfo = new FieldInfo(classFileBytes, offsets, offset);
-	AnnotationInfo[] annotations = fieldInfo.readAttributes();
-	if (annotations == null)
-		return fieldInfo;
-	return new FieldInfoWithAnnotation(fieldInfo, annotations);
+	
+	int attributesCount = fieldInfo.u2At(6);
+	int readOffset = 8;
+	AnnotationInfo[] annotations = null;
+	TypeAnnotationInfo[] typeAnnotations = null;
+	for (int i = 0; i < attributesCount; i++) {
+		// check the name of each attribute
+		int utf8Offset = fieldInfo.constantPoolOffsets[fieldInfo.u2At(readOffset)] - fieldInfo.structOffset;
+		char[] attributeName = fieldInfo.utf8At(utf8Offset + 3, fieldInfo.u2At(utf8Offset + 1));
+		if (attributeName.length > 0) {
+			switch(attributeName[0]) {
+				case 'S' :
+					if (CharOperation.equals(AttributeNamesConstants.SignatureName, attributeName))
+						fieldInfo.signatureUtf8Offset = fieldInfo.constantPoolOffsets[fieldInfo.u2At(readOffset + 6)] - fieldInfo.structOffset;
+					break;
+				case 'R' :
+					AnnotationInfo[] decodedAnnotations = null;
+					TypeAnnotationInfo[] decodedTypeAnnotations = null;
+					if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeVisibleAnnotationsName)) {
+						decodedAnnotations = fieldInfo.decodeAnnotations(readOffset, true);
+					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeInvisibleAnnotationsName)) {
+						decodedAnnotations = fieldInfo.decodeAnnotations(readOffset, false);
+					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeVisibleTypeAnnotationsName)) {
+						decodedTypeAnnotations = fieldInfo.decodeTypeAnnotations(readOffset, true);
+					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeInvisibleTypeAnnotationsName)) {
+						decodedTypeAnnotations = fieldInfo.decodeTypeAnnotations(readOffset, false);
+					}
+					if (decodedAnnotations != null) {
+						if (annotations == null) {
+							annotations = decodedAnnotations;
+						} else {
+							int length = annotations.length;
+							AnnotationInfo[] combined = new AnnotationInfo[length + decodedAnnotations.length];
+							System.arraycopy(annotations, 0, combined, 0, length);
+							System.arraycopy(decodedAnnotations, 0, combined, length, decodedAnnotations.length);
+							annotations = combined;
+						}
+					} else if (decodedTypeAnnotations != null) {
+						if (typeAnnotations == null) {
+							typeAnnotations = decodedTypeAnnotations;
+						} else {
+							int length = typeAnnotations.length;
+							TypeAnnotationInfo[] combined = new TypeAnnotationInfo[length + decodedTypeAnnotations.length];
+							System.arraycopy(typeAnnotations, 0, combined, 0, length);
+							System.arraycopy(decodedTypeAnnotations, 0, combined, length, decodedTypeAnnotations.length);
+							typeAnnotations = combined;
+						}
+					}
+			}
+		}
+		readOffset += (6 + fieldInfo.u4At(readOffset + 2));
+	}
+	fieldInfo.attributeBytes = readOffset;
+	
+	if (typeAnnotations != null)
+		return new FieldInfoWithTypeAnnotation(fieldInfo, annotations, typeAnnotations);
+	if (annotations != null)
+		return new FieldInfoWithAnnotation(fieldInfo, annotations);
+	return fieldInfo;
 }
 
 /**
@@ -97,6 +153,22 @@
 	}
 	return null; // nothing to record
 }
+
+TypeAnnotationInfo[] decodeTypeAnnotations(int offset, boolean runtimeVisible) {
+	int numberOfAnnotations = u2At(offset + 6);
+	if (numberOfAnnotations > 0) {
+		int readOffset = offset + 8;
+		TypeAnnotationInfo[] typeAnnos = new TypeAnnotationInfo[numberOfAnnotations];
+		for (int i = 0; i < numberOfAnnotations; i++) {
+			TypeAnnotationInfo newInfo = new TypeAnnotationInfo(this.reference, this.constantPoolOffsets, readOffset + this.structOffset, runtimeVisible, false);
+			readOffset += newInfo.readOffset;
+			typeAnnos[i] = newInfo;
+		}
+		return typeAnnos;
+	}
+	return null;
+}
+
 public int compareTo(Object o) {
 	return new String(getName()).compareTo(new String(((FieldInfo) o).getName()));
 }
@@ -190,6 +262,10 @@
 public IBinaryAnnotation[] getAnnotations() {
 	return null;
 }
+
+public IBinaryTypeAnnotation[] getTypeAnnotations() {
+	return null;
+}
 /**
  * Return a wrapper that contains the constant of the field.
  * @return java.lang.Object
@@ -257,45 +333,6 @@
 public boolean isSynthetic() {
 	return (getModifiers() & ClassFileConstants.AccSynthetic) != 0;
 }
-private AnnotationInfo[] readAttributes() {
-	int attributesCount = u2At(6);
-	int readOffset = 8;
-	AnnotationInfo[] annotations = null;
-	for (int i = 0; i < attributesCount; i++) {
-		// check the name of each attribute
-		int utf8Offset = this.constantPoolOffsets[u2At(readOffset)] - this.structOffset;
-		char[] attributeName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
-		if (attributeName.length > 0) {
-			switch(attributeName[0]) {
-				case 'S' :
-					if (CharOperation.equals(AttributeNamesConstants.SignatureName, attributeName))
-						this.signatureUtf8Offset = this.constantPoolOffsets[u2At(readOffset + 6)] - this.structOffset;
-					break;
-				case 'R' :
-					AnnotationInfo[] decodedAnnotations = null;
-					if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeVisibleAnnotationsName)) {
-						decodedAnnotations = decodeAnnotations(readOffset, true);
-					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeInvisibleAnnotationsName)) {
-						decodedAnnotations = decodeAnnotations(readOffset, false);
-					}
-					if (decodedAnnotations != null) {
-						if (annotations == null) {
-							annotations = decodedAnnotations;
-						} else {
-							int length = annotations.length;
-							AnnotationInfo[] combined = new AnnotationInfo[length + decodedAnnotations.length];
-							System.arraycopy(annotations, 0, combined, 0, length);
-							System.arraycopy(decodedAnnotations, 0, combined, length, decodedAnnotations.length);
-							annotations = combined;
-						}
-					}
-			}
-		}
-		readOffset += (6 + u4At(readOffset + 2));
-	}
-	this.attributeBytes = readOffset;
-	return annotations;
-}
 private void readConstantAttribute() {
 	int attributesCount = u2At(6);
 	int readOffset = 8;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfoWithAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfoWithAnnotation.java
index 4e3c435..6bfbaaa 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfoWithAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfoWithAnnotation.java
@@ -1,16 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2009 BEA Systems, Inc.
+ * Copyright (c) 2005, 2013 BEA Systems, Inc.
  * 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *    tyeung@bea.com - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *          Bug 407191 - [1.8] Binary access support for type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.classfmt;
 
-public final class FieldInfoWithAnnotation extends FieldInfo {
+public class FieldInfoWithAnnotation extends FieldInfo {
 	private AnnotationInfo[] annotations;
 
 FieldInfoWithAnnotation(FieldInfo info, AnnotationInfo[] annos) {
@@ -31,8 +37,9 @@
 	return this.annotations;
 }
 protected void initialize() {
-	for (int i = 0, max = this.annotations.length; i < max; i++)
-		this.annotations[i].initialize();
+	if (this.annotations != null)
+		for (int i = 0, max = this.annotations.length; i < max; i++)
+			this.annotations[i].initialize();
 	super.initialize();
 }
 protected void reset() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfoWithTypeAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfoWithTypeAnnotation.java
new file mode 100644
index 0000000..f80085d
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/FieldInfoWithTypeAnnotation.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved.
+ * 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *          Bug 407191 - [1.8] Binary access support for type annotations
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.classfmt;
+
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
+
+public final class FieldInfoWithTypeAnnotation extends FieldInfoWithAnnotation {
+	private TypeAnnotationInfo[] typeAnnotations;
+
+FieldInfoWithTypeAnnotation(FieldInfo info, AnnotationInfo[] annos, TypeAnnotationInfo[] typeAnnos) {
+	super(info, annos);
+	this.typeAnnotations = typeAnnos;
+}
+public IBinaryTypeAnnotation[] getTypeAnnotations() {
+	return this.typeAnnotations;
+}
+protected void initialize() {
+	for (int i = 0, max = this.typeAnnotations.length; i < max; i++)
+		this.typeAnnotations[i].initialize();
+	super.initialize();
+}
+protected void reset() {
+	if (this.typeAnnotations != null)
+		for (int i = 0, max = this.typeAnnotations.length; i < max; i++)
+			this.typeAnnotations[i].reset();
+	super.reset();
+}
+public String toString() {
+	StringBuffer buffer = new StringBuffer(getClass().getName());
+	if (this.typeAnnotations != null) {
+		buffer.append('\n');
+		buffer.append("type annotations:"); //$NON-NLS-1$
+		for (int i = 0; i < this.typeAnnotations.length; i++) {
+			buffer.append(this.typeAnnotations[i]);
+			buffer.append('\n');
+		}
+	}
+	toStringContent(buffer);
+	return buffer.toString();
+}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
index 576d451..c7b06ec 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfo.java
@@ -1,16 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: MethodInfo.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
+ *     Jesper Steen Moeller - Contribution for bug 406973 - [compiler] Parse MethodParameters attribute
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *         Bug 407191 - [1.8] Binary access support for type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.classfmt;
 
@@ -25,12 +31,13 @@
 import java.util.LinkedList;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.codegen.AttributeNamesConstants;
 import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
 import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
 import org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding;
-import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.util.Util;
@@ -59,6 +66,7 @@
 public class MethodInfo extends ClassFileStruct implements IBinaryMethod, Comparable {
 	static private final char[][] noException = CharOperation.NO_CHAR_CHAR;
 	static private final char[][] noArgumentNames = CharOperation.NO_CHAR_CHAR;
+	static private final char[] ARG = "arg".toCharArray();  //$NON-NLS-1$
 	protected int accessFlags;
 	protected int attributeBytes;
 	protected char[] descriptor;
@@ -68,10 +76,14 @@
 	protected int signatureUtf8Offset;
 	protected long tagBits;
 	protected char[][] argumentNames;
-	protected int argumentNamesIndex;
+
 //{ObjectTeams: method level attributes:
     /* After reading a method its attributes are stored here. */
     private LinkedList<AbstractAttribute> methodAttributes = new LinkedList<AbstractAttribute>();
+    // more bits decoded from attributes:
+    protected int otModifiers;
+	// constants for the above:
+	static final int AccCallsBaseCtor = ASTNode.Bit1;
 // SH}
 
 public static MethodInfo createMethod(byte classFileBytes[], int offsets[], int offset) {
@@ -80,12 +92,18 @@
 	int readOffset = 8;
 	AnnotationInfo[] annotations = null;
 	AnnotationInfo[][] parameterAnnotations = null;
+	TypeAnnotationInfo[] typeAnnotations = null;
 	for (int i = 0; i < attributesCount; i++) {
 		// check the name of each attribute
 		int utf8Offset = methodInfo.constantPoolOffsets[methodInfo.u2At(readOffset)] - methodInfo.structOffset;
 		char[] attributeName = methodInfo.utf8At(utf8Offset + 3, methodInfo.u2At(utf8Offset + 1));
 		if (attributeName.length > 0) {
 			switch(attributeName[0]) {
+				case 'M' :
+					if (CharOperation.equals(attributeName, AttributeNamesConstants.MethodParametersName)) {
+						methodInfo.decodeMethodParameters(readOffset, methodInfo);
+					}
+					break;
 				case 'S' :
 					if (CharOperation.equals(AttributeNamesConstants.SignatureName, attributeName))
 						methodInfo.signatureUtf8Offset = methodInfo.constantPoolOffsets[methodInfo.u2At(readOffset + 6)] - methodInfo.structOffset;
@@ -93,6 +111,7 @@
 				case 'R' :
 					AnnotationInfo[] methodAnnotations = null;
 					AnnotationInfo[][] paramAnnotations = null;
+					TypeAnnotationInfo[] methodTypeAnnotations = null;
 					if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeVisibleAnnotationsName)) {
 						methodAnnotations = decodeMethodAnnotations(readOffset, true, methodInfo);
 					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeInvisibleAnnotationsName)) {
@@ -101,6 +120,10 @@
 						paramAnnotations = decodeParamAnnotations(readOffset, true, methodInfo);
 					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeInvisibleParameterAnnotationsName)) {
 						paramAnnotations = decodeParamAnnotations(readOffset, false, methodInfo);
+					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeVisibleTypeAnnotationsName)) {
+						methodTypeAnnotations = decodeTypeAnnotations(readOffset, true, methodInfo);
+					} else if (CharOperation.equals(attributeName, AttributeNamesConstants.RuntimeInvisibleTypeAnnotationsName)) {
+						methodTypeAnnotations = decodeTypeAnnotations(readOffset, false, methodInfo);
 					}
 					if (methodAnnotations != null) {
 						if (annotations == null) {
@@ -132,6 +155,16 @@
 								}
 							}
 						}
+					} else if (methodTypeAnnotations != null) {
+						if (typeAnnotations == null) {
+							typeAnnotations = methodTypeAnnotations;
+						} else {
+							int length = typeAnnotations.length;
+							TypeAnnotationInfo[] newAnnotations = new TypeAnnotationInfo[length + methodTypeAnnotations.length];
+							System.arraycopy(typeAnnotations, 0, newAnnotations, 0, length);
+							System.arraycopy(methodTypeAnnotations, 0, newAnnotations, length, methodTypeAnnotations.length);
+							typeAnnotations = newAnnotations;
+						}
 					}
 					break;
 			}
@@ -140,6 +173,8 @@
 	}
 	methodInfo.attributeBytes = readOffset;
 
+	if (typeAnnotations != null)
+		return new MethodInfoWithTypeAnnotations(methodInfo, annotations, parameterAnnotations, typeAnnotations);
 	if (parameterAnnotations != null)
 		return new MethodInfoWithParameterAnnotations(methodInfo, annotations, parameterAnnotations);
 	if (annotations != null)
@@ -153,7 +188,10 @@
 }
 // special flag which needs to be added to the regular access flags:
 public void setCallsBaseCtor() {
-	this.accessFlags |= ExtraCompilerModifiers.AccCallsBaseCtor;
+	this.otModifiers |= AccCallsBaseCtor;
+}
+public boolean callsBaseCtor() {
+	return (this.otModifiers & AccCallsBaseCtor) != 0;
 }
 public void maybeRegister(
         BinaryTypeBinding clazz,
@@ -243,6 +281,20 @@
 	}
 	return null;
 }
+static TypeAnnotationInfo[] decodeTypeAnnotations(int offset, boolean runtimeVisible, MethodInfo methodInfo) {
+	int numberOfAnnotations = methodInfo.u2At(offset + 6);
+	if (numberOfAnnotations > 0) {
+		int readOffset = offset + 8;
+		TypeAnnotationInfo[] typeAnnos = new TypeAnnotationInfo[numberOfAnnotations];
+		for (int i = 0; i < numberOfAnnotations; i++) {
+			TypeAnnotationInfo newInfo = new TypeAnnotationInfo(methodInfo.reference, methodInfo.constantPoolOffsets, readOffset + methodInfo.structOffset, runtimeVisible, false);
+			readOffset += newInfo.readOffset;
+			typeAnnos[i] = newInfo;
+		}
+		return typeAnnos;
+	}
+	return null;
+}
 static AnnotationInfo[][] decodeParamAnnotations(int offset, boolean runtimeVisible, MethodInfo methodInfo) {
 	AnnotationInfo[][] allParamAnnotations = null;
 	int numberOfParameters = methodInfo.u1At(offset + 6);
@@ -371,6 +423,9 @@
 public int getAnnotatedParametersCount() {
 	return 0;
 }
+public IBinaryTypeAnnotation[] getTypeAnnotations() {
+	return null;
+}
 /**
  * Answer the name of the method.
  *
@@ -488,7 +543,7 @@
 				default:
 					readOTAttribute(attributeName, this, readOffset+6, this.structOffset, this.constantPoolOffsets);
 // SH}
-  			}
+			}
 		}
 		readOffset += (6 + u4At(readOffset + 2));
 	}
@@ -628,7 +683,7 @@
 	if (length != 0) {
 		readOffset += 2;
 		this.argumentNames = new char[length][];
-		this.argumentNamesIndex = 0;
+		int argumentNamesIndex = 0;
 		for (int i = 0; i < length; i++) {
 			int startPC = u2At(readOffset);
 			if (startPC == 0) {
@@ -636,16 +691,35 @@
 				int utf8Offset = this.constantPoolOffsets[nameIndex] - this.structOffset;
 				char[] localVariableName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
 				if (!CharOperation.equals(localVariableName, ConstantPool.This)) {
-					this.argumentNames[this.argumentNamesIndex++] = localVariableName;
+					this.argumentNames[argumentNamesIndex++] = localVariableName;
 				}
 			} else {
 				break;
 			}
 			readOffset += 10;
 		}
-		if (this.argumentNamesIndex != this.argumentNames.length) {
+		if (argumentNamesIndex != this.argumentNames.length) {
 			// resize
-			System.arraycopy(this.argumentNames, 0, (this.argumentNames = new char[this.argumentNamesIndex][]), 0, this.argumentNamesIndex);
+			System.arraycopy(this.argumentNames, 0, (this.argumentNames = new char[argumentNamesIndex][]), 0, argumentNamesIndex);
+		}
+	}
+}
+private void decodeMethodParameters(int offset, MethodInfo methodInfo) {
+	int readOffset = offset + 6;
+	final int length = u1At(readOffset);
+	if (length != 0) {
+		readOffset += 1;
+		this.argumentNames = new char[length][];
+		for (int i = 0; i < length; i++) {
+			int nameIndex = u2At(readOffset);
+			if (nameIndex != 0) {
+				int utf8Offset = this.constantPoolOffsets[nameIndex] - this.structOffset;
+				char[] parameterName = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));
+				this.argumentNames[i] = parameterName;
+			} else {
+				this.argumentNames[i] = CharOperation.concat(ARG, String.valueOf(i).toCharArray());
+			}
+			readOffset += 4;
 		}
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfoWithParameterAnnotations.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfoWithParameterAnnotations.java
index 27f4ea2..d472880 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfoWithParameterAnnotations.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfoWithParameterAnnotations.java
@@ -22,7 +22,7 @@
 	this.parameterAnnotations = parameterAnnotations;
 }
 public IBinaryAnnotation[] getParameterAnnotations(int index) {
-	return this.parameterAnnotations[index];
+	return this.parameterAnnotations == null ? null : this.parameterAnnotations[index];
 }
 public int getAnnotatedParametersCount() {
 	return this.parameterAnnotations == null ? 0 : this.parameterAnnotations.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfoWithTypeAnnotations.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfoWithTypeAnnotations.java
new file mode 100644
index 0000000..a79a1e4
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/MethodInfoWithTypeAnnotations.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved.
+ * 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *            Bug 407191 - [1.8] Binary access support for type annotations
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.classfmt;
+
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
+
+class MethodInfoWithTypeAnnotations extends MethodInfoWithParameterAnnotations {
+	private TypeAnnotationInfo[] typeAnnotations;
+
+MethodInfoWithTypeAnnotations(MethodInfo methodInfo, AnnotationInfo[] annotations, AnnotationInfo[][] parameterAnnotations, TypeAnnotationInfo[] typeAnnotations) {
+	super(methodInfo, annotations, parameterAnnotations);
+	this.typeAnnotations = typeAnnotations;
+}
+public IBinaryTypeAnnotation[] getTypeAnnotations() {
+	return this.typeAnnotations;
+}
+
+protected void initialize() {
+	for (int i = 0, l = this.typeAnnotations == null ? 0 : this.typeAnnotations.length; i < l; i++) {
+		this.typeAnnotations[i].initialize();
+	}
+	super.initialize();
+}
+protected void reset() {
+	for (int i = 0, l = this.typeAnnotations == null ? 0 : this.typeAnnotations.length; i < l; i++) {
+		this.typeAnnotations[i].reset();
+	}
+	super.reset();
+}
+protected void toStringContent(StringBuffer buffer) {
+	super.toStringContent(buffer);
+	buffer.append("type annotations = \n");//$NON-NLS-1$
+	for (int i = 0, l = this.typeAnnotations == null ? 0 : this.typeAnnotations.length; i < l; i++) {
+		buffer.append(this.typeAnnotations[i].toString());
+		buffer.append('\n');
+	}
+}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java
new file mode 100644
index 0000000..2ccd75e
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationInfo.java
@@ -0,0 +1,242 @@
+/*******************************************************************************
+ * Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved.
+ * 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *          Bug 407191 - [1.8] Binary access support for type annotations
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.classfmt;
+
+import java.util.Arrays;
+
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
+import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
+
+/**
+ * The TypeAnnotationInfo class does not currently support type annotations within code
+ * blocks (those that have a target type of 0x40 and higher) - it is not yet clear that 
+ * these need to be accessible.
+ */
+public class TypeAnnotationInfo extends ClassFileStruct implements IBinaryTypeAnnotation {
+
+	private AnnotationInfo annotation;
+	
+	private int targetType = 0;
+	
+	// info is used in different ways:
+	// TargetType 0x00: CLASS_TYPE_PARAMETER: type parameter index
+	// TargetType 0x01: METHOD_TYPE_PARAMETER: type parameter index 
+	// TargetType 0x10: CLASS_EXTENDS: supertype index (-1 = superclass, 0..N superinterface)
+	// TargetType 0x11: CLASS_TYPE_PARAMETER_BOUND: type parameter index
+	// TargetType 0x12: METHOD_TYPE_PARAMETER_BOUND: type parameter index
+	// TargetType 0x16: METHOD_FORMAL_PARAMETER: method formal parameter index
+	// TargetType 0x17: THROWS: throws type index
+	private int info;
+	
+	// TargetType 0x11: CLASS_TYPE_PARAMETER_BOUND: bound index
+	// TargetType 0x12: METHOD_TYPE_PARAMETER_BOUND: bound index
+	private int info2;
+	
+	private int[] typePath; // each pair of ints in the array is a type path entry
+	
+	int readOffset = 0;
+	
+	
+TypeAnnotationInfo(byte[] classFileBytes, int[] contantPoolOffsets, int offset) {
+	super(classFileBytes, contantPoolOffsets, offset);
+}
+	
+TypeAnnotationInfo(byte[] classFileBytes, int[] contantPoolOffsets, int offset, boolean runtimeVisible, boolean populate) {
+	this(classFileBytes, contantPoolOffsets, offset);
+	this.readOffset = 0;
+	this.targetType = u1At(0);
+	switch (this.targetType) {
+		case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER:
+		case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER:
+			this.info = u1At(1); // typeParameterIndex
+			this.readOffset += 2;
+			break;
+			
+		case AnnotationTargetTypeConstants.CLASS_EXTENDS:
+			this.info = u2At(1); // supertypeIndex
+			this.readOffset += 3;
+			break;
+			
+		case AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND:
+		case AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND:
+			this.info = u1At(1); // typeParameterIndex
+			this.info2 = u1At(2); // boundIndex;
+			this.readOffset += 3;
+			break;
+			
+		case AnnotationTargetTypeConstants.FIELD:
+		case AnnotationTargetTypeConstants.METHOD_RETURN:
+		case AnnotationTargetTypeConstants.METHOD_RECEIVER:
+			this.readOffset ++;
+			break;
+			
+		case AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER :
+			this.info = u1At(1); // methodFormalParameterIndex
+			this.readOffset += 2;
+			break;
+			
+		case AnnotationTargetTypeConstants.THROWS :
+			this.info = u2At(1); // throwsTypeIndex
+			this.readOffset += 3;
+			break;
+
+		default:
+			throw new IllegalStateException("Target type not handled "+this.targetType); //$NON-NLS-1$
+	}
+	int typePathLength = u1At(this.readOffset);
+	this.readOffset ++;
+	if (typePathLength == 0) {
+		this.typePath = NO_TYPE_PATH;
+	} else {
+		this.typePath = new int[typePathLength*2];
+		int index = 0;
+		for (int i = 0; i < typePathLength; i++) {
+			this.typePath[index++] = u1At(this.readOffset++); // entry kind
+			this.typePath[index++] = u1At(this.readOffset++); // type argument index
+		}
+	}
+	this.annotation = new AnnotationInfo(classFileBytes, this.constantPoolOffsets, this.structOffset + this.readOffset, runtimeVisible, populate);
+	this.readOffset += this.annotation.readOffset;
+}
+
+public IBinaryAnnotation getAnnotation() {
+	return this.annotation;
+}
+
+protected void initialize() {
+	this.annotation.initialize();
+}
+
+protected void reset() {
+	this.annotation.reset();
+	super.reset();
+}
+
+public String toString() {
+	StringBuffer buffer = new StringBuffer();
+	buffer.append(this.annotation);
+	buffer.append(' ');
+	// Not fully decoding it here, just including all the information in the string
+	buffer.append("target_type=").append(this.targetType); //$NON-NLS-1$
+	buffer.append(", info=").append(this.info); //$NON-NLS-1$
+	buffer.append(", info2=").append(this.info2); //$NON-NLS-1$
+	if (this.typePath != NO_TYPE_PATH) {
+		buffer.append(", location=["); //$NON-NLS-1$
+		for (int i = 0, max = this.typePath.length; i < max; i += 2) {
+			if (i > 0) {
+				buffer.append(", "); //$NON-NLS-1$
+			}
+			switch (this.typePath[i]) {
+				case 0:
+					buffer.append("ARRAY"); //$NON-NLS-1$
+					break;
+				case 1:
+					buffer.append("INNER_TYPE"); //$NON-NLS-1$
+					break;
+				case 2:
+					buffer.append("WILDCARD"); //$NON-NLS-1$
+					break;
+				case 3:
+					buffer.append("TYPE_ARGUMENT(").append(this.typePath[i+1]).append(')'); //$NON-NLS-1$
+					break;
+			}
+		}
+		buffer.append(']');
+	}
+	return buffer.toString();
+}
+
+
+public int getTargetType() {
+	return this.targetType;
+}
+
+public int getSupertypeIndex() {
+	// assert this.targetType == 0x10
+	return this.info;
+}
+
+public int getTypeParameterIndex() {
+	// assert this.targetType == 0x00 or 0x01
+	return this.info;
+}
+
+public int getBoundIndex() {
+	// assert this.targetType == 0x11 or 0x12
+	return this.info2;
+}
+
+public int getMethodFormalParameterIndex() {
+	// assert this.targetType == 0x16
+	return this.info;
+}
+
+public int getThrowsTypeIndex() {
+	// assert this.targetType == 0x17
+	return this.info;
+}
+
+public int[] getTypePath() {
+	return this.typePath;
+}
+
+public int hashCode() {
+	final int prime = 31;
+	int result = 1;
+	result = prime * result + this.targetType;
+	result = prime * result + this.info;
+	result = prime * result + this.info2;
+	if (this.typePath != null) {
+		for (int i = 0, max = this.typePath.length; i < max; i++) {
+			result = prime * result + this.typePath[i];
+		}
+	}
+	return result;
+}
+
+public boolean equals(Object obj) {
+	if (this == obj) {
+		return true;
+	}
+	if (obj == null) {
+		return false;
+	}
+	if (getClass() != obj.getClass()) {
+		return false;
+	}
+
+	TypeAnnotationInfo other = (TypeAnnotationInfo) obj;
+
+	if (this.targetType != other.targetType) {
+		return false;
+	}
+	
+	if (this.info != other.info) {
+		return false;
+	}
+
+	if (this.info2 != other.info2) {
+		return false;
+	}
+	
+	if (!Arrays.equals(this.typePath, other.typePath)) {
+		return false;
+	}
+	
+	return this.annotation.equals(other.annotation);
+}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java
new file mode 100644
index 0000000..b796d99
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/classfmt/TypeAnnotationWalker.java
@@ -0,0 +1,324 @@
+/*******************************************************************************
+ * Copyright (c) 2013 GK Software AG.
+ * 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     Stephan Herrmann - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.classfmt;
+
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
+import org.eclipse.jdt.internal.compiler.env.IBinaryAnnotation;
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
+
+/**
+ * A TypeAnnotationWalker is initialized with all type annotations found at a given element.
+ * It can be used to walk into the types at the given element and finally answer the
+ * actual annotations at any node of the walk.
+ * 
+ * The walker is implemented as immutable objects. During the walk either new instances
+ * are created, or the current instance is shared if no difference is encountered.
+ */
+public class TypeAnnotationWalker {
+
+	public static final IBinaryAnnotation[] NO_ANNOTATIONS = new IBinaryAnnotation[0];
+
+	/**
+	 * A no-effect annotation walker, all walking methods are implemented as identity-functions.
+	 * At the end of any walk an empty array of annotations is returned.
+	 */
+	public static final TypeAnnotationWalker EMPTY_ANNOTATION_WALKER = new TypeAnnotationWalker(new IBinaryTypeAnnotation[0], 0L) {
+		public TypeAnnotationWalker toField() { return this; }
+		public TypeAnnotationWalker toTarget(int targetType) { return this; }
+		public TypeAnnotationWalker toThrows(int rank) { return this; }
+		public TypeAnnotationWalker toTypeArgument(int rank) { return this; }
+		public TypeAnnotationWalker toMethodParameter(short index) { return this; }
+		public TypeAnnotationWalker toSupertype(short index) { return this; }
+		public TypeAnnotationWalker toTypeParameterBounds(boolean isClassTypeParameter, int parameterRank) { return this; }
+		public TypeAnnotationWalker toTypeBound(short boundIndex) { return this; }
+		public TypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank) { return this; }
+		public TypeAnnotationWalker toNextDetail(int detailKind) { return this; }
+		public IBinaryAnnotation[] getAnnotationsAtCursor() { return NO_ANNOTATIONS; }
+	};
+	
+	final private IBinaryTypeAnnotation[] typeAnnotations;	// the actual material we're managing here
+	final private long matches;							// bit mask of indices into typeAnnotations, 1 means active, 0 is filtered during the walk
+	final private int pathPtr;							// pointer into the typePath
+
+	// precondition: not-empty typeAnnotations
+	public TypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations) {
+		this(typeAnnotations, -1L >>> (64-typeAnnotations.length)); // initialize so lowest length bits are 1
+	}
+	TypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations, long matchBits) {
+		this(typeAnnotations, matchBits, 0);
+	}
+	private TypeAnnotationWalker(IBinaryTypeAnnotation[] typeAnnotations, long matchBits, int pathPtr) {
+		this.typeAnnotations = typeAnnotations;
+		this.matches = matchBits;
+		this.pathPtr = pathPtr;
+	}
+
+	private TypeAnnotationWalker restrict(long newMatches, int newPathPtr) {
+		if (this.matches == newMatches && this.pathPtr == newPathPtr) return this;
+		if (newMatches == 0 || this.typeAnnotations == null || this.typeAnnotations.length == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		return new TypeAnnotationWalker(this.typeAnnotations, newMatches, newPathPtr);
+	}
+
+	// ==== filter by top-level targetType: ====
+	
+	/** Walk to a field. */
+	public TypeAnnotationWalker toField() {
+		return toTarget(AnnotationTargetTypeConstants.FIELD);
+	}
+
+	/** Walk to the return type of a method. */
+	public TypeAnnotationWalker toMethodReturn() {
+		return toTarget(AnnotationTargetTypeConstants.METHOD_RETURN);
+	}
+
+	/**
+	 * Walk to the receiver type of a method.
+	 * Note: Type annotations on receiver are not currently used by the compiler.
+	 */
+	public TypeAnnotationWalker toReceiver() {
+		return toTarget(AnnotationTargetTypeConstants.METHOD_RECEIVER);
+	}
+
+	/*
+	 * Implementation for walking to methodReturn, receiver type or field.
+	 */
+	protected TypeAnnotationWalker toTarget(int targetType) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			if (this.typeAnnotations[i].getTargetType() != targetType)
+				newMatches &= ~mask;
+		}
+		return restrict(newMatches, 0);
+	}
+
+	/**
+	 * Walk to the type parameter of the given rank.
+	 * @param isClassTypeParameter whether we are looking for a class type parameter (else: method type type parameter)
+	 * @param rank rank of the type parameter
+	 */
+	public TypeAnnotationWalker toTypeParameter(boolean isClassTypeParameter, int rank) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int targetType = isClassTypeParameter ? AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER : AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			if (candidate.getTargetType() != targetType || candidate.getTypeParameterIndex() != rank) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, 0);		
+	}
+
+	/**
+	 * Walk to the bounds of a type parameter of either a class or a method (signaled by isClassTypeParameter).
+	 * Clients must then call {@link #toTypeBound(short)} on the resulting walker.
+	 * @param isClassTypeParameter whether we are looking at a class type parameter (else: method type type parameter)
+	 * @param parameterRank rank of the type parameter.
+	 */
+	public TypeAnnotationWalker toTypeParameterBounds(boolean isClassTypeParameter, int parameterRank) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		int targetType = isClassTypeParameter ?
+				AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND : AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			if (candidate.getTargetType() != targetType || (short)candidate.getTypeParameterIndex() != parameterRank) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, 0);	
+	}
+	/**
+	 * Detail of {@link #toTypeParameterBounds(boolean, int)}: walk to the bounds
+	 * of the previously selected type parameter. 
+	 * @param boundIndex
+	 */
+	public TypeAnnotationWalker toTypeBound(short boundIndex) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			if ((short)candidate.getBoundIndex() != boundIndex) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, 0);		
+	}
+	
+	
+	/** Walk to the specified supertype: -1 is superclass, else the superinterface at the given index. */
+	public TypeAnnotationWalker toSupertype(short index) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			if (candidate.getTargetType() != AnnotationTargetTypeConstants.CLASS_EXTENDS || (short)candidate.getSupertypeIndex() != index) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, 0);		
+	}
+
+	/** Walk to the index'th visible formal method parameter (i.e., not counting synthetic args). */
+	public TypeAnnotationWalker toMethodParameter(short index) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			if (candidate.getTargetType() != AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER || (short)candidate.getMethodFormalParameterIndex() != index) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, 0);		
+	}
+
+	/**
+	 * Walk to the throws type at the given index.
+	 */
+	public TypeAnnotationWalker toThrows(int index) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			if (candidate.getTargetType() != AnnotationTargetTypeConstants.THROWS || candidate.getThrowsTypeIndex() != index) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, 0);		
+	}
+
+	// ==== descending into details: ====
+
+	/** Walk to the type argument of the given rank. */
+	public TypeAnnotationWalker toTypeArgument(int rank) {
+		// like toNextDetail() but also checking byte 2 against rank
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			int[] path = candidate.getTypePath();
+			if (this.pathPtr >= path.length 
+					|| path[this.pathPtr] != AnnotationTargetTypeConstants.TYPE_ARGUMENT
+					|| path[this.pathPtr+1] != rank) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, this.pathPtr+2);		
+	}
+
+	/** Walk to the bound of a wildcard. */
+	public TypeAnnotationWalker toWildcardBound() {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			int[] path = candidate.getTypePath();
+			if (this.pathPtr >= path.length 
+					|| path[this.pathPtr] != AnnotationTargetTypeConstants.WILDCARD_BOUND) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, this.pathPtr+2);		
+	}
+
+	/**
+	 * Descend down one level of array dimensions.
+	 */
+	public TypeAnnotationWalker toNextArrayDimension() {
+		return toNextDetail(AnnotationTargetTypeConstants.NEXT_ARRAY_DIMENSION);
+	}
+	
+	/**
+	 * Descend down one level of type nesting.
+	 */
+	public TypeAnnotationWalker toNextNestedType() {
+		return toNextDetail(AnnotationTargetTypeConstants.NEXT_NESTED_TYPE);
+	}
+
+	/*
+	 * Implementation for walking along the type_path for array dimensions & nested types.
+	 * FIXME(stephan): support wildcard bounds.
+	 */
+	protected TypeAnnotationWalker toNextDetail(int detailKind) {
+		long newMatches = this.matches;
+		if (newMatches == 0)
+			return EMPTY_ANNOTATION_WALKER;
+		int length = this.typeAnnotations.length;
+		long mask = 1;
+		for (int i = 0; i < length; i++, mask = mask << 1) {
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			int[] path = candidate.getTypePath();
+			if (this.pathPtr >= path.length || path[this.pathPtr] != detailKind) {
+				newMatches &= ~mask;
+			}
+		}
+		return restrict(newMatches, this.pathPtr+2);
+	}
+	
+	// ==== leaves: the actual annotations: ====
+	
+	/**
+	 * Retrieve the type annotations at the current position
+	 * reached by invocations of toXYZ() methods.
+	 */
+	public IBinaryAnnotation[] getAnnotationsAtCursor() {
+		int length = this.typeAnnotations.length;
+		IBinaryAnnotation[] filtered = new IBinaryAnnotation[length];
+		long ptr = 1;
+		int count = 0;
+		for (int i = 0; i < length; i++, ptr<<=1) {
+			if ((this.matches & ptr) == 0)
+				continue;
+			IBinaryTypeAnnotation candidate = this.typeAnnotations[i];
+			if (candidate.getTypePath().length > this.pathPtr)
+				continue;
+			filtered[count++] = candidate.getAnnotation();
+		}
+		if (count == 0)
+			return NO_ANNOTATIONS;
+		if (count < length)
+			System.arraycopy(filtered, 0, filtered = new IBinaryAnnotation[count], 0, count);
+		return filtered;
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AnnotationContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AnnotationContext.java
new file mode 100644
index 0000000..865db39
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AnnotationContext.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.codegen;
+
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
+import org.eclipse.jdt.internal.compiler.ast.Expression;
+import org.eclipse.jdt.internal.compiler.ast.Wildcard;
+import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+
+public class AnnotationContext {
+	public static final int VISIBLE = 0x1;
+	public static final int INVISIBLE = 0x2;
+	public Annotation annotation;
+	public Expression typeReference;
+	public int targetType;
+	public int info;
+	public int info2;
+	public int visibility;
+	public LocalVariableBinding variableBinding;
+	public Wildcard wildcard;
+
+	public AnnotationContext(
+			Annotation annotation,
+			Expression typeReference,
+			int targetType,
+			int visibility) {
+		this.annotation = annotation;
+		this.typeReference = typeReference;
+		this.targetType = targetType;
+		this.visibility = visibility;
+	}
+
+	public String toString() {
+		return "AnnotationContext [annotation=" //$NON-NLS-1$
+				+ this.annotation
+				+ ", typeReference=" //$NON-NLS-1$
+				+ this.typeReference
+				+ ", targetType=" //$NON-NLS-1$
+				+ this.targetType
+				+ ", info =" //$NON-NLS-1$
+				+ this.info
+				+ ", boundIndex=" //$NON-NLS-1$
+				+ this.info2
+				+ "]"; //$NON-NLS-1$
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AnnotationTargetTypeConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AnnotationTargetTypeConstants.java
new file mode 100644
index 0000000..0877074
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AnnotationTargetTypeConstants.java
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *        Stephan Herrmann - Contribution for
+ *							Bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.codegen;
+
+public interface AnnotationTargetTypeConstants {
+
+	// Targets for type parameter declarations
+	int CLASS_TYPE_PARAMETER                 = 0x00;
+	int METHOD_TYPE_PARAMETER                = 0x01;
+
+	// Targets that may be externally visible in classes and members
+	int CLASS_EXTENDS                        = 0x10;
+	int CLASS_TYPE_PARAMETER_BOUND           = 0x11;
+	int METHOD_TYPE_PARAMETER_BOUND          = 0x12;
+	int FIELD                                = 0x13;
+	int METHOD_RETURN                        = 0x14;
+	int METHOD_RECEIVER                      = 0x15;
+	int METHOD_FORMAL_PARAMETER              = 0x16;
+	int THROWS                               = 0x17;
+
+	// Targets for type uses that occur only within code blocks
+	int LOCAL_VARIABLE                       = 0x40;
+	int RESOURCE_VARIABLE                    = 0x41;
+	int EXCEPTION_PARAMETER                  = 0x42;
+	int INSTANCEOF                           = 0x43;
+	int NEW                                  = 0x44;
+	int CONSTRUCTOR_REFERENCE                = 0x45;
+	int METHOD_REFERENCE                     = 0x46;
+	int CAST                                 = 0x47;
+	int CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT = 0x48;
+	int METHOD_INVOCATION_TYPE_ARGUMENT      = 0x49;
+	int CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT  = 0x4A;
+	int METHOD_REFERENCE_TYPE_ARGUMENT       = 0x4B;
+
+	// Details for type_path:
+	int NEXT_ARRAY_DIMENSION				 = 0x00;
+	int NEXT_NESTED_TYPE					 = 0x01;
+	int WILDCARD_BOUND						 = 0x02;
+	int TYPE_ARGUMENT						 = 0x03;
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java
index 51a4e83..534eef0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/AttributeNamesConstants.java
@@ -1,12 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - Contributions for
+ *							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335             
+ *							Bug 406973 - [compiler] Parse MethodParameters attribute
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.codegen;
 
@@ -33,4 +42,10 @@
 	final char[] VarargsName = "Varargs".toCharArray(); //$NON-NLS-1$
 	final char[] StackMapName = "StackMap".toCharArray(); //$NON-NLS-1$
 	final char[] MissingTypesName = "MissingTypes".toCharArray(); //$NON-NLS-1$
+	final char[] BootstrapMethodsName = "BootstrapMethods".toCharArray(); //$NON-NLS-1$
+	// jsr308
+	final char[] RuntimeVisibleTypeAnnotationsName = "RuntimeVisibleTypeAnnotations".toCharArray(); //$NON-NLS-1$
+	final char[] RuntimeInvisibleTypeAnnotationsName = "RuntimeInvisibleTypeAnnotations".toCharArray(); //$NON-NLS-1$
+	// jep118
+	final char[] MethodParametersName = "MethodParameters".toCharArray(); //$NON-NLS-1$
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
index 438d880..39d3130 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/CodeStream.java
@@ -1,15 +1,32 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: CodeStream.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 400710 - [1.8][compiler] synthetic access to default method generates wrong code
+ *								bug 391376 - [1.8] check interaction of default methods with bridge methods and generics
+ *     Jesper S Moller - Contributions for
+ *							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335        
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
+ *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.codegen;
 
@@ -20,11 +37,14 @@
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.AllocationExpression;
+import org.eclipse.jdt.internal.compiler.ast.ArrayAllocationExpression;
 import org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
 import org.eclipse.jdt.internal.compiler.ast.OperatorIds;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -71,7 +91,6 @@
  * @version $Id: CodeStream.java 23405 2010-02-03 17:02:18Z stephan $
  */
 public class CodeStream {
-	public static final boolean DEBUG = false;
 
 	// It will be responsible for the following items.
 	// -> Tracking Max Stack.
@@ -112,6 +131,7 @@
 	public int maxFieldCount;
 	public int maxLocals;
 	public AbstractMethodDeclaration methodDeclaration;
+	public LambdaExpression lambdaExpression;
 	public int[] pcToSourceMap = new int[24];
 	public int pcToSourceMapSize;
 	public int position; // So when first set can be incremented
@@ -679,13 +699,23 @@
 }
 
 public void checkcast(TypeBinding typeBinding) {
-	this.countLabels = 0;
-	if (this.classFileOffset + 2 >= this.bCodeStream.length) {
-		resizeByteArray();
+	this.checkcast(null, typeBinding);
+}
+
+public void checkcast(TypeReference typeReference, TypeBinding typeBinding) {
+	/* We use a slightly sub-optimal generation for intersection casts by resorting to a runtime cast for every intersecting type, but in
+	   reality this should not matter. In its intended use form such as (I & Serializable) () -> {}, no cast is emitted at all
+	*/
+	TypeBinding [] types = typeBinding instanceof IntersectionCastTypeBinding ? typeBinding.getIntersectingTypes() : new TypeBinding [] { typeBinding };
+	for (int i = 0, max = types.length; i < max; i++) {
+		this.countLabels = 0;
+		if (this.classFileOffset + 2 >= this.bCodeStream.length) {
+			resizeByteArray();
+		}
+		this.position++;
+		this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_checkcast;
+		writeUnsignedShort(this.constantPool.literalIndexForType(types[i]));
 	}
-	this.position++;
-	this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_checkcast;
-	writeUnsignedShort(this.constantPool.literalIndexForType(typeBinding));
 }
 
 public void d2f() {
@@ -2491,7 +2521,55 @@
 	invoke(Opcodes.OPC_invokespecial, constructorBinding, null /* default declaringClass */);
 	return_();
 }
-
+public void generateSyntheticBodyForArrayConstructor(SyntheticMethodBinding methodBinding) {
+	initializeMaxLocals(methodBinding);
+	iload_0();
+	anewarray(((ArrayBinding) methodBinding.returnType).elementsType());
+	areturn();
+}
+public void generateSyntheticBodyForArrayClone(SyntheticMethodBinding methodBinding) {
+	initializeMaxLocals(methodBinding);
+	TypeBinding arrayType = methodBinding.parameters[0];
+	aload_0();
+	invoke(   // // invokevirtual: "[I".clone:()Ljava/lang/Object;
+			Opcodes.OPC_invokevirtual,
+			1, // receiverAndArgsSize
+			1, // return type size
+			arrayType.signature(), // declaring class e.g "[I"
+			ConstantPool.Clone,
+			ConstantPool.CloneSignature);
+	checkcast(arrayType);
+	areturn();
+}
+public void generateSyntheticBodyForFactoryMethod(SyntheticMethodBinding methodBinding) {
+	initializeMaxLocals(methodBinding);
+	MethodBinding constructorBinding = methodBinding.targetMethod;
+	TypeBinding[] parameters = methodBinding.parameters;
+	int length = parameters.length;
+	
+	new_(constructorBinding.declaringClass);
+	dup();
+	
+	int resolvedPosition = 0;
+	for (int i = 0; i < length; i++) {
+		TypeBinding parameter;
+		load(parameter = parameters[i], resolvedPosition);
+		switch(parameter.id) {
+			case TypeIds.T_long :
+			case TypeIds.T_double :
+				resolvedPosition += 2;
+				break;
+			default :
+				resolvedPosition++;
+				break;
+		}
+	}
+	for (int i = 0; i < methodBinding.fakePaddedParameters; i++)
+		aconst_null();
+	
+	invoke(Opcodes.OPC_invokespecial, constructorBinding, null /* default declaringClass */);
+	areturn();
+}
 //static X valueOf(String name) {
 // return (X) Enum.valueOf(X.class, name);
 //}
@@ -2650,7 +2728,7 @@
 	    if (arguments != null) { // for bridge methods
 		    TypeBinding argument = arguments[i];
 			load(argument, resolvedPosition);
-			if (argument != parameter)
+			if (TypeBinding.notEquals(argument, parameter))
 			    checkcast(parameter);
 	    } else {
 			load(parameter, resolvedPosition);
@@ -2674,13 +2752,13 @@
 				|| accessMethod.purpose == SyntheticMethodBinding.SuperMethodAccess){
 			// target method declaring class may not be accessible (247953);
 			TypeBinding declaringClass = accessMethod.purpose == SyntheticMethodBinding.SuperMethodAccess 
-					? accessMethod.declaringClass.superclass() 
-					: accessMethod.declaringClass;				
+					? findDirectSuperTypeTowards(accessMethod, targetMethod)
+					: accessMethod.declaringClass;
 //{ObjectTeams: private methods also occur in role interfaces:
 /* orig:
 			invoke(Opcodes.OPC_invokespecial, targetMethod, declaringClass);
   :giro */
-			if (targetMethod.declaringClass.isInterface())
+			if (targetMethod.declaringClass.isSynthInterface())
 				invoke(Opcodes.OPC_invokeinterface, targetMethod, declaringClass);
 			else
 				invoke(Opcodes.OPC_invokespecial, targetMethod, declaringClass);
@@ -2722,6 +2800,30 @@
 			areturn();
 	}
 }
+/** When generating SuperMetodAccess towards targetMethod,
+ *  find the suitable direct super type, that will eventually lead to targetMethod.declaringClass.*/
+ReferenceBinding findDirectSuperTypeTowards(SyntheticMethodBinding accessMethod, MethodBinding targetMethod) {
+	ReferenceBinding currentType = accessMethod.declaringClass;
+	ReferenceBinding superclass = currentType.superclass();
+	if (targetMethod.isDefaultMethod()) {
+		// could be inherited via superclass *or* a super interface 
+		ReferenceBinding targetType = targetMethod.declaringClass;
+		if (superclass.isCompatibleWith(targetType))
+			return superclass;
+		ReferenceBinding[] superInterfaces = currentType.superInterfaces();
+		if (superInterfaces != null) {
+			for (int i = 0; i < superInterfaces.length; i++) {
+				ReferenceBinding superIfc = superInterfaces[i];
+				if (superIfc.isCompatibleWith(targetType))
+					return superIfc;
+			}
+		}
+		throw new RuntimeException("Assumption violated: some super type must be conform to the declaring class of a super method"); //$NON-NLS-1$
+	} else {
+		// only one path possible:
+		return superclass;
+	}
+}
 
 public void generateSyntheticBodyForSwitchTable(SyntheticMethodBinding methodBinding) {
 	ClassScope scope = ((SourceTypeBinding)methodBinding.declaringClass).scope;
@@ -2812,7 +2914,7 @@
 		boolean complyTo14 = compliance >= ClassFileConstants.JDK1_4;
 		for (int i = 0, max = syntheticArgumentTypes.length; i < max; i++) {
 			ReferenceBinding syntheticArgType = syntheticArgumentTypes[i];
-			if (hasExtraEnclosingInstance && syntheticArgType == targetEnclosingType) {
+			if (hasExtraEnclosingInstance && TypeBinding.equalsEquals(syntheticArgType, targetEnclosingType)) {
 				hasExtraEnclosingInstance = false;
 				enclosingInstance.generateCode(currentScope, this, true);
 				if (complyTo14){
@@ -3078,7 +3180,7 @@
 	// for runtime compatibility on 1.2 VMs : change the declaring class of the binding
 	// NOTE: from target 1.2 on, field's declaring class is touched if any different from receiver type
 	// and not from Object or implicit static field access.
-	if (constantPoolDeclaringClass != actualReceiverType.erasure()
+	if (TypeBinding.notEquals(constantPoolDeclaringClass, actualReceiverType.erasure())
 			&& !actualReceiverType.isArrayType()
 			&& constantPoolDeclaringClass != null // array.length
 			&& codegenBinding.constant() == Constant.NotAConstant) {
@@ -3116,7 +3218,7 @@
 		// for runtime compatibility on 1.2 VMs : change the declaring class of the binding
 		// NOTE: from target 1.2 on, method's declaring class is touched if any different from receiver type
 		// and not from Object or implicit static method call.
-		if (constantPoolDeclaringClass != actualReceiverType.erasure() && !actualReceiverType.isArrayType()) {
+		if (TypeBinding.notEquals(constantPoolDeclaringClass, actualReceiverType.erasure()) && !actualReceiverType.isArrayType()) {
 			CompilerOptions options = currentScope.compilerOptions();
 			if ((options.targetJDK >= ClassFileConstants.JDK1_2
 						&& (options.complianceLevel >= ClassFileConstants.JDK1_4 || !(isImplicitThisReceiver && codegenBinding.isStatic()))
@@ -3958,10 +4060,18 @@
 }
 
 /**
- * We didn't call it instanceof because there is a conflit with the
+ * We didn't call it instanceof because there is a conflict with the
  * instanceof keyword
  */
 public void instance_of(TypeBinding typeBinding) {
+	this.instance_of(null, typeBinding);
+}
+
+/**
+ * We didn't call it instanceof because there is a conflict with the
+ * instanceof keyword
+ */
+public void instance_of(TypeReference typeReference, TypeBinding typeBinding) {
 	this.countLabels = 0;
 	if (this.classFileOffset + 2 >= this.bCodeStream.length) {
 		resizeByteArray();
@@ -4005,7 +4115,31 @@
 	}
 }
 
+public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature) {
+	this.invokeDynamic(bootStrapIndex, argsSize, returnTypeSize, selector, signature, false, null, null);
+}
+
+public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature, boolean isConstructorReference, TypeReference lhsTypeReference, TypeReference [] typeArguments) {
+	if (this.classFileOffset + 4 >= this.bCodeStream.length) {
+		resizeByteArray();
+	}
+	int invokeDynamicIndex = this.constantPool.literalIndexForInvokeDynamic(bootStrapIndex, selector, signature);
+	this.position +=3;
+	this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_invokedynamic;
+	writeUnsignedShort(invokeDynamicIndex);
+	this.bCodeStream[this.classFileOffset++] = 0;
+	this.bCodeStream[this.classFileOffset++] = 0;
+	this.stackDepth += returnTypeSize - argsSize;
+	if (this.stackDepth > this.stackMax) {
+		this.stackMax = this.stackDepth;
+	}
+}
+
 public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass) {
+	this.invoke(opcode, methodBinding, declaringClass, null);
+}
+
+public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) {
 	if (declaringClass == null) declaringClass = methodBinding.declaringClass;
 	if ((declaringClass.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
 		Util.recordNestedType(this.classFile, declaringClass);
@@ -5792,7 +5926,11 @@
 	this.bCodeStream[this.classFileOffset++] = Opcodes.OPC_monitorexit;
 }
 
-public void multianewarray(TypeBinding typeBinding, int dimensions) {
+public void multianewarray(
+		TypeReference typeReference,
+		TypeBinding typeBinding,
+		int dimensions,
+		ArrayAllocationExpression allocationExpression) {
 	this.countLabels = 0;
 	this.stackDepth += (1 - dimensions);
 	if (this.classFileOffset + 3 >= this.bCodeStream.length) {
@@ -5811,6 +5949,11 @@
 
 // We didn't call it new, because there is a conflit with the new keyword
 public void new_(TypeBinding typeBinding) {
+	this.new_(null, typeBinding);
+}
+
+// We didn't call it new, because there is a conflit with the new keyword
+public void new_(TypeReference typeReference, TypeBinding typeBinding) {
 	this.countLabels = 0;
 	this.stackDepth++;
 	if (this.stackDepth > this.stackMax)
@@ -5839,6 +5982,10 @@
 }
 
 public void newArray(ArrayBinding arrayBinding) {
+	this.newArray(null, null, arrayBinding);
+}
+
+public void newArray(TypeReference typeReference, ArrayAllocationExpression allocationExpression, ArrayBinding arrayBinding) {
 	TypeBinding component = arrayBinding.elementsType();
 	switch (component.id) {
 		case TypeIds.T_int :
@@ -6491,6 +6638,7 @@
 public void reset(AbstractMethodDeclaration referenceMethod, ClassFile targetClassFile) {
 	init(targetClassFile);
 	this.methodDeclaration = referenceMethod;
+	this.lambdaExpression = null;
 	int[] lineSeparatorPositions2 = this.lineSeparatorPositions;
 	if (lineSeparatorPositions2 != null) {
 		int length = lineSeparatorPositions2.length;
@@ -6517,6 +6665,31 @@
 	initializeMaxLocals(referenceMethod.binding);
 }
 
+public void reset(LambdaExpression lambda, ClassFile targetClassFile) {
+	init(targetClassFile);
+	this.lambdaExpression = lambda;
+	this.methodDeclaration = null;
+	int[] lineSeparatorPositions2 = this.lineSeparatorPositions;
+	if (lineSeparatorPositions2 != null) {
+		int length = lineSeparatorPositions2.length;
+		int lineSeparatorPositionsEnd = length - 1;
+		int start = Util.getLineNumber(lambda.body.sourceStart, lineSeparatorPositions2, 0, lineSeparatorPositionsEnd);
+		this.lineNumberStart = start;
+		if (start > lineSeparatorPositionsEnd) {
+			this.lineNumberEnd = start;
+		} else {
+			int end = Util.getLineNumber(lambda.body.sourceEnd, lineSeparatorPositions2, start - 1, lineSeparatorPositionsEnd);
+			if (end >= lineSeparatorPositionsEnd) {
+				end = length;
+			}
+			this.lineNumberEnd = end == 0 ? 1 : end;
+		}
+
+	}
+	this.preserveUnusedLocals = lambda.scope.compilerOptions().preserveAllLocalVariables;
+	initializeMaxLocals(lambda.binding);
+}
+
 public void reset(ClassFile givenClassFile) {
 	this.targetLevel = givenClassFile.targetJDK;
 	int produceAttributes = givenClassFile.produceAttributes;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
index c449385..ad91159 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ConstantPool.java
@@ -1,18 +1,28 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Jesper S Moller - Contributions for
+ *							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335        
+ *							Bug 406982 - [1.8][compiler] Generation of MethodParameters Attribute in classfile
+ *							Bug 416885 - [1.8][compiler]IncompatibleClassChange error (edit)
+ *							Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.codegen;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ClassFile;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TagBits;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
@@ -79,6 +89,8 @@
 	public static final char[] doubleDoubleSignature = "(D)Ljava/lang/Double;".toCharArray(); //$NON-NLS-1$
 	public static final char[] DOUBLEVALUE_DOUBLE_METHOD_NAME = "doubleValue".toCharArray(); //$NON-NLS-1$
 	public static final char[] DOUBLEVALUE_DOUBLE_METHOD_SIGNATURE = "()D".toCharArray(); //$NON-NLS-1$
+	public static final char[] EnumName = "$enum$name".toCharArray();//$NON-NLS-1$
+	public static final char[] EnumOrdinal = "$enum$ordinal".toCharArray();//$NON-NLS-1$
 	public static final char[] Exit = "exit".toCharArray(); //$NON-NLS-1$
 	public static final char[] ExitIntSignature = "(I)V".toCharArray(); //$NON-NLS-1$
 	public static final char[] FloatConstrSignature = "(F)V".toCharArray(); //$NON-NLS-1$
@@ -174,6 +186,7 @@
 	public static final char[] longLongSignature = "(J)Ljava/lang/Long;".toCharArray(); //$NON-NLS-1$
 	public static final char[] LONGVALUE_LONG_METHOD_NAME = "longValue".toCharArray(); //$NON-NLS-1$
 	public static final char[] LONGVALUE_LONG_METHOD_SIGNATURE = "()J".toCharArray(); //$NON-NLS-1$
+	public static final char[] Name = "name".toCharArray();//$NON-NLS-1$
 	public static final char[] NewInstance = "newInstance".toCharArray(); //$NON-NLS-1$
 	public static final char[] NewInstanceSignature = "(Ljava/lang/Class;[I)Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
 	public static final char[] Next = "next".toCharArray();//$NON-NLS-1$
@@ -248,6 +261,11 @@
 	public static final char[] JAVA_LANG_SAFEVARARGS = "Ljava/lang/SafeVarargs;".toCharArray(); //$NON-NLS-1$
 	// java 7 java.lang.invoke.MethodHandle.invokeExact(..)/invokeGeneric(..)
 	public static final char[] JAVA_LANG_INVOKE_METHODHANDLE_POLYMORPHICSIGNATURE = "Ljava/lang/invoke/MethodHandle$PolymorphicSignature;".toCharArray(); //$NON-NLS-1$
+	// Java 8 lambda support
+	public static final char[] METAFACTORY = "metafactory".toCharArray(); //$NON-NLS-1$
+	public static final char[] JAVA_LANG_INVOKE_LAMBDAMETAFACTORY_METAFACTORY_SIGNATURE = "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;".toCharArray(); //$NON-NLS-1$
+	// Java 8 repeatable annotation support
+	public static final char[] JAVA_LANG_ANNOTATION_REPEATABLE = "Ljava/lang/annotation/Repeatable;".toCharArray(); //$NON-NLS-1$
 
 	public static final char[] HashCode = "hashCode".toCharArray(); //$NON-NLS-1$
 	public static final char[] HashCodeSignature = "()I".toCharArray(); //$NON-NLS-1$; 
@@ -255,6 +273,9 @@
 	public static final char[] EqualsSignature = "(Ljava/lang/Object;)Z".toCharArray(); //$NON-NLS-1$; 
 	public static final char[] AddSuppressed = "addSuppressed".toCharArray(); //$NON-NLS-1$;
 	public static final char[] AddSuppressedSignature = "(Ljava/lang/Throwable;)V".toCharArray(); //$NON-NLS-1$
+	public static final char[] Clone = "clone".toCharArray(); //$NON-NLS-1$
+	public static final char[] CloneSignature = "()Ljava/lang/Object;".toCharArray(); //$NON-NLS-1$
+	
 	/**
 	 * ConstantPool constructor comment.
 	 */
@@ -738,6 +759,64 @@
 		}
 		return index;
 	}
+	public int literalIndexForMethodHandle(MethodBinding binding) {
+		boolean isInterface = binding.declaringClass.isInterface();
+		int referenceKind =
+			isInterface ? MethodHandleRefKindInvokeInterface
+			: binding.isConstructor() ? MethodHandleRefKindNewInvokeSpecial
+			: binding.isStatic() ? MethodHandleRefKindInvokeStatic
+			: MethodHandleRefKindInvokeVirtual;
+		
+		return literalIndexForMethodHandle(referenceKind, binding.declaringClass, binding.selector, binding.signature(), isInterface);
+	}
+	
+	public int literalIndexForMethodHandle(int referenceKind, TypeBinding declaringClass, char[] selector, char[] signature, boolean isInterface) {
+		int indexForMethod = literalIndexForMethod(declaringClass, selector, signature, isInterface);
+
+		int index = this.currentIndex++;
+		int length = this.offsets.length;
+		if (length <= index) {
+			// resize
+			System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length);
+		}
+		
+		this.offsets[index] = this.currentOffset;
+		writeU1(MethodHandleTag);
+		writeU1(referenceKind);
+		writeU2(indexForMethod);
+
+		return index;
+	}
+	public int literalIndexForMethodType(char[] descriptor) {
+		int signatureIndex = literalIndex(descriptor);
+
+		int index = this.currentIndex++;
+		
+		int length = this.offsets.length;
+		if (length <= index) {
+			// resize
+			System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length);
+		}
+		this.offsets[index] = this.currentOffset;
+		writeU1(MethodTypeTag);
+		writeU2(signatureIndex);
+
+		return index;
+	}
+	public int literalIndexForInvokeDynamic(int bootStrapIndex, char[] selector, char[] descriptor) {
+		int nameAndTypeIndex = literalIndexForNameAndType(selector, descriptor);
+		int index = this.currentIndex++;
+		int length = this.offsets.length;
+		if (length <= index) {
+			// resize
+			System.arraycopy(this.offsets, 0, (this.offsets = new int[index * 2]), 0, length);
+		}
+		this.offsets[index] = this.currentOffset;
+		writeU1(InvokeDynamicTag);
+		writeU2(bootStrapIndex);
+		writeU2(nameAndTypeIndex);
+		return index;
+	}
 	public int literalIndexForField(char[] declaringClass, char[] name, char[] signature) {
 		int index;
 		if ((index = putInCacheIfAbsent(declaringClass, name, signature, this.currentIndex)) < 0) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ExceptionLabel.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ExceptionLabel.java
index 7c26397..ccc8063 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ExceptionLabel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/ExceptionLabel.java
@@ -1,16 +1,24 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.codegen;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 
 public class ExceptionLabel extends Label {
@@ -18,6 +26,15 @@
 	public int ranges[] = {POS_NOT_SET,POS_NOT_SET};
 	private int count = 0; // incremented each time placeStart or placeEnd is called
 	public TypeBinding exceptionType;
+	public TypeReference exceptionTypeReference;
+	public Annotation [] se7Annotations;
+
+public ExceptionLabel(CodeStream codeStream, TypeBinding exceptionType, TypeReference exceptionTypeReference, Annotation [] se7Annotations) {
+	super(codeStream);
+	this.exceptionType = exceptionType;
+	this.exceptionTypeReference = exceptionTypeReference;
+	this.se7Annotations = se7Annotations;
+}
 
 public ExceptionLabel(CodeStream codeStream, TypeBinding exceptionType) {
 	super(codeStream);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java
index 2d0fc54..61587e1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/MultiCatchExceptionLabel.java
@@ -1,15 +1,24 @@
 /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others.
+ * Copyright (c) 2011, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.codegen;
 
+import java.util.List;
+
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.UnionTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
@@ -22,12 +31,12 @@
 		super(codeStream, exceptionType);
 	}
 	
-	public void initialize(UnionTypeReference typeReference) {
+	public void initialize(UnionTypeReference typeReference, Annotation [] annotations) {
 		TypeReference[] typeReferences = typeReference.typeReferences;
 		int length = typeReferences.length;
 		this.exceptionLabels = new ExceptionLabel[length];
 		for (int i = 0; i < length; i++) {
-			this.exceptionLabels[i] = new ExceptionLabel(this.codeStream, typeReferences[i].resolvedType);
+			this.exceptionLabels[i] = new ExceptionLabel(this.codeStream, typeReferences[i].resolvedType, typeReferences[i], i == 0 ? annotations : null);
 		}
 	}
 	public void place() {
@@ -52,4 +61,16 @@
 		}
 		return temp;
 	}
+
+	public int getAllAnnotationContexts(int tableIndex, List allTypeAnnotationContexts) {
+		int localCount = 0;
+		for (int i = 0, max = this.exceptionLabels.length; i < max; i++) {
+			ExceptionLabel exceptionLabel = this.exceptionLabels[i];
+			if (exceptionLabel.exceptionTypeReference != null) { // ignore those which cannot be annotated
+				exceptionLabel.exceptionTypeReference.getAllAnnotationContexts(AnnotationTargetTypeConstants.EXCEPTION_PARAMETER, tableIndex + localCount, allTypeAnnotationContexts);
+			}
+			tableIndex++;
+		}
+		return localCount;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
index 85ae279..a177713 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/Opcodes.java
@@ -1,12 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     
+ *     Jesper S Moller - Contributions for
+ *							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335    
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.codegen;
 
@@ -198,6 +205,7 @@
 	public static final byte OPC_invokespecial = (byte) 183;
 	public static final byte OPC_invokestatic = (byte) 184;
 	public static final byte OPC_invokeinterface = (byte) 185;
+	public static final byte OPC_invokedynamic = (byte) 186;
 	public static final byte OPC_new = (byte) 187;
 	public static final byte OPC_newarray = (byte) 188;
 	public static final byte OPC_anewarray = (byte) 189;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
new file mode 100644
index 0000000..e5342e9
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/codegen/TypeAnnotationCodeStream.java
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409247 - [1.8][compiler] Verify error with code allocating multidimensional array
+ *                          Bug 409517 - [1.8][compiler] Type annotation problems on more elaborate array references
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.codegen;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.internal.compiler.ClassFile;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
+import org.eclipse.jdt.internal.compiler.ast.ArrayAllocationExpression;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
+
+public class TypeAnnotationCodeStream extends StackMapFrameCodeStream {
+	public List allTypeAnnotationContexts;
+
+	public TypeAnnotationCodeStream(ClassFile givenClassFile) {
+		super(givenClassFile);
+		this.generateAttributes |= ClassFileConstants.ATTR_TYPE_ANNOTATION;
+		this.allTypeAnnotationContexts = new ArrayList();
+	}
+	
+	private void addAnnotationContext(TypeReference typeReference, int info, int targetType, ArrayAllocationExpression allocationExpression) {
+		allocationExpression.getAllAnnotationContexts(targetType, info, this.allTypeAnnotationContexts);
+	}
+	
+	private void addAnnotationContext(TypeReference typeReference, int info, int targetType) {
+		typeReference.getAllAnnotationContexts(targetType, info, this.allTypeAnnotationContexts);
+	}
+
+	private void addAnnotationContext(TypeReference typeReference, int info, int typeIndex, int targetType) {
+		typeReference.getAllAnnotationContexts(targetType, info, typeIndex, this.allTypeAnnotationContexts);
+	}
+	
+	public void instance_of(TypeReference typeReference, TypeBinding typeBinding) {
+		if (typeReference != null && (typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+			addAnnotationContext(typeReference, this.position, AnnotationTargetTypeConstants.INSTANCEOF);
+		}
+		super.instance_of(typeReference, typeBinding);
+	}
+	
+	public void multianewarray(
+			TypeReference typeReference,
+			TypeBinding typeBinding,
+			int dimensions,
+			ArrayAllocationExpression allocationExpression) {
+		if (typeReference != null && (typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+			addAnnotationContext(typeReference, this.position, AnnotationTargetTypeConstants.NEW, allocationExpression);
+		}
+		super.multianewarray(typeReference, typeBinding, dimensions, allocationExpression);
+	}
+
+	public void new_(TypeReference typeReference, TypeBinding typeBinding) {
+		if (typeReference != null && (typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+			addAnnotationContext(typeReference, this.position, AnnotationTargetTypeConstants.NEW);
+		}
+		super.new_(typeReference, typeBinding);
+	}
+	
+	public void newArray(TypeReference typeReference, ArrayAllocationExpression allocationExpression, ArrayBinding arrayBinding) {
+		if (typeReference != null && (typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+			addAnnotationContext(typeReference, this.position, AnnotationTargetTypeConstants.NEW, allocationExpression);
+		}
+		super.newArray(typeReference, allocationExpression, arrayBinding);
+	}
+	
+	public void checkcast(TypeReference typeReference, TypeBinding typeBinding) {
+		if (typeReference != null && (typeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+			addAnnotationContext(typeReference, this.position, AnnotationTargetTypeConstants.CAST);
+		}
+		super.checkcast(typeReference, typeBinding);
+	}
+	
+	public void invoke(byte opcode, MethodBinding methodBinding, TypeBinding declaringClass, TypeReference[] typeArguments) {
+		if (typeArguments != null) {
+			int targetType = methodBinding.isConstructor()
+					? AnnotationTargetTypeConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT
+					: AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT;
+			for (int i = 0, max = typeArguments.length; i < max; i++) {
+				TypeReference typeArgument = typeArguments[i];
+				if ((typeArgument.bits & ASTNode.HasTypeAnnotations) != 0) {
+					addAnnotationContext(typeArgument, this.position, i, targetType);
+				}
+			}
+		}
+		super.invoke(opcode, methodBinding, declaringClass, typeArguments);
+	}
+	
+	public void invokeDynamic(int bootStrapIndex, int argsSize, int returnTypeSize, char[] selector, char[] signature, 
+			boolean isConstructorReference, TypeReference lhsTypeReference, TypeReference [] typeArguments) {
+		if (lhsTypeReference != null && (lhsTypeReference.bits & ASTNode.HasTypeAnnotations) != 0) {
+			if (isConstructorReference) {
+				addAnnotationContext(lhsTypeReference, this.position, 0, AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE);
+			} else {
+				addAnnotationContext(lhsTypeReference, this.position, 0, AnnotationTargetTypeConstants.METHOD_REFERENCE);
+			}
+		}
+		if (typeArguments != null) {
+			int targetType = 
+					isConstructorReference
+					? AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT
+					: AnnotationTargetTypeConstants.METHOD_REFERENCE_TYPE_ARGUMENT;
+			for (int i = 0, max = typeArguments.length; i < max; i++) {
+				TypeReference typeArgument = typeArguments[i];
+				if ((typeArgument.bits & ASTNode.HasTypeAnnotations) != 0) {
+					addAnnotationContext(typeArgument, this.position, i, targetType);
+				}
+			}
+		}
+		super.invokeDynamic(bootStrapIndex, argsSize, returnTypeSize, selector, signature, isConstructorReference, lhsTypeReference, typeArguments);
+	}
+
+	public void reset(ClassFile givenClassFile) {
+		super.reset(givenClassFile);
+		this.allTypeAnnotationContexts = new ArrayList();
+	}
+	
+	public void init(ClassFile targetClassFile) {
+		super.init(targetClassFile);
+		this.allTypeAnnotationContexts = new ArrayList();
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryField.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryField.java
index 4e9b566..e22bf69 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryField.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryField.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *         Bug 407191 - [1.8] Binary access support for type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.env;
 
@@ -19,6 +25,11 @@
 IBinaryAnnotation[] getAnnotations();
 
 /**
+ * Answer the runtime visible and invisible type annotations for this field or null if none.
+ */
+IBinaryTypeAnnotation[] getTypeAnnotations();
+
+/**
  *
  * @return org.eclipse.jdt.internal.compiler.Constant
  */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java
index 177ae24..be7aa90 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryMethod.java
@@ -1,13 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *         Bug 407191 - [1.8] Binary access support for type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.env;
 
@@ -89,4 +95,9 @@
  * Answer whether the receiver represents a class initializer method.
  */
 boolean isClinit();
+
+/**
+ * Answer the type annotations on this method.
+ */
+IBinaryTypeAnnotation[] getTypeAnnotations();
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java
index 7424325..7c9eade 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryType.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *         bug 407191 - [1.8] Binary access support for type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.env;
 
@@ -23,6 +29,13 @@
  */
 
 IBinaryAnnotation[] getAnnotations();
+
+/**
+ * Answer the runtime visible and invisible type annotations for this type or null if none.
+ */
+
+IBinaryTypeAnnotation[] getTypeAnnotations();
+
 /**
  * Answer the enclosing method (including method selector and method descriptor), or
  * null if none.
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java
new file mode 100644
index 0000000..c0595b2
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/env/IBinaryTypeAnnotation.java
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2013 GoPivotal, Inc. All Rights Reserved.
+ * 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *          Bug 407191 - [1.8] Binary access support for type annotations
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.env;
+
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
+
+/**
+ * This represents class file information about an annotation instance.
+ */
+public interface IBinaryTypeAnnotation {
+	
+	static int[] NO_TYPE_PATH = new int[0];
+
+/**
+ * @return the annotation
+ */
+IBinaryAnnotation getAnnotation();
+
+/**
+ * @return the target type, according to the constants in {@link AnnotationTargetTypeConstants}
+ */
+int getTargetType();
+
+/**
+ * 
+ * @return the raw type path data, each pair of ints is a type path entry
+ */
+int[] getTypePath();
+
+/**
+ * Applicable for target type 0x10(CLASS_EXTENDS)
+ * 
+ * @return the supertype index. -1 (65535) for superclass, 0..n for superinterfaces
+ */
+int getSupertypeIndex();
+
+/**
+ * Applicable for target type 0x00(CLASS_TYPE_PARAMETER), 0x01(METHOD_TYPE_PARAMETER)
+ * 
+ * @return the type parameter index (0 based)
+ */
+int getTypeParameterIndex();
+
+/**
+ * Applicable for target type 0x11(CLASS_TYPE_PARAMETER_BOUND), 0x12(METHOD_TYPE_PARAMETER_BOUND)
+ * 
+ * @return the bound index
+ */
+int getBoundIndex();
+
+/**
+ * Applicable for target type 0x16(METHOD_FORMAL_PARAMETER)
+ * 
+ * @return the method formal parameter index
+ */
+int getMethodFormalParameterIndex();
+
+/**
+ * Applicable for target type 0x17(THROWS)
+ * 
+ * @return the throws type index
+ */
+int getThrowsTypeIndex();
+
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java
index d860a8d..44d19f6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/ExceptionHandlingFlowContext.java
@@ -148,7 +148,7 @@
 		int index = this.indexes.get(this.handledExceptions[i]);
 		if ((this.isReached[index / ExceptionHandlingFlowContext.BitCacheSize] & 1 << (index % ExceptionHandlingFlowContext.BitCacheSize)) == 0) {
 			for (int j = 0; j < docCommentReferencesLength; j++) {
-				if (docCommentReferences[j] == this.handledExceptions[i]) {
+				if (TypeBinding.equalsEquals(docCommentReferences[j], this.handledExceptions[i])) {
 					continue nextHandledException;
 				}
 			}
@@ -193,7 +193,7 @@
 		TypeReference[] typeRefs = ((UnionTypeReference)node).typeReferences;
 		for (int i = 0, len = typeRefs.length; i < len; i++) {
 			TypeReference typeRef = typeRefs[i];
-			if (typeRef.resolvedType == this.handledExceptions[index]) return typeRef;
+			if (TypeBinding.equalsEquals(typeRef.resolvedType, this.handledExceptions[index])) return typeRef;
 		}	
 	} 
 	return node;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
index d918879..b9cf625 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -15,6 +19,8 @@
  *								bug 385626 - @NonNull fails across loop boundaries
  *								bug 388996 - [compiler][resource] Incorrect 'potential resource leak'
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
+ *     Jesper S Moller - Contributions for
+ *								bug 404657 - [1.8][compiler] Analysis for effectively final variables fails to consider loops
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
@@ -25,6 +31,7 @@
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
@@ -77,10 +84,13 @@
 		} else {
 			// final local variable
 			if (flowInfo.isPotentiallyAssigned((LocalVariableBinding)variable)) {
-				complained = true;
-				scope.problemReporter().duplicateInitializationOfFinalLocal(
-					(LocalVariableBinding) variable,
-					this.finalAssignments[i]);
+				variable.tagBits &= ~TagBits.IsEffectivelyFinal;
+				if (variable.isFinal()) {
+					complained = true;
+					scope.problemReporter().duplicateInitializationOfFinalLocal(
+						(LocalVariableBinding) variable,
+						this.finalAssignments[i]);
+				}
 			}
 		}
 		// any reference reported at this level is removed from the parent context
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
index 5ae2b8b..aea95e1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -28,6 +32,7 @@
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.FakedTrackingVariable;
 import org.eclipse.jdt.internal.compiler.ast.LabeledStatement;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
 import org.eclipse.jdt.internal.compiler.ast.Reference;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
 import org.eclipse.jdt.internal.compiler.ast.SubRoutineStatement;
@@ -472,7 +477,7 @@
 		if ((exception = raisedExceptions[i]) != null) {
 			// only one complaint if same exception declared to be thrown more than once
 			for (int j = 0; j < i; j++) {
-				if (raisedExceptions[j] == exception) continue nextReport; // already reported
+				if (TypeBinding.equalsEquals(raisedExceptions[j], exception)) continue nextReport; // already reported
 			}
 			scope.problemReporter().unhandledException(exception, location);
 		}
@@ -489,7 +494,7 @@
 	do {
 		if (current instanceof InitializationFlowContext) {
 			InitializationFlowContext initializationContext = (InitializationFlowContext) current;
-			if (((TypeDeclaration)initializationContext.associatedNode).binding == declaringType) {
+			if (TypeBinding.equalsEquals(((TypeDeclaration)initializationContext.associatedNode).binding, declaringType)) {
 				return inits;
 			}
 			inits = initializationContext.initsBeforeContext;
@@ -609,7 +614,7 @@
  * or null if no such parent exists. 
  */
 public FlowContext getLocalParent() {
-	if (this.associatedNode instanceof AbstractMethodDeclaration || this.associatedNode instanceof TypeDeclaration)
+	if (this.associatedNode instanceof AbstractMethodDeclaration || this.associatedNode instanceof TypeDeclaration || this.associatedNode instanceof LambdaExpression)
 		return null;
 	return this.parent;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
index c7cbf57..68bb509 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: FlowInfo.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -14,6 +17,7 @@
  *			     				bug 292478 - Report potentially null across variable assignment
  *     							bug 332637 - Dead Code detection removing code that isn't dead
  *								bug 394768 - [compiler][resource] Incorrect resource leak warning when creating stream in conditional
+ *								Bug 411964 - [1.8][null] leverage null type annotation in foreach statement
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
@@ -21,6 +25,7 @@
 import org.eclipse.jdt.internal.compiler.ast.IfStatement;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
 import org.eclipse.objectteams.otdt.internal.core.compiler.ast.BaseCallTrackingVariable;
 
 /**
@@ -676,6 +681,18 @@
  */
 abstract public void resetAssignmentInfo(LocalVariableBinding local);
 
+/**
+ * Check whether 'tagBits' contains either {@link TagBits#AnnotationNonNull} or {@link TagBits#AnnotationNullable},
+ * and answer the corresponding null status ({@link #NON_NULL} etc.).
+ */
+public static int tagBitsToNullStatus(long tagBits) {
+	if ((tagBits & TagBits.AnnotationNonNull) != 0)
+		return NON_NULL;
+	if ((tagBits & TagBits.AnnotationNullable) != 0)
+		return POTENTIALLY_NULL | POTENTIALLY_NON_NULL;
+	return UNKNOWN;
+}
+
 //{ObjectTeams:
 public boolean isDefinitelyAssigned(BaseCallTrackingVariable baseCallTrackingVariable)
 {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
index 22cf760..aa42b00 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - contributions for
@@ -19,6 +23,8 @@
  *								bug 403147 - [compiler][null] FUP of bug 400761: consolidate interaction between unboxing, NPE, and deferred checking
  *								bug 406384 - Internal error with I20130413
  *								Bug 415413 - [compiler][null] NullpointerException in Null Analysis caused by interaction of LoopingFlowContext and FinallyFlowContext
+ *     Jesper S Moller - contributions for
+ *								bug 404657 - [1.8][compiler] Analysis for effectively final variables fails to consider loops
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.flow;
 
@@ -34,6 +40,7 @@
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Scope;
+import org.eclipse.jdt.internal.compiler.lookup.TagBits;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 import org.eclipse.jdt.internal.compiler.lookup.VariableBinding;
@@ -121,10 +128,13 @@
 			}
 		} else {
 			if (flowInfo.isPotentiallyAssigned((LocalVariableBinding)variable)) {
-				complained = true;
-				scope.problemReporter().duplicateInitializationOfFinalLocal(
-					(LocalVariableBinding) variable,
-					this.finalAssignments[i]);
+				variable.tagBits &= ~TagBits.IsEffectivelyFinal;
+				if (variable.isFinal()) {
+					complained = true;
+					scope.problemReporter().duplicateInitializationOfFinalLocal(
+						(LocalVariableBinding) variable,
+						this.finalAssignments[i]);
+				}
 			}
 		}
 		// any reference reported at this level is removed from the parent context where it
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
index 2cae1d9..bb0f017 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
@@ -23,6 +27,7 @@
  *								bug 383368 - [compiler][null] syntactic null analysis for field references
  *     Jesper Steen Moller - Contributions for
  *								bug 404146 - [1.7][compiler] nested try-catch-finally-blocks leads to unrunnable Java byte code
+ *								bug 407297 - [1.8][compiler] Control generation of parameter names by option
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.impl;
 
@@ -56,6 +61,7 @@
 	public static final String OPTION_LineNumberAttribute = "org.eclipse.jdt.core.compiler.debug.lineNumber"; //$NON-NLS-1$
 	public static final String OPTION_SourceFileAttribute = "org.eclipse.jdt.core.compiler.debug.sourceFile"; //$NON-NLS-1$
 	public static final String OPTION_PreserveUnusedLocal = "org.eclipse.jdt.core.compiler.codegen.unusedLocal"; //$NON-NLS-1$
+	public static final String OPTION_MethodParametersAttribute = "org.eclipse.jdt.core.compiler.codegen.methodParameters"; //$NON-NLS-1$
 	public static final String OPTION_DocCommentSupport= "org.eclipse.jdt.core.compiler.doc.comment.support"; //$NON-NLS-1$
 	public static final String OPTION_ReportMethodWithConstructorName = "org.eclipse.jdt.core.compiler.problem.methodWithConstructorName"; //$NON-NLS-1$
 	public static final String OPTION_ReportOverridingPackageDefaultMethod = "org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod"; //$NON-NLS-1$
@@ -149,6 +155,8 @@
 	public static final String OPTION_ReportOverridingMethodWithoutSuperInvocation =  "org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation"; //$NON-NLS-1$
 	public static final String OPTION_GenerateClassFiles = "org.eclipse.jdt.core.compiler.generateClassFiles"; //$NON-NLS-1$
 	public static final String OPTION_Process_Annotations = "org.eclipse.jdt.core.compiler.processAnnotations"; //$NON-NLS-1$
+	// OPTION_Store_Annotations: undocumented option for testing purposes
+	public static final String OPTION_Store_Annotations = "org.eclipse.jdt.core.compiler.storeAnnotations"; //$NON-NLS-1$
 	public static final String OPTION_ReportRedundantSuperinterface =  "org.eclipse.jdt.core.compiler.problem.redundantSuperinterface"; //$NON-NLS-1$
 	public static final String OPTION_ReportComparingIdentical =  "org.eclipse.jdt.core.compiler.problem.comparingIdentical"; //$NON-NLS-1$
 	public static final String OPTION_ReportMissingSynchronizedOnInheritedMethod =  "org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod"; //$NON-NLS-1$
@@ -266,6 +274,7 @@
 	public static final String VERSION_1_5 = "1.5"; //$NON-NLS-1$
 	public static final String VERSION_1_6 = "1.6"; //$NON-NLS-1$
 	public static final String VERSION_1_7 = "1.7"; //$NON-NLS-1$
+	public static final String VERSION_1_8 = "1.8"; //$NON-NLS-1$
 	public static final String ERROR = "error"; //$NON-NLS-1$
 	public static final String WARNING = "warning"; //$NON-NLS-1$
 	public static final String IGNORE = "ignore"; //$NON-NLS-1$
@@ -408,6 +417,8 @@
 	
 	/** Classfile debug information, may contain source file name, line numbers, local variable tables, etc... */
 	public int produceDebugAttributes; 
+	/** Classfile method patameters information as per JEP 118... */
+	public boolean produceMethodParameters; 
 	/** Compliance level for the compiler, refers to a JDK version, e.g. {@link ClassFileConstants#JDK1_4} */
 	public long complianceLevel;
 	/** Original compliance level for the compiler, refers to a JDK version, e.g. {@link ClassFileConstants#JDK1_4},
@@ -871,6 +882,10 @@
 				if (jdkLevel == ClassFileConstants.JDK1_7)
 					return VERSION_1_7;
 				break;
+			case ClassFileConstants.MAJOR_VERSION_1_8 :
+				if (jdkLevel == ClassFileConstants.JDK1_8)
+					return VERSION_1_8;
+				break;
 		}
 		return Util.EMPTY_STRING; // unknown version
 	}
@@ -895,6 +910,8 @@
 						return ClassFileConstants.JDK1_6;
 					case '7':
 						return ClassFileConstants.JDK1_7;
+					case '8':
+						return ClassFileConstants.JDK1_8;
 					default:
 						return 0; // unknown
 				}
@@ -1322,6 +1339,7 @@
 		optionsMap.put(OPTION_LocalVariableAttribute, (this.produceDebugAttributes & ClassFileConstants.ATTR_VARS) != 0 ? GENERATE : DO_NOT_GENERATE);
 		optionsMap.put(OPTION_LineNumberAttribute, (this.produceDebugAttributes & ClassFileConstants.ATTR_LINES) != 0 ? GENERATE : DO_NOT_GENERATE);
 		optionsMap.put(OPTION_SourceFileAttribute, (this.produceDebugAttributes & ClassFileConstants.ATTR_SOURCE) != 0 ? GENERATE : DO_NOT_GENERATE);
+		optionsMap.put(OPTION_MethodParametersAttribute, this.produceMethodParameters ? GENERATE : DO_NOT_GENERATE);
 		optionsMap.put(OPTION_PreserveUnusedLocal, this.preserveAllLocalVariables ? PRESERVE : OPTIMIZE_OUT);
 		optionsMap.put(OPTION_DocCommentSupport, this.docCommentSupport ? ENABLED : DISABLED);
 		optionsMap.put(OPTION_ReportMethodWithConstructorName, getSeverityString(MethodWithConstructorName));
@@ -1417,6 +1435,7 @@
 		optionsMap.put(OPTION_ReportOverridingMethodWithoutSuperInvocation, getSeverityString(OverridingMethodWithoutSuperInvocation));
 		optionsMap.put(OPTION_GenerateClassFiles, this.generateClassFiles ? ENABLED : DISABLED);
 		optionsMap.put(OPTION_Process_Annotations, this.processAnnotations ? ENABLED : DISABLED);
+		optionsMap.put(OPTION_Store_Annotations, this.storeAnnotations ? ENABLED : DISABLED);
 		optionsMap.put(OPTION_ReportRedundantSuperinterface, getSeverityString(RedundantSuperinterface));
 		optionsMap.put(OPTION_ReportComparingIdentical, getSeverityString(ComparingIdentical));
 		optionsMap.put(OPTION_ReportMissingSynchronizedOnInheritedMethod, getSeverityString(MissingSynchronizedModifierInInheritedMethod));
@@ -1540,6 +1559,8 @@
 
 		// indicates if unused/optimizable local variables need to be preserved (debugging purpose)
 		this.preserveAllLocalVariables = false;
+		
+		this.produceMethodParameters = false;
 
 		// indicates whether literal expressions are inlined at parse-time or not
 		this.parseLiteralExpressionsAsConstants = true;
@@ -1837,6 +1858,13 @@
 				this.shareCommonFinallyBlocks = false;
 			}
 		}
+		if ((optionValue = optionsMap.get(OPTION_MethodParametersAttribute)) != null) {
+			if (GENERATE.equals(optionValue)) {
+				this.produceMethodParameters = true;
+			} else if (DO_NOT_GENERATE.equals(optionValue)) {
+				this.produceMethodParameters = false;
+			}
+		}
 		if ((optionValue = optionsMap.get(OPTION_SuppressWarnings)) != null) {
 			if (ENABLED.equals(optionValue)) {
 				this.suppressWarnings = true;
@@ -2002,6 +2030,7 @@
 			this.isAnnotationBasedNullAnalysisEnabled = ENABLED.equals(optionValue);
 		}
 		if (this.isAnnotationBasedNullAnalysisEnabled) {
+			this.storeAnnotations = true;
 			if ((optionValue = optionsMap.get(OPTION_ReportNullSpecViolation)) != null) {
 				if (ERROR.equals(optionValue)) {
 					this.errorThreshold.set(NullSpecViolation);
@@ -2142,7 +2171,16 @@
 				this.storeAnnotations = true; // annotation processing requires annotation to be stored
 			} else if (DISABLED.equals(optionValue)) {
 				this.processAnnotations = false;
-				this.storeAnnotations = false;
+				if (!this.isAnnotationBasedNullAnalysisEnabled)
+					this.storeAnnotations = false;
+			}
+		}
+		if ((optionValue = optionsMap.get(OPTION_Store_Annotations)) != null) {
+			if (ENABLED.equals(optionValue)) {
+				this.storeAnnotations = true;
+			} else if (DISABLED.equals(optionValue)) {
+				if (!this.isAnnotationBasedNullAnalysisEnabled && !this.processAnnotations)
+					this.storeAnnotations = false;
 			}
 		}
 		if ((optionValue = optionsMap.get(OPTION_ReportUninternedIdentityComparison)) != null) {
@@ -2158,6 +2196,7 @@
 		buf.append("\n\t- local variables debug attributes: ").append((this.produceDebugAttributes & ClassFileConstants.ATTR_VARS) != 0 ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		buf.append("\n\t- line number debug attributes: ").append((this.produceDebugAttributes & ClassFileConstants.ATTR_LINES) != 0 ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		buf.append("\n\t- source debug attributes: ").append((this.produceDebugAttributes & ClassFileConstants.ATTR_SOURCE) != 0 ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		buf.append("\n\t- MethodParameters attributes: ").append(this.produceMethodParameters ? GENERATE : DO_NOT_GENERATE); //$NON-NLS-1$
 		buf.append("\n\t- preserve all local variables: ").append(this.preserveAllLocalVariables ? "ON" : " OFF"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
 		buf.append("\n\t- method with constructor name: ").append(getSeverityString(MethodWithConstructorName)); //$NON-NLS-1$
 		buf.append("\n\t- overridden package default method: ").append(getSeverityString(OverriddenPackageDefaultMethod)); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java
index f1bc1c3..34f2e86 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/ReferenceContext.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: ReferenceContext.java 19873 2009-04-13 16:51:05Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -16,7 +20,7 @@
 /*
  * Implementors are valid compilation contexts from which we can
  * escape in case of error:
- *	For example: method, type or compilation unit.
+ * For example: method, type, compilation unit or a lambda expression.
  */
 
 import org.eclipse.jdt.core.compiler.CategorizedProblem;
@@ -34,6 +38,9 @@
 	boolean hasErrors();
 
 	void tagAsHavingErrors();
+	
+	void tagAsHavingIgnoredMandatoryErrors(int problemId);
+
 //{ObjectTeams: some errors will have to be removed
 	void resetErrorFlag();
 // SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java
new file mode 100644
index 0000000..5575ba7
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotatableTypeSystem.java
@@ -0,0 +1,459 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.lookup;
+
+import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.util.Util;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
+
+/* AnnotatableTypeSystem: Keep track of annotated types so as to provide unique bindings for identically annotated versions identical underlying "naked" types.
+   As of now, we ensure uniqueness only for marker annotated types and for others that default to all default attribute values, i.e two instances of @NonNull String 
+   would have the same binding, while @T(1) X and @T(2) X will not. Binding uniqueness is only a memory optimization and is not essential for correctness of compilation. 
+   Various subsystems should expect to determine binding identity/equality by calling TypeBinding.equalsEquals and not by using == operator.
+ 	
+   ATS is AnnotatableTypeSystem and not AnnotatedTypeSystem, various methods may actually return unannotated types if the input arguments do not specify any annotations 
+   and component types of the composite type being constructed are themselves also unannotated. We rely on the master type table maintained by TypeSystem and use 
+   getDerivedTypes() and cacheDerivedType() to get/put.
+*/
+
+public class AnnotatableTypeSystem extends TypeSystem {
+
+	private LookupEnvironment environment;
+	private boolean isAnnotationBasedNullAnalysisEnabled;
+	
+	public AnnotatableTypeSystem(LookupEnvironment environment) {
+		super(environment);
+		this.environment = environment;
+		this.isAnnotationBasedNullAnalysisEnabled = environment.globalOptions.isAnnotationBasedNullAnalysisEnabled;
+	}
+	
+	// Given a type, return all its annotated variants: parameter may be annotated.
+	public TypeBinding[] getAnnotatedTypes(TypeBinding type) {
+		
+		TypeBinding[] derivedTypes = getDerivedTypes(type);
+		final int length = derivedTypes.length;
+		TypeBinding [] annotatedVersions = new TypeBinding[length];
+		int versions = 0;
+		for (int i = 0; i < length; i++) {
+			final TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null)
+				break;
+			if (!derivedType.hasTypeAnnotations())
+				continue;
+			if (derivedType.id == type.id)
+				annotatedVersions[versions++] = derivedType;
+		}
+		
+		if (versions != length)
+			System.arraycopy(annotatedVersions, 0, annotatedVersions = new TypeBinding[versions], 0, versions);
+		return annotatedVersions;
+	}
+	
+	/* This method replaces the version that used to sit in LE. The parameter `annotations' is a flattened sequence of annotations, 
+	   where each dimension's annotations end with a sentinel null. Leaf type can be an already annotated type.
+	*/
+	public ArrayBinding getArrayType(TypeBinding leafType, int dimensions, AnnotationBinding [] annotations) {
+		
+		ArrayBinding nakedType = null;
+		TypeBinding[] derivedTypes = getDerivedTypes(leafType);
+		for (int i = 0, length = derivedTypes.length; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) break;
+			if (!derivedType.isArrayType() || derivedType.dimensions() != dimensions || derivedType.leafComponentType() != leafType) //$IDENTITY-COMPARISON$
+				continue;
+			if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations)) 
+				return (ArrayBinding) derivedType;
+			if (!derivedType.hasTypeAnnotations())
+				nakedType = (ArrayBinding) derivedType;
+		}
+		if (nakedType == null)
+			nakedType = super.getArrayType(leafType, dimensions);
+		
+		if (!haveTypeAnnotations(leafType, annotations))
+			return nakedType;
+
+		ArrayBinding arrayType = new ArrayBinding(leafType, dimensions, this.environment);
+		arrayType.id = nakedType.id;
+		arrayType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
+		return (ArrayBinding) cacheDerivedType(leafType, nakedType, arrayType);
+	}
+
+	public ArrayBinding getArrayType(TypeBinding leaftType, int dimensions) {
+		return getArrayType(leaftType, dimensions, Binding.NO_ANNOTATIONS);
+	}
+
+	public ReferenceBinding getMemberType(ReferenceBinding memberType, ReferenceBinding enclosingType) {
+		if (!haveTypeAnnotations(memberType, enclosingType))
+			return super.getMemberType(memberType, enclosingType);
+		return (ReferenceBinding) getAnnotatedType(memberType, enclosingType, memberType.getTypeAnnotations());
+	}
+	
+//{ObjectTeams: more arguments for role types:
+/* orig:
+	public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) {
+  :giro */
+	public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments,
+			ITeamAnchor teamAnchor, int valueParamPosition, ReferenceBinding enclosingType, AnnotationBinding [] annotations) {
+		if (teamAnchor == null && genericType instanceof DependentTypeBinding)
+			teamAnchor = ((DependentTypeBinding) genericType)._teamAnchor;
+// SH}
+		
+		if (genericType.hasTypeAnnotations())   // @NonNull (List<String>) and not (@NonNull List)<String>
+			throw new IllegalStateException();
+
+		ParameterizedTypeBinding nakedType = null;
+		TypeBinding[] derivedTypes = getDerivedTypes(genericType);
+		for (int i = 0, length = derivedTypes.length; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null)
+				break;
+//{ObjectTeams: parameterized and/or anchored?
+/* orig:
+			if (!derivedType.isParameterizedType() || derivedType.actualType() != genericType) //$IDENTITY-COMPARISON$
+				continue;
+  :giro */
+			if (!(derivedType instanceof ParameterizedTypeBinding)) // roles might answer 'false' to isParameterized(), still they are valid candidates, here
+				continue;
+			if (derivedType.actualType() != genericType) //$IDENTITY-COMPARISON$
+				continue;
+			if (derivedType.isRawType() && typeArguments != null)
+				continue;
+			// also match team anchor if given:
+			if (!isRoleTypeMatch(teamAnchor, valueParamPosition, derivedType))
+				continue;
+//SH}
+			if (derivedType.enclosingType() != enclosingType || !Util.effectivelyEqual(derivedType.typeArguments(), typeArguments)) //$IDENTITY-COMPARISON$
+				continue;
+			if (Util.effectivelyEqual(annotations, derivedType.getTypeAnnotations()))
+				return (ParameterizedTypeBinding) derivedType;
+			if (!derivedType.hasTypeAnnotations())
+				nakedType = (ParameterizedTypeBinding) derivedType;
+		}
+		if (nakedType == null)
+//{ObjectTeams: all parameters:
+/* orig:
+			nakedType = super.getParameterizedType(genericType, typeArguments, enclosingType);
+  :orig */
+			nakedType = super.getParameterizedType(genericType, typeArguments, teamAnchor, valueParamPosition, enclosingType);
+// SH}
+		
+		if (!haveTypeAnnotations(genericType, enclosingType, typeArguments, annotations))
+			return nakedType;
+		
+//{ObjectTeams: dependent type?
+/* orig:	
+		TypeBinding parameterizedType = new ParameterizedTypeBinding(genericType, typeArguments, enclosingType, this.environment);
+  :giro */
+		ParameterizedTypeBinding parameterizedType;
+		if (teamAnchor == null) {
+			parameterizedType = new ParameterizedTypeBinding(genericType,typeArguments, enclosingType, this.environment);
+		} else {
+			if (genericType.isRole()) {
+				parameterizedType = new RoleTypeBinding(genericType, typeArguments, teamAnchor, enclosingType, this.environment);
+			} else {
+				parameterizedType = new DependentTypeBinding(genericType, typeArguments, teamAnchor, valueParamPosition, enclosingType, this.environment);
+			}
+		}
+// SH}
+		parameterizedType.id = nakedType.id;
+		parameterizedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
+		return (ParameterizedTypeBinding) cacheDerivedType(genericType, nakedType, parameterizedType);
+	}
+	
+	public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
+//{ObjectTeams: more args (default values):
+/*orig:
+		return getParameterizedType(genericType, typeArguments, enclosingType, Binding.NO_ANNOTATIONS);
+  :giro */
+		return getParameterizedType(genericType, typeArguments, null, -1, enclosingType, Binding.NO_ANNOTATIONS);
+// SH}
+	}
+
+	public RawTypeBinding getRawType(ReferenceBinding genericType, ReferenceBinding enclosingType, AnnotationBinding [] annotations) {
+		
+		if (genericType.hasTypeAnnotations())
+			throw new IllegalStateException();
+		
+		RawTypeBinding nakedType = null;
+		TypeBinding[] derivedTypes = getDerivedTypes(genericType);
+		for (int i = 0, length = derivedTypes.length; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null)
+				break;
+			if (!derivedType.isRawType() || derivedType.actualType() != genericType || derivedType.enclosingType() != enclosingType) //$IDENTITY-COMPARISON$
+				continue;
+			if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations))
+				return (RawTypeBinding) derivedType;
+			if (!derivedType.hasTypeAnnotations())
+				nakedType = (RawTypeBinding) derivedType;
+		}
+		if (nakedType == null)
+			nakedType = super.getRawType(genericType, enclosingType);
+		
+		if (!haveTypeAnnotations(genericType, enclosingType, null, annotations))
+			return nakedType;
+	
+		RawTypeBinding rawType = new RawTypeBinding(genericType, enclosingType, this.environment);
+		rawType.id = nakedType.id;
+		rawType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
+		return (RawTypeBinding) cacheDerivedType(genericType, nakedType, rawType);
+	}
+	
+	public RawTypeBinding getRawType(ReferenceBinding genericType, ReferenceBinding enclosingType) {
+		return getRawType(genericType, enclosingType, Binding.NO_ANNOTATIONS);
+	}
+	
+	public WildcardBinding getWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind, AnnotationBinding [] annotations) {
+		
+		if (genericType == null) // pseudo wildcard denoting composite bounds for lub computation
+			genericType = ReferenceBinding.LUB_GENERIC;
+
+		if (genericType.hasTypeAnnotations())
+			throw new IllegalStateException();
+		
+		WildcardBinding nakedType = null;
+		TypeBinding[] derivedTypes = getDerivedTypes(genericType);
+		for (int i = 0, length = derivedTypes.length; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) 
+				break;
+			if (!derivedType.isWildcard() || derivedType.actualType() != genericType || derivedType.rank() != rank) //$IDENTITY-COMPARISON$
+				continue;
+			if (derivedType.boundKind() != boundKind || derivedType.bound() != bound || !Util.effectivelyEqual(derivedType.additionalBounds(), otherBounds)) //$IDENTITY-COMPARISON$
+				continue;
+			if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations))
+				return (WildcardBinding) derivedType;
+			if (!derivedType.hasTypeAnnotations())
+				nakedType = (WildcardBinding) derivedType;
+		}
+		
+		if (nakedType == null)
+			nakedType = super.getWildcard(genericType, rank, bound, otherBounds, boundKind);
+		
+		if (!haveTypeAnnotations(genericType, bound, otherBounds, annotations))
+			return nakedType;
+		
+		WildcardBinding wildcard = new WildcardBinding(genericType, rank, bound, otherBounds, boundKind, this.environment);
+		wildcard.id = nakedType.id;
+		wildcard.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
+		return (WildcardBinding) cacheDerivedType(genericType, nakedType, wildcard);
+	}
+
+	public WildcardBinding getWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind) {
+		return getWildcard(genericType, rank, bound, otherBounds, boundKind, Binding.NO_ANNOTATIONS);
+	}
+
+	/* Take a type and apply annotations to various components of it. By construction when we see the type reference @Outer Outer.@Middle Middle.@Inner Inner,
+	   we first construct the binding for Outer.Middle.Inner and then annotate various parts of it. Likewise for PQTR's binding.
+	*/
+	public TypeBinding getAnnotatedType(TypeBinding type, AnnotationBinding[][] annotations) {
+		
+		if (type == null || !type.isValidBinding() || annotations == null || annotations.length == 0)
+			return type;
+		
+		TypeBinding annotatedType = null;
+		switch (type.kind()) {
+			case Binding.ARRAY_TYPE:
+				ArrayBinding arrayBinding = (ArrayBinding) type;
+				annotatedType = getArrayType(arrayBinding.leafComponentType, arrayBinding.dimensions, flattenedAnnotations(annotations));
+				break;
+			case Binding.BASE_TYPE:
+			case Binding.TYPE:
+			case Binding.GENERIC_TYPE:
+			case Binding.PARAMETERIZED_TYPE:
+			case Binding.RAW_TYPE:
+			case Binding.TYPE_PARAMETER:
+			case Binding.WILDCARD_TYPE:
+				/* Taking the binding of QTR as an example, there could be different annotatable components, but we come in a with a single binding, e.g: 
+				   @T Z;                                      type => Z  annotations => [[@T]]
+				   @T Y.@T Z                                  type => Z  annotations => [[@T][@T]]
+				   @T X.@T Y.@T Z                             type => Z  annotations => [[@T][@T][@T]] 
+				   java.lang.@T X.@T Y.@T Z                   type => Z  annotations => [[][][@T][@T][@T]]
+				   in all these cases the incoming type binding is for Z, but annotations are for different levels. We need to align their layout for proper attribution.
+				 */
+				
+				if (type.isUnresolvedType() && CharOperation.indexOf('$', type.sourceName()) > 0)
+				    type = BinaryTypeBinding.resolveType(type, this.environment, true); // must resolve member types before asking for enclosingType
+				
+				int levels = type.depth() + 1;
+				TypeBinding [] types = new TypeBinding[levels];
+				types[--levels] = type;
+				TypeBinding enclosingType = type.enclosingType();
+				while (enclosingType != null) {
+					types[--levels] = enclosingType;
+					enclosingType = enclosingType.enclosingType();
+				}
+				// Locate the outermost type being annotated. Beware annotations.length could be > types.length (for package qualified names in QTR/PQTR)
+				levels = annotations.length;
+				int i, j = types.length - levels;
+				for (i = 0 ; i < levels; i++, j++) {
+					if (annotations[i] != null && annotations[i].length > 0)
+						break;
+				}
+				if (i == levels) // empty annotations array ? 
+					return type;
+				// types[j] is the first component being annotated. Its annotations are annotations[i]
+				for (enclosingType = j == 0 ? null : types[j - 1]; i < levels; i++, j++) {
+					final TypeBinding currentType = types[j];
+					// while handling annotations from SE7 locations, take care not to drop existing annotations.
+					AnnotationBinding [] currentAnnotations = annotations[i] != null && annotations[i].length > 0 ? annotations[i] : currentType.getTypeAnnotations();
+					annotatedType = getAnnotatedType(currentType, enclosingType, currentAnnotations);
+					enclosingType = annotatedType;
+				}
+				break;
+			default:
+				throw new IllegalStateException();
+		}
+		return annotatedType;
+	}
+
+	/* Private subroutine for public APIs. Create an annotated version of the type. To materialize the annotated version, we can't use new since 
+	   this is a general purpose method designed to deal type bindings of all types. "Clone" the incoming type, specializing for any enclosing type 
+	   that may itself be possibly be annotated. This is so the binding for @Outer Outer.Inner != Outer.@Inner Inner != @Outer Outer.@Inner Inner. 
+	   Likewise so the bindings for @Readonly List<@NonNull String> != @Readonly List<@Nullable String> != @Readonly List<@Interned String> 
+	*/
+	private TypeBinding getAnnotatedType(TypeBinding type, TypeBinding enclosingType, AnnotationBinding[] annotations) {
+		TypeBinding nakedType = null;
+		TypeBinding[] derivedTypes = getDerivedTypes(type);
+		for (int i = 0, length = derivedTypes.length; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) break;
+			
+			if (derivedType.enclosingType() != enclosingType || !Util.effectivelyEqual(derivedType.typeArguments(), type.typeArguments())) //$IDENTITY-COMPARISON$
+				continue;
+			
+			switch(type.kind()) {
+				case Binding.ARRAY_TYPE:
+					if (!derivedType.isArrayType() || derivedType.dimensions() != type.dimensions() || derivedType.leafComponentType() != type.leafComponentType()) //$IDENTITY-COMPARISON$
+						continue;
+					break;
+				case Binding.PARAMETERIZED_TYPE:
+					if (!derivedType.isParameterizedType() || derivedType.actualType() != type.actualType()) //$IDENTITY-COMPARISON$
+						continue;
+					break;
+				case Binding.RAW_TYPE:
+					if (!derivedType.isRawType() || derivedType.actualType() != type.actualType()) //$IDENTITY-COMPARISON$
+						continue;
+					break;
+				case Binding.WILDCARD_TYPE:
+					if (!derivedType.isWildcard() || derivedType.actualType() != type.actualType() || derivedType.rank() != type.rank() || derivedType.boundKind() != type.boundKind()) //$IDENTITY-COMPARISON$
+						continue;
+					if (derivedType.bound() != type.bound() || !Util.effectivelyEqual(derivedType.additionalBounds(), type.additionalBounds())) //$IDENTITY-COMPARISON$
+						continue;
+					break;
+				default:
+					switch(derivedType.kind()) {
+						case Binding.ARRAY_TYPE:
+						case Binding.PARAMETERIZED_TYPE:
+						case Binding.RAW_TYPE:
+						case Binding.WILDCARD_TYPE:
+						case Binding.INTERSECTION_CAST_TYPE:
+						case Binding.INTERSECTION_TYPE:
+							continue;
+					}
+					break;
+			}
+			if (Util.effectivelyEqual(derivedType.getTypeAnnotations(), annotations)) {
+				return derivedType;
+			}
+			if (!derivedType.hasTypeAnnotations())
+				nakedType = derivedType;
+		}
+		if (nakedType == null)
+			nakedType = getUnannotatedType(type);
+		
+		if (!haveTypeAnnotations(type, enclosingType, null, annotations))
+			return nakedType;
+		
+		TypeBinding annotatedType = type.clone(enclosingType);
+		annotatedType.id = nakedType.id;
+		annotatedType.setTypeAnnotations(annotations, this.isAnnotationBasedNullAnalysisEnabled);
+		TypeBinding keyType;
+		switch (type.kind()) {
+			case Binding.ARRAY_TYPE:
+				keyType = type.leafComponentType();
+				break;
+			case Binding.PARAMETERIZED_TYPE:
+			case Binding.RAW_TYPE:
+			case Binding.WILDCARD_TYPE:
+				keyType = type.actualType();
+				break;
+			default:
+				keyType = nakedType;
+				break;
+		}
+		return cacheDerivedType(keyType, nakedType, annotatedType);
+	}
+
+	private boolean haveTypeAnnotations(TypeBinding baseType, TypeBinding someType, TypeBinding[] someTypes, AnnotationBinding[] annotations) {
+		if (baseType != null && baseType.hasTypeAnnotations())
+			return true;
+		if (someType != null && someType.hasTypeAnnotations())
+			return true;
+		for (int i = 0, length = annotations == null ? 0 : annotations.length; i < length; i++)
+			if (annotations [i] != null)
+				return true;
+		for (int i = 0, length = someTypes == null ? 0 : someTypes.length; i < length; i++)
+			if (someTypes[i].hasTypeAnnotations())
+				return true;
+		return false;
+	}
+
+	private boolean haveTypeAnnotations(TypeBinding leafType, AnnotationBinding[] annotations) {
+		return haveTypeAnnotations(leafType, null, null, annotations);
+	}
+	
+	private boolean haveTypeAnnotations(TypeBinding memberType, TypeBinding enclosingType) {
+		return haveTypeAnnotations(memberType, enclosingType, null, null);
+	}
+
+	/* Utility method to "flatten" annotations. For multidimensional arrays, we encode the annotations into a flat array 
+	   where a null separates the annotations of dimension n from dimension n - 1 as well as dimenion n + 1. There is a
+	   final null always.
+	*/
+	static AnnotationBinding [] flattenedAnnotations (AnnotationBinding [][] annotations) {
+
+		if (annotations == null || annotations.length == 0)
+			return Binding.NO_ANNOTATIONS;
+
+		int levels = annotations.length;
+		int length = levels;
+		for (int i = 0; i < levels; i++) {
+			length += annotations[i] == null ? 0 : annotations[i].length;
+		}
+		if (length == 0)
+			return Binding.NO_ANNOTATIONS;
+
+		AnnotationBinding[] series = new AnnotationBinding [length];
+		int index = 0;
+		for (int i = 0; i < levels; i++) {
+			final int annotationsLength = annotations[i] == null ? 0 : annotations[i].length;
+			if (annotationsLength > 0) {
+				System.arraycopy(annotations[i], 0, series, index, annotationsLength);
+				index += annotationsLength;
+			}
+			series[index++] = null;
+		}
+		if (index != length)
+			throw new IllegalStateException();
+		return series;
+	}
+
+	public boolean isAnnotatedTypeSystem() {
+		return true;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java
index 038c5ad..578050c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationBinding.java
@@ -1,15 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
+import java.util.Arrays;
+
 import org.eclipse.jdt.internal.compiler.ast.Annotation;
 
 /**
@@ -139,6 +145,11 @@
 		arraysize++;
 	if ((bits & TagBits.AnnotationForType) != 0)
 		arraysize++;
+	if ((bits & TagBits.AnnotationForTypeUse) != 0)
+		arraysize++;
+	if ((bits & TagBits.AnnotationForTypeParameter) != 0)
+		arraysize++;
+	
 	Object[] value = new Object[arraysize];
 	if (arraysize > 0) {
 		ReferenceBinding elementType = env.getResolvedType(TypeConstants.JAVA_LANG_ANNOTATION_ELEMENTTYPE, null);
@@ -159,6 +170,11 @@
 			value[index++] = elementType.getField(TypeConstants.UPPER_PARAMETER, true);
 		if ((bits & TagBits.AnnotationForType) != 0)
 			value[index++] = elementType.getField(TypeConstants.TYPE, true);
+		if ((bits & TagBits.AnnotationForTypeUse) != 0)
+			value[index++] = elementType.getField(TypeConstants.TYPE_USE_TARGET, true);
+		if ((bits & TagBits.AnnotationForTypeParameter) != 0)
+			value[index++] = elementType.getField(TypeConstants.TYPE_PARAMETER_TARGET, true);
+		
 	}
 	return env.createAnnotation(
 			target,
@@ -167,7 +183,7 @@
 			});
 }
 
-AnnotationBinding(ReferenceBinding type, ElementValuePair[] pairs) {
+public AnnotationBinding(ReferenceBinding type, ElementValuePair[] pairs) {
 	this.type = type;
 	this.pairs = pairs;
 }
@@ -195,6 +211,10 @@
 	return this.type;
 }
 
+public void resolve() {
+	// Nothing to do, this is already resolved.
+}
+
 public ElementValuePair[] getElementValuePairs() {
 	return this.pairs;
 }
@@ -223,4 +243,50 @@
 	}
 	return buffer.toString();
 }
+
+public int hashCode() {
+	return this.type.hashCode();
+}
+public boolean equals(Object object) {
+	if (this == object)
+		return true;
+	if (!(object instanceof AnnotationBinding))
+		return false;
+
+	AnnotationBinding that = (AnnotationBinding) object;
+	if (this.getAnnotationType() != that.getAnnotationType()) 
+		return false;
+
+	final ElementValuePair[] thisElementValuePairs = this.getElementValuePairs();
+	final ElementValuePair[] thatElementValuePairs = that.getElementValuePairs();
+	final int length = thisElementValuePairs.length;
+	if (length != thatElementValuePairs.length) 
+		return false;
+	loop: for (int i = 0; i < length; i++) {
+		ElementValuePair thisPair = thisElementValuePairs[i];
+		for (int j = 0; j < length; j++) {
+			ElementValuePair thatPair = thatElementValuePairs[j];
+			if (thisPair.binding == thatPair.binding) {
+				if (thisPair.value == null) {
+					if (thatPair.value == null) {
+						continue loop;
+					}
+					return false;
+				} else {
+					if (thatPair.value == null) return false;
+					if (thatPair.value instanceof Object[] && thisPair.value instanceof Object[]) {
+						if (!Arrays.equals((Object[]) thisPair.value, (Object[]) thatPair.value)) {
+							return false;
+						}
+					} else if (!thatPair.value.equals(thisPair.value)) {
+						return false;
+					}
+				}
+				continue loop;
+			}
+		}
+		return false;
+	}
+	return true;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationHolder.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationHolder.java
index 56f8d96..a68110f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationHolder.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/AnnotationHolder.java
@@ -43,10 +43,9 @@
 	return Binding.NO_ANNOTATIONS;
 }
 AnnotationHolder setAnnotations(AnnotationBinding[] annotations) {
+	this.annotations = annotations;
 	if (annotations == null || annotations.length == 0)
 		return null; // no longer needed
-
-	this.annotations = annotations;
 	return this;
 }
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
index 9e9a2f4..9785fa9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ArrayBinding.java
@@ -1,24 +1,38 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import java.util.List;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.objectteams.otdt.internal.core.compiler.util.TypeAnalyzer;
+import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator.TypeArgumentUpdater;
 
 public final class ArrayBinding extends TypeBinding {
 	// creation and initialization of the length field
@@ -31,6 +45,11 @@
 	char[] constantPoolName;
 	char[] genericTypeSignature;
 
+	// One bitset for each dimension plus one more for the leaf component type at position 'dimensions',
+	// possible bits are TagBits.AnnotationNonNull and TagBits.AnnotationNullable
+	// (only ever set when CompilerOptions.isAnnotationBasedNullAnalysisEnabled == true):
+	public long[] nullTagBitsPerDimension;
+
 public ArrayBinding(TypeBinding type, int dimensions, LookupEnvironment environment) {
 	this.tagBits |= TagBits.IsArrayType;
 	this.leafComponentType = type;
@@ -40,6 +59,12 @@
 		((UnresolvedReferenceBinding) type).addWrapper(this, environment);
 	else
 		this.tagBits |= type.tagBits & (TagBits.HasTypeVariable | TagBits.HasDirectWildcard | TagBits.HasMissingType | TagBits.ContainsNestedTypeReferences);
+	long mask = type.tagBits & TagBits.AnnotationNullMASK;
+	if (mask != 0) {
+		this.nullTagBitsPerDimension = new long[this.dimensions + 1];
+		this.nullTagBitsPerDimension[this.dimensions] = mask;
+		this.tagBits |= TagBits.HasNullTypeAnnotation;
+	}
 }
 
 public TypeBinding closestMatch() {
@@ -74,7 +99,7 @@
 public void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint) {
 
 	if ((this.tagBits & TagBits.HasTypeVariable) == 0) return;
-	if (actualType == TypeBinding.NULL) return;
+	if (actualType == TypeBinding.NULL || actualType.kind() == POLY_TYPE) return;
 
 	switch(actualType.kind()) {
 		case Binding.ARRAY_TYPE :
@@ -117,11 +142,33 @@
 	return this.constantPoolName = CharOperation.concat(brackets, this.leafComponentType.signature());
 }
 public String debugName() {
+	if (this.hasTypeAnnotations())
+		return annotatedDebugName();
 	StringBuffer brackets = new StringBuffer(this.dimensions * 2);
 	for (int i = this.dimensions; --i >= 0;)
 		brackets.append("[]"); //$NON-NLS-1$
 	return this.leafComponentType.debugName() + brackets.toString();
 }
+
+public String annotatedDebugName() {
+	StringBuffer brackets = new StringBuffer(this.dimensions * 2);
+	brackets.append(this.leafComponentType.annotatedDebugName());
+	brackets.append(' ');
+	AnnotationBinding [] annotations = getTypeAnnotations();
+	for (int i = 0, j = -1; i < this.dimensions; i++) {
+		if (annotations != null) {
+			if (i != 0)
+				brackets.append(' ');
+			while (++j < annotations.length && annotations[j] != null) {
+				brackets.append(annotations[j]);
+				brackets.append(' ');
+			}
+		}
+		brackets.append("[]"); //$NON-NLS-1$
+	}
+	return brackets.toString();
+}
+
 public int dimensions() {
 	return this.dimensions;
 }
@@ -132,15 +179,28 @@
 */
 
 public TypeBinding elementsType() {
-	if (this.dimensions == 1) return this.leafComponentType;
-	return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1);
+	
+	if (this.dimensions == 1) 
+		return this.leafComponentType;
+	
+	AnnotationBinding [] oldies = getTypeAnnotations();
+	AnnotationBinding [] newbies = Binding.NO_ANNOTATIONS;
+	
+	for (int i = 0, length = oldies == null ? 0 : oldies.length; i < length; i++) {
+		if (oldies[i] == null) {
+			System.arraycopy(oldies, i+1, newbies = new AnnotationBinding[length - i - 1], 0, length - i - 1);
+			break;
+		}
+	}
+	return this.environment.createArrayType(this.leafComponentType, this.dimensions - 1, newbies);
 }
+
 /**
  * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#erasure()
  */
 public TypeBinding erasure() {
     TypeBinding erasedType = this.leafComponentType.erasure();
-    if (this.leafComponentType != erasedType)
+    if (TypeBinding.notEquals(this.leafComponentType, erasedType))
         return this.environment.createArrayType(erasedType, this.dimensions);
     return this;
 }
@@ -169,7 +229,7 @@
 /* Answer true if the receiver type can be assigned to the argument type (right)
 */
 public boolean isCompatibleWith(TypeBinding otherType, Scope captureScope) {
-	if (this == otherType)
+	if (equalsEquals(this, otherType))
 		return true;
 
 	switch (otherType.kind()) {
@@ -224,6 +284,34 @@
 	return this.leafComponentType;
 }
 
+public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) /* java.lang.Object @o.e.j.a.NonNull[] */ {
+	if (this.nullTagBitsPerDimension == null)
+		return shortNames ? shortReadableName() : readableName();
+	char[][] brackets = new char[this.dimensions][];
+	for (int i = 0; i < this.dimensions; i++) {
+		if ((this.nullTagBitsPerDimension[i] & TagBits.AnnotationNullMASK) != 0) {
+			char[][] fqAnnotationName;
+			if ((this.nullTagBitsPerDimension[i] & TagBits.AnnotationNonNull) != 0)
+				fqAnnotationName = options.nonNullAnnotationName;
+			else
+				fqAnnotationName = options.nullableAnnotationName;
+			char[] annotationName = shortNames 
+										? fqAnnotationName[fqAnnotationName.length-1] 
+										: CharOperation.concatWith(fqAnnotationName, '.');
+			brackets[i] = new char[annotationName.length+3];
+			brackets[i][0] = '@';
+			System.arraycopy(annotationName, 0, brackets[i], 1, annotationName.length);
+			brackets[i][annotationName.length+1] = '[';
+			brackets[i][annotationName.length+2] = ']';
+		} else {
+			brackets[i] = new char[]{'[', ']'}; 
+		}
+	}
+	return CharOperation.concat(this.leafComponentType.nullAnnotatedReadableName(options, shortNames), 
+								 CharOperation.concatWith(brackets, ' '),
+								 ' ');
+}
+
 /* API
 * Answer the problem id associated with the receiver.
 * NoError if the receiver is a valid binding.
@@ -253,6 +341,44 @@
 	}
 	return CharOperation.concat(this.leafComponentType.readableName(), brackets);
 }
+
+public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+	this.tagBits |= TagBits.HasTypeAnnotations;
+	if (annotations == null || annotations.length == 0)
+		return;
+	this.typeAnnotations = annotations;
+	
+	if (evalNullAnnotations) {
+		long nullTagBits = 0;
+		if (this.nullTagBitsPerDimension == null)
+			this.nullTagBitsPerDimension = new long[this.dimensions + 1];
+		
+		int dimension = 0;
+		for (int i = 0, length = annotations.length; i < length; i++) {
+			AnnotationBinding annotation = annotations[i];
+			if (annotation != null) {
+				switch (annotation.type.id) {
+					case TypeIds.T_ConfiguredAnnotationNullable :
+						nullTagBits  |= TagBits.AnnotationNullable;
+						this.tagBits |= TagBits.HasNullTypeAnnotation;
+						break;
+					case TypeIds.T_ConfiguredAnnotationNonNull :
+						nullTagBits  |= TagBits.AnnotationNonNull;
+						this.tagBits |= TagBits.HasNullTypeAnnotation;
+						break;
+				}
+			} else {
+				// null signals end of annotations for the current dimension in the serialized form.
+				if (nullTagBits != 0) {
+					this.nullTagBitsPerDimension[dimension] = nullTagBits;
+					nullTagBits = 0;
+				}
+				dimension++;
+			}
+		}
+		this.tagBits |= this.nullTagBitsPerDimension[0]; // outer-most dimension
+	}
+}
 public char[] shortReadableName(){
 	char[] brackets = new char[this.dimensions * 2];
 	for (int i = this.dimensions * 2 - 1; i >= 0; i -= 2) {
@@ -270,12 +396,27 @@
 	return CharOperation.concat(this.leafComponentType.sourceName(), brackets);
 }
 public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
-	if (this.leafComponentType == unresolvedType) {
+	if (this.leafComponentType == unresolvedType) { //$IDENTITY-COMPARISON$
 		this.leafComponentType = env.convertUnresolvedBinaryToRawType(resolvedType);
 		this.tagBits |= this.leafComponentType.tagBits & (TagBits.HasTypeVariable | TagBits.HasDirectWildcard | TagBits.HasMissingType);
 	}
 }
+//{ObjectTeams: role wrapping:
+@Override
+public TypeBinding maybeWrapRoleType(ASTNode typedNode, TypeArgumentUpdater updater) {
+	if (!this.leafComponentType.isBaseType()) {
+		TypeBinding updated = this.leafComponentType.maybeWrapRoleType(typedNode, updater);
+		if (updated != this.leafComponentType)
+			return this.environment.createArrayType(updated, this.dimensions);
+	}
+	return this;
+}
+// SH}
 public String toString() {
 	return this.leafComponentType != null ? debugName() : "NULL TYPE ARRAY"; //$NON-NLS-1$
 }
+public TypeBinding unannotated() {
+	return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+}
+
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
index 8a77315..72b2335 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BaseTypeBinding.java
@@ -1,20 +1,25 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 
-public final class BaseTypeBinding extends TypeBinding {
+public class BaseTypeBinding extends TypeBinding {
 
 	public static final int[] CONVERSIONS;
 	public static final int IDENTITY = 1;
@@ -145,6 +150,10 @@
 		return this.constantPoolName;
 	}
 
+	public TypeBinding clone(TypeBinding enclosingType) {
+		return new BaseTypeBinding(this.id, this.simpleName, this.constantPoolName);
+	}
+	
 	public PackageBinding getPackage() {
 
 		return null;
@@ -152,17 +161,45 @@
 	
 	/* Answer true if the receiver type can be assigned to the argument type (right)
 	*/
-	public final boolean isCompatibleWith(TypeBinding left, Scope captureScope) {
-		if (this == left)
+	public final boolean isCompatibleWith(TypeBinding right, Scope captureScope) {
+		if (equalsEquals(this, right))
 			return true;
-		int right2left = this.id + (left.id<<4);
+		int right2left = this.id + (right.id<<4);
 		if (right2left >= 0 
 				&& right2left < MAX_CONVERSIONS 
 				&& (CONVERSIONS[right2left] & (IDENTITY|WIDENING)) != 0)
 			return true;
-		return this == TypeBinding.NULL && !left.isBaseType();
+		return this == TypeBinding.NULL && !right.isBaseType();
 	}
 	
+	public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+		super.setTypeAnnotations(annotations, false); // never set nullTagBits on base types
+	}
+
+	public TypeBinding unannotated() {
+		if (!this.hasTypeAnnotations())
+			return this;
+		switch (this.id) {
+			case TypeIds.T_boolean:
+				return TypeBinding.BOOLEAN;
+			case TypeIds.T_byte:
+				return TypeBinding.BYTE;
+			case TypeIds.T_char:
+				return TypeBinding.CHAR;
+			case TypeIds.T_double:
+				return TypeBinding.DOUBLE;
+			case TypeIds.T_float:
+				return TypeBinding.FLOAT;
+			case TypeIds.T_int:
+				return TypeBinding.INT;
+			case TypeIds.T_long:
+				return TypeBinding.LONG;
+			case TypeIds.T_short:
+				return TypeBinding.SHORT;
+			default:
+				throw new IllegalStateException();
+			}
+	}
 	/**
 	 * T_null is acting as an unchecked exception
 	 * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#isUncheckedException(boolean)
@@ -194,6 +231,6 @@
 	}
 
 	public String toString() {
-		return new String(this.constantPoolName) + " (id=" + this.id + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+		return this.hasTypeAnnotations() ? annotatedDebugName() : new String(readableName());
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
index 89d428e..ec7bd66 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -16,8 +20,17 @@
  *								bug 365387 - [compiler][null] bug 186342: Issues to follow up post review and verification.
  *								bug 358903 - Filter practically unimportant resource leak warnings
  *								bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
+ *								bug 388800 - [1.8][compiler] detect default methods in class files
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 331649 - [compiler][null] consider null annotations for fields
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *    Jesper Steen Moller - Contributions for
+ *								Bug 412150 [1.8] [compiler] Enable reflected parameter names during annotation processing
+ *								Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -30,10 +43,13 @@
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader;
 import org.eclipse.jdt.internal.compiler.classfmt.FieldInfo;
 import org.eclipse.jdt.internal.compiler.classfmt.MethodInfo;
-import org.eclipse.jdt.internal.compiler.parser.Parser;
+import org.eclipse.jdt.internal.compiler.classfmt.TypeAnnotationWalker;
+import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.env.*;
 import org.eclipse.jdt.internal.compiler.impl.BooleanConstant;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.parser.Parser;
 import org.eclipse.jdt.internal.compiler.problem.AbortCompilation;
 import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
 import org.eclipse.jdt.internal.compiler.util.Util;
@@ -109,6 +125,8 @@
 
 public class BinaryTypeBinding extends ReferenceBinding {
 
+	private static final IBinaryMethod[] NO_BINARY_METHODS = new IBinaryMethod[0];
+
 	// all of these fields are ONLY guaranteed to be initialized if accessed using their public accessor method
 	protected ReferenceBinding superclass;
 	protected ReferenceBinding enclosingType;
@@ -117,12 +135,15 @@
 	protected MethodBinding[] methods;
 	protected ReferenceBinding[] memberTypes;
 	protected TypeVariableBinding[] typeVariables;
+	private BinaryTypeBinding prototype;
 
 	// For the link with the principle structure
 	protected LookupEnvironment environment;
 
 	protected SimpleLookupTable storedAnnotations = null; // keys are this ReferenceBinding & its fields and methods, value is an AnnotationHolder
 
+	private ReferenceBinding containerAnnotationType;
+
 //{ObjectTeams: support callout-to-field
 
 	/** Callout to field adds faked access method (set or get): */
@@ -180,12 +201,12 @@
 	if (binaryValue instanceof Constant)
 		return binaryValue;
 	if (binaryValue instanceof ClassSignature)
-		return env.getTypeFromSignature(((ClassSignature) binaryValue).getTypeName(), 0, -1, false, null, missingTypeNames);
+		return env.getTypeFromSignature(((ClassSignature) binaryValue).getTypeName(), 0, -1, false, null, missingTypeNames, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
 	if (binaryValue instanceof IBinaryAnnotation)
 		return createAnnotation((IBinaryAnnotation) binaryValue, env, missingTypeNames);
 	if (binaryValue instanceof EnumConstantSignature) {
 		EnumConstantSignature ref = (EnumConstantSignature) binaryValue;
-		ReferenceBinding enumType = (ReferenceBinding) env.getTypeFromSignature(ref.getTypeName(), 0, -1, false, null, missingTypeNames);
+		ReferenceBinding enumType = (ReferenceBinding) env.getTypeFromSignature(ref.getTypeName(), 0, -1, false, null, missingTypeNames, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
 		enumType = (ReferenceBinding) resolveType(enumType, env, false /* no raw conversion */);
 		return enumType.getField(ref.getEnumConstantName(), false);
 	}
@@ -203,6 +224,25 @@
 	throw new IllegalStateException();
 }
 
+public TypeBinding clone(TypeBinding outerType) {
+	BinaryTypeBinding copy = new BinaryTypeBinding(this);
+	copy.enclosingType = (ReferenceBinding) outerType;
+	
+	/* BinaryTypeBinding construction is not "atomic" and is split between the constructor and cachePartsFrom and between the two
+	   stages of construction, clone can kick in when LookupEnvironment.createBinaryTypeFrom calls PackageBinding.addType. This
+	   can result in some URB's being resolved, which could trigger the clone call, leaving the clone with semi-initialized prototype.
+	   Fortunately, the protocol for this type demands all clients to use public access methods, where we can deflect the call to the
+	   prototype. enclosingType() and memberTypes() should not delegate, so ...
+	*/
+	if (copy.enclosingType != null) 
+		copy.tagBits |= TagBits.HasUnresolvedEnclosingType;
+	else 
+		copy.tagBits &= ~TagBits.HasUnresolvedEnclosingType;
+	
+	copy.tagBits |= TagBits.HasUnresolvedMemberTypes;
+	return copy;
+}
+
 static AnnotationBinding createAnnotation(IBinaryAnnotation annotationInfo, LookupEnvironment env, char[][][] missingTypeNames) {
 	IBinaryElementValuePair[] binaryPairs = annotationInfo.getElementValuePairs();
 	int length = binaryPairs == null ? 0 : binaryPairs.length;
@@ -212,7 +252,7 @@
 
 	char[] typeName = annotationInfo.getTypeName();
 	ReferenceBinding annotationType = env.getTypeFromConstantPoolName(typeName, 1, typeName.length - 1, false, missingTypeNames);
-	return new UnresolvedAnnotationBinding(annotationType, pairs, env);
+	return env.createUnresolvedAnnotation(annotationType, pairs);
 }
 
 public static AnnotationBinding[] createAnnotations(IBinaryAnnotation[] annotationInfos, LookupEnvironment env, char[][][] missingTypeNames) {
@@ -261,8 +301,22 @@
  */
 protected BinaryTypeBinding() {
 	// only for subclasses
+	this.prototype = this;
 }
 
+public BinaryTypeBinding(BinaryTypeBinding prototype) {
+	super(prototype);
+	this.superclass = prototype.superclass;
+	this.enclosingType = prototype.enclosingType;
+	this.superInterfaces = prototype.superInterfaces;
+	this.fields = prototype.fields;
+	this.methods = prototype.methods;
+	this.memberTypes = prototype.memberTypes;
+	this.typeVariables = prototype.typeVariables;
+	this.prototype = prototype.prototype;
+	this.environment = prototype.environment;
+	this.storedAnnotations = prototype.storedAnnotations;
+}
 /**
  * Standard constructor for creating binary type bindings from binary models (classfiles)
  * @param packageBinding
@@ -270,6 +324,8 @@
  * @param environment
  */
 public BinaryTypeBinding(PackageBinding packageBinding, IBinaryType binaryType, LookupEnvironment environment) {
+	
+	this.prototype = this;
 	this.compoundName = CharOperation.splitOn('/', binaryType.getName());
 	computeId();
 
@@ -319,9 +375,14 @@
 }
 
 /**
- * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#availableMethods()
+ * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#availableFields()
  */
 public FieldBinding[] availableFields() {
+	
+	if (!isPrototype()) {
+		return this.prototype.availableFields();
+	}
+	
 	if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
 		return this.fields;
 
@@ -348,6 +409,7 @@
 }
 
 private TypeVariableBinding[] addMethodTypeVariables(TypeVariableBinding[] methodTypeVars) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.typeVariables == null || this.typeVariables == Binding.NO_TYPE_VARIABLES) {
 		return methodTypeVars;
 	} 
@@ -376,6 +438,11 @@
  * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#availableMethods()
  */
 public MethodBinding[] availableMethods() {
+	
+	if (!isPrototype()) {
+		return this.prototype.availableMethods();
+	}
+
 	if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
 		return this.methods;
 
@@ -402,6 +469,7 @@
 }
 
 void cachePartsFrom(IBinaryType binaryType, boolean needFieldsAndMethods) {
+	if (!isPrototype()) throw new IllegalStateException();
 	try {
 		// default initialization for super-interfaces early, in case some aborting compilation error occurs,
 		// and still want to use binaries passed that point (e.g. type hierarchy resolver, see bug 63748).
@@ -462,12 +530,14 @@
 			}
 		}
 
-		long sourceLevel = this.environment.globalOptions.originalSourceLevel;
+		CompilerOptions globalOptions = this.environment.globalOptions;
+		long sourceLevel = globalOptions.originalSourceLevel;
 		/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, even in a 1.4 project, we
 		   must internalize type variables and observe any parameterization of super class
 		   and/or super interfaces in order to be able to detect overriding in the presence
 		   of generics.
 		 */
+		TypeAnnotationWalker walker = getTypeAnnotationWalker(binaryType.getTypeAnnotations());
 		char[] typeSignature = binaryType.getGenericSignature(); // use generic signature even in 1.4
 		this.tagBits |= binaryType.getTagBits();
 		
@@ -479,7 +549,7 @@
 			if (wrapper.signature[wrapper.start] == Util.C_GENERIC_START) {
 				// ParameterPart = '<' ParameterSignature(s) '>'
 				wrapper.start++; // skip '<'
-				this.typeVariables = createTypeVariables(wrapper, true, missingTypeNames);
+				this.typeVariables = createTypeVariables(wrapper, true, missingTypeNames, walker, true/*class*/);
 				wrapper.start++; // skip '>'
 				this.tagBits |=  TagBits.HasUnresolvedTypeVariables;
 				this.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
@@ -506,7 +576,7 @@
 			char[] superclassName = binaryType.getSuperclassName();
 			if (superclassName != null) {
 				// attempt to find the superclass if it exists in the cache (otherwise - resolve it when requested)
-				this.superclass = this.environment.getTypeFromConstantPoolName(superclassName, 0, -1, false, missingTypeNames);
+				this.superclass = this.environment.getTypeFromConstantPoolName(superclassName, 0, -1, false, missingTypeNames, walker.toSupertype((short) -1));
 				this.tagBits |= TagBits.HasUnresolvedSuperclass;
 			}
 // :giro
@@ -519,15 +589,16 @@
 				int size = interfaceNames.length;
 				if (size > 0) {
 					this.superInterfaces = new ReferenceBinding[size];
-					for (int i = 0; i < size; i++)
+					for (short i = 0; i < size; i++)
 						// attempt to find each superinterface if it exists in the cache (otherwise - resolve it when requested)
-						this.superInterfaces[i] = this.environment.getTypeFromConstantPoolName(interfaceNames[i], 0, -1, false, missingTypeNames);
+						this.superInterfaces[i] = this.environment.getTypeFromConstantPoolName(interfaceNames[i], 0, -1, false, missingTypeNames, walker.toSupertype(i));
 					this.tagBits |= TagBits.HasUnresolvedSuperinterfaces;
 				}
 			}
 		} else {
 			// attempt to find the superclass if it exists in the cache (otherwise - resolve it when requested)
-			this.superclass = (ReferenceBinding) this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames);
+			this.superclass = (ReferenceBinding) this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames, 
+																		walker.toSupertype((short) -1));
 //{ObjectTeams: wrapping of type (incl. its arguments)?
 			if (!TypeAnalyzer.isTopConfined(this.superclass))
 				this.superclass = (ReferenceBinding) RoleTypeCreator.maybeWrapUnqualifiedRoleType(this.superclass, this);
@@ -538,12 +609,13 @@
 			if (!wrapper.atEnd()) {
 				// attempt to find each superinterface if it exists in the cache (otherwise - resolve it when requested)
 				java.util.ArrayList types = new java.util.ArrayList(2);
+				short rank = 0;
 				do {
 //{ObjectTeams: wrapping of type (incl. its arguments)?
 /* orig:
-					types.add(this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames));
+					types.add(this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames, walker.toSupertype(rank++)));
   :giro*/
-					TypeBinding type = this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames);
+					TypeBinding type = this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames, walker.toSupertype(rank++));
 					if (this.isDirectRole()
 							&& !(type instanceof ReferenceBinding && TSuperHelper.isTSubOf(this, (ReferenceBinding) type)))
 						type = RoleTypeCreator.maybeWrapUnqualifiedRoleType(type, this);
@@ -557,8 +629,9 @@
 		}
 
 		if (needFieldsAndMethods) {
-			createFields(binaryType.getFields(), sourceLevel, missingTypeNames);
-			createMethods(binaryType.getMethods(), sourceLevel, missingTypeNames);
+			IBinaryField[] iFields = binaryType.getFields();
+			createFields(iFields, sourceLevel, missingTypeNames);
+			IBinaryMethod[] iMethods = createMethods(binaryType.getMethods(), sourceLevel, missingTypeNames);
 			boolean isViewedAsDeprecated = isViewedAsDeprecated();
 			if (isViewedAsDeprecated) {
 				for (int i = 0, max = this.fields.length; i < max; i++) {
@@ -574,6 +647,19 @@
 					}
 				}
 			}
+			if (this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled) {
+				// need annotations on the type before processing null annotations on members respecting any @NonNullByDefault:
+				scanTypeForNullDefaultAnnotation(binaryType, this.fPackage, this);
+
+				if (iFields != null) {
+					for (int i = 0; i < iFields.length; i++)
+						scanFieldForNullAnnotation(iFields[i], this.fields[i]);
+				}
+				if (iMethods != null) {
+					for (int i = 0; i < iMethods.length; i++)
+						scanMethodForNullAnnotation(iMethods[i], this.methods[i]);
+				}
+			}
 		}
 //{ObjectTeams: now this type is setup enough to evaluate attributes
 		if (binaryType instanceof ClassFileReader) {
@@ -585,6 +671,8 @@
 // SH}
 		if (this.environment.globalOptions.storeAnnotations)
 			setAnnotations(createAnnotations(binaryType.getAnnotations(), this.environment, missingTypeNames));
+		if (this.isAnnotationType())
+			scanTypeForContainerAnnotation(binaryType, missingTypeNames);
 	} finally {
 		// protect against incorrect use of the needFieldsAndMethods flag, see 48459
 		if (this.fields == null)
@@ -594,7 +682,16 @@
 	}
 }
 
+private TypeAnnotationWalker getTypeAnnotationWalker(IBinaryTypeAnnotation[] annotations) {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (annotations == null || annotations.length == 0)
+		return TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER;
+	
+	return this.environment.usesAnnotatedTypeSystem() ? new TypeAnnotationWalker(annotations) : TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER;
+}
+
 private void createFields(IBinaryField[] iFields, long sourceLevel, char[][][] missingTypeNames) {
+	if (!isPrototype()) throw new IllegalStateException();
 	this.fields = Binding.NO_FIELDS;
 	if (iFields != null) {
 		int size = iFields.length;
@@ -606,9 +703,10 @@
 			for (int i = 0; i < size; i++) {
 				IBinaryField binaryField = iFields[i];
 				char[] fieldSignature = use15specifics ? binaryField.getGenericSignature() : null;
+				TypeAnnotationWalker walker = getTypeAnnotationWalker(binaryField.getTypeAnnotations()).toField();
 				TypeBinding type = fieldSignature == null
-					? this.environment.getTypeFromSignature(binaryField.getTypeName(), 0, -1, false, this, missingTypeNames)
-					: this.environment.getTypeFromTypeSignature(new SignatureWrapper(fieldSignature), Binding.NO_TYPE_VARIABLES, this, missingTypeNames);
+					? this.environment.getTypeFromSignature(binaryField.getTypeName(), 0, -1, false, this, missingTypeNames, walker)
+					: this.environment.getTypeFromTypeSignature(new SignatureWrapper(fieldSignature), Binding.NO_TYPE_VARIABLES, this, missingTypeNames, walker);
 				FieldBinding field =
 					new FieldBinding(
 						binaryField.getName(),
@@ -651,12 +749,6 @@
 					this.fields[i].setAnnotations(createAnnotations(binaryField.getAnnotations(), this.environment, missingTypeNames));
 				}
 			}
-			if (this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled) {
-				for (int i = 0; i <size; i++) {
-					IBinaryField binaryField = iFields[i];
-					scanFieldForNullAnnotation(binaryField, this.fields[i]);
-				}
-			}
 		}
 	}
 }
@@ -692,21 +784,32 @@
   MethodBinding result = null;
   try {
 // SH}
+	if (!isPrototype()) throw new IllegalStateException();
 	int methodModifiers = method.getModifiers() | ExtraCompilerModifiers.AccUnresolved;
 	if (sourceLevel < ClassFileConstants.JDK1_5)
 		methodModifiers &= ~ClassFileConstants.AccVarargs; // vararg methods are not recognized until 1.5
+	if (isInterface() && (methodModifiers & ClassFileConstants.AccAbstract) == 0) {
+		// see https://bugs.eclipse.org/388954
+		if (sourceLevel >= ClassFileConstants.JDK1_8)
+			methodModifiers |= ExtraCompilerModifiers.AccDefaultMethod;
+		else
+			methodModifiers |= ClassFileConstants.AccAbstract;
+	}
 	ReferenceBinding[] exceptions = Binding.NO_EXCEPTIONS;
 	TypeBinding[] parameters = Binding.NO_PARAMETERS;
 	TypeVariableBinding[] typeVars = Binding.NO_TYPE_VARIABLES;
 	AnnotationBinding[][] paramAnnotations = null;
 	TypeBinding returnType = null;
 
+	char[][] argumentNames = method.getArgumentNames();
+
 	final boolean use15specifics = sourceLevel >= ClassFileConstants.JDK1_5;
 	/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, Since a 1.4 project can have a 1.5
 	   type as a super type and the 1.5 type could be generic, we must internalize usages of type
 	   variables properly in order to be able to apply substitutions and thus be able to detect
 	   overriding in the presence of generics. Seeing the erased form is not good enough.
 	 */
+	TypeAnnotationWalker walker = getTypeAnnotationWalker(method.getTypeAnnotations());
 	char[] methodSignature = method.getGenericSignature(); // always use generic signature, even in 1.4
 	if (methodSignature == null) { // no generics
 		char[] methodDescriptor = method.getMethodDescriptor();   // of the form (I[Ljava/jang/String;)V
@@ -751,6 +854,7 @@
 			if (this.environment.globalOptions.storeAnnotations)
 				paramAnnotations = new AnnotationBinding[size][];
 			index = 1;
+			short visibleIdx = 0;
 			int end = 0;   // first character is always '(' so skip it
 			for (int i = 0; i < numOfParams; i++) {
 				while ((nextChar = methodDescriptor[++end]) == Util.C_ARRAY){/*empty*/}
@@ -758,7 +862,7 @@
 					while ((nextChar = methodDescriptor[++end]) != Util.C_NAME_END){/*empty*/}
 
 				if (i >= startIndex) {   // skip the synthetic arg if necessary
-					parameters[i - startIndex] = this.environment.getTypeFromSignature(methodDescriptor, index, end, false, this, missingTypeNames);
+					parameters[i - startIndex] = this.environment.getTypeFromSignature(methodDescriptor, index, end, false, this, missingTypeNames, walker.toMethodParameter(visibleIdx++));
 					// 'paramAnnotations' line up with 'parameters'
 					// int parameter to method.getParameterAnnotations() include the synthetic arg
 					if (paramAnnotations != null)
@@ -774,12 +878,25 @@
 			if (size > 0) {
 				exceptions = new ReferenceBinding[size];
 				for (int i = 0; i < size; i++)
-					exceptions[i] = this.environment.getTypeFromConstantPoolName(exceptionTypes[i], 0, -1, false, missingTypeNames);
+					exceptions[i] = this.environment.getTypeFromConstantPoolName(exceptionTypes[i], 0, -1, false, missingTypeNames, walker.toThrows(i));
 			}
 		}
 
 		if (!method.isConstructor())
-			returnType = this.environment.getTypeFromSignature(methodDescriptor, index + 1, -1, false, this, missingTypeNames);   // index is currently pointing at the ')'
+			returnType = this.environment.getTypeFromSignature(methodDescriptor, index + 1, -1, false, this, missingTypeNames, walker.toMethodReturn());   // index is currently pointing at the ')'
+		
+		final int argumentNamesLength = argumentNames == null ? 0 : argumentNames.length;
+		if (startIndex > 0 && argumentNamesLength > 0) {
+			// We'll have to slice the starting arguments off
+			if (startIndex >= argumentNamesLength) {
+				argumentNames = Binding.NO_PARAMETER_NAMES; // We know nothing about the argument names
+			} else {
+				char[][] slicedArgumentNames = new char[argumentNamesLength - startIndex][];
+				System.arraycopy(argumentNames, startIndex, slicedArgumentNames, 0, argumentNamesLength - startIndex);
+				argumentNames = slicedArgumentNames;
+			}
+		}
+
 	} else {
 		methodModifiers |= ExtraCompilerModifiers.AccGenericSignature;
 		// MethodTypeSignature = ParameterPart(optional) '(' TypeSignatures ')' return_typeSignature ['^' TypeSignature (optional)]
@@ -788,7 +905,7 @@
 			// <A::Ljava/lang/annotation/Annotation;>(Ljava/lang/Class<TA;>;)TA;
 			// ParameterPart = '<' ParameterSignature(s) '>'
 			wrapper.start++; // skip '<'
-			typeVars = createTypeVariables(wrapper, false, missingTypeNames);
+			typeVars = createTypeVariables(wrapper, false, missingTypeNames, walker, false/*class*/);
 			wrapper.start++; // skip '>'
 		}
 
@@ -798,8 +915,9 @@
 				wrapper.start++; // skip ')'
 			} else {
 				java.util.ArrayList types = new java.util.ArrayList(2);
+				short rank = 0;
 				while (wrapper.signature[wrapper.start] != Util.C_PARAM_END)
-					types.add(this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames));
+					types.add(this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames, walker.toMethodParameter(rank++)));
 				wrapper.start++; // skip ')'
 				int numParam = types.size();
 				parameters = new TypeBinding[numParam];
@@ -813,14 +931,16 @@
 		}
 
 		// always retrieve return type (for constructors, its V for void - will be ignored)
-		returnType = this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames);
+		returnType = this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames, walker.toMethodReturn());
 
 		if (!wrapper.atEnd() && wrapper.signature[wrapper.start] == Util.C_EXCEPTION_START) {
 			// attempt to find each exception if it exists in the cache (otherwise - resolve it when requested)
 			java.util.ArrayList types = new java.util.ArrayList(2);
+			int excRank = 0;
 			do {
 				wrapper.start++; // skip '^'
-				types.add(this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames));
+				types.add(this.environment.getTypeFromTypeSignature(wrapper, typeVars, this, missingTypeNames,
+					walker.toThrows(excRank++)));
 			} while (!wrapper.atEnd() && wrapper.signature[wrapper.start] == Util.C_EXCEPTION_START);
 			exceptions = new ReferenceBinding[types.size()];
 			types.toArray(exceptions);
@@ -831,7 +951,7 @@
 				if (size > 0) {
 					exceptions = new ReferenceBinding[size];
 					for (int i = 0; i < size; i++)
-						exceptions[i] = this.environment.getTypeFromConstantPoolName(exceptionTypes[i], 0, -1, false, missingTypeNames);
+						exceptions[i] = this.environment.getTypeFromConstantPoolName(exceptionTypes[i], 0, -1, false, missingTypeNames, walker.toThrows(i));
 				}
 			}
 		}
@@ -847,13 +967,26 @@
 // SH}
 		? new MethodBinding(methodModifiers, parameters, exceptions, this)
 		: new MethodBinding(methodModifiers, method.getSelector(), returnType, parameters, exceptions, this);
-	if (this.environment.globalOptions.storeAnnotations)
+		
+	IBinaryAnnotation[] receiverAnnotations = walker.toReceiver().getAnnotationsAtCursor();
+	if (receiverAnnotations != null && receiverAnnotations.length > 0) {
+		result.receiver = this.environment.createAnnotatedType(this, createAnnotations(receiverAnnotations, this.environment, missingTypeNames));
+	}
+
+	if (this.environment.globalOptions.storeAnnotations) {
+		IBinaryAnnotation[] annotations = method.getAnnotations();
+	    if (annotations == null || annotations.length == 0)
+	    	if (method.isConstructor())
+	    		annotations = walker.toMethodReturn().getAnnotationsAtCursor(); // FIXME: When both exist, order could become an issue.
 		result.setAnnotations(
-			createAnnotations(method.getAnnotations(), this.environment, missingTypeNames),
+			createAnnotations(annotations, this.environment, missingTypeNames),
 			paramAnnotations,
 			isAnnotationType() ? convertMemberValue(method.getDefaultValue(), this.environment, missingTypeNames) : null,
 			this.environment);
+	}
 
+	if (argumentNames != null) result.parameterNames = argumentNames;
+	
 	if (use15specifics)
 		result.tagBits |= method.getTagBits();
 	result.typeVariables = typeVars;
@@ -862,8 +995,7 @@
 		typeVars[i].declaringElement = result;
 //{ObjectTeams:
 	// transfer "callsBaseCtor":
-	if ((result.modifiers & ExtraCompilerModifiers.AccCallsBaseCtor) != 0) {
-		result.modifiers &= ~ExtraCompilerModifiers.AccCallsBaseCtor;
+	if (method instanceof MethodInfo && ((MethodInfo)method).callsBaseCtor()) {
 		MethodModel.setCallsBaseCtor(result);
 	}
 	// handle various OT-specific methods:
@@ -907,15 +1039,16 @@
   }
 // SH}
 
-	scanMethodForNullAnnotation(method, result);
-
 	return result;
 }
 
 /**
  * Create method bindings for binary type, filtering out <clinit> and synthetics
+ * As some iMethods may be ignored in this process we return the matching array of those
+ * iMethods for which MethodBindings have been created; indices match those in this.methods.
  */
-private void createMethods(IBinaryMethod[] iMethods, long sourceLevel, char[][][] missingTypeNames) {
+private IBinaryMethod[] createMethods(IBinaryMethod[] iMethods, long sourceLevel, char[][][] missingTypeNames) {
+	if (!isPrototype()) throw new IllegalStateException();
 	int total = 0, initialTotal = 0, iClinit = -1;
 	int[] toSkip = null;
 	if (iMethods != null) {
@@ -946,7 +1079,7 @@
 	}
 	if (total == 0) {
 		this.methods = Binding.NO_METHODS;
-		return;
+		return NO_BINARY_METHODS;
 	}
 
 	boolean hasRestrictedAccess = hasRestrictedAccess();
@@ -958,15 +1091,19 @@
 				method.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess;
 			this.methods[i] = method;
 		}
+		return iMethods;
 	} else {
+		IBinaryMethod[] mappedBinaryMethods = new IBinaryMethod[total];
 		for (int i = 0, index = 0; i < initialTotal; i++) {
 			if (iClinit != i && (toSkip == null || toSkip[i] != -1)) {
 				MethodBinding method = createMethod(iMethods[i], sourceLevel, missingTypeNames);
 				if (hasRestrictedAccess)
 					method.modifiers |= ExtraCompilerModifiers.AccRestrictedAccess;
+				mappedBinaryMethods[index] = iMethods[i];
 				this.methods[index++] = method;
 			}
 		}
+		return mappedBinaryMethods;
 	}
 }
 //{ObjectTeams: create bindings for OTRE-generated methods:
@@ -987,7 +1124,10 @@
 }
 // SH}
 
-private TypeVariableBinding[] createTypeVariables(SignatureWrapper wrapper, boolean assignVariables, char[][][] missingTypeNames) {
+private TypeVariableBinding[] createTypeVariables(SignatureWrapper wrapper, boolean assignVariables, char[][][] missingTypeNames,
+													TypeAnnotationWalker walker, boolean isClassTypeParameter)
+{
+	if (!isPrototype()) throw new IllegalStateException();
 	// detect all type variables first
 	char[] typeSignature = wrapper.signature;
 	int depth = 0, length = typeSignature.length;
@@ -1014,7 +1154,12 @@
 						pendingVariable = false;
 						int colon = CharOperation.indexOf(Util.C_COLON, typeSignature, i);
 						char[] variableName = CharOperation.subarray(typeSignature, i, colon);
-						variables.add(new TypeVariableBinding(variableName, this, rank++, this.environment));
+						TypeVariableBinding typeVariable = new TypeVariableBinding(variableName, this, rank, this.environment);
+						AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.toTypeParameter(isClassTypeParameter, rank++).getAnnotationsAtCursor(), 
+																										this.environment, missingTypeNames);
+						if (annotations != null && annotations != Binding.NO_ANNOTATIONS)
+							typeVariable.setTypeAnnotations(annotations, this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled);
+						variables.add(typeVariable);
 					}
 			}
 		}
@@ -1027,7 +1172,7 @@
 	if (assignVariables)
 		this.typeVariables = result;
 	for (int i = 0; i < rank; i++) {
-		initializeTypeVariable(result[i], result, wrapper, missingTypeNames);
+		initializeTypeVariable(result[i], result, wrapper, missingTypeNames, walker.toTypeParameterBounds(isClassTypeParameter, i));
 	}
 	return result;
 }
@@ -1036,7 +1181,7 @@
 *
 * NOTE: enclosingType of a binary type is resolved when needed
 */
-public ReferenceBinding enclosingType() {
+public ReferenceBinding enclosingType() {  // should not delegate to prototype.
 	if ((this.tagBits & TagBits.HasUnresolvedEnclosingType) == 0)
 		return this.enclosingType;
 
@@ -1047,6 +1192,11 @@
 }
 // NOTE: the type of each field of a binary type is resolved when needed
 public FieldBinding[] fields() {
+	
+	if (!isPrototype()) {
+		return this.fields = this.prototype.fields();
+	}
+
 	if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
 		return this.fields;
 
@@ -1064,6 +1214,7 @@
 }
 
 private MethodBinding findMethod(char[] methodDescriptor, char[][][] missingTypeNames) {
+	if (!isPrototype()) throw new IllegalStateException();
 	int index = -1;
 	while (methodDescriptor[++index] != Util.C_PARAM_START) {
 		// empty
@@ -1090,7 +1241,8 @@
 			if (nextChar == Util.C_RESOLVED)
 				while ((nextChar = methodDescriptor[++end]) != Util.C_NAME_END){/*empty*/}
 
-			TypeBinding param = this.environment.getTypeFromSignature(methodDescriptor, index, end, false, this, missingTypeNames);
+			// not interested in type annotations, type will be used for comparison only, and erasure() is used if needed
+			TypeBinding param = this.environment.getTypeFromSignature(methodDescriptor, index, end, false, this, missingTypeNames, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
 			if (param instanceof UnresolvedReferenceBinding) {
 				param = resolveType(param, this.environment, true /* raw conversion */);
 			}
@@ -1110,7 +1262,7 @@
 			for (int j = 0; j < currentMethodParameterLength; j++) {
 //{ObjectTeams: weaker form of equality:
 /* orig:
-				if (parameters[j] != parameters2[j] && parameters[j].erasure() != parameters2[j].erasure()) {
+				if (TypeBinding.notEquals(parameters[j], parameters2[j]) && TypeBinding.notEquals(parameters[j].erasure(), parameters2[j].erasure())) {
   :giro */
 				if (   !AnchorMapping.areTypesEqual(parameters[j], parameters2[j], currentMethod) 
 					&& !AnchorMapping.areTypesEqual(parameters[j].erasure(), parameters2[j].erasure(), currentMethod)) {
@@ -1128,12 +1280,17 @@
  * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#genericTypeSignature()
  */
 public char[] genericTypeSignature() {
+	if (!isPrototype())
+		return this.prototype.computeGenericTypeSignature(this.typeVariables);
 	return computeGenericTypeSignature(this.typeVariables);
 }
 
 //NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
 public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
 
+	if (!isPrototype())
+		return this.prototype.getExactConstructor(argumentTypes);
+
 	// lazily sort methods
 	if ((this.tagBits & TagBits.AreMethodsSorted) == 0) {
 		int length = this.methods.length;
@@ -1152,7 +1309,7 @@
 				for (int iarg = 0; iarg < argCount; iarg++)
 //{ObjectTeams: weaker form of equality:
 /* orig:
-					if (toMatch[iarg] != argumentTypes[iarg])
+					if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
   :giro */
 					if (!AnchorMapping.areTypesEqual(toMatch[iarg], argumentTypes[iarg], method))
 // SH}
@@ -1169,6 +1326,9 @@
 public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) {
 	// sender from refScope calls recordTypeReference(this)
 
+	if (!isPrototype())
+		return this.prototype.getExactMethod(selector, argumentTypes, refScope);
+
 	// lazily sort methods
 	if ((this.tagBits & TagBits.AreMethodsSorted) == 0) {
 		int length = this.methods.length;
@@ -1191,7 +1351,7 @@
 				for (int iarg = 0; iarg < argCount; iarg++)
 //{ObjectTeams: weaker form of equality:
 /* orig:
-					if (toMatch[iarg] != argumentTypes[iarg])
+					if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
   :giro */
 					if (!AnchorMapping.areTypesEqual(toMatch[iarg], argumentTypes[iarg], method))
 // SH}
@@ -1231,6 +1391,10 @@
 }
 //NOTE: the type of a field of a binary type is resolved when needed
 public FieldBinding getField(char[] fieldName, boolean needResolve) {
+	
+	if (!isPrototype())
+		return this.prototype.getField(fieldName, needResolve);
+
 	// lazily sort fields
 	if ((this.tagBits & TagBits.AreFieldsSorted) == 0) {
 		int length = this.fields.length;
@@ -1242,9 +1406,15 @@
 	return needResolve && field != null ? resolveTypeFor(field) : field;
 }
 /**
- *  Rewrite of default getMemberType to avoid resolving eagerly all member types when one is requested
+ *  Rewrite of default memberTypes() to avoid resolving eagerly all member types when one is requested
  */
 public ReferenceBinding getMemberType(char[] typeName) {
+
+	if (!isPrototype()) {
+		ReferenceBinding memberType = this.prototype.getMemberType(typeName);
+		return memberType == null ? null : this.environment.createMemberType(memberType, this);
+	}
+
 	for (int i = this.memberTypes.length; --i >= 0;) {
 	    ReferenceBinding memberType = this.memberTypes[i];
 	    if (memberType instanceof UnresolvedReferenceBinding) {
@@ -1294,6 +1464,10 @@
 // SH}
 // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
 public MethodBinding[] getMethods(char[] selector) {
+	
+	if (!isPrototype())
+		return this.prototype.getMethods(selector);
+
 	if ((this.tagBits & TagBits.AreMethodsComplete) != 0) {
 		long range;
 		if ((range = ReferenceBinding.binarySearch(selector, this.methods)) >= 0) {
@@ -1330,6 +1504,10 @@
 // Answer methods named selector, which take no more than the suggestedParameterLength.
 // The suggested parameter length is optional and may not be guaranteed by every type.
 public MethodBinding[] getMethods(char[] selector, int suggestedParameterLength) {
+	
+	if (!isPrototype())
+		return this.prototype.getMethods(selector, suggestedParameterLength);
+
 	if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
 		return getMethods(selector);
 	// lazily sort methods
@@ -1369,15 +1547,24 @@
 	return Binding.NO_METHODS;
 }
 public boolean hasMemberTypes() {
+	if (!isPrototype())
+		return this.prototype.hasMemberTypes();
     return this.memberTypes.length > 0;
 }
 // NOTE: member types of binary types are resolved when needed
 public TypeVariableBinding getTypeVariable(char[] variableName) {
+	if (!isPrototype())
+		return this.prototype.getTypeVariable(variableName);
+
 	TypeVariableBinding variable = super.getTypeVariable(variableName);
 	variable.resolve();
 	return variable;
 }
 public boolean hasTypeBit(int bit) {
+	
+	if (!isPrototype())
+		return this.prototype.hasTypeBit(bit);
+	
 	// ensure hierarchy is resolved, which will propagate bits down to us
 	boolean wasToleratingMissingTypeProcessingAnnotations = this.environment.mayTolerateMissingType;
 	this.environment.mayTolerateMissingType = true;
@@ -1389,17 +1576,19 @@
 	}
 	return (this.typeBits & bit) != 0;
 }
-private void initializeTypeVariable(TypeVariableBinding variable, TypeVariableBinding[] existingVariables, SignatureWrapper wrapper, char[][][] missingTypeNames) {
+private void initializeTypeVariable(TypeVariableBinding variable, TypeVariableBinding[] existingVariables, SignatureWrapper wrapper, char[][][] missingTypeNames, TypeAnnotationWalker walker) {
+	if (!isPrototype()) throw new IllegalStateException();
 	// ParameterSignature = Identifier ':' TypeSignature
 	//   or Identifier ':' TypeSignature(optional) InterfaceBound(s)
 	// InterfaceBound = ':' TypeSignature
 	int colon = CharOperation.indexOf(Util.C_COLON, wrapper.signature, wrapper.start);
 	wrapper.start = colon + 1; // skip name + ':'
 	ReferenceBinding type, firstBound = null;
+	short rank = 0;
 	if (wrapper.signature[wrapper.start] == Util.C_COLON) {
 		type = this.environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
 	} else {
-		TypeBinding typeFromTypeSignature = this.environment.getTypeFromTypeSignature(wrapper, existingVariables, this, missingTypeNames);
+		TypeBinding typeFromTypeSignature = this.environment.getTypeFromTypeSignature(wrapper, existingVariables, this, missingTypeNames, walker.toTypeBound(rank++));
 		if (typeFromTypeSignature instanceof ReferenceBinding) {
 			type = (ReferenceBinding) typeFromTypeSignature;
 		} else {
@@ -1411,31 +1600,32 @@
 
 	// variable is visible to its bounds
 	variable.modifiers |= ExtraCompilerModifiers.AccUnresolved;
-	variable.superclass = type;
+	variable.setSuperClass(type);
 
 	ReferenceBinding[] bounds = null;
 	if (wrapper.signature[wrapper.start] == Util.C_COLON) {
 		java.util.ArrayList types = new java.util.ArrayList(2);
 		do {
 			wrapper.start++; // skip ':'
-			types.add(this.environment.getTypeFromTypeSignature(wrapper, existingVariables, this, missingTypeNames));
+			types.add(this.environment.getTypeFromTypeSignature(wrapper, existingVariables, this, missingTypeNames, walker.toTypeBound(rank++)));
 		} while (wrapper.signature[wrapper.start] == Util.C_COLON);
 		bounds = new ReferenceBinding[types.size()];
 		types.toArray(bounds);
 	}
 
-	variable.superInterfaces = bounds == null ? Binding.NO_SUPERINTERFACES : bounds;
+	variable.setSuperInterfaces(bounds == null ? Binding.NO_SUPERINTERFACES : bounds);
 	if (firstBound == null) {
 		firstBound = variable.superInterfaces.length == 0 ? null : variable.superInterfaces[0];
 	}
-	variable.firstBound = firstBound;
+	variable.setFirstBound(firstBound);
 }
 /**
  * Returns true if a type is identical to another one,
  * or for generic types, true if compared to its raw type.
  */
 public boolean isEquivalentTo(TypeBinding otherType) {
-	if (this == otherType) return true;
+	
+	if (TypeBinding.equalsEquals(this, otherType)) return true;
 	if (otherType == null) return false;
 	switch(otherType.kind()) {
 		case Binding.WILDCARD_TYPE :
@@ -1450,24 +1640,54 @@
 	       not. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=186565 && https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827 
 		*/ 
 		case Binding.RAW_TYPE :
-			return otherType.erasure() == this;
+			return TypeBinding.equalsEquals(otherType.erasure(), this);
 	}
 	return false;
 }
 public boolean isGenericType() {
+	
+	if (!isPrototype())
+		return this.prototype.isGenericType();
+	
     return this.typeVariables != Binding.NO_TYPE_VARIABLES;
 }
 public boolean isHierarchyConnected() {
+	
+	if (!isPrototype())
+		return this.prototype.isHierarchyConnected();
+	
 	return (this.tagBits & (TagBits.HasUnresolvedSuperclass | TagBits.HasUnresolvedSuperinterfaces)) == 0;
 }
+public boolean isRepeatableAnnotationType() {
+	if (!isPrototype()) throw new IllegalStateException();
+	return this.containerAnnotationType != null;
+}
 public int kind() {
+	
+	if (!isPrototype())
+		return this.prototype.kind();
+	
 	if (this.typeVariables != Binding.NO_TYPE_VARIABLES)
 		return Binding.GENERIC_TYPE;
 	return Binding.TYPE;
 }
 // NOTE: member types of binary types are resolved when needed
 public ReferenceBinding[] memberTypes() {
- 	if ((this.tagBits & TagBits.HasUnresolvedMemberTypes) == 0)
+ 	if (!isPrototype()) {
+		if ((this.tagBits & TagBits.HasUnresolvedMemberTypes) == 0)
+			return this.memberTypes;
+		ReferenceBinding [] members = this.prototype.memberTypes();
+		int memberTypesLength = members == null ? 0 : members.length;
+		if (memberTypesLength > 0) {
+			this.memberTypes = new ReferenceBinding[memberTypesLength];
+			for (int i = 0; i < memberTypesLength; i++)
+				this.memberTypes[i] = this.environment.createMemberType(members[i], this);
+		}
+		this.tagBits &= ~TagBits.HasUnresolvedMemberTypes;
+		return this.memberTypes;	
+	}
+	
+	if ((this.tagBits & TagBits.HasUnresolvedMemberTypes) == 0)
 		return this.memberTypes;
 
 	for (int i = this.memberTypes.length; --i >= 0;)
@@ -1477,6 +1697,11 @@
 }
 // NOTE: the return type, arg & exception types of each method of a binary type are resolved when needed
 public MethodBinding[] methods() {
+	
+	if (!isPrototype()) {
+		return this.methods = this.prototype.methods();
+	}
+	
 	if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
 		return this.methods;
 
@@ -1492,7 +1717,28 @@
 	this.tagBits |= TagBits.AreMethodsComplete;
 	return this.methods;
 }
+
+public TypeBinding prototype() {
+	return this.prototype;
+}
+
+private boolean isPrototype() {
+	return this == this.prototype; //$IDENTITY-COMPARISON$
+}
+
+public ReferenceBinding containerAnnotationType() {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (this.containerAnnotationType instanceof UnresolvedReferenceBinding) {
+		this.containerAnnotationType = (ReferenceBinding) BinaryTypeBinding.resolveType(this.containerAnnotationType, this.environment, false);
+	}
+	return this.containerAnnotationType;
+}
+
 private FieldBinding resolveTypeFor(FieldBinding field) {
+	
+	if (!isPrototype())
+		return this.prototype.resolveTypeFor(field);
+	
 	if ((field.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
 		return field;
 
@@ -1523,6 +1769,10 @@
 	return field;
 }
 MethodBinding resolveTypesFor(MethodBinding method) {
+	
+	if (!isPrototype())
+		return this.prototype.resolveTypesFor(method);
+	
 	if ((method.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
 		return method;
 
@@ -1570,9 +1820,29 @@
 public
 // SH}
 AnnotationBinding[] retrieveAnnotations(Binding binding) {
+	
+	if (!isPrototype())
+		return this.prototype.retrieveAnnotations(binding);
+	
 	return AnnotationBinding.addStandardAnnotations(super.retrieveAnnotations(binding), binding.getAnnotationTagBits(), this.environment);
 }
+
+public void setContainerAnnotationType(ReferenceBinding value) {
+	if (!isPrototype()) throw new IllegalStateException();
+	this.containerAnnotationType = value;
+}
+
+public void tagAsHavingDefectiveContainerType() {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (this.containerAnnotationType != null && this.containerAnnotationType.isValidBinding())
+		this.containerAnnotationType = new ProblemReferenceBinding(this.containerAnnotationType.compoundName, this.containerAnnotationType, ProblemReasons.DefectiveContainerAnnotationType);
+}
+
 SimpleLookupTable storedAnnotations(boolean forceInitialize) {
+	
+	if (!isPrototype())
+		return this.prototype.storedAnnotations(forceInitialize);
+	
 	if (forceInitialize && this.storedAnnotations == null) {
 //{ObjectTeams: do support annotations for roles for the sake of copying:
 	  if (!this.isRole())
@@ -1584,7 +1854,19 @@
 	return this.storedAnnotations;
 }
 
-void scanFieldForNullAnnotation(IBinaryField field, FieldBinding fieldBinding) {
+private void scanFieldForNullAnnotation(IBinaryField field, FieldBinding fieldBinding) {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (this.environment.globalOptions.sourceLevel >= ClassFileConstants.JDK1_8) {
+		TypeBinding fieldType = fieldBinding.type;
+		if (fieldType != null
+				&& !fieldType.isBaseType()
+				&& (fieldType.tagBits & TagBits.AnnotationNullMASK) == 0
+				&& (this.tagBits & TagBits.AnnotationNonNullByDefault) != 0) {
+			fieldBinding.type = this.environment.createAnnotatedType(fieldType, new AnnotationBinding[]{this.environment.getNonNullAnnotation()});
+		}
+		return; // not using fieldBinding.tagBits when we have type annotations.
+	}
+
 	// global option is checked by caller
 	char[][] nullableAnnotationName = this.environment.getNullableAnnotationName();
 	char[][] nonNullAnnotationName = this.environment.getNonNullAnnotationName();
@@ -1619,9 +1901,12 @@
 	}
 }
 
-void scanMethodForNullAnnotation(IBinaryMethod method, MethodBinding methodBinding) {
+private void scanMethodForNullAnnotation(IBinaryMethod method, MethodBinding methodBinding) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (!this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled)
 		return;
+	boolean useTypeAnnotations = this.environment.globalOptions.sourceLevel >= ClassFileConstants.JDK1_8;
+	// in 1.8 we only need @NonNullByDefault, see below and exit further down.
 	char[][] nullableAnnotationName = this.environment.getNullableAnnotationName();
 	char[][] nonNullAnnotationName = this.environment.getNonNullAnnotationName();
 	char[][] nonNullByDefaultAnnotationName = this.environment.getNonNullByDefaultAnnotationName();
@@ -1640,17 +1925,21 @@
 			if (CharOperation.equals(typeName, nonNullByDefaultAnnotationName)) {
 				methodBinding.tagBits |= TagBits.AnnotationNonNullByDefault;
 			}
-			if (!explicitNullness && CharOperation.equals(typeName, nonNullAnnotationName)) {
-				methodBinding.tagBits |= TagBits.AnnotationNonNull;
-				explicitNullness = true;
-			}
-			if (!explicitNullness && CharOperation.equals(typeName, nullableAnnotationName)) {
-				methodBinding.tagBits |= TagBits.AnnotationNullable;
-				explicitNullness = true;
+			if (!useTypeAnnotations && !explicitNullness) {
+				if (CharOperation.equals(typeName, nonNullAnnotationName)) {
+					methodBinding.tagBits |= TagBits.AnnotationNonNull;
+					explicitNullness = true;
+				} else if (CharOperation.equals(typeName, nullableAnnotationName)) {
+					methodBinding.tagBits |= TagBits.AnnotationNullable;
+					explicitNullness = true;
+				}
 			}
 		}
 	}
 
+	if (useTypeAnnotations)
+		return;
+
 	// parameters:
 	TypeBinding[] parameters = methodBinding.parameters;
 	int numVisibleParams = parameters.length;
@@ -1683,7 +1972,8 @@
 		}
 	}
 }
-void scanTypeForNullDefaultAnnotation(IBinaryType binaryType, PackageBinding packageBinding, BinaryTypeBinding binaryBinding) {
+private void scanTypeForNullDefaultAnnotation(IBinaryType binaryType, PackageBinding packageBinding, BinaryTypeBinding binaryBinding) {
+	if (!isPrototype()) throw new IllegalStateException();
 	char[][] nonNullByDefaultAnnotationName = this.environment.getNonNullByDefaultAnnotationName();
 	if (nonNullByDefaultAnnotationName == null)
 		return; // not well-configured to use null annotations
@@ -1759,11 +2049,37 @@
 	}
 }
 
+private void scanTypeForContainerAnnotation(IBinaryType binaryType, char[][][] missingTypeNames) {
+	if (!isPrototype()) throw new IllegalStateException();
+	IBinaryAnnotation[] annotations = binaryType.getAnnotations();
+	if (annotations != null) {
+		int length = annotations.length;
+		for (int i = 0; i < length; i++) {
+			char[] annotationTypeName = annotations[i].getTypeName();
+			if (CharOperation.equals(annotationTypeName, ConstantPool.JAVA_LANG_ANNOTATION_REPEATABLE)) {
+				IBinaryElementValuePair[] elementValuePairs = annotations[i].getElementValuePairs();
+				if (elementValuePairs != null && elementValuePairs.length == 1) {
+					Object value = elementValuePairs[0].getValue();
+					if (value instanceof ClassSignature) {
+						this.containerAnnotationType = (ReferenceBinding) this.environment.getTypeFromSignature(((ClassSignature)value).getTypeName(), 0, -1, false, null, missingTypeNames, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
+					}
+				}
+				break;
+			}
+		}
+	}
+}
+
 /* Answer the receiver's superclass... null if the receiver is Object or an interface.
 *
 * NOTE: superclass of a binary type is resolved when needed
 */
 public ReferenceBinding superclass() {
+	
+	if (!isPrototype()) {
+		return this.superclass = this.prototype.superclass();
+	}
+	
 	if ((this.tagBits & TagBits.HasUnresolvedSuperclass) == 0)
 		return this.superclass;
 
@@ -1807,6 +2123,10 @@
 
 // NOTE: superInterfaces of binary types are resolved when needed
 public ReferenceBinding[] superInterfaces() {
+	
+	if (!isPrototype()) {
+		return this.superInterfaces = this.prototype.superInterfaces();
+	}
 	if ((this.tagBits & TagBits.HasUnresolvedSuperinterfaces) == 0)
 		return this.superInterfaces;
 
@@ -1831,6 +2151,10 @@
 	return this.superInterfaces;
 }
 public TypeVariableBinding[] typeVariables() {
+	
+	if (!isPrototype()) {
+		return this.typeVariables = this.prototype.typeVariables();
+	}
  	if ((this.tagBits & TagBits.HasUnresolvedTypeVariables) == 0)
 		return this.typeVariables;
 
@@ -1840,6 +2164,10 @@
 	return this.typeVariables;
 }
 public String toString() {
+	
+	if (this.hasTypeAnnotations())
+		return annotatedDebugName();
+	
 	StringBuffer buffer = new StringBuffer();
 
 	if (isDeprecated()) buffer.append("deprecated "); //$NON-NLS-1$
@@ -1935,11 +2263,24 @@
 	buffer.append("\n\n\n"); //$NON-NLS-1$
 	return buffer.toString();
 }
+
+public TypeBinding unannotated() {
+	return this.prototype;
+}
+
 MethodBinding[] unResolvedMethods() { // for the MethodVerifier so it doesn't resolve types
+	
+	if (!isPrototype())
+		return this.prototype.unResolvedMethods();
+	
 	return this.methods;
 }
 
 public FieldBinding[] unResolvedFields() {
+	
+	if (!isPrototype())
+		return this.prototype.unResolvedFields();
+	
 	return this.fields;
 }
 //{ObjectTeams: for use by TypeModel:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
index 72d4066..43df563 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Binding.java
@@ -1,17 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: Binding.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
+ *     Jesper Steen Moller - Contributions for
+ *								Bug 412150 [1.8] [compiler] Enable reflected parameter names during annotation processing
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -43,10 +48,16 @@
 	public static final int GENERIC_TYPE = TYPE | ASTNode.Bit12;
 	public static final int TYPE_PARAMETER = TYPE | ASTNode.Bit13;
 	public static final int INTERSECTION_TYPE = TYPE | ASTNode.Bit14;
+	// jsr 308
+	public static final int TYPE_USE = TYPE | ASTNode.Bit15;
+	public static final int INTERSECTION_CAST_TYPE = TYPE | ASTNode.Bit16;
+	public static final int POLY_TYPE = TYPE | ASTNode.Bit17;
+
+	// In the unlikely event you add a new type binding, remember to update TypeBindingVisitor and Scope.substitute methods. 
 
 //{ObjectTeams
-	public static final int BINDING = ASTNode.Bit15; //callin/callout-Binding
-	public static final int PRECEDENCE = ASTNode.Bit16; // binding for a precedence declaration
+	public static final int BINDING = ASTNode.Bit16; //callin/callout-Binding
+	public static final int PRECEDENCE = ASTNode.Bit17; // binding for a precedence declaration
 //Markus Witte + SH}
 
 	// Shared binding collections
@@ -61,6 +72,7 @@
 	public static final TypeVariableBinding[] NO_TYPE_VARIABLES = new TypeVariableBinding[0];
 	public static final AnnotationBinding[] NO_ANNOTATIONS = new AnnotationBinding[0];
 	public static final ElementValuePair[] NO_ELEMENT_VALUE_PAIRS = new ElementValuePair[0];
+	public static final char[][] NO_PARAMETER_NAMES = new char[0][];
 //{ObjectTeams
 	public static final CallinCalloutBinding[] NO_CALLIN_CALLOUT_BINDINGS = new CallinCalloutBinding[0];
 	public static final SyntheticArgumentBinding[] NO_SYNTH_ARGUMENTS = new SyntheticArgumentBinding[0];
@@ -97,6 +109,8 @@
 	/**
 	 * Compute the tagbits for standard annotations. For source types, these could require
 	 * lazily resolving corresponding annotation nodes, in case of forward references.
+	 * For type use bindings, this method still returns the tagbits corresponding to the type 
+	 * declaration binding.
 	 * @see org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding#getAnnotationTagBits()
 	 */
 	public long getAnnotationTagBits() {
@@ -112,6 +126,10 @@
 		// empty block
 	}
 
+	public boolean isAnnotationType() {
+		return false;
+	}
+	
 	/* API
 	* Answer true if the receiver is not a problem binding
 	*/
@@ -121,6 +139,9 @@
 	public boolean isVolatile() {
 		return false;
 	}
+	public boolean isTaggedRepeatable() {
+		return false;
+	}
 	public boolean isParameter() {
 		return false;
 	}
@@ -141,4 +162,13 @@
 	public char[] shortReadableName(){
 		return readableName();
 	}
+	public AnnotationBinding[] getAnnotations() {
+		return Binding.NO_ANNOTATIONS;
+	}
+	public void setAnnotations(AnnotationBinding[] annotations, Scope scope) {
+		setAnnotations(annotations);
+	}
+	public void setAnnotations(AnnotationBinding[] annotations) {
+		// Left to subtypes.
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
index 966e914..4aa756a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: BlockScope.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -19,6 +22,7 @@
  *								bug 388996 - [compiler][resource] Incorrect 'potential resource leak'
  *								bug 379784 - [compiler] "Method can be static" is not getting reported
  *								bug 394768 - [compiler][resource] Incorrect resource leak warning when creating stream in conditional
+ *								bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
  *     Jesper S Moller <jesper@selskabet.org> - Contributions for
  *								bug 378674 - "The method can be declared as static" is wrong
  *     Keigo Imai - Contribution for  bug 388903 - Cannot extend inner class as an anonymous class when it extends the outer class
@@ -109,9 +113,15 @@
 	anonymousClassScope.buildAnonymousTypeBinding(
 		enclosingSourceType(),
 		superBinding);
+	
+	/* Tag any enclosing lambdas as instance capturing. Strictly speaking they need not be, unless the local/anonymous type references enclosing instance state.
+	   but the types themselves track enclosing types regardless of whether the state is accessed or not. This creates a mismatch in expectations in code generation
+	   time, if we choose to make the lambda method static. To keep things simple and avoid a messy rollback, we force the lambda to be an instance method under 
+	   this situation. However if per source, the lambda occurs in a static context, we would generate a static synthetic method.
+	*/
+	MethodScope methodScope = methodScope();
 //{ObjectTeams: nested type of method mapping (via param map)?
 	if (anonymousType.binding != null) {
-		MethodScope methodScope = methodScope();
 		if (   methodScope != null 
 			&& methodScope.referenceContext instanceof AbstractMethodDeclaration
 			&& ((AbstractMethodDeclaration)methodScope.referenceContext).isMappingWrapper != WrapperKind.NONE)
@@ -120,6 +130,13 @@
 			anonymousType.binding.setIsRoleLocal();
 	}
 // SH}
+	while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) {
+		LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext;
+		if (!lambda.scope.isStatic) {
+			lambda.shouldCaptureInstance = true;
+		}
+		methodScope = methodScope.enclosingMethodScope();
+	}
 }
 
 /* Create the class scope & binding for the local type.
@@ -128,6 +145,16 @@
 	ClassScope localTypeScope = new ClassScope(this, localType);
 	addSubscope(localTypeScope);
 	localTypeScope.buildLocalTypeBinding(enclosingSourceType());
+	
+	// See comment in addAnonymousType.
+	MethodScope methodScope = methodScope();
+	while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) {
+		LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext;
+		if (!lambda.scope.isStatic) {
+			lambda.shouldCaptureInstance = true;
+		}
+		methodScope = methodScope.enclosingMethodScope();
+	}
 }
 
 /* Insert a local variable into a given scope, updating its position
@@ -172,12 +199,14 @@
 		return true;
 // SH}
 
-	if (enclosingReceiverType() != binding.declaringClass)
+	if (TypeBinding.notEquals(enclosingReceiverType(), binding.declaringClass))
 		return false;
 
 	MethodScope methodScope = methodScope();
 	if (methodScope.isStatic != binding.isStatic())
 		return false;
+	if (methodScope.isLambdaScope()) 
+		return false;
 	return methodScope.isInsideInitializer() // inside initializer
 			|| ((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod(); // inside constructor or clinit
 }
@@ -290,7 +319,7 @@
 				// assign variable position
 				local.resolvedPosition = this.offset;
 
-				if ((local.type == TypeBinding.LONG) || (local.type == TypeBinding.DOUBLE)) {
+				if ((TypeBinding.equalsEquals(local.type, TypeBinding.LONG)) || (TypeBinding.equalsEquals(local.type, TypeBinding.DOUBLE))) {
 					this.offset += 2;
 				} else {
 					this.offset++;
@@ -321,6 +350,26 @@
 	BlockScope outerVariableScope = outerLocalVariable.declaringScope;
 	if (outerVariableScope == null)
 		return; // no need to further emulate as already inserted (val$this$0)
+	
+	int depth = 0;
+	Scope scope = this;
+	while (outerVariableScope != scope) {
+		switch(scope.kind) {
+			case CLASS_SCOPE:
+				depth++;
+				break;
+			case METHOD_SCOPE: 
+				if (scope.isLambdaScope()) {
+					LambdaExpression lambdaExpression = (LambdaExpression) scope.referenceContext();
+					lambdaExpression.addSyntheticArgument(outerLocalVariable);
+				}
+				break;
+		}
+		scope = scope.parent;
+	}
+	if (depth == 0) 
+		return;
+	
 	MethodScope currentMethodScope = methodScope();
 	if (outerVariableScope.methodScope() != currentMethodScope) {
 		NestedTypeBinding currentType = (NestedTypeBinding) enclosingSourceType();
@@ -828,6 +877,13 @@
 		return new VariableBinding[] { outerLocalVariable };
 		// implicit this is good enough
 	}
+	if (currentMethodScope.isLambdaScope()) {
+		LambdaExpression lambda = (LambdaExpression) currentMethodScope.referenceContext;
+		SyntheticArgumentBinding syntheticArgument;
+		if ((syntheticArgument = lambda.getSyntheticArgument(outerLocalVariable)) != null) {
+			return new VariableBinding[] { syntheticArgument };
+		}
+	}
 	// use synthetic constructor arguments if possible
 	if (currentMethodScope.isInsideInitializerOrConstructor()
 		&& (sourceType.isNestedType())) {
@@ -863,7 +919,7 @@
 
 	// use 'this' if possible
 	if (!currentMethodScope.isStatic && !currentMethodScope.isConstructorCall) {
-		if (sourceType == targetEnclosingType || (!onlyExactMatch && sourceType.findSuperTypeOriginatingFrom(targetEnclosingType) != null)) {
+		if (TypeBinding.equalsEquals(sourceType, targetEnclosingType) || (!onlyExactMatch && sourceType.findSuperTypeOriginatingFrom(targetEnclosingType) != null)) {
 			return BlockScope.EmulationPathToImplicitThis; // implicit this is good enough
 		}
 	}
@@ -886,7 +942,7 @@
 			if (denyEnclosingArgInConstructorCall
 					&& currentMethodScope.isConstructorCall
 					&& !isAnonymousAndHasEnclosing
-					&& (sourceType == targetEnclosingType || (!onlyExactMatch && sourceType.findSuperTypeOriginatingFrom(targetEnclosingType) != null))) {
+					&& (TypeBinding.equalsEquals(sourceType, targetEnclosingType) || (!onlyExactMatch && sourceType.findSuperTypeOriginatingFrom(targetEnclosingType) != null))) {
 				return BlockScope.NoEnclosingInstanceInConstructorCall;
 			}
 			return new Object[] { syntheticArg };
@@ -920,7 +976,7 @@
 			if (enclosingArgument != null) {
 				FieldBinding syntheticField = sourceType.getSyntheticField(enclosingArgument);
 				if (syntheticField != null) {
-					if (syntheticField.type == targetEnclosingType || (!onlyExactMatch && ((ReferenceBinding)syntheticField.type).findSuperTypeOriginatingFrom(targetEnclosingType) != null))
+					if (TypeBinding.equalsEquals(syntheticField.type, targetEnclosingType) || (!onlyExactMatch && ((ReferenceBinding)syntheticField.type).findSuperTypeOriginatingFrom(targetEnclosingType) != null))
 						return new Object[] { syntheticField };
 				}
 			}
@@ -963,7 +1019,7 @@
 		while ((currentEnclosingType = currentType.enclosingType()) != null) {
 
 			//done?
-			if (currentType == targetEnclosingType
+			if (TypeBinding.equalsEquals(currentType, targetEnclosingType)
 				|| (!onlyExactMatch && currentType.findSuperTypeOriginatingFrom(targetEnclosingType) != null))	break;
 
 			if (currentMethodScope != null) {
@@ -1002,7 +1058,7 @@
 // SH}
 			currentType = currentEnclosingType;
 		}
-		if (currentType == targetEnclosingType
+		if (TypeBinding.equalsEquals(currentType, targetEnclosingType)
 			|| (!onlyExactMatch && currentType.findSuperTypeOriginatingFrom(targetEnclosingType) != null)) {
 			return path;
 		}
@@ -1049,12 +1105,14 @@
 	while (methodScope != null) {
 		if (methodScope.isStatic != isStatic)
 			return false;
+		if (methodScope.isLambdaScope())
+			return false;
 		if (!methodScope.isInsideInitializer() // inside initializer
 				&& !((AbstractMethodDeclaration) methodScope.referenceContext).isInitializationMethod()) { // inside constructor or clinit
 			return false; // found some non-initializer context
 		}
 		ReferenceBinding enclosingType = methodScope.enclosingReceiverType();
-		if (enclosingType == fieldDeclaringClass) {
+		if (TypeBinding.equalsEquals(enclosingType, fieldDeclaringClass)) {
 			return true; // found the field context, no need to check any further
 		}
 		if (!enclosingType.erasure().isAnonymousType()) {
@@ -1088,7 +1146,7 @@
 			SyntheticArgumentBinding syntheticArg = syntheticArguments[i];
 			// need to filter out the one that could match a supplied enclosing instance
 			if (!(isEnclosingInstanceSupplied
-				&& (syntheticArg.type == targetType.enclosingType()))) {
+				&& (TypeBinding.equalsEquals(syntheticArg.type, targetType.enclosingType())))) {
 				emulateOuterAccess(syntheticArg.actualOuterLocalVariable);
 			}
 		}
@@ -1133,57 +1191,6 @@
 			s += ((BlockScope) this.subscopes[i]).toString(tab + 1) + "\n"; //$NON-NLS-1$
 	return s;
 }
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=318682
-/**
- * This method is used to reset the CanBeStatic the enclosing method of the current block
- */
-public void resetEnclosingMethodStaticFlag() {
-	MethodScope methodScope = methodScope();
-	if (methodScope != null) {
-		if (methodScope.referenceContext instanceof MethodDeclaration) {
-			MethodDeclaration methodDeclaration = (MethodDeclaration) methodScope.referenceContext;
-			methodDeclaration.bits &= ~ASTNode.CanBeStatic;
-		} else if (methodScope.referenceContext instanceof TypeDeclaration) {
-			// anonymous type, find enclosing method
-			methodScope = methodScope.enclosingMethodScope();
-			if (methodScope != null && methodScope.referenceContext instanceof MethodDeclaration) {
-				MethodDeclaration methodDeclaration = (MethodDeclaration) methodScope.referenceContext;
-				methodDeclaration.bits &= ~ASTNode.CanBeStatic;
-			}
-		}
-	}
-}
-
-// https://bugs.eclipse.org/bugs/show_bug.cgi?id=376550
-/**
- * This method is used to reset the CanBeStatic on all enclosing methods until the method 
- * belonging to the enclosingInstanceType
- * @param enclosingInstanceType type of which an enclosing instance is required in the code.
- */
-public void resetDeclaringClassMethodStaticFlag(TypeBinding enclosingInstanceType) {
-	MethodScope methodScope = methodScope();
-	if (methodScope != null && methodScope.referenceContext instanceof TypeDeclaration) {
-		if (!methodScope.enclosingReceiverType().isCompatibleWith(enclosingInstanceType)) { // unless invoking a method of the local type ...
-			// anonymous type, find enclosing method
-			methodScope = methodScope.enclosingMethodScope();
-		}
-	}
-	while (methodScope != null && methodScope.referenceContext instanceof MethodDeclaration) {
-		MethodDeclaration methodDeclaration = (MethodDeclaration) methodScope.referenceContext;
-		methodDeclaration.bits &= ~ASTNode.CanBeStatic;
-		ClassScope enclosingClassScope = methodScope.enclosingClassScope();
-		if (enclosingClassScope != null) {
-			TypeDeclaration type = enclosingClassScope.referenceContext;
-			if (type != null && type.binding != null && enclosingInstanceType != null
-					&& !type.binding.isCompatibleWith(enclosingInstanceType.original()))
-			{
-				methodScope = enclosingClassScope.enclosingMethodScope();
-				continue;
-			}
-		}
-		break;
-	}
-}
 
 private List trackingVariables; // can be null if no resources are tracked
 /** Used only during analyseCode and only for checking if a resource was closed in a finallyBlock. */
@@ -1361,4 +1368,31 @@
 	if (this.parent instanceof BlockScope)
 		((BlockScope) this.parent).correlateTrackingVarsIfElse(thenFlowInfo, elseFlowInfo);
 }
+
+/** 15.12.3 (Java 8) "Compile-Time Step 3: Is the Chosen Method Appropriate?" */
+public void checkAppropriateMethodAgainstSupers(char[] selector, MethodBinding compileTimeMethod,
+		TypeBinding[] parameters, InvocationSite site)
+{
+	ReferenceBinding enclosingType = enclosingReceiverType();
+	MethodBinding otherMethod = getMethod(enclosingType.superclass(), selector, parameters, site);
+	if (checkAppropriate(compileTimeMethod, otherMethod, site)) {
+		ReferenceBinding[] superInterfaces = enclosingType.superInterfaces();
+		if (superInterfaces != null) {
+			for (int i = 0; i < superInterfaces.length; i++) {
+				otherMethod = getMethod(superInterfaces[i], selector, parameters, site);
+				if (!checkAppropriate(compileTimeMethod, otherMethod, site))
+					break;
+			}
+		}
+	}
+}
+private boolean checkAppropriate(MethodBinding compileTimeDeclaration, MethodBinding otherMethod, InvocationSite location) {
+	if (otherMethod == null || !otherMethod.isValidBinding() || otherMethod == compileTimeDeclaration)
+		return true;
+	if (MethodVerifier.doesMethodOverride(otherMethod, compileTimeDeclaration, this.environment())) {
+		problemReporter().illegalSuperCallBypassingOverride(location, compileTimeDeclaration, otherMethod.declaringClass);
+		return false; 
+	}
+	return true;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java
index 03df6f1..2264fb1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -36,6 +40,23 @@
 		this.sourceType = sourceType;
 		this.position = position;
 		this.captureID = captureID;
+		if (wildcard.hasTypeAnnotations()) {
+			setTypeAnnotations(wildcard.getTypeAnnotations(), wildcard.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled);
+		}
+	}
+	
+	public CaptureBinding(CaptureBinding prototype) {
+		super(prototype);
+		this.wildcard = prototype.wildcard;
+		this.sourceType = prototype.sourceType;
+		this.position = prototype.position;
+		this.captureID = prototype.captureID;
+		this.lowerBound = prototype.lowerBound;
+	}
+	
+	// Captures may get cloned and annotated during type inference.
+	public TypeBinding clone(TypeBinding enclosingType) {
+		return new CaptureBinding(this);
 	}
 
 	/*
@@ -63,6 +84,11 @@
 
 		if (this.wildcard != null) {
 			StringBuffer buffer = new StringBuffer(10);
+			AnnotationBinding [] annotations = getTypeAnnotations();
+			for (int i = 0, length = annotations == null ? 0 : annotations.length; i < length; i++) {
+				buffer.append(annotations[i]);
+				buffer.append(' ');
+			}
 			buffer
 				.append(TypeConstants.WILDCARD_CAPTURE_NAME_PREFIX)
 				.append(this.captureID)
@@ -95,30 +121,30 @@
 					// still need to capture bound supertype as well so as not to expose wildcards to the outside (111208)
 					TypeBinding capturedWildcardBound = originalWildcardBound.capture(scope, this.position);
 					if (originalWildcardBound.isInterface()) {
-						this.superclass = scope.getJavaLangObject();
-						this.superInterfaces = new ReferenceBinding[] { (ReferenceBinding) capturedWildcardBound };
+						this.setSuperClass(scope.getJavaLangObject());
+						this.setSuperInterfaces(new ReferenceBinding[] { (ReferenceBinding) capturedWildcardBound });
 					} else {
 						// the wildcard bound should be a subtype of variable superclass
 						// it may occur that the bound is less specific, then consider glb (202404)
-						if (capturedWildcardBound.isArrayType() || capturedWildcardBound == this) {
-							this.superclass = scope.getJavaLangObject();
+						if (capturedWildcardBound.isArrayType() || TypeBinding.equalsEquals(capturedWildcardBound, this)) {
+							this.setSuperClass(scope.getJavaLangObject());
 						} else {
-							this.superclass = (ReferenceBinding) capturedWildcardBound;
+							this.setSuperClass((ReferenceBinding) capturedWildcardBound);
 						}
-						this.superInterfaces = Binding.NO_SUPERINTERFACES;
+						this.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 					}
-					this.firstBound =  capturedWildcardBound;
+					this.setFirstBound(capturedWildcardBound);
 					if ((capturedWildcardBound.tagBits & TagBits.HasTypeVariable) == 0)
 						this.tagBits &= ~TagBits.HasTypeVariable;
 					break;
 				case Wildcard.UNBOUND :
-					this.superclass = scope.getJavaLangObject();
-					this.superInterfaces = Binding.NO_SUPERINTERFACES;
+					this.setSuperClass(scope.getJavaLangObject());
+					this.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 					this.tagBits &= ~TagBits.HasTypeVariable;
 					break;
 				case Wildcard.SUPER :
-					this.superclass = scope.getJavaLangObject();
-					this.superInterfaces = Binding.NO_SUPERINTERFACES;
+					this.setSuperClass(scope.getJavaLangObject());
+					this.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 					this.lowerBound = this.wildcard.bound;
 					if ((originalWildcardBound.tagBits & TagBits.HasTypeVariable) == 0)
 						this.tagBits &= ~TagBits.HasTypeVariable;
@@ -129,14 +155,14 @@
 		ReferenceBinding originalVariableSuperclass = wildcardVariable.superclass;
 		ReferenceBinding substitutedVariableSuperclass = (ReferenceBinding) Scope.substitute(capturedParameterizedType, originalVariableSuperclass);
 		// prevent cyclic capture: given X<T>, capture(X<? extends T> could yield a circular type
-		if (substitutedVariableSuperclass == this) substitutedVariableSuperclass = originalVariableSuperclass;
+		if (TypeBinding.equalsEquals(substitutedVariableSuperclass, this)) substitutedVariableSuperclass = originalVariableSuperclass;
 
 		ReferenceBinding[] originalVariableInterfaces = wildcardVariable.superInterfaces();
 		ReferenceBinding[] substitutedVariableInterfaces = Scope.substitute(capturedParameterizedType, originalVariableInterfaces);
 		if (substitutedVariableInterfaces != originalVariableInterfaces) {
 			// prevent cyclic capture: given X<T>, capture(X<? extends T> could yield a circular type
 			for (int i = 0, length = substitutedVariableInterfaces.length; i < length; i++) {
-				if (substitutedVariableInterfaces[i] == this) substitutedVariableInterfaces[i] = originalVariableInterfaces[i];
+				if (TypeBinding.equalsEquals(substitutedVariableInterfaces[i], this)) substitutedVariableInterfaces[i] = originalVariableInterfaces[i];
 			}
 		}
 		// no substitution for wildcard bound (only formal bounds from type variables are to be substituted: 104082)
@@ -151,44 +177,44 @@
 					capturedWildcardBound = RoleTypeCreator.maybeWrapUnqualifiedRoleType(scope, capturedWildcardBound.enclosingType(), capturedWildcardBound, scope.methodScope().referenceMethod(), scope.problemReporter());
 // SH}
 				if (originalWildcardBound.isInterface()) {
-					this.superclass = substitutedVariableSuperclass;
+					this.setSuperClass(substitutedVariableSuperclass);
 					// merge wildcard bound into variable superinterfaces using glb
 					if (substitutedVariableInterfaces == Binding.NO_SUPERINTERFACES) {
-						this.superInterfaces = new ReferenceBinding[] { (ReferenceBinding) capturedWildcardBound };
+						this.setSuperInterfaces(new ReferenceBinding[] { (ReferenceBinding) capturedWildcardBound });
 					} else {
 						int length = substitutedVariableInterfaces.length;
 						System.arraycopy(substitutedVariableInterfaces, 0, substitutedVariableInterfaces = new ReferenceBinding[length+1], 1, length);
 						substitutedVariableInterfaces[0] =  (ReferenceBinding) capturedWildcardBound;
-						this.superInterfaces = Scope.greaterLowerBound(substitutedVariableInterfaces);
+						this.setSuperInterfaces(Scope.greaterLowerBound(substitutedVariableInterfaces));
 					}
 				} else {
 					// the wildcard bound should be a subtype of variable superclass
 					// it may occur that the bound is less specific, then consider glb (202404)
-					if (capturedWildcardBound.isArrayType() || capturedWildcardBound == this) {
-						this.superclass = substitutedVariableSuperclass;
+					if (capturedWildcardBound.isArrayType() || TypeBinding.equalsEquals(capturedWildcardBound, this)) {
+						this.setSuperClass(substitutedVariableSuperclass);
 					} else {
-						this.superclass = (ReferenceBinding) capturedWildcardBound;
+						this.setSuperClass((ReferenceBinding) capturedWildcardBound);
 						if (this.superclass.isSuperclassOf(substitutedVariableSuperclass)) {
-							this.superclass = substitutedVariableSuperclass;
+							this.setSuperClass(substitutedVariableSuperclass);
 						}
 					}
-					this.superInterfaces = substitutedVariableInterfaces;
+					this.setSuperInterfaces(substitutedVariableInterfaces);
 				}
-				this.firstBound =  capturedWildcardBound;
+				this.setFirstBound(capturedWildcardBound);
 				if ((capturedWildcardBound.tagBits & TagBits.HasTypeVariable) == 0)
 					this.tagBits &= ~TagBits.HasTypeVariable;
 				break;
 			case Wildcard.UNBOUND :
-				this.superclass = substitutedVariableSuperclass;
-				this.superInterfaces = substitutedVariableInterfaces;
+				this.setSuperClass(substitutedVariableSuperclass);
+				this.setSuperInterfaces(substitutedVariableInterfaces);
 				this.tagBits &= ~TagBits.HasTypeVariable;
 				break;
 			case Wildcard.SUPER :
-				this.superclass = substitutedVariableSuperclass;
-				if (wildcardVariable.firstBound == substitutedVariableSuperclass || originalWildcardBound == substitutedVariableSuperclass) {
-					this.firstBound = substitutedVariableSuperclass;
+				this.setSuperClass(substitutedVariableSuperclass);
+				if (TypeBinding.equalsEquals(wildcardVariable.firstBound, substitutedVariableSuperclass) || TypeBinding.equalsEquals(originalWildcardBound, substitutedVariableSuperclass)) {
+					this.setFirstBound(substitutedVariableSuperclass);
 				}
-				this.superInterfaces = substitutedVariableInterfaces;
+				this.setSuperInterfaces(substitutedVariableInterfaces);
 				this.lowerBound = originalWildcardBound;
 				if ((originalWildcardBound.tagBits & TagBits.HasTypeVariable) == 0)
 					this.tagBits &= ~TagBits.HasTypeVariable;
@@ -207,7 +233,7 @@
 	 * @see TypeBinding#isEquivalentTo(TypeBinding)
 	 */
 	public boolean isEquivalentTo(TypeBinding otherType) {
-	    if (this == otherType) return true;
+	    if (equalsEquals(this, otherType)) return true;
 	    if (otherType == null) return false;
 		// capture of ? extends X[]
 		if (this.firstBound != null && this.firstBound.isArrayType()) {
@@ -257,6 +283,11 @@
 	public String toString() {
 		if (this.wildcard != null) {
 			StringBuffer buffer = new StringBuffer(10);
+			AnnotationBinding [] annotations = getTypeAnnotations();
+			for (int i = 0, length = annotations == null ? 0 : annotations.length; i < length; i++) {
+				buffer.append(annotations[i]);
+				buffer.append(' ');
+			}
 			buffer
 				.append(TypeConstants.WILDCARD_CAPTURE_NAME_PREFIX)
 				.append(this.captureID)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java
index 289655c..15e1556 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CatchParameterBinding.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -27,11 +31,14 @@
 	public void setPreciseType(TypeBinding raisedException) {
 		int length = this.preciseTypes.length;
 		for (int i = 0; i < length; ++i) {
-			if (this.preciseTypes[i] == raisedException)
+			if (TypeBinding.equalsEquals(this.preciseTypes[i], raisedException))
 				return;
 		}
 		System.arraycopy(this.preciseTypes, 0, this.preciseTypes = new TypeBinding [length + 1], 0, length);
 		this.preciseTypes[length] = raisedException;
 		return;
 	}
+	public boolean isCatchParameter() {
+		return true;
+	}
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
index 1614bc7..b8bdc8f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ClassScope.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -17,6 +21,9 @@
  *     						Bug 358903 - Filter practically unimportant resource leak warnings
  *							Bug 395977 - [compiler][resource] Resource leak warning behavior possibly incorrect for anonymous inner class
  *							Bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *							Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 415821 - [1.8][compiler] CLASS_EXTENDS target type annotation missing for anonymous classes
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -166,33 +173,35 @@
 		}
 		anonymousType.typeBits |= inheritedBits;
 		if (supertype.isInterface()) {
-			anonymousType.superclass = getJavaLangObject();
-			anonymousType.superInterfaces = new ReferenceBinding[] { supertype };
+			anonymousType.setSuperClass(getJavaLangObject());
+			anonymousType.setSuperInterfaces(new ReferenceBinding[] { supertype });
 			TypeReference typeReference = this.referenceContext.allocation.type;
 			if (typeReference != null) {
+				this.referenceContext.superInterfaces = new TypeReference[] { typeReference };
 				if ((supertype.tagBits & TagBits.HasDirectWildcard) != 0) {
 					problemReporter().superTypeCannotUseWildcard(anonymousType, typeReference, supertype);
 					anonymousType.tagBits |= TagBits.HierarchyHasProblems;
-					anonymousType.superInterfaces = Binding.NO_SUPERINTERFACES;
+					anonymousType.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 				}
 			}
 		} else {
-			anonymousType.superclass = supertype;
-			anonymousType.superInterfaces = Binding.NO_SUPERINTERFACES;
+			anonymousType.setSuperClass(supertype);
+			anonymousType.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 			TypeReference typeReference = this.referenceContext.allocation.type;
 			if (typeReference != null) { // no check for enum constant body
+				this.referenceContext.superclass = typeReference;
 				if (supertype.erasure().id == TypeIds.T_JavaLangEnum) {
 					problemReporter().cannotExtendEnum(anonymousType, typeReference, supertype);
 					anonymousType.tagBits |= TagBits.HierarchyHasProblems;
-					anonymousType.superclass = getJavaLangObject();
+					anonymousType.setSuperClass(getJavaLangObject());
 				} else if (supertype.isFinal()) {
 					problemReporter().anonymousClassCannotExtendFinalClass(typeReference, supertype);
 					anonymousType.tagBits |= TagBits.HierarchyHasProblems;
-					anonymousType.superclass = getJavaLangObject();
+					anonymousType.setSuperClass(getJavaLangObject());
 				} else if ((supertype.tagBits & TagBits.HasDirectWildcard) != 0) {
 					problemReporter().superTypeCannotUseWildcard(anonymousType, typeReference, supertype);
 					anonymousType.tagBits |= TagBits.HierarchyHasProblems;
-					anonymousType.superclass = getJavaLangObject();
+					anonymousType.setSuperClass(getJavaLangObject());
 				}
 			}
 		}
@@ -415,7 +424,7 @@
 			if (count != size)
 				System.arraycopy(memberTypeBindings, 0, memberTypeBindings = new ReferenceBinding[count], 0, count);
 		}
-		localType.memberTypes = memberTypeBindings;
+		localType.setMemberTypes(memberTypeBindings);
 		return localType;
 	}
 
@@ -502,7 +511,7 @@
 			if (count != length)
 				System.arraycopy(memberTypeBindings, 0, memberTypeBindings = new ReferenceBinding[count], 0, count);
 		}
-		sourceType.memberTypes = memberTypeBindings;
+		sourceType.setMemberTypes(memberTypeBindings);
 	}
 
 	void buildMethods() {
@@ -547,7 +556,7 @@
 // SH}
 					MethodBinding methodBinding = scope.createMethod(methods[i]);
 					if (methodBinding != null) { // is null if binding could not be created
- 						methodBindings[count++] = methodBinding;
+						methodBindings[count++] = methodBinding;
 						hasNativeMethods = hasNativeMethods || methodBinding.isNative();
 					}
 				}
@@ -707,10 +716,10 @@
 		TypeParameter[] typeParameters = this.referenceContext.typeParameters;
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850, If they exist at all, process type parameters irrespective of source level.
 		if (typeParameters == null || typeParameters.length == 0) {
-		    sourceType.typeVariables = Binding.NO_TYPE_VARIABLES;
+		    sourceType.setTypeVariables(Binding.NO_TYPE_VARIABLES);
 		    return;
 		}
-		sourceType.typeVariables = Binding.NO_TYPE_VARIABLES; // safety
+		sourceType.setTypeVariables(Binding.NO_TYPE_VARIABLES); // safety
 
 		if (sourceType.id == TypeIds.T_JavaLangObject) { // handle the case of redefining java.lang.Object up front
 			problemReporter().objectCannotBeGeneric(this.referenceContext);
@@ -721,7 +730,7 @@
 		if (typeParameters.length == 0)
 			return; // consumed all parameters
 // SH}
-		sourceType.typeVariables = createTypeVariables(typeParameters, sourceType);
+		sourceType.setTypeVariables(createTypeVariables(typeParameters, sourceType));
 		sourceType.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
 	}
 
@@ -913,6 +922,10 @@
 	}
 //Markus Witte}
 
+	void resolveTypeParameter(TypeParameter typeParameter) {
+		typeParameter.resolve(this);
+	}
+
 	private void checkAndSetModifiers() {
 		SourceTypeBinding sourceType = this.referenceContext.binding;
 		int modifiers = sourceType.modifiers;
@@ -964,6 +977,8 @@
 				switch (scope.kind) {
 					case METHOD_SCOPE :
 						MethodScope methodScope = (MethodScope) scope;
+						if (methodScope.isLambdaScope()) 
+							methodScope = methodScope.namedMethodScope();
 						if (methodScope.isInsideInitializer()) {
 							SourceTypeBinding type = ((TypeDeclaration) methodScope.referenceContext).binding;
 
@@ -1330,7 +1345,7 @@
 
 			TypeReference[] boundRefs = typeParameter.bounds;
 			if (boundRefs != null) {
-				boolean checkSuperclass = typeVariable.firstBound == typeVariable.superclass;
+				boolean checkSuperclass = TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.superclass);
 				for (int j = 0, boundLength = boundRefs.length; j < boundLength; j++) {
 					TypeReference typeRef = boundRefs[j];
 					TypeBinding superType = typeRef.resolvedType;
@@ -1382,7 +1397,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -1407,7 +1422,7 @@
 						nextInterface : for (int a = 0; a < itsLength; a++) {
 							ReferenceBinding next = itsInterfaces[a];
 							for (int b = 0; b < nextPosition; b++)
-								if (next == interfacesToVisit[b]) continue nextInterface;
+								if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 							interfacesToVisit[nextPosition++] = next;
 						}
 					}
@@ -1531,8 +1546,8 @@
 			return connectSuperteam();
 // SH}
 		if (sourceType.id == TypeIds.T_JavaLangObject) { // handle the case of redefining java.lang.Object up front
-			sourceType.superclass = null;
-			sourceType.superInterfaces = Binding.NO_SUPERINTERFACES;
+			sourceType.setSuperClass(null);
+			sourceType.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 			if (!sourceType.isClass())
 				problemReporter().objectMustBeClass(sourceType);
 			if (this.referenceContext.superclass != null || (this.referenceContext.superInterfaces != null && this.referenceContext.superInterfaces.length > 0))
@@ -1546,7 +1561,7 @@
 // SH}
 			if (sourceType.isEnum() && compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) // do not connect if source < 1.5 as enum already got flagged as syntax error
 				return connectEnumSuperclass();
-			sourceType.superclass = getJavaLangObject();
+			sourceType.setSuperClass(getJavaLangObject());
 			return !detectHierarchyCycle(sourceType, sourceType.superclass, null);
 		}
 		TypeReference superclassRef = this.referenceContext.superclass;
@@ -1581,7 +1596,7 @@
 				problemReporter().cannotExtendEnum(sourceType, superclassRef, superclass);
 			} else if ((superclass.tagBits & TagBits.HierarchyHasProblems) != 0
 					|| !superclassRef.resolvedType.isValidBinding()) {
-				sourceType.superclass = superclass;
+				sourceType.setSuperClass(superclass);
 				sourceType.tagBits |= TagBits.HierarchyHasProblems; // propagate if missing supertype
 				return superclassRef.resolvedType.isValidBinding(); // reported some error against the source type ?
 //{ObjectTeams: team super class only allowed for teams
@@ -1592,7 +1607,7 @@
 // SH}
 			} else {
 				// only want to reach here when no errors are reported
-				sourceType.superclass = superclass;
+				sourceType.setSuperClass(superclass);
 				sourceType.typeBits |= (superclass.typeBits & TypeIds.InheritableBits);
 				// further analysis against white lists for the unlikely case we are compiling java.io.*:
 				if ((sourceType.typeBits & (TypeIds.BitAutoCloseable|TypeIds.BitCloseable)) != 0)
@@ -1601,7 +1616,7 @@
 			}
 		}
 		sourceType.tagBits |= TagBits.HierarchyHasProblems;
-		sourceType.superclass = getJavaLangObject();
+		sourceType.setSuperClass(getJavaLangObject());
 		if ((sourceType.superclass.tagBits & TagBits.BeginHierarchyCheck) == 0)
 			detectHierarchyCycle(sourceType, sourceType.superclass, null);
 		return false; // reported some error against the source type
@@ -1615,7 +1630,7 @@
 		ReferenceBinding rootEnumType = getJavaLangEnum();
 		if ((rootEnumType.tagBits & TagBits.HasMissingType) != 0) {
 			sourceType.tagBits |= TagBits.HierarchyHasProblems; // mark missing supertpye
-			sourceType.superclass = rootEnumType;
+			sourceType.setSuperClass(rootEnumType);
 			return false;
 		}
 		boolean foundCycle = detectHierarchyCycle(sourceType, rootEnumType, null);
@@ -1636,7 +1651,7 @@
 			} ,
 			null);
 		sourceType.tagBits |= (superType.tagBits & TagBits.HierarchyHasProblems); // propagate if missing supertpye
-		sourceType.superclass = superType;
+		sourceType.setSuperClass(superType);
 		// bound check (in case of bogus definition of Enum type)
 		if (refTypeVariables[0].boundCheck(superType, sourceType, this) != TypeConstants.OK) {
 			problemReporter().typeMismatchError(rootEnumType, refTypeVariables[0], sourceType, null);
@@ -2011,12 +2026,12 @@
 	*/
 	private boolean connectSuperInterfaces() {
 		SourceTypeBinding sourceType = this.referenceContext.binding;
-		sourceType.superInterfaces = Binding.NO_SUPERINTERFACES;
+		sourceType.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 		if (this.referenceContext.superInterfaces == null) {
 			if (sourceType.isAnnotationType() && compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) { // do not connect if source < 1.5 as annotation already got flagged as syntax error) {
 				ReferenceBinding annotationType = getJavaLangAnnotationAnnotation();
 				boolean foundCycle = detectHierarchyCycle(sourceType, annotationType, null);
-				sourceType.superInterfaces = new ReferenceBinding[] { annotationType };
+				sourceType.setSuperInterfaces(new ReferenceBinding[] { annotationType });
 				return !foundCycle;
 			}
 			return true;
@@ -2053,7 +2068,7 @@
 			// check for simple interface collisions
 			// Check for a duplicate interface once the name is resolved, otherwise we may be confused (i.e. a.b.I and c.d.I)
 			for (int j = 0; j < i; j++) {
-				if (interfaceBindings[j] == superInterface) {
+				if (TypeBinding.equalsEquals(interfaceBindings[j], superInterface)) {
 					problemReporter().duplicateSuperinterface(sourceType, superInterfaceRef, superInterface);
 					sourceType.tagBits |= TagBits.HierarchyHasProblems;
 					noProblems = false;
@@ -2087,7 +2102,7 @@
 		if (count > 0) {
 			if (count != length)
 				System.arraycopy(interfaceBindings, 0, interfaceBindings = new ReferenceBinding[count], 0, count);
-			sourceType.superInterfaces = interfaceBindings;
+			sourceType.setSuperInterfaces(interfaceBindings);
 		}
 		return noProblems;
 	}
@@ -2236,7 +2251,7 @@
 			superType = ((RawTypeBinding) superType).genericType();
 		// by this point the superType must be a binary or source type
 
-		if (sourceType == superType) {
+		if (TypeBinding.equalsEquals(sourceType, superType)) {
 			problemReporter().hierarchyCircularity(sourceType, superType, reference);
 			sourceType.tagBits |= TagBits.HierarchyHasProblems;
 			return true;
@@ -2245,7 +2260,7 @@
 		if (superType.isMemberType()) {
 			ReferenceBinding current = superType.enclosingType();
 			do {
-				if (current.isHierarchyBeingActivelyConnected() && current == sourceType) {
+				if (current.isHierarchyBeingActivelyConnected() && TypeBinding.equalsEquals(current, sourceType)) {
 					problemReporter().hierarchyCircularity(sourceType, current, reference);
 					sourceType.tagBits |= TagBits.HierarchyHasProblems;
 					current.tagBits |= TagBits.HierarchyHasProblems;
@@ -2261,7 +2276,7 @@
 			boolean hasCycle = false;
 			ReferenceBinding parentType = superType.superclass();
 			if (parentType != null) {
-				if (sourceType == parentType) {
+				if (TypeBinding.equalsEquals(sourceType, parentType)) {
 					problemReporter().hierarchyCircularity(sourceType, superType, reference);
 					sourceType.tagBits |= TagBits.HierarchyHasProblems;
 					superType.tagBits |= TagBits.HierarchyHasProblems;
@@ -2280,7 +2295,7 @@
 			if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
 				for (int i = 0, length = itsInterfaces.length; i < length; i++) {
 					ReferenceBinding anInterface = itsInterfaces[i];
-					if (sourceType == anInterface) {
+					if (TypeBinding.equalsEquals(sourceType, anInterface)) {
 						problemReporter().hierarchyCircularity(sourceType, superType, reference);
 						sourceType.tagBits |= TagBits.HierarchyHasProblems;
 						superType.tagBits |= TagBits.HierarchyHasProblems;
@@ -2360,7 +2375,7 @@
 			return superType;
 		} catch (AbortCompilation e) {
 			SourceTypeBinding sourceType = this.referenceContext.binding;
-			if (sourceType.superInterfaces == null)  sourceType.superInterfaces = Binding.NO_SUPERINTERFACES; // be more resilient for hierarchies (144976)
+			if (sourceType.superInterfaces == null)  sourceType.setSuperInterfaces(Binding.NO_SUPERINTERFACES); // be more resilient for hierarchies (144976)
 			e.updateContext(typeReference, referenceCompilationUnit().compilationResult);
 			throw e;
 		} finally {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
index ed09551..f953c7f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: CompilationUnitScope.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Erling Ellingsen -  patch for bug 125570
@@ -1095,6 +1099,8 @@
 		case Binding.TYPE_PARAMETER :
 		case Binding.WILDCARD_TYPE :
 		case Binding.INTERSECTION_TYPE :
+		case Binding.INTERSECTION_CAST_TYPE: // constituents would have been recorded.
+		case Binding.POLY_TYPE: // not a real type, will mutate into one, hopefully soon.
 			return null;
 		case Binding.PARAMETERIZED_TYPE :
 		case Binding.RAW_TYPE :
@@ -1180,14 +1186,14 @@
 		ReferenceBinding existingType = typesBySimpleNames.get(compoundName[compoundName.length - 1]);
 		if (existingType != null) {
 			// duplicate test above should have caught this case, but make sure
-			if (existingType == referenceBinding) {
+			if (TypeBinding.equalsEquals(existingType, referenceBinding)) {
 				// https://bugs.eclipse.org/bugs/show_bug.cgi?id=302865
 				// Check all resolved imports to see if this import qualifies as a duplicate
 				for (int j = 0; j < this.importPtr; j++) {
 					ImportBinding resolved = this.tempImports[j];
 					if (resolved instanceof ImportConflictBinding) {
 						ImportConflictBinding importConflictBinding = (ImportConflictBinding) resolved;
-						if (importConflictBinding.conflictingTypeBinding == referenceBinding) {
+						if (TypeBinding.equalsEquals(importConflictBinding.conflictingTypeBinding, referenceBinding)) {
 							if (!importReference.isStatic()) {
 								// resolved is implicitly static
 								problemReporter().duplicateImport(importReference);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java
index 8181636..8fcfa81 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ExtraCompilerModifiers.java
@@ -1,15 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for bug 328281 - visibility leaks not detected when analyzing unused field in private class
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
+ *								bug 328281 - visibility leaks not detected when analyzing unused field in private class
+ *								bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -24,10 +30,16 @@
  * @version $Id: ExtraCompilerModifiers.java 19874 2009-04-13 17:59:05Z stephan $
  */
 public interface ExtraCompilerModifiers { // modifier constant
-	// those constants are depending upon ClassFileConstants (relying that classfiles only use the 16 lower bits)
+	/**
+	 * Bits that are depending upon ClassFileConstants (relying that classfiles only use the 16 lower bits).
+	 * <p>
+	 * Does <b>not</b> include {@link ClassFileConstants#AccDeprecated} and
+	 * {@link ClassFileConstants#AccAnnotationDefault}!
+	 * </p>
+	 */
 	final int AccJustFlag = 0xFFFF;// 16 lower bits
 
-	// bit17 - free
+	final int AccDefaultMethod = ASTNode.Bit17;
 	// bit18 - use by ClassFileConstants.AccAnnotationDefault
 	final int AccRestrictedAccess = ASTNode.Bit19;
 	final int AccFromClassFile = ASTNode.Bit20;
@@ -69,8 +81,6 @@
 	// future:
 	int AccReadonly = ASTNode.Bit27; // shared with blank final / default ctor
 
- 	// purely internal, only passes CallsBaseConstructor from MethodInfo to MethodBinding
- 	int AccCallsBaseCtor = 0x10000; // bit 17
 
 	final int AccOTTypeJustFlag = AccJustFlag | AccRole | AccOverriding;
 // SH}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
index 2afd2b6..bfd6195 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/FieldBinding.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: FieldBinding.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -13,6 +16,7 @@
  *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
  *								bug 185682 - Increment/decrement operators mark local variables as read
  *								bug 331649 - [compiler][null] consider null annotations for fields
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -136,7 +140,7 @@
 	if (isPublic()) return true;
 
 	SourceTypeBinding invocationType = scope.enclosingSourceType();
-	if (invocationType == this.declaringClass && invocationType == receiverType) return true;
+	if (TypeBinding.equalsEquals(invocationType, this.declaringClass) && TypeBinding.equalsEquals(invocationType, receiverType)) return true;
 
 	if (invocationType == null) // static import call
 		return !isPrivate() && scope.getCurrentPackage() == this.declaringClass.fPackage;
@@ -152,7 +156,7 @@
 		//    AND the receiverType is the invocationType or its subclass
 		//    OR the method is a static method accessed directly through a type
 		//    OR previous assertions are true for one of the enclosing type
-		if (invocationType == this.declaringClass) return true;
+		if (TypeBinding.equalsEquals(invocationType, this.declaringClass)) return true;
 		if (invocationType.fPackage == this.declaringClass.fPackage) return true;
 
 		ReferenceBinding currentType = invocationType;
@@ -170,7 +174,7 @@
 					if (depth > 0) invocationSite.setDepth(depth);
 					return true; // see 1FMEPDL - return invocationSite.isTypeAccess();
 				}
-				if (currentType == receiverErasure || receiverErasure.findSuperTypeOriginatingFrom(currentType) != null) {
+				if (TypeBinding.equalsEquals(currentType, receiverErasure) || receiverErasure.findSuperTypeOriginatingFrom(currentType) != null) {
 					if (depth > 0) invocationSite.setDepth(depth);
 					return true;
 				}
@@ -185,7 +189,7 @@
 		// answer true if the receiverType is the declaringClass
 		// AND the invocationType and the declaringClass have a common enclosingType
 		receiverCheck: {
-			if (receiverType != this.declaringClass) {
+			if (TypeBinding.notEquals(receiverType, this.declaringClass)) {
 				// special tolerance for type variable direct bounds, but only if compliance <= 1.6, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=334622
 				if (scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_6 && receiverType.isTypeVariable() && ((TypeVariableBinding) receiverType).isErasureBoundTo(this.declaringClass.erasure()))
 					break receiverCheck;
@@ -193,7 +197,7 @@
 			}
 		}
 
-		if (invocationType != this.declaringClass) {
+		if (TypeBinding.notEquals(invocationType, this.declaringClass)) {
 			ReferenceBinding outerInvocationType = invocationType;
 			ReferenceBinding temp = outerInvocationType.enclosingType();
 			while (temp != null) {
@@ -207,7 +211,7 @@
 				outerDeclaringClass = temp;
 				temp = temp.enclosingType();
 			}
-			if (outerInvocationType != outerDeclaringClass) return false;
+			if (TypeBinding.notEquals(outerInvocationType, outerDeclaringClass)) return false;
 		}
 		return true;
 	}
@@ -223,9 +227,9 @@
 	ReferenceBinding currentType = (ReferenceBinding) receiverType;
 	do {
 		if (currentType.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
-			if (originalDeclaringClass == currentType.erasure().original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.erasure().original())) return true;
 		} else {
-			if (originalDeclaringClass == currentType.original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.original())) return true;
 		}
 		PackageBinding currentPackage = currentType.fPackage;
 		// package could be null for wildcards/intersection types, ignore and recurse in superclass
@@ -302,11 +306,15 @@
 }
 
 public void fillInDefaultNonNullness(FieldDeclaration sourceField, Scope scope) {
+	LookupEnvironment environment = scope.environment();
 	if (   this.type != null
 		&& !this.type.isBaseType()
-		&& (this.tagBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable)) == 0)
+		&& (this.tagBits & TagBits.AnnotationNullMASK) == 0)
 	{
-		this.tagBits |= TagBits.AnnotationNonNull;
+		if (environment.globalOptions.sourceLevel < ClassFileConstants.JDK1_8)
+			this.tagBits |= TagBits.AnnotationNonNull;
+		else
+			this.type = environment.createAnnotatedType(this.type, new AnnotationBinding[]{environment.getNonNullAnnotation()});
 	} else if ((this.tagBits & TagBits.AnnotationNonNull) != 0) {
 		scope.problemReporter().nullAnnotationIsRedundant(sourceField);
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java
index 1f8a5ad..d900189 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ImplicitNullAnnotationVerifier.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2012, 2013 GK Software AG and others.
+ * Copyright (c) 2012, 2013 GK Software AG, 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     Stephan Herrmann - initial API and implementation
  *******************************************************************************/
@@ -19,6 +23,8 @@
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Argument;
 import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.NullAnnotationMatching;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.WeakenedTypeBinding;
@@ -92,6 +98,11 @@
 			if (isInstanceMethod) {
 				List superMethodList = new ArrayList();
 				
+				// need super types connected:
+				if (currentType instanceof SourceTypeBinding && !currentType.isHierarchyConnected() && !currentType.isAnonymousType()) {
+					((SourceTypeBinding) currentType).scope.connectTypeHierarchy();
+				}
+
 				int paramLen = currentMethod.parameters.length;
 				findAllOverriddenMethods(currentMethod.original(), currentMethod.selector, paramLen,
 								currentType, new HashSet(), superMethodList);
@@ -110,27 +121,45 @@
 					checkNullSpecInheritance(currentMethod, srcMethod, needToApplyNonNullDefault, complain, currentSuper, scope, inheritedNonNullnessInfos);
 					needToApplyNonNullDefault = false;
 				}
+				long sourceLevel = scope.compilerOptions().sourceLevel;
 				
 				// transfer collected information into currentMethod:
 				InheritedNonNullnessInfo info = inheritedNonNullnessInfos[0];
 				if (!info.complained) {
+					long tagBits = 0;
 					if (info.inheritedNonNullness == Boolean.TRUE) {
-						currentMethod.tagBits |= TagBits.AnnotationNonNull;
+						tagBits = TagBits.AnnotationNonNull;
 					} else if (info.inheritedNonNullness == Boolean.FALSE) {
-						currentMethod.tagBits |= TagBits.AnnotationNullable;
+						tagBits = TagBits.AnnotationNullable;
+					}
+					if (tagBits != 0) {
+						if (sourceLevel < ClassFileConstants.JDK1_8) {
+							currentMethod.tagBits |= tagBits;
+						} else {
+							if (!currentMethod.returnType.isBaseType()) {
+								LookupEnvironment env = scope.environment();
+								currentMethod.returnType = env.createAnnotatedType(currentMethod.returnType, env.nullAnnotationsFromTagBits(tagBits));
+							}
+						}
 					}
 				}
 				for (int i=0; i<paramLen; i++) {
 					info = inheritedNonNullnessInfos[i+1];
 					if (!info.complained && info.inheritedNonNullness != null) {
 						Argument currentArg = srcMethod == null ? null : srcMethod.arguments[i];
-						recordArgNonNullness(currentMethod, paramLen, i, currentArg, info.inheritedNonNullness);
+						if (sourceLevel < ClassFileConstants.JDK1_8)
+							recordArgNonNullness(currentMethod, paramLen, i, currentArg, info.inheritedNonNullness);
+						else
+							recordArgNonNullness18(currentMethod, i, currentArg, info.inheritedNonNullness, scope.environment());
 					}
 				}
 
 			}
 			if (needToApplyNonNullDefault) {
-				currentMethod.fillInDefaultNonNullness(srcMethod);
+				if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8)
+					currentMethod.fillInDefaultNonNullness(srcMethod);
+				else
+					currentMethod.fillInDefaultNonNullness18(srcMethod, scope.environment());
 			}
 		} finally {			
 			currentMethod.tagBits |= TagBits.IsNullnessKnown;
@@ -175,7 +204,7 @@
 			MethodBinding currentMethod = ifcMethods[i];
 			if (currentMethod.isStatic())
 				continue;
-			if (doesMethodOverride(original, currentMethod)) {
+			if (MethodVerifier.doesMethodOverride(original, currentMethod, this.environment)) {
 				result.add(currentMethod);
 				return; // at most one method is overridden from any supertype
 			}
@@ -214,10 +243,9 @@
 			// TODO (stephan): even here we may need to report problems? How to discriminate?
 			this.buddyImplicitNullAnnotationsVerifier.checkImplicitNullAnnotations(inheritedMethod, null, false, scope);
 		}
-		long inheritedBits = inheritedMethod.tagBits;
-		long inheritedNullnessBits = inheritedBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable);
-		long currentBits = currentMethod.tagBits;
-		long currentNullnessBits = currentBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable);
+		boolean useTypeAnnotations = this.environment.globalOptions.sourceLevel >= ClassFileConstants.JDK1_8;
+		long inheritedNullnessBits = getReturnTypeNullnessTagBits(inheritedMethod, useTypeAnnotations);
+		long currentNullnessBits = getReturnTypeNullnessTagBits(currentMethod, useTypeAnnotations);
 		
 		boolean shouldInherit = this.inheritNullAnnotations;
 
@@ -240,13 +268,14 @@
 									inheritedMethod, Boolean.valueOf(inheritedNullnessBits == TagBits.AnnotationNonNull), inheritedNonNullnessInfos[0]);
 						} else {
 							// no need to defer, record this info now:
-							currentMethod.tagBits |= inheritedNullnessBits;
+							applyReturnNullBits(currentMethod, inheritedNullnessBits);
 						}	
 						break returnType; // compatible by construction, skip complain phase below
 					}
 				}
 				if (hasNonNullDefault) { // conflict with inheritance already checked
-					currentMethod.tagBits |= (currentNullnessBits = TagBits.AnnotationNonNull); 
+					currentNullnessBits = TagBits.AnnotationNonNull;
+					applyReturnNullBits(currentMethod, currentNullnessBits);
 				}
 			}
 			if (shouldComplain) {
@@ -270,6 +299,8 @@
 		int length = 0;
 		if (currentArguments != null)
 			length = currentArguments.length;
+		if (useTypeAnnotations) // need to look for type annotations on all parameters:
+			length = currentMethod.parameters.length;
 		else if (inheritedMethod.parameterNonNullness != null)
 			length = inheritedMethod.parameterNonNullness.length;
 		else if (currentMethod.parameterNonNullness != null)
@@ -280,10 +311,8 @@
 
 			Argument currentArgument = currentArguments == null 
 										? null : currentArguments[i];
-			Boolean inheritedNonNullNess = (inheritedMethod.parameterNonNullness == null)
-										? null : inheritedMethod.parameterNonNullness[i];
-			Boolean currentNonNullNess = (currentMethod.parameterNonNullness == null)
-										? null : currentMethod.parameterNonNullness[i];
+			Boolean inheritedNonNullNess = getParameterNonNullness(inheritedMethod, i, useTypeAnnotations);
+			Boolean currentNonNullNess = getParameterNonNullness(currentMethod, i, useTypeAnnotations);
 
 			if (currentNonNullNess == null) {
 				// unspecified, may fill in either from super or from default
@@ -304,14 +333,20 @@
 									inheritedMethod, inheritedNonNullNess, inheritedNonNullnessInfos[i+1]);
 						} else {
 							// no need to defer, record this info now:
-							recordArgNonNullness(currentMethod, length, i, currentArgument, inheritedNonNullNess);
+							if (!useTypeAnnotations)
+								recordArgNonNullness(currentMethod, length, i, currentArgument, inheritedNonNullNess);
+							else
+								recordArgNonNullness18(currentMethod, i, currentArgument, inheritedNonNullNess, this.environment);
 						}
 						continue; // compatible by construction, skip complain phase below
 					}
 				}
 				if (hasNonNullDefault) { // conflict with inheritance already checked
 					currentNonNullNess = Boolean.TRUE;
-					recordArgNonNullness(currentMethod, length, i, currentArgument, Boolean.TRUE);
+					if (!useTypeAnnotations)
+						recordArgNonNullness(currentMethod, length, i, currentArgument, Boolean.TRUE);
+					else
+						recordArgNonNullness18(currentMethod, i, currentArgument, Boolean.TRUE, this.environment);
 				}
 			}
 			if (shouldComplain) {
@@ -357,6 +392,39 @@
 		}
 	}
 
+	void applyReturnNullBits(MethodBinding method, long nullnessBits) {
+		if (this.environment.globalOptions.sourceLevel < ClassFileConstants.JDK1_8) {
+			method.tagBits |= nullnessBits;
+		} else {
+			if (!method.returnType.isBaseType()) {
+				method.returnType = this.environment.createAnnotatedType(method.returnType, this.environment.nullAnnotationsFromTagBits(nullnessBits));
+			}
+		}
+	}
+
+	private Boolean getParameterNonNullness(MethodBinding method, int i, boolean useTypeAnnotations) {
+		if (useTypeAnnotations) {
+			TypeBinding parameter = method.parameters[i];
+			if (parameter != null) {
+				long nullBits = NullAnnotationMatching.validNullTagBits(parameter.tagBits);
+				if (nullBits != 0L)
+					return Boolean.valueOf(nullBits == TagBits.AnnotationNonNull);
+			}
+			return null;
+		}
+		return (method.parameterNonNullness == null)
+						? null : method.parameterNonNullness[i];
+	}
+
+	private long getReturnTypeNullnessTagBits(MethodBinding method, boolean useTypeAnnotations) {
+		if (useTypeAnnotations) {
+			if (method.returnType == null)
+				return 0L;
+			return NullAnnotationMatching.validNullTagBits(method.returnType.tagBits);
+		}
+		return method.tagBits & TagBits.AnnotationNullMASK;
+	}
+
 	/* check for conflicting annotations and record here the info 'inheritedNonNullness' found in 'inheritedMethod'. */
 	protected void recordDeferredInheritedNullness(Scope scope, ASTNode location,
 			MethodBinding inheritedMethod, Boolean inheritedNonNullness, 
@@ -384,10 +452,19 @@
 					TagBits.AnnotationNonNull : TagBits.AnnotationNullable;
 		}
 	}
+	void recordArgNonNullness18(MethodBinding method, int paramIdx, Argument currentArgument, Boolean nonNullNess, LookupEnvironment env) {
+		AnnotationBinding annotationBinding = nonNullNess.booleanValue() ? env.getNonNullAnnotation() : env.getNullableAnnotation();
+		method.parameters[paramIdx] = env.createAnnotatedType(method.parameters[paramIdx], new AnnotationBinding[]{ annotationBinding});
+		if (currentArgument != null) {
+			currentArgument.binding.type = method.parameters[paramIdx];
+		}
+	}
 
 	// ==== minimal set of utility methods previously from MethodVerifier15: ====
 	
-	boolean areParametersEqual(MethodBinding one, MethodBinding two) {
+//{ObjectTeams: added 3. argument:
+	static boolean areParametersEqual(MethodBinding one, MethodBinding two, LookupEnvironment environment) {
+// SH}
 //{ObjectTeams: retrench callin methods:
 /* orig:
 		TypeBinding[] oneArgs = one.parameters;
@@ -406,8 +483,8 @@
 		// with parameterized parameters for backwards compatibility, need a more complex check
 		int i;
 		foundRAW: for (i = 0; i < length; i++) {
-//{ObjectTeams: added 3. argument:
-			if (!areTypesEqual(oneArgs[i], twoArgs[i], two)) {
+//{ObjectTeams: added arguments 3 & 4:
+			if (!areTypesEqual(oneArgs[i], twoArgs[i], two, environment)) {
 // SH}
 				if (oneArgs[i].leafComponentType().isRawType()) {
 					if (oneArgs[i].dimensions() == twoArgs[i].dimensions() && oneArgs[i].leafComponentType().isEquivalentTo(twoArgs[i].leafComponentType())) {
@@ -429,7 +506,7 @@
 		// all raw mode for remaining parameters (if any)
 		for (i++; i < length; i++) {
 //{ObjectTeams: added 3. argument:
-	        if (!areTypesEqual(oneArgs[i], twoArgs[i], two)) {
+	        if (!areTypesEqual(oneArgs[i], twoArgs[i], two, null)) {
 // SH}
 				if (oneArgs[i].leafComponentType().isRawType())
 					if (oneArgs[i].dimensions() == twoArgs[i].dimensions() && oneArgs[i].leafComponentType().isEquivalentTo(twoArgs[i].leafComponentType()))
@@ -442,11 +519,11 @@
 		return true;
 	}
 //{ObjectTeams: enable role type comparison
-//added 3. parameter:
-	boolean areTypesEqual(TypeBinding one, TypeBinding two, MethodBinding methodTwo) {
-	    if (one == two) return true;
+//added parameters 3 & 4:
+	static boolean areTypesEqual(TypeBinding one, TypeBinding two, MethodBinding methodTwo, LookupEnvironment environment) {
+		if (TypeBinding.equalsEquals(one, two)) return true;
 //  different comparison for role types:
-	    if (areEqualRoleTypes(one, two, methodTwo.declaringClass, this.environment))
+	    if (areEqualRoleTypes(one, two, methodTwo.declaringClass, environment))
 	        return true;
 // SH}
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=329584
@@ -455,7 +532,7 @@
 				switch (two.kind()) {
 					case Binding.PARAMETERIZED_TYPE:
 					case Binding.RAW_TYPE:
-						if (one == two.erasure())
+						if (TypeBinding.equalsEquals(one, two.erasure()))
 							return true;
 				}
 				break;
@@ -463,7 +540,7 @@
 			case Binding.PARAMETERIZED_TYPE:
 				switch(two.kind()) {
 					case Binding.TYPE:
-						if (one.erasure() == two)
+						if (TypeBinding.equalsEquals(one.erasure(), two))
 							return true;
 				}
 		}
@@ -510,30 +587,6 @@
 	    return false;
 	}
 // SH}
-	public boolean doesMethodOverride(MethodBinding method, MethodBinding inheritedMethod) {
-		return couldMethodOverride(method, inheritedMethod) && areMethodsCompatible(method, inheritedMethod);
-	}
-
-	protected boolean couldMethodOverride(MethodBinding method, MethodBinding inheritedMethod) {
-		if (!org.eclipse.jdt.core.compiler.CharOperation.equals(method.selector, inheritedMethod.selector))
-			return false;
-		if (method == inheritedMethod || method.isStatic() || inheritedMethod.isStatic())
-//{ObjectTeams: treat static pair of methods in role ifc/class as overriding:
-	      if (!staticRoleMethodImpl(method, inheritedMethod))
-// SH}
-			return false;
-		if (inheritedMethod.isPrivate())
-			return false;
-		if (inheritedMethod.isDefault() && method.declaringClass.getPackage() != inheritedMethod.declaringClass.getPackage())
-			return false;
-		if (!method.isPublic()) { // inheritedMethod is either public or protected & method is less than public
-			if (inheritedMethod.isPublic())
-				return false;
-			if (inheritedMethod.isProtected() && !method.isProtected())
-				return false;
-		}
-		return true;
-	}
 
 //{ObjectTeams: is method the static implementation of a role ifc's abstract static?
 	private boolean staticRoleMethodImpl(MethodBinding method, MethodBinding inheritedMethod)
@@ -543,123 +596,4 @@
 	    return false;
 	}
 // SH}
-	
-	protected boolean areMethodsCompatible(MethodBinding one, MethodBinding two) {
-		// use the original methods to test compatibility, but do not check visibility, etc
-		one = one.original();
-		two = one.findOriginalInheritedMethod(two);
-	
-		if (two == null)
-			return false; // method's declaringClass does not inherit from inheritedMethod's
-	
-		return isParameterSubsignature(one, two);
-	}
-
-	protected boolean isParameterSubsignature(MethodBinding method, MethodBinding inheritedMethod) {
-		MethodBinding substitute = computeSubstituteMethod(inheritedMethod, method);
-		return substitute != null && isSubstituteParameterSubsignature(method, substitute);
-	}
-
-	protected MethodBinding computeSubstituteMethod(MethodBinding inheritedMethod, MethodBinding currentMethod) {
-		if (inheritedMethod == null) return null;
-	//{ObjectTeams: use source-level params in case of enhanced callin methods:
-	/* orig:
-		if (currentMethod.parameters.length != inheritedMethod.parameters.length) return null; // no match
-	  :giro */
-		if (currentMethod.getSourceParamLength() != inheritedMethod.getSourceParamLength()) return null; // no match
-	// SH}
-	
-		// due to hierarchy & compatibility checks, we need to ensure these 2 methods are resolved
-		if (currentMethod.declaringClass instanceof BinaryTypeBinding)
-			((BinaryTypeBinding) currentMethod.declaringClass).resolveTypesFor(currentMethod);
-		if (inheritedMethod.declaringClass instanceof BinaryTypeBinding)
-			((BinaryTypeBinding) inheritedMethod.declaringClass).resolveTypesFor(inheritedMethod);
-	
-		TypeVariableBinding[] inheritedTypeVariables = inheritedMethod.typeVariables;
-		int inheritedLength = inheritedTypeVariables.length;
-		if (inheritedLength == 0) return inheritedMethod; // no substitution needed
-		TypeVariableBinding[] typeVariables = currentMethod.typeVariables;
-		int length = typeVariables.length;
-		if (length == 0)
-			return inheritedMethod.asRawMethod(this.environment);
-		if (length != inheritedLength)
-			return inheritedMethod; // no match JLS 8.4.2
-	
-		// interface I { <T> void foo(T t); }
-		// class X implements I { public <T extends I> void foo(T t) {} }
-		// for the above case, we do not want to answer the substitute method since its not a match
-		TypeVariableBinding[] arguments = new TypeVariableBinding[length];
-		System.arraycopy(typeVariables, 0, arguments, 0, length);
-		ParameterizedGenericMethodBinding substitute =
-			this.environment.createParameterizedGenericMethod(inheritedMethod, arguments);
-		for (int i = 0; i < inheritedLength; i++) {
-			TypeVariableBinding inheritedTypeVariable = inheritedTypeVariables[i];
-			TypeVariableBinding typeVariable = arguments[i];
-			if (typeVariable.firstBound == inheritedTypeVariable.firstBound) {
-				if (typeVariable.firstBound == null)
-					continue; // both are null
-			} else if (typeVariable.firstBound != null && inheritedTypeVariable.firstBound != null) {
-				if (typeVariable.firstBound.isClass() != inheritedTypeVariable.firstBound.isClass())
-					return inheritedMethod; // not a match
-			}
-			if (Scope.substitute(substitute, inheritedTypeVariable.superclass) != typeVariable.superclass)
-				return inheritedMethod; // not a match
-			int interfaceLength = inheritedTypeVariable.superInterfaces.length;
-			ReferenceBinding[] interfaces = typeVariable.superInterfaces;
-			if (interfaceLength != interfaces.length)
-				return inheritedMethod; // not a match
-			next : for (int j = 0; j < interfaceLength; j++) {
-				TypeBinding superType = Scope.substitute(substitute, inheritedTypeVariable.superInterfaces[j]);
-				for (int k = 0; k < interfaceLength; k++)
-					if (superType == interfaces[k])
-						continue next;
-				return inheritedMethod; // not a match
-			}
-		}
-	   return substitute;
-	}
-
-	protected boolean isSubstituteParameterSubsignature(MethodBinding method, MethodBinding substituteMethod) {
-		if (!areParametersEqual(method, substituteMethod)) {
-			// method can still override substituteMethod in cases like :
-			// <U extends Number> void c(U u) {}
-			// @Override void c(Number n) {}
-			// but method cannot have a "generic-enabled" parameter type
-			if (substituteMethod.hasSubstitutedParameters() && method.areParameterErasuresEqual(substituteMethod))
-				return method.typeVariables == Binding.NO_TYPE_VARIABLES && !hasGenericParameter(method);
-	
-			// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=279836
-			if (method.declaringClass.isRawType() && substituteMethod.declaringClass.isRawType())
-				if (method.hasSubstitutedParameters() && substituteMethod.hasSubstitutedParameters())
-					return areMethodsCompatible(method, substituteMethod);
-	
-			return false;
-		}
-	
-		if (substituteMethod instanceof ParameterizedGenericMethodBinding) {
-			if (method.typeVariables != Binding.NO_TYPE_VARIABLES)
-				return !((ParameterizedGenericMethodBinding) substituteMethod).isRaw;
-			// since substituteMethod has substituted type variables, method cannot have a generic signature AND no variables -> its a name clash if it does
-			return !hasGenericParameter(method);
-		}
-	
-		// if method has its own variables, then substituteMethod failed bounds check in computeSubstituteMethod()
-		return method.typeVariables == Binding.NO_TYPE_VARIABLES;
-	}
-
-	boolean hasGenericParameter(MethodBinding method) {
-		if (method.genericSignature() == null) return false;
-	
-		// may be only the return type that is generic, need to check parameters
-		TypeBinding[] params = method.parameters;
-		for (int i = 0, l = params.length; i < l; i++) {
-			TypeBinding param = params[i].leafComponentType();
-			if (param instanceof ReferenceBinding) {
-				int modifiers = ((ReferenceBinding) param).modifiers;
-				if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
-					return true;
-			}
-		}
-		return false;
-	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext.java
index f0e03bf..d49b3eb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InferenceContext.java
@@ -61,7 +61,7 @@
     		length = constraintSubstitutes.length;
 	        for (int i = 0; i < length; i++) {
 	        	TypeBinding substitute = constraintSubstitutes[i];
-	            if (substitute == actualType) return; // already there
+	            if (substitute == actualType) return; // already there //$IDENTITY-COMPARISON$
 	            if (substitute == null) {
 	                constraintSubstitutes[i] = actualType;
 	                break insertLoop;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionCastTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionCastTypeBinding.java
new file mode 100644
index 0000000..677d2d8
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/IntersectionCastTypeBinding.java
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.compiler.lookup;
+
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+
+public class IntersectionCastTypeBinding extends ReferenceBinding {
+
+	public ReferenceBinding [] intersectingTypes;
+	private ReferenceBinding javaLangObject;
+	int length;
+	
+	public IntersectionCastTypeBinding(ReferenceBinding[] intersectingTypes, LookupEnvironment environment) {
+		this.intersectingTypes = intersectingTypes;
+		this.length = intersectingTypes.length;
+		if (!intersectingTypes[0].isClass()) {
+			this.javaLangObject = environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
+			this.modifiers |= ClassFileConstants.AccInterface;
+		}
+	}
+	
+	public MethodBinding getSingleAbstractMethod(Scope scope) {
+		if (this.singleAbstractMethod != null)
+			return this.singleAbstractMethod;
+		MethodBinding sam = samProblemBinding;  // guilty unless proven innocent !
+		for (int i = 0; i < this.length; i++) {
+			MethodBinding method = this.intersectingTypes[i].getSingleAbstractMethod(scope);
+			if (method != null) {
+				if (method.isValidBinding()) {
+					if (sam.isValidBinding())
+						return this.singleAbstractMethod = new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.IntersectionHasMultipleFunctionalInterfaces);
+					else
+						sam = method;
+				}
+			}
+		}
+		return this.singleAbstractMethod = sam; // I don't see a value in building the notional interface described in 9.8 - it appears just pedantic/normative - perhaps it plays a role in wildcard parameterized types ?
+	}
+
+	public boolean hasTypeBit(int bit) { // Stephan ??
+		for (int i = 0; i < this.length; i++) {		
+			if (this.intersectingTypes[i].hasTypeBit(bit))
+				return true;
+		}
+		return false;
+	}
+
+	public boolean canBeInstantiated() {
+		return false;
+	}
+	
+	public boolean canBeSeenBy(PackageBinding invocationPackage) {
+		for (int i = 0; i < this.length; i++) {
+			if (!this.intersectingTypes[i].canBeSeenBy(invocationPackage))
+				return false;
+		}
+		return true;
+	}
+	
+	public boolean canBeSeenBy(Scope scope) {
+		for (int i = 0; i < this.length; i++) {
+			if (!this.intersectingTypes[i].canBeSeenBy(scope))
+				return false;
+		}
+		return true;
+	}
+	
+	public boolean canBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType) {
+		for (int i = 0; i < this.length; i++) {
+			if (!this.intersectingTypes[i].canBeSeenBy(receiverType, invocationType))
+				return false;
+		}
+		return true;
+	}
+	
+	
+	public char[] constantPoolName() {
+		return this.intersectingTypes[0].constantPoolName();
+	}
+
+	public PackageBinding getPackage() {
+		throw new UnsupportedOperationException(); // cannot be referred to
+	}
+	
+	public ReferenceBinding[] getIntersectingTypes() {
+		return this.intersectingTypes;
+	}
+
+	public ReferenceBinding superclass() {
+		return this.intersectingTypes[0].isClass() ? this.intersectingTypes[0] : this.javaLangObject; 
+	}
+	
+	public ReferenceBinding [] superInterfaces() {
+		if (this.intersectingTypes[0].isClass()) {
+			ReferenceBinding [] superInterfaces = new ReferenceBinding[this.length - 1];
+			System.arraycopy(this.intersectingTypes, 1, superInterfaces, 0, this.length - 1);
+			return superInterfaces;
+		}
+		return this.intersectingTypes;
+	}
+	/* Answer true if the receiver type can be assigned to the argument type (right)
+	 */
+	public boolean isCompatibleWith(TypeBinding right, Scope scope) {
+		for (int i = 0; i < this.length; i++) {		
+			if (this.intersectingTypes[i].isCompatibleWith(right, scope))
+				return true;
+		}
+		return false;
+	}
+
+	public char[] qualifiedSourceName() {
+		StringBuffer qualifiedSourceName = new StringBuffer(16);
+		for (int i = 0; i < this.length; i++) {		
+				qualifiedSourceName.append(this.intersectingTypes[i].qualifiedSourceName());
+				if (i != this.length - 1)
+					qualifiedSourceName.append(" & "); //$NON-NLS-1$
+		}
+		return qualifiedSourceName.toString().toCharArray();
+	}
+
+	public char[] sourceName() {
+		StringBuffer srcName = new StringBuffer(16);
+		for (int i = 0; i < this.length; i++) {		
+				srcName.append(this.intersectingTypes[i].sourceName());
+				if (i != this.length - 1)
+					srcName.append(" & "); //$NON-NLS-1$
+		}
+		return srcName.toString().toCharArray();
+	}
+
+	public char[] readableName() {
+		StringBuffer readableName = new StringBuffer(16);
+		for (int i = 0; i < this.length; i++) {		
+				readableName.append(this.intersectingTypes[i].readableName());
+				if (i != this.length - 1)
+					readableName.append(" & "); //$NON-NLS-1$
+		}
+		return readableName.toString().toCharArray();
+	}
+	public char[] shortReadableName() {
+		StringBuffer shortReadableName = new StringBuffer(16);
+		for (int i = 0; i < this.length; i++) {		
+				shortReadableName.append(this.intersectingTypes[i].shortReadableName());
+				if (i != this.length - 1)
+					shortReadableName.append(" & "); //$NON-NLS-1$
+		}
+		return shortReadableName.toString().toCharArray();
+	}
+	public boolean isIntersectionCastType() {
+		return true;
+	}
+	public int kind() {
+		return Binding.INTERSECTION_CAST_TYPE;
+	}
+	public String debugName() {
+		StringBuffer debugName = new StringBuffer(16);
+		for (int i = 0; i < this.length; i++) {		
+				debugName.append(this.intersectingTypes[i].debugName());
+				if (i != this.length - 1)
+					debugName.append(" & "); //$NON-NLS-1$
+		}
+		return debugName.toString();
+	}
+	public String toString() {
+	    return debugName();
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
index 19c1ec1..65897fc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/InvocationSite.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for
@@ -29,6 +33,7 @@
 	int sourceEnd();
 	int sourceStart();
 	TypeBinding expectedType();
+	boolean receiverIsImplicitThis();
 	
 	static class EmptyWithAstNode implements InvocationSite {
 		ASTNode node;
@@ -44,5 +49,6 @@
 		public int sourceEnd() {return this.node.sourceEnd; }
 		public int sourceStart() {return this.node.sourceStart; }
 		public TypeBinding expectedType() { return null; }
+		public boolean receiverIsImplicitThis() { return false; }
 	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
index 5a44cf8..b33387a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalTypeBinding.java
@@ -1,22 +1,27 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: LocalTypeBinding.java 19874 2009-04-13 17:59:05Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
- *     Stephan Herrmann - Contribution for  bug 365662 - [compiler][null] warn on contradictory and redundant null annotations
+ *     Stephan Herrmann - Contributions for
+ *								bug 365662 - [compiler][null] warn on contradictory and redundant null annotations
+ *								bug 401030 - [1.8][null] Null analysis support for lambda methods. 
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
-import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.CaseStatement;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
@@ -36,7 +41,6 @@
 	final static char[] LocalTypePrefix = { '$', 'L', 'o', 'c', 'a', 'l', '$' };
 
 	private InnerEmulationDependency[] dependents;
-	public ArrayBinding[] localArrayBindings; // used to cache array bindings of various dimensions for this local type
 	public CaseStatement enclosingCase; // from 1.4 on, local types should not be accessed across switch case blocks (52221)
 	public int sourceStart; // used by computeUniqueKey to uniquely identify this binding
 	public MethodBinding enclosingMethod;
@@ -58,9 +62,9 @@
 //{ObjectTeams: faked local types RoFi-cache have no method scope:
   if (methodScope != null) {
 // orig:
-	AbstractMethodDeclaration methodDeclaration = methodScope.referenceMethod();
-	if (methodDeclaration != null) {
-		this.enclosingMethod = methodDeclaration.binding;
+	MethodBinding methodBinding = methodScope.referenceMethodBinding();
+	if (methodBinding != null) {
+		this.enclosingMethod = methodBinding;
 	}
 // :giro
   }
@@ -73,11 +77,20 @@
 // SH}
 }
 
+public LocalTypeBinding(LocalTypeBinding prototype) {
+	super(prototype);
+	this.dependents = prototype.dependents;
+	this.enclosingCase = prototype.enclosingCase;
+	this.sourceStart = prototype.sourceStart;
+	this.enclosingMethod = prototype.enclosingMethod;
+}
+
 /* Record a dependency onto a source target type which may be altered
 * by the end of the innerclass emulation. Later on, we will revisit
 * all its dependents so as to update them (see updateInnerEmulationDependents()).
 */
 public void addInnerEmulationDependent(BlockScope dependentScope, boolean wasEnclosingInstanceSupplied) {
+	if (!isPrototype()) throw new IllegalStateException();
 	int index;
 	if (this.dependents == null) {
 		index = 0;
@@ -97,6 +110,9 @@
  * Returns the anonymous original super type (in some error cases, superclass may get substituted with Object)
  */
 public ReferenceBinding anonymousOriginalSuperType() {
+	if (!isPrototype())
+		return ((LocalTypeBinding) this.prototype).anonymousOriginalSuperType();
+	
 	if (this.superInterfaces != Binding.NO_SUPERINTERFACES) {
 		return this.superInterfaces[0];
 	}
@@ -113,6 +129,9 @@
 }
 
 protected void checkRedundantNullnessDefaultRecurse(ASTNode location, Annotation[] annotations, long annotationTagBits) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	long outerDefault = this.enclosingMethod != null ? this.enclosingMethod.tagBits & ((TagBits.AnnotationNonNullByDefault|TagBits.AnnotationNullUnspecifiedByDefault)) : 0;
 	if (outerDefault != 0) {
 		if (outerDefault == annotationTagBits) {
@@ -124,6 +143,9 @@
 }
 
 public char[] computeUniqueKey(boolean isLeaf) {
+	if (!isPrototype())
+		return this.prototype.computeUniqueKey(isLeaf);
+	
 	char[] outerKey = outermostEnclosingType().computeUniqueKey(isLeaf);
 	int semicolon = CharOperation.lastIndexOf(';', outerKey);
 
@@ -150,6 +172,10 @@
 }
 
 public char[] constantPoolName() /* java/lang/Object */ {
+	if (this.constantPoolName != null)
+		return this.constantPoolName;
+	if (!isPrototype())
+		return this.constantPoolName = this.prototype.constantPoolName();
 	if (this.constantPoolName == null && this.scope != null) {
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=322154, we do have some
 		// cases where the left hand does not know what the right is doing.
@@ -158,28 +184,25 @@
 	return this.constantPoolName;	
 }
 
-ArrayBinding createArrayType(int dimensionCount, LookupEnvironment lookupEnvironment) {
-	if (this.localArrayBindings == null) {
-		this.localArrayBindings = new ArrayBinding[] {new ArrayBinding(this, dimensionCount, lookupEnvironment)};
-		return this.localArrayBindings[0];
-	}
-	// find the cached array binding for this dimensionCount (if any)
-	int length = this.localArrayBindings.length;
-	for (int i = 0; i < length; i++)
-		if (this.localArrayBindings[i].dimensions == dimensionCount)
-			return this.localArrayBindings[i];
-
-	// no matching array
-	System.arraycopy(this.localArrayBindings, 0, this.localArrayBindings = new ArrayBinding[length + 1], 0, length);
-	return this.localArrayBindings[length] = new ArrayBinding(this, dimensionCount, lookupEnvironment);
+public TypeBinding clone(TypeBinding outerType) {
+	LocalTypeBinding copy = new LocalTypeBinding(this);
+	copy.enclosingType = (SourceTypeBinding) outerType;
+	return copy;
 }
 
+public int hashCode() {
+	return this.enclosingType.hashCode();
+}
 /*
  * Overriden for code assist. In this case, the constantPoolName() has not been computed yet.
  * Slam the source name so that the signature is syntactically correct.
  * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=99686)
  */
 public char[] genericTypeSignature() {
+	
+	if (!isPrototype())
+		return this.prototype.genericTypeSignature();
+	
 	if (this.genericReferenceTypeSignature == null && this.constantPoolName == null) {
 		if (isAnonymousType())
 			setConstantPoolName(superclass().sourceName());
@@ -241,10 +264,20 @@
 
 // Record that the type is a local member type
 public void setAsMemberType() {
+	if (!isPrototype()) {
+		this.tagBits |= TagBits.MemberTypeMask;
+		((LocalTypeBinding) this.prototype).setAsMemberType();
+		return;
+	}
 	this.tagBits |= TagBits.MemberTypeMask;
 }
 
 public void setConstantPoolName(char[] computedConstantPoolName) /* java/lang/Object */ {
+	if (!isPrototype()) {
+		this.constantPoolName = computedConstantPoolName;
+		((LocalTypeBinding) this.prototype).setConstantPoolName(computedConstantPoolName);
+		return;
+	}
 	this.constantPoolName = computedConstantPoolName;
 }
 //{ObjectTeams:
@@ -264,6 +297,10 @@
  * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=102284)
  */
 public char[] signature() {
+	
+	if (!isPrototype())
+		return this.prototype.signature();
+	
 	if (this.signature == null && this.constantPoolName == null) {
 		if (isAnonymousType())
 			setConstantPoolName(superclass().sourceName());
@@ -281,6 +318,9 @@
 }
 
 public String toString() {
+	if (this.hasTypeAnnotations())
+		return annotatedDebugName() + " (local)"; //$NON-NLS-1$
+    
 	if (isAnonymousType())
 		return "Anonymous type : " + super.toString(); //$NON-NLS-1$
 	if (isMemberType())
@@ -292,6 +332,7 @@
 * to be propagated to all dependent source types.
 */
 public void updateInnerEmulationDependents() {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.dependents != null) {
 		for (int i = 0; i < this.dependents.length; i++) {
 			InnerEmulationDependency dependency = this.dependents[i];
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java
index cae923b..968e4a3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LocalVariableBinding.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -71,6 +75,14 @@
 		this.declaration = declaration;
 		this.tagBits |= TagBits.IsEffectivelyFinal;
 	}
+	
+	// argument
+	public LocalVariableBinding(LocalDeclaration declaration, TypeBinding type, int modifiers, MethodScope declaringScope) {
+
+		this(declaration, type, modifiers, true);
+		this.declaringScope = declaringScope;
+	}
+
 //{ObjectTeams: support anchor paths:
 	protected TeamAnchor getClone() {
 		return new LocalVariableBinding(this.name, this.type, this.modifiers, (this.tagBits & TagBits.IsArgument) > 0);
@@ -171,21 +183,15 @@
 		if (sourceType == null)
 			return Binding.NO_ANNOTATIONS;
 
-		AnnotationBinding[] annotations = sourceType.retrieveAnnotations(this);
 		if ((this.tagBits & TagBits.AnnotationResolved) == 0) {
 			if (((this.tagBits & TagBits.IsArgument) != 0) && this.declaration != null) {
 				Annotation[] annotationNodes = this.declaration.annotations;
 				if (annotationNodes != null) {
-					int length = annotationNodes.length;
-					ASTNode.resolveAnnotations(this.declaringScope, annotationNodes, this);
-					annotations = new AnnotationBinding[length];
-					for (int i = 0; i < length; i++)
-						annotations[i] = new AnnotationBinding(annotationNodes[i]);
-					setAnnotations(annotations, this.declaringScope);
+					ASTNode.resolveAnnotations(this.declaringScope, annotationNodes, this, true);
 				}
 			}
 		}
-		return annotations;
+		return sourceType.retrieveAnnotations(this);
 	}
 
 	private void getScopeKey(BlockScope scope, StringBuffer buffer) {
@@ -283,4 +289,8 @@
 	public boolean isParameter() {
 		return ((this.tagBits & TagBits.IsArgument) != 0);
 	}
+	
+	public boolean isCatchParameter() {
+		return false;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index 1a41897..70b2c13 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -13,6 +17,17 @@
  *     							bug 337868 - [compiler][model] incomplete support for package-info.java when using SearchableEnvironment
  *								bug 186342 - [compiler][null] Using annotations for null checking
  *								bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 416183 - [1.8][compiler][null] Overload resolution fails with null annotations
+ *								Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -28,6 +43,7 @@
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.classfmt.TypeAnnotationWalker;
 import org.eclipse.jdt.internal.compiler.env.*;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.ITypeRequestor;
@@ -39,9 +55,7 @@
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies;
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.ITranslationStates;
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.StateHelper;
-import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
-import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
 import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.RoleSplitter;
 import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.TeamMethodGenerator;
@@ -101,6 +115,8 @@
 	private int lastCompletedUnitIndex = -1;
 	private int lastUnitIndex = -1;
 
+	private TypeSystem typeSystem;
+	
 	public INameEnvironment nameEnvironment;
 	public CompilerOptions globalOptions;
 
@@ -113,10 +129,6 @@
 	private int stepCompleted;
 	public ITypeRequestor typeRequestor;
 
-	private ArrayBinding[][] uniqueArrayBindings;
-	private SimpleLookupTable uniqueParameterizedTypeBindings;
-	private SimpleLookupTable uniqueRawTypeBindings;
-	private SimpleLookupTable uniqueWildcardBindings;
 	private SimpleLookupTable uniqueParameterizedGenericMethodBindings;
 	
 	// key is a string with the method selector value is an array of method bindings
@@ -139,6 +151,9 @@
 	PackageBinding nonnullAnnotationPackage;			// the package supposed to contain the NonNull annotation type
 	PackageBinding nonnullByDefaultAnnotationPackage;	// the package supposed to contain the NonNullByDefault annotation type
 
+	AnnotationBinding nonNullAnnotation;
+	AnnotationBinding nullableAnnotation;
+
 	final static int BUILD_FIELDS_AND_METHODS = 4;
 	final static int BUILD_TYPE_HIERARCHY = 1;
 	final static int CHECK_AND_SET_IMPORTS = 2;
@@ -159,7 +174,6 @@
 	}
 // SH}
 
-
 public LookupEnvironment(ITypeRequestor typeRequestor, CompilerOptions globalOptions, ProblemReporter problemReporter, INameEnvironment nameEnvironment) {
 	this.typeRequestor = typeRequestor;
 	this.globalOptions = globalOptions;
@@ -168,17 +182,18 @@
 	this.defaultImports = null;
 	this.nameEnvironment = nameEnvironment;
 	this.knownPackages = new HashtableOfPackage();
-	this.uniqueArrayBindings = new ArrayBinding[5][];
-	this.uniqueArrayBindings[0] = new ArrayBinding[50]; // start off the most common 1 dimension array @ 50
-	this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
-	this.uniqueRawTypeBindings = new SimpleLookupTable(3);
-	this.uniqueWildcardBindings = new SimpleLookupTable(3);
 	this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
 	this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
 	this.missingTypes = null;
 	this.accessRestrictions = new HashMap(3);
 	this.classFilePool = ClassFilePool.newInstance();
 	this.typesBeingConnected = new HashSet();
+	boolean stillTesting = true;
+	if (this.globalOptions.sourceLevel >= ClassFileConstants.JDK1_8 && (stillTesting || this.globalOptions.storeAnnotations)) {
+		this.typeSystem = new AnnotatableTypeSystem(this);
+	} else {
+		this.typeSystem = new TypeSystem(this);
+	}
 }
 
 /**
@@ -438,7 +453,7 @@
 //{ObjectTeams: one more step:
 		if (todo >= ROLES_LINKED)
 			RoleSplitter.linkRoles(this.unitBeingCompleted = parsedUnit);
-
+// SH}
 		this.unitBeingCompleted = null;
 	}
 //{ObjectTeams: report actual step achieved:
@@ -694,7 +709,7 @@
 			convertedEnclosingType = originalType.isStatic()
 				? (ReferenceBinding) convertToRawType(originalEnclosingType, false /*do not force conversion of enclosing types*/)
 				: convertToParameterizedType(originalEnclosingType);
-			needToConvert |= originalEnclosingType != convertedEnclosingType;
+			needToConvert |= TypeBinding.notEquals(originalEnclosingType, convertedEnclosingType);
 		}
 		if (needToConvert) {
 			return createParameterizedType(originalType, isGeneric ? originalType.typeVariables() : null, convertedEnclosingType);
@@ -755,7 +770,7 @@
 			convertedEnclosing = originalEnclosing;
 		} else if (forceRawEnclosingType && !needToConvert/*stop recursion when conversion occurs*/) {
 			convertedEnclosing = (ReferenceBinding) convertToRawType(originalEnclosing, forceRawEnclosingType);
-			needToConvert = originalEnclosing != convertedEnclosing; // only convert generic or parameterized types
+			needToConvert = TypeBinding.notEquals(originalEnclosing, convertedEnclosing); // only convert generic or parameterized types
 		} else if (needToConvert || ((ReferenceBinding)originalType).isStatic()) {
 			convertedEnclosing = (ReferenceBinding) convertToRawType(originalEnclosing, false);
 		} else {
@@ -763,13 +778,13 @@
 		}
 		if (needToConvert) {
 			convertedType = createRawType((ReferenceBinding) originalType.erasure(), convertedEnclosing);
-		} else if (originalEnclosing != convertedEnclosing) {
+		} else if (TypeBinding.notEquals(originalEnclosing, convertedEnclosing)) {
 			convertedType = createParameterizedType((ReferenceBinding) originalType.erasure(), null, convertedEnclosing);
 		} else {
 			convertedType = originalType;
 		}
 	}
-	if (originalType != convertedType) {
+	if (TypeBinding.notEquals(originalType, convertedType)) {
 		return dimension > 0 ? (TypeBinding)createArrayType(convertedType, dimension) : convertedType;
 	}
 	return type;
@@ -785,7 +800,7 @@
     for (int i = 0, length = originalTypes.length; i < length; i++) {
         ReferenceBinding originalType = originalTypes[i];
         ReferenceBinding convertedType = (ReferenceBinding) convertToRawType(forceErasure ? originalType.erasure() : originalType, forceRawEnclosingType);
-        if (convertedType != originalType) {        
+        if (TypeBinding.notEquals(convertedType, originalType)) {        
             if (convertedTypes == originalTypes) {
                 System.arraycopy(originalTypes, 0, convertedTypes = new ReferenceBinding[length], 0, i);
             }
@@ -839,73 +854,58 @@
 		convertedType = needToConvert ? createRawType((ReferenceBinding)originalType.erasure(), null) : originalType;
 	} else {
 		ReferenceBinding convertedEnclosing = (ReferenceBinding) convertUnresolvedBinaryToRawType(originalEnclosing);
-		if (convertedEnclosing != originalEnclosing) {
+		if (TypeBinding.notEquals(convertedEnclosing, originalEnclosing)) {
 			needToConvert |= !((ReferenceBinding)originalType).isStatic();
 		}
 		if (needToConvert) {
 			convertedType = createRawType((ReferenceBinding) originalType.erasure(), convertedEnclosing);
-		} else if (originalEnclosing != convertedEnclosing) {
+		} else if (TypeBinding.notEquals(originalEnclosing, convertedEnclosing)) {
 			convertedType = createParameterizedType((ReferenceBinding) originalType.erasure(), null, convertedEnclosing);
 		} else {
 			convertedType = originalType;
 		}
 	}
-	if (originalType != convertedType) {
+	if (TypeBinding.notEquals(originalType, convertedType)) {
 		return dimension > 0 ? (TypeBinding)createArrayType(convertedType, dimension) : convertedType;
 	}
 	return type;
 }
-/*
- *  Used to guarantee annotation identity.
- */
+/* Used to guarantee annotation identity: we do that only for marker annotations and others with all default values.
+   We don't have the machinery for the general case as of now.
+*/
 public AnnotationBinding createAnnotation(ReferenceBinding annotationType, ElementValuePair[] pairs) {
 	if (pairs.length != 0) {
 		AnnotationBinding.setMethodBindings(annotationType, pairs);
+		return new AnnotationBinding(annotationType, pairs);
 	}
-	return new AnnotationBinding(annotationType, pairs);
+	return this.typeSystem.getAnnotationType(annotationType, true);
+}
+
+/* Used to guarantee annotation identity: we do that only for marker annotations and others with all default values.
+   We don't have the machinery for the general case as of now.
+*/
+public AnnotationBinding createUnresolvedAnnotation(ReferenceBinding annotationType, ElementValuePair[] pairs) {
+	if (pairs.length != 0) {
+		return new UnresolvedAnnotationBinding(annotationType, pairs, this);
+	}
+	return this.typeSystem.getAnnotationType(annotationType, false);
 }
 
 /*
  *  Used to guarantee array type identity.
  */
 public ArrayBinding createArrayType(TypeBinding leafComponentType, int dimensionCount) {
-	if (leafComponentType instanceof LocalTypeBinding) // cache local type arrays with the local type itself
-		return ((LocalTypeBinding) leafComponentType).createArrayType(dimensionCount, this);
-
-	// find the array binding cache for this dimension
-	int dimIndex = dimensionCount - 1;
-	int length = this.uniqueArrayBindings.length;
-	ArrayBinding[] arrayBindings;
-	if (dimIndex < length) {
-		if ((arrayBindings = this.uniqueArrayBindings[dimIndex]) == null)
-			this.uniqueArrayBindings[dimIndex] = arrayBindings = new ArrayBinding[10];
-	} else {
-		System.arraycopy(
-			this.uniqueArrayBindings, 0,
-			this.uniqueArrayBindings = new ArrayBinding[dimensionCount][], 0,
-			length);
-		this.uniqueArrayBindings[dimIndex] = arrayBindings = new ArrayBinding[10];
-	}
-
-	// find the cached array binding for this leaf component type (if any)
-	int index = -1;
-	length = arrayBindings.length;
-	while (++index < length) {
-		ArrayBinding currentBinding = arrayBindings[index];
-		if (currentBinding == null) // no matching array, but space left
-			return arrayBindings[index] = new ArrayBinding(leafComponentType, dimensionCount, this);
-		if (currentBinding.leafComponentType == leafComponentType)
-			return currentBinding;
-	}
-
-	// no matching array, no space left
-	System.arraycopy(
-		arrayBindings, 0,
-		(arrayBindings = new ArrayBinding[length * 2]), 0,
-		length);
-	this.uniqueArrayBindings[dimIndex] = arrayBindings;
-	return arrayBindings[length] = new ArrayBinding(leafComponentType, dimensionCount, this);
+	return this.typeSystem.getArrayType(leafComponentType, dimensionCount);
 }
+
+public ArrayBinding createArrayType(TypeBinding leafComponentType, int dimensionCount, AnnotationBinding [] annotations) {
+	return this.typeSystem.getArrayType(leafComponentType, dimensionCount, annotations);
+}
+
+public TypeBinding createIntersectionCastType(ReferenceBinding[] intersectingTypes) {
+	return this.typeSystem.getIntersectionCastType(intersectingTypes);
+}	
+
 public BinaryTypeBinding createBinaryTypeFrom(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
 	return createBinaryTypeFrom(binaryType, packageBinding, true, accessRestriction);
 }
@@ -915,22 +915,15 @@
 
 	// resolve any array bindings which reference the unresolvedType
 	ReferenceBinding cachedType = packageBinding.getType0(binaryBinding.compoundName[binaryBinding.compoundName.length - 1]);
-	if (cachedType != null) { // update reference to unresolved binding after having read classfile (knows whether generic for raw conversion)
-		if (cachedType instanceof UnresolvedReferenceBinding) {
-			((UnresolvedReferenceBinding) cachedType).setResolvedType(binaryBinding, this);
-		} else {
-			if (cachedType.isBinaryBinding()) // sanity check... at this point the cache should ONLY contain unresolved types
-				return (BinaryTypeBinding) cachedType;
-			// it is possible with a large number of source files (exceeding AbstractImageBuilder.MAX_AT_ONCE) that a member type can be in the cache as an UnresolvedType,
-			// but because its enclosingType is resolved while its created (call to BinaryTypeBinding constructor), its replaced with a source type
-			return null;
-		}
+	if (cachedType != null && !cachedType.isUnresolvedType()) {
+		if (cachedType.isBinaryBinding()) // sanity check... at this point the cache should ONLY contain unresolved types
+			return (BinaryTypeBinding) cachedType;
+		// it is possible with a large number of source files (exceeding AbstractImageBuilder.MAX_AT_ONCE) that a member type can be in the cache as an UnresolvedType,
+		// but because its enclosingType is resolved while its created (call to BinaryTypeBinding constructor), its replaced with a source type
+		return null;
 	}
 	packageBinding.addType(binaryBinding);
 	setAccessRestriction(binaryBinding, accessRestriction);
-	// need type annotations before processing methods (for @NonNullByDefault)
-	if (this.globalOptions.isAnnotationBasedNullAnalysisEnabled)
-		binaryBinding.scanTypeForNullDefaultAnnotation(binaryType, packageBinding, binaryBinding);
 	binaryBinding.cachePartsFrom(binaryType, needFieldsAndMethods);
 	return binaryBinding;
 }
@@ -1021,7 +1014,7 @@
 				ParameterizedGenericMethodBinding cachedMethod = cachedInfo[index];
 				if (cachedMethod == null) break nextCachedMethod;
 				if (!cachedMethod.isRaw) continue nextCachedMethod;
-				if (cachedMethod.declaringClass != (rawType == null ? genericMethod.declaringClass : rawType)) continue nextCachedMethod;
+				if (cachedMethod.declaringClass != (rawType == null ? genericMethod.declaringClass : rawType)) continue nextCachedMethod; //$IDENTITY-COMPARISON$
 				return cachedMethod;
 		}
 		needToGrow = true;
@@ -1058,7 +1051,7 @@
 				int cachedArgLength = cachedArguments == null ? 0 : cachedArguments.length;
 				if (argLength != cachedArgLength) continue nextCachedMethod;
 				for (int j = 0; j < cachedArgLength; j++){
-					if (typeArguments[j] != cachedArguments[j]) continue nextCachedMethod;
+					if (typeArguments[j] != cachedArguments[j]) continue nextCachedMethod; //$IDENTITY-COMPARISON$
 				}
 				// all arguments match, reuse current
 				return cachedMethod;
@@ -1125,6 +1118,11 @@
 	cachedInfo[index] = polymorphicMethod;
 	return polymorphicMethod;
 }
+
+public boolean usesAnnotatedTypeSystem() {
+	return this.typeSystem.isAnnotatedTypeSystem();
+}
+
 public MethodBinding updatePolymorphicMethodReturnType(PolymorphicMethodBinding binding, TypeBinding typeBinding) {
 	// update the return type to be the given return type, but reuse existing binding if one can match
 	String key = new String(binding.selector);
@@ -1177,170 +1175,61 @@
 	}
 	return retVal;
 }
-
-public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
-//{ObjectTeams: new overload: support team anchors, too:
-	ITeamAnchor anchor = null;
-	int valueParamPosition = -1;
-	if (DependentTypeBinding.isDependentType(genericType)) {
-		anchor = ((DependentTypeBinding)genericType)._teamAnchor;
-		valueParamPosition = ((DependentTypeBinding)genericType)._valueParamPosition;
-	}
-	return createParameterizedType(genericType, typeArguments, anchor, valueParamPosition, enclosingType);
+public ReferenceBinding createMemberType(ReferenceBinding memberType, ReferenceBinding enclosingType) {
+	return this.typeSystem.getMemberType(memberType, enclosingType);
 }
-public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ITeamAnchor teamAnchor, int valueParamPosition, ReferenceBinding enclosingType) {
+public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
+	return this.typeSystem.getParameterizedType(genericType, typeArguments, null, -1, enclosingType);
+}
+
+public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding [] annotations) {
+	return this.typeSystem.getParameterizedType(genericType, typeArguments, null, -1, enclosingType, annotations);
+}
+
+//{ObjectTeams: for anchored role types:
+public ParameterizedTypeBinding createParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments,
+								ITeamAnchor teamAnchor, int valueParamPosition, ReferenceBinding enclosingType, AnnotationBinding[] annotations) {
 	if (teamAnchor != null) {
 		genericType = genericType.getRealType();
 		if (genericType.isParameterizedType())
 			genericType = (ReferenceBinding) genericType.erasure();
 	}
+	return this.typeSystem.getParameterizedType(genericType, typeArguments, teamAnchor, valueParamPosition, enclosingType, annotations);
+}
 // SH}
-	// cached info is array of already created parameterized types for this type
-	ParameterizedTypeBinding[] cachedInfo = (ParameterizedTypeBinding[])this.uniqueParameterizedTypeBindings.get(genericType);
-	int argLength = typeArguments == null ? 0: typeArguments.length;
-	boolean needToGrow = false;
-	int index = 0;
-	if (cachedInfo != null){
-		nextCachedType :
-			// iterate existing parameterized for reusing one with same type arguments if any
-			for (int max = cachedInfo.length; index < max; index++){
-			    ParameterizedTypeBinding cachedType = cachedInfo[index];
-			    if (cachedType == null) break nextCachedType;
-			    if (cachedType.actualType() != genericType) continue nextCachedType; // remain of unresolved type
-			    if (cachedType.enclosingType() != enclosingType) continue nextCachedType;
-				TypeBinding[] cachedArguments = cachedType.arguments;
-				int cachedArgLength = cachedArguments == null ? 0 : cachedArguments.length;
-				if (argLength != cachedArgLength) continue nextCachedType; // would be an error situation (from unresolved binaries)
-				for (int j = 0; j < cachedArgLength; j++){
-					if (typeArguments[j] != cachedArguments[j]) continue nextCachedType;
-				}
-//{ObjectTeams: also match team anchor if given:
-				if (teamAnchor != null) {
-					if (!(cachedType instanceof DependentTypeBinding))
-						continue nextCachedType;
-					if (!((DependentTypeBinding)cachedType)._teamAnchor.hasSameBestNameAs(teamAnchor))
-						continue nextCachedType;
-				}
-				if (   valueParamPosition > -1 							// position specified, requires dependent type
-				    && !(cachedType instanceof DependentTypeBinding))
-					continue nextCachedType;
-				if (   (cachedType instanceof DependentTypeBinding)		// dependent type specified, positions must match
-				    && ((DependentTypeBinding)cachedType)._valueParamPosition != valueParamPosition)
-					continue nextCachedType;
-				if (teamAnchor == null && RoleTypeBinding.isRoleType(cachedType)) // role type found though not requested?
-					continue nextCachedType;
-// SH}
-				// all arguments match, reuse current
-				return cachedType;
-		}
-		needToGrow = true;
-	} else {
-		cachedInfo = new ParameterizedTypeBinding[5];
-		this.uniqueParameterizedTypeBindings.put(genericType, cachedInfo);
+
+public TypeBinding createAnnotatedType(TypeBinding type, AnnotationBinding[][] annotations) {
+	return this.typeSystem.getAnnotatedType(type, annotations);
+}
+
+// Variant to handle incoming type possibly carrying annotations.
+public TypeBinding createAnnotatedType(TypeBinding type, AnnotationBinding[] newbies) {
+	final int newLength = newbies == null ? 0 :  newbies.length;
+	if (type == null || newLength == 0)
+		return type;
+	AnnotationBinding [] oldies = type.getTypeAnnotations();
+	final int oldLength = oldies == null ? 0 : oldies.length;
+	if (oldLength > 0) {
+		System.arraycopy(newbies, 0, newbies = new AnnotationBinding[newLength + oldLength], 0, newLength);
+		System.arraycopy(oldies, 0, newbies, newLength, oldLength);
 	}
-	// grow cache ?
-	int length = cachedInfo.length;
-	if (needToGrow && index == length){
-		System.arraycopy(cachedInfo, 0, cachedInfo = new ParameterizedTypeBinding[length*2], 0, length);
-		this.uniqueParameterizedTypeBindings.put(genericType, cachedInfo);
-	}
-	// add new binding
-//{ObjectTeams: dependent type?
-/* orig:	
-	ParameterizedTypeBinding parameterizedType = new ParameterizedTypeBinding(genericType,typeArguments, enclosingType, this);
-  :giro */
-	ParameterizedTypeBinding parameterizedType;
-	if (teamAnchor == null) {
-		parameterizedType = new ParameterizedTypeBinding(genericType,typeArguments, enclosingType, this);
-	} else {
-		if (genericType.isRole()) {
-			parameterizedType = new RoleTypeBinding(genericType, typeArguments, teamAnchor, enclosingType, this);
-		} else {
-			parameterizedType = new DependentTypeBinding(genericType, typeArguments, teamAnchor, valueParamPosition, enclosingType, this);
-		}
-	}
-// SH}
-	cachedInfo[index] = parameterizedType;
-	return parameterizedType;
+	return this.typeSystem.getAnnotatedType(type, new AnnotationBinding [][] { newbies });
 }
 
 public RawTypeBinding createRawType(ReferenceBinding genericType, ReferenceBinding enclosingType) {
-	// cached info is array of already created raw types for this type
-	RawTypeBinding[] cachedInfo = (RawTypeBinding[])this.uniqueRawTypeBindings.get(genericType);
-	boolean needToGrow = false;
-	int index = 0;
-	if (cachedInfo != null){
-		nextCachedType :
-			// iterate existing parameterized for reusing one with same type arguments if any
-			for (int max = cachedInfo.length; index < max; index++){
-			    RawTypeBinding cachedType = cachedInfo[index];
-			    if (cachedType == null) break nextCachedType;
-			    if (cachedType.actualType() != genericType) continue nextCachedType; // remain of unresolved type
-			    if (cachedType.enclosingType() != enclosingType) continue nextCachedType;
-				// all enclosing type match, reuse current
-				return cachedType;
-		}
-		needToGrow = true;
-	} else {
-		cachedInfo = new RawTypeBinding[1];
-		this.uniqueRawTypeBindings.put(genericType, cachedInfo);
-	}
-	// grow cache ?
-	int length = cachedInfo.length;
-	if (needToGrow && index == length){
-		System.arraycopy(cachedInfo, 0, cachedInfo = new RawTypeBinding[length*2], 0, length);
-		this.uniqueRawTypeBindings.put(genericType, cachedInfo);
-	}
-	// add new binding
-	RawTypeBinding rawType = new RawTypeBinding(genericType, enclosingType, this);
-	cachedInfo[index] = rawType;
-	return rawType;
+	return this.typeSystem.getRawType(genericType, enclosingType);
+}
 
+public RawTypeBinding createRawType(ReferenceBinding genericType, ReferenceBinding enclosingType, AnnotationBinding [] annotations) {
+	return this.typeSystem.getRawType(genericType, enclosingType, annotations);
 }
 
 public WildcardBinding createWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind) {
-	// cached info is array of already created wildcard  types for this type
-	if (genericType == null) // pseudo wildcard denoting composite bounds for lub computation
-		genericType = ReferenceBinding.LUB_GENERIC;
-	WildcardBinding[] cachedInfo = (WildcardBinding[])this.uniqueWildcardBindings.get(genericType);
-	boolean needToGrow = false;
-	int index = 0;
-	if (cachedInfo != null){
-		nextCachedType :
-			// iterate existing wildcards for reusing one with same information if any
-			for (int max = cachedInfo.length; index < max; index++){
-			    WildcardBinding cachedType = cachedInfo[index];
-			    if (cachedType == null) break nextCachedType;
-			    if (cachedType.genericType != genericType) continue nextCachedType; // remain of unresolved type
-			    if (cachedType.rank != rank) continue nextCachedType;
-			    if (cachedType.boundKind != boundKind) continue nextCachedType;
-			    if (cachedType.bound != bound) continue nextCachedType;
-			    if (cachedType.otherBounds != otherBounds) {
-			    	int cachedLength = cachedType.otherBounds == null ? 0 : cachedType.otherBounds.length;
-			    	int length = otherBounds == null ? 0 : otherBounds.length;
-			    	if (cachedLength != length) continue nextCachedType;
-			    	for (int j = 0; j < length; j++) {
-			    		if (cachedType.otherBounds[j] != otherBounds[j]) continue nextCachedType;
-			    	}
-			    }
-				// all match, reuse current
-				return cachedType;
-		}
-		needToGrow = true;
-	} else {
-		cachedInfo = new WildcardBinding[10];
-		this.uniqueWildcardBindings.put(genericType, cachedInfo);
-	}
-	// grow cache ?
-	int length = cachedInfo.length;
-	if (needToGrow && index == length){
-		System.arraycopy(cachedInfo, 0, cachedInfo = new WildcardBinding[length*2], 0, length);
-		this.uniqueWildcardBindings.put(genericType, cachedInfo);
-	}
-	// add new binding
-	WildcardBinding wildcard = new WildcardBinding(genericType, rank, bound, otherBounds, boundKind, this);
-	cachedInfo[index] = wildcard;
-	return wildcard;
+	return this.typeSystem.getWildcard(genericType, rank, bound, otherBounds, boundKind);
+}
+
+public WildcardBinding createWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind, AnnotationBinding [] annotations) {
+	return this.typeSystem.getWildcard(genericType, rank, bound, otherBounds, boundKind, annotations);
 }
 
 /**
@@ -1372,10 +1261,32 @@
 	return packageBinding.getType0(compoundName[compoundName.length - 1]);
 }
 
+public AnnotationBinding getNullableAnnotation() {
+	if (this.nullableAnnotation != null)
+		return this.nullableAnnotation;
+	ReferenceBinding nullable = getResolvedType(this.globalOptions.nullableAnnotationName, null);
+	return this.nullableAnnotation = this.typeSystem.getAnnotationType(nullable, true);
+}
+
 public char[][] getNullableAnnotationName() {
 	return this.globalOptions.nullableAnnotationName;
 }
 
+public AnnotationBinding getNonNullAnnotation() {
+	if (this.nonNullAnnotation != null) 
+		return this.nonNullAnnotation;
+	ReferenceBinding nonNull = getResolvedType(this.globalOptions.nonNullAnnotationName, null);
+	return this.nonNullAnnotation = this.typeSystem.getAnnotationType(nonNull, true);
+}
+
+public AnnotationBinding[] nullAnnotationsFromTagBits(long nullTagBits) {
+	if (nullTagBits == TagBits.AnnotationNonNull)
+		return new AnnotationBinding[] { getNonNullAnnotation() };
+	else if (nullTagBits == TagBits.AnnotationNullable)
+		return new AnnotationBinding[] { getNullableAnnotation() };
+	return null;
+}
+
 public char[][] getNonNullAnnotationName() {
 	return this.globalOptions.nonNullAnnotationName;
 }
@@ -1535,11 +1446,14 @@
 }
 // SH}
 
-private TypeBinding[] getTypeArgumentsFromSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType, ReferenceBinding genericType, char[][][] missingTypeNames) {
+private TypeBinding[] getTypeArgumentsFromSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType, ReferenceBinding genericType,
+		char[][][] missingTypeNames, TypeAnnotationWalker walker)
+{
 	java.util.ArrayList args = new java.util.ArrayList(2);
 	int rank = 0;
 	do {
-		args.add(getTypeFromVariantTypeSignature(wrapper, staticVariables, enclosingType, genericType, rank++, missingTypeNames));
+		args.add(getTypeFromVariantTypeSignature(wrapper, staticVariables, enclosingType, genericType, rank, missingTypeNames,
+					walker.toTypeArgument(rank++)));
 	} while (wrapper.signature[wrapper.start] != '>');
 	wrapper.start++; // skip '>'
 	TypeBinding[] typeArguments = new TypeBinding[args.size()];
@@ -1592,7 +1506,7 @@
 //{ObjectTeams:
 public
 //km}
-ReferenceBinding getTypeFromConstantPoolName(char[] signature, int start, int end, boolean isParameterized, char[][][] missingTypeNames) {
+ReferenceBinding getTypeFromConstantPoolName(char[] signature, int start, int end, boolean isParameterized, char[][][] missingTypeNames, TypeAnnotationWalker walker) {
 	if (end == -1)
 		end = signature.length;
 	char[][] compoundName = CharOperation.splitOn('/', signature, start, end);
@@ -1605,7 +1519,30 @@
 			}
 		}
 	}
-	return getTypeFromCompoundName(compoundName, isParameterized, wasMissingType);
+	ReferenceBinding binding = getTypeFromCompoundName(compoundName, isParameterized, wasMissingType);
+	if (walker != TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
+		final int depth = binding.depth();
+		AnnotationBinding [][] annotations = null;
+		for (int i = 0; i <= depth; i++) {
+			AnnotationBinding[] annots = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+			if (annots != null && annots.length > 0) {
+				if (annotations == null)
+					annotations = new AnnotationBinding[depth + 1][];
+				annotations[i] = annots;
+			}
+			walker = walker.toNextNestedType();
+		}
+		if (annotations != null)
+			binding = (ReferenceBinding) createAnnotatedType(binding, annotations);
+	}
+	return binding;
+}
+
+//{ObjectTeams: changed default visibility to public
+public
+//SH}
+ReferenceBinding getTypeFromConstantPoolName(char[] signature, int start, int end, boolean isParameterized, char[][][] missingTypeNames) {
+	return getTypeFromConstantPoolName(signature, start, end, isParameterized, missingTypeNames, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
 }
 
 /* Answer the type corresponding to the signature from the binary file.
@@ -1618,12 +1555,28 @@
 //{ObjectTeams: changed default visibility to public
 public
 // SH}
-TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean isParameterized, TypeBinding enclosingType, char[][][] missingTypeNames) {
+TypeBinding getTypeFromSignature(char[] signature, int start, int end, boolean isParameterized, TypeBinding enclosingType, 
+		char[][][] missingTypeNames, TypeAnnotationWalker walker)
+{
 	int dimension = 0;
 	while (signature[start] == '[') {
 		start++;
 		dimension++;
 	}
+	// annotations on dimensions?
+	AnnotationBinding [][] annotationsOnDimensions = null;
+	if (dimension > 0 && walker != TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
+		for (int i = 0; i < dimension; i++) {
+			AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+			if (annotations != Binding.NO_ANNOTATIONS) { 
+				if (annotationsOnDimensions == null)
+					annotationsOnDimensions = new AnnotationBinding[dimension][];
+					annotationsOnDimensions[i] = annotations;
+			}
+			walker = walker.toNextArrayDimension();
+		}
+	}
+	
 	if (end == -1)
 		end = signature.length - 1;
 
@@ -1665,13 +1618,53 @@
 	} else {
 		binding = getTypeFromConstantPoolName(signature, start + 1, end, isParameterized, missingTypeNames); // skip leading 'L' or 'T'
 	}
-
-	if (dimension == 0)
+	
+	if (isParameterized) {
+		if (dimension != 0)
+			throw new IllegalStateException();
 		return binding;
-	return createArrayType(binding, dimension);
+	}
+	
+	if (walker != TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
+		final int depth = binding.depth();
+		AnnotationBinding [][] annotations = null;
+		for (int i = 0; i <= depth; i++) {
+			AnnotationBinding[] annots = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+			if (annots != null && annots.length > 0) {
+				if (annotations == null)
+					annotations = new AnnotationBinding[depth + 1][];
+				annotations[i] = annots;
+			}
+			walker = walker.toNextNestedType();
+		}
+		if (annotations != null)
+			binding = createAnnotatedType(binding, annotations);
+	}
+	
+	if (dimension != 0)
+		binding =  this.typeSystem.getArrayType(binding, dimension, AnnotatableTypeSystem.flattenedAnnotations(annotationsOnDimensions));
+	
+	return binding;
 }
 
-public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType, char[][][] missingTypeNames) {
+boolean qualifiedNameMatchesSignature(char[][] name, char[] signature) {
+	int s = 1; // skip 'L'
+	for (int i = 0; i < name.length; i++) {
+		char[] n = name[i];
+		for (int j = 0; j < n.length; j++)
+			if (n[j] != signature[s++])
+				return false;
+		if (signature[s] == ';' && i == name.length-1)
+			return true;
+		if (signature[s++] != '/')
+			return false;
+	}
+	return false;
+}
+
+public TypeBinding getTypeFromTypeSignature(SignatureWrapper wrapper, TypeVariableBinding[] staticVariables, ReferenceBinding enclosingType, 
+		char[][][] missingTypeNames, TypeAnnotationWalker walker) 
+{
 	// TypeVariableSignature = 'T' Identifier ';'
 	// ArrayTypeSignature = '[' TypeSignature
 	// ClassTypeSignature = 'L' Identifier TypeArgs(optional) ';'
@@ -1682,12 +1675,25 @@
 		wrapper.start++;
 		dimension++;
 	}
+	// annotations on dimensions?
+	AnnotationBinding [][] annotationsOnDimensions = null;
+	if (dimension > 0 && walker != TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER) {
+		for (int i = 0; i < dimension; i++) {
+			AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+			if (annotations != Binding.NO_ANNOTATIONS) { 
+				if (annotationsOnDimensions == null)
+					annotationsOnDimensions = new AnnotationBinding[dimension][];
+					annotationsOnDimensions[i] = annotations;
+			}
+			walker = walker.toNextArrayDimension();
+		}
+	}
 	if (wrapper.signature[wrapper.start] == 'T') {
 	    int varStart = wrapper.start + 1;
 	    int varEnd = wrapper.computeEnd();
 		for (int i = staticVariables.length; --i >= 0;)
 			if (CharOperation.equals(staticVariables[i].sourceName, wrapper.signature, varStart, varEnd))
-				return dimension == 0 ? (TypeBinding) staticVariables[i] : createArrayType(staticVariables[i], dimension);
+				return getTypeFromTypeVariable(staticVariables[i], dimension, annotationsOnDimensions, walker, missingTypeNames);
 	    ReferenceBinding initialType = enclosingType;
 		do {
 			TypeVariableBinding[] enclosingTypeVariables;
@@ -1698,15 +1704,16 @@
 			}
 			for (int i = enclosingTypeVariables.length; --i >= 0;)
 				if (CharOperation.equals(enclosingTypeVariables[i].sourceName, wrapper.signature, varStart, varEnd))
-					return dimension == 0 ? (TypeBinding) enclosingTypeVariables[i] : createArrayType(enclosingTypeVariables[i], dimension);
+					return getTypeFromTypeVariable(enclosingTypeVariables[i], dimension, annotationsOnDimensions, walker, missingTypeNames);
 		} while ((enclosingType = enclosingType.enclosingType()) != null);
 		this.problemReporter.undefinedTypeVariableSignature(CharOperation.subarray(wrapper.signature, varStart, varEnd), initialType);
 		return null; // cannot reach this, since previous problem will abort compilation
 	}
 	boolean isParameterized;
-	TypeBinding type = getTypeFromSignature(wrapper.signature, wrapper.start, wrapper.computeEnd(), isParameterized = (wrapper.end == wrapper.bracket), enclosingType, missingTypeNames);
+	TypeBinding type = getTypeFromSignature(wrapper.signature, wrapper.start, wrapper.computeEnd(), isParameterized = (wrapper.end == wrapper.bracket), enclosingType, missingTypeNames, walker);
+
 	if (!isParameterized)
-		return dimension == 0 ? type : createArrayType(type, dimension);
+		return dimension == 0 ? type : createArrayType(type, dimension, AnnotatableTypeSystem.flattenedAnnotations(annotationsOnDimensions));
 
 	// type must be a ReferenceBinding at this point, cannot be a BaseTypeBinding or ArrayTypeBinding
 	ReferenceBinding actualType = (ReferenceBinding) type;
@@ -1717,8 +1724,9 @@
 	if (actualEnclosing != null) { // convert needed if read some static member type
 		actualEnclosing = (ReferenceBinding) convertToRawType(actualEnclosing, false /*do not force conversion of enclosing types*/);
 	}
-	TypeBinding[] typeArguments = getTypeArgumentsFromSignature(wrapper, staticVariables, enclosingType, actualType, missingTypeNames);
-	ParameterizedTypeBinding parameterizedType = createParameterizedType(actualType, typeArguments, actualEnclosing);
+	AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+	TypeBinding[] typeArguments = getTypeArgumentsFromSignature(wrapper, staticVariables, enclosingType, actualType, missingTypeNames, walker);
+	ParameterizedTypeBinding parameterizedType = createParameterizedType(actualType, typeArguments, actualEnclosing, annotations);
 
 	while (wrapper.signature[wrapper.start] == '.') {
 		wrapper.start++; // skip '.'
@@ -1729,16 +1737,29 @@
 		// need to protect against the member type being null when the signature is invalid
 		if (memberType == null)
 			this.problemReporter.corruptedSignature(parameterizedType, wrapper.signature, memberStart); // aborts
+		walker = walker.toNextNestedType();
+		annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
 		if (wrapper.signature[wrapper.start] == '<') {
 			wrapper.start++; // skip '<'
-			typeArguments = getTypeArgumentsFromSignature(wrapper, staticVariables, enclosingType, memberType, missingTypeNames);
+			typeArguments = getTypeArgumentsFromSignature(wrapper, staticVariables, enclosingType, memberType, missingTypeNames, walker);
 		} else {
 			typeArguments = null;
 		}
-		parameterizedType = createParameterizedType(memberType, typeArguments, parameterizedType);
+		parameterizedType = createParameterizedType(memberType, typeArguments, parameterizedType, annotations);
 	}
 	wrapper.start++; // skip ';'
-	return dimension == 0 ? (TypeBinding) parameterizedType : createArrayType(parameterizedType, dimension);
+	return dimension == 0 ? (TypeBinding) parameterizedType : createArrayType(parameterizedType, dimension, AnnotatableTypeSystem.flattenedAnnotations(annotationsOnDimensions));
+}
+
+private TypeBinding getTypeFromTypeVariable(TypeVariableBinding typeVariableBinding, int dimension, AnnotationBinding [][] annotationsOnDimensions, TypeAnnotationWalker walker, char [][][] missingTypeNames) {
+	AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+	if (annotations != null && annotations != Binding.NO_ANNOTATIONS)
+		typeVariableBinding = (TypeVariableBinding) createAnnotatedType(typeVariableBinding, new AnnotationBinding [][] { annotations });
+
+	if (dimension == 0) {
+		return typeVariableBinding;
+	}
+	return this.typeSystem.getArrayType(typeVariableBinding, dimension, AnnotatableTypeSystem.flattenedAnnotations(annotationsOnDimensions));
 }
 
 TypeBinding getTypeFromVariantTypeSignature(
@@ -1747,7 +1768,8 @@
 		ReferenceBinding enclosingType,
 		ReferenceBinding genericType,
 		int rank,
-		char[][][] missingTypeNames) {
+		char[][][] missingTypeNames,
+		TypeAnnotationWalker walker) {
 	// VariantTypeSignature = '-' TypeSignature
 	//   or '+' TypeSignature
 	//   or TypeSignature
@@ -1756,19 +1778,22 @@
 		case '-' :
 			// ? super aType
 			wrapper.start++;
-			TypeBinding bound = getTypeFromTypeSignature(wrapper, staticVariables, enclosingType, missingTypeNames);
-			return createWildcard(genericType, rank, bound, null /*no extra bound*/, Wildcard.SUPER);
+			TypeBinding bound = getTypeFromTypeSignature(wrapper, staticVariables, enclosingType, missingTypeNames, walker.toWildcardBound());
+			AnnotationBinding [] annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+			return this.typeSystem.getWildcard(genericType, rank, bound, null /*no extra bound*/, Wildcard.SUPER, annotations);
 		case '+' :
 			// ? extends aType
 			wrapper.start++;
-			bound = getTypeFromTypeSignature(wrapper, staticVariables, enclosingType, missingTypeNames);
-			return createWildcard(genericType, rank, bound, null /*no extra bound*/, Wildcard.EXTENDS);
+			bound = getTypeFromTypeSignature(wrapper, staticVariables, enclosingType, missingTypeNames, walker.toWildcardBound());
+			annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+			return this.typeSystem.getWildcard(genericType, rank, bound, null /*no extra bound*/, Wildcard.EXTENDS, annotations);
 		case '*' :
 			// ?
 			wrapper.start++;
-			return createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
+			annotations = BinaryTypeBinding.createAnnotations(walker.getAnnotationsAtCursor(), this, missingTypeNames);
+			return this.typeSystem.getWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND, annotations);
 		default :
-			return getTypeFromTypeSignature(wrapper, staticVariables, enclosingType, missingTypeNames);
+			return getTypeFromTypeSignature(wrapper, staticVariables, enclosingType, missingTypeNames, walker);
 	}
 }
 
@@ -1816,16 +1841,8 @@
 	this.accessRestrictions = new HashMap(3);
 
 	this.verifier = null;
-	for (int i = this.uniqueArrayBindings.length; --i >= 0;) {
-		ArrayBinding[] arrayBindings = this.uniqueArrayBindings[i];
-		if (arrayBindings != null)
-			for (int j = arrayBindings.length; --j >= 0;)
-				arrayBindings[j] = null;
-	}
+	
 	// NOTE: remember to fix #updateCaches(...) when adding unique binding caches
-	this.uniqueParameterizedTypeBindings = new SimpleLookupTable(3);
-	this.uniqueRawTypeBindings = new SimpleLookupTable(3);
-	this.uniqueWildcardBindings = new SimpleLookupTable(3);
 	this.uniqueParameterizedGenericMethodBindings = new SimpleLookupTable(3);
 	this.uniquePolymorphicMethodBindings = new SimpleLookupTable(3);
 	this.uniqueGetClassMethodBinding = null;
@@ -1839,7 +1856,7 @@
 	this.unitBeingCompleted = null; // in case AbortException occurred
 
 	this.classFilePool.reset();
-
+	this.typeSystem.reset();
 	// name environment has a longer life cycle, and must be reset in
 	// the code which created it.
 //{ObjectTeams: more state to release:
@@ -1858,35 +1875,7 @@
 }
 
 void updateCaches(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType) {
-	// walk all the unique collections & replace the unresolvedType with the resolvedType
-	// must prevent 2 entries so == still works (1 containing the unresolvedType and the other containing the resolvedType)
-	if (this.uniqueParameterizedTypeBindings.get(unresolvedType) != null) { // update the key
-		Object[] keys = this.uniqueParameterizedTypeBindings.keyTable;
-		for (int i = 0, l = keys.length; i < l; i++) {
-			if (keys[i] == unresolvedType) {
-				keys[i] = resolvedType; // hashCode is based on compoundName so this works - cannot be raw since type of parameterized type
-				break;
-			}
-		}
-	}
-	if (this.uniqueRawTypeBindings.get(unresolvedType) != null) { // update the key
-		Object[] keys = this.uniqueRawTypeBindings.keyTable;
-		for (int i = 0, l = keys.length; i < l; i++) {
-			if (keys[i] == unresolvedType) {
-				keys[i] = resolvedType; // hashCode is based on compoundName so this works
-				break;
-			}
-		}
-	}
-	if (this.uniqueWildcardBindings.get(unresolvedType) != null) { // update the key
-		Object[] keys = this.uniqueWildcardBindings.keyTable;
-		for (int i = 0, l = keys.length; i < l; i++) {
-			if (keys[i] == unresolvedType) {
-				keys[i] = resolvedType; // hashCode is based on compoundName so this works
-				break;
-			}
-		}
-	}
+	this.typeSystem.updateCaches(unresolvedType, resolvedType);
 }
 //{ObjectTeams: translate the step completed into a dependencies step (from ITranslationStates):
 public int getDependenciesStateCompleted() {
@@ -1918,4 +1907,14 @@
 			this.resolutionListeners = new IQualifiedTypeResolutionListener[length + 1], 0, length);
 	this.resolutionListeners[length] = resolutionListener;
 }
+
+
+public TypeBinding getUnannotatedType(TypeBinding typeBinding) {
+	return this.typeSystem.getUnannotatedType(typeBinding);
+}
+
+// Given a type, return all its variously annotated versions.
+public TypeBinding[] getAnnotatedTypes(TypeBinding type) {
+	return this.typeSystem.getAnnotatedTypes(type);
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java
index de5858f..6316d84 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MemberTypeBinding.java
@@ -39,11 +39,22 @@
  *
  */
 public final class MemberTypeBinding extends NestedTypeBinding {
+
 public MemberTypeBinding(char[][] compoundName, ClassScope scope, SourceTypeBinding enclosingType) {
 	super(compoundName, scope, enclosingType);
 	this.tagBits |= TagBits.MemberTypeMask;
 }
+
+public MemberTypeBinding(MemberTypeBinding prototype) {
+	super(prototype);
+//{ObjectTeams: role?
+	if (prototype.roleModel != null)
+		this.roleModel = new RoleModel(this);
+// SH}
+}
+
 void checkSyntheticArgsAndFields() {
+	if (!isPrototype()) throw new IllegalStateException();
 //{ObjectTeams: role ifcs require synth args too
 /* orig:
 	if (isStatic()) return;
@@ -56,6 +67,10 @@
 	}
 	if (isStatic()) return;
 // SH}
+	if (!isPrototype()) {
+		((MemberTypeBinding) this.prototype).checkSyntheticArgsAndFields();
+		return;
+	}
 	this.addSyntheticArgumentAndField(this.enclosingType);
 }
 /* Answer the receiver's constant pool name.
@@ -64,16 +79,31 @@
 */
 
 public char[] constantPoolName() /* java/lang/Object */ {
+	
 	if (this.constantPoolName != null)
 		return this.constantPoolName;
+	
+	if (!isPrototype()) {
+		return this.prototype.constantPoolName();
+	}
 
 	return this.constantPoolName = CharOperation.concat(enclosingType().constantPoolName(), this.sourceName, '$');
 }
 
+public TypeBinding clone(TypeBinding outerType) {
+	MemberTypeBinding copy = new MemberTypeBinding(this);
+	copy.enclosingType = (SourceTypeBinding) outerType;
+	return copy;
+}
+
 /**
  * @see org.eclipse.jdt.internal.compiler.lookup.Binding#initializeDeprecatedAnnotationTagBits()
  */
 public void initializeDeprecatedAnnotationTagBits() {
+	if (!isPrototype()) {
+		this.prototype.initializeDeprecatedAnnotationTagBits();
+		return;
+	}
 	if ((this.tagBits & TagBits.DeprecatedAnnotationResolved) == 0) {
 		super.initializeDeprecatedAnnotationTagBits();
 		if ((this.tagBits & TagBits.AnnotationDeprecated) == 0) {
@@ -279,6 +309,10 @@
 }
 //SH}
 public String toString() {
-	return "Member type : " + new String(sourceName()) + " " + super.toString(); //$NON-NLS-2$ //$NON-NLS-1$
+	if (this.hasTypeAnnotations()) {
+		return annotatedDebugName();
+    } else {
+    	return "Member type : " + new String(sourceName()) + " " + super.toString(); //$NON-NLS-2$ //$NON-NLS-1$
+    }
 }
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
index 621866e..3cd598f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodBinding.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -16,6 +20,10 @@
  *								bug 365662 - [compiler][null] warn on contradictory and redundant null annotations
  *								bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *     Jesper Steen Moller - Contributions for
+ *								Bug 412150 [1.8] [compiler] Enable reflected parameter names during annotation processing
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -26,13 +34,13 @@
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Argument;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.util.Util;
 import org.eclipse.objectteams.otdt.core.compiler.IOTConstants;
 import org.eclipse.objectteams.otdt.internal.core.compiler.bytecode.AnchorListAttribute;
-import org.eclipse.objectteams.otdt.internal.core.compiler.control.ITranslationStates;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.SyntheticRoleBridgeMethodBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.MethodModel;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
@@ -96,6 +104,7 @@
 	public char[] selector;
 	public TypeBinding returnType;
 	public TypeBinding[] parameters;
+	public TypeBinding receiver;  // JSR308 - explicit this parameter
 	public ReferenceBinding[] thrownExceptions;
 	public ReferenceBinding declaringClass;
 	public TypeVariableBinding[] typeVariables = Binding.NO_TYPE_VARIABLES;
@@ -227,6 +236,9 @@
 	/** Store nullness information from annotation (incl. applicable default). */
 	public Boolean[] parameterNonNullness;  // TRUE means @NonNull declared, FALSE means @Nullable declared, null means nothing declared
 
+	/** Store parameter names from MethodParameters attribute (incl. applicable default). */
+	public char[][] parameterNames = Binding.NO_PARAMETER_NAMES;
+
 protected MethodBinding() {
 	// for creating problem or synthetic method
 }
@@ -281,7 +293,7 @@
 		return false;
 
 	for (int i = 0; i < length; i++)
-		if (this.parameters[i] != args[i] && this.parameters[i].erasure() != args[i].erasure())
+		if (TypeBinding.notEquals(this.parameters[i], args[i]) && TypeBinding.notEquals(this.parameters[i].erasure(), args[i].erasure()))
 			return false;
 // :giro
   } finally {
@@ -304,12 +316,12 @@
 		if (paramLength == argLength) { // accept X[] but not X or X[][]
 			TypeBinding varArgType = this.parameters[lastIndex]; // is an ArrayBinding by definition
 			TypeBinding lastArgument = arguments[lastIndex];
-			if (varArgType != lastArgument && !lastArgument.isCompatibleWith(varArgType))
+			if (TypeBinding.notEquals(varArgType, lastArgument) && !lastArgument.isCompatibleWith(varArgType))
 				return false;
 		} else if (paramLength < argLength) { // all remainig argument types must be compatible with the elementsType of varArgType
 			TypeBinding varArgType = ((ArrayBinding) this.parameters[lastIndex]).elementsType();
 			for (int i = lastIndex; i < argLength; i++)
-				if (varArgType != arguments[i] && !arguments[i].isCompatibleWith(varArgType))
+				if (TypeBinding.notEquals(varArgType, arguments[i]) && !arguments[i].isCompatibleWith(varArgType))
 					return false;
 		} else if (lastIndex != argLength) { // can call foo(int i, X ... x) with foo(1) but NOT foo();
 			return false;
@@ -317,7 +329,7 @@
 		// now compare standard arguments from 0 to lastIndex
 	}
 	for (int i = 0; i < lastIndex; i++)
-		if (this.parameters[i] != arguments[i] && !arguments[i].isCompatibleWith(this.parameters[i]))
+		if (TypeBinding.notEquals(this.parameters[i], arguments[i]) && !arguments[i].isCompatibleWith(this.parameters[i]))
 			return false;
 	return true;
 }
@@ -333,7 +345,7 @@
 		return false;
 
 	for (int i = 0; i < length; i++)
-		if (this.parameters[i] != args[i])
+		if (TypeBinding.notEquals(this.parameters[i], args[i]))
 			return false;
 	return true;
 }
@@ -354,7 +366,7 @@
 		return false;
 
 	for (int i = 0; i < length; i++)
-		if (this.typeVariables[i] != vars[i] && this.typeVariables[i].erasure() != vars[i].erasure())
+		if (TypeBinding.notEquals(this.typeVariables[i], vars[i]) && TypeBinding.notEquals(this.typeVariables[i].erasure(), vars[i].erasure()))
 			return false;
 	return true;
 }
@@ -403,7 +415,7 @@
 	if (isPublic()) return true;
 
 	SourceTypeBinding invocationType = scope.enclosingSourceType();
-	if (invocationType == this.declaringClass) return true;
+	if (TypeBinding.equalsEquals(invocationType, this.declaringClass)) return true;
 
 	if (isProtected()) {
 //{ObjectTeams: for role check enclosing team rather than package:
@@ -438,7 +450,7 @@
 			outerDeclaringClass = temp;
 			temp = temp.enclosingType();
 		}
-		return outerInvocationType == outerDeclaringClass;
+		return TypeBinding.equalsEquals(outerInvocationType, outerDeclaringClass);
 	}
 
 	// isDefault()
@@ -479,7 +491,22 @@
 * NOTE: Cannot invoke this method with a compilation unit scope.
 */
 public final boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) {
+
+	SourceTypeBinding invocationType = scope.enclosingSourceType();
+//{ObjectTeams: staticness is no problem in synthetic role interfaces:
+  if (!this.declaringClass.isSynthInterface())	
+// SH}
+	if (this.declaringClass.isInterface() && isStatic()) {
+		// Static interface methods can be explicitly invoked only through the type reference of the declaring interface or implicitly in the interface itself or via static import.
+		if (scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8)
+			return false;
+		if ((invocationSite.isTypeAccess() || invocationSite.receiverIsImplicitThis()) && TypeBinding.equalsEquals(receiverType, this.declaringClass))
+			return true;
+		return false;
+	}
+	
 	if (isPublic()) return true;
+	
 
 //{ObjectTeams:
 	// creator methods conceptually belong to the role, check for stored orig ctor:
@@ -506,12 +533,11 @@
 			return true;
 		}
 // SH}
-	SourceTypeBinding invocationType = scope.enclosingSourceType();
 //{ObjectTeams: use receiverClass:
 /* orig:
-	if (invocationType == this.declaringClass && invocationType == receiverType) return true;
+	if (TypeBinding.equalsEquals(invocationType, this.declaringClass) && TypeBinding.equalsEquals(invocationType, receiverType)) return true;
   :giro */
-	if (invocationType == this.declaringClass && invocationType == receiverClass) return true;
+	if (TypeBinding.equalsEquals(invocationType, this.declaringClass) && TypeBinding.equalsEquals(invocationType, receiverClass)) return true;
 // SH}
 
 	if (invocationType == null) // static import call
@@ -528,7 +554,7 @@
 		//    AND the receiverType is the invocationType or its subclass
 		//    OR the method is a static method accessed directly through a type
 		//    OR previous assertions are true for one of the enclosing type
-		if (invocationType == this.declaringClass) return true;
+		if (TypeBinding.equalsEquals(invocationType, this.declaringClass)) return true;
 		if (invocationType.fPackage == this.declaringClass.fPackage) return true;
 
 		ReferenceBinding currentType = invocationType;
@@ -551,7 +577,7 @@
 					if (depth > 0) invocationSite.setDepth(depth);
 					return true; // see 1FMEPDL - return invocationSite.isTypeAccess();
 				}
-				if (currentType == receiverErasure || receiverErasure.findSuperTypeOriginatingFrom(currentType) != null) {
+				if (TypeBinding.equalsEquals(currentType, receiverErasure) || receiverErasure.findSuperTypeOriginatingFrom(currentType) != null) {
 					if (depth > 0) invocationSite.setDepth(depth);
 					return true;
 				}
@@ -573,7 +599,7 @@
 		// answer true if the receiverType is the declaringClass
 		// AND the invocationType and the declaringClass have a common enclosingType
 		receiverCheck: {
-			if (receiverType != this.declaringClass) {
+			if (TypeBinding.notEquals(receiverType, this.declaringClass)) {
 				// special tolerance for type variable direct bounds, but only if compliance <= 1.6, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=334622
 				if (scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_6 && receiverType.isTypeVariable() && ((TypeVariableBinding) receiverType).isErasureBoundTo(this.declaringClass.erasure()))
 					break receiverCheck;
@@ -581,7 +607,7 @@
 			}
 		}
 
-		if (invocationType != this.declaringClass) {
+		if (TypeBinding.notEquals(invocationType, this.declaringClass)) {
 			ReferenceBinding outerInvocationType = invocationType;
 			ReferenceBinding temp = outerInvocationType.enclosingType();
 			while (temp != null) {
@@ -595,7 +621,7 @@
 				outerDeclaringClass = temp;
 				temp = temp.enclosingType();
 			}
-			if (outerInvocationType != outerDeclaringClass) return false;
+			if (TypeBinding.notEquals(outerInvocationType, outerDeclaringClass)) return false;
 		}
 		return true;
 //{ObjectTeams: reset:
@@ -621,9 +647,9 @@
 // SH}
 	do {
 		if (currentType.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
-			if (originalDeclaringClass == currentType.erasure().original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.erasure().original())) return true;
 		} else {
-			if (originalDeclaringClass == currentType.original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.original())) return true;
 		}
 		PackageBinding currentPackage = currentType.fPackage;
 		// package could be null for wildcards/intersection types, ignore and recurse in superclass
@@ -880,7 +906,7 @@
 		this.tagBits |= TagBits.HasParameterAnnotations;
 	if (   this.returnType != null
 		&& !this.returnType.isBaseType()
-		&& (this.tagBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable)) == 0)
+		&& (this.tagBits & TagBits.AnnotationNullMASK) == 0)
 	{
 		this.tagBits |= TagBits.AnnotationNonNull;
 	} else if (sourceMethod != null && (this.tagBits & TagBits.AnnotationNonNull) != 0) {
@@ -888,12 +914,43 @@
 	}
 }
 
+protected void fillInDefaultNonNullness18(AbstractMethodDeclaration sourceMethod, LookupEnvironment env) {
+	boolean added = false;
+	int length = this.parameters.length;
+	for (int i = 0; i < length; i++) {
+		TypeBinding parameter = this.parameters[i];
+		if (parameter.isBaseType())
+			continue;
+		long existing = parameter.tagBits & TagBits.AnnotationNullMASK;
+		if (existing == 0L) {
+			added = true;
+			if (!parameter.isBaseType()) {
+				this.parameters[i] = env.createAnnotatedType(parameter, new AnnotationBinding[]{env.getNonNullAnnotation()});
+				if (sourceMethod != null)
+					sourceMethod.arguments[i].binding.type = this.parameters[i];
+			}
+		} else if (sourceMethod != null && (parameter.tagBits & TagBits.AnnotationNonNull) != 0) {
+			sourceMethod.scope.problemReporter().nullAnnotationIsRedundant(sourceMethod, i);
+		}
+	}
+	if (added)
+		this.tagBits |= TagBits.HasParameterAnnotations;
+	if (   this.returnType != null
+		&& !this.returnType.isBaseType()
+		&& (this.returnType.tagBits & TagBits.AnnotationNullMASK) == 0)
+	{
+		this.returnType = env.createAnnotatedType(this.returnType, new AnnotationBinding[]{env.getNonNullAnnotation()});
+	} else if (sourceMethod != null && (this.returnType.tagBits & TagBits.AnnotationNonNull) != 0) {
+		sourceMethod.scope.problemReporter().nullAnnotationIsRedundant(sourceMethod, -1/*signifies method return*/);
+	}
+}
+
 public MethodBinding findOriginalInheritedMethod(MethodBinding inheritedMethod) {
 	MethodBinding inheritedOriginal = inheritedMethod.original();
 	TypeBinding superType = this.declaringClass.findSuperTypeOriginatingFrom(inheritedOriginal.declaringClass);
 	if (superType == null || !(superType instanceof ReferenceBinding)) return null;
 
-	if (inheritedOriginal.declaringClass != superType) {
+	if (TypeBinding.notEquals(inheritedOriginal.declaringClass, superType)) {
 		// must find inherited method with the same substituted variables
 		MethodBinding[] superMethods = ((ReferenceBinding) superType).getMethods(inheritedOriginal.selector, inheritedOriginal.parameters.length);
 		for (int m = 0, l = superMethods.length; m < l; m++)
@@ -974,9 +1031,9 @@
 public final int getAccessFlags() {
 //{ObjectTeams: also allow callin flag
 /* orig:
-	return this.modifiers & ExtraCompilerModifiers.AccJustFlag;
+	return this.modifiers & (ExtraCompilerModifiers.AccJustFlag | ExtraCompilerModifiers.AccDefaultMethod);
   :giro */
-	return this.modifiers & (ExtraCompilerModifiers.AccJustFlag | ExtraCompilerModifiers.AccCallin);
+	return this.modifiers & (ExtraCompilerModifiers.AccJustFlag | ExtraCompilerModifiers.AccDefaultMethod | ExtraCompilerModifiers.AccCallin);
 // SH}
 }
 
@@ -1128,6 +1185,11 @@
 	return (this.modifiers & ExtraCompilerModifiers.AccDefaultAbstract) != 0;
 }
 
+/* Answer true if the receiver is a default method (Java 8 feature) */
+public boolean isDefaultMethod() {
+	return (this.modifiers & ExtraCompilerModifiers.AccDefaultMethod) != 0;
+}
+
 /* Answer true if the receiver is a deprecated method
 */
 public final boolean isDeprecated() {
@@ -1646,7 +1708,7 @@
 		}
 //{ObjectTeams: 'weaken' to that erasure that was used in the tsuper version:
 /* orig:
-		buffer.append(this.returnType.signature()); 
+		buffer.append(this.returnType.signature());
   :giro */
 		buffer.append(getCodeGenType(-1).signature());
 // SH}
@@ -1677,14 +1739,7 @@
 		return null;
 	}
 
-//{ObjectTeams: more robust this way!?!
-/* orig:
-	AbstractMethodDeclaration[] methods = sourceType.scope.referenceContext.methods;
-  :giro */
-	if (sourceType.model.getState() == ITranslationStates.STATE_FINAL)
-		return null; // no source available any more
-	AbstractMethodDeclaration[] methods = sourceType.model.getAst().methods;
-// SH}
+	AbstractMethodDeclaration[] methods = sourceType.scope != null ? sourceType.scope.referenceContext.methods : null;
 	if (methods != null) {
 		for (int i = methods.length; --i >= 0;)
 			if (this == methods[i].binding)
@@ -1692,6 +1747,9 @@
 	}
 	return null;
 }
+public LambdaExpression sourceLambda() {
+	return null;
+}
 public final int sourceStart() {
 	AbstractMethodDeclaration method = sourceMethod();
 	if (method == null) {
@@ -1721,6 +1779,7 @@
 	}
 //{ObjectTeams: print only conditionally:
   if (showModifiers)
+// SH}
 	ASTNode.printModifiers(this.modifiers, output);
 	output.append(this.returnType != null ? this.returnType.debugName() : "<no type>"); //$NON-NLS-1$
 	output.append(" "); //$NON-NLS-1$
@@ -1763,4 +1822,20 @@
 		return false;
 	return this.declaringClass.hasNonNullDefault();
 }
+
+public boolean redeclaresPublicObjectMethod(Scope scope) {
+	ReferenceBinding javaLangObject = scope.getJavaLangObject();
+	MethodBinding [] methods = javaLangObject.getMethods(this.selector);
+	for (int i = 0, length = methods == null ? 0 : methods.length; i < length; i++) {
+		final MethodBinding method = methods[i];
+		if (!method.isPublic() || method.isStatic() || method.parameters.length != this.parameters.length) 
+			continue;
+		if (MethodVerifier.doesMethodOverride(this, method, scope.environment())) 
+			return true;
+	}
+	return false;
+}
+public boolean isVoidMethod() {
+	return this.returnType == TypeBinding.VOID;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
index d1f2cd7..f68f16d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodScope.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: MethodScope.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -13,12 +16,20 @@
  *     Stephan Herrmann - Contributions for
  *								bug 349326 - [1.7] new warning for missing try-with-resources
  *								bug 374605 - Unreasonable warning for enum-based switch statements
+ *								bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
+ *								bug 382354 - [1.8][compiler] Compiler silent on conflicting modifier
+ *								bug 401030 - [1.8][null] Null analysis support for lambda methods.
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
+ *     Jesper S Moller - Contributions for
+ *							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
+import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ast.*;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
+import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
 import org.eclipse.jdt.internal.compiler.flow.UnconditionalFlowInfo;
 import org.eclipse.jdt.internal.compiler.impl.IrritantSet;
@@ -82,7 +93,7 @@
 	// remember suppressed warning re missing 'default:' to give hints on possibly related flow problems
 	public boolean hasMissingSwitchDefault; // TODO(stephan): combine flags to a bitset?
 
-public MethodScope(ClassScope parent, ReferenceContext context, boolean isStatic) {
+public MethodScope(Scope parent, ReferenceContext context, boolean isStatic) {
 	super(METHOD_SCOPE, parent);
 	this.locals = new LocalVariableBinding[5];
 	this.referenceContext = context;
@@ -212,11 +223,35 @@
   :giro */
 	if (declaringClass.isRegularInterface()) {
 // SH}
-		if ((realModifiers & ~(ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract)) != 0) {
+		int expectedModifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
+		boolean isDefaultMethod = (modifiers & ExtraCompilerModifiers.AccDefaultMethod) != 0; // no need to check validity, is done by the parser
+		boolean reportIllegalModifierCombination = false;
+		boolean isJDK18orGreater = false;
+		if (compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8 && !declaringClass.isAnnotationType()) {
+			expectedModifiers |= ClassFileConstants.AccStrictfp
+					| ExtraCompilerModifiers.AccDefaultMethod | ClassFileConstants.AccStatic;
+			isJDK18orGreater = true;
+			if (!methodBinding.isAbstract()) {
+				reportIllegalModifierCombination = isDefaultMethod && methodBinding.isStatic();
+			} else {
+				reportIllegalModifierCombination = isDefaultMethod || methodBinding.isStatic();
+				if (methodBinding.isStrictfp()) {
+					problemReporter().illegalAbstractModifierCombinationForMethod((AbstractMethodDeclaration) this.referenceContext);
+				}
+			}
+			if (reportIllegalModifierCombination) {
+				problemReporter().illegalModifierCombinationForInterfaceMethod((AbstractMethodDeclaration) this.referenceContext);
+			}
+			// Kludge - The AccDefaultMethod bit is outside the lower 16 bits and got removed earlier. Putting it back.
+			if (isDefaultMethod) {
+				realModifiers |= ExtraCompilerModifiers.AccDefaultMethod;
+			}
+		}
+		if ((realModifiers & ~expectedModifiers) != 0) {
 			if ((declaringClass.modifiers & ClassFileConstants.AccAnnotation) != 0)
 				problemReporter().illegalModifierForAnnotationMember((AbstractMethodDeclaration) this.referenceContext);
 			else
-				problemReporter().illegalModifierForInterfaceMethod((AbstractMethodDeclaration) this.referenceContext);
+				problemReporter().illegalModifierForInterfaceMethod((AbstractMethodDeclaration) this.referenceContext, isJDK18orGreater);
 		}
 		return;
 	}
@@ -353,7 +388,7 @@
 		// assign variable position
 		local.resolvedPosition = this.offset;
 
-		if ((local.type == TypeBinding.LONG) || (local.type == TypeBinding.DOUBLE)) {
+		if ((TypeBinding.equalsEquals(local.type, TypeBinding.LONG)) || (TypeBinding.equalsEquals(local.type, TypeBinding.DOUBLE))) {
 			this.offset += 2;
 		} else {
 			this.offset++;
@@ -370,7 +405,7 @@
 		for (int iarg = 0, maxArguments = this.extraSyntheticArguments.length; iarg < maxArguments; iarg++){
 			SyntheticArgumentBinding argument = this.extraSyntheticArguments[iarg];
 			argument.resolvedPosition = this.offset;
-			if ((argument.type == TypeBinding.LONG) || (argument.type == TypeBinding.DOUBLE)){
+			if ((TypeBinding.equalsEquals(argument.type, TypeBinding.LONG)) || (TypeBinding.equalsEquals(argument.type, TypeBinding.DOUBLE))){
 				this.offset += 2;
 			} else {
 				this.offset++;
@@ -403,11 +438,16 @@
 	} else {
 //{ObjectTeams: changed to isRegularInterface: role interfaces don't force public
 /*orig:
-		if (declaringClass.isInterface()) // interface or annotation type
+		if (declaringClass.isInterface()) {// interface or annotation type
  :giro */
-		if (declaringClass.isRegularInterface())
+		if (declaringClass.isRegularInterface()) {
 // SH}
-			modifiers |= ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
+			if (method.isDefaultMethod() || method.isStatic()) {
+				modifiers |= ClassFileConstants.AccPublic; // default method is not abstract
+			} else {
+				modifiers |= ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
+			}
+		}
 		method.binding =
 			new MethodBinding(modifiers, method.selector, null, null, null, declaringClass);
 		checkAndSetModifiersForMethod(method.binding);
@@ -424,12 +464,29 @@
 
 	Argument[] argTypes = method.arguments;
 	int argLength = argTypes == null ? 0 : argTypes.length;
-	if (argLength > 0 && compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
-		if (argTypes[--argLength].isVarArgs())
+	long sourceLevel = compilerOptions().sourceLevel;
+	if (argLength > 0) {
+		Argument argument = argTypes[--argLength];
+		if (argument.isVarArgs() && sourceLevel >= ClassFileConstants.JDK1_5)
 			method.binding.modifiers |= ClassFileConstants.AccVarargs;
+		if (CharOperation.equals(argument.name, ConstantPool.This)) {
+			problemReporter().illegalThisDeclaration(argument);
+		}
 		while (--argLength >= 0) {
-			if (argTypes[argLength].isVarArgs())
-				problemReporter().illegalVararg(argTypes[argLength], method);
+			argument = argTypes[argLength];
+			if (argument.isVarArgs() && sourceLevel >= ClassFileConstants.JDK1_5)
+				problemReporter().illegalVararg(argument, method);
+			if (CharOperation.equals(argument.name, ConstantPool.This)) {
+				problemReporter().illegalThisDeclaration(argument);
+			}
+		}
+	}
+	if (method.receiver != null) {
+		if (sourceLevel <= ClassFileConstants.JDK1_7) {
+			problemReporter().illegalSourceLevelForThis(method.receiver);
+		}
+		if (method.receiver.annotations != null) {
+			method.bits |= ASTNode.HasTypeAnnotations;
 		}
 	}
 
@@ -464,7 +521,7 @@
 	if (field.isStatic())
 		return field; // static fields are always accessible
 
-	if (!this.isConstructorCall || receiverType != enclosingSourceType())
+	if (!this.isConstructorCall || TypeBinding.notEquals(receiverType, enclosingSourceType()))
 		return field;
 
 	if (invocationSite instanceof SingleNameReference)
@@ -495,6 +552,10 @@
 	return (this.referenceContext instanceof TypeDeclaration);
 }
 
+public boolean isLambdaScope() {
+	return this.referenceContext instanceof LambdaExpression;
+}
+
 public boolean isInsideInitializerOrConstructor() {
 	return (this.referenceContext instanceof TypeDeclaration)
 		|| (this.referenceContext instanceof ConstructorDeclaration);
@@ -570,7 +631,7 @@
 }
 
 /**
- *  Answer the reference method of this scope, or null if initialization scope.
+ *  Answer the reference method of this scope, or null if initialization scope or lambda scope.
  */
 public AbstractMethodDeclaration referenceMethod() {
 	if (this.referenceContext instanceof AbstractMethodDeclaration) return (AbstractMethodDeclaration) this.referenceContext;
@@ -578,18 +639,30 @@
 }
 
 /**
+ * Answers the binding of the reference method or reference lambda expression.
+ */
+public MethodBinding referenceMethodBinding() {
+	if (this.referenceContext instanceof LambdaExpression)
+		return ((LambdaExpression)this.referenceContext).binding;
+	if (this.referenceContext instanceof AbstractMethodDeclaration)
+		return ((AbstractMethodDeclaration)this.referenceContext).binding;
+	return null;
+}
+
+/**
  *  Answer the reference type of this scope.
  * It is the nearest enclosing type of this scope.
  */
 public TypeDeclaration referenceType() {
-	return ((ClassScope) this.parent).referenceContext;
+	ClassScope scope = enclosingClassScope();
+	return scope == null ? null : scope.referenceContext;
+}
+
+void resolveTypeParameter(TypeParameter typeParameter) {
+	typeParameter.resolve(this);
 }
 
 //{ObjectTeams: new queries:
-	public MethodBinding referenceMethodBinding() {
-		if (this.referenceContext instanceof AbstractMethodDeclaration) return ((AbstractMethodDeclaration) this.referenceContext).binding;
-		return null;
-	}
 	/**
      * Does this scope represent a callin wrapper
      * (either the mapping declaration or the generated wrapper method)?
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
index f427047..e13bf0a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java
@@ -5,16 +5,26 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Benjamin Muskalla - Contribution for bug 239066
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for
+ *     							bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
+ *								bug 388954 - [1.8][compiler] detect default methods in class files
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
+ *								bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract
+ *								bug 390883 - [1.8][compiler] Unable to override default method
+ *								bug 401796 - [1.8][compiler] don't treat default methods as overriding an independent inherited abstract method
  *								bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795
  *								bug 406928 - computation of inherited methods seems damaged (affecting @Overrides)
  *								bug 409473 - [compiler] JDT cannot compile against JRE 1.8
+ *								Bug 420080 - [1.8] Overridden Default method is reported as duplicated
  *								Bug 418235 - [compiler][null] Unreported nullness error when using generic
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
@@ -69,8 +79,7 @@
 	SourceTypeBinding type;
 	HashtableOfObject inheritedMethods;
 	HashtableOfObject currentMethods;
-	private boolean allowCompatibleReturnTypes;
-/*
+	/*
 Binding creation is responsible for reporting all problems with types:
 	- all modifier problems (duplicates & multiple visibility modifiers + incompatible combinations - abstract/final)
 		- plus invalid modifiers given the context (the verifier did not do this before)
@@ -92,49 +101,45 @@
 	this.type = null;  // Initialized with the public method verify(SourceTypeBinding)
 	this.inheritedMethods = null;
 	this.currentMethods = null;
-	this.environment = environment;
-	this.allowCompatibleReturnTypes =
-		environment.globalOptions.complianceLevel >= ClassFileConstants.JDK1_5
-			&& environment.globalOptions.sourceLevel < ClassFileConstants.JDK1_5;
+}
+boolean areMethodsCompatible(MethodBinding one, MethodBinding two) {
+	return areMethodsCompatible(one, two, this.environment);
+}
+static boolean areMethodsCompatible(MethodBinding one, MethodBinding two, LookupEnvironment environment) {
+	// use the original methods to test compatibility, but do not check visibility, etc
+	one = one.original();
+	two = one.findOriginalInheritedMethod(two);
+
+	if (two == null)
+		return false; // method's declaringClass does not inherit from inheritedMethod's
+
+	return isParameterSubsignature(one, two, environment);
 }
 boolean areReturnTypesCompatible(MethodBinding one, MethodBinding two) {
-//{ObjectTeams: consider enhanced callin signatures:
-	/* orig:
-	if (one.returnType == two.returnType) return true;
-	   :giro */
-	if (MethodModel.getReturnType(one) == MethodModel.getReturnType(two)) return true;
-// SH}
-
-//{ObjectTeams: added 3. argument, added adjustment of callin-return
-	if (areTypesEqual(MethodModel.getReturnType(one), MethodModel.getReturnType(two), two)) return true;
-/* orig:
-	if (areTypesEqual(one.returnType, two.returnType)) return true;
- */
-// SH}
-
-//different comparison for role types:
-	if (areEqualRoleTypes(one.returnType, two.returnType, two.declaringClass, this.environment))
-		return true;
-// SH}
-
-	// when sourceLevel < 1.5 but compliance >= 1.5, allow return types in binaries to be compatible instead of just equal
-	if (this.allowCompatibleReturnTypes &&
-			one.declaringClass instanceof BinaryTypeBinding &&
-			two.declaringClass instanceof BinaryTypeBinding) {
-		return areReturnTypesCompatible0(one, two);
-	}
-	return false;
+	return areReturnTypesCompatible(one, two, this.type.scope.environment());
 }
-boolean areReturnTypesCompatible0(MethodBinding one, MethodBinding two) {
-	// short is compatible with int, but as far as covariance is concerned, its not
-	if (one.returnType.isBaseType()) return false;
+static boolean areReturnTypesCompatible(MethodBinding one, MethodBinding two, LookupEnvironment environment) {
+//{ObjectTeams: consider enhanced callin signatures:
+	TypeBinding oneReturnType = MethodModel.getReturnType(one);
+	TypeBinding twoReturnType = MethodModel.getReturnType(two);
+  // almost orig:
+	if (TypeBinding.equalsEquals(oneReturnType, twoReturnType)) return true;
+	if (environment.globalOptions.sourceLevel >= ClassFileConstants.JDK1_5) {
+		// short is compatible with int, but as far as covariance is concerned, its not
+		if (oneReturnType.isBaseType()) return false;
 
-	if (!one.declaringClass.isInterface() && one.declaringClass.id == TypeIds.T_JavaLangObject)
-		return two.returnType.isCompatibleWith(one.returnType); // interface methods inherit from Object
+	// OT: different comparison for role types:
+		if (areEqualRoleTypes(one.returnType, two.returnType, two.declaringClass, environment))
+			return true;
+	// :TO
+		if (!one.declaringClass.isInterface() && one.declaringClass.id == TypeIds.T_JavaLangObject)
+			return twoReturnType.isCompatibleWith(oneReturnType); // interface methods inherit from Object
 
-	// TODO(SH): Confined??
-
-	return one.returnType.isCompatibleWith(two.returnType);
+		return oneReturnType.isCompatibleWith(twoReturnType);
+	} else {
+		return areTypesEqual(oneReturnType.erasure(), twoReturnType.erasure(), two, environment);
+	}
+// SH}
 }
 boolean canSkipInheritedMethods() {
 	if (this.type.superclass() != null && this.type.superclass().isAbstract())
@@ -143,7 +148,7 @@
 }
 boolean canSkipInheritedMethods(MethodBinding one, MethodBinding two) {
 	return two == null // already know one is not null
-		|| one.declaringClass == two.declaringClass;
+		|| TypeBinding.equalsEquals(one.declaringClass, two.declaringClass);
 }
 void checkAbstractMethod(MethodBinding abstractMethod) {
 //{ObjectTeams: shortcut for special methods:
@@ -222,7 +227,21 @@
 //					currentMethod.modifiers |= CompilerModifiers.AccImplementing;
 			} else if (inheritedMethod.isPublic() || !this.type.isInterface()) {
 				// interface I { @Override Object clone(); } does not override Object#clone()
-				currentMethod.modifiers |= ExtraCompilerModifiers.AccOverriding;
+				if (currentMethod.isDefaultMethod()
+						&& !inheritedMethod.isFinal() // overriding final is already reported, that's enough
+						&& inheritedMethod.declaringClass.id == TypeIds.T_JavaLangObject)
+				{
+					// JLS 9.4.3 (Java8): default method cannot override method from j.l.Object
+					problemReporter(currentMethod).defaultMethodOverridesObjectMethod(currentMethod);
+				} else {
+					// TODO (stephan) using AccImplementing for overrides of a default method works well
+					// for OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation
+					// but we should check if it has bad side effects elsewhere.
+					if (inheritedMethod.isDefaultMethod())
+						currentMethod.modifiers |= ExtraCompilerModifiers.AccImplementing;
+					else
+						currentMethod.modifiers |= ExtraCompilerModifiers.AccOverriding;
+				}
 			}
 
 			if (!areReturnTypesCompatible(currentMethod, inheritedMethod)
@@ -303,8 +322,23 @@
 //			currentMethod.modifiers |= CompilerModifiers.AccImplementing;
 	} else if (inheritedMethod.isPublic() || !this.type.isInterface()) {
 		// interface I { @Override Object clone(); } does not override Object#clone()
-		currentMethod.modifiers |= ExtraCompilerModifiers.AccOverriding;
+		if (currentMethod.isDefaultMethod()
+				&& !inheritedMethod.isFinal() // overriding final is already reported, that's enough
+				&& inheritedMethod.declaringClass.id == TypeIds.T_JavaLangObject)
+		{
+			// JLS 9.4.3 (Java8): default method cannot override method from j.l.Object
+			problemReporter(currentMethod).defaultMethodOverridesObjectMethod(currentMethod);
+		} else {
+			// TODO (stephan) using AccImplementing for overrides of a default method works well
+			// for OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation
+			// but we should check if it has bad side effects elsewhere.
+			if (inheritedMethod.isDefaultMethod())
+				currentMethod.modifiers |= ExtraCompilerModifiers.AccImplementing;
+			else
+				currentMethod.modifiers |= ExtraCompilerModifiers.AccOverriding;
+		}
 	}
+
 // OT:
     // can't directly compare types (may need to involve role type adjustment).
 	TypeBinding inheritedReturn = (inheritedMethod.isAnyCallin()) ?
@@ -321,11 +355,16 @@
 				return; // orig: continue nextMethod;
 		}
 	reportRawReferences(currentMethod, inheritedMethod); // if they were deferred, emit them now.
+	reportRawReferences(currentMethod, inheritedMethod); // if they were deferred, emit them now.
 	if (currentMethod.thrownExceptions != Binding.NO_EXCEPTIONS)
 		checkExceptions(currentMethod, inheritedMethod);
 	if (inheritedMethod.isFinal())
 		problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod);
 	if (!isAsVisible(currentMethod, inheritedMethod))
+//{ObjectTeams: only if both methods are role interface methods or both are not
+        if (   Protections.isRoleInterfaceMethod(inheritedMethod)
+            == Protections.isRoleInterfaceMethod(currentMethod))
+//SH}
 /*OT:*/		this.problemReporter(currentMethod).tsubMethodReducesVisibility(currentMethod, inheritedMethod);
 	if(inheritedMethod.isSynchronized() && !currentMethod.isSynchronized()) {
 		problemReporter(currentMethod).missingSynchronizedOnInheritedMethod(currentMethod, inheritedMethod);
@@ -453,7 +492,7 @@
 					continue;
 // SH}
 				for (int r = 0, rl = refs.length; r < rl; r++) {
-					if (refs[r].resolvedType == toCheck) {
+					if (TypeBinding.equalsEquals(refs[r].resolvedType, toCheck)) {
 						problemReporter().redundantSuperInterface(this.type, refs[j], implementedInterface, toCheck);
 						break; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=320911
 					}
@@ -480,7 +519,7 @@
 						redundantInterfaces.add(inheritedInterface);
 						TypeReference[] refs = this.type.scope.referenceContext.superInterfaces;
 						for (int r = 0, rl = refs.length; r < rl; r++) {
-							if (refs[r].resolvedType == inheritedInterface) {
+							if (TypeBinding.equalsEquals(refs[r].resolvedType, inheritedInterface)) {
 								problemReporter().redundantSuperInterface(this.type, refs[r], inheritedInterface, superType);
 								break;
 							}
@@ -516,7 +555,7 @@
 						redundantInterfaces.add(inheritedInterface);
 						TypeReference[] refs = this.type.scope.referenceContext.superInterfaces;
 						for (int r = 0, rl = refs.length; r < rl; r++) {
-							if (refs[r].resolvedType == inheritedInterface) {
+							if (TypeBinding.equalsEquals(refs[r].resolvedType, inheritedInterface)) {
 								problemReporter().redundantSuperInterface(this.type, refs[r], inheritedInterface, superType);
 								break;
 							}
@@ -531,7 +570,7 @@
 	}
 }
 
-void checkInheritedMethods(MethodBinding[] methods, int length, boolean[] isOverridden) {
+void checkInheritedMethods(MethodBinding[] methods, int length, boolean[] isOverridden, boolean[] isInherited) {
 	/*
 	1. find concrete method
 	2. if it doesn't exist then find first inherited abstract method whose return type is compatible with all others
@@ -545,7 +584,7 @@
 
 	MethodBinding concreteMethod = this.type.isInterface() || methods[0].isAbstract() ? null : methods[0];
 	if (concreteMethod == null) {
-		MethodBinding bestAbstractMethod = length == 1 ? methods[0] : findBestInheritedAbstractMethod(methods, length);
+		MethodBinding bestAbstractMethod = length == 1 ? methods[0] : findBestInheritedAbstractOrDefaultMethod(methods, length);
 		boolean noMatch = bestAbstractMethod == null;
 		if (noMatch)
 			bestAbstractMethod = methods[0];
@@ -578,7 +617,7 @@
 	while (--index > 0 && checkInheritedReturnTypes(concreteMethod, methods[index])) {/*empty*/}
 	if (index > 0) {
 		// concreteMethod is not the best match
-		MethodBinding bestAbstractMethod = findBestInheritedAbstractMethod(methods, length);
+		MethodBinding bestAbstractMethod = findBestInheritedAbstractOrDefaultMethod(methods, length);
 		if (bestAbstractMethod == null)
 			problemReporter().inheritedMethodsHaveIncompatibleReturnTypes(this.type, methods, length, isOverridden);
 		else // can only happen in >= 1.5 since return types must be equal prior to 1.5
@@ -596,7 +635,6 @@
 		System.arraycopy(abstractMethods, 0, abstractMethods = new MethodBinding[index], 0, index);
 	checkConcreteInheritedMethod(concreteMethod, abstractMethods);
 }
-
 boolean checkInheritedReturnTypes(MethodBinding method, MethodBinding otherMethod) {
 	if (areReturnTypesCompatible(method, otherMethod)) return true;
 
@@ -648,7 +686,7 @@
 					return; // found concrete implementation of abstract method in same package
 			}
 		}
-	} while ((superType = superType.superclass()) != abstractMethod.declaringClass);
+	} while (TypeBinding.notEquals((superType = superType.superclass()), abstractMethod.declaringClass));
 
 	// non visible abstract methods cannot be overridden so the type must be defined abstract
 	problemReporter().abstractMethodCannotBeOverridden(this.type, abstractMethod);
@@ -696,7 +734,7 @@
 					MethodBinding existingMethod = existingMethods[i];
 					// https://bugs.eclipse.org/bugs/show_bug.cgi?id=302358, skip inherited method only if any overriding version
 					// in a subclass is guaranteed to have the same erasure as an existing method.
-					if (existingMethod.declaringClass != inheritedMethod.declaringClass && areMethodsCompatible(existingMethod, inheritedMethod) && !canOverridingMethodDifferInErasure(existingMethod, inheritedMethod)) {
+					if (TypeBinding.notEquals(existingMethod.declaringClass, inheritedMethod.declaringClass) && areMethodsCompatible(existingMethod, inheritedMethod) && !canOverridingMethodDifferInErasure(existingMethod, inheritedMethod)) {
 						if (inheritedMethod.isDefault()) {
 							if (inheritedMethod.isAbstract()) {
 								checkPackagePrivateAbstractMethod(inheritedMethod);
@@ -784,6 +822,7 @@
 					&& MethodModel.isRoleMethodInheritedFromNonPublicRegular(inheritedMethod))
 					continue nextMethod;
 // SH}
+				if (inheritedMethod.isStatic()) continue nextMethod;
 				MethodBinding[] existingMethods = (MethodBinding[]) this.inheritedMethods.get(inheritedMethod.selector);
 				if (existingMethods == null) {
 					existingMethods = new MethodBinding[] {inheritedMethod};
@@ -847,15 +886,119 @@
 	}
 }
 
+MethodBinding computeSubstituteMethod(MethodBinding inheritedMethod, MethodBinding currentMethod) {
+	return computeSubstituteMethod(inheritedMethod, currentMethod, this.environment);
+}
+
+static MethodBinding computeSubstituteMethod(MethodBinding inheritedMethod, MethodBinding currentMethod, LookupEnvironment environment) {
+	if (inheritedMethod == null) return null;
+//{ObjectTeams: use source-level params in case of enhanced callin methods:
+/* orig:
+	if (currentMethod.parameters.length != inheritedMethod.parameters.length) return null; // no match
+  :giro */
+	if (currentMethod.getSourceParamLength() != inheritedMethod.getSourceParamLength()) return null; // no match
+// SH}
+
+	// due to hierarchy & compatibility checks, we need to ensure these 2 methods are resolved
+	if (currentMethod.declaringClass instanceof BinaryTypeBinding)
+		((BinaryTypeBinding) currentMethod.declaringClass).resolveTypesFor(currentMethod);
+	if (inheritedMethod.declaringClass instanceof BinaryTypeBinding)
+		((BinaryTypeBinding) inheritedMethod.declaringClass).resolveTypesFor(inheritedMethod);
+
+	TypeVariableBinding[] inheritedTypeVariables = inheritedMethod.typeVariables;
+	int inheritedLength = inheritedTypeVariables.length;
+	if (inheritedLength == 0) return inheritedMethod; // no substitution needed
+	TypeVariableBinding[] typeVariables = currentMethod.typeVariables;
+	int length = typeVariables.length;
+	if (length == 0)
+		return inheritedMethod.asRawMethod(environment);
+	if (length != inheritedLength)
+		return inheritedMethod; // no match JLS 8.4.2
+
+	// interface I { <T> void foo(T t); }
+	// class X implements I { public <T extends I> void foo(T t) {} }
+	// for the above case, we do not want to answer the substitute method since its not a match
+	TypeBinding[] arguments = new TypeBinding[length];
+	System.arraycopy(typeVariables, 0, arguments, 0, length);
+	ParameterizedGenericMethodBinding substitute =
+		environment.createParameterizedGenericMethod(inheritedMethod, arguments);
+	for (int i = 0; i < inheritedLength; i++) {
+		TypeVariableBinding inheritedTypeVariable = inheritedTypeVariables[i];
+		TypeVariableBinding typeVariable = (TypeVariableBinding) arguments[i]; // cast is safe by construction: arguments is copied from TypeVariableBinding[]
+		if (TypeBinding.equalsEquals(typeVariable.firstBound, inheritedTypeVariable.firstBound)) {
+			if (typeVariable.firstBound == null)
+				continue; // both are null
+		} else if (typeVariable.firstBound != null && inheritedTypeVariable.firstBound != null) {
+			if (typeVariable.firstBound.isClass() != inheritedTypeVariable.firstBound.isClass())
+				return inheritedMethod; // not a match
+		}
+		if (TypeBinding.notEquals(Scope.substitute(substitute, inheritedTypeVariable.superclass), typeVariable.superclass))
+			return inheritedMethod; // not a match
+		int interfaceLength = inheritedTypeVariable.superInterfaces.length;
+		ReferenceBinding[] interfaces = typeVariable.superInterfaces;
+		if (interfaceLength != interfaces.length)
+			return inheritedMethod; // not a match
+		next : for (int j = 0; j < interfaceLength; j++) {
+			TypeBinding superType = Scope.substitute(substitute, inheritedTypeVariable.superInterfaces[j]);
+			for (int k = 0; k < interfaceLength; k++)
+				if (TypeBinding.equalsEquals(superType, interfaces[k]))
+					continue next;
+			return inheritedMethod; // not a match
+		}
+	}
+   return substitute;
+}
+
+static boolean couldMethodOverride(MethodBinding method, MethodBinding inheritedMethod) {
+	if (!org.eclipse.jdt.core.compiler.CharOperation.equals(method.selector, inheritedMethod.selector))
+		return false;
+	if (method == inheritedMethod || method.isStatic() || inheritedMethod.isStatic())
+//{ObjectTeams: treat static pair of methods in role ifc/class as overriding:
+	  if (!staticRoleMethodImpl(method, inheritedMethod))
+// SH}
+		return false;
+	if (inheritedMethod.isPrivate())
+		return false;
+	if (inheritedMethod.isDefault() && method.declaringClass.getPackage() != inheritedMethod.declaringClass.getPackage())
+		return false;
+	if (!method.isPublic()) { // inheritedMethod is either public or protected & method is less than public
+		if (inheritedMethod.isPublic())
+			return false;
+		if (inheritedMethod.isProtected() && !method.isProtected())
+			return false;
+	}
+	return true;
+}
+
+//{ObjectTeams: is method the static implementation of a role ifc's abstract static?
+private static boolean staticRoleMethodImpl(MethodBinding method, MethodBinding inheritedMethod)
+{
+	if (inheritedMethod.declaringClass.isSynthInterface())
+		return method.isStatic() && inheritedMethod.isStatic();
+	return false;
+}
+// SH}
+
+// Answer whether the method overrides the inheritedMethod
+// Check the necessary visibility rules & inheritance from the inheritedMethod's declaringClass
+// See isMethodSubsignature() for parameter comparisons
+public boolean doesMethodOverride(MethodBinding method, MethodBinding inheritedMethod) {
+	return doesMethodOverride(method, inheritedMethod, this.environment);
+}
+public static boolean doesMethodOverride(MethodBinding method, MethodBinding inheritedMethod, LookupEnvironment environment) {
+	return couldMethodOverride(method, inheritedMethod) && areMethodsCompatible(method, inheritedMethod, environment);
+}
 SimpleSet findSuperinterfaceCollisions(ReferenceBinding superclass, ReferenceBinding[] superInterfaces) {
 	return null; // noop in 1.4
 }
 
-MethodBinding findBestInheritedAbstractMethod(MethodBinding[] methods, int length) {
+MethodBinding findBestInheritedAbstractOrDefaultMethod(MethodBinding[] methods, int length) {
 	findMethod : for (int i = 0; i < length; i++) {
 		MethodBinding method = methods[i];
-		// when unexpectedly seeing a non-abstract interface method regard it as abstract, too, for this check:
-		if (!(method.isAbstract() || method.declaringClass.isInterface())) continue findMethod;
+		if (!(method.isAbstract() || method.isDefaultMethod())) continue findMethod;
+// from master:
+//		// when unexpectedly seeing a non-abstract interface method regard it as abstract, too, for this check:
+//		if (!(method.isAbstract() || method.declaringClass.isInterface())) continue findMethod;
 		for (int j = 0; j < length; j++) {
 			if (i == j) continue;
 			if (!checkInheritedReturnTypes(method, methods[j])) {
@@ -882,7 +1025,7 @@
 		// only keep methods from the closest superclass, all others from higher superclasses can be skipped
 		// NOTE: methods were added in order by walking up the superclass hierarchy
 		ReferenceBinding declaringClass2 = methods[++i].declaringClass;
-		while (declaringClass == declaringClass2) {
+		while (TypeBinding.equalsEquals(declaringClass, declaringClass2)) {
 			if (++i == length) return null;
 			declaringClass2 = methods[i].declaringClass;
 		}
@@ -905,7 +1048,7 @@
 		for (int j = i + 1; j < length; j++) {
 			if (toSkip != null && toSkip[j] == -1) continue;
 			ReferenceBinding declaringClass2 = methods[j].declaringClass;
-			if (declaringClass == declaringClass2) continue;
+			if (TypeBinding.equalsEquals(declaringClass, declaringClass2)) continue;
 			if (declaringClass.implementsInterface(declaringClass2, true)) {
 				if (toSkip == null)
 					toSkip = new int[length];
@@ -945,7 +1088,9 @@
 
 boolean isInterfaceMethodImplemented(MethodBinding inheritedMethod, MethodBinding existingMethod, ReferenceBinding superType) {
 	// skip interface method with the same signature if visible to its declaringClass
-	return areParametersEqual(existingMethod, inheritedMethod) && existingMethod.declaringClass.implementsInterface(superType, true);
+//{ObjectTeams: added 3. argument:
+	return areParametersEqual(existingMethod, inheritedMethod, this.environment) && existingMethod.declaringClass.implementsInterface(superType, true);
+// SH}
 }
 
 public boolean isMethodSubsignature(MethodBinding method, MethodBinding inheritedMethod) {
@@ -953,9 +1098,68 @@
 		&& isParameterSubsignature(method, inheritedMethod);
 }
 
+boolean isParameterSubsignature(MethodBinding method, MethodBinding inheritedMethod) {
+	return isParameterSubsignature(method, inheritedMethod, this.environment);
+}
+static boolean isParameterSubsignature(MethodBinding method, MethodBinding inheritedMethod, LookupEnvironment environment) {
+	MethodBinding substitute = computeSubstituteMethod(inheritedMethod, method, environment);
+	return substitute != null && isSubstituteParameterSubsignature(method, substitute, environment);
+}
+
+//if method "overrides" substituteMethod then we can skip over substituteMethod while resolving a message send
+//if it does not then a name clash error is likely
+boolean isSubstituteParameterSubsignature(MethodBinding method, MethodBinding substituteMethod) {
+	return isSubstituteParameterSubsignature(method, substituteMethod, this.environment);
+}
+
+static boolean isSubstituteParameterSubsignature(MethodBinding method, MethodBinding substituteMethod, LookupEnvironment environment) {
+//{ObjectTeams: added 3. argument:
+	if (!areParametersEqual(method, substituteMethod, environment)) {
+// SH}
+		// method can still override substituteMethod in cases like :
+		// <U extends Number> void c(U u) {}
+		// @Override void c(Number n) {}
+		// but method cannot have a "generic-enabled" parameter type
+		if (substituteMethod.hasSubstitutedParameters() && method.areParameterErasuresEqual(substituteMethod))
+			return method.typeVariables == Binding.NO_TYPE_VARIABLES && !hasGenericParameter(method);
+
+		// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=279836
+		if (method.declaringClass.isRawType() && substituteMethod.declaringClass.isRawType())
+			if (method.hasSubstitutedParameters() && substituteMethod.hasSubstitutedParameters())
+				return areMethodsCompatible(method, substituteMethod, environment);
+
+		return false;
+	}
+
+	if (substituteMethod instanceof ParameterizedGenericMethodBinding) {
+		if (method.typeVariables != Binding.NO_TYPE_VARIABLES)
+			return !((ParameterizedGenericMethodBinding) substituteMethod).isRaw;
+		// since substituteMethod has substituted type variables, method cannot have a generic signature AND no variables -> its a name clash if it does
+		return !hasGenericParameter(method);
+	}
+
+	// if method has its own variables, then substituteMethod failed bounds check in computeSubstituteMethod()
+	return method.typeVariables == Binding.NO_TYPE_VARIABLES;
+}
+static boolean hasGenericParameter(MethodBinding method) {
+	if (method.genericSignature() == null) return false;
+
+	// may be only the return type that is generic, need to check parameters
+	TypeBinding[] params = method.parameters;
+	for (int i = 0, l = params.length; i < l; i++) {
+		TypeBinding param = params[i].leafComponentType();
+		if (param instanceof ReferenceBinding) {
+			int modifiers = ((ReferenceBinding) param).modifiers;
+			if ((modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
+				return true;
+		}
+	}
+	return false;
+}
+
 boolean isSameClassOrSubclassOf(ReferenceBinding testClass, ReferenceBinding superclass) {
 	do {
-		if (testClass == superclass) return true;
+		if (TypeBinding.equalsEquals(testClass, superclass)) return true;
 	} while ((testClass = testClass.superclass()) != null);
 	return false;
 }
@@ -988,7 +1192,7 @@
 	if (!mustImplementAbstractMethods()) return false;
 	ReferenceBinding superclass = this.type.superclass();
 	if (declaringClass.isClass()) {
-		while (superclass.isAbstract() && superclass != declaringClass)
+		while (superclass.isAbstract() && TypeBinding.notEquals(superclass, declaringClass))
 			superclass = superclass.superclass(); // find the first concrete superclass or the abstract declaringClass
 	} else {
 		if (this.type.implementsInterface(declaringClass, false))
@@ -1010,7 +1214,7 @@
 
 ProblemReporter problemReporter(MethodBinding currentMethod) {
 	ProblemReporter reporter = problemReporter();
-	if (currentMethod.declaringClass == this.type && currentMethod.sourceMethod() != null)	// only report against the currentMethod if its implemented by the type
+	if (TypeBinding.equalsEquals(currentMethod.declaringClass, this.type) && currentMethod.sourceMethod() != null)	// only report against the currentMethod if its implemented by the type
 		reporter.referenceContext = currentMethod.sourceMethod();
 	return reporter;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
index 2993e65..f0ba436 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -14,15 +18,23 @@
  *								bug 365519 - editorial cleanup after bug 186342 and bug 365387
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 388795 - [compiler] detection of name clash depends on order of super interfaces
+ *								bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract
+ *								bug 390883 - [1.8][compiler] Unable to override default method
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								bug 401246 - [1.8][compiler] abstract class method should now trump conflicting default methods
+ *								bug 401796 - [1.8][compiler] don't treat default methods as overriding an independent inherited abstract method
+ *								bug 403867 - [1.8][compiler] Suspect error about duplicate default methods
+ *								bug 391376 - [1.8] check interaction of default methods with bridge methods and generics
  *								bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795
  *								bug 409473 - [compiler] JDT cannot compile against JRE 1.8
- *								Bug 410325 - [1.7][compiler] Generified method override different between javac and eclipse compiler
+ *								Bug 420080 - [1.8] Overridden Default method is reported as duplicated
  *								Bug 418235 - [compiler][null] Unreported nullness error when using generic
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 
+import java.util.Arrays;
+
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Argument;
@@ -34,6 +46,7 @@
 import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
 import org.eclipse.jdt.internal.compiler.util.HashtableOfObject;
 import org.eclipse.jdt.internal.compiler.util.SimpleSet;
+import org.eclipse.jdt.internal.compiler.util.Sorting;
 import org.eclipse.objectteams.otdt.core.compiler.IOTConstants;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.MethodModel;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel;
@@ -49,25 +62,7 @@
 MethodVerifier15(LookupEnvironment environment) {
 	super(environment);
 }
-boolean areReturnTypesCompatible(MethodBinding one, MethodBinding two) {
-//{ObjectTeams: consider enhanced callin signatures:
-	/* orig:
-	if (one.returnType == two.returnType) return true;
-	   :giro */
-	if (MethodModel.getReturnType(one) == MethodModel.getReturnType(two)) return true;
-// SH}
-//{ObjectTeams: different comparison for role types:
-	if (areEqualRoleTypes(one.returnType, two.returnType, two.declaringClass, this.environment))
-		return true;
-// SH}
-	if (this.type.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
-		return areReturnTypesCompatible0(one, two);
-	} else {
-//{ObjectTeams: added 3. parameter:
-		return areTypesEqual(one.returnType.erasure(), two.returnType.erasure(), two);
-// SH}
-	}
-}
+
 // Given `overridingMethod' which overrides `inheritedMethod' answer whether some subclass method that
 // differs in erasure from overridingMethod could override `inheritedMethod'
 protected boolean canOverridingMethodDifferInErasure(MethodBinding overridingMethod, MethodBinding inheritedMethod) {
@@ -85,7 +80,7 @@
 }
 boolean canSkipInheritedMethods(MethodBinding one, MethodBinding two) {
 	return two == null // already know one is not null
-		|| (one.declaringClass == two.declaringClass && !one.declaringClass.isParameterizedType());
+		|| (TypeBinding.equalsEquals(one.declaringClass, two.declaringClass) && !one.declaringClass.isParameterizedType());
 }
 void checkConcreteInheritedMethod(MethodBinding concreteMethod, MethodBinding[] abstractMethods) {
 	super.checkConcreteInheritedMethod(concreteMethod, abstractMethods);
@@ -102,7 +97,7 @@
 
 		// so the parameters are equal and the return type is compatible b/w the currentMethod & the substituted inheritedMethod
 		MethodBinding originalInherited = abstractMethod.original();
-		if (originalInherited.returnType != concreteMethod.returnType)
+		if (TypeBinding.notEquals(originalInherited.returnType, concreteMethod.returnType))
 			if (!isAcceptableReturnTypeOverride(concreteMethod, abstractMethod))
 				problemReporter().unsafeReturnTypeOverride(concreteMethod, originalInherited, this.type);
 
@@ -111,7 +106,7 @@
 		// bridge will be/would have been generated in the context of the super class since
 		// the bridge itself will be inherited. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=298362
 		if (originalInherited.declaringClass.isInterface()) {
-			if ((concreteMethod.declaringClass == this.type.superclass && this.type.superclass.isParameterizedType() && !areMethodsCompatible(concreteMethod, originalInherited))
+			if ((TypeBinding.equalsEquals(concreteMethod.declaringClass, this.type.superclass) && this.type.superclass.isParameterizedType() && !areMethodsCompatible(concreteMethod, originalInherited))
 				|| this.type.superclass.erasure().findSuperTypeOriginatingFrom(originalInherited.declaringClass) == null)
 					this.type.addSyntheticBridgeMethod(originalInherited, concreteMethod.original());
 		}
@@ -126,7 +121,7 @@
 
 	// so the parameters are equal and the return type is compatible b/w the currentMethod & the substituted inheritedMethod
 	MethodBinding originalInherited = inheritedMethod.original();
-	if (originalInherited.returnType != currentMethod.returnType)
+	if (TypeBinding.notEquals(originalInherited.returnType, currentMethod.returnType))
 		if (!isAcceptableReturnTypeOverride(currentMethod, inheritedMethod))
 			problemReporter(currentMethod).unsafeReturnTypeOverride(currentMethod, originalInherited, this.type);
 
@@ -148,7 +143,7 @@
 		MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(bridge.selector);
 		for (int i = current.length - 1; i >= 0; --i) {
 			final MethodBinding thisMethod = current[i];
-			if (thisMethod.areParameterErasuresEqual(bridge) && thisMethod.returnType.erasure() == bridge.returnType.erasure()) {
+			if (thisMethod.areParameterErasuresEqual(bridge) && TypeBinding.equalsEquals(thisMethod.returnType.erasure(), bridge.returnType.erasure())) {
 				// use inherited method for problem reporting.
 				problemReporter(thisMethod).methodNameClash(thisMethod, inheritedMethod.declaringClass.isRawType() ? inheritedMethod : inheritedMethod.original(), ProblemSeverities.Error);
 				return;	
@@ -204,7 +199,7 @@
 		if (length != inheritedParams.length) return; // no match
 
 		for (int i = 0; i < length; i++)
-			if (currentParams[i] != inheritedParams[i])
+			if (TypeBinding.notEquals(currentParams[i], inheritedParams[i]))
 				if (currentParams[i].isBaseType() != inheritedParams[i].isBaseType() || !inheritedParams[i].isCompatibleWith(currentParams[i]))
 					return; // no chance that another inherited method's bridge method can collide
 
@@ -235,7 +230,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -259,7 +254,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -286,41 +281,89 @@
 	detectInheritedNameClash(inheritedMethod.original(), otherInheritedMethod.original());
 }
 // 8.4.8.4
-void checkInheritedMethods(MethodBinding[] methods, int length, boolean[] isOverridden) {
+void checkInheritedMethods(MethodBinding[] methods, int length, boolean[] isOverridden, boolean[] isInherited) {
 	boolean continueInvestigation = true;
 	MethodBinding concreteMethod = null;
+	MethodBinding abstractSuperClassMethod = null;
+	boolean playingTrump = false; // invariant: playingTrump => (concreteMethod == null)
 	for (int i = 0; i < length; i++) {
-		// when unexpectedly seeing a non-abstract interface method regard it as abstract, too, for this check:
-		boolean isAbstract = methods[i].isAbstract() || methods[i].declaringClass.isInterface();
-		if (!isAbstract) {
-			if (concreteMethod != null) {
-				// https://bugs.eclipse.org/195802 with https://bugs.eclipse.org/410325
-				// If a replace method (from findReplacedMethod()) is the rawified version of another
-				// don't count this as duplicates:
-				//   (Not asking ParameterizedGenericMethodBinding.isRawMethod(),
-				//    because that is true only for methods of a RawTypeBinding,
-				//    but here we look for rawness regarding the method's type variables).
-				if (concreteMethod.declaringClass == methods[i].declaringClass 
-						&& concreteMethod.typeVariables.length != methods[i].typeVariables.length) 
-				{
-					if (concreteMethod.typeVariables == Binding.NO_TYPE_VARIABLES
-							&& concreteMethod.original() == methods[i])
+		if (!methods[i].declaringClass.isInterface()
+				&& TypeBinding.notEquals(methods[i].declaringClass, this.type)
+				&& methods[i].isAbstract())
+		{
+			abstractSuperClassMethod = methods[i];
+			break;
+		}
+	}
+	for (int i = 0; i < length; i++) {
+		// methods not inherited as of 8.4.8 cannot create a name clash,
+		// but could still cause errors against return types etc. (below)
+		if (isInherited[i] && !methods[i].isAbstract()) {
+			// 8.4.8.4 defines an exception for default methods if
+			// (a) there exists an abstract method declared in a superclass of C and inherited by C
+			// (b) that is override-equivalent with the two methods.
+			if (methods[i].isDefaultMethod()
+					&& abstractSuperClassMethod != null												// condition (a)
+//{ObjectTeams: added argument 3:
+					&& areParametersEqual(abstractSuperClassMethod, methods[i], this.environment) 	// condition (b)...
+// SH}
+					&& concreteMethod == null) {
+				// skip, class method trumps this default method (concreteMethod remains null)
+				playingTrump = true;
+			} else {
+				playingTrump = false;
+				if (concreteMethod != null) {
+					// re-checking compatibility is needed for https://bugs.eclipse.org/346029
+					if (isOverridden[i] && areMethodsCompatible(concreteMethod, methods[i])) {
 						continue;
-					if (methods[i].typeVariables == Binding.NO_TYPE_VARIABLES
-							&& methods[i].original() == concreteMethod)
-						continue;
+					} else {
+						problemReporter().duplicateInheritedMethods(this.type, concreteMethod, methods[i]);
+						continueInvestigation = false;
+					}
 				}
-
-				problemReporter().duplicateInheritedMethods(this.type, concreteMethod, methods[i]);
-				continueInvestigation = false;
+				concreteMethod = methods[i];
 			}
-			concreteMethod = methods[i];
 		}
 	}
 	if (continueInvestigation) {
-		super.checkInheritedMethods(methods, length, isOverridden);
+		if (playingTrump) {
+			// multiple abstract & default methods are OK on this branch, but then the class must be declared abstract:
+			if (!this.type.isAbstract()) {
+				problemReporter().abstractMethodMustBeImplemented(this.type, abstractSuperClassMethod);
+				return;
+			}
+		} else {
+			if (concreteMethod != null && concreteMethod.isDefaultMethod()) {
+				if (this.environment.globalOptions.complianceLevel >= ClassFileConstants.JDK1_8) {
+					if (!checkInheritedDefaultMethods(methods, length))
+						return;
+				}
+			}
+		}
+		super.checkInheritedMethods(methods, length, isOverridden, isInherited);
 	}
 }
+boolean checkInheritedDefaultMethods(MethodBinding[] methods, int length) {
+	// JLS8  9.4.1 (interface) and  8.4.8.4 (class):
+	// default method clashes with other inherited method which is override-equivalent 
+	if (length < 2) return true;
+	boolean ok = true;
+	findDefaultMethod: for (int i=0; i<length; i++) {
+		if (methods[i].isDefaultMethod()) {
+			findEquivalent: for (int j=0; j<length; j++) {
+				if (j == i) continue findEquivalent;
+				if (isMethodSubsignature(methods[i], methods[j])) {
+					if (!doesMethodOverride(methods[i], methods[j]) && !doesMethodOverride(methods[j], methods[i])) { 
+						problemReporter().inheritedDefaultMethodConflictsWithOtherInherited(this.type, methods[i], methods[j]);
+						ok = false;
+					}
+					continue findDefaultMethod;
+				}
+			}
+		}
+	}
+	return ok;
+}
 boolean checkInheritedReturnTypes(MethodBinding method, MethodBinding otherMethod) {
 	if (areReturnTypesCompatible(method, otherMethod)) return true;
 
@@ -367,7 +410,7 @@
 		return;
 	}
 	// in this context currentMethod can be inherited, too. Recurse if needed.
-	if (currentMethod.declaringClass != this.type 
+	if (TypeBinding.notEquals(currentMethod.declaringClass, this.type) 
 			&& (currentMethod.tagBits & TagBits.IsNullnessKnown) == 0) 
 	{
 		this.buddyImplicitNullAnnotationsVerifier.checkImplicitNullAnnotations(currentMethod, srcMethod, complain, scope);
@@ -469,9 +512,10 @@
 	char[][] methodSelectors = this.inheritedMethods.keyTable;
 	nextSelector : for (int s = methodSelectors.length; --s >= 0;) {
 		if (methodSelectors[s] == null) continue nextSelector;
-
-		MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(methodSelectors[s]);
+        MethodBinding[] current = (MethodBinding[]) this.currentMethods.get(methodSelectors[s]);
 		MethodBinding[] inherited = (MethodBinding[]) this.inheritedMethods.valueTable[s];
+		// ensure that if we have a concrete method this shows up at position [0]:
+		inherited = Sorting.concreteFirst(inherited, inherited.length);
 		
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=296660, if current type is exposed,
 		// inherited methods of super classes are too. current != null case handled below.
@@ -510,6 +554,8 @@
 		// - methods that are overridden by a current method
 		boolean[] skip = new boolean[inheritedLength];
 		boolean[] isOverridden = new boolean[inheritedLength];
+		boolean[] isInherited = new boolean[inheritedLength];
+		Arrays.fill(isInherited, true);
 		if (current != null) {
 			for (int i = 0, length1 = current.length; i < length1; i++) {
 				MethodBinding currentMethod = current[i];
@@ -574,6 +620,7 @@
 		// (and perform some side effects : bridge methods & use flags)
 		for (int i = 0; i < inheritedLength; i++) {
 			MethodBinding matchMethod = foundMatch[i];
+			
 			if (matchMethod == null && current != null && this.type.isPublic()) { // current == null case handled already.
 				MethodBinding inheritedMethod = inherited[i];
 				if (inheritedMethod.isPublic() && !inheritedMethod.declaringClass.isPublic()) {
@@ -595,11 +642,11 @@
 				// Skip the otherInheritedMethod if it is completely replaced by inheritedMethod
 				// This elimination used to happen rather eagerly in computeInheritedMethods step
 				// itself earlier. (https://bugs.eclipse.org/bugs/show_bug.cgi?id=302358)
-				if (inheritedMethod.declaringClass != otherInheritedMethod.declaringClass) {
+				if (TypeBinding.notEquals(inheritedMethod.declaringClass, otherInheritedMethod.declaringClass)) {
 					// these method calls produce their effect as side-effects into skip and isOverridden:
-					if (isSkippableOrOverridden(inheritedMethod, otherInheritedMethod, skip, isOverridden, j))
+					if (isSkippableOrOverridden(inheritedMethod, otherInheritedMethod, skip, isOverridden, isInherited, j))
 						continue;
-					if (isSkippableOrOverridden(otherInheritedMethod, inheritedMethod, skip, isOverridden, i))
+					if (isSkippableOrOverridden(otherInheritedMethod, inheritedMethod, skip, isOverridden, isInherited, i))
 						continue;
 				}
 			}
@@ -635,7 +682,7 @@
 			if (index == -1) continue;
 
 			if (index > 0)
-				checkInheritedMethods(matchingInherited, index + 1, isOverridden); // pass in the length of matching
+				checkInheritedMethods(matchingInherited, index + 1, isOverridden, isInherited); // pass in the length of matching
 			else if (mustImplementAbstractMethods && matchingInherited[0].isAbstract() && matchMethod == null)
 				checkAbstractMethod(matchingInherited[0]);
 			while (index >= 0) matchingInherited[index--] = null; // clear the previous contents of the matching methods
@@ -648,22 +695,24 @@
  * mark as isOverridden
  * - any skippable method as defined above iff it is actually overridden by the specific method (disregarding visibility etc.)
  * Note, that 'idx' corresponds to the position of 'general' in the arrays 'skip' and 'isOverridden'
- * TODO(stephan) currently (as of Bug 410325), the boarder between skip and isOverridden is blurred,
- *                should reassess after more experience with this patch.
  */
-boolean isSkippableOrOverridden(MethodBinding specific, MethodBinding general, boolean[] skip, boolean[] isOverridden, int idx) {
+boolean isSkippableOrOverridden(MethodBinding specific, MethodBinding general, boolean[] skip, boolean[] isOverridden, boolean[] isInherited, int idx) {
 	boolean specificIsInterface = specific.declaringClass.isInterface();
 	boolean generalIsInterface = general.declaringClass.isInterface();
 	if (!specificIsInterface && generalIsInterface) {
-		if (isInterfaceMethodImplemented(general, specific, general.declaringClass)) {
+		if (!specific.isAbstract() && isParameterSubsignature(specific, general)) {
+			// 8.4.8: abstract and default methods are not inherited if a concrete method with a subsignature is defined or inherited in C
+			isInherited[idx] = false;
+			return true;
+		} else if (isInterfaceMethodImplemented(general, specific, general.declaringClass)) {
 			skip[idx] = true;
 			isOverridden[idx] = true;
 			return true;
 		}
-	} else if (specificIsInterface == generalIsInterface) {
-		if (specific.declaringClass.isCompatibleWith(general.declaringClass) && isMethodSubsignature(specific, general)) {
+	} else if (specificIsInterface == generalIsInterface) { 
+		if (isParameterSubsignature(specific, general)) {
 			skip[idx] = true;
-			isOverridden[idx] = true;
+			isOverridden[idx] |= specific.declaringClass.isCompatibleWith(general.declaringClass);
 			return true;
 		}
 	}
@@ -788,11 +837,11 @@
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=323693
 	// When reporting a name clash between two inherited methods, we should not look for a
 	// signature clash, but instead should be looking for method descriptor clash. 
-	if (inherited.returnType.erasure() != otherInherited.returnType.erasure())
+	if (TypeBinding.notEquals(inherited.returnType.erasure(), otherInherited.returnType.erasure()))
 		return false;
 	// skip it if otherInherited is defined by a subtype of inherited's declaringClass or vice versa.
 	// avoid being order sensitive and check with the roles reversed also.
-	if (inherited.declaringClass.erasure() != otherInherited.declaringClass.erasure()) {
+	if (TypeBinding.notEquals(inherited.declaringClass.erasure(), otherInherited.declaringClass.erasure())) {
 		if (inherited.declaringClass.findSuperTypeOriginatingFrom(otherInherited.declaringClass) != null)
 			return false;
 		if (otherInherited.declaringClass.findSuperTypeOriginatingFrom(inherited.declaringClass) != null)
@@ -811,7 +860,7 @@
 	if (this.environment.globalOptions.complianceLevel == ClassFileConstants.JDK1_6) {
 		// for 1.6 return types also need to be checked
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317719
-		if (current.returnType.erasure() != original.returnType.erasure())
+		if (TypeBinding.notEquals(current.returnType.erasure(), original.returnType.erasure()))
 			severity = ProblemSeverities.Warning;
 	}
 	if (!treatAsSynthetic) {
@@ -869,7 +918,7 @@
 				nextInterface : for (int a = 0; a < itsLength; a++) {
 					ReferenceBinding next = itsInterfaces[a];
 					for (int b = 0; b < nextPosition; b++)
-						if (next == interfacesToVisit[b]) continue nextInterface;
+						if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 					interfacesToVisit[nextPosition++] = next;
 				}
 			}
@@ -888,7 +937,7 @@
 				nextInterface : for (int a = 0; a < itsLength; a++) {
 					ReferenceBinding next = itsInterfaces[a];
 					for (int b = 0; b < nextPosition; b++)
-						if (next == interfacesToVisit[b]) continue nextInterface;
+						if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 					interfacesToVisit[nextPosition++] = next;
 				}
 			}
@@ -903,7 +952,7 @@
 			TypeBinding erasure = current.erasure();
 			for (int j = i + 1; j < nextPosition; j++) {
 				ReferenceBinding next = interfacesToVisit[j];
-				if (next.isValidBinding() && next.erasure() == erasure) {
+				if (next.isValidBinding() && TypeBinding.equalsEquals(next.erasure(), erasure)) {
 					if (copy == null)
 						copy = new SimpleSet(nextPosition);
 					copy.add(interfacesToVisit[i]);
@@ -928,7 +977,7 @@
 	TypeBinding currentReturnType = currentMethod.returnType.leafComponentType();
 	switch (currentReturnType.kind()) {
 	   	case Binding.TYPE_PARAMETER :
-	   		if (currentReturnType == inheritedMethod.returnType.leafComponentType())
+	   		if (TypeBinding.equalsEquals(currentReturnType, inheritedMethod.returnType.leafComponentType()))
 	   			return true;
 	   		//$FALL-THROUGH$
 		default :
@@ -945,7 +994,9 @@
 
 	inheritedMethod = computeSubstituteMethod(inheritedMethod, existingMethod);
 	return inheritedMethod != null
-		&& inheritedMethod.returnType == existingMethod.returnType // keep around to produce bridge methods
+		&& (TypeBinding.equalsEquals(inheritedMethod.returnType, existingMethod.returnType)	// need to keep around to produce bridge methods? ...
+			|| (TypeBinding.notEquals(this.type, existingMethod.declaringClass) 			// ... not if inheriting the bridge situation from a superclass
+					&& !existingMethod.declaringClass.isInterface()))
 		&& doesMethodOverride(existingMethod, inheritedMethod);
 }
 public boolean isMethodSubsignature(MethodBinding method, MethodBinding inheritedMethod) {
@@ -963,12 +1014,12 @@
 	// called when currentMethod's return type is NOT compatible with inheritedMethod's return type
 
 	// JLS 3 �8.4.5: more are accepted, with an unchecked conversion
-	if (currentMethod.returnType == inheritedMethod.returnType.erasure()) {
+	if (TypeBinding.equalsEquals(currentMethod.returnType, inheritedMethod.returnType.erasure())) {
 		TypeBinding[] currentParams = currentMethod.parameters;
 		TypeBinding[] inheritedParams = inheritedMethod.parameters;
 		for (int i = 0, l = currentParams.length; i < l; i++)
-//{ObjectTeams: added 3. arg:
-			if (!areTypesEqual(currentParams[i], inheritedParams[i], inheritedMethod))
+//{ObjectTeams: added arguments 3 & 4:
+			if (!areTypesEqual(currentParams[i], inheritedParams[i], inheritedMethod, this.environment))
 // SH}
 				return true;
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MissingTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MissingTypeBinding.java
index 3281d43..2824440 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MissingTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MissingTypeBinding.java
@@ -43,6 +43,10 @@
 	this.methods = Binding.NO_METHODS;
 }
 
+public TypeBinding clone(TypeBinding outerType) {
+	throw new IllegalStateException(); // shouldn't get here.
+}
+
 //{ObjectTeams: missing o.o.Team cannot be further initialized:
 @Override
 protected void setupOrgObjectteamsTeamModel() {
@@ -81,6 +85,10 @@
 	this.superclass = missingSuperclass;
 }
 
+public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+	return; // reject misguided attempts.
+}
+
 public String toString() {
 		return "[MISSING:" + new String(CharOperation.concatWith(this.compoundName, '.')) + "]"; //$NON-NLS-1$ //$NON-NLS-2$
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java
index abd5450..f2f9e62 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NestedTypeBinding.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -18,7 +22,7 @@
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.Dependencies;
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.ITranslationStates;
 
-public class NestedTypeBinding extends SourceTypeBinding {
+public abstract class NestedTypeBinding extends SourceTypeBinding {
 
 	public SourceTypeBinding enclosingType;
 
@@ -33,10 +37,22 @@
 	this.enclosingType = enclosingType;
 }
 
+public NestedTypeBinding(NestedTypeBinding prototype) {
+	super(prototype);
+	this.enclosingType = prototype.enclosingType;
+	this.enclosingInstances = prototype.enclosingInstances;
+	this.enclosingTypes = prototype.enclosingTypes;
+	this.outerLocalVariables = prototype.outerLocalVariables;
+	this.outerLocalVariablesSlotSize = prototype.outerLocalVariablesSlotSize;
+}
+
 /* Add a new synthetic argument for <actualOuterLocalVariable>.
 * Answer the new argument or the existing argument if one already existed.
 */
 public SyntheticArgumentBinding addSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	SyntheticArgumentBinding synthLocal = null;
 
 	if (this.outerLocalVariables == null) {
@@ -67,6 +83,7 @@
 * Answer the new argument or the existing argument if one already existed.
 */
 public SyntheticArgumentBinding addSyntheticArgument(ReferenceBinding targetEnclosingType) {
+	if (!isPrototype()) throw new IllegalStateException();
 	SyntheticArgumentBinding synthLocal = null;
 	if (this.enclosingInstances == null) {
 		synthLocal = new SyntheticArgumentBinding(targetEnclosingType);
@@ -74,7 +91,7 @@
 	} else {
 		int size = this.enclosingInstances.length;
 		int newArgIndex = size;
-		if (enclosingType() == targetEnclosingType)
+		if (TypeBinding.equalsEquals(enclosingType(), targetEnclosingType))
 			newArgIndex = 0;
 		SyntheticArgumentBinding[] newInstances = new SyntheticArgumentBinding[size + 1];
 		System.arraycopy(this.enclosingInstances, 0, newInstances, newArgIndex == 0 ? 1 : 0, size);
@@ -91,6 +108,7 @@
 * Answer the new argument or the existing argument if one already existed.
 */
 public SyntheticArgumentBinding addSyntheticArgumentAndField(LocalVariableBinding actualOuterLocalVariable) {
+	if (!isPrototype()) throw new IllegalStateException();
 	SyntheticArgumentBinding synthLocal = addSyntheticArgument(actualOuterLocalVariable);
 	if (synthLocal == null) return null;
 
@@ -103,6 +121,7 @@
 * Answer the new argument or the existing argument if one already existed.
 */
 public SyntheticArgumentBinding addSyntheticArgumentAndField(ReferenceBinding targetEnclosingType) {
+	if (!isPrototype()) throw new IllegalStateException();
 	SyntheticArgumentBinding synthLocal = addSyntheticArgument(targetEnclosingType);
 	if (synthLocal == null) return null;
 
@@ -112,6 +131,7 @@
 }
 
 protected void checkRedundantNullnessDefaultRecurse(ASTNode location, Annotation[] annotations, long annotationTagBits) {
+	if (!isPrototype()) throw new IllegalStateException();
 	ReferenceBinding currentType = this.enclosingType;
 	do {
 		if (!((SourceTypeBinding)currentType).checkRedundantNullnessDefaultOne(location, annotations, annotationTagBits)) {
@@ -132,6 +152,7 @@
  * @return the enclosingInstancesSlotSize
  */
 public int getEnclosingInstancesSlotSize() {
+	if (!isPrototype()) throw new IllegalStateException();
 	return this.enclosingInstances == null ? 0 : this.enclosingInstances.length;
 }
 
@@ -139,6 +160,7 @@
  * @return the outerLocalVariablesSlotSize
  */
 public int getOuterLocalVariablesSlotSize() {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.outerLocalVariablesSlotSize < 0) {
 		this.outerLocalVariablesSlotSize = 0;
 		int outerLocalsCount = this.outerLocalVariables == null ? 0 : this.outerLocalVariables.length;
@@ -161,6 +183,7 @@
 /* Answer the synthetic argument for <actualOuterLocalVariable> or null if one does not exist.
 */
 public SyntheticArgumentBinding getSyntheticArgument(LocalVariableBinding actualOuterLocalVariable) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.outerLocalVariables == null) return null;		// is null if no outer local variables are known
 	for (int i = this.outerLocalVariables.length; --i >= 0;)
 		if (this.outerLocalVariables[i].actualOuterLocalVariable == actualOuterLocalVariable)
@@ -171,6 +194,9 @@
 /* Answer the synthetic argument for <targetEnclosingType> or null if one does not exist.
 */
 public SyntheticArgumentBinding getSyntheticArgument(ReferenceBinding targetEnclosingType, boolean onlyExactMatch, boolean scopeIsConstructorCall) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.enclosingInstances == null) return null;		// is null if no enclosing instances are known
 	
 	// exact match
@@ -186,13 +212,13 @@
 	//   }
 	// }
 	if (scopeIsConstructorCall && this.enclosingInstances.length > 0)
-		if (this.enclosingInstances[0].type == targetEnclosingType) 
+		if (TypeBinding.equalsEquals(this.enclosingInstances[0].type, targetEnclosingType)) 
 			if (this.enclosingInstances[0].actualOuterLocalVariable == null)
 				return this.enclosingInstances[0];
 	
 	// then check other possibility
 	for (int i = this.enclosingInstances.length; --i >= 0;)
-		if (this.enclosingInstances[i].type == targetEnclosingType)
+		if (TypeBinding.equalsEquals(this.enclosingInstances[i].type, targetEnclosingType))
 			if (this.enclosingInstances[i].actualOuterLocalVariable == null)
 				return this.enclosingInstances[i];
 
@@ -209,10 +235,12 @@
 }
 
 public SyntheticArgumentBinding[] syntheticEnclosingInstances() {
+	if (!isPrototype()) throw new IllegalStateException();
 	return this.enclosingInstances;		// is null if no enclosing instances are required
 }
 
 public ReferenceBinding[] syntheticEnclosingInstanceTypes() {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.enclosingTypes == UNINITIALIZED_REFERENCE_TYPES) {
 //{ObjectTeams: enclosing instances of local types are set during analyzeCode:
 		if (this.isLocalType())
@@ -232,6 +260,7 @@
 }
 
 public SyntheticArgumentBinding[] syntheticOuterLocalVariables() {
+	if (!isPrototype()) throw new IllegalStateException();
 	return this.outerLocalVariables;		// is null if no outer locals are required
 }
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
new file mode 100644
index 0000000..bc5630b
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/NullTypeBinding.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.lookup;
+
+// Give it an identity of its own to discriminate the fact that this type is not annotatable and so is a singleton.
+public class NullTypeBinding extends BaseTypeBinding {
+
+	NullTypeBinding() {
+		super(TypeIds.T_null, TypeConstants.NULL, new char[] { 'N' }); // N stands for null even if it is never internally used);
+	}
+	
+	public TypeBinding clone(TypeBinding enclosingType) {
+		return this;  // enforce solitude.
+	}
+	
+	public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+		return; // reject misguided attempt.
+	}
+	
+	public TypeBinding unannotated() {
+		return this;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
index 0c6cd25..cab1ec0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: PackageBinding.java 23405 2010-02-03 17:02:18Z stephan $
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -79,7 +82,11 @@
 	if ((element.tagBits & TagBits.HasMissingType) == 0) clearMissingTagBit();
 	if (this.knownTypes == null)
 		this.knownTypes = new HashtableOfType(25);
-	this.knownTypes.put(element.compoundName[element.compoundName.length - 1], element);
+	char [] name = element.compoundName[element.compoundName.length - 1];
+	ReferenceBinding priorType = this.knownTypes.getput(name, element);
+	if (priorType != null && priorType.isUnresolvedType() && !element.isUnresolvedType()) {
+		((UnresolvedReferenceBinding) priorType).setResolvedType(element, this.environment);
+	}
 	if (this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled)
 		if (element.isAnnotationType() || element instanceof UnresolvedReferenceBinding) // unresolved types don't yet have the modifiers set
 			checkIfNullAnnotationType(element);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
index 4063d3e..78e2960 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedGenericMethodBinding.java
@@ -11,6 +11,7 @@
  *     Stephan Herrmann - Contributions for
  *								bug 186342 - [compiler][null] Using annotations for null checking
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
  *								bug 413958 - Function override returning inherited Generic Type
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
@@ -239,11 +240,11 @@
 						for (int j = 0, equalLength = equalSubstitutes.length; j < equalLength; j++) {
 							TypeBinding equalSubstitute = equalSubstitutes[j];
 							if (equalSubstitute == null) continue nextConstraint;
-							if (equalSubstitute == current) {
+							if (TypeBinding.equalsEquals(equalSubstitute, current)) {
 								// try to find a better different match if any in subsequent equal candidates
 								for (int k = j+1; k < equalLength; k++) {
 									equalSubstitute = equalSubstitutes[k];
-									if (equalSubstitute != current && equalSubstitute != null) {
+									if (TypeBinding.notEquals(equalSubstitute, current) && equalSubstitute != null) {
 										substitutes[i] = equalSubstitute;
 										continue nextTypeParameter;
 									}
@@ -461,8 +462,8 @@
 		for (int i = 0; i < varLength; i++) {
 			TypeVariableBinding originalVariable = originalVariables[i];
 			TypeBinding argument = this.typeArguments[i];
-			boolean argAlreadyInferred = argument != originalVariable;
-			if (originalVariable.firstBound == originalVariable.superclass) {
+			boolean argAlreadyInferred = TypeBinding.notEquals(argument, originalVariable);
+			if (TypeBinding.equalsEquals(originalVariable.firstBound, originalVariable.superclass)) {
 				TypeBinding substitutedBound = Scope.substitute(this, originalVariable.superclass);
 				argument.collectSubstitutes(scope, substitutedBound, inferenceContext, TypeConstants.CONSTRAINT_SUPER);
 				if (inferenceContext.status == InferenceContext.FAILED) return null; // impossible substitution
@@ -510,7 +511,7 @@
     	// adjust method types to reflect latest inference
 		TypeBinding oldReturnType = this.returnType;
 		this.returnType = Scope.substitute(this, this.returnType);
-		this.inferredReturnType = inferenceContext.hasExplicitExpectedType && this.returnType != oldReturnType;
+		this.inferredReturnType = inferenceContext.hasExplicitExpectedType && TypeBinding.notEquals(this.returnType, oldReturnType);
 	    this.parameters = Scope.substitute(this, this.parameters);
 	    this.thrownExceptions = Scope.substitute(this, this.thrownExceptions);
 	    // error case where exception type variable would have been substituted by a non-reference type (207573)
@@ -561,14 +562,14 @@
 		}
 		// With T mapping to I<T>, answer of I<?>, when given T, having eliminated the circularity/self reference.
 		public TypeBinding substitute(TypeVariableBinding typeVariable) {
-			if (typeVariable.rank >= this.variables.length || this.variables[typeVariable.rank] != typeVariable) {   // not kosher, don't touch.
+			if (typeVariable.rank >= this.variables.length || TypeBinding.notEquals(this.variables[typeVariable.rank], typeVariable)) {   // not kosher, don't touch.
 				return typeVariable;
 			}
 			if (this.substitutes != null) {
 				return Scope.substitute(new LingeringTypeVariableEliminator(this.variables, null, this.scope), this.substitutes[typeVariable.rank]); 
 			}
 			ReferenceBinding genericType = (ReferenceBinding) (typeVariable.declaringElement instanceof ReferenceBinding ? typeVariable.declaringElement : null);
-			return this.scope.environment().createWildcard(genericType, typeVariable.rank, null, null, Wildcard.UNBOUND);
+			return this.scope.environment().createWildcard(genericType, typeVariable.rank, null, null, Wildcard.UNBOUND, typeVariable.getTypeAnnotations());
 		}
 
 		public LookupEnvironment environment() {
@@ -600,8 +601,9 @@
         TypeVariableBinding[] variables = this.originalMethod.typeVariables;
         int length = variables.length;
         // check this variable can be substituted given parameterized type
-        if (originalVariable.rank < length && variables[originalVariable.rank] == originalVariable) {
-			return this.typeArguments[originalVariable.rank];
+        if (originalVariable.rank < length && TypeBinding.equalsEquals(variables[originalVariable.rank], originalVariable)) {
+        	TypeBinding substitute = this.typeArguments[originalVariable.rank];
+        	return originalVariable.hasTypeAnnotations() ? this.environment.createAnnotatedType(substitute, originalVariable.getTypeAnnotations()) : substitute;
         }
 	    return originalVariable;
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
index 18ffff3..598fffa 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding.java
@@ -1,17 +1,27 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
- *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
+ *     Stephan Herrmann - Contributions for
+ *								bug 186342 - [compiler][null] Using annotations for null checking
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
+import org.eclipse.jdt.internal.compiler.ast.NullAnnotationMatching;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel;
@@ -62,6 +72,7 @@
 			for (int i = 0; i < length; i++) { // copy original type variable to relocate
 				TypeVariableBinding originalVariable = originalVariables[i];
 				substitutedVariables[i] = new TypeVariableBinding(originalVariable.sourceName, this, originalVariable.rank, parameterizedDeclaringClass.environment);
+				substitutedVariables[i].tagBits |= (originalVariable.tagBits & (TagBits.AnnotationNullMASK|TagBits.HasNullTypeAnnotation));
 			}
 			this.typeVariables = substitutedVariables;
 
@@ -75,8 +86,9 @@
 				}
 				public TypeBinding substitute(TypeVariableBinding typeVariable) {
 					// check this variable can be substituted given copied variables
-					if (typeVariable.rank < length && originalVariables[typeVariable.rank] == typeVariable) {
-						return substitutedVariables[typeVariable.rank];
+					if (typeVariable.rank < length && TypeBinding.equalsEquals(originalVariables[typeVariable.rank], typeVariable)) {
+						TypeBinding substitute = substitutedVariables[typeVariable.rank];
+						return typeVariable.hasTypeAnnotations() ? environment().createAnnotatedType(substitute, typeVariable.getTypeAnnotations()) : substitute;
 					}
 					if (!isStatic)
 						return parameterizedDeclaringClass.substitute(typeVariable);
@@ -96,25 +108,27 @@
 				TypeBinding substitutedSuperclass = Scope.substitute(substitution, originalVariable.superclass);
 				ReferenceBinding[] substitutedInterfaces = Scope.substitute(substitution, originalVariable.superInterfaces);
 				if (originalVariable.firstBound != null) {
-					substitutedVariable.firstBound = originalVariable.firstBound == originalVariable.superclass
+					TypeBinding firstBound;
+					firstBound = TypeBinding.equalsEquals(originalVariable.firstBound, originalVariable.superclass)
 						? substitutedSuperclass // could be array type or interface
 						: substitutedInterfaces[0];
+					substitutedVariable.setFirstBound(firstBound);
 				}
 				switch (substitutedSuperclass.kind()) {
 					case Binding.ARRAY_TYPE :
-						substitutedVariable.superclass = parameterizedDeclaringClass.environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
-						substitutedVariable.superInterfaces = substitutedInterfaces;
+						substitutedVariable.setSuperClass(parameterizedDeclaringClass.environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null));
+						substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 						break;
 					default:
 						if (substitutedSuperclass.isInterface()) {
-							substitutedVariable.superclass = parameterizedDeclaringClass.environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
+							substitutedVariable.setSuperClass(parameterizedDeclaringClass.environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null));
 							int interfaceCount = substitutedInterfaces.length;
 							System.arraycopy(substitutedInterfaces, 0, substitutedInterfaces = new ReferenceBinding[interfaceCount+1], 1, interfaceCount);
 							substitutedInterfaces[0] = (ReferenceBinding) substitutedSuperclass;
-							substitutedVariable.superInterfaces = substitutedInterfaces;
+							substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 						} else {
-							substitutedVariable.superclass = (ReferenceBinding) substitutedSuperclass; // typeVar was extending other typeVar which got substituted with interface
-							substitutedVariable.superInterfaces = substitutedInterfaces;
+							substitutedVariable.setSuperClass((ReferenceBinding) substitutedSuperclass); // typeVar was extending other typeVar which got substituted with interface
+							substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 						}
 				}
 			}
@@ -125,6 +139,24 @@
 			this.thrownExceptions = Scope.substitute(substitution, this.thrownExceptions);
 			// error case where exception type variable would have been substituted by a non-reference type (207573)
 			if (this.thrownExceptions == null) this.thrownExceptions = Binding.NO_EXCEPTIONS;
+
+			// after substitution transfer nullness information from type annotations:
+			if (parameterizedDeclaringClass.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled) {
+				long returnNullBits = NullAnnotationMatching.validNullTagBits(this.returnType.tagBits);
+				if (returnNullBits != 0L) {
+					this.tagBits &= ~TagBits.AnnotationNullMASK;
+					this.tagBits |= returnNullBits;
+				}
+				int parametersLen = this.parameters.length;
+				for (int i=0; i<parametersLen; i++) {
+					long paramTagBits = NullAnnotationMatching.validNullTagBits(this.parameters[i].tagBits);
+					if (paramTagBits != 0) {
+						if (this.parameterNonNullness == null)
+							this.parameterNonNullness = new Boolean[parametersLen];
+						this.parameterNonNullness[i] = Boolean.valueOf(paramTagBits == TagBits.AnnotationNonNull);
+					}
+				}
+			}
 		}
 		checkMissingType: {
 			if ((this.tagBits & TagBits.HasMissingType) != 0)
@@ -184,6 +216,7 @@
 							this,
 							originalVariable.rank,
 							environment);
+				substitutedVariables[i].tagBits |= (originalVariable.tagBits & (TagBits.AnnotationNullMASK|TagBits.HasNullTypeAnnotation));
 			}
 			this.typeVariables = substitutedVariables;
 
@@ -197,8 +230,9 @@
 				}
 				public TypeBinding substitute(TypeVariableBinding typeVariable) {
 			        // check this variable can be substituted given copied variables
-			        if (typeVariable.rank < length && originalVariables[typeVariable.rank] == typeVariable) {
-						return substitutedVariables[typeVariable.rank];
+			        if (typeVariable.rank < length && TypeBinding.equalsEquals(originalVariables[typeVariable.rank], typeVariable)) {
+			        	TypeBinding substitute = substitutedVariables[typeVariable.rank];
+						return typeVariable.hasTypeAnnotations() ? environment().createAnnotatedType(substitute, typeVariable.getTypeAnnotations()) : substitute;
 			        }
 			        return typeVariable;
 				}
@@ -216,25 +250,27 @@
 				TypeBinding substitutedSuperclass = Scope.substitute(substitution, originalVariable.superclass);
 				ReferenceBinding[] substitutedInterfaces = Scope.substitute(substitution, originalVariable.superInterfaces);
 				if (originalVariable.firstBound != null) {
-					substitutedVariable.firstBound = originalVariable.firstBound == originalVariable.superclass
+					TypeBinding firstBound;
+					firstBound = TypeBinding.equalsEquals(originalVariable.firstBound, originalVariable.superclass)
 						? substitutedSuperclass // could be array type or interface
 						: substitutedInterfaces[0];
+					substitutedVariable.setFirstBound(firstBound);
 				}
 				switch (substitutedSuperclass.kind()) {
 					case Binding.ARRAY_TYPE :
-						substitutedVariable.superclass = environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
-						substitutedVariable.superInterfaces = substitutedInterfaces;
+						substitutedVariable.setSuperClass(environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null));
+						substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 						break;
 					default:
 						if (substitutedSuperclass.isInterface()) {
-							substitutedVariable.superclass = environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
+							substitutedVariable.setSuperClass(environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null));
 							int interfaceCount = substitutedInterfaces.length;
 							System.arraycopy(substitutedInterfaces, 0, substitutedInterfaces = new ReferenceBinding[interfaceCount+1], 1, interfaceCount);
 							substitutedInterfaces[0] = (ReferenceBinding) substitutedSuperclass;
-							substitutedVariable.superInterfaces = substitutedInterfaces;
+							substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 						} else {
-							substitutedVariable.superclass = (ReferenceBinding) substitutedSuperclass; // typeVar was extending other typeVar which got substituted with interface
-							substitutedVariable.superInterfaces = substitutedInterfaces;
+							substitutedVariable.setSuperClass((ReferenceBinding) substitutedSuperclass); // typeVar was extending other typeVar which got substituted with interface
+							substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 						}
 				}
 			}
@@ -309,7 +345,7 @@
 	 * Returns true if the return type got substituted.
 	 */
 	public boolean hasSubstitutedReturnType() {
-		return this.returnType != this.originalMethod.returnType;
+		return this.returnType != this.originalMethod.returnType; //$IDENTITY-COMPARISON$
 	}
 
 	/**
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
index 9121cd7..9c3c858 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: ParameterizedTypeBinding.java 23405 2010-02-03 17:02:18Z stephan $
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -12,18 +15,32 @@
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contributions for
  *								bug 349326 - [1.7] new warning for missing try-with-resources
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
  *								Bug 412076 - [compiler] @NonNullByDefault doesn't work for varargs parameter when in generic interface
+ *								Bug 403216 - [1.8][null] TypeReference#captureTypeAnnotations treats type annotations as type argument annotations
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 416175 - [1.8][compiler][null] NPE with a code snippet that used null annotations on wildcards
+ *								Bug 416174 - [1.8][compiler][null] Bogus name clash error with null annotations
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import java.util.List;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
+import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator.TypeArgumentUpdater;
 
 /**
  * OTDT changes:
@@ -54,22 +71,19 @@
 	public ParameterizedTypeBinding(ReferenceBinding type, TypeBinding[] arguments,  ReferenceBinding enclosingType, LookupEnvironment environment){
 		this.environment = environment;
 		this.enclosingType = enclosingType; // never unresolved, never lazy per construction
-//		if (enclosingType != null && enclosingType.isGenericType()) {
-//			RuntimeException e = new RuntimeException("PARAM TYPE with GENERIC ENCLOSING");
-//			e.printStackTrace();
-//			throw e;
-//		}
-//		if (!(type instanceof UnresolvedReferenceBinding) && type.typeVariables() == Binding.NO_TYPE_VARIABLES) {
-//			System.out.println();
-//		}
 		initialize(type, arguments);
 		if (type instanceof UnresolvedReferenceBinding)
 			((UnresolvedReferenceBinding) type).addWrapper(this, environment);
 		if (arguments != null) {
-			for (int i = 0, l = arguments.length; i < l; i++)
+			for (int i = 0, l = arguments.length; i < l; i++) {
 				if (arguments[i] instanceof UnresolvedReferenceBinding)
 					((UnresolvedReferenceBinding) arguments[i]).addWrapper(this, environment);
+				if (arguments[i].hasNullTypeAnnotations())
+					this.tagBits |= TagBits.HasNullTypeAnnotation;
+			}
 		}
+		if (enclosingType != null && enclosingType.hasNullTypeAnnotations())
+			this.tagBits |= TagBits.HasNullTypeAnnotation;
 		this.tagBits |=  TagBits.HasUnresolvedTypeVariables; // cleared in resolve()
 	}
 
@@ -89,7 +103,7 @@
 		ReferenceBinding realClass = super.getRealClass();
 		if (realClass == this)
 			return this; // no further wrapping if this _is_ the class part
-		return this.environment.createParameterizedType(realClass, this.arguments, realClass.enclosingType()); 
+		return this.environment.createParameterizedType(realClass, this.arguments, this.enclosingType()); 
 	}
 // FIXME(SH): this method causes regressions (still looks consistent, though):
 //	@Override
@@ -156,7 +170,7 @@
 				capturedArguments[i] = argument;
 			}
 		}
-		ParameterizedTypeBinding capturedParameterizedType = this.environment.createParameterizedType(this.type, capturedArguments, enclosingType());
+		ParameterizedTypeBinding capturedParameterizedType = this.environment.createParameterizedType(this.type, capturedArguments, enclosingType(), this.typeAnnotations);
 		for (int i = 0; i < length; i++) {
 			TypeBinding argument = capturedArguments[i];
 			if (argument.isCapture()) {
@@ -200,7 +214,7 @@
 			}
 			return;
 		}
-		if (actualType == TypeBinding.NULL) return;
+		if (actualType == TypeBinding.NULL || actualType.kind() == POLY_TYPE) return;
 
 		if (!(actualType instanceof ReferenceBinding)) return;
 		TypeBinding formalEquivalent, actualEquivalent;
@@ -331,7 +345,7 @@
 		    sig.append('>');
 		}
 		sig.append(';');
-		if (captureSourceType != null && captureSourceType != this.type) {
+		if (captureSourceType != null && TypeBinding.notEquals(captureSourceType, this.type)) {
 			// contains a capture binding
 			sig.insert(0, "&"); //$NON-NLS-1$
 			sig.insert(0, captureSourceType.computeUniqueKey(false/*not a leaf*/));
@@ -349,22 +363,27 @@
 	public char[] constantPoolName() {
 		return this.type.constantPoolName(); // erasure
 	}
+	
+	public TypeBinding clone(TypeBinding outerType) {
+		return new ParameterizedTypeBinding(this.type, this.arguments, (ReferenceBinding) outerType, this.environment);
+	}
 
 	public ParameterizedMethodBinding createParameterizedMethod(MethodBinding originalMethod) {
 		return new ParameterizedMethodBinding(this, originalMethod);
 	}
-
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#debugName()
 	 */
 	public String debugName() {
-	    StringBuffer nameBuffer = new StringBuffer(10);
+	    if (this.hasTypeAnnotations())
+	    	return annotatedDebugName();
+		StringBuffer nameBuffer = new StringBuffer(10);	
 	    if (this.type instanceof UnresolvedReferenceBinding) {
 	    	nameBuffer.append(this.type);
 	    } else {
 			nameBuffer.append(this.type.sourceName());
 	    }
-		if (this.arguments != null) {
+		if (this.arguments != null && this.arguments.length > 0) {
 			nameBuffer.append('<');
 		    for (int i = 0, length = this.arguments.length; i < length; i++) {
 		        if (i > 0) nameBuffer.append(',');
@@ -374,6 +393,19 @@
 		}
 	    return nameBuffer.toString();
 	}
+	
+	public String annotatedDebugName() {
+		StringBuffer nameBuffer = new StringBuffer(super.annotatedDebugName());
+		if (this.arguments != null && this.arguments.length > 0) {
+			nameBuffer.append('<');
+			for (int i = 0, length = this.arguments.length; i < length; i++) {
+				if (i > 0) nameBuffer.append(',');
+				nameBuffer.append(this.arguments[i].annotatedDebugName());
+			}
+			nameBuffer.append('>');
+		}
+		return nameBuffer.toString();
+	}
 
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#enclosingType()
@@ -507,7 +539,7 @@
 					if (method.parameters.length == argCount) {
 						TypeBinding[] toMatch = method.parameters;
 						for (int iarg = 0; iarg < argCount; iarg++)
-							if (toMatch[iarg] != argumentTypes[iarg])
+							if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
 								continue nextMethod;
 						if (match != null) return null; // collision case
 						match = method;
@@ -521,7 +553,7 @@
 				TypeBinding[] toMatch = method.parameters;
 				if (toMatch.length == argCount) {
 					for (int p = 0; p < argCount; p++)
-						if (toMatch[p] != argumentTypes[p])
+						if (TypeBinding.notEquals(toMatch[p], argumentTypes[p]))
 							continue nextMethod;
 						if (match != null) return null; // collision case
 						match = method;
@@ -549,7 +581,7 @@
 					if (method.parameters.length == argCount) {
 						TypeBinding[] toMatch = method.parameters;
 						for (int iarg = 0; iarg < argCount; iarg++)
-							if (toMatch[iarg] != argumentTypes[iarg])
+							if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
 								continue nextMethod;
 						if (match != null) return null; // collision case
 						match = method;
@@ -564,7 +596,7 @@
 				TypeBinding[] toMatch = method.parameters;
 				if (toMatch.length == argCount) {
 					for (int p = 0; p < argCount; p++)
-						if (toMatch[p] != argumentTypes[p])
+						if (TypeBinding.notEquals(toMatch[p], argumentTypes[p]))
 							continue nextMethod;
 						if (match != null) return null; // collision case
 						match = method;
@@ -793,7 +825,7 @@
 // SH}
 
 	public boolean isEquivalentTo(TypeBinding otherType) {
-		if (this == otherType)
+		if (equalsEquals(this, otherType))
 		    return true;
 	    if (otherType == null)
 	        return false;
@@ -805,7 +837,7 @@
 
 	    	case Binding.PARAMETERIZED_TYPE :
 	            ParameterizedTypeBinding otherParamType = (ParameterizedTypeBinding) otherType;
-	            if (this.type != otherParamType.type)
+	            if (TypeBinding.notEquals(this.type, otherParamType.type)) 
 	                return false;
 	            if (!isStatic()) { // static member types do not compare their enclosing
 	            	ReferenceBinding enclosing = enclosingType();
@@ -813,7 +845,7 @@
 	            		ReferenceBinding otherEnclosing = otherParamType.enclosingType();
 	            		if (otherEnclosing == null) return false;
 	            		if ((otherEnclosing.tagBits & TagBits.HasDirectWildcard) == 0) {
-							if (enclosing != otherEnclosing) return false;
+							if (TypeBinding.notEquals(enclosing, otherEnclosing)) return false;
 	            		} else {
 	            			if (!enclosing.isEquivalentTo(otherParamType.enclosingType())) return false;
 	            		}
@@ -832,7 +864,7 @@
 	            return true;
 
 	    	case Binding.RAW_TYPE :
-	            return erasure() == otherType.erasure();
+	            return TypeBinding.equalsEquals(erasure(), otherType.erasure());
 	    }
 	    /* With the hybrid 1.4/1.5+ projects modes, while establishing type equivalence, we need to
 	       be prepared for a type such as Map appearing in one of three forms: As (a) a ParameterizedTypeBinding 
@@ -841,7 +873,7 @@
 	       on whether the underlying type was "seen to be" a generic type in the particular build environment or
 	       not. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=328827 
 	     */
-	    if (erasure() == otherType) {
+	    if (TypeBinding.equalsEquals(erasure(), otherType)) {
 	    	return true;
 	    }
 	    return false;
@@ -858,6 +890,10 @@
 		return isRawType();
 	}
 
+	public TypeBinding unannotated() {
+		return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+	}
+
 	public int kind() {
 		return PARAMETERIZED_TYPE;
 	}
@@ -974,9 +1010,9 @@
 		} else {
 			nameBuffer.append(CharOperation.concatWith(this.type.compoundName, '.'));
 		}
-//{ObjectTeams:
+//{ObjectTeams
 /* orig:
-		if (this.arguments != null) {
+		if (this.arguments != null && this.arguments.length > 0) { // empty arguments array happens when PTB has been created just to capture type annotations
 			nameBuffer.append('<');
 		    for (int i = 0, length = this.arguments.length; i < length; i++) {
 		        if (i > 0) nameBuffer.append(',');
@@ -1001,18 +1037,18 @@
 		boolean haveValueParameters = appendReadableValueParameterNames(buf2);
 		if (haveValueParameters)
 			nameBuffer = new StringBuffer().append(this.type.sourceName()); // reset to single name
-		TypeBinding[] arguments = this.arguments;
+		TypeBinding[] args = this.arguments;
 		// avoid printing incomplete parameters: if there are value parameters also print declared type params:
-		if (haveValueParameters && arguments == null && this.type.isGenericType())
-			arguments = this.type.typeVariables();
+		if (haveValueParameters && args == null && this.type.isGenericType())
+			args = this.type.typeVariables();
 
-		if (arguments != null) {
-		    for (int i = 0, length = arguments.length; i < length; i++) {
+		if (args != null && args.length > 0) { // empty arguments array happens when PTB has been created just to capture type annotations
+		    for (int i = 0, length = args.length; i < length; i++) {
 		        if (haveValueParameters || i > 0) buf2.append(',');
 		        if (makeShort)
-		        	buf2.append(arguments[i].shortReadableName());
+		        	buf2.append(args[i].shortReadableName());
 		        else
-		        	buf2.append(arguments[i].readableName());
+		        	buf2.append(args[i].readableName());
 			}
 		}
 		buf2.append('>');
@@ -1087,7 +1123,7 @@
 		}
 //{ObjectTeams:
 /* orig:
-		if (this.arguments != null) {
+		if (this.arguments != null && this.arguments.length > 0) { // empty arguments array happens when PTB has been created just to capture type annotations
 			nameBuffer.append('<');
 		    for (int i = 0, length = this.arguments.length; i < length; i++) {
 		        if (i > 0) nameBuffer.append(',');
@@ -1105,6 +1141,82 @@
 	}
 
 	/**
+	 * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#nullAnnotatedReadableName(CompilerOptions,boolean)
+	 */
+	public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) {
+		if (shortNames)
+			return nullAnnotatedShortReadableName(options);
+		return nullAnnotatedReadableName(options);
+	}
+
+	char[] nullAnnotatedReadableName(CompilerOptions options) {
+	    StringBuffer nameBuffer = new StringBuffer(10);
+		if (isMemberType()) {
+			nameBuffer.append(enclosingType().nullAnnotatedReadableName(options, false));
+			nameBuffer.append('.');
+			appendNullAnnotation(nameBuffer, options);
+			nameBuffer.append(this.sourceName);
+		} else if (this.type.compoundName != null) {
+			int i;
+			int l=this.type.compoundName.length;
+			for (i=0; i<l-1; i++) {
+				nameBuffer.append(this.type.compoundName[i]);
+				nameBuffer.append('.');
+			}
+		    appendNullAnnotation(nameBuffer, options);
+			nameBuffer.append(this.type.compoundName[i]);
+		} else {
+			// case of TypeVariableBinding with nullAnnotationTagBits:
+			appendNullAnnotation(nameBuffer, options);
+			if (this.type.sourceName != null)
+				nameBuffer.append(this.type.sourceName);
+			else // WildcardBinding, CaptureBinding have no sourceName
+				nameBuffer.append(this.type.readableName());
+		}
+		if (this.arguments != null && this.arguments.length > 0) { // empty arguments array happens when PTB has been created just to capture type annotations
+			nameBuffer.append('<');
+		    for (int i = 0, length = this.arguments.length; i < length; i++) {
+		        if (i > 0) nameBuffer.append(',');
+		        nameBuffer.append(this.arguments[i].nullAnnotatedReadableName(options, false));
+		    }
+		    nameBuffer.append('>');
+		}
+		int nameLength = nameBuffer.length();
+		char[] readableName = new char[nameLength];
+		nameBuffer.getChars(0, nameLength, readableName, 0);
+	    return readableName;
+	}
+
+	char[] nullAnnotatedShortReadableName(CompilerOptions options) {
+	    StringBuffer nameBuffer = new StringBuffer(10);
+		if (isMemberType()) {
+			nameBuffer.append(enclosingType().nullAnnotatedReadableName(options, true));
+			nameBuffer.append('.');
+			appendNullAnnotation(nameBuffer, options);
+			nameBuffer.append(this.sourceName);
+		} else {
+			appendNullAnnotation(nameBuffer, options);
+			if (this.type.sourceName != null)
+				nameBuffer.append(this.type.sourceName);
+			else // WildcardBinding, CaptureBinding have no sourceName
+				nameBuffer.append(this.type.shortReadableName());
+		}
+		if (this.arguments != null && this.arguments.length > 0) { // empty arguments array happens when PTB has been created just to capture type annotations
+			nameBuffer.append('<');
+		    for (int i = 0, length = this.arguments.length; i < length; i++) {
+		        if (i > 0) nameBuffer.append(',');
+		        nameBuffer.append(this.arguments[i].nullAnnotatedReadableName(options, true));
+		    }
+		    nameBuffer.append('>');
+		}
+		int nameLength = nameBuffer.length();
+		char[] shortReadableName = new char[nameLength];
+		nameBuffer.getChars(0, nameLength, shortReadableName, 0);
+	    return shortReadableName;
+	}
+
+
+	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#signature()
 	 */
 	public char[] signature() {
@@ -1131,15 +1243,16 @@
 			TypeVariableBinding[] typeVariables = currentType.type.typeVariables();
 			int length = typeVariables.length;
 			// check this variable can be substituted given parameterized type
-			if (originalVariable.rank < length && typeVariables[originalVariable.rank] == originalVariable) {
+			if (originalVariable.rank < length && TypeBinding.equalsEquals(typeVariables[originalVariable.rank], originalVariable)) {
 			    // lazy init, since cannot do so during binding creation if during supertype connection
 			    if (currentType.arguments == null)
 					currentType.initializeArguments(); // only for raw types
 			    if (currentType.arguments != null) {
 			    	 if (currentType.arguments.length == 0) { // diamond type
 					    	return originalVariable;
-					    }
-			    	 return currentType.arguments[originalVariable.rank];
+					 }
+			    	 TypeBinding substitute = currentType.arguments[originalVariable.rank];
+			    	 return originalVariable.hasTypeAnnotations() ? this.environment.createAnnotatedType(substitute, originalVariable.getTypeAnnotations()) : substitute;
 			    }	
 			}
 			// recurse on enclosing type, as it may hold more substitutions to perform
@@ -1185,7 +1298,7 @@
 
 	public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
 		boolean update = false;
-		if (this.type == unresolvedType) {
+		if (this.type == unresolvedType) { //$IDENTITY-COMPARISON$
 			this.type = resolvedType; // cannot be raw since being parameterized below
 			update = true;
 			ReferenceBinding enclosing = resolvedType.enclosingType();
@@ -1195,7 +1308,7 @@
 		}
 		if (this.arguments != null) {
 			for (int i = 0, l = this.arguments.length; i < l; i++) {
-				if (this.arguments[i] == unresolvedType) {
+				if (this.arguments[i] == unresolvedType) { //$IDENTITY-COMPARISON$
 					this.arguments[i] = env.convertUnresolvedBinaryToRawType(resolvedType);
 					update = true;
 				}
@@ -1223,8 +1336,11 @@
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
-	    StringBuffer buffer = new StringBuffer(30);
-	    if (this.type instanceof UnresolvedReferenceBinding) {
+		if (this.hasTypeAnnotations()) {
+			return annotatedDebugName();
+		}
+		StringBuffer buffer = new StringBuffer(30);
+		if (this.type instanceof UnresolvedReferenceBinding) {
 	    	buffer.append(debugName());
 	    } else {
 			if (isDeprecated()) buffer.append("deprecated "); //$NON-NLS-1$
@@ -1306,7 +1422,121 @@
 		return Binding.NO_TYPE_VARIABLES;
 	}
 	
+	public TypeBinding[] typeArguments() {
+		return this.arguments;
+	}
+	
 	public FieldBinding[] unResolvedFields() {
 		return this.fields;
 	}
+	public MethodBinding getSingleAbstractMethod(final Scope scope) {
+		if (this.singleAbstractMethod != null) {
+			return this.singleAbstractMethod;
+		}
+		final ReferenceBinding genericType = genericType();
+		MethodBinding theAbstractMethod = genericType.getSingleAbstractMethod(scope);
+		if (theAbstractMethod == null || !theAbstractMethod.isValidBinding())
+			return this.singleAbstractMethod = theAbstractMethod;
+		
+		TypeBinding [] typeArguments = this.arguments; // A1 ... An 
+		TypeVariableBinding [] typeParameters = genericType.typeVariables(); // P1 ... Pn
+		TypeBinding [] types = new TypeBinding[typeArguments.length];  // T1 ... Tn
+		for (int i = 0, length = typeArguments.length; i < length; i++) {
+			TypeBinding typeArgument = typeArguments[i];
+			switch (typeArgument.kind()) {
+				case Binding.WILDCARD_TYPE :
+					WildcardBinding wildcard = (WildcardBinding) typeArgument;
+					switch(wildcard.boundKind) {
+	    				case Wildcard.EXTENDS :
+	    				case Wildcard.SUPER :
+	    					types[i] = wildcard.bound;
+	    					break;
+	    				case Wildcard.UNBOUND :
+	    					// if Pi has upper bound Bi that mentions none of P1...Pn, then Ti = Bi; otherwise, Ti = Object
+	    					final TypeBinding upperBound = typeParameters[i].firstBound;
+							if (upperBound == null || typeParametersMentioned(upperBound)) {
+	    						types[i] = scope.getJavaLangObject();
+	    					} else {
+	    						types[i] = upperBound;
+	    					}
+	    					break;
+					}
+					break;
+				default :
+					types[i] = typeArgument;
+					break;
+			}
+			if (typeParameters[i].boundCheck(null, types[i], scope) != TypeConstants.OK)
+				return this.singleAbstractMethod = new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType);
+		}
+		ReferenceBinding declaringType = scope.environment().createParameterizedType(genericType, types, genericType.enclosingType());
+		declaringType = (ReferenceBinding) declaringType.findSuperTypeOriginatingFrom(theAbstractMethod.declaringClass);
+		MethodBinding [] choices = declaringType.getMethods(theAbstractMethod.selector);
+		for (int i = 0, length = choices.length; i < length; i++) {
+			MethodBinding method = choices[i];
+			if (!method.isAbstract() || method.redeclaresPublicObjectMethod(scope)) continue; // (re)skip statics, defaults, public object methods ...
+			this.singleAbstractMethod = method;
+			break;
+		}
+		return this.singleAbstractMethod;
+	}
+
+	private boolean typeParametersMentioned(TypeBinding upperBound) {
+		class MentionListener extends TypeBindingVisitor {
+			private boolean typeParametersMentioned = false;
+			public boolean visit(TypeVariableBinding typeVariable) {
+				this.typeParametersMentioned = true;
+				return false;
+			}
+			public boolean typeParametersMentioned() {
+				return this.typeParametersMentioned;
+			}
+		}
+		MentionListener mentionListener = new MentionListener();
+		TypeBindingVisitor.visit(mentionListener, upperBound);
+		return mentionListener.typeParametersMentioned();
+	}
+
+//{ObjectTeams: recursive role wrapping:
+	@Override
+	public TypeBinding maybeWrapRoleType(ASTNode typedNode, TypeArgumentUpdater updater) {
+		if (this.arguments == null)
+			return this;
+
+		boolean modified = false;
+		TypeBinding[] newArguments = new TypeBinding[this.arguments.length];
+		for (int i = 0; i < newArguments.length; i++)
+		{
+			TypeBinding arg = this.arguments[i];
+			if (arg.isRawType()) {
+				ReferenceBinding originalType = ((RawTypeBinding)arg).type;
+				TypeBinding updated = updater.updateArg(originalType);
+				if (updated != originalType)
+					newArguments[i] = this.environment.convertToRawType(updated, false);
+				else
+					newArguments[i] = arg;
+			} else if (   arg instanceof ReferenceBinding
+					   && !arg.isTypeVariable()) {
+				newArguments[i] = updater.updateArg((ReferenceBinding) arg);
+			} else {
+				newArguments[i] = arg.maybeWrapRoleType(typedNode, updater);
+			}
+			
+
+			// must avoid nulls in arguments (no longer observed in otjld-tests):
+			if (newArguments[i] == null) {
+				newArguments[i] = new ProblemReferenceBinding(arg.internalName(),
+								   (arg instanceof ReferenceBinding) ? (ReferenceBinding)arg: null,
+								   ProblemReasons.NotFound);
+				continue; // not a good modification
+			}
+			modified |= (newArguments[i] != arg);
+		}
+		if (!modified)
+			return this;
+
+		// yes, we have a modification
+		return this.environment.createParameterizedType(this.type, newArguments, this.enclosingType()); 
+	}
+// SH}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java
new file mode 100644
index 0000000..f48bb45
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolyTypeBinding.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.compiler.lookup;
+
+import org.eclipse.jdt.internal.compiler.ast.Expression;
+
+public class PolyTypeBinding extends TypeBinding {
+
+	Expression expression;
+	
+	public PolyTypeBinding(Expression expression) {
+		this.expression = expression;
+	}
+	
+	public char[] constantPoolName() {
+		throw new UnsupportedOperationException();  // should never reach code generation
+	}
+
+	public PackageBinding getPackage() {
+		throw new UnsupportedOperationException();  // nobody should be asking this question.
+	}
+
+	public boolean isCompatibleWith(TypeBinding left, Scope scope) {
+		return this.expression.isCompatibleWith(left, scope);
+	}
+
+	public char[] qualifiedSourceName() {
+		return readableName();
+	}
+
+	public char[] sourceName() {
+		return readableName();
+	}
+
+	public char[] readableName() {
+		return this.expression.printExpression(0,  new StringBuffer()).toString().toCharArray();
+	}
+	
+	public String toString() {
+		StringBuffer buffer = new StringBuffer("PolyTypeBinding for: "); //$NON-NLS-1$
+		return this.expression.printExpression(0,  buffer).toString();
+	}
+	
+	public int kind() {
+		return Binding.POLY_TYPE;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java
index c41e93a..5d1c4ff 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PolymorphicMethodBinding.java
@@ -56,7 +56,7 @@
 			return false;
 		}
 		for (int j = 0; j < cachedParametersLength; j++){
-			if (this.parameters[j] != matchingParameters[j]) {
+			if (TypeBinding.notEquals(this.parameters[j], matchingParameters[j])) {
 				return false;
 			}
 		}
@@ -67,7 +67,7 @@
 			}
 		} else if (cachedReturnType == null) {
 			return false;
-		} else if (matchingReturnType != cachedReturnType) {
+		} else if (TypeBinding.notEquals(matchingReturnType, cachedReturnType)) {
 			return false;
 		}
 		// all arguments match
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java
index 33fb900..75c8101 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReasons.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -9,6 +9,10 @@
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Jesper S Moller - Contributions for
+ *							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *	   Stephan Herrmann - Contribution for
+ *								bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -30,11 +34,17 @@
 	final int InvalidTypeForStaticImport = 14;
 	final int InvalidTypeForAutoManagedResource = 15;
 	final int VarargsElementTypeNotVisible = 16;
+	final int NoSuchSingleAbstractMethod = 17;
+	final int NotAWellFormedParameterizedType = 18;
+	final int IntersectionHasMultipleFunctionalInterfaces = 19;
+	final int NonStaticOrAlienTypeReceiver = 20;
+	final int AttemptToBypassDirectSuper = 21; // super access within default method
+	final int DefectiveContainerAnnotationType = 22;
 //{ObjectTeams;
-    final int NoTeamContext = 20;
-    final int AnchorNotFinal = 21;
-    final int AnchorNotATeam = 22;
-    final int AnchorNotFound = 23;
-    final int ProblemAlreadyReported = 24;
+    final int NoTeamContext = 23;
+    final int AnchorNotFinal = 24;
+    final int AnchorNotATeam = 25;
+    final int AnchorNotFound = 26;
+    final int ProblemAlreadyReported = 27;
 // SH}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReferenceBinding.java
index 0d4270a..6402ff7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ProblemReferenceBinding.java
@@ -39,6 +39,9 @@
 	this.problemReason = problemReason;
 }
 
+public TypeBinding clone(TypeBinding enclosingType) {
+	throw new IllegalStateException(); // shouldn't get here.
+}
 /**
  * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#closestMatch()
  */
@@ -102,10 +105,13 @@
 	return "unknown"; //$NON-NLS-1$
 }
 
+public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+	return; // reject misguided attempts.
+}
+//{ObjectTeams: try to squeeze more info out of closestMatch:
 /**
  * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#readableName()
  */
-//{ObjectTeams: try to squeeze more info out of closestMatch:
 public char[] readableName() {
 	if (this.closestMatch != null && !(this.closestMatch instanceof MissingTypeBinding))
 		return this.closestMatch.readableName();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
index 214572f..0fbea9b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/RawTypeBinding.java
@@ -1,12 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Stephan Herrmann - Contribution for
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 416174 - [1.8][compiler][null] Bogus name clash error with null annotations
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -68,6 +76,10 @@
 		sig.getChars(0, sigLength, uniqueKey, 0);
 		return uniqueKey;
    	}
+	
+	public TypeBinding clone(TypeBinding outerType) {
+		return new RawTypeBinding(this.actualType(), (ReferenceBinding) outerType, this.environment);
+	}
 
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding#createParameterizedMethod(org.eclipse.jdt.internal.compiler.lookup.MethodBinding)
@@ -87,11 +99,17 @@
 	 * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#debugName()
 	 */
 	public String debugName() {
-	    StringBuffer nameBuffer = new StringBuffer(10);
+		if (this.hasTypeAnnotations())
+			return annotatedDebugName();
+		StringBuffer nameBuffer = new StringBuffer(10);
 		nameBuffer.append(actualType().sourceName()).append("#RAW"); //$NON-NLS-1$
 	    return nameBuffer.toString();
 	}
-
+	public String annotatedDebugName() {
+		StringBuffer buffer = new StringBuffer(super.annotatedDebugName());
+		buffer.append("#RAW"); //$NON-NLS-1$
+		return buffer.toString();
+	}
 	/**
 	 * Ltype<param1 ... paramN>;
 	 * LY<TT;>;
@@ -126,7 +144,7 @@
 	}
 
     public boolean isEquivalentTo(TypeBinding otherType) {
-		if (this == otherType || erasure() == otherType)
+		if (equalsEquals(this, otherType) || equalsEquals(erasure(), otherType))
 		    return true;
 	    if (otherType == null)
 	        return false;
@@ -139,13 +157,13 @@
 	    	case Binding.GENERIC_TYPE :
 	    	case Binding.PARAMETERIZED_TYPE :
 	    	case Binding.RAW_TYPE :
-	            return erasure() == otherType.erasure();
+	            return TypeBinding.equalsEquals(erasure(), otherType.erasure());
 	    }
         return false;
 	}
 
     public boolean isProvablyDistinct(TypeBinding otherType) {
-		if (this == otherType || erasure() == otherType) // https://bugs.eclipse.org/bugs/show_bug.cgi?id=329588
+		if (TypeBinding.equalsEquals(this, otherType) || TypeBinding.equalsEquals(erasure(), otherType)) // https://bugs.eclipse.org/bugs/show_bug.cgi?id=329588
 		    return false;
 	    if (otherType == null)
 	        return true;
@@ -154,7 +172,7 @@
 	    	case Binding.GENERIC_TYPE :
 	    	case Binding.PARAMETERIZED_TYPE :
 	    	case Binding.RAW_TYPE :
-	            return erasure() != otherType.erasure();
+	            return TypeBinding.notEquals(erasure(), otherType.erasure());
 	    }
         return true;
 	}
@@ -169,6 +187,27 @@
 		}
 		this.arguments = typeArguments;
 	}
+	
+	public MethodBinding getSingleAbstractMethod(Scope scope) {
+		if (this.singleAbstractMethod != null) {
+			return this.singleAbstractMethod;
+		}
+		final ReferenceBinding genericType = genericType();
+		MethodBinding theAbstractMethod = genericType.getSingleAbstractMethod(scope);
+		if (theAbstractMethod == null || !theAbstractMethod.isValidBinding())
+			return this.singleAbstractMethod = theAbstractMethod;
+		
+		ReferenceBinding declaringType = (ReferenceBinding) scope.environment().convertToRawType(genericType, true);
+		declaringType = (ReferenceBinding) declaringType.findSuperTypeOriginatingFrom(theAbstractMethod.declaringClass);
+		MethodBinding [] choices = declaringType.getMethods(theAbstractMethod.selector);
+		for (int i = 0, length = choices.length; i < length; i++) {
+			MethodBinding method = choices[i];
+			if (!method.isAbstract() || method.redeclaresPublicObjectMethod(scope)) continue; // (re)skip statics, defaults, public object methods ...
+			this.singleAbstractMethod = method;
+			break;
+		}
+		return this.singleAbstractMethod;
+	}
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.Binding#readableName()
 	 */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
index 134d27d..05de02c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ReferenceBinding.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -17,8 +21,17 @@
  *								bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
  *								bug 400421 - [compiler] Null analysis for fields does not take @com.google.inject.Inject into account
  *								bug 382069 - [null] Make the null analysis consider JUnit's assertNotNull similarly to assertions
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
+ *      Jesper S Moller - Contributions for
+ *								bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *								bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -26,8 +39,10 @@
 import java.util.Comparator;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.core.compiler.InvalidInputException;
 import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
 import org.eclipse.objectteams.otdt.core.compiler.IOTConstants;
 import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError;
@@ -88,20 +103,23 @@
 	public PackageBinding fPackage;
 //{ObjectTeams: accessible for sub-classes:
 /* orig:
-	char[] fileName;
-	char[] constantPoolName;
-	char[] signature;
+    char[] fileName;
+    char[] constantPoolName;
+    char[] signature;
   :giro */
     public char[] fileName;
     public char[] constantPoolName;
     protected char[] signature;
 // SH}
 
+
 	private SimpleLookupTable compatibleCache;
 
 	int typeBits; // additional bits characterizing this type
+	protected MethodBinding singleAbstractMethod;
 
 	public static final ReferenceBinding LUB_GENERIC = new ReferenceBinding() { /* used for lub computation */
+		{ this.id = TypeIds.T_undefined; }
 		public boolean hasTypeBit(int bit) { return false; }
 	};
 
@@ -122,6 +140,30 @@
 			return c == 0 ? m1.parameters.length - m2.parameters.length : c;
 		}
 	};
+	static protected ProblemMethodBinding samProblemBinding = new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NoSuchSingleAbstractMethod);
+
+
+	public ReferenceBinding(ReferenceBinding prototype) {
+	super(prototype);
+
+	this.compoundName = prototype.compoundName;
+	this.sourceName = prototype.sourceName;
+	this.modifiers = prototype.modifiers;
+	this.fPackage = prototype.fPackage;
+	this.fileName = prototype.fileName;
+	this.constantPoolName = prototype.constantPoolName;
+	this.signature = prototype.signature;
+	this.compatibleCache = prototype.compatibleCache;
+	this.typeBits = prototype.typeBits;
+	this.singleAbstractMethod = prototype.singleAbstractMethod;
+}
+
+public ReferenceBinding() {
+	super();
+//{ObjectTeams: most subclasses need model to be set:
+	this.model = new TypeModel(this);
+// SH}
+}
 
 public static FieldBinding binarySearch(char[] name, FieldBinding[] sortedFields) {
 	if (sortedFields == null)
@@ -305,11 +347,7 @@
 	Arrays.sort(sortedMethods, left, right, METHOD_COMPARATOR);
 }
 
-//{ObjectTeams: most subclasses need model to be set:
-	protected ReferenceBinding() {
-		this.model = new TypeModel(this);
-	}
-	// some subclasses share an existing model
+//{ObjectTeams: some subclasses share an existing model
 	protected ReferenceBinding(TypeModel model) {
 		this.model = model;
 		if (model != null && model.getBinding() == null)
@@ -357,7 +395,7 @@
 /**
  * Answer true if the receiver is visible to the invocationPackage.
  */
-public final boolean canBeSeenBy(PackageBinding invocationPackage) {
+public boolean canBeSeenBy(PackageBinding invocationPackage) {
 	if (isPublic()) return true;
 	if (isPrivate()) return false;
 
@@ -368,10 +406,10 @@
 /**
  * Answer true if the receiver is visible to the receiverType and the invocationType.
  */
-public final boolean canBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType) {
+public boolean canBeSeenBy(ReferenceBinding receiverType, ReferenceBinding invocationType) {
 	if (isPublic()) return true;
 
-	if (invocationType == this && invocationType == receiverType) return true;
+	if (TypeBinding.equalsEquals(invocationType, this) && TypeBinding.equalsEquals(invocationType, receiverType)) return true;
 
 	if (isProtected()) {
 		// answer true if the invocationType is the declaringClass or they are in the same package
@@ -379,12 +417,12 @@
 		//    AND the invocationType is the invocationType or its subclass
 		//    OR the type is a static method accessed directly through a type
 		//    OR previous assertions are true for one of the enclosing type
-		if (invocationType == this) return true;
+		if (TypeBinding.equalsEquals(invocationType, this)) return true;
 		if (invocationType.fPackage == this.fPackage) return true;
 
 		TypeBinding currentType = invocationType.erasure();
 		TypeBinding declaringClass = enclosingType().erasure(); // protected types always have an enclosing one
-		if (declaringClass == invocationType) return true;
+		if (TypeBinding.equalsEquals(declaringClass, invocationType)) return true;
 		if (declaringClass == null) return false; // could be null if incorrect top-level protected type
 		//int depth = 0;
 		do {
@@ -399,7 +437,7 @@
 		// answer true if the receiverType is the receiver or its enclosingType
 		// AND the invocationType and the receiver have a common enclosingType
 		receiverCheck: {
-			if (!(receiverType == this || receiverType == enclosingType())) {
+			if (!(TypeBinding.equalsEquals(receiverType, this) || TypeBinding.equalsEquals(receiverType, enclosingType()))) {
 				// special tolerance for type variable direct bounds, but only if compliance <= 1.6, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=334622
 				if (receiverType.isTypeVariable()) {
 					TypeVariableBinding typeVariable = (TypeVariableBinding) receiverType;
@@ -410,7 +448,7 @@
 			}
 		}
 
-		if (invocationType != this) {
+		if (TypeBinding.notEquals(invocationType, this)) {
 			ReferenceBinding outerInvocationType = invocationType;
 			ReferenceBinding temp = outerInvocationType.enclosingType();
 			while (temp != null) {
@@ -424,7 +462,7 @@
 				outerDeclaringClass = temp;
 				temp = temp.enclosingType();
 			}
-			if (outerInvocationType != outerDeclaringClass) return false;
+			if (TypeBinding.notEquals(outerInvocationType, outerDeclaringClass)) return false;
 		}
 		return true;
 	}
@@ -436,9 +474,9 @@
 	TypeBinding originalDeclaringClass = (enclosingType() == null ? this : enclosingType()).original();
 	do {
 		if (currentType.isCapture()) {  // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
-			if (originalDeclaringClass == currentType.erasure().original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.erasure().original())) return true;
 		} else { 
-			if (originalDeclaringClass == currentType.original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, currentType.original())) return true;
 		}
 		PackageBinding currentPackage = currentType.fPackage;
 		// package could be null for wildcards/intersection types, ignore and recurse in superclass
@@ -450,11 +488,11 @@
 /**
  * Answer true if the receiver is visible to the type provided by the scope.
  */
-public final boolean canBeSeenBy(Scope scope) {
+public boolean canBeSeenBy(Scope scope) {
 	if (isPublic()) return true;
 
 	SourceTypeBinding invocationType = scope.enclosingSourceType();
-	if (invocationType == this) return true;
+	if (TypeBinding.equalsEquals(invocationType, this)) return true;
 
 	if (invocationType == null) // static import call
 		return !isPrivate() && scope.getCurrentPackage() == this.fPackage;
@@ -473,7 +511,7 @@
 		TypeBinding currentType = invocationType.erasure();
 		// int depth = 0;
 		do {
-			if (declaringClass == invocationType) return true;
+			if (TypeBinding.equalsEquals(declaringClass, invocationType)) return true;
 			if (currentType.findSuperTypeOriginatingFrom(declaringClass) != null) return true;
 			// depth++;
 			currentType = currentType.enclosingType();
@@ -496,7 +534,7 @@
 			outerDeclaringClass = temp;
 			temp = temp.enclosingType();
 		}
-		return outerInvocationType == outerDeclaringClass;
+		return TypeBinding.equalsEquals(outerInvocationType, outerDeclaringClass);
 	}
 
 	// isDefault()
@@ -578,7 +616,7 @@
 								this.id = TypeIds.T_JunitFrameworkAssert;
 							return;
 					}
-					return;
+				return;
 				default: return;
 			}
 			// ... at this point we know it's java.*.*
@@ -719,6 +757,8 @@
 				case 'F' :
 					if (CharOperation.equals(typeName, TypeConstants.JAVA_LANG_FLOAT[2]))
 						this.id = TypeIds.T_JavaLangFloat;
+					else if (CharOperation.equals(typeName, TypeConstants.JAVA_LANG_FUNCTIONAL_INTERFACE[2]))
+						this.id = TypeIds.T_JavaLangFunctionalInterface;
 					return;
 				case 'I' :
 					switch (typeName.length) {
@@ -843,6 +883,10 @@
 										if (CharOperation.equals(typeName, TypeConstants.JAVA_LANG_ANNOTATION_RETENTION[3]))
 											this.id = TypeIds.T_JavaLangAnnotationRetention;
 										return;
+									case 10 :
+										if (CharOperation.equals(typeName, TypeConstants.JAVA_LANG_ANNOTATION_REPEATABLE[3]))
+											this.id = TypeIds.T_JavaLangAnnotationRepeatable;
+										return;
 									case 15 :
 										if (CharOperation.equals(typeName, TypeConstants.JAVA_LANG_ANNOTATION_RETENTIONPOLICY[3]))
 											this.id = TypeIds.T_JavaLangAnnotationRetentionPolicy;
@@ -927,29 +971,29 @@
 
 					switch (packageName[0]) {
 						case 'e':
-							if (CharOperation.equals(TypeConstants.ECLIPSE, packageName)) {
-								packageName = this.compoundName[2];
-								if (packageName.length == 0) return; // just to be safe
-								switch (packageName[0]) {
-									case 'c' :
-										if (CharOperation.equals(packageName, TypeConstants.CORE)) { 
-											typeName = this.compoundName[3];
-											if (typeName.length == 0) return; // just to be safe
-											switch (typeName[0]) {
-												case 'r' :
-													char[] memberTypeName = this.compoundName[4];
-													if (memberTypeName.length == 0) return; // just to be safe
-													if (CharOperation.equals(typeName, TypeConstants.ORG_ECLIPSE_CORE_RUNTIME_ASSERT[3])
-															&& CharOperation.equals(memberTypeName, TypeConstants.ORG_ECLIPSE_CORE_RUNTIME_ASSERT[4]))
-														this.id = TypeIds.T_OrgEclipseCoreRuntimeAssert;
-													return;
-											}
-										}
-										return;
+					if (CharOperation.equals(TypeConstants.ECLIPSE, packageName)) {
+						packageName = this.compoundName[2];
+						if (packageName.length == 0) return; // just to be safe
+						switch (packageName[0]) {
+							case 'c' :
+								if (CharOperation.equals(packageName, TypeConstants.CORE)) { 
+									typeName = this.compoundName[3];
+									if (typeName.length == 0) return; // just to be safe
+									switch (typeName[0]) {
+										case 'r' :
+											char[] memberTypeName = this.compoundName[4];
+											if (memberTypeName.length == 0) return; // just to be safe
+											if (CharOperation.equals(typeName, TypeConstants.ORG_ECLIPSE_CORE_RUNTIME_ASSERT[3])
+													&& CharOperation.equals(memberTypeName, TypeConstants.ORG_ECLIPSE_CORE_RUNTIME_ASSERT[4]))
+												this.id = TypeIds.T_OrgEclipseCoreRuntimeAssert;
+											return;
+									}
 								}
 								return;
-							}
-							return;
+						}
+						return;
+					}
+					return;
 						case 'a':
 							if (CharOperation.equals(TypeConstants.APACHE, packageName)) {
 								if (CharOperation.equals(TypeConstants.COMMONS, this.compoundName[2])) {
@@ -957,7 +1001,7 @@
 										this.id = TypeIds.T_OrgApacheCommonsLangValidate;
 									else if (CharOperation.equals(TypeConstants.ORG_APACHE_COMMONS_LANG3_VALIDATE, this.compoundName))
 										this.id = TypeIds.T_OrgApacheCommonsLang3Validate;
-								}
+			}
 							}
 							return;
 					}
@@ -1002,12 +1046,11 @@
     return CharOperation.concatWith(this.compoundName, '.');
 }
 // SH}
-
 public String debugName() {
-	return (this.compoundName != null) ? new String(readableName()) : "UNNAMED TYPE"; //$NON-NLS-1$
+	return (this.compoundName != null) ? this.hasTypeAnnotations() ? annotatedDebugName() : new String(readableName()) : "UNNAMED TYPE"; //$NON-NLS-1$
 }
 
-public final int depth() {
+public int depth() {
 	int depth = 0;
 	ReferenceBinding current = this;
 	while ((current = current.enclosingType()) != null)
@@ -1024,7 +1067,7 @@
 	boolean inCycle = false; // check each method before failing
 	for (int i = 0, l = currentMethods.length; i < l; i++) {
 		TypeBinding returnType = currentMethods[i].returnType.leafComponentType().erasure();
-		if (this == returnType) {
+		if (TypeBinding.equalsEquals(this, returnType)) {
 			if (this instanceof SourceTypeBinding) {
 				MethodDeclaration decl = (MethodDeclaration) currentMethods[i].sourceMethod();
 				((SourceTypeBinding) this).scope.problemReporter().annotationCircularity(this, this, decl != null ? decl.returnType : null);
@@ -1147,8 +1190,8 @@
 	return Binding.NO_METHODS;
 }
 
-// Answer methods named selector, which take no more than the suggestedParameterLength.
-// The suggested parameter length is optional and may not be guaranteed by every type.
+//Answer methods named selector, which take no more than the suggestedParameterLength.
+//The suggested parameter length is optional and may not be guaranteed by every type.
 public MethodBinding[] getMethods(char[] selector, int suggestedParameterLength) {
 	return getMethods(selector);
 }
@@ -1226,7 +1269,7 @@
 					MethodBinding superSubstitute= verifier.computeSubstituteMethod(superMethod, match1);
 					if (superSubstitute != null)
 						superMethod= superSubstitute;
-					if (!verifier.areParametersEqual(match1, superMethod))
+					if (!ImplicitNullAnnotationVerifier.areParametersEqual(match1, superMethod, verifier.environment))
 						foundMethod = new ProblemMethodBinding(match1.selector, Binding.NO_PARAMETERS, ProblemReasons.Ambiguous);
 				}
 			}
@@ -1268,7 +1311,7 @@
  */
 public boolean hasIncompatibleSuperType(ReferenceBinding otherType) {
 
-    if (this == otherType) return false;
+    if (TypeBinding.equalsEquals(this, otherType)) return false;
 
 	ReferenceBinding[] interfacesToVisit = null;
 	int nextPosition = 0;
@@ -1291,7 +1334,7 @@
 				nextInterface : for (int a = 0; a < itsLength; a++) {
 					ReferenceBinding next = itsInterfaces[a];
 					for (int b = 0; b < nextPosition; b++)
-						if (next == interfacesToVisit[b]) continue nextInterface;
+						if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 					interfacesToVisit[nextPosition++] = next;
 				}
 			}
@@ -1300,7 +1343,7 @@
 
 	for (int i = 0; i < nextPosition; i++) {
 		currentType = interfacesToVisit[i];
-		if (currentType == otherType) return false;
+		if (TypeBinding.equalsEquals(currentType, otherType)) return false;
 		match = otherType.findSuperTypeOriginatingFrom(currentType);
 		if (match != null && match.isProvablyDistinct(currentType))
 			return true;
@@ -1313,7 +1356,7 @@
 			nextInterface : for (int a = 0; a < itsLength; a++) {
 				ReferenceBinding next = itsInterfaces[a];
 				for (int b = 0; b < nextPosition; b++)
-					if (next == interfacesToVisit[b]) continue nextInterface;
+					if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 				interfacesToVisit[nextPosition++] = next;
 			}
 		}
@@ -1362,7 +1405,7 @@
 * NOTE: Assume that anInterface is an interface.
 */
 public boolean implementsInterface(ReferenceBinding anInterface, boolean searchHierarchy) {
-	if (this == anInterface)
+	if (TypeBinding.equalsEquals(this, anInterface))
 		return true;
 
 	ReferenceBinding[] interfacesToVisit = null;
@@ -1381,7 +1424,7 @@
 				nextInterface : for (int a = 0; a < itsLength; a++) {
 					ReferenceBinding next = itsInterfaces[a];
 					for (int b = 0; b < nextPosition; b++)
-						if (next == interfacesToVisit[b]) continue nextInterface;
+						if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 					interfacesToVisit[nextPosition++] = next;
 				}
 			}
@@ -1401,7 +1444,7 @@
 			nextInterface : for (int a = 0; a < itsLength; a++) {
 				ReferenceBinding next = itsInterfaces[a];
 				for (int b = 0; b < nextPosition; b++)
-					if (next == interfacesToVisit[b]) continue nextInterface;
+					if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 				interfacesToVisit[nextPosition++] = next;
 			}
 		}
@@ -1506,8 +1549,9 @@
 }
 public boolean isCompatibleWith(TypeBinding otherType, boolean useObjectShortcut, /*@Nullable*/ Scope captureScope) {
 // SH}
-	if (otherType == this)
+	if (equalsEquals(otherType, this))
 		return true;
+
 //{ObjectTeams: respect new argument useObjectShortcut:
 /* orig:
 	if (otherType.id == TypeIds.T_JavaLangObject)
@@ -1563,7 +1607,7 @@
 //{ObjectTeams: new parameter useObjectShortcut
 private boolean isCompatibleWith0(TypeBinding otherType, boolean useObjectShortcut, /*@Nullable*/ Scope captureScope) {
 // SH}
-	if (otherType == this)
+	if (TypeBinding.equalsEquals(otherType, this))
 		return true;
 //{ObjectTeams: respect new param:
 /*orig:
@@ -1600,7 +1644,7 @@
 				case Binding.GENERIC_TYPE :
 				case Binding.PARAMETERIZED_TYPE :
 				case Binding.RAW_TYPE :
-					if (erasure() == otherType.erasure())
+					if (TypeBinding.equalsEquals(erasure(), otherType.erasure())) 
 						return false; // should have passed equivalence check
 										// above if same erasure
 			}
@@ -1689,6 +1733,11 @@
 	return (this.modifiers & ClassFileConstants.AccInterface) != 0;
 }
 
+public boolean isFunctionalInterface(Scope scope) {
+	MethodBinding method;
+	return isInterface() && (method = getSingleAbstractMethod(scope)) != null && method.isValidBinding();
+}
+
 /**
  * Answer true if the receiver has private visibility
  */
@@ -1888,6 +1937,19 @@
 	return readableName;
 }
 
+protected void appendNullAnnotation(StringBuffer nameBuffer, CompilerOptions options) {
+	if (options.isAnnotationBasedNullAnalysisEnabled) {
+		// restore applied null annotation from tagBits:
+	    if ((this.tagBits & TagBits.AnnotationNonNull) != 0) {
+	    	char[][] nonNullAnnotationName = options.nonNullAnnotationName;
+			nameBuffer.append('@').append(nonNullAnnotationName[nonNullAnnotationName.length-1]).append(' ');
+	    } else if ((this.tagBits & TagBits.AnnotationNullable) != 0) {
+	    	char[][] nullableAnnotationName = options.nullableAnnotationName;
+			nameBuffer.append('@').append(nullableAnnotationName[nullableAnnotationName.length-1]).append(' ');
+	    }
+	}
+}
+
 public AnnotationHolder retrieveAnnotationHolder(Binding binding, boolean forceInitialization) {
 	SimpleLookupTable store = storedAnnotations(forceInitialization);
 	return store == null ? null : (AnnotationHolder) store.get(binding);
@@ -1904,6 +1966,89 @@
 public void setAnnotations(AnnotationBinding[] annotations) {
 	storeAnnotations(this, annotations);
 }
+public void setContainerAnnotationType(ReferenceBinding value) {
+	// Leave this to subclasses
+}
+public void tagAsHavingDefectiveContainerType() {
+	// Leave this to subclasses
+}
+
+/**
+ * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#nullAnnotatedReadableName(CompilerOptions,boolean)
+ */
+public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) {
+	if (shortNames)
+		return nullAnnotatedShortReadableName(options);
+	return nullAnnotatedReadableName(options);
+}
+
+char[] nullAnnotatedReadableName(CompilerOptions options) {
+    StringBuffer nameBuffer = new StringBuffer(10);
+	if (isMemberType()) {
+		nameBuffer.append(enclosingType().nullAnnotatedReadableName(options, false));
+		nameBuffer.append('.');
+		appendNullAnnotation(nameBuffer, options);
+		nameBuffer.append(this.sourceName);
+	} else if (this.compoundName != null) {
+		int i;
+		int l=this.compoundName.length;
+		for (i=0; i<l-1; i++) {
+			nameBuffer.append(this.compoundName[i]);
+			nameBuffer.append('.');
+		}
+	    appendNullAnnotation(nameBuffer, options);
+		nameBuffer.append(this.compoundName[i]);
+	} else {
+		// case of TypeVariableBinding with nullAnnotationTagBits:
+		appendNullAnnotation(nameBuffer, options);
+		if (this.sourceName != null)
+			nameBuffer.append(this.sourceName);
+		else // WildcardBinding, CaptureBinding have no sourceName
+			nameBuffer.append(this.readableName());
+	}
+	TypeBinding [] arguments = typeArguments();
+	if (arguments != null && arguments.length > 0) { // empty arguments array happens when PTB has been created just to capture type annotations
+		nameBuffer.append('<');
+	    for (int i = 0, length = arguments.length; i < length; i++) {
+	        if (i > 0) nameBuffer.append(',');
+	        nameBuffer.append(arguments[i].nullAnnotatedReadableName(options, false));
+	    }
+	    nameBuffer.append('>');
+	}
+	int nameLength = nameBuffer.length();
+	char[] readableName = new char[nameLength];
+	nameBuffer.getChars(0, nameLength, readableName, 0);
+    return readableName;
+}
+
+char[] nullAnnotatedShortReadableName(CompilerOptions options) {
+    StringBuffer nameBuffer = new StringBuffer(10);
+	if (isMemberType()) {
+		nameBuffer.append(enclosingType().nullAnnotatedReadableName(options, true));
+		nameBuffer.append('.');
+		appendNullAnnotation(nameBuffer, options);
+		nameBuffer.append(this.sourceName);
+	} else {
+		appendNullAnnotation(nameBuffer, options);
+		if (this.sourceName != null)
+			nameBuffer.append(this.sourceName);
+		else // WildcardBinding, CaptureBinding have no sourceName
+			nameBuffer.append(this.shortReadableName());
+	}
+	TypeBinding [] arguments = typeArguments();
+	if (arguments != null && arguments.length > 0) { // empty arguments array happens when PTB has been created just to capture type annotations
+		nameBuffer.append('<');
+	    for (int i = 0, length = arguments.length; i < length; i++) {
+	        if (i > 0) nameBuffer.append(',');
+	        nameBuffer.append(arguments[i].nullAnnotatedReadableName(options, true));
+	    }
+	    nameBuffer.append('>');
+	}
+	int nameLength = nameBuffer.length();
+	char[] shortReadableName = new char[nameLength];
+	nameBuffer.getChars(0, nameLength, shortReadableName, 0);
+    return shortReadableName;
+}
 
 public char[] shortReadableName() /*Object*/ {
 	char[] shortReadableName;
@@ -2093,4 +2238,172 @@
 	return null;
 }
 // SH}
+private MethodBinding [] getInterfaceAbstractContracts(Scope scope) throws InvalidInputException {
+	
+	if (!isInterface() || !isValidBinding()) {
+		throw new InvalidInputException("Not a functional interface"); //$NON-NLS-1$
+	}
+	
+	MethodBinding [] methods = methods();
+	MethodBinding [] contracts = new MethodBinding[0];
+	int contractsCount = 0;
+	int contractsLength = 0;
+	MethodBinding aContract = null;
+	int contractParameterLength = 0;
+	char [] contractSelector = null;
+	
+	for (int i = 0, length = methods == null ? 0 : methods.length; i < length; i++) {
+		final MethodBinding method = methods[i];
+		if (!method.isAbstract() || method.redeclaresPublicObjectMethod(scope)) continue; // skips statics, defaults, public object methods ...
+		final boolean validBinding = method.isValidBinding();
+		if (aContract == null && validBinding) {
+			aContract = method;
+			contractParameterLength = aContract.parameters.length;
+			contractSelector = aContract.selector;
+		} else {
+			if (!validBinding || method.parameters.length != contractParameterLength || !CharOperation.equals(contractSelector, method.selector)) {
+				throw new InvalidInputException("Not a functional interface"); //$NON-NLS-1$
+			}
+		}
+		if (contractsCount == contractsLength) {
+			System.arraycopy(contracts, 0, contracts = new MethodBinding[contractsLength += 16], 0, contractsCount);
+		}
+		contracts[contractsCount++] = method;
+	}
+	ReferenceBinding [] superInterfaces = superInterfaces();
+	for (int i = 0, length = superInterfaces.length; i < length; i++) {
+		MethodBinding [] superInterfaceContracts = superInterfaces[i].getInterfaceAbstractContracts(scope);
+		final int superInterfaceContractsLength = superInterfaceContracts == null  ? 0 : superInterfaceContracts.length;
+		
+		if (superInterfaceContractsLength == 0) continue;
+		if (aContract == null) {
+			aContract = superInterfaceContracts[0];
+			contractParameterLength = aContract.parameters.length;
+			contractSelector = aContract.selector;
+			contracts = superInterfaceContracts;
+			contractsCount = contractsLength = superInterfaceContractsLength;
+		} else {
+			if (superInterfaceContracts[0].parameters.length != contractParameterLength || !CharOperation.equals(contractSelector, superInterfaceContracts[0].selector)) {
+				throw new InvalidInputException("Not a functional interface"); //$NON-NLS-1$
+			}
+			if (contractsLength < contractsCount + superInterfaceContractsLength) {
+				System.arraycopy(contracts, 0, contracts = new MethodBinding[contractsLength = contractsCount + superInterfaceContractsLength], 0, contractsCount);
+			}
+			System.arraycopy(superInterfaceContracts, 0, contracts, contractsCount,	superInterfaceContractsLength);
+			contractsCount += superInterfaceContractsLength;
+		}
+	}
+	if (contractsCount < contractsLength) {
+		System.arraycopy(contracts, 0, contracts = new MethodBinding[contractsCount], 0, contractsCount);
+	}
+	return contracts;
+}
+public MethodBinding getSingleAbstractMethod(Scope scope) {
+	
+	if (this.singleAbstractMethod != null) {
+		return this.singleAbstractMethod;
+	}
+
+	MethodBinding[] methods = null;
+	try {
+		methods = getInterfaceAbstractContracts(scope);
+	} catch (InvalidInputException e) {
+		return this.singleAbstractMethod = samProblemBinding;
+	}
+	if (methods != null && methods.length == 1)
+		return this.singleAbstractMethod = methods[0];
+	
+	final LookupEnvironment environment = scope.environment();
+	boolean genericMethodSeen = false;
+	next:for (int i = 0, length = methods.length; i < length; i++) {
+		MethodBinding method = methods[i], otherMethod = null;
+		if (method.typeVariables != Binding.NO_TYPE_VARIABLES)
+			genericMethodSeen = true;
+		for (int j = 0; j < length; j++) {
+			if (i == j) continue;
+			otherMethod = methods[j];
+			if (otherMethod.typeVariables != Binding.NO_TYPE_VARIABLES)
+				genericMethodSeen = true;
+			
+			if (genericMethodSeen) { // adapt type parameters.
+				otherMethod = MethodVerifier.computeSubstituteMethod(otherMethod, method, environment);
+				if (otherMethod == null)
+					continue next;
+			}
+			if (!MethodVerifier.isSubstituteParameterSubsignature(method, otherMethod, environment) || !MethodVerifier.areReturnTypesCompatible(method, otherMethod, environment)) 
+				continue next; 
+		}
+		// If we reach here, we found a method that is override equivalent with every other method and is also return type substitutable. Compute kosher exceptions now ...
+		ReferenceBinding [] exceptions = new ReferenceBinding[0];
+		int exceptionsCount = 0, exceptionsLength = 0;
+		final MethodBinding theAbstractMethod = method;
+		boolean shouldEraseThrows = theAbstractMethod.typeVariables == Binding.NO_TYPE_VARIABLES && genericMethodSeen;
+		boolean shouldAdaptThrows = theAbstractMethod.typeVariables != Binding.NO_TYPE_VARIABLES;
+		final int typeVariableLength = theAbstractMethod.typeVariables.length;
+		
+		none:for (i = 0; i < length; i++) {
+			method = methods[i];
+			ReferenceBinding[] methodThrownExceptions = method.thrownExceptions;
+			int methodExceptionsLength = methodThrownExceptions == null ? 0: methodThrownExceptions.length;
+			if (methodExceptionsLength == 0) break none;
+			if (shouldAdaptThrows && method != theAbstractMethod) {
+				System.arraycopy(methodThrownExceptions, 0, methodThrownExceptions = new ReferenceBinding[methodExceptionsLength], 0, methodExceptionsLength);
+				for (int tv = 0; tv < typeVariableLength; tv++) {
+					if (methodThrownExceptions[tv] instanceof TypeVariableBinding) {
+						methodThrownExceptions[tv] = theAbstractMethod.typeVariables[tv];
+					}
+				}
+			}
+			nextException: for (int j = 0; j < methodExceptionsLength; j++) {
+				ReferenceBinding methodException = methodThrownExceptions[j];
+				if (shouldEraseThrows)
+					methodException = (ReferenceBinding) methodException.erasure();
+				nextMethod: for (int k = 0; k < length; k++) {
+					if (i == k) continue;
+					otherMethod = methods[k];
+					ReferenceBinding[] otherMethodThrownExceptions = otherMethod.thrownExceptions;
+					int otherMethodExceptionsLength =  otherMethodThrownExceptions == null ? 0 : otherMethodThrownExceptions.length;
+					if (otherMethodExceptionsLength == 0) break none;
+					if (shouldAdaptThrows && otherMethod != theAbstractMethod) {
+						System.arraycopy(otherMethodThrownExceptions, 
+								0, 
+								otherMethodThrownExceptions = new ReferenceBinding[otherMethodExceptionsLength], 
+								0, 
+								otherMethodExceptionsLength);
+						for (int tv = 0; tv < typeVariableLength; tv++) {
+							if (otherMethodThrownExceptions[tv] instanceof TypeVariableBinding) {
+								otherMethodThrownExceptions[tv] = theAbstractMethod.typeVariables[tv];
+							}
+						}
+					}
+					for (int l = 0; l < otherMethodExceptionsLength; l++) {
+						ReferenceBinding otherException = otherMethodThrownExceptions[l];
+						if (shouldEraseThrows)
+							otherException = (ReferenceBinding) otherException.erasure();
+						if (methodException.isCompatibleWith(otherException))
+							continue nextMethod;
+					}
+					continue nextException;
+				}
+				// If we reach here, method exception or its super type is covered by every throws clause.
+				if (exceptionsCount == exceptionsLength) {
+					System.arraycopy(exceptions, 0, exceptions = new ReferenceBinding[exceptionsLength += 16], 0, exceptionsCount);
+				}
+				exceptions[exceptionsCount++] = methodException;
+			}
+		}
+		if (exceptionsCount != exceptionsLength) {
+			System.arraycopy(exceptions, 0, exceptions = new ReferenceBinding[exceptionsCount], 0, exceptionsCount);
+		}
+		this.singleAbstractMethod = new MethodBinding(theAbstractMethod.modifiers, 
+				theAbstractMethod.selector, 
+				theAbstractMethod.returnType, 
+				theAbstractMethod.parameters, 
+				exceptions, 
+				theAbstractMethod.declaringClass);
+	    this.singleAbstractMethod.typeVariables = theAbstractMethod.typeVariables;
+		return this.singleAbstractMethod;
+	}
+	return this.singleAbstractMethod = samProblemBinding;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index c62668d..6ee1612 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -4,8 +4,11 @@
  * 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
- * $Id: Scope.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -19,8 +22,13 @@
  *								bug 405706 - Eclipse compiler fails to give compiler error when return type is a inferred generic
  *								Bug 408441 - Type mismatch using Arrays.asList with 3 or more implementations of an interface with the interface type as the last parameter
  *								Bug 413958 - Function override returning inherited Generic Type
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 416183 - [1.8][compiler][null] Overload resolution fails with null annotations
+ *								Bug 416176 - [1.8][compiler][null] null type annotations cause grief on type variables
  *     Jesper S Moller - Contributions for
+ *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
  *								Bug 378674 - "The method can be declared as static" is wrong
+ *  							Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -150,7 +158,7 @@
 					ArrayBinding originalArrayType = (ArrayBinding) originalType;
 					TypeBinding originalLeafComponentType = originalArrayType.leafComponentType;
 					TypeBinding substitute = convertEliminatingTypeVariables(originalLeafComponentType, genericType, rank, eliminatedVariables); // substitute could itself be array type
-					if (substitute != originalLeafComponentType) {
+					if (TypeBinding.notEquals(substitute, originalLeafComponentType)) {
 						return originalArrayType.environment.createArrayType(substitute.leafComponentType(), substitute.dimensions() + originalArrayType.dimensions());
 					}
 					break;
@@ -166,7 +174,7 @@
 					for (int i = 0, length = originalArguments == null ? 0 : originalArguments.length; i < length; i++) {
 						TypeBinding originalArgument = originalArguments[i];
 						TypeBinding substitutedArgument = convertEliminatingTypeVariables(originalArgument, paramType.genericType(), i, eliminatedVariables);
-						if (substitutedArgument != originalArgument) {
+						if (TypeBinding.notEquals(substitutedArgument, originalArgument)) {
 							if (substitutedArguments == originalArguments) {
 								System.arraycopy(originalArguments, 0, substitutedArguments = new TypeBinding[length], 0, i);
 							}
@@ -175,7 +183,7 @@
 							substitutedArguments[i] = originalArgument;
 						}
 					}
-					if (originalEnclosing != substitutedEnclosing || originalArguments != substitutedArguments) {
+					if (TypeBinding.notEquals(originalEnclosing, substitutedEnclosing) || originalArguments != substitutedArguments) {
 						return paramType.environment.createParameterizedType(paramType.genericType(), substitutedArguments, substitutedEnclosing);
 					}
 					break;
@@ -209,7 +217,7 @@
 					for (int i = 0, length = originalArguments == null ? 0 : originalArguments.length; i < length; i++) {
 						TypeBinding originalArgument = originalArguments[i];
 						TypeBinding substitutedArgument = convertEliminatingTypeVariables(originalArgument, currentType, i, eliminatedVariables);
-						if (substitutedArgument != originalArgument) {
+						if (TypeBinding.notEquals(substitutedArgument, originalArgument)) {
 							if (substitutedArguments == originalArguments) {
 								System.arraycopy(originalArguments, 0, substitutedArguments = new TypeBinding[length], 0, i);
 							}
@@ -218,7 +226,7 @@
 							substitutedArguments[i] = originalArgument;
 						}
 					}
-					if (originalEnclosing != substitutedEnclosing || originalArguments != substitutedArguments) {
+					if (TypeBinding.notEquals(originalEnclosing, substitutedEnclosing) || originalArguments != substitutedArguments) {
 						return ((TypeVariableBinding)originalArguments[0]).environment.createParameterizedType(genericType, substitutedArguments, substitutedEnclosing);
 					}
 					break;
@@ -228,7 +236,7 @@
 					TypeBinding substitutedBound = originalBound;
 					if (originalBound != null) {
 						substitutedBound = convertEliminatingTypeVariables(originalBound, genericType, rank, eliminatedVariables);
-						if (substitutedBound != originalBound) {
+						if (TypeBinding.notEquals(substitutedBound, originalBound)) {
 							return wildcard.environment.createWildcard(wildcard.genericType, wildcard.rank, substitutedBound, null, wildcard.boundKind);
 						}
 					}
@@ -245,7 +253,7 @@
 					for (int i = 0, length = originalOtherBounds == null ? 0 : originalOtherBounds.length; i < length; i++) {
 						TypeBinding originalOtherBound = originalOtherBounds[i];
 						TypeBinding substitutedOtherBound = convertEliminatingTypeVariables(originalOtherBound, genericType, rank, eliminatedVariables);
-						if (substitutedOtherBound != originalOtherBound) {
+						if (TypeBinding.notEquals(substitutedOtherBound, originalOtherBound)) {
 							if (substitutedOtherBounds == originalOtherBounds) {
 								System.arraycopy(originalOtherBounds, 0, substitutedOtherBounds = new TypeBinding[length], 0, i);
 							}
@@ -254,7 +262,7 @@
 							substitutedOtherBounds[i] = originalOtherBound;
 						}
 					}
-					if (substitutedBound != originalBound || substitutedOtherBounds != originalOtherBounds) {
+					if (TypeBinding.notEquals(substitutedBound, originalBound) || substitutedOtherBounds != originalOtherBounds) {
 						return intersection.environment.createWildcard(intersection.genericType, intersection.rank, substitutedBound, substitutedOtherBounds, intersection.boundKind);
 					}
 					break;
@@ -442,7 +450,7 @@
 	        if (!(substitutedType instanceof ReferenceBinding)) {
 	        	return null; // impossible substitution
 	        }
-	        if (substitutedType != originalType) {
+	        if (substitutedType != originalType) { //$IDENTITY-COMPARISON$
 	            if (substitutedTypes == originalTypes) {
 	                System.arraycopy(originalTypes, 0, substitutedTypes = new ReferenceBinding[length], 0, i);
 	            }
@@ -483,35 +491,35 @@
 					substitutedEnclosing = (ReferenceBinding) substitute(substitution, originalEnclosing);
 					if (isMemberTypeOfRaw(originalType, substitutedEnclosing))
 						return originalParameterizedType.environment.createRawType(
-								originalParameterizedType.genericType(), substitutedEnclosing);
+								originalParameterizedType.genericType(), substitutedEnclosing, originalType.getTypeAnnotations());
 				}
 				TypeBinding[] originalArguments = originalParameterizedType.arguments;
 				TypeBinding[] substitutedArguments = originalArguments;
 				if (originalArguments != null) {
 					if (substitution.isRawSubstitution()) {
-						return originalParameterizedType.environment.createRawType(originalParameterizedType.genericType(), substitutedEnclosing);
+						return originalParameterizedType.environment.createRawType(originalParameterizedType.genericType(), substitutedEnclosing, originalType.getTypeAnnotations());
 					}
 					substitutedArguments = substitute(substitution, originalArguments);
 				}
-				if (substitutedArguments != originalArguments || substitutedEnclosing != originalEnclosing) {
+				if (substitutedArguments != originalArguments || substitutedEnclosing != originalEnclosing) { //$IDENTITY-COMPARISON$
 //{ObjectTeams: combination role & parameterized:
 					if (RoleTypeBinding.isRoleType(originalParameterizedType)) {
 						DependentTypeBinding originalRole = (DependentTypeBinding) originalParameterizedType;
 						return originalParameterizedType.environment.createParameterizedType(
-							originalParameterizedType.genericType(), substitutedArguments, originalRole._teamAnchor, originalRole._valueParamPosition, substitutedEnclosing);
+							originalParameterizedType.genericType(), substitutedArguments, originalRole._teamAnchor, originalRole._valueParamPosition, substitutedEnclosing, Binding.NO_ANNOTATIONS);
 					}
 // SH}
 					return originalParameterizedType.environment.createParameterizedType(
-							originalParameterizedType.genericType(), substitutedArguments, substitutedEnclosing);
+							originalParameterizedType.genericType(), substitutedArguments, substitutedEnclosing, originalType.getTypeAnnotations());
 				}
 				break;
 
 			case Binding.ARRAY_TYPE:
 				ArrayBinding originalArrayType = (ArrayBinding) originalType;
 				TypeBinding originalLeafComponentType = originalArrayType.leafComponentType;
-				TypeBinding substitute = substitute(substitution, originalLeafComponentType); // substitute could itself be array type
-				if (substitute != originalLeafComponentType) {
-					return originalArrayType.environment.createArrayType(substitute.leafComponentType(), substitute.dimensions() + originalType.dimensions());
+				TypeBinding substitute = substitute(substitution, originalLeafComponentType); // substitute could itself be array type, TODO(Srikanth): need a test case.
+				if (substitute != originalLeafComponentType) { //$IDENTITY-COMPARISON$
+					return originalArrayType.environment.createArrayType(substitute.leafComponentType(), substitute.dimensions() + originalType.dimensions(), originalType.getTypeAnnotations());
 				}
 				break;
 
@@ -523,7 +531,7 @@
 			        TypeBinding substitutedBound = substitute(substitution, originalBound);
 			        TypeBinding[] originalOtherBounds = wildcard.otherBounds;
 			        TypeBinding[] substitutedOtherBounds = substitute(substitution, originalOtherBounds);
-			        if (substitutedBound != originalBound || originalOtherBounds != substitutedOtherBounds) {
+			        if (substitutedBound != originalBound || originalOtherBounds != substitutedOtherBounds) { //$IDENTITY-COMPARISON$
 			        	if (originalOtherBounds != null) {
 			        		/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=347145: the constituent intersecting types have changed
 			        		   in the last round of substitution. Reevaluate the composite intersection type, as there is a possibility
@@ -542,7 +550,7 @@
 			    				}
 			    			}
 			        	}
-		        		return wildcard.environment.createWildcard(wildcard.genericType, wildcard.rank, substitutedBound, substitutedOtherBounds, wildcard.boundKind);
+		        		return wildcard.environment.createWildcard(wildcard.genericType, wildcard.rank, substitutedBound, substitutedOtherBounds, wildcard.boundKind, wildcard.getTypeAnnotations());
 			        }
 		        }
 				break;
@@ -555,14 +563,14 @@
 				if (originalEnclosing != null) {
 					substitutedEnclosing = (ReferenceBinding) substitute(substitution, originalEnclosing);
 					if (isMemberTypeOfRaw(originalType, substitutedEnclosing))
-						return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing);
+						return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing, originalType.getTypeAnnotations());
 				}
 
 			    // treat as if parameterized with its type variables (non generic type gets 'null' arguments)
-				if (substitutedEnclosing != originalEnclosing) {
+				if (substitutedEnclosing != originalEnclosing) { //$IDENTITY-COMPARISON$
 					return substitution.isRawSubstitution()
-						? substitution.environment().createRawType(originalReferenceType, substitutedEnclosing)
-						:  substitution.environment().createParameterizedType(originalReferenceType, null, substitutedEnclosing);
+						? substitution.environment().createRawType(originalReferenceType, substitutedEnclosing, originalType.getTypeAnnotations())
+						:  substitution.environment().createParameterizedType(originalReferenceType, null, substitutedEnclosing, originalType.getTypeAnnotations());
 				}
 				break;
 			case Binding.GENERIC_TYPE:
@@ -572,16 +580,16 @@
 				if (originalEnclosing != null) {
 					substitutedEnclosing = (ReferenceBinding) substitute(substitution, originalEnclosing);
 					if (isMemberTypeOfRaw(originalType, substitutedEnclosing))
-						return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing);
+						return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing, originalType.getTypeAnnotations());
 				}
 
 				if (substitution.isRawSubstitution()) {
-					return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing);
+					return substitution.environment().createRawType(originalReferenceType, substitutedEnclosing, originalType.getTypeAnnotations());
 				}
 			    // treat as if parameterized with its type variables (non generic type gets 'null' arguments)
 				originalArguments = originalReferenceType.typeVariables();
 				substitutedArguments = substitute(substitution, originalArguments);
-				return substitution.environment().createParameterizedType(originalReferenceType, substitutedArguments, substitutedEnclosing);
+				return substitution.environment().createParameterizedType(originalReferenceType, substitutedArguments, substitutedEnclosing, originalType.getTypeAnnotations());
 		}
 		return originalType;
 	}
@@ -609,7 +617,7 @@
 	    for (int i = 0, length = originalTypes.length; i < length; i++) {
 	        TypeBinding originalType = originalTypes[i];
 	        TypeBinding substitutedParameter = substitute(substitution, originalType);
-	        if (substitutedParameter != originalType) {
+	        if (substitutedParameter != originalType) { //$IDENTITY-COMPARISON$
 	            if (substitutedTypes == originalTypes) {
 	                System.arraycopy(originalTypes, 0, substitutedTypes = new TypeBinding[length], 0, i);
 	            }
@@ -649,6 +657,24 @@
 		} while (scope != null);
 		return (CompilationUnitScope) lastScope;
 	}
+	
+	public boolean isLambdaScope() {
+		return false;
+	}
+	
+	public boolean isLambdaSubscope() {
+		for (Scope scope = this; scope != null; scope = scope.parent) {
+			switch (scope.kind) {
+				case BLOCK_SCOPE:
+			        continue;
+				case METHOD_SCOPE:
+					return scope.isLambdaScope();
+				default:
+					return false;
+			}
+		}
+		return false;
+	}
 
 	/**
 	 * Finds the most specific compiler options
@@ -762,7 +788,8 @@
 		Map invocations = new HashMap(2);
 		boolean noProblems = true;
 		// preinitializing each type variable
-		for (int i = 0, paramLength = typeParameters.length; i < paramLength; i++) {
+		int paramLength = typeParameters.length;
+		for (int i = 0; i < paramLength; i++) {
 			TypeParameter typeParameter = typeParameters[i];
 //{ObjectTeams: don't expect a TypeVariableBinding for a TypeValueParameter:
 			if (typeParameter instanceof TypeValueParameter)
@@ -771,12 +798,12 @@
 			TypeVariableBinding typeVariable = typeParameter.binding;
 			if (typeVariable == null) return false;
 
-			typeVariable.superclass = getJavaLangObject();
-			typeVariable.superInterfaces = Binding.NO_SUPERINTERFACES;
+			typeVariable.setSuperClass(getJavaLangObject());
+			typeVariable.setSuperInterfaces(Binding.NO_SUPERINTERFACES);
 			// set firstBound to the binding of the first explicit bound in parameter declaration
-			typeVariable.firstBound = null; // first bound used to compute erasure
+			typeVariable.setFirstBound(null); // first bound used to compute erasure
 		}
-		nextVariable: for (int i = 0, paramLength = typeParameters.length; i < paramLength; i++) {
+		nextVariable: for (int i = 0; i < paramLength; i++) {
 			TypeParameter typeParameter = typeParameters[i];
 //{ObjectTeams: don't expect a TypeVariableBinding for a TypeValueParameter:
 			if (typeParameter instanceof TypeValueParameter)
@@ -856,12 +883,12 @@
 					} else
 // SH}
 					if (!superType.isInterface()) {
-						typeVariable.superclass = superRefType;
+						typeVariable.setSuperClass(superRefType);
 					} else {
-						typeVariable.superInterfaces = new ReferenceBinding[] {superRefType};
+						typeVariable.setSuperInterfaces(new ReferenceBinding[] {superRefType});
 					}
 					typeVariable.tagBits |= superType.tagBits & TagBits.ContainsNestedTypeReferences;
-					typeVariable.firstBound = superRefType; // first bound used to compute erasure
+					typeVariable.setFirstBound(superRefType); // first bound used to compute erasure
 				}
 			}
 			TypeReference[] boundRefs = typeParameter.bounds;
@@ -898,7 +925,7 @@
 							}
 						}
 						// check against superclass
-						if (checkForErasedCandidateCollisions && typeVariable.firstBound == typeVariable.superclass) {
+						if (checkForErasedCandidateCollisions && TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.superclass)) {
 							if (hasErasedCandidatesCollisions(superType, typeVariable.superclass, invocations, typeVariable, typeRef)) {
 								continue nextBound;
 							}
@@ -907,7 +934,7 @@
 						ReferenceBinding superRefType = (ReferenceBinding) superType;
 						for (int index = typeVariable.superInterfaces.length; --index >= 0;) {
 							ReferenceBinding previousInterface = typeVariable.superInterfaces[index];
-							if (previousInterface == superRefType) {
+							if (TypeBinding.equalsEquals(previousInterface, superRefType)) {
 								problemReporter().duplicateBounds(typeRef, superType);
 								typeVariable.tagBits |= TagBits.HierarchyHasProblems;
 								continue nextBound;
@@ -919,19 +946,27 @@
 							}
 						}
 						int size = typeVariable.superInterfaces.length;
-						System.arraycopy(typeVariable.superInterfaces, 0, typeVariable.superInterfaces = new ReferenceBinding[size + 1], 0, size);
+						System.arraycopy(typeVariable.superInterfaces, 0, typeVariable.setSuperInterfaces(new ReferenceBinding[size + 1]), 0, size);
 						typeVariable.superInterfaces[size] = superRefType;
 					}
 				}
 			}
 			noProblems &= (typeVariable.tagBits & TagBits.HierarchyHasProblems) == 0;
 		}
+		// after bounds have been resolved we're ready for resolving the type parameter itself,
+		// which includes resolving/evaluating type annotations and checking for inconsistencies
+		for (int i = 0; i < paramLength; i++)
+			resolveTypeParameter(typeParameters[i]);
 		return noProblems;
 	}
 
 	public ArrayBinding createArrayType(TypeBinding type, int dimension) {
+		return createArrayType(type, dimension, Binding.NO_ANNOTATIONS);
+	}
+
+	public ArrayBinding createArrayType(TypeBinding type, int dimension, AnnotationBinding[] annotations) {
 		if (type.isValidBinding())
-			return environment().createArrayType(type, dimension);
+			return environment().createArrayType(type, dimension, annotations);
 		// do not cache obvious invalid types
 		return new ArrayBinding(type, dimension, environment());
 	}
@@ -951,6 +986,25 @@
 			parameterBinding.fPackage = unitPackage;
 			typeParameter.binding = parameterBinding;
 
+			if ((typeParameter.bits & ASTNode.HasTypeAnnotations) != 0) {
+				switch(declaringElement.kind()) {
+					case Binding.METHOD :
+						MethodBinding methodBinding = (MethodBinding) declaringElement;
+						AbstractMethodDeclaration sourceMethod = methodBinding.sourceMethod();
+						if (sourceMethod != null) {
+							sourceMethod.bits |= ASTNode.HasTypeAnnotations;
+						}
+						break;
+					case Binding.TYPE :
+						if (declaringElement instanceof SourceTypeBinding) {
+							SourceTypeBinding sourceTypeBinding = (SourceTypeBinding) declaringElement;
+							TypeDeclaration typeDeclaration = sourceTypeBinding.scope.referenceContext;
+							if (typeDeclaration != null) {
+								typeDeclaration.bits |= ASTNode.HasTypeAnnotations;
+							}
+						}
+				}
+			}
 			// detect duplicates, but keep each variable to reduce secondary errors with instantiating this generic type (assume number of variables is correct)
 			for (int j = 0; j < count; j++) {
 				TypeVariableBinding knownVar = typeVariableBindings[j];
@@ -981,6 +1035,10 @@
 		return typeVariableBindings;
 	}
 
+	void resolveTypeParameter(TypeParameter typeParameter) {
+		// valid only for ClassScope and MethodScope
+	}
+
 	public final ClassScope enclosingClassScope() {
 		Scope scope = this;
 		while ((scope = scope.parent) != null) {
@@ -1170,13 +1228,7 @@
 			if (exactMethod.isAbstract() && exactMethod.thrownExceptions != Binding.NO_EXCEPTIONS)
 				return null; // may need to merge exceptions with interface method
 			// special treatment for Object.getClass() in 1.5 mode (substitute parameterized return type)
-//{ObjectTeams: discriminate interface (may be role) and regularInterface
-			/* @original
-			if (receiverType.isInterface() || exactMethod.canBeSeenBy(receiverType, invocationSite, this)) {
-			 */
-			if (receiverType.isRegularInterface() ||
-                exactMethod.canBeSeenBy(this.origImplicitScope, receiverType, invocationSite, this)) {
-// SH}
+			if (exactMethod.canBeSeenBy(receiverType, invocationSite, this)) {
 				if (argumentTypes == Binding.NO_PARAMETERS
 				    && CharOperation.equals(selector, TypeConstants.GETCLASS)
 				    && exactMethod.returnType.isParameterizedType()/*1.5*/) {
@@ -1298,7 +1350,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -1352,7 +1404,7 @@
 						nextInterface : for (int a = 0; a < itsLength; a++) {
 							ReferenceBinding next = itsInterfaces[a];
 							for (int b = 0; b < nextPosition; b++)
-								if (next == interfacesToVisit[b]) continue nextInterface;
+								if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 							interfacesToVisit[nextPosition++] = next;
 						}
 					}
@@ -1427,7 +1479,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -1474,7 +1526,7 @@
 						nextInterface : for (int a = 0; a < itsLength; a++) {
 							ReferenceBinding next = itsInterfaces[a];
 							for (int b = 0; b < nextPosition; b++)
-								if (next == interfacesToVisit[b]) continue nextInterface;
+								if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 							interfacesToVisit[nextPosition++] = next;
 						}
 					}
@@ -1674,7 +1726,7 @@
 				next: for (int a = 0; a < argLength; a++) {
 					TypeBinding arg = argumentTypes[a];
 					for (int p = a == 0 ? 0 : a - 1; p < paramLength && p < a + 1; p++) { // look one slot before & after to see if the type matches
-						if (params[p] == arg) {
+						if (TypeBinding.equalsEquals(params[p], arg)) {
 							argMatches++;
 							continue next;
 						}
@@ -1697,56 +1749,45 @@
 
 		// tiebreak using visibility check
 		int visiblesCount = 0;
-//{ObjectTeams: regular interfaces omit visibility check, so don't do this for synth-ifc:
-/* orig:
-		if (receiverTypeIsInterface) {
-  :giro */
-		if (receiverType.isRegularInterface()) {
-// SH}
-			if (candidatesCount == 1) {
-				unitScope.recordTypeReferences(candidates[0].thrownExceptions);
-				return candidates[0];
+		for (int i = 0; i < candidatesCount; i++) {
+			MethodBinding methodBinding = candidates[i];
+			if (methodBinding.canBeSeenBy(receiverType, invocationSite, this)) {
+				if (visiblesCount != i) {
+					candidates[i] = null;
+					candidates[visiblesCount] = methodBinding;
+				}
+				visiblesCount++;
 			}
-			visiblesCount = candidatesCount;
-		} else {
-			for (int i = 0; i < candidatesCount; i++) {
-				MethodBinding methodBinding = candidates[i];
-				if (methodBinding.canBeSeenBy(receiverType, invocationSite, this)) {
+//{ObjectTeams: check if decapsulation is allowed:
+			else if (invocationSite instanceof Expression) { 
+				if (((Expression)invocationSite).getBaseclassDecapsulation().isAllowed()) {
+					methodBinding = new ProblemMethodBinding(methodBinding, selector, argumentTypes, ProblemReasons.NotVisible);
 					if (visiblesCount != i) {
 						candidates[i] = null;
 						candidates[visiblesCount] = methodBinding;
+					} else {
+						candidates[i] = methodBinding;
 					}
 					visiblesCount++;
 				}
-//{ObjectTeams: check if decapsulation is allowed:
-				else if (invocationSite instanceof Expression) { 
-					if (((Expression)invocationSite).getBaseclassDecapsulation().isAllowed()) {
-						methodBinding = new ProblemMethodBinding(methodBinding, selector, argumentTypes, ProblemReasons.NotVisible);
-						if (visiblesCount != i) {
-							candidates[i] = null;
-							candidates[visiblesCount] = methodBinding;
-						} else {
-							candidates[i] = methodBinding;
-						}
-						visiblesCount++;
-					}
-				}
+			}
 // SH}
-			}
-			switch (visiblesCount) {
-				case 0 :
-					MethodBinding interfaceMethod =
-						findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, null);
-					if (interfaceMethod != null) return interfaceMethod;
-					return new ProblemMethodBinding(candidates[0], candidates[0].selector, candidates[0].parameters, ProblemReasons.NotVisible);
-				case 1 :
-					if (searchForDefaultAbstractMethod)
-						return findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, candidates[0]);
-					unitScope.recordTypeReferences(candidates[0].thrownExceptions);
-					return candidates[0];
-				default :
-					break;
-			}
+		}
+		switch (visiblesCount) {
+			case 0 :
+				MethodBinding interfaceMethod =
+					findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, null);
+				if (interfaceMethod != null) return interfaceMethod;
+			MethodBinding candidate = candidates[0];
+			return new ProblemMethodBinding(candidates[0], candidates[0].selector, candidates[0].parameters, 
+					candidate.isStatic() && candidate.declaringClass.isInterface() ? ProblemReasons.NonStaticOrAlienTypeReceiver : ProblemReasons.NotVisible);
+			case 1 :
+				if (searchForDefaultAbstractMethod)
+					return findDefaultAbstractMethod(receiverType, selector, argumentTypes, invocationSite, classHierarchyStart, found, candidates[0]);
+				unitScope.recordTypeReferences(candidates[0].thrownExceptions);
+				return candidates[0];
+			default :
+				break;
 		}
 
 		if (complianceLevel <= ClassFileConstants.JDK1_3) {
@@ -1767,7 +1808,7 @@
 						MethodBinding otherCandidate = candidates[j];
 						if (otherCandidate.hasSubstitutedParameters()) {
 							if (otherCandidate == candidate
-									|| (candidate.declaringClass == otherCandidate.declaringClass && candidate.areParametersEqual(otherCandidate))) {
+									|| (TypeBinding.equalsEquals(candidate.declaringClass, otherCandidate.declaringClass) && candidate.areParametersEqual(otherCandidate))) {
 								return new ProblemMethodBinding(candidates[i], candidates[i].selector, candidates[i].parameters, ProblemReasons.Ambiguous);
 							}
 						}
@@ -1840,7 +1881,8 @@
 		return methodBinding;
 	}
 
-	protected void findMethodInSuperInterfaces(ReferenceBinding currentType, char[] selector, ObjectVector found, InvocationSite invocationSite) {
+	protected void findMethodInSuperInterfaces(ReferenceBinding receiverType, char[] selector, ObjectVector found, InvocationSite invocationSite) {
+		ReferenceBinding currentType = receiverType;
 		ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
 		if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
 			ReferenceBinding[] interfacesToVisit = itsInterfaces;
@@ -1852,20 +1894,24 @@
 				MethodBinding[] currentMethods = currentType.getMethods(selector);
 				if (currentMethods.length > 0) {
 					int foundSize = found.size;
-					if (foundSize > 0) {
-						// its possible to walk the same superinterface from different classes in the hierarchy
-						next : for (int c = 0, l = currentMethods.length; c < l; c++) {
-							MethodBinding current = currentMethods[c];
+					next : for (int c = 0, l = currentMethods.length; c < l; c++) {
+						MethodBinding current = currentMethods[c];
+//{ObjectTeams: during this search decapsulation trumps inaccessibility:
+						boolean decapsulationAllowed = invocationSite instanceof Expression && ((Expression)invocationSite).getBaseclassDecapsulation().isAllowed();
+					  if (!decapsulationAllowed && !current.declaringClass.isSynthInterface())
+// SH}
+						if (!current.canBeSeenBy(receiverType, invocationSite, this)) continue next;
+
+						if (foundSize > 0) {
+							// its possible to walk the same superinterface from different classes in the hierarchy
 							for (int f = 0; f < foundSize; f++)
 								if (current == found.elementAt(f)) continue next;
 //{ObjectTeams: some fake ifc methods are not relevant here:
 							if (MethodModel.isRoleMethodInheritedFromNonPublicRegular(current))
 								continue next;
 // SH}
-							found.add(current);
 						}
-					} else {
-						found.addAll(currentMethods);
+						found.add(current);
 					}
 				}
 				if ((itsInterfaces = currentType.superInterfaces()) != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
@@ -1875,7 +1921,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -1948,6 +1994,7 @@
 				MethodScope methodScope = null;
 				int depth = 0;
 				int foundDepth = 0;
+				boolean shouldTrackOuterLocals = false;
 				ReferenceBinding foundActualReceiverType = null;
 				done : while (true) { // done when a COMPILATION_UNIT_SCOPE is found
 					switch (scope.kind) {
@@ -1970,6 +2017,15 @@
 										ProblemReasons.InheritedNameHidesEnclosingName);
 								if (depth > 0)
 									invocationSite.setDepth(depth);
+								if (shouldTrackOuterLocals) {
+									if (invocationSite instanceof NameReference) {
+										NameReference nameReference = (NameReference) invocationSite;
+										nameReference.bits |= ASTNode.IsCapturedOuterLocal;
+									} else if (invocationSite instanceof AbstractVariableDeclaration) {
+										AbstractVariableDeclaration variableDeclaration = (AbstractVariableDeclaration) invocationSite;
+										variableDeclaration.bits |= ASTNode.ShadowsOuterLocal;
+									}
+								}
 								return variableBinding;
 							}
 							break;
@@ -2017,11 +2073,9 @@
 														fieldBinding.declaringClass,
 														name,
 														ProblemReasons.NonStaticReferenceInStaticContext);
-											} else if (methodScope != null) {
-												methodScope.resetEnclosingMethodStaticFlag();
 											}
 										}
-										if (receiverType == fieldBinding.declaringClass || compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
+										if (TypeBinding.equalsEquals(receiverType, fieldBinding.declaringClass) || compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4) {
 											// found a valid field in the 'immediate' scope (i.e. not inherited)
 											// OR in 1.4 mode (inherited shadows enclosing)
 											if (foundField == null) {
@@ -2035,8 +2089,8 @@
 											if (foundField.isValidBinding())
 												// if a valid field was found, complain when another is found in an 'immediate' enclosing type (that is, not inherited)
 												// but only if "valid field" was inherited in the first place.
-												if (foundField.declaringClass != fieldBinding.declaringClass &&
-												    foundField.declaringClass != foundActualReceiverType) // https://bugs.eclipse.org/bugs/show_bug.cgi?id=316956
+												if (TypeBinding.notEquals(foundField.declaringClass, fieldBinding.declaringClass) &&
+												    TypeBinding.notEquals(foundField.declaringClass, foundActualReceiverType)) // https://bugs.eclipse.org/bugs/show_bug.cgi?id=316956
 													// i.e. have we found the same field - do not trust field identity yet
 													return new ProblemFieldBinding(
 														foundField, // closest match
@@ -2057,6 +2111,7 @@
 							}
 							insideTypeAnnotation = false;
 							depth++;
+							shouldTrackOuterLocals = true;
 							insideStaticContext |= receiverType.isStatic();
 							// 1EX5I8Z - accessing outer fields within a constructor call is permitted
 							// in order to do so, we change the flag as we exit from the type, not the method
@@ -2067,6 +2122,8 @@
 						case COMPILATION_UNIT_SCOPE :
 							break done;
 					}
+					if (scope.isLambdaScope()) // Not in Kansas anymore ...
+						shouldTrackOuterLocals = true;
 					scope = scope.parent;
 				}
 
@@ -2415,10 +2472,10 @@
 												? ProblemReasons.NonStaticReferenceInConstructorInvocation
 												: ProblemReasons.NonStaticReferenceInStaticContext);
 									} else if (!methodBinding.isStatic() && methodScope != null) {
-										methodScope.resetDeclaringClassMethodStaticFlag(receiverType);
+										tagAsAccessingEnclosingInstanceStateOf(receiverType, false /* type variable access */);
 									}
 									if (inheritedHasPrecedence
-											|| receiverType == methodBinding.declaringClass
+											|| TypeBinding.equalsEquals(receiverType, methodBinding.declaringClass)
 											|| (receiverType.getMethods(selector)) != Binding.NO_METHODS) {
 										// found a valid method in the 'immediate' scope (i.e. not inherited)
 										// OR in 1.4 mode (inherited visible shadows enclosing)
@@ -2466,8 +2523,8 @@
 								}
 							} else { // found a valid method so check to see if this is a hiding case
 								if (methodBinding.problemId() == ProblemReasons.Ambiguous
-									|| (foundMethod.declaringClass != methodBinding.declaringClass
-										&& (receiverType == methodBinding.declaringClass || receiverType.getMethods(selector) != Binding.NO_METHODS)))
+									|| (TypeBinding.notEquals(foundMethod.declaringClass, methodBinding.declaringClass)
+										&& (TypeBinding.equalsEquals(receiverType, methodBinding.declaringClass) || receiverType.getMethods(selector) != Binding.NO_METHODS)))
 									// ambiguous case -> must qualify the method (javac generates an ambiguous error instead)
 									// otherwise if a method was found, complain when another is found in an 'immediate' enclosing type (that is, not inherited)
 									// NOTE: Unlike fields, a non visible method hides a visible method
@@ -2629,6 +2686,19 @@
 		return unitScope.environment.getResolvedType(TypeConstants.JAVA_LANG_ENUM, this);
 	}
 
+	public final ReferenceBinding getJavaLangInvokeLambdaMetafactory() {
+		CompilationUnitScope unitScope = compilationUnitScope();
+		unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY);
+		return unitScope.environment.getResolvedType(TypeConstants.JAVA_LANG_INVOKE_LAMBDAMETAFACTORY, this);
+	}
+
+	public final ReferenceBinding getJavaLangInvokeMethodHandlesLookup() {
+		CompilationUnitScope unitScope = compilationUnitScope();
+		unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_INVOKE_METHODHANDLES);
+		ReferenceBinding outerType = unitScope.environment.getResolvedType(TypeConstants.JAVA_LANG_INVOKE_METHODHANDLES, this);
+		return findDirectMemberType("Lookup".toCharArray(), outerType); //$NON-NLS-1$
+	}
+
 	public final ReferenceBinding getJavaLangIterable() {
 		CompilationUnitScope unitScope = compilationUnitScope();
 		unitScope.recordQualifiedReference(TypeConstants.JAVA_LANG_ITERABLE);
@@ -3066,7 +3136,7 @@
 					case BLOCK_SCOPE :
 						ReferenceBinding localType = ((BlockScope) scope).findLocalType(name); // looks in this scope only
 						if (localType != null) {
-							if (foundType != null && foundType != localType)
+							if (foundType != null && TypeBinding.notEquals(foundType, localType))
 								return new ProblemReferenceBinding(new char[][]{name}, foundType, ProblemReasons.InheritedNameHidesEnclosingName);
 							return localType;
 						}
@@ -3111,7 +3181,7 @@
 									return new ProblemReferenceBinding(new char[][]{name}, foundType, ProblemReasons.InheritedNameHidesEnclosingName);
 								}
 								if (memberType.isValidBinding()) {
-									if (sourceType == memberType.enclosingType() || inheritedHasPrecedence) {
+									if (TypeBinding.equalsEquals(sourceType, memberType.enclosingType()) || inheritedHasPrecedence) {
 										if (insideStaticContext && !memberType.isStatic() && sourceType.isGenericType())
 											return new ProblemReferenceBinding(new char[][]{name}, memberType, ProblemReasons.NonStaticReferenceInStaticContext);
 										// found a valid type in the 'immediate' scope (i.e. not inherited)
@@ -3119,7 +3189,7 @@
 										if (foundType == null || (inheritedHasPrecedence && foundType.problemId() == ProblemReasons.NotVisible))
 											return memberType;
 										// if a valid type was found, complain when another is found in an 'immediate' enclosing type (i.e. not inherited)
-										if (foundType.isValidBinding() && foundType != memberType)
+										if (foundType.isValidBinding() && TypeBinding.notEquals(foundType, memberType))
 											return new ProblemReferenceBinding(new char[][]{name}, foundType, ProblemReasons.InheritedNameHidesEnclosingName);
 									}
 								}
@@ -3132,14 +3202,12 @@
 						if (typeVariable != null) {
 							if (insideStaticContext) // do not consider this type modifiers: access is legite within same type
 								return new ProblemReferenceBinding(new char[][]{name}, typeVariable, ProblemReasons.NonStaticReferenceInStaticContext);
-							else if (methodScope != null)
-								methodScope.resetEnclosingMethodStaticFlag();
 							return typeVariable;
 						}
 						insideStaticContext |= sourceType.isStatic();
 						insideTypeAnnotation = false;
 						if (CharOperation.equals(sourceType.sourceName, name)) {
-							if (foundType != null && foundType != sourceType && foundType.problemId() != ProblemReasons.NotVisible)
+							if (foundType != null && TypeBinding.notEquals(foundType, sourceType) && foundType.problemId() != ProblemReasons.NotVisible)
 								return new ProblemReferenceBinding(new char[][]{name}, foundType, ProblemReasons.InheritedNameHidesEnclosingName);
 							return sourceType;
 						}
@@ -3236,7 +3304,7 @@
 						} else {
 							temp = findDirectMemberType(name, (ReferenceBinding) resolvedImport);
 						}
-						if (temp != type && temp != null) {
+						if (TypeBinding.notEquals(temp, type) && temp != null) {
 							if (temp.isValidBinding()) {
 								ImportReference importReference = someImport.reference;
 								if (importReference != null) {
@@ -3435,7 +3503,7 @@
 			next : for (int i = 0; i < oneParamsLength; i++) {
 				TypeBinding oneParam = applyErasure ? oneParams[i].erasure() : oneParams[i];
 				TypeBinding twoParam = applyErasure ? twoParams[i].erasure() : twoParams[i];
-				if (oneParam == twoParam || oneParam.isCompatibleWith(twoParam)) {
+				if (TypeBinding.equalsEquals(oneParam, twoParam) || oneParam.isCompatibleWith(twoParam)) {
 					if (two.declaringClass.isRawType()) continue next;
 
 					TypeBinding leafComponentType = two.original().parameters[i].leafComponentType();
@@ -3468,10 +3536,10 @@
 						TypeBinding oType = ((ArrayBinding) oneParam).elementsType();
 						TypeBinding eType = ((ArrayBinding) twoParam).elementsType();
 						if (CompilerOptions.tolerateIllegalAmbiguousVarargsInvocation && this.compilerOptions().complianceLevel < ClassFileConstants.JDK1_7) {
-							if (oneParam == eType || oneParam.isCompatibleWith(eType))
+							if (TypeBinding.equalsEquals(oneParam, eType) || oneParam.isCompatibleWith(eType))
 								return true; // special case to choose between 2 varargs methods when the last arg is Object[]
 						} else {
-							if (oType == eType || oType.isCompatibleWith(eType))
+							if (TypeBinding.equalsEquals(oType, eType) || oType.isCompatibleWith(eType))
 								return true; // special case to choose between 2 varargs methods when the last arg is Object[]
 						}
 					}
@@ -3490,7 +3558,7 @@
 			}
 			// check that each parameter before the vararg parameters are compatible (no autoboxing allowed here)
 			for (int i = (oneParamsLength > twoParamsLength ? twoParamsLength : oneParamsLength) - 2; i >= 0; i--)
-				if (oneParams[i] != twoParams[i] && !oneParams[i].isCompatibleWith(twoParams[i]))
+				if (TypeBinding.notEquals(oneParams[i], twoParams[i]) && !oneParams[i].isCompatibleWith(twoParams[i]))
 					return false;
 			if (parameterCompatibilityLevel(one, twoParams, true) == NOT_COMPATIBLE
 					&& parameterCompatibilityLevel(two, oneParams, true) == VARARGS_COMPATIBLE)
@@ -3506,7 +3574,7 @@
 
 		// check if autoboxed type is compatible
 		TypeBinding convertedType = environment.computeBoxingType(expressionType);
-		return convertedType == targetType || convertedType.isCompatibleWith(targetType);
+		return TypeBinding.equalsEquals(convertedType, targetType) || convertedType.isCompatibleWith(targetType);
 	}
 
 	/* Answer true if the scope is nested inside a given field declaration.
@@ -3558,7 +3626,7 @@
 		// test that the enclosingType is not part of the compilation unit
 		SourceTypeBinding[] topLevelTypes = ((CompilationUnitScope) unitScope).topLevelTypes;
 		for (int i = topLevelTypes.length; --i >= 0;)
-			if (topLevelTypes[i] == enclosingType.original())
+			if (TypeBinding.equalsEquals(topLevelTypes[i], enclosingType.original()))
 				return true;
 		return false;
 	}
@@ -3569,7 +3637,7 @@
 		Scope scope = this;
 		do {
 			if (scope instanceof ClassScope)
-				if (((ClassScope) scope).referenceContext.binding == type)
+				if (TypeBinding.equalsEquals(((ClassScope) scope).referenceContext.binding, type))
 					return true;
 			scope = scope.parent;
 		} while (scope != null);
@@ -3601,7 +3669,9 @@
 				MethodScope methodScope = methodScope();
 				if (!methodScope.isInsideInitializer()){
 					// check method modifiers to see if deprecated
-					MethodBinding context = ((AbstractMethodDeclaration)methodScope.referenceContext).binding;
+					ReferenceContext referenceContext = methodScope.referenceContext;
+					MethodBinding context = referenceContext instanceof AbstractMethodDeclaration ?
+							((AbstractMethodDeclaration)referenceContext).binding : ((LambdaExpression)referenceContext).binding;
 					if (context != null && context.isViewedAsDeprecated())
 						return true;
 				} else if (methodScope.initializedField != null && methodScope.initializedField.isViewedAsDeprecated()) {
@@ -3677,7 +3747,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -3696,7 +3766,7 @@
 				nextInterface : for (int a = 0; a < itsLength; a++) {
 					ReferenceBinding next = itsInterfaces[a];
 					for (int b = 0; b < nextPosition; b++)
-						if (next == interfacesToVisit[b]) continue nextInterface;
+						if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 					interfacesToVisit[nextPosition++] = next;
 				}
 			}
@@ -3750,7 +3820,7 @@
 	// JLS 15.12.2
 	private TypeBinding leastContainingTypeArgument(TypeBinding u, TypeBinding v, ReferenceBinding genericType, int rank, ArrayList lubStack) {
 		if (u == null) return v;
-		if (u == v) return u;
+		if (TypeBinding.equalsEquals(u, v)) return u;
 		if (v.isWildcard()) {
 			WildcardBinding wildV = (WildcardBinding) v;
 			if (u.isWildcard()) {
@@ -3764,11 +3834,11 @@
 								TypeBinding lub = lowerUpperBound(new TypeBinding[]{wildU.bound,wildV.bound}, lubStack);
 								if (lub == null) return null;
 								// int is returned to denote cycle detected in lub computation - stop recursion by answering unbound wildcard
-								if (lub == TypeBinding.INT) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
+								if (TypeBinding.equalsEquals(lub, TypeBinding.INT)) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
 								return environment().createWildcard(genericType, rank, lub, null /*no extra bound*/, Wildcard.EXTENDS);
 							// ? extends U, ? SUPER V
 							case Wildcard.SUPER :
-								if (wildU.bound == wildV.bound) return wildU.bound;
+								if (TypeBinding.equalsEquals(wildU.bound, wildV.bound)) return wildU.bound;
 								return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
 						}
 						break;
@@ -3788,7 +3858,7 @@
 						TypeBinding lub = lowerUpperBound(new TypeBinding[]{u,wildV.bound}, lubStack);
 						if (lub == null) return null;
 						// int is returned to denote cycle detected in lub computation - stop recursion by answering unbound wildcard
-						if (lub == TypeBinding.INT) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
+						if (TypeBinding.equalsEquals(lub, TypeBinding.INT)) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
 						return environment().createWildcard(genericType, rank, lub, null /*no extra bound*/, Wildcard.EXTENDS);
 					// U, ? super V
 					case Wildcard.SUPER :
@@ -3806,7 +3876,7 @@
 					TypeBinding lub = lowerUpperBound(new TypeBinding[]{wildU.bound, v}, lubStack);
 					if (lub == null) return null;
 					// int is returned to denote cycle detected in lub computation - stop recursion by answering unbound wildcard
-					if (lub == TypeBinding.INT) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
+					if (TypeBinding.equalsEquals(lub, TypeBinding.INT)) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
 					return environment().createWildcard(genericType, rank, lub, null /*no extra bound*/, Wildcard.EXTENDS);
 				// U, ? super V
 				case Wildcard.SUPER :
@@ -3819,7 +3889,7 @@
 		TypeBinding lub = lowerUpperBound(new TypeBinding[]{u,v}, lubStack);
 		if (lub == null) return null;
 		// int is returned to denote cycle detected in lub computation - stop recursion by answering unbound wildcard
-		if (lub == TypeBinding.INT) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
+		if (TypeBinding.equalsEquals(lub, TypeBinding.INT)) return environment().createWildcard(genericType, rank, null, null /*no extra bound*/, Wildcard.UNBOUND);
 		return environment().createWildcard(genericType, rank, lub, null /*no extra bound*/, Wildcard.EXTENDS);
 	}
 
@@ -3857,7 +3927,7 @@
 				for (int k = 0; k < lubTypeLength; k++) {
 					TypeBinding lubType = lubTypes[k];
 					if (lubType == null) continue; // ignore
-					if (lubType == type || lubType.isEquivalentTo(type)) continue nextTypeCheck; // type found, jump to next one
+					if (TypeBinding.equalsEquals(lubType, type) || lubType.isEquivalentTo(type)) continue nextTypeCheck; // type found, jump to next one
 				}
 				continue nextLubCheck; // type not found in current lubTypes
 			}
@@ -3892,6 +3962,7 @@
 			case 0 : return TypeBinding.VOID;
 			case 1 : return mecs[0];
 			case 2 :
+				// TODO(Stephan) : if null annotations differ, we need to create an intersection type and return.
 				if ((commonDim == 0 ? mecs[1].id : mecs[1].leafComponentType().id) == TypeIds.T_JavaLangObject) return mecs[0];
 				if ((commonDim == 0 ? mecs[0].id : mecs[0].leafComponentType().id) == TypeIds.T_JavaLangObject) return mecs[1];
 		}
@@ -3903,7 +3974,7 @@
 				otherBounds[rank++] = mec;
 			}
 		}
-		TypeBinding intersectionType = environment().createWildcard(null, 0, firstBound, otherBounds, Wildcard.EXTENDS);
+		TypeBinding intersectionType = environment().createWildcard(null, 0, firstBound, otherBounds, Wildcard.EXTENDS);  // pass common null annotations by synthesized annotation bindings.
 		return commonDim == 0 ? intersectionType : environment().createArrayType(intersectionType, commonDim);
 	}
 
@@ -3916,6 +3987,16 @@
 		} while (scope != null);
 		return null;
 	}
+	
+	public final MethodScope namedMethodScope() {
+		Scope scope = this;
+		do {
+			if (scope instanceof MethodScope && !scope.isLambdaScope())
+				return (MethodScope) scope;
+			scope = scope.parent;
+		} while (scope != null);
+		return null;
+	}
 
 	/**
 	 * Returns the most specific set of types compatible with all given types.
@@ -3960,7 +4041,7 @@
 				firstErasure = firstType;
 				break;
 		}
-		if (firstErasure != firstType) {
+		if (TypeBinding.notEquals(firstErasure, firstType)) {
 			allInvocations.put(firstErasure, firstType);
 		}
 		typesToVisit.add(firstType);
@@ -4020,7 +4101,7 @@
 						typesToVisit.add(superType);
 						max++;
 						TypeBinding superTypeErasure = (firstBound.isTypeVariable() || firstBound.isWildcard() /*&& !itsInterface.isCapture()*/) ? superType : superType.erasure();
-						if (superTypeErasure != superType) {
+						if (TypeBinding.notEquals(superTypeErasure, superType)) {
 							allInvocations.put(superTypeErasure, superType);
 						}
 					}
@@ -4037,7 +4118,7 @@
 						typesToVisit.add(superType);
 						max++;
 						TypeBinding superTypeErasure = (itsInterface.isTypeVariable() || itsInterface.isWildcard() /*&& !itsInterface.isCapture()*/) ? superType : superType.erasure();
-						if (superTypeErasure != superType) {
+						if (TypeBinding.notEquals(superTypeErasure, superType)) {
 							allInvocations.put(superTypeErasure, superType);
 						}
 					}
@@ -4050,7 +4131,7 @@
 					typesToVisit.add(superType);
 					max++;
 					TypeBinding superTypeErasure = (itsSuperclass.isTypeVariable() || itsSuperclass.isWildcard() /*&& !itsSuperclass.isCapture()*/) ? superType : superType.erasure();
-					if (superTypeErasure != superType) {
+					if (TypeBinding.notEquals(superTypeErasure, superType)) {
 						allInvocations.put(superTypeErasure, superType);
 					}
 				}
@@ -4072,7 +4153,7 @@
 			if (otherType.isArrayType()) {
 				nextSuperType: for (int j = 0; j < superLength; j++) {
 					TypeBinding erasedSuperType = erasedSuperTypes[j];
-					if (erasedSuperType == null || erasedSuperType == otherType) continue nextSuperType;
+					if (erasedSuperType == null || TypeBinding.equalsEquals(erasedSuperType, otherType)) continue nextSuperType;
 					TypeBinding match;
 					if ((match = otherType.findSuperTypeOriginatingFrom(erasedSuperType)) == null) {
 						erasedSuperTypes[j] = null;
@@ -4084,7 +4165,7 @@
 					if (invocationData == null) {
 						allInvocations.put(erasedSuperType, match); // no array for singleton
 					} else if (invocationData instanceof TypeBinding) {
-						if (match != invocationData) {
+						if (TypeBinding.notEquals(match, (TypeBinding) invocationData)) {
 							// using an array to record invocations in order (188103)
 							TypeBinding[] someInvocations = { (TypeBinding) invocationData, match, };
 							allInvocations.put(erasedSuperType, someInvocations);
@@ -4094,7 +4175,7 @@
 						checkExisting: {
 							int invocLength = someInvocations.length;
 							for (int k = 0; k < invocLength; k++) {
-								if (someInvocations[k] == match) break checkExisting;
+								if (TypeBinding.equalsEquals(someInvocations[k], match)) break checkExisting;
 							}
 							System.arraycopy(someInvocations, 0, someInvocations = new TypeBinding[invocLength+1], 0, invocLength);
 							allInvocations.put(erasedSuperType, someInvocations);
@@ -4108,7 +4189,7 @@
 				TypeBinding erasedSuperType = erasedSuperTypes[j];
 				if (erasedSuperType == null) continue nextSuperType;
 				TypeBinding match;
-				if (erasedSuperType == otherType || erasedSuperType.id == TypeIds.T_JavaLangObject && otherType.isInterface()) {
+				if (TypeBinding.equalsEquals(erasedSuperType, otherType) || erasedSuperType.id == TypeIds.T_JavaLangObject && otherType.isInterface()) {
 					match = erasedSuperType;
 				} else {
 					if (erasedSuperType.isArrayType()) {
@@ -4127,7 +4208,7 @@
 				if (invocationData == null) {
 					allInvocations.put(erasedSuperType, match); // no array for singleton
 				} else if (invocationData instanceof TypeBinding) {
-					if (match != invocationData) {
+					if (TypeBinding.notEquals(match, (TypeBinding) invocationData)) {
 						// using an array to record invocations in order (188103)
 						TypeBinding[] someInvocations = { (TypeBinding) invocationData, match, };
 						allInvocations.put(erasedSuperType, someInvocations);
@@ -4137,7 +4218,7 @@
 					checkExisting: {
 						int invocLength = someInvocations.length;
 						for (int k = 0; k < invocLength; k++) {
-							if (someInvocations[k] == match) break checkExisting;
+							if (TypeBinding.equalsEquals(someInvocations[k], match)) break checkExisting;
 						}
 						System.arraycopy(someInvocations, 0, someInvocations = new TypeBinding[invocLength+1], 0, invocLength);
 						allInvocations.put(erasedSuperType, someInvocations);
@@ -4191,7 +4272,7 @@
 		MethodBinding previous = null;
 		nextVisible : for (int i = 0; i < visibleSize; i++) {
 			MethodBinding method = visible[i];
-			if (previous != null && method.declaringClass != previous.declaringClass)
+			if (previous != null && TypeBinding.notEquals(method.declaringClass, previous.declaringClass))
 				break; // cannot answer a method farther up the hierarchy than the first method found
 
 			if (!method.isStatic()) previous = method; // no ambiguity for static methods
@@ -4280,6 +4361,7 @@
 			public int sourceStart() { return invocationSite.sourceStart(); }
 			public int sourceEnd() { return invocationSite.sourceStart(); }
 			public TypeBinding expectedType() { return invocationSite.expectedType(); }
+			public boolean receiverIsImplicitThis() { return invocationSite.receiverIsImplicitThis();}
 		};
 		MethodBinding[] moreSpecific = new MethodBinding[visibleSize];
 		int count = 0;
@@ -4359,7 +4441,7 @@
 					MethodBinding next = moreSpecific[j];
 					if (next == null || i == j) continue;
 					MethodBinding original2 = next.original();
-					if (original.declaringClass == original2.declaringClass)
+					if (TypeBinding.equalsEquals(original.declaringClass, original2.declaringClass))
 						break nextSpecific; // duplicates thru substitution
 
 					if (!original.isAbstract()) {
@@ -4375,7 +4457,7 @@
 						}
 					} else if (receiverType != null) { // should not be null if original isAbstract, but be safe
 						TypeBinding superType = receiverType.findSuperTypeOriginatingFrom(original.declaringClass.erasure());
-						if (original.declaringClass == superType || !(superType instanceof ReferenceBinding)) {
+						if (TypeBinding.equalsEquals(original.declaringClass, superType) || !(superType instanceof ReferenceBinding)) {
 							// keep original
 						} else {
 							// must find inherited method with the same substituted variables
@@ -4388,7 +4470,7 @@
 							}
 						}
 						superType = receiverType.findSuperTypeOriginatingFrom(original2.declaringClass.erasure());
-						if (original2.declaringClass == superType || !(superType instanceof ReferenceBinding)) {
+						if (TypeBinding.equalsEquals(original2.declaringClass, superType) || !(superType instanceof ReferenceBinding)) {
 							// keep original2
 						} else {
 							// must find inherited method with the same substituted variables
@@ -4404,7 +4486,7 @@
 							original2 = original.computeSubstitutedMethod(original2, environment());
 						if (original2 == null || !original.areParameterErasuresEqual(original2))
 							continue nextSpecific; // current does not override next
-						if (original.returnType != original2.returnType) {
+						if (TypeBinding.notEquals(original.returnType, original2.returnType)) {
 							if (next.original().typeVariables != Binding.NO_TYPE_VARIABLES) {
 								if (original.returnType.erasure().findSuperTypeOriginatingFrom(original2.returnType.erasure()) == null)
 									continue nextSpecific;
@@ -4476,7 +4558,7 @@
 			ReferenceBinding currentException = allExceptions[i];
 			for (int j = 0; j < length; j++) {
 				if (i == j) continue;
-				if (currentException == allExceptions[j]) {
+				if (TypeBinding.equalsEquals(currentException, allExceptions[j])) {
 					// duplicate same exception
 					if (i < j) 
 						break; // take only the first occurrence
@@ -4539,7 +4621,7 @@
 				TypeBinding param = parameters[i];
 				TypeBinding arg = arguments[i];
 				//https://bugs.eclipse.org/bugs/show_bug.cgi?id=330445
-				if (arg != param && !arg.isCompatibleWith(param.erasure()))
+				if (TypeBinding.notEquals(arg, param) && !arg.isCompatibleWith(param.erasure(), this))
 					return NOT_COMPATIBLE;
 			}
 //{ObjectTeams: store successful parameters:
@@ -4560,7 +4642,7 @@
 			if (paramLength == argLength) { // accept X or X[] but not X[][]
 				TypeBinding param = parameters[lastIndex]; // is an ArrayBinding by definition
 				TypeBinding arg = arguments[lastIndex];
-				if (param != arg) {
+				if (TypeBinding.notEquals(param, arg)) {
 					level = parameterCompatibilityLevel(arg, param, env, tiebreakingVarargsMethods);
 					if (level == NOT_COMPATIBLE) {
 						// expect X[], is it called with X
@@ -4578,7 +4660,7 @@
 					TypeBinding param = ((ArrayBinding) parameters[lastIndex]).elementsType();
 					for (int i = lastIndex; i < argLength; i++) {
 						TypeBinding arg = (tiebreakingVarargsMethods && (i == (argLength - 1))) ? ((ArrayBinding)arguments[i]).elementsType() : arguments[i];
-						if (param != arg && parameterCompatibilityLevel(arg, param, env, tiebreakingVarargsMethods) == NOT_COMPATIBLE)
+						if (TypeBinding.notEquals(param, arg) && parameterCompatibilityLevel(arg, param, env, tiebreakingVarargsMethods) == NOT_COMPATIBLE)
 							return NOT_COMPATIBLE;
 					}
 				}  else if (lastIndex != argLength) { // can call foo(int i, X ... x) with foo(1) but NOT foo();
@@ -4593,7 +4675,7 @@
 		for (int i = 0; i < lastIndex; i++) {
 			TypeBinding param = parameters[i];
 			TypeBinding arg = (tiebreakingVarargsMethods && (i == (argLength - 1))) ? ((ArrayBinding)arguments[i]).elementsType() : arguments[i];
-			if (arg != param) {
+			if (TypeBinding.notEquals(arg,param)) {
 				int newLevel = parameterCompatibilityLevel(arg, param, env, tiebreakingVarargsMethods);
 				if (newLevel == NOT_COMPATIBLE)
 					return NOT_COMPATIBLE;
@@ -4607,6 +4689,18 @@
 		return level;
 	}
 
+	public int parameterCompatibilityLevel(TypeBinding arg, TypeBinding param) {
+		if (arg.isCompatibleWith(param))
+			return COMPATIBLE;
+		
+		if (arg.isBaseType() != param.isBaseType()) {
+			TypeBinding convertedType = environment().computeBoxingType(arg);
+			if (TypeBinding.equalsEquals(convertedType, param) || convertedType.isCompatibleWith(param))
+				return AUTOBOX_COMPATIBLE;
+		}
+		return NOT_COMPATIBLE;
+	}
+	
 	private int parameterCompatibilityLevel(TypeBinding arg, TypeBinding param, LookupEnvironment env, boolean tieBreakingVarargsMethods) {
 		// only called if env.options.sourceLevel >= ClassFileConstants.JDK1_5
 		if (arg.isCompatibleWith(param, this))
@@ -4622,7 +4716,7 @@
 		}
 		if (arg.isBaseType() != param.isBaseType()) {
 			TypeBinding convertedType = env.computeBoxingType(arg);
-			if (convertedType == param || convertedType.isCompatibleWith(param))
+			if (TypeBinding.equalsEquals(convertedType, param) || convertedType.isCompatibleWith(param))
 				return AUTOBOX_COMPATIBLE;
 		}
 		return NOT_COMPATIBLE;
@@ -4812,7 +4906,7 @@
 					}
 					public TypeBinding substitute(TypeVariableBinding typeVariable) {
 						TypeBinding retVal = (TypeBinding) map.get(typeVariable);
-						return retVal != null ? retVal : typeVariable;
+						return typeVariable.hasTypeAnnotations() ? environment().createAnnotatedType(retVal, typeVariable.getTypeAnnotations()) : retVal;
 					}
 //{ObjectTeams:
 					public ITeamAnchor substituteAnchor(ITeamAnchor anchor, int rank) {
@@ -4831,25 +4925,27 @@
 					TypeBinding substitutedSuperclass = Scope.substitute(substitution, originalVariable.superclass);
 					ReferenceBinding[] substitutedInterfaces = Scope.substitute(substitution, originalVariable.superInterfaces);
 					if (originalVariable.firstBound != null) {
-						substitutedVariable.firstBound = originalVariable.firstBound == originalVariable.superclass
+						TypeBinding firstBound;
+						firstBound = TypeBinding.equalsEquals(originalVariable.firstBound, originalVariable.superclass)
 								? substitutedSuperclass // could be array type or interface
 										: substitutedInterfaces[0];
+						substitutedVariable.setFirstBound(firstBound);
 					}
 					switch (substitutedSuperclass.kind()) {
 						case Binding.ARRAY_TYPE :
-							substitutedVariable.superclass = environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
-							substitutedVariable.superInterfaces = substitutedInterfaces;
+							substitutedVariable.setSuperClass(environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null));
+							substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 							break;
 						default:
 							if (substitutedSuperclass.isInterface()) {
-								substitutedVariable.superclass = environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null);
+								substitutedVariable.setSuperClass(environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null));
 								int interfaceCount = substitutedInterfaces.length;
 								System.arraycopy(substitutedInterfaces, 0, substitutedInterfaces = new ReferenceBinding[interfaceCount+1], 1, interfaceCount);
 								substitutedInterfaces[0] = (ReferenceBinding) substitutedSuperclass;
-								substitutedVariable.superInterfaces = substitutedInterfaces;
+								substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 							} else {
-								substitutedVariable.superclass = (ReferenceBinding) substitutedSuperclass; // typeVar was extending other typeVar which got substituted with interface
-								substitutedVariable.superInterfaces = substitutedInterfaces;
+								substitutedVariable.setSuperClass((ReferenceBinding) substitutedSuperclass); // typeVar was extending other typeVar which got substituted with interface
+								substitutedVariable.setSuperInterfaces(substitutedInterfaces);
 							}
 					}
 				}
@@ -4898,16 +4994,72 @@
 		return visibleIndex == 1 ? visible[0] : mostSpecificMethodBinding(visible, visibleIndex, argumentTypes, allocationSite, allocationType);
 	}
 
-	public void validateNullAnnotation(long tagBits, TypeReference typeRef, Annotation[] annotations) {
-		long nullAnnotationTagBit = tagBits & (TagBits.AnnotationNonNull|TagBits.AnnotationNullable);
+	public boolean validateNullAnnotation(long tagBits, TypeReference typeRef, Annotation[] annotations) {
+		long nullAnnotationTagBit = tagBits & (TagBits.AnnotationNullMASK);
 		if (nullAnnotationTagBit != 0) {
 			TypeBinding type = typeRef.resolvedType;
 			if (type != null && type.isBaseType()) {
-				char[][] annotationName = (nullAnnotationTagBit == TagBits.AnnotationNonNull)
-						? environment().getNonNullAnnotationName()
-						: environment().getNullableAnnotationName();
-				problemReporter().illegalAnnotationForBaseType(typeRef, annotations,
-						annotationName[annotationName.length-1], nullAnnotationTagBit);
+				// type annotations are *always* illegal for 'void' (already reported)
+				if (!(typeRef.resolvedType.id == TypeIds.T_void && compilerOptions().sourceLevel >= ClassFileConstants.JDK1_8))
+					problemReporter().illegalAnnotationForBaseType(typeRef, annotations, nullAnnotationTagBit);
+				return false;
+			}
+			if (annotations != null && typeRef instanceof QualifiedTypeReference) {
+				// illegal @NonNull Outer.Inner:
+				for (int i = 0; i < annotations.length; i++) {
+					int id = annotations[i].resolvedType.id;
+					if (id == TypeIds.T_ConfiguredAnnotationNonNull || id == TypeIds.T_ConfiguredAnnotationNullable) {
+						problemReporter().nullAnnotationUnsupportedLocation(annotations[i]);
+						return false;
+					}
+				}
+			}
+		}
+		return true;
+	}
+	public static BlockScope typeAnnotationsResolutionScope(Scope scope) {
+		BlockScope resolutionScope = null;
+		switch(scope.kind) {
+			case Scope.CLASS_SCOPE:
+				resolutionScope = ((ClassScope) scope).referenceContext.staticInitializerScope;
+				break;
+			case Scope.BLOCK_SCOPE :
+			case Scope.METHOD_SCOPE :
+				resolutionScope = (BlockScope) scope;
+				break;
+		}
+		return resolutionScope;
+	}
+	// Some entity in the receiver scope is referencing instance data of enclosing type. Tag all intervening methods as instance methods. 
+	public void tagAsAccessingEnclosingInstanceStateOf(ReferenceBinding enclosingType, boolean typeVariableAccess) {
+		MethodScope methodScope = methodScope();
+		if (methodScope != null && methodScope.referenceContext instanceof TypeDeclaration) {
+			if (!methodScope.enclosingReceiverType().isCompatibleWith(enclosingType)) { // unless invoking a method of the local type ...
+				// anonymous type, find enclosing method
+				methodScope = methodScope.enclosingMethodScope();
+			}
+		}
+		while (methodScope != null) {
+			while (methodScope != null && methodScope.referenceContext instanceof LambdaExpression) {
+				LambdaExpression lambda = (LambdaExpression) methodScope.referenceContext;
+				if (!typeVariableAccess)
+					lambda.shouldCaptureInstance = true;  // lambda can still be static, only when `this' is touched (implicitly or otherwise) it cannot be.
+				methodScope = methodScope.enclosingMethodScope();
+			}
+			if (methodScope != null) {
+				if (methodScope.referenceContext instanceof MethodDeclaration) {
+					MethodDeclaration methodDeclaration = (MethodDeclaration) methodScope.referenceContext;
+					methodDeclaration.bits &= ~ASTNode.CanBeStatic;
+				}
+				ClassScope enclosingClassScope = methodScope.enclosingClassScope();
+				if (enclosingClassScope != null) {
+					TypeDeclaration type = enclosingClassScope.referenceContext;
+					if (type != null && type.binding != null && enclosingType != null && !type.binding.isCompatibleWith(enclosingType.original())) {
+						methodScope = enclosingClassScope.enclosingMethodScope();
+						continue;
+					}
+				}
+				break;
 			}
 		}
 	}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index f6499ed..d09e6c4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -23,7 +27,16 @@
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 380896 - [compiler][null] Enum constants not recognised as being NonNull.
+ *								bug 391376 - [1.8] check interaction of default methods with bridge methods and generics
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 416172 - [1.8][compiler][null] null type annotation not evaluated on method return type
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *								Bug 418235 - [compiler][null] Unreported nullness error when using generic
+ *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
+ *								Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *     Till Brychcy - Contributions for
  *     							bug 415269 - NonNullByDefault is not always inherited to nested classes
  *******************************************************************************/
@@ -43,6 +56,7 @@
 import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.Argument;
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
 import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
@@ -107,17 +121,19 @@
  */
 @SuppressWarnings("unchecked")
 public class SourceTypeBinding extends ReferenceBinding {
-	public ReferenceBinding superclass;
-	public ReferenceBinding[] superInterfaces;
-	private FieldBinding[] fields;
-	private MethodBinding[] methods;
-	public ReferenceBinding[] memberTypes;
+	public ReferenceBinding superclass;                    // MUST NOT be modified directly, use setter !
+	public ReferenceBinding[] superInterfaces;             // MUST NOT be modified directly, use setter !
+	private FieldBinding[] fields;                         // MUST NOT be modified directly, use setter !
+	private MethodBinding[] methods;                       // MUST NOT be modified directly, use setter !
+	public ReferenceBinding[] memberTypes;                 // MUST NOT be modified directly, use setter !
 //{ObjectTeams: initialization added
 	// readableName() will otherwise not work before Scope.buildTypeVariables()!
-    public TypeVariableBinding[] typeVariables = Binding.NO_TYPE_VARIABLES;
+    public TypeVariableBinding[] typeVariables = Binding.NO_TYPE_VARIABLES; // MUST NOT be modified directly, use setter !
 // SH}
 
 	public ClassScope scope;
+	protected SourceTypeBinding prototype;
+	LookupEnvironment environment;
 
 	// Synthetics are separated into 4 categories: methods, super methods, fields, class literals and bridge methods
 	// if a new category is added, also increment MAX_SYNTHETICS
@@ -142,15 +158,17 @@
     	MultipleCasts.compoundName = new char[][] { "multiple".toCharArray(), "casts".toCharArray(), "required".toCharArray() }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
     }
 
-	protected SourceTypeBinding() { super(null); } // default ctor for Singleton membertypes NoBaseclass, ProblemBaseclass
+	protected SourceTypeBinding() { super(); this.prototype = this; } // default ctor for Singleton membertypes NoBaseclass, ProblemBaseclass
 
 //Markus Witte}
-
+	
 	private SimpleLookupTable storedAnnotations = null; // keys are this ReferenceBinding & its fields and methods, value is an AnnotationHolder
 
 	private int defaultNullness;
 	private int nullnessDefaultInitialized = 0; // 0: nothing; 1: type; 2: package
-
+	private int lambdaOrdinal = 0;
+	private ReferenceBinding containerAnnotationType = null;
+	
 public SourceTypeBinding(char[][] compoundName, PackageBinding fPackage, ClassScope scope) {
 //{ObjectTeams:	// share model from TypeDeclaration:
 	super(scope.referenceContext.getModel());
@@ -167,6 +185,7 @@
 // SH}
 	this.sourceName = scope.referenceContext.name;
 	this.scope = scope;
+	this.environment = scope.environment();
 //{ObjectTeams: ROFI create a package binding for our role files (if any):
 	maybeSetTeamPackage(compoundName, fPackage, scope.environment());
 // SH}
@@ -174,11 +193,49 @@
 	// expect the fields & methods to be initialized correctly later
 	this.fields = Binding.UNINITIALIZED_FIELDS;
 	this.methods = Binding.UNINITIALIZED_METHODS;
-
+	this.prototype = this;
 	computeId();
+	if (this.isAnnotationType()) { // for forward references, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=419331
+		this.superInterfaces = new ReferenceBinding [] { scope.getJavaLangAnnotationAnnotation() };
+	}
+}
+
+public SourceTypeBinding(SourceTypeBinding prototype) {
+	super(prototype);
+	
+	this.prototype = prototype.prototype;
+	this.prototype.tagBits |= TagBits.HasAnnotatedVariants;
+	this.tagBits &= ~TagBits.HasAnnotatedVariants;
+    
+	this.superclass = prototype.superclass;
+	this.superInterfaces = prototype.superInterfaces;
+	this.fields = prototype.fields;
+	this.methods = prototype.methods;
+	this.memberTypes = prototype.memberTypes;
+	this.typeVariables = prototype.typeVariables;
+	this.environment = prototype.environment;
+
+	// this.scope = prototype.scope;  // Will defeat CompilationUnitDeclaration.cleanUp(TypeDeclaration) && CompilationUnitDeclaration.cleanUp(), so not copied, not an issue for JSR 308.
+
+	this.synthetics = prototype.synthetics;
+	this.genericReferenceTypeSignature = prototype.genericReferenceTypeSignature;
+	this.storedAnnotations = prototype.storedAnnotations;
+	this.defaultNullness = prototype.defaultNullness;
+	this.nullnessDefaultInitialized= prototype.nullnessDefaultInitialized;
+	this.lambdaOrdinal = prototype.lambdaOrdinal;
+	this.containerAnnotationType = prototype.containerAnnotationType;
+	this.tagBits |= TagBits.HasUnresolvedMemberTypes; // see memberTypes()
+	
+//{ObjectTeams: team?
+	if (prototype._teamModel != null)
+		setTeamModel(new TeamModel(this));
+// SH}
 }
 
 private void addDefaultAbstractMethods() {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if ((this.tagBits & TagBits.KnowsDefaultAbstractMethods) != 0) return;
 
 	this.tagBits |= TagBits.KnowsDefaultAbstractMethods;
@@ -230,7 +287,7 @@
 						nextInterface : for (int a = 0; a < itsLength; a++) {
 							ReferenceBinding next = itsInterfaces[a];
 							for (int b = 0; b < nextPosition; b++)
-								if (next == interfacesToVisit[b]) continue nextInterface;
+								if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 							interfacesToVisit[nextPosition++] = next;
 						}
 					}
@@ -238,7 +295,7 @@
 			}
 			if (defaultAbstractsCount > 0) {
 				int length = this.methods.length;
-				System.arraycopy(this.methods, 0, this.methods = new MethodBinding[length + defaultAbstractsCount], 0, length);
+				System.arraycopy(this.methods, 0, setMethods(new MethodBinding[length + defaultAbstractsCount]), 0, length);
 				System.arraycopy(defaultAbstracts, 0, this.methods, length, defaultAbstractsCount);
 				// re-sort methods
 				length = length + defaultAbstractsCount;
@@ -253,6 +310,9 @@
 *	Answer the new field or the existing field if one already existed.
 */
 public FieldBinding addSyntheticFieldForInnerclass(LocalVariableBinding actualOuterLocalVariable) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -299,6 +359,9 @@
 *	Answer the new field or the existing field if one already existed.
 */
 public FieldBinding addSyntheticFieldForInnerclass(ReferenceBinding enclosingType) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -416,6 +479,9 @@
 *	Answer the new field or the existing field if one already existed.
 */
 public FieldBinding addSyntheticFieldForClassLiteral(TypeBinding targetType, BlockScope blockScope) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.CLASS_LITERAL_EMUL] == null)
@@ -455,6 +521,9 @@
 *	Answer the new field or the existing field if one already existed.
 */
 public FieldBinding addSyntheticFieldForAssert(BlockScope blockScope) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -499,6 +568,8 @@
 *	Answer the new field or the existing field if one already existed.
 */
 public FieldBinding addSyntheticFieldForEnumValues() {
+
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -575,6 +646,7 @@
  :giro*/
 public SyntheticMethodBinding addSyntheticMethod(FieldBinding targetField, boolean isReadAccess, boolean isSuperAccess, boolean externalizedReceiver) {
 // SH}
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
@@ -634,6 +706,7 @@
  * char[] constants from TypeConstants must be used: TypeConstants.VALUES/VALUEOF
 */
 public SyntheticMethodBinding addSyntheticEnumMethod(char[] selector) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
@@ -657,6 +730,7 @@
  * Add a synthetic field to handle the cache of the switch translation table for the corresponding enum type
  */
 public SyntheticFieldBinding addSyntheticFieldForSwitchEnum(char[] fieldName, String key) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.FIELD_EMUL] == null)
@@ -701,6 +775,7 @@
  * char[] constants from TypeConstants must be used: TypeConstants.VALUES/VALUEOF
 */
 public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
@@ -728,6 +803,7 @@
 	return accessMethod;
 }
 public SyntheticMethodBinding addSyntheticMethodForEnumInitialization(int begin, int end) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
@@ -739,6 +815,25 @@
 	accessors[0] = accessMethod;
 	return accessMethod;
 }
+public SyntheticMethodBinding addSyntheticMethod(LambdaExpression lambda) {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (this.synthetics == null)
+		this.synthetics = new HashMap[MAX_SYNTHETICS];
+	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
+		this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
+	
+	SyntheticMethodBinding lambdaMethod = null;
+	SyntheticMethodBinding[] lambdaMethods = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(lambda);
+	if (lambdaMethods == null) {
+		lambdaMethod = new SyntheticMethodBinding(lambda, CharOperation.concat(TypeConstants.ANONYMOUS_METHOD, Integer.toString(this.lambdaOrdinal++).toCharArray()), this);
+		this.synthetics[SourceTypeBinding.METHOD_EMUL].put(lambda, lambdaMethods = new SyntheticMethodBinding[1]);
+		lambdaMethods[0] = lambdaMethod;
+	} else {
+		lambdaMethod = lambdaMethods[0];
+	}
+	return lambdaMethod;
+}
+
 /* Add a new synthetic access method for access to <targetMethod>.
  * Must distinguish access method used for super access from others (need to use invokespecial bytecode)
 	Answer the new method or the existing method if one already existed.
@@ -752,6 +847,7 @@
 								isSuperAccess);
 	}
 // SH}
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
@@ -783,6 +879,7 @@
 //{ObjectTeams: add OT-specific synthetic bridges:
 // (mostly empty) basecall surrogate
 public SyntheticMethodBinding addSyntheticBaseCallSurrogate(MethodBinding callinMethod) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
@@ -804,6 +901,7 @@
 }
 // bridges towards a private role method
 public SyntheticMethodBinding addSyntheticRoleMethodBridge(SourceTypeBinding declaringRole, ReferenceBinding originalRole, MethodBinding targetMethod, int bridgeKind) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null)
 		this.synthetics = new HashMap[MAX_SYNTHETICS];
 	if (this.synthetics[SourceTypeBinding.ROLE_BRIDGE] == null)
@@ -833,18 +931,54 @@
 	return null;
 }
 // SH}
+public SyntheticMethodBinding addSyntheticArrayMethod(ArrayBinding arrayType, int purpose) {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (this.synthetics == null)
+		this.synthetics = new HashMap[MAX_SYNTHETICS];
+	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
+		this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
+
+	SyntheticMethodBinding arrayMethod = null;
+	SyntheticMethodBinding[] arrayMethods = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(arrayType);
+	if (arrayMethods == null) {
+		char [] selector = CharOperation.concat(TypeConstants.ANONYMOUS_METHOD, Integer.toString(this.lambdaOrdinal++).toCharArray());
+		arrayMethod = new SyntheticMethodBinding(purpose, arrayType, selector, this);
+		this.synthetics[SourceTypeBinding.METHOD_EMUL].put(arrayType, arrayMethods = new SyntheticMethodBinding[2]);
+		arrayMethods[purpose == SyntheticMethodBinding.ArrayConstructor ? 0 : 1] = arrayMethod;
+	} else {
+		if ((arrayMethod = arrayMethods[purpose == SyntheticMethodBinding.ArrayConstructor ? 0 : 1]) == null) {
+			char [] selector = CharOperation.concat(TypeConstants.ANONYMOUS_METHOD, Integer.toString(this.lambdaOrdinal++).toCharArray());
+			arrayMethod = new SyntheticMethodBinding(purpose, arrayType, selector, this);
+			arrayMethods[purpose == SyntheticMethodBinding.ArrayConstructor ? 0 : 1] = arrayMethod;
+		}
+	}
+	return arrayMethod;
+}
+public SyntheticMethodBinding addSyntheticFactoryMethod(MethodBinding privateConstructor, MethodBinding publicConstructor, TypeBinding [] enclosingInstances) {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (this.synthetics == null)
+		this.synthetics = new HashMap[MAX_SYNTHETICS];
+	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null)
+		this.synthetics[SourceTypeBinding.METHOD_EMUL] = new HashMap(5);
+
+	char [] selector = CharOperation.concat(TypeConstants.ANONYMOUS_METHOD, Integer.toString(this.lambdaOrdinal++).toCharArray());
+	SyntheticMethodBinding factory = new SyntheticMethodBinding(privateConstructor, publicConstructor, selector, enclosingInstances, this);
+	this.synthetics[SourceTypeBinding.METHOD_EMUL].put(selector, new SyntheticMethodBinding[] { factory });
+	return factory;
+}
 /*
  * Record the fact that bridge methods need to be generated to override certain inherited methods
  */
 public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge, MethodBinding targetMethod) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (isInterface()) return null; // only classes & enums get bridge methods
 	// targetMethod may be inherited
 //{ObjectTeams: retrieve callin method's real return type:
 	TypeBinding inheritedReturn= MethodModel.getReturnType(inheritedMethodToBridge);
 	TypeBinding targetReturn= MethodModel.getReturnType(targetMethod);
-	if (inheritedReturn.erasure() == targetReturn.erasure()
+	if (TypeBinding.equalsEquals(inheritedReturn.erasure(), targetReturn.erasure())
 /* orig:
-	if (inheritedMethodToBridge.returnType.erasure() == targetMethod.returnType.erasure()
+	if (TypeBinding.equalsEquals(inheritedMethodToBridge.returnType.erasure(), targetMethod.returnType.erasure())
   :giro */
 // SH}
 		&& inheritedMethodToBridge.areParameterErasuresEqual(targetMethod)) {
@@ -862,7 +996,7 @@
 			if (synthetic instanceof MethodBinding) {
 				MethodBinding method = (MethodBinding) synthetic;
 				if (CharOperation.equals(inheritedMethodToBridge.selector, method.selector)
-					&& inheritedMethodToBridge.returnType.erasure() == method.returnType.erasure()
+					&& TypeBinding.equalsEquals(inheritedMethodToBridge.returnType.erasure(), method.returnType.erasure())
 					&& inheritedMethodToBridge.areParameterErasuresEqual(method)) {
 						return null;
 				}
@@ -889,10 +1023,11 @@
  * from a non-public class into a public class (only in 1.6 or greater)
  */
 public SyntheticMethodBinding addSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.scope.compilerOptions().complianceLevel <= ClassFileConstants.JDK1_5) {
 		return null;
 	}
-	if (isInterface()) return null;
+	if (isInterface() && !inheritedMethodToBridge.isDefaultMethod()) return null;
 	if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) {
 		return null;
 	}
@@ -908,7 +1043,7 @@
 			if (synthetic instanceof MethodBinding) {
 				MethodBinding method = (MethodBinding) synthetic;
 				if (CharOperation.equals(inheritedMethodToBridge.selector, method.selector)
-					&& inheritedMethodToBridge.returnType.erasure() == method.returnType.erasure()
+					&& TypeBinding.equalsEquals(inheritedMethodToBridge.returnType.erasure(), method.returnType.erasure())
 					&& inheritedMethodToBridge.areParameterErasuresEqual(method)) {
 						return null;
 				}
@@ -931,17 +1066,29 @@
 	return accessMethod;
 }
 boolean areFieldsInitialized() {
+	if (!isPrototype())
+		return this.prototype.areFieldsInitialized();
 	return this.fields != Binding.UNINITIALIZED_FIELDS;
 }
 boolean areMethodsInitialized() {
+	if (!isPrototype())
+		return this.prototype.areMethodsInitialized();
 	return this.methods != Binding.UNINITIALIZED_METHODS;
 }
 public int kind() {
+	if (!isPrototype())
+		return this.prototype.kind();
 	if (this.typeVariables != Binding.NO_TYPE_VARIABLES) return Binding.GENERIC_TYPE;
 	return Binding.TYPE;
 }
 
+public TypeBinding clone(TypeBinding immaterial) {
+	return new SourceTypeBinding(this);
+}
+
 public char[] computeUniqueKey(boolean isLeaf) {
+	if (!isPrototype())
+		return this.prototype.computeUniqueKey();
 //{ObjectTeams: don't use __OT__R names for keys (TODO(SH): nested roles?)
 	if (isRole()) {
 		if (isClass()) {
@@ -997,6 +1144,7 @@
 public
 // SH}
 void faultInTypesForFieldsAndMethods() {
+	if (!isPrototype()) throw new IllegalStateException();
 	// check @Deprecated annotation
 	getAnnotationTagBits(); // marks as deprecated by side effect
 	ReferenceBinding enclosingType = enclosingType();
@@ -1018,6 +1166,14 @@
 }
 // NOTE: the type of each field of a source type is resolved when needed
 public FieldBinding[] fields() {
+	
+	if (!isPrototype()) {
+		if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
+			return this.fields;
+		this.tagBits |= TagBits.AreFieldsComplete;
+		return this.fields = this.prototype.fields();
+	}
+	
 	if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
 		return this.fields;
 
@@ -1067,14 +1223,14 @@
 			// ensure fields are consistent reqardless of the error
 			int newSize = resolvedFields.length - failed;
 			if (newSize == 0)
-				return this.fields = Binding.NO_FIELDS;
+				return setFields(Binding.NO_FIELDS);
 
 			FieldBinding[] newFields = new FieldBinding[newSize];
 			for (int i = 0, j = 0, length = resolvedFields.length; i < length; i++) {
 				if (resolvedFields[i] != null)
 					newFields[j++] = resolvedFields[i];
 			}
-			this.fields = newFields;
+			setFields(newFields);
 		}
 	}
 	this.tagBits |= TagBits.AreFieldsComplete;
@@ -1084,6 +1240,9 @@
  * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#genericTypeSignature()
  */
 public char[] genericTypeSignature() {
+	if (!isPrototype())
+		return this.prototype.genericTypeSignature();
+	
     if (this.genericReferenceTypeSignature == null)
     	this.genericReferenceTypeSignature = computeGenericTypeSignature(this.typeVariables);
     return this.genericReferenceTypeSignature;
@@ -1093,6 +1252,9 @@
  * <T:LY<TT;>;U:Ljava/lang/Object;V::Ljava/lang/Runnable;:Ljava/lang/Cloneable;:Ljava/util/Map;>Ljava/lang/Exception;Ljava/lang/Runnable;
  */
 public char[] genericSignature() {
+	if (!isPrototype())
+		return this.prototype.genericSignature();
+	
     StringBuffer sig = null;
 	if (this.typeVariables != Binding.NO_TYPE_VARIABLES) {
 	    sig = new StringBuffer(10);
@@ -1122,9 +1284,14 @@
 /**
  * Compute the tagbits for standard annotations. For source types, these could require
  * lazily resolving corresponding annotation nodes, in case of forward references.
+ * For type use bindings, this method still returns the tagbits corresponding to the type 
+ * declaration binding.
  * @see org.eclipse.jdt.internal.compiler.lookup.Binding#getAnnotationTagBits()
  */
 public long getAnnotationTagBits() {
+	if (!isPrototype())
+		return this.prototype.getAnnotationTagBits();
+	
 	if ((this.tagBits & TagBits.AnnotationResolved) == 0 && this.scope != null) {
 		TypeDeclaration typeDecl = this.scope.referenceContext;
 		boolean old = typeDecl.staticInitializerScope.insideTypeAnnotation;
@@ -1146,6 +1313,9 @@
 	return this.tagBits;
 }
 public MethodBinding[] getDefaultAbstractMethods() {
+	if (!isPrototype())
+		return this.prototype.getDefaultAbstractMethods();
+	
 	int count = 0;
 	for (int i = this.methods.length; --i >= 0;)
 		if (this.methods[i].isDefaultAbstract())
@@ -1161,6 +1331,9 @@
 }
 // NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
 public MethodBinding getExactConstructor(TypeBinding[] argumentTypes) {
+	if (!isPrototype())
+		return this.prototype.getExactConstructor(argumentTypes);
+	
 	int argCount = argumentTypes.length;
 	if ((this.tagBits & TagBits.AreMethodsComplete) != 0) { // have resolved all arg types & return type of the methods
 		long range;
@@ -1172,7 +1345,7 @@
 					for (int iarg = 0; iarg < argCount; iarg++)
 //{ObjectTeams: weaker form of equality:
 	/* orig:
-						if (toMatch[iarg] != argumentTypes[iarg])
+						if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
 	  :giro*/
 						if (!AnchorMapping.areTypesEqual(toMatch[iarg], argumentTypes[iarg], method))
 // SH}
@@ -1200,7 +1373,7 @@
 				if (method.parameters.length == argCount) {
 					TypeBinding[] toMatch = method.parameters;
 					for (int iarg = 0; iarg < argCount; iarg++)
-						if (toMatch[iarg] != argumentTypes[iarg])
+						if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
 							continue nextMethod;
 					return method;
 				}
@@ -1213,6 +1386,9 @@
 //NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
 //searches up the hierarchy as long as no potential (but not exact) match was found.
 public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) {
+	if (!isPrototype())
+		return this.prototype.getExactMethod(selector, argumentTypes, refScope);
+	
 	// sender from refScope calls recordTypeReference(this)
 	int argCount = argumentTypes.length;
 	boolean foundNothing = true;
@@ -1228,7 +1404,7 @@
 					for (int iarg = 0; iarg < argCount; iarg++)
 //{ObjectTeams: weaker form of equality:
 /* orig:
-						if (toMatch[iarg] != argumentTypes[iarg])
+						if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
   :giro*/
 						if (!AnchorMapping.areTypesEqual(toMatch[iarg], argumentTypes[iarg], method))
 // SH}
@@ -1279,7 +1455,7 @@
 					for (int iarg = 0; iarg < argCount; iarg++)
 //{ObjectTeams: weaker form of equality:
 /* orig:
-						if (toMatch[iarg] != argumentTypes[iarg])
+						if (TypeBinding.notEquals(toMatch[iarg], argumentTypes[iarg]))
   :giro*/
 						if (!AnchorMapping.areTypesEqual(toMatch[iarg], argumentTypes[iarg], method))
 // SH}
@@ -1308,13 +1484,16 @@
 
 //NOTE: the type of a field of a source type is resolved when needed
 public FieldBinding getField(char[] fieldName, boolean needResolve) {
+	
+	if (!isPrototype())
+		return this.prototype.getField(fieldName, needResolve);
 //{ObjectTeams: could be called before fields are present
 //              (from ClassScope.findSupertype if supertyperef is a QualifiedTypeReference),
 //              can't find any fields, but mustn't prematurely set NO_FIELDS.
 	if (this.fields == Binding.UNINITIALIZED_FIELDS)
 		return null;
 // SH}
-
+	
 	if ((this.tagBits & TagBits.AreFieldsComplete) != 0)
 		return ReferenceBinding.binarySearch(fieldName, this.fields);
 
@@ -1375,7 +1554,7 @@
 				// ensure fields are consistent reqardless of the error
 				int newSize = this.fields.length - 1;
 				if (newSize == 0) {
-					this.fields = Binding.NO_FIELDS;
+					setFields(Binding.NO_FIELDS);
 				} else {
 					FieldBinding[] newFields = new FieldBinding[newSize];
 					int index = 0;
@@ -1384,7 +1563,7 @@
 						if (f == field) continue;
 						newFields[index++] = f;
 					}
-					this.fields = newFields;
+					setFields(newFields);
 				}
 			}
 		}
@@ -1394,6 +1573,9 @@
 
 // NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
 public MethodBinding[] getMethods(char[] selector) {
+	if (!isPrototype())
+		return this.prototype.getMethods(selector);
+	
 	if ((this.tagBits & TagBits.AreMethodsComplete) != 0) {
 		long range;
 		if ((range = ReferenceBinding.binarySearch(selector, this.methods)) >= 0) {
@@ -1566,6 +1748,7 @@
 *	or null if one does not exist.
 */
 public FieldBinding getSyntheticField(LocalVariableBinding actualOuterLocalVariable) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null || this.synthetics[SourceTypeBinding.FIELD_EMUL] == null) return null;
 	return (FieldBinding) this.synthetics[SourceTypeBinding.FIELD_EMUL].get(actualOuterLocalVariable);
 }
@@ -1597,7 +1780,7 @@
 *	or null if one does not exist.
 */
 public FieldBinding getSyntheticField(ReferenceBinding targetEnclosingType, boolean onlyExactMatch) {
-
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null || this.synthetics[SourceTypeBinding.FIELD_EMUL] == null) return null;
 	FieldBinding field = (FieldBinding) this.synthetics[SourceTypeBinding.FIELD_EMUL].get(targetEnclosingType);
 	if (field != null) return field;
@@ -1620,6 +1803,7 @@
  * Answer the bridge method associated for an  inherited methods or null if one does not exist
  */
 public SyntheticMethodBinding getSyntheticBridgeMethod(MethodBinding inheritedMethodToBridge) {
+	if (!isPrototype()) throw new IllegalStateException();
 	if (this.synthetics == null) return null;
 	if (this.synthetics[SourceTypeBinding.METHOD_EMUL] == null) return null;
 	SyntheticMethodBinding[] accessors = (SyntheticMethodBinding[]) this.synthetics[SourceTypeBinding.METHOD_EMUL].get(inheritedMethodToBridge);
@@ -1628,6 +1812,9 @@
 }
 
 public boolean hasTypeBit(int bit) {
+	if (!isPrototype()) {
+		return this.prototype.hasTypeBit(bit);
+	}
 	// source types initialize type bits during connectSuperclass/interfaces()
 	return (this.typeBits & bit) != 0;
 }
@@ -1636,6 +1823,10 @@
  * @see org.eclipse.jdt.internal.compiler.lookup.Binding#initializeDeprecatedAnnotationTagBits()
  */
 public void initializeDeprecatedAnnotationTagBits() {
+	if (!isPrototype()) {
+		this.prototype.initializeDeprecatedAnnotationTagBits();
+		return;
+	}
 	if ((this.tagBits & TagBits.DeprecatedAnnotationResolved) == 0) {
 		TypeDeclaration typeDecl = this.scope.referenceContext;
 		boolean old = typeDecl.staticInitializerScope.insideTypeAnnotation;
@@ -1658,6 +1849,10 @@
 protected
 // SH}
 void initializeForStaticImports() {
+	if (!isPrototype()) {
+		this.prototype.initializeForStaticImports();
+		return;
+	}
 	if (this.scope == null) return; // already initialized
 
 	if (this.superInterfaces == null)
@@ -1667,6 +1862,10 @@
 }
 
 private int getNullDefault() {
+	
+	if (!isPrototype()) {
+		return this.prototype.getNullDefault();
+	}
 	// ensure nullness defaults are initialized at all enclosing levels:
 	switch (this.nullnessDefaultInitialized) {
 	case 0:
@@ -1684,8 +1883,10 @@
  * or for generic types, true if compared to its raw type.
  */
 public boolean isEquivalentTo(TypeBinding otherType) {
-
-	if (this == otherType) return true;
+	if (!isPrototype())
+		return this.prototype.isEquivalentTo(otherType);
+	
+	if (TypeBinding.equalsEquals(this, otherType)) return true;
 	if (otherType == null) return false;
 	switch(otherType.kind()) {
 
@@ -1697,7 +1898,7 @@
 			if ((otherType.tagBits & TagBits.HasDirectWildcard) == 0 && (!isMemberType() || !otherType.isMemberType()))
 				return false; // should have been identical
 			ParameterizedTypeBinding otherParamType = (ParameterizedTypeBinding) otherType;
-			if (this != otherParamType.genericType())
+			if (TypeBinding.notEquals(this, otherParamType.genericType()))
 				return false;
 			if (!isStatic()) { // static member types do not compare their enclosing
             	ReferenceBinding enclosing = enclosingType();
@@ -1705,7 +1906,7 @@
             		ReferenceBinding otherEnclosing = otherParamType.enclosingType();
             		if (otherEnclosing == null) return false;
             		if ((otherEnclosing.tagBits & TagBits.HasDirectWildcard) == 0) {
-						if (enclosing != otherEnclosing) return false;
+						if (TypeBinding.notEquals(enclosing, otherEnclosing)) return false;
             		} else {
             			if (!enclosing.isEquivalentTo(otherParamType.enclosingType())) return false;
             		}
@@ -1722,26 +1923,60 @@
 			return true;
 
 		case Binding.RAW_TYPE :
-	        return otherType.erasure() == this;
+	        return TypeBinding.equalsEquals(otherType.erasure(), this);
 	}
 	return false;
 }
 public boolean isGenericType() {
+	if (!isPrototype())
+		return this.prototype.isGenericType();
     return this.typeVariables != Binding.NO_TYPE_VARIABLES;
 }
 public boolean isHierarchyConnected() {
+	if (!isPrototype())
+		return this.prototype.isHierarchyConnected();
 	return (this.tagBits & TagBits.EndHierarchyCheck) != 0;
 }
+public boolean isRepeatableAnnotationType() {
+	if (!isPrototype()) throw new IllegalStateException();
+	return this.containerAnnotationType != null;
+}
+
+public boolean isTaggedRepeatable() {  // tagged but not necessarily repeatable. see isRepeatableAnnotationType.
+	return (this.tagBits & TagBits.AnnotationRepeatable) != 0;
+}
+
 public ReferenceBinding[] memberTypes() {
+	if (!isPrototype()) {
+		if ((this.tagBits & TagBits.HasUnresolvedMemberTypes) == 0)
+			return this.memberTypes;
+		ReferenceBinding [] members = this.memberTypes = this.prototype.memberTypes();
+		int membersLength = members == null ? 0 : members.length;
+		this.memberTypes = new ReferenceBinding[membersLength];
+		for (int i = 0; i < membersLength; i++) {
+			this.memberTypes[i] = this.environment.createMemberType(members[i], this);
+		}
+		this.tagBits &= ~TagBits.HasUnresolvedMemberTypes;
+	}
 	return this.memberTypes;
 }
 
 public boolean hasMemberTypes() {
+	if (!isPrototype())
+		return this.prototype.hasMemberTypes();
     return this.memberTypes.length > 0;
 }
 
 // NOTE: the return type, arg & exception types of each method of a source type are resolved when needed
 public MethodBinding[] methods() {
+	
+	if (!isPrototype()) {
+		if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
+			return this.methods;
+		this.tagBits |= TagBits.AreMethodsComplete;
+		return this.methods = this.prototype.methods();
+	}
+	
 	if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
 		return this.methods;
 
@@ -1821,7 +2056,7 @@
 						// Only in 1.6, we have to make sure even return types are different
 						// https://bugs.eclipse.org/bugs/show_bug.cgi?id=317719
 						if (compliance16 && method.returnType != null && method2.returnType != null) {
-							if (method.returnType.erasure() != method2.returnType.erasure()) {
+							if (TypeBinding.notEquals(method.returnType.erasure(), method2.returnType.erasure())) {
 								// check to see if the erasure of either method is equal to the other
 								// if not, then change severity to WARNING
 								TypeBinding[] params1 = method.parameters;
@@ -1848,17 +2083,17 @@
 									int index = pLength;
 									// is erasure of signature of m2 same as signature of m1?
 									for (; --index >= 0;) {
-										if (params1[index] != params2[index].erasure()) {
+										if (TypeBinding.notEquals(params1[index], params2[index].erasure())) {
 											// If one of them is a raw type
 											if (params1[index] instanceof RawTypeBinding) {
-												if (params2[index].erasure() != ((RawTypeBinding)params1[index]).actualType()) {
+												if (TypeBinding.notEquals(params2[index].erasure(), ((RawTypeBinding)params1[index]).actualType())) {
 													break;
 												}
 											} else  {
 												break;
 											}
 										}
-										if (params1[index] == params2[index]) {
+										if (TypeBinding.equalsEquals(params1[index], params2[index])) {
 											TypeBinding type = params1[index].leafComponentType();
 											if (type instanceof SourceTypeBinding && type.typeVariables() != Binding.NO_TYPE_VARIABLES) {
 												index = pLength; // handle comparing identical source types like X<T>... its erasure is itself BUT we need to answer false
@@ -1869,10 +2104,10 @@
 									if (index >= 0 && index < pLength) {
 										// is erasure of signature of m1 same as signature of m2?
 										for (index = pLength; --index >= 0;)
-											if (params1[index].erasure() != params2[index]) {
+											if (TypeBinding.notEquals(params1[index].erasure(), params2[index])) {
 												// If one of them is a raw type
 												if (params2[index] instanceof RawTypeBinding) {
-													if (params1[index].erasure() != ((RawTypeBinding)params2[index]).actualType()) {
+													if (TypeBinding.notEquals(params1[index].erasure(), ((RawTypeBinding)params2[index]).actualType())) {
 														break;
 													}
 												} else  {
@@ -1962,13 +2197,13 @@
 		if (failed > 0) {
 			int newSize = resolvedMethods.length - failed;
 			if (newSize == 0) {
-				this.methods = Binding.NO_METHODS;
+				setMethods(Binding.NO_METHODS);
 			} else {
 				MethodBinding[] newMethods = new MethodBinding[newSize];
 				for (int i = 0, j = 0, length = resolvedMethods.length; i < length; i++)
 					if (resolvedMethods[i] != null)
 						newMethods[j++] = resolvedMethods[i];
-				this.methods = newMethods;
+				setMethods(newMethods);
 			}
 		}
 
@@ -1978,11 +2213,35 @@
 	}
 	return this.methods;
 }
+
+public TypeBinding prototype() {
+	return this.prototype;
+}
+
+public boolean isPrototype() {
+	return this == this.prototype;  //$IDENTITY-COMPARISON$
+}
+
+public ReferenceBinding containerAnnotationType() {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
+	if (this.containerAnnotationType instanceof UnresolvedReferenceBinding) {
+		this.containerAnnotationType = (ReferenceBinding)BinaryTypeBinding.resolveType(this.containerAnnotationType, this.scope.environment(), false);
+	}
+	return this.containerAnnotationType;
+}
+
 public FieldBinding resolveTypeFor(FieldBinding field) {
+	
+	if (!isPrototype())
+		return this.prototype.resolveTypeFor(field);
+
 	if ((field.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
 		return field;
 
-	if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
+	long sourceLevel = this.scope.compilerOptions().sourceLevel;
+	if (sourceLevel >= ClassFileConstants.JDK1_5) {
 		if ((field.getAnnotationTagBits() & TagBits.AnnotationDeprecated) != 0)
 			field.modifiers |= ClassFileConstants.AccDeprecated;
 	}
@@ -2031,9 +2290,16 @@
 				field.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
 			}
 
+			if (sourceLevel >= ClassFileConstants.JDK1_8) {
+				Annotation [] annotations = fieldDecl.annotations;
+				if (annotations != null && annotations.length != 0) {
+					ASTNode.copySE8AnnotationsToType(initializationScope, field, fieldDecl.annotations);
+				}
+				Annotation.isTypeUseCompatible(fieldDecl.type, this.scope, fieldDecl.annotations);
+			}
 			// apply null default:
-			LookupEnvironment environment = this.scope.environment();
-			if (environment.globalOptions.isAnnotationBasedNullAnalysisEnabled) {
+			if (this.environment.globalOptions.isAnnotationBasedNullAnalysisEnabled) {
+				// TODO(SH): different strategy for 1.8, or is "repair" below enough?
 				if (fieldDecl.getKind() == AbstractVariableDeclaration.ENUM_CONSTANT) {
 					// enum constants neither have a type declaration nor can they be null
 					field.tagBits |= TagBits.AnnotationNonNull;
@@ -2042,7 +2308,8 @@
 						field.fillInDefaultNonNullness(fieldDecl, initializationScope);
 					}
 					// validate null annotation:
-					this.scope.validateNullAnnotation(field.tagBits, fieldDecl.type, fieldDecl.annotations);
+					if (!this.scope.validateNullAnnotation(field.tagBits, fieldDecl.type, fieldDecl.annotations))
+						field.tagBits &= ~TagBits.AnnotationNullMASK;
 				}
 			}
 		} finally {
@@ -2091,6 +2358,10 @@
 }
 public MethodBinding resolveTypesFor(MethodBinding method, boolean fromSynthetic) {
 // SH}
+
+	if (!isPrototype())
+		return this.prototype.resolveTypesFor(method);
+	
 	if ((method.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
 		return method;
 //{ObjectTeams:  in state final we lost the scope, cannot use code below any more.
@@ -2098,7 +2369,8 @@
     	return method;
 //SH}
 
-	if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) {
+	final long sourceLevel = this.scope.compilerOptions().sourceLevel;
+	if (sourceLevel >= ClassFileConstants.JDK1_5) {
 		if ((method.getAnnotationTagBits() & TagBits.AnnotationDeprecated) != 0)
 			method.modifiers |= ClassFileConstants.AccDeprecated;
 	}
@@ -2163,6 +2435,10 @@
 		if (count < size)
 			System.arraycopy(method.thrownExceptions, 0, method.thrownExceptions = new ReferenceBinding[count], 0, count);
 	}
+	
+	if (methodDecl.receiver != null) {
+		method.receiver = methodDecl.receiver.type.resolveType(methodDecl.scope, true /* check bounds*/);
+	}
 	final boolean reportUnavoidableGenericTypeProblems = this.scope.compilerOptions().reportUnavoidableGenericTypeProblems;
 	boolean foundArgProblem = false;
 	Argument[] arguments = methodDecl.arguments;
@@ -2246,10 +2522,11 @@
             if (parameterType != null && !parameterType.isValidBinding() && ((parameterType.tagBits & TagBits.HasMissingType) == 0))
             	foundArgProblem = true;
 // SH}
+		
 			if (parameterType == null) {
 				foundArgProblem = true;
 			} else if (parameterType == TypeBinding.VOID) {
-				methodDecl.scope.problemReporter().argumentTypeCannotBeVoid(this, methodDecl, arg);
+				methodDecl.scope.problemReporter().argumentTypeCannotBeVoid(methodDecl, arg);
 				foundArgProblem = true;
 			} else {
 				if ((parameterType.tagBits & TagBits.HasMissingType) != 0) {
@@ -2266,7 +2543,7 @@
 				arg.binding.type = parameterType; // only add this missing info
 			  else
 // SH}
-				arg.binding = new LocalVariableBinding(arg, parameterType, arg.modifiers, true /*isArgument*/);
+				arg.binding = new LocalVariableBinding(arg, parameterType, arg.modifiers, methodDecl.scope);
 			}
 		}
 		// only assign parameters if no problems are found
@@ -2276,7 +2553,7 @@
 	}
 
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=337799
-	if (this.scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_7) {
+	if (sourceLevel >= ClassFileConstants.JDK1_7) {
 		if ((method.tagBits & TagBits.AnnotationSafeVarargs) != 0) {
 			if (!method.isVarargs()) {
 				methodDecl.scope.problemReporter().safeVarargsOnFixedArityMethod(method);
@@ -2344,9 +2621,18 @@
 					method.tagBits |= TagBits.HasMissingType;
 				}
 				method.returnType = methodType;
+				if (sourceLevel >= ClassFileConstants.JDK1_8 && !method.isVoidMethod()) {
+					Annotation [] annotations = methodDecl.annotations;
+					if (annotations != null && annotations.length != 0) {
+						ASTNode.copySE8AnnotationsToType(methodDecl.scope, method, methodDecl.annotations);
+					}
+					Annotation.isTypeUseCompatible(returnType, this.scope, methodDecl.annotations);
+				}
 				TypeBinding leafType = methodType.leafComponentType();
 				if (leafType instanceof ReferenceBinding && (((ReferenceBinding) leafType).modifiers & ExtraCompilerModifiers.AccGenericSignature) != 0)
 					method.modifiers |= ExtraCompilerModifiers.AccGenericSignature;
+				else if (leafType == TypeBinding.VOID && methodDecl.annotations != null)
+					rejectTypeAnnotatedVoidMethod(methodDecl);
 			}
 		}
 	}
@@ -2370,8 +2656,26 @@
 // SH}
 	CompilerOptions compilerOptions = this.scope.compilerOptions();
 	if (compilerOptions.isAnnotationBasedNullAnalysisEnabled) {
-		createArgumentBindings(method, compilerOptions); // need annotations resolved already at this point
+		if (!method.isConstructor() && method.returnType != null) {
+			long nullTagBits = method.tagBits & TagBits.AnnotationNullMASK;
+			if (nullTagBits != 0) {
+				TypeReference returnTypeRef = ((MethodDeclaration)methodDecl).returnType;
+				if (compilerOptions.sourceLevel < ClassFileConstants.JDK1_8) {
+					if (!this.scope.validateNullAnnotation(nullTagBits, returnTypeRef, methodDecl.annotations))
+						method.tagBits &= ~TagBits.AnnotationNullMASK;
+				} else {
+					if (nullTagBits != (method.returnType.tagBits & TagBits.AnnotationNullMASK)) {
+						if (!this.scope.validateNullAnnotation(nullTagBits, returnTypeRef, methodDecl.annotations)) {
+							method.returnType.tagBits &= ~TagBits.AnnotationNullMASK;
+						}
+						method.tagBits &= ~TagBits.AnnotationNullMASK;
+					}
+				}
+			}
+		}
 	}
+	if (compilerOptions.isAnnotationBasedNullAnalysisEnabled || compilerOptions.processAnnotations)
+		createArgumentBindings(method, compilerOptions); // need annotations resolved already at this point
 	if (foundReturnTypeProblem)
 		return method; // but its still unresolved with a null return type & is still connected to its method declaration
 
@@ -2395,8 +2699,25 @@
 // SH}
 	return method;
 }
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391108
+private static void rejectTypeAnnotatedVoidMethod(AbstractMethodDeclaration methodDecl) {
+	Annotation[] annotations = methodDecl.annotations;
+	int length = annotations == null ? 0 : annotations.length;
+	for (int i = 0; i < length; i++) {
+		ReferenceBinding binding = (ReferenceBinding) annotations[i].resolvedType;
+		if (binding != null
+				&& (binding.tagBits & TagBits.AnnotationForTypeUse) != 0
+				&& (binding.tagBits & TagBits.AnnotationForMethod) == 0) {
+			methodDecl.scope.problemReporter().illegalUsageOfTypeAnnotations(annotations[i]);
+		}
+	}
+}
+
 private void createArgumentBindings(MethodBinding method, CompilerOptions compilerOptions) {
-	getNullDefault(); // ensure initialized
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	if (compilerOptions.isAnnotationBasedNullAnalysisEnabled)
+		getNullDefault(); // ensure initialized
 	AbstractMethodDeclaration methodDecl = method.sourceMethod();
 	if (methodDecl != null) {
 		// while creating argument bindings we also collect explicit null annotations:
@@ -2409,7 +2730,11 @@
 		}
 	}
 }
+
 private void evaluateNullAnnotations(long annotationTagBits) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.nullnessDefaultInitialized > 0 || !this.scope.compilerOptions().isAnnotationBasedNullAnalysisEnabled)
 		return;
 	boolean isPackageInfo = CharOperation.equals(this.sourceName, TypeConstants.PACKAGE_INFO_NAME);
@@ -2456,6 +2781,9 @@
 }
 
 protected void checkRedundantNullnessDefaultRecurse(ASTNode location, Annotation[] annotations, long annotationTagBits) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.fPackage.defaultNullness != NO_NULL_DEFAULT) {
 		if ((this.fPackage.defaultNullness == NONNULL_BY_DEFAULT
 				&& ((annotationTagBits & TagBits.AnnotationNonNullByDefault) != 0))) {
@@ -2467,6 +2795,9 @@
 
 // return: should caller continue searching?
 protected boolean checkRedundantNullnessDefaultOne(ASTNode location, Annotation[] annotations, long annotationTagBits) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	int thisDefault = getNullDefault();
 	if (thisDefault == NONNULL_BY_DEFAULT) {
 		if ((annotationTagBits & TagBits.AnnotationNonNullByDefault) != 0) {
@@ -2478,6 +2809,9 @@
 }
 
 boolean hasNonNullDefault() {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	// find the applicable default inside->out:
 
 	SourceTypeBinding currentType = null;
@@ -2524,38 +2858,143 @@
 }
 // SH}
 public AnnotationHolder retrieveAnnotationHolder(Binding binding, boolean forceInitialization) {
+	if (!isPrototype())
+		return this.prototype.retrieveAnnotationHolder(binding, forceInitialization);
 	if (forceInitialization)
 		binding.getAnnotationTagBits(); // ensure annotations are up to date
 	return super.retrieveAnnotationHolder(binding, false);
 }
-public void setFields(FieldBinding[] fields) {
-	this.fields = fields;
+
+public void setContainerAnnotationType(ReferenceBinding value) {
+	if (!isPrototype()) throw new IllegalStateException();
+	this.containerAnnotationType  = value;
+}
+
+public void tagAsHavingDefectiveContainerType() {
+	if (!isPrototype()) throw new IllegalStateException();
+	if (this.containerAnnotationType != null && this.containerAnnotationType.isValidBinding())
+		this.containerAnnotationType = new ProblemReferenceBinding(this.containerAnnotationType.compoundName, this.containerAnnotationType, ProblemReasons.DefectiveContainerAnnotationType);
+}
+
+// Propagate writes to all annotated variants so the clones evolve along.
+public FieldBinding [] setFields(FieldBinding[] fields) {
+	
+	if (!isPrototype())
+		return this.prototype.setFields(fields);
+
+	if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+		TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
+		for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+			SourceTypeBinding annotatedType = (SourceTypeBinding) annotatedTypes[i];
+			annotatedType.fields = fields;
+		}
+	}
 //{ObjectTeams: // integrate pendingField
 	if (this.pendingField != null) {
 		int l= fields.length;
-		System.arraycopy(fields, 0, this.fields= new FieldBinding[l+1], 1, l);
-		this.fields[0]= this.pendingField;
+		System.arraycopy(fields, 0, fields= new FieldBinding[l+1], 1, l);
+		fields[0]= this.pendingField;
 		this.pendingField= null;
 	}
 	// in case getField() (or similar func) has already been called reset flag:
 	this.tagBits &= ~(TagBits.AreFieldsSorted | TagBits.AreFieldsComplete);
 // SH}
+	return this.fields = fields;
 }
-public void setMethods(MethodBinding[] methods) {
+
+// We need to specialize member types, can't just propagate. Can't specialize here, clones could created post setMemberTypes()
+public ReferenceBinding [] setMemberTypes(ReferenceBinding[] memberTypes) {
+	
+	if (!isPrototype())
+		return this.prototype.setMemberTypes(memberTypes);
+
+	this.memberTypes = memberTypes;
+	if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+		TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
+		for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+			SourceTypeBinding annotatedType = (SourceTypeBinding) annotatedTypes[i];
+			annotatedType.tagBits |= TagBits.HasUnresolvedMemberTypes;
+			annotatedType.memberTypes(); // recompute.
+		}
+	}
+	return this.memberTypes;
+}
+
+// Propagate writes to all annotated variants so the clones evolve along.
+public MethodBinding [] setMethods(MethodBinding[] methods) {
+	
+	if (!isPrototype())
+		return this.prototype.setMethods(methods);
+	
+	if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+		TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
+		for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+			SourceTypeBinding annotatedType = (SourceTypeBinding) annotatedTypes[i];
+			annotatedType.methods = methods;
+		}
+	}
 //{ObjectTeams: baseCallSurrogate might be stored before regular methods are created
     // happens when binary role with static callin method is loaded before STATE_BINDINGS_COMPLETE
 	if (this.pendingMethods != null)	{
 		assert (this.tagBits & TagBits.AreMethodsSorted) == 0 : "setMethods after sorting"; //$NON-NLS-1$
 		int len1 = this.pendingMethods.size();
 		int len2 = methods.length;
-		this.methods = new MethodBinding[len1+len2];
+		System.arraycopy(methods, 0, methods=new MethodBinding[len1+len2], len1, len2);
 		this.pendingMethods.toArray(this.methods);
-		System.arraycopy(methods, 0, this.methods, len1, len2);
 		this.pendingMethods = null;
-	} else
+	}
 // SH}
-	this.methods = methods;
+	return this.methods = methods;
 }
+
+// Propagate writes to all annotated variants so the clones evolve along.
+public ReferenceBinding setSuperClass(ReferenceBinding superClass) {
+	
+	if (!isPrototype())
+		return this.prototype.setSuperClass(superClass);
+	
+	if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+		TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
+		for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+			SourceTypeBinding annotatedType = (SourceTypeBinding) annotatedTypes[i];
+			annotatedType.superclass = superClass;
+		}
+	}
+	return this.superclass = superClass;
+}
+
+// Propagate writes to all annotated variants so the clones evolve along.
+public ReferenceBinding [] setSuperInterfaces(ReferenceBinding [] superInterfaces) {
+	
+	if (!isPrototype())
+		return this.prototype.setSuperInterfaces(superInterfaces);
+	
+	if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+		TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
+		for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+			SourceTypeBinding annotatedType = (SourceTypeBinding) annotatedTypes[i];
+			annotatedType.superInterfaces = superInterfaces;
+		}
+	}
+	return this.superInterfaces = superInterfaces;
+}
+
+// Propagate writes to all annotated variants so the clones evolve along.
+public TypeVariableBinding [] setTypeVariables(TypeVariableBinding [] typeVariables) {
+	
+	if (!isPrototype())
+		return this.prototype.setTypeVariables(typeVariables);
+	
+	if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+		TypeBinding [] annotatedTypes = this.scope.environment().getAnnotatedTypes(this);
+		for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+			SourceTypeBinding annotatedType = (SourceTypeBinding) annotatedTypes[i];
+			annotatedType.typeVariables = typeVariables;
+		}
+	}
+	return this.typeVariables = typeVariables;
+}
+
 //{ObjectTeams: adding generated elements
 FieldBinding pendingField= null;
 public void addField(FieldBinding fieldBinding) {
@@ -2733,30 +3172,50 @@
 
 //Markus Witte}
 public final int sourceEnd() {
+	if (!isPrototype())
+		return this.prototype.sourceEnd();
+
 	return this.scope.referenceContext.sourceEnd;
 }
 public final int sourceStart() {
+	if (!isPrototype())
+		return this.prototype.sourceStart();
+
 	return this.scope.referenceContext.sourceStart;
 }
 SimpleLookupTable storedAnnotations(boolean forceInitialize) {
+	if (!isPrototype())
+		return this.prototype.storedAnnotations(forceInitialize);
+
 	if (forceInitialize && this.storedAnnotations == null && this.scope != null) { // scope null when no annotation cached, and type got processed fully (159631)
 		this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true;
+		final CompilerOptions globalOptions = this.scope.environment().globalOptions;
 //{ObjectTeams: do support annotations for roles for the sake of copying:
 	  if (!this.isRole())
 // SH}
-		if (!this.scope.environment().globalOptions.storeAnnotations)
+		if (!globalOptions.storeAnnotations)
 			return null; // not supported during this compile
 		this.storedAnnotations = new SimpleLookupTable(3);
 	}
 	return this.storedAnnotations;
 }
+
 public ReferenceBinding superclass() {
+	if (!isPrototype())
+		return this.superclass = this.prototype.superclass();
 	return this.superclass;
 }
+
 public ReferenceBinding[] superInterfaces() {
+	if (!isPrototype())
+		return this.superInterfaces = this.prototype.superInterfaces();
 	return this.superInterfaces;
 }
+
 public SyntheticMethodBinding[] syntheticMethods() {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 //{ObjectTeams: two different kinds of synthetics:
 /* orig:
 	if (this.synthetics == null 
@@ -2786,8 +3245,8 @@
 			}
 		}
 	}
-  }
 // :giro
+  }
 // more synthetics to generate:
   	if (this.synthetics[SourceTypeBinding.ROLE_BRIDGE] != null && this.synthetics[SourceTypeBinding.ROLE_BRIDGE].size() > 0) 
   	{
@@ -2818,6 +3277,9 @@
  * Answer the collection of synthetic fields to append into the classfile
  */
 public FieldBinding[] syntheticFields() {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 	if (this.synthetics == null) return null;
 	int fieldSize = this.synthetics[SourceTypeBinding.FIELD_EMUL] == null ? 0 : this.synthetics[SourceTypeBinding.FIELD_EMUL].size();
 	int literalSize = this.synthetics[SourceTypeBinding.CLASS_LITERAL_EMUL] == null ? 0 :this.synthetics[SourceTypeBinding.CLASS_LITERAL_EMUL].size();
@@ -2844,7 +3306,11 @@
 	return bindings;
 }
 public String toString() {
-    StringBuffer buffer = new StringBuffer(30);
+	if (this.hasTypeAnnotations()) {
+		return annotatedDebugName();
+    }
+	
+	StringBuffer buffer = new StringBuffer(30);
     buffer.append("(id="); //$NON-NLS-1$
     if (this.id == TypeIds.NoId)
         buffer.append("NoId"); //$NON-NLS-1$
@@ -2945,9 +3411,14 @@
 	return buffer.toString();
 }
 public TypeVariableBinding[] typeVariables() {
+	if (!isPrototype())
+		return this.typeVariables = this.prototype.typeVariables();
 	return this.typeVariables != null ? this.typeVariables : Binding.NO_TYPE_VARIABLES;
 }
 void verifyMethods(MethodVerifier verifier) {
+	
+	if (!isPrototype()) throw new IllegalStateException();
+	
 //{ObjectTeams: shortcut for predefined confined types (override final methods???)
 	if (TypeAnalyzer.isTopConfined(this))
 		return;
@@ -2971,11 +3442,21 @@
 // SH}
 }
 
+public TypeBinding unannotated() {
+	return this.prototype;
+}
+
 public FieldBinding[] unResolvedFields() {
+	if (!isPrototype())
+		return this.prototype.unResolvedFields();
 	return this.fields;
 }
 
 public void tagIndirectlyAccessibleMembers() {
+	if (!isPrototype()) {
+		this.prototype.tagIndirectlyAccessibleMembers();
+		return;
+	}
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=328281
 	for (int i = 0; i < this.fields.length; i++) {
 		if (!this.fields[i].isPrivate())
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
index 47fea30..029d5b6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: SyntheticMethodBinding.java 23405 2010-02-03 17:02:18Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -17,6 +20,7 @@
 import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.util.Util;
@@ -36,6 +40,7 @@
 	public FieldBinding targetWriteField;		// write access to a field
 	public MethodBinding targetMethod;			// method or constructor
 	public TypeBinding targetEnumType; 			// enum type
+	public LambdaExpression lambda;
 	
 	public int purpose;
 
@@ -55,14 +60,19 @@
 	public final static int EnumValueOf = 10; // enum #valueOf(String)
 	public final static int SwitchTable = 11; // switch table method
 	public final static int TooManyEnumsConstants = 12; // too many enum constants
+	public static final int LambdaMethod = 13; // Lambda body emitted as a method.
+	public final static int ArrayConstructor = 14; // X[]::new
+	public static final int ArrayClone = 15; // X[]::clone
+    public static final int FactoryMethod = 16; // for indy call to private constructor.
 //{ObjectTeams: other purposes:
-	public final static int InferredCalloutToField = 13; // calling an inferred callout-to-field
-	public final static int RoleMethodBridgeOuter = 14; // a team-level bridge method towards a private role method (for callout)
-	public final static int RoleMethodBridgeInner = 15; // a role-level bridge method towards a private role method (for callout)
+	public final static int InferredCalloutToField = 17; // calling an inferred callout-to-field
+	public final static int RoleMethodBridgeOuter = 18; // a team-level bridge method towards a private role method (for callout)
+	public final static int RoleMethodBridgeInner = 19; // a role-level bridge method towards a private role method (for callout)
 // SH}
 
 	public int sourceStart = 0; // start position of the matching declaration
 	public int index; // used for sorting access methods in the class file
+	public int fakePaddedParameters = 0; // added in synthetic constructor to avoid name clash.
 
 //{ObjectTeams: explicit handling of line number:
 	public int lineNumber = -1;
@@ -179,7 +189,7 @@
 						if (method.parameters.length == paramCount) {
 							TypeBinding[] toMatch = method.parameters;
 							for (int i = 0; i < paramCount; i++) {
-								if (toMatch[i] != this.parameters[i]) {
+								if (TypeBinding.notEquals(toMatch[i], this.parameters[i])) {
 									continue nextMethod;
 								}
 							}
@@ -284,7 +294,7 @@
 						if (method.parameters.length == paramCount) {
 							TypeBinding[] toMatch = method.parameters;
 							for (int i = 0; i < paramCount; i++) {
-								if (toMatch[i] != this.parameters[i]) {
+								if (TypeBinding.notEquals(toMatch[i], this.parameters[i])) {
 									continue nextMethod;
 								}
 							}
@@ -404,12 +414,13 @@
 	// Create a synthetic method that will simply call the super classes method.
 	// Used when a public method is inherited from a non-public class into a public class.
 	// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=288658
+	// Also applies for inherited default methods with the same visibility issue.
+	// See https://bugs.eclipse.org/400710
 	public SyntheticMethodBinding(MethodBinding overridenMethodToBridge, SourceTypeBinding declaringClass) {
 
 	    this.declaringClass = declaringClass;
 	    this.selector = overridenMethodToBridge.selector;
 	    // amongst other, clear the AccGenericSignature, so as to ensure no remains of original inherited persist (101794)
-	    // also use the modifiers from the target method, as opposed to inherited one (147690)
 	    this.modifiers = (overridenMethodToBridge.modifiers | ClassFileConstants.AccBridge | ClassFileConstants.AccSynthetic) & ~(ClassFileConstants.AccSynchronized | ClassFileConstants.AccAbstract | ClassFileConstants.AccNative  | ClassFileConstants.AccFinal | ExtraCompilerModifiers.AccGenericSignature);
 		this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
 	    this.returnType = overridenMethodToBridge.returnType;
@@ -422,6 +433,58 @@
 		this.index = methodId;
 	}
 
+	public SyntheticMethodBinding(int purpose, ArrayBinding arrayType, char [] selector, SourceTypeBinding declaringClass) {
+	    this.declaringClass = declaringClass;
+	    this.selector = selector;
+	    this.modifiers = ClassFileConstants.AccSynthetic | ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic;
+		this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
+	    this.returnType = arrayType;
+	    this.parameters = new TypeBinding[] { purpose == SyntheticMethodBinding.ArrayConstructor ? TypeBinding.INT : (TypeBinding) arrayType};
+	    this.thrownExceptions = Binding.NO_EXCEPTIONS;
+	    this.purpose = purpose;
+		SyntheticMethodBinding[] knownAccessMethods = declaringClass.syntheticMethods();
+		int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+		this.index = methodId;
+	}
+
+	public SyntheticMethodBinding(LambdaExpression lambda, char [] lambdaName, SourceTypeBinding declaringClass) {
+		this.lambda = lambda;
+	    this.declaringClass = declaringClass;
+	    this.selector = lambdaName;
+	    this.modifiers = lambda.binding.modifiers;
+		this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved) | (lambda.binding.tagBits & TagBits.HasParameterAnnotations);
+	    this.returnType = lambda.binding.returnType;
+	    this.parameters = lambda.binding.parameters;
+	    this.thrownExceptions = lambda.binding.thrownExceptions;
+	    this.purpose = SyntheticMethodBinding.LambdaMethod;
+		SyntheticMethodBinding[] knownAccessMethods = declaringClass.syntheticMethods();
+		int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+		this.index = methodId;
+	}
+
+	public SyntheticMethodBinding(MethodBinding privateConstructor, MethodBinding publicConstructor, char[] selector, TypeBinding[] enclosingInstances, SourceTypeBinding declaringClass) {
+	    this.declaringClass = declaringClass;
+	    this.selector = selector;
+	    this.modifiers = ClassFileConstants.AccSynthetic | ClassFileConstants.AccPrivate | ClassFileConstants.AccStatic;
+		this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
+	    this.returnType = publicConstructor.declaringClass;
+	
+	    int realParametersLength = privateConstructor.parameters.length;
+	    int enclosingInstancesLength = enclosingInstances.length;
+	    int parametersLength =  enclosingInstancesLength + realParametersLength;
+	    this.parameters = new TypeBinding[parametersLength];
+	    System.arraycopy(enclosingInstances, 0, this.parameters, 0, enclosingInstancesLength);
+	    System.arraycopy(privateConstructor.parameters, 0, this.parameters, enclosingInstancesLength, realParametersLength);
+	    this.fakePaddedParameters = publicConstructor.parameters.length - realParametersLength;
+	    
+	    this.thrownExceptions = publicConstructor.thrownExceptions;
+	    this.purpose = SyntheticMethodBinding.FactoryMethod;
+	    this.targetMethod = publicConstructor;
+		SyntheticMethodBinding[] knownAccessMethods = declaringClass.syntheticMethods();
+		int methodId = knownAccessMethods == null ? 0 : knownAccessMethods.length;
+		this.index = methodId;
+	}
+
 	/**
 	 * An constructor accessor is a constructor with an extra argument (declaringClass), in case of
 	 * collision with an existing constructor, then add again an extra argument (declaringClass again).
@@ -584,4 +647,8 @@
 	protected boolean isConstructorRelated() {
 		return this.purpose == SyntheticMethodBinding.ConstructorAccess;
 	}
+	
+	public LambdaExpression sourceLambda() {
+		return this.lambda;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
index 56d09eb..7d8a08c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TagBits.java
@@ -5,13 +5,19 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contributions for
  *								bug 186342 - [compiler][null] Using annotations for null checking
+ *								bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -90,14 +96,16 @@
 	long PassedBoundCheck = ASTNode.Bit23;
 
 	// set for parameterized type NOT of the form X<?,?>
-	long IsBoundParameterizedType = ASTNode.Bit24;
+	long IsBoundParameterizedType = ASTNode.Bit24; // PTB only.
+	
+	long HasAnnotatedVariants = ASTNode.Bit24; // TVB, STB
 
 	// used by BinaryTypeBinding
 	long HasUnresolvedTypeVariables = ASTNode.Bit25;
 	long HasUnresolvedSuperclass = ASTNode.Bit26;
 	long HasUnresolvedSuperinterfaces = ASTNode.Bit27;
 	long HasUnresolvedEnclosingType = ASTNode.Bit28;
-	long HasUnresolvedMemberTypes = ASTNode.Bit29;
+	long HasUnresolvedMemberTypes = ASTNode.Bit29;  // Also in use at STB.
 
 	long HasTypeVariable = ASTNode.Bit30; // set either for type variables (direct) or parameterized types indirectly referencing type variables
 	long HasDirectWildcard = ASTNode.Bit31; // set for parameterized types directly referencing wildcards
@@ -119,11 +127,13 @@
 	long AnnotationForLocalVariable = ASTNode.Bit42L;
 	long AnnotationForAnnotationType = ASTNode.Bit43L;
 	long AnnotationForPackage = ASTNode.Bit44L;
-	long AnnotationTargetMASK = AnnotationTarget
-				| AnnotationForType | AnnotationForField
-				| AnnotationForMethod | AnnotationForParameter
-				| AnnotationForConstructor | AnnotationForLocalVariable
+	long AnnotationForTypeUse = ASTNode.Bit54L;
+	long AnnotationForTypeParameter = ASTNode.Bit55L;
+	long SE7AnnotationTargetMASK = AnnotationForType | AnnotationForField | AnnotationForMethod
+				| AnnotationForParameter | AnnotationForConstructor | AnnotationForLocalVariable
 				| AnnotationForAnnotationType | AnnotationForPackage;
+	long AnnotationTargetMASK = SE7AnnotationTargetMASK | AnnotationTarget
+				| AnnotationForTypeUse | AnnotationForTypeParameter;
 	// 2-bits for retention (should check (tagBits & RetentionMask) == RuntimeRetention
 	long AnnotationSourceRetention = ASTNode.Bit45L;
 	long AnnotationClassRetention = ASTNode.Bit46L;
@@ -147,9 +157,13 @@
 	long AnnotationNonNullByDefault = ASTNode.Bit58L;
 	/** @since 3.8 canceling null-default annotation for PackageBinding or TypeBinding or MethodBinding: */
 	long AnnotationNullUnspecifiedByDefault = ASTNode.Bit59L;
+	/** From Java 8 */
+	long AnnotationFunctionalInterface = ASTNode.Bit60L;
+	/** From Java 8 */
+	long AnnotationRepeatable = ASTNode.Bit61L; // Only for annotation types and since these cannot have constructors, we can overload HasNonPrivateConstructor.
 
 //{ObjectTeams: one more standard annotation:
-	long AnnotationInstantiation = ASTNode.Bit21;
+	long AnnotationInstantiation = ASTNode.Bit64L;
 // SH}
 
 	long AllStandardAnnotationsMask =
@@ -168,8 +182,15 @@
 				| AnnotationNullable
 				| AnnotationNonNull
 				| AnnotationNonNullByDefault
-				| AnnotationNullUnspecifiedByDefault;
+				| AnnotationNullUnspecifiedByDefault
+				| AnnotationRepeatable;
+	
+	long AnnotationNullMASK = AnnotationNullable | AnnotationNonNull;
+	/** @since 3.9_BETA_JAVA8 marks a type that has a nullness annotation directly or on a detail (array dimension/type argument). */
+	long HasNullTypeAnnotation = ASTNode.Bit21;
 
+	long HasTypeAnnotations = ASTNode.Bit22;
+	
 	long DefaultValueResolved = ASTNode.Bit60L;
 
 	// set when type contains non-private constructor(s)
@@ -189,8 +210,6 @@
     // "new SomeTeam()" expression, unmatchable anchor
     long IsFreshTeamInstance = ASTNode.Bit63L; 				// for LocalVariableBinding
 
-    // did a nested team require correction of team/role flags?
-    long HasClassKindProblem = ASTNode.Bit64L;				// for type binding (team&role)
     // parameter/return incompatibility btw base-role?
     long HasMappingIncompatibility = ASTNode.Bit64L; 		// for method mapping bindings
     long IsCopyOfParameterized = ASTNode.Bit64L;			// for method bindings
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
index 32e2ca5..3b5834f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBinding.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: TypeBinding.java 23405 2010-02-03 17:02:18Z stephan $
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -13,15 +16,25 @@
  *      Stephen Herrmann <stephan@cs.tu-berlin.de> -  Contributions for
  *								bug 317046 - Exception during debugging when hover mouse over a field
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
+ *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
+ *								bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import java.util.List;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
+import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator.TypeArgumentUpdater;
 
 /**
  * OTDT changes:
@@ -45,7 +58,15 @@
 	public int id = TypeIds.NoId;
 	public long tagBits = 0; // See values in the interface TagBits below
 
-
+	protected AnnotationBinding [] typeAnnotations = Binding.NO_ANNOTATIONS;
+	
+	// jsr 308
+	public static final ReferenceBinding TYPE_USE_BINDING = new ReferenceBinding() { /* used for type annotation resolution. */
+		{ this.id = TypeIds.T_undefined; }
+		public int kind() { return Binding.TYPE_USE; }
+		public boolean hasTypeBit(int bit) { return false; }
+	};
+	
 	/** Base type definitions */
 	public final static BaseTypeBinding INT = new BaseTypeBinding(
 			TypeIds.T_int, TypeConstants.INT, new char[] { 'I' });
@@ -71,11 +92,19 @@
 	public final static BaseTypeBinding BOOLEAN = new BaseTypeBinding(
 			TypeIds.T_boolean, TypeConstants.BOOLEAN, new char[] { 'Z' });
 
-	public final static BaseTypeBinding NULL = new BaseTypeBinding(
-			TypeIds.T_null, TypeConstants.NULL, new char[] { 'N' }); //N stands for null even if it is never internally used
+	public final static NullTypeBinding NULL = new NullTypeBinding();
 
-	public final static BaseTypeBinding VOID = new BaseTypeBinding(
-			TypeIds.T_void, TypeConstants.VOID, new char[] { 'V' });
+	public final static VoidTypeBinding VOID = new VoidTypeBinding();
+
+
+public TypeBinding() {
+	super();
+}
+	
+public TypeBinding(TypeBinding prototype) {  // faithfully copy all instance state - clone operation should specialize/override suitably.
+	this.id = prototype.id;
+	this.tagBits = prototype.tagBits;
+}
 
 /**
  * Match a well-known type id to its binding
@@ -107,6 +136,46 @@
 	}
 }
 
+protected ReferenceBinding actualType() {
+	return null; // overridden in ParameterizedTypeBinding & WildcardBinding
+}
+
+TypeBinding [] additionalBounds() {
+	return null;  // overridden in WildcardBinding
+}
+
+public String annotatedDebugName() {
+	TypeBinding enclosingType = enclosingType();
+	StringBuffer buffer = new StringBuffer(16);
+	if (enclosingType != null) {
+		buffer.append(enclosingType.annotatedDebugName());
+		buffer.append('.');
+	}
+	AnnotationBinding [] annotations = getTypeAnnotations();
+	for (int i = 0, length = annotations == null ? 0 : annotations.length; i < length; i++) {
+		buffer.append(annotations[i]);
+		buffer.append(' ');
+	}
+	buffer.append(sourceName());
+	return buffer.toString();
+}
+
+TypeBinding bound() {
+	return null; // overridden in WildcardBinding
+}
+
+int boundKind() {
+	return -1; // overridden in WildcardBinding
+}
+
+int rank() {
+	return -1; // overridden in WildcardBinding
+}
+
+public ReferenceBinding containerAnnotationType() {
+	return null;
+}
+
 /* Answer true if the receiver can be instantiated
  */
 public boolean canBeInstantiated() {
@@ -149,6 +218,15 @@
 	// no substitute by default
 }
 
+/** Virtual copy constructor: a copy is made of the receiver's entire instance state and then suitably
+    parameterized by the arguments to the clone operation as seen fit by each type. Parameters may not
+    make sense for every type in the hierarchy, in which case they are silently ignored. A type may
+    choose to retain a copy of the prototype for reference. 
+*/
+public TypeBinding clone(TypeBinding enclosingType) {
+	throw new IllegalStateException("TypeBinding#clone() should have been overridden"); //$NON-NLS-1$
+}
+
 /**
  *  Answer the receiver's constant pool name.
  *  NOTE: This method should only be used during/after code gen.
@@ -157,7 +235,7 @@
 public abstract char[] constantPoolName();
 
 public String debugName() {
-	return new String(readableName());
+	return this.hasTypeAnnotations() ? annotatedDebugName() : new String(readableName());
 }
 
 /*
@@ -167,7 +245,11 @@
 	return 0;
 }
 
-/* Answer the receiver's enclosing type... null if the receiver is a top level type.
+public int depth() {
+	return 0;
+}
+
+/* Answer the receiver's enclosing type... null if the receiver is a top level type or is an array or a non reference type.
  */
 public ReferenceBinding enclosingType() {
 	return null;
@@ -218,7 +300,7 @@
 				nextInterface : for (int a = 0; a < itsLength; a++) {
 					ReferenceBinding next = itsInterfaces[a];
 					for (int b = 0; b < nextPosition; b++)
-						if (next == interfacesToVisit[b]) continue nextInterface;
+						if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 					interfacesToVisit[nextPosition++] = next;
 				}
 			}
@@ -239,7 +321,7 @@
 			nextInterface : for (int a = 0; a < itsLength; a++) {
 				ReferenceBinding next = itsInterfaces[a];
 				for (int b = 0; b < nextPosition; b++)
-					if (next == interfacesToVisit[b]) continue nextInterface;
+					if (TypeBinding.equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 				interfacesToVisit[nextPosition++] = next;
 			}
 		}
@@ -251,7 +333,7 @@
  * Find supertype which originates from a given type, or null if not found
  */
 public TypeBinding findSuperTypeOriginatingFrom(TypeBinding otherType) {
-	if (this == otherType) return this;
+	if (equalsEquals(this, otherType)) return this;
 	if (otherType == null) return null;
 	switch(kind()) {
 		case Binding.ARRAY_TYPE :
@@ -292,16 +374,16 @@
 		case Binding.INTERSECTION_TYPE:
 		    // do not allow type variables/intersection types to match with erasures for free
 			otherType = otherType.original();
-		    if (this == otherType)
+		    if (equalsEquals(this, otherType))
 		    	return this;
-		    if (original() == otherType)
+		    if (equalsEquals(original(), otherType))
 		    	return this;
 		    ReferenceBinding currentType = (ReferenceBinding)this;
 		    if (!otherType.isInterface()) {
 				while ((currentType = currentType.superclass()) != null) {
-					if (currentType == otherType)
+					if (equalsEquals(currentType, otherType))
 						return currentType;
-					if (currentType.original() == otherType)
+					if (equalsEquals(currentType.original(), otherType))
 						return currentType;
 				}
 				return null;
@@ -321,7 +403,7 @@
 						nextInterface : for (int a = 0; a < itsLength; a++) {
 							ReferenceBinding next = itsInterfaces[a];
 							for (int b = 0; b < nextPosition; b++)
-								if (next == interfacesToVisit[b]) continue nextInterface;
+								if (equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 							interfacesToVisit[nextPosition++] = next;
 						}
 					}
@@ -330,9 +412,9 @@
 
 			for (int i = 0; i < nextPosition; i++) {
 				currentType = interfacesToVisit[i];
-				if (currentType == otherType)
+				if (equalsEquals(currentType, otherType))
 					return currentType;
-				if (currentType.original() == otherType)
+				if (equalsEquals(currentType.original(), otherType))
 					return currentType;
 				ReferenceBinding[] itsInterfaces = currentType.superInterfaces();
 				if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) {
@@ -342,7 +424,7 @@
 					nextInterface : for (int a = 0; a < itsLength; a++) {
 						ReferenceBinding next = itsInterfaces[a];
 						for (int b = 0; b < nextPosition; b++)
-							if (next == interfacesToVisit[b]) continue nextInterface;
+							if (equalsEquals(next, interfacesToVisit[b])) continue nextInterface;
 						interfacesToVisit[nextPosition++] = next;
 					}
 				}
@@ -355,7 +437,7 @@
  * Returns the type to use for generic cast, or null if none required
  */
 public TypeBinding genericCast(TypeBinding targetType) {
-	if (this == targetType) 
+	if (TypeBinding.equalsEquals(this, targetType)) 
 		return null;
 	TypeBinding targetErasure = targetType.erasure();
 	// type var get replaced by upper bound
@@ -438,10 +520,6 @@
 	// only applicable to source types
 }
 
-public boolean isAnnotationType() {
-	return false;
-}
-
 public final boolean isAnonymousType() {
 	return (this.tagBits & TagBits.IsAnonymousType) != 0;
 }
@@ -458,6 +536,26 @@
 	return (this.tagBits & TagBits.IsBaseType) != 0;
 }
 
+/* Answer true if the receiver is a primitive type or a boxed primitive type
+ */
+public final boolean isPrimitiveOrBoxedPrimitiveType() {
+	if ((this.tagBits & TagBits.IsBaseType) != 0)
+		return true;
+	switch (this.id) {
+		case TypeIds.T_JavaLangBoolean :
+		case TypeIds.T_JavaLangByte :
+		case TypeIds.T_JavaLangCharacter :
+		case TypeIds.T_JavaLangShort :
+		case TypeIds.T_JavaLangDouble :
+		case TypeIds.T_JavaLangFloat :
+		case TypeIds.T_JavaLangInteger :
+		case TypeIds.T_JavaLangLong :
+			return true;
+		default: 
+			return false;
+	}
+}
+
 /**
  *  Returns true if parameterized type AND not of the form List<?>
  */
@@ -493,7 +591,7 @@
  * or for generic types, true if compared to its raw type.
  */
 public boolean isEquivalentTo(TypeBinding otherType) {
-	if (this == otherType)
+	if (equalsEquals(this, otherType))
 		return true;
 	if (otherType == null)
 		return false;
@@ -519,6 +617,10 @@
 	return false;
 }
 
+public boolean isFunctionalInterface() {
+	return false;
+}
+
 /**
  * Returns true if the current type denotes an intersection type: Number & Comparable<?>
  */
@@ -572,6 +674,18 @@
 }
 
 /**
+ * Does this type or any of its details (array dimensions, type arguments)
+ * have a null type annotation?
+ */
+public boolean hasNullTypeAnnotations() {
+	return (this.tagBits & TagBits.HasNullTypeAnnotation) != 0;
+}
+
+public boolean isIntersectionCastType() {
+	return false;
+}
+
+/**
  * Returns true if the type is parameterized, e.g. List<String>
  * Note that some instances of ParameterizedTypeBinding do answer false to {@link #isParameterizedType()}
  * in case they have no arguments, like for non-generic members of a parameterized type.
@@ -593,7 +707,7 @@
 		return false;
 	TypeVariableBinding[] variables = erasure().typeVariables();
 	for (int i = 0, length = variables.length; i < length; i++) {
-		if (variables[i] != paramType.arguments[i])
+		if (TypeBinding.notEquals(variables[i], paramType.arguments[i]))
 			return false;
 	}
 	ReferenceBinding enclosing = paramType.enclosingType();
@@ -646,7 +760,7 @@
         https://bugs.eclipse.org/bugs/show_bug.cgi?id=329588
 	 */ 
 
-	if (this == otherType)
+	if (equalsEquals(this, otherType))
 	    return false;
     if (otherType == null)
         return true;
@@ -658,7 +772,7 @@
 		    switch(otherType.kind()) {
 		    	case Binding.PARAMETERIZED_TYPE :
 		            ParameterizedTypeBinding otherParamType = (ParameterizedTypeBinding) otherType;
-		            if (paramType.genericType() != otherParamType.genericType())
+		            if (notEquals(paramType.genericType(), otherParamType.genericType()))
 		                return true;
 		            if (!paramType.isStatic()) { // static member types do not compare their enclosing
 		            	ReferenceBinding enclosing = enclosingType();
@@ -684,7 +798,7 @@
 		            return false;
 
 		    	case Binding.GENERIC_TYPE :
-		            if (paramType.genericType() != otherType)
+		            if (notEquals(paramType.genericType(), otherType))
 		                return true;
 		            if (!paramType.isStatic()) { // static member types do not compare their enclosing
 		            	ReferenceBinding enclosing = enclosingType();
@@ -692,7 +806,7 @@
 		            		ReferenceBinding otherEnclosing = otherType.enclosingType();
 		            		if (otherEnclosing == null) return true;
 		            		if ((otherEnclosing.tagBits & TagBits.HasDirectWildcard) == 0) {
-								if (enclosing != otherEnclosing) return true;
+								if (notEquals(enclosing, otherEnclosing)) return true;
 		            		} else {
 		            			if (!enclosing.isEquivalentTo(otherType.enclosingType())) return true;
 		            		}
@@ -710,15 +824,12 @@
 		            return false;
 
 		    	case Binding.RAW_TYPE :
+		    	case Binding.TYPE:  // https://bugs.eclipse.org/bugs/show_bug.cgi?id=329588
 //{ObjectTeams: dependent types?
 /* orig:
-		            return erasure() != otherType.erasure();
-		    	case Binding.TYPE:  // https://bugs.eclipse.org/bugs/show_bug.cgi?id=329588
-		    		return erasure() != otherType;
+		            return notEquals(erasure(), otherType.erasure());
   :giro */
   					return distinctRealTypes(erasure(), otherType.erasure());
-		    	case Binding.TYPE:  // https://bugs.eclipse.org/bugs/show_bug.cgi?id=329588
-		    		return distinctRealTypes(erasure(), otherType);
 // SH}
 		    }
 	        return true;
@@ -744,7 +855,7 @@
 		    switch(otherType.kind()) {
 		    	case Binding.PARAMETERIZED_TYPE :
 		    	case Binding.RAW_TYPE :
-		            return this != otherType.erasure();
+		            return notEquals(this, otherType.erasure());
 		    }
 		    break;
 
@@ -757,7 +868,7 @@
 boolean distinctRealTypes(TypeBinding one, TypeBinding two) {
 	if (one instanceof ReferenceBinding && two instanceof ReferenceBinding)
 		if (DependentTypeBinding.isDependentType(one) || DependentTypeBinding.isDependentType(two))
-			return ((ReferenceBinding)one).getRealType() != ((ReferenceBinding)two).getRealType();
+			return notEquals(((ReferenceBinding)one).getRealType(), ((ReferenceBinding)two).getRealType());
 	return one != two;
 }
 // SH}
@@ -769,7 +880,7 @@
  * List<? extends String> & List<? extends Runnable> --> false
  */
 private boolean isProvablyDistinctTypeArgument(TypeBinding otherArgument, final ParameterizedTypeBinding paramType, final int rank) {
-	if (this == otherArgument)
+	if (TypeBinding.equalsEquals(this, otherArgument))
 		return false;
 
 	TypeBinding upperBound1 = null;
@@ -920,6 +1031,13 @@
 	}
 }
 
+/**
+ * Answer true if the receiver is an annotation which may be repeatable. Overridden as appropriate.
+ */
+public boolean isRepeatableAnnotationType() {
+	return false;
+}
+
 public final boolean isRawType() {
 	return kind() == Binding.RAW_TYPE;
 }
@@ -961,6 +1079,13 @@
 }
 
 /**
+ * Answer true if the receiver is a static member type (or toplevel)
+ */
+public boolean isStatic() {
+	return false;
+}
+
+/**
  * Returns true if a given type may be thrown
  */
 public boolean isThrowable() {
@@ -970,13 +1095,13 @@
 public boolean isTypeArgumentContainedBy(TypeBinding otherType) {
 //{ObjectTeams: only slightly weaker form of identity:
 /* orig:
-	if (this == otherType)
+	if (TypeBinding.equalsEquals(this, otherType))
   :giro */
 	if (RoleTypeBinding.eq(this, otherType))
 // SH}
 		return true;
 	switch (otherType.kind()) {
-	// handle captured wildcards.
+		// handle captured wildcards.
 		case Binding.TYPE_PARAMETER: {
 			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=347426
 			if (!isParameterizedType() || !otherType.isCapture()) {
@@ -1045,25 +1170,25 @@
 			TypeBinding otherBound = otherWildcard.bound;
 			switch (otherWildcard.boundKind) {
 				case Wildcard.EXTENDS:
-					if (otherBound == this)
+					if (TypeBinding.equalsEquals(otherBound, this))
 						return true; // ? extends T  <=  ? extends ? extends T
 					if (upperBound == null)
 						return false;
 					TypeBinding match = upperBound.findSuperTypeOriginatingFrom(otherBound);
 					if (match != null && (match = match.leafComponentType()).isRawType()) {
-						return match == otherBound.leafComponentType(); // forbide: Collection <=  ? extends Collection<?>
+						return TypeBinding.equalsEquals(match, otherBound.leafComponentType()); // forbide: Collection <=  ? extends Collection<?>
 																												// forbide: Collection[] <=  ? extends Collection<?>[]
 					}
 					return upperBound.isCompatibleWith(otherBound);
 
 				case Wildcard.SUPER:
-					if (otherBound == this)
+					if (TypeBinding.equalsEquals(otherBound, this))
 						return true; // ? super T  <=  ? super ? super T
 					if (lowerBound == null)
 						return false;
 					match = otherBound.findSuperTypeOriginatingFrom(lowerBound);
 					if (match != null && (match = match.leafComponentType()).isRawType()) {
-						return match == lowerBound.leafComponentType(); // forbide: Collection <=  ? super Collection<?>
+						return TypeBinding.equalsEquals(match, lowerBound.leafComponentType()); // forbide: Collection <=  ? super Collection<?>
 																												// forbide: Collection[] <=  ? super Collection<?>[]
 					}
 					return otherBound.isCompatibleWith(lowerBound);
@@ -1078,7 +1203,7 @@
 				return false;
 			ParameterizedTypeBinding paramType = (ParameterizedTypeBinding) this;
 			ParameterizedTypeBinding otherParamType = (ParameterizedTypeBinding) otherType;
-			if (paramType.actualType() != otherParamType.actualType())
+			if (TypeBinding.notEquals(paramType.actualType(), otherParamType.actualType()))
 				return false;
 			if (!paramType.isStatic()) { // static member types do not compare their enclosing
 				ReferenceBinding enclosing = enclosingType();
@@ -1087,7 +1212,7 @@
 					if (otherEnclosing == null)
 						return false;
 					if ((otherEnclosing.tagBits & TagBits.HasDirectWildcard) == 0) {
-						if (enclosing != otherEnclosing)
+						if (TypeBinding.notEquals(enclosing, otherEnclosing))
 							return false;
 					} else {
 						if (!enclosing.isEquivalentTo(otherParamType.enclosingType()))
@@ -1103,7 +1228,7 @@
 			nextArgument: for (int i = 0; i < length; i++) {
 				TypeBinding argument = paramType.arguments[i];
 				TypeBinding otherArgument = otherArguments[i];
-				if (argument == otherArgument)
+				if (TypeBinding.equalsEquals(argument, otherArgument))
 					continue nextArgument;
 				int kind = argument.kind();
 				if (otherArgument.kind() != kind)
@@ -1121,7 +1246,7 @@
 						case Wildcard.EXTENDS:
 							// match "? extends <upperBound>" with "?"
 							if (otherWildcard.boundKind == Wildcard.UNBOUND
-									&& wildcard.bound == wildcard.typeVariable().upperBound())
+									&& TypeBinding.equalsEquals(wildcard.bound, wildcard.typeVariable().upperBound()))
 								continue nextArgument;
 							break;
 						case Wildcard.SUPER:
@@ -1129,7 +1254,7 @@
 						case Wildcard.UNBOUND:
 							// match "?" with "? extends <upperBound>"
 							if (otherWildcard.boundKind == Wildcard.EXTENDS
-									&& otherWildcard.bound == otherWildcard.typeVariable().upperBound())
+									&& TypeBinding.equalsEquals(otherWildcard.bound, otherWildcard.typeVariable().upperBound()))
 								continue nextArgument;
 							break;
 						}
@@ -1197,7 +1322,7 @@
  */
 public boolean needsUncheckedConversion(TypeBinding targetType) {
 
-	if (this == targetType)
+	if (TypeBinding.equalsEquals(this, targetType))
 		return false;
 	targetType = targetType.leafComponentType();
 	if (!(targetType instanceof ReferenceBinding))
@@ -1221,6 +1346,14 @@
 	return false;
 }
 
+/** Answer a readable name (for error reporting) that includes nullness type annotations. */
+public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) /* e.g.: java.lang.Object @o.e.j.a.NonNull[] */ {
+	if (shortNames)
+		return shortReadableName();
+	else
+		return readableName();
+}
+
 /**
  * Returns the orignal generic type instantiated by the receiver type, or itself if not.
  * This is similar to erasure process, except it doesn't erase type variable, wildcard, intersection types etc...
@@ -1236,6 +1369,17 @@
 	}
 }
 
+/** 
+ * Return this type minus its type annotations
+ */
+public TypeBinding unannotated() {
+	return this;
+}
+
+public boolean hasTypeAnnotations() {
+	return (this.tagBits & TagBits.HasTypeAnnotations) != 0;
+}
+
 /**
  * Answer the qualified name of the receiver's package separated by periods
  * or an empty string if its the default package.
@@ -1259,6 +1403,36 @@
 public abstract char[] qualifiedSourceName();
 
 /**
+ * @return the JSR 308 annotations for this type.
+ */
+final public AnnotationBinding[] getTypeAnnotations() {
+	return this.typeAnnotations;
+}
+
+public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+	this.tagBits |= TagBits.HasTypeAnnotations;
+	if (annotations == null || annotations.length == 0)
+		return;
+	this.typeAnnotations = annotations;
+	if (evalNullAnnotations) {
+		for (int i = 0, length = annotations.length; i < length; i++) {
+			AnnotationBinding annotation = annotations[i];
+			if (annotation != null) {
+				switch (annotation.type.id) {
+					case TypeIds.T_ConfiguredAnnotationNullable :
+						this.tagBits |= TagBits.AnnotationNullable | TagBits.HasNullTypeAnnotation;
+						break;
+					case TypeIds.T_ConfiguredAnnotationNonNull :
+						this.tagBits |= TagBits.AnnotationNonNull  | TagBits.HasNullTypeAnnotation;
+						break;
+				}
+			}
+		}
+		// we do accept contradictory tagBits here, to support detecting contradictions caused by type substitution
+	}
+}
+
+/**
  * Answer the receiver classfile signature.
  * Arrays & base types do not distinguish between signature() & constantPoolName().
  * NOTE: This method should only be used during/after code gen.
@@ -1279,6 +1453,13 @@
 	// subclasses must override if they wrap another type binding
 }
 
+//{ObjectTeams: visible across AbstractOTReferenceBinding (in a different package):
+protected
+// SH}
+TypeBinding [] typeArguments () {
+	return null;
+}
+
 public TypeVariableBinding[] typeVariables() {
 	return Binding.NO_TYPE_VARIABLES;
 }
@@ -1293,7 +1474,58 @@
 public DependentTypeBinding asPlainDependentType() {
 	return null; // is not a dependent type
 }
+
+
+public TypeBinding maybeWrapRoleType (ASTNode typedNode, TypeArgumentUpdater updater) {
+	return this;
+}
 // SH}
+
+/**
+ * Return the single abstract method of a functional interface, or null, if the receiver is not a functional interface as defined in JLS 9.8.
+ * @param scope scope
+ *  
+ * @return The single abstract method of a functional interface, or null, if the receiver is not a functional interface. 
+ */
+public MethodBinding getSingleAbstractMethod(Scope scope) {
+	return null;
+}
+
+public ReferenceBinding[] getIntersectingTypes() {
+	return null;
+}
+
+public static boolean equalsEquals(TypeBinding that, TypeBinding other) {
+	if (that == other) //$IDENTITY-COMPARISON$
+		return true;
+	if (that == null || other == null)
+		return false;
+	if (that.id != TypeIds.NoId && that.id == other.id)
+		return true;
+	return false;
+}
+
+public static boolean notEquals(TypeBinding that, TypeBinding other) {
+	if (that == other) //$IDENTITY-COMPARISON$
+		return false;
+	if (that == null || other == null)
+		return true;
+	if (that.id != TypeIds.NoId && that.id == other.id)
+		return false;
+	return true;
+}
+/** Return the primordial type from which the receiver was cloned. Not all types track a prototype, only {@link SourceTypeBinding},
+ * {@link BinaryTypeBinding} and {@link UnresolvedReferenceBinding} do so as of now. In fact some types e.g {@link ParameterizedTypeBinding}
+ * should not do so. Deflecting a query to a prototype would lead to wrong results in the case of {@link ParameterizedTypeBinding}
+ */
+public TypeBinding prototype() {
+	return null;
+}
+
+public boolean isUnresolvedType() {
+	return false;
+}
+
 /** Answer an additional bit characterizing this type, like {@link TypeIds#BitAutoCloseable}. */
 public boolean hasTypeBit(int bit) {
 	return false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java
new file mode 100644
index 0000000..e01368e
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeBindingVisitor.java
@@ -0,0 +1,147 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.lookup;
+
+import org.eclipse.jdt.internal.compiler.ast.Wildcard;
+import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+
+
+public class TypeBindingVisitor {
+
+	private SimpleLookupTable visitedCache;
+
+	public boolean visit(BaseTypeBinding baseTypeBinding)  {
+		return true;  // continue traversal.
+	}
+
+	public boolean visit(ArrayBinding arrayBinding) {
+		return true;  // continue traversal.
+	}
+	
+	public boolean visit(TypeVariableBinding typeVariable) {
+		return true;  // continue traversal.
+	}
+	
+	public boolean visit(ReferenceBinding referenceBinding) {
+		return true;  // continue traversal.
+	}
+	
+	public boolean visit(WildcardBinding wildcardBinding) {
+		return true;  // continue traversal.
+	}
+	
+	public boolean visit(ParameterizedTypeBinding parameterizedTypeBinding) {
+		return true;  // continue traversal.
+	}
+	
+	public boolean visit(IntersectionCastTypeBinding intersectionCastTypeBinding) {
+		return true;  // continue traversal.
+	}
+	
+	public boolean visit(RawTypeBinding rawTypeBinding) {
+		return true;  // continue traversal.
+	}
+
+	public static void visit(TypeBindingVisitor visitor, ReferenceBinding[] types) {
+		for (int i = 0, length = types == null ? 0 : types.length; i < length; i++) {
+	        visit(visitor, types[i]);
+	    }
+	}
+
+	public static void visit(TypeBindingVisitor visitor, TypeBinding type) {
+
+		if (type == null) 
+			return;
+		
+		SimpleLookupTable visitedCache = visitor.visitedCache;
+		if (visitedCache == null) {
+			visitor.visitedCache = new SimpleLookupTable(3);
+			visitedCache = visitor.visitedCache;
+		}
+
+		Object result = visitedCache.get(type);
+		if (result == Boolean.TRUE)
+			return;
+		visitedCache.put(type, Boolean.TRUE);
+		switch (type.kind()) {
+			
+			case Binding.TYPE_PARAMETER:
+				TypeVariableBinding typeVariableBinding = (TypeVariableBinding) type;
+				if (visitor.visit(typeVariableBinding)) {
+					visit(visitor, typeVariableBinding.firstBound);
+					visit(visitor, typeVariableBinding.superclass);
+					visit(visitor, typeVariableBinding.superInterfaces);
+				}
+	            break;
+	            
+			case Binding.PARAMETERIZED_TYPE:
+				ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) type;
+				if (visitor.visit(parameterizedTypeBinding)) {
+					visit(visitor, parameterizedTypeBinding.enclosingType());
+					visit(visitor, parameterizedTypeBinding.arguments);
+				}
+				break;
+
+			case Binding.ARRAY_TYPE:
+				ArrayBinding arrayBinding = (ArrayBinding) type;
+				if (visitor.visit(arrayBinding))
+					visit(visitor, arrayBinding.leafComponentType);
+				break;
+
+			case Binding.WILDCARD_TYPE:
+			case Binding.INTERSECTION_TYPE:
+		        WildcardBinding wildcard = (WildcardBinding) type;
+		        if (visitor.visit(wildcard)) {
+		        	if (wildcard.boundKind != Wildcard.UNBOUND) {
+		        		visit(visitor, wildcard.bound);
+		        		visit(visitor, wildcard.otherBounds);
+		        	}
+		        }
+				break;
+			
+			case Binding.BASE_TYPE:
+				visitor.visit((BaseTypeBinding) type);
+				break;
+			
+			case Binding.RAW_TYPE:
+				visitor.visit((RawTypeBinding) type);
+				break;
+				
+			case Binding.TYPE:
+			case Binding.GENERIC_TYPE:
+				ReferenceBinding referenceBinding = (ReferenceBinding) type;
+				if (visitor.visit(referenceBinding)) {
+					visit(visitor, referenceBinding.enclosingType());
+					visit(visitor, referenceBinding.typeVariables());
+				}
+				break;
+			
+			case Binding.INTERSECTION_CAST_TYPE:
+				IntersectionCastTypeBinding intersectionCastTypeBinding = (IntersectionCastTypeBinding) type;
+				if (visitor.visit(intersectionCastTypeBinding))
+					visit(visitor, intersectionCastTypeBinding.intersectingTypes);
+				break;
+				
+			default:
+				throw new InternalError("Unexpected binding type"); //$NON-NLS-1$
+		}
+	}
+
+	public static void visit(TypeBindingVisitor visitor, TypeBinding[] types) {
+		for (int i = 0, length = types == null ? 0 : types.length; i < length; i++) {
+	        visit(visitor, types[i]);
+	    }
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
index b708a57..dacf483 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -14,6 +18,9 @@
  *								bug 400421 - [compiler] Null analysis for fields does not take @com.google.inject.Inject into account
  *								bug 382069 - [null] Make the null analysis consider JUnit's assertNotNull similarly to assertions
  *								Bug 405569 - Resource leak check false positive when using DbUtils.closeQuietly
+ *    Jesper S Moller - Contributions for
+ *								Bug 405066 - [1.8][compiler][codegen] Implement code generation infrastructure for JSR335
+ *								Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -84,7 +91,12 @@
     char[] UPPER_LOCAL_VARIABLE = "LOCAL_VARIABLE".toCharArray(); //$NON-NLS-1$
     char[] UPPER_ANNOTATION_TYPE = "ANNOTATION_TYPE".toCharArray(); //$NON-NLS-1$
     char[] UPPER_PACKAGE = "PACKAGE".toCharArray(); //$NON-NLS-1$
+    char[] ANONYMOUS_METHOD = "lambda$".toCharArray(); //$NON-NLS-1$
     
+	// jsr308
+	char[] TYPE_USE_TARGET  = "TYPE_USE".toCharArray(); //$NON-NLS-1$
+	char[] TYPE_PARAMETER_TARGET = "TYPE_PARAMETER".toCharArray(); //$NON-NLS-1$
+
     // common 3rd party package components:
     char[] ORG = "org".toCharArray(); //$NON-NLS-1$
     char[] ECLIPSE = "eclipse".toCharArray(); //$NON-NLS-1$
@@ -140,7 +152,9 @@
 	char[][] JAVA_LANG_DEPRECATED = {JAVA, LANG, "Deprecated".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_ANNOTATION_DOCUMENTED = {JAVA, LANG, ANNOTATION, "Documented".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_ANNOTATION_INHERITED = {JAVA, LANG, ANNOTATION, "Inherited".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_ANNOTATION_REPEATABLE = {JAVA, LANG, ANNOTATION, "Repeatable".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_OVERRIDE = {JAVA, LANG, "Override".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_FUNCTIONAL_INTERFACE = {JAVA, LANG, "FunctionalInterface".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_ANNOTATION_RETENTION = {JAVA, LANG, ANNOTATION, "Retention".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_SUPPRESSWARNINGS = {JAVA, LANG, "SuppressWarnings".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_ANNOTATION_TARGET = {JAVA, LANG, ANNOTATION, "Target".toCharArray()}; //$NON-NLS-1$
@@ -176,6 +190,8 @@
 			INVOKE,
 			"MethodHandle$PolymorphicSignature".toCharArray() //$NON-NLS-1$
 	};
+	char[][] JAVA_LANG_INVOKE_LAMBDAMETAFACTORY = {JAVA, LANG, INVOKE, "LambdaMetafactory".toCharArray()}; //$NON-NLS-1$
+	char[][] JAVA_LANG_INVOKE_METHODHANDLES = {JAVA, LANG, INVOKE, "MethodHandles".toCharArray()}; //$NON-NLS-1$
 	char[][] JAVA_LANG_AUTOCLOSEABLE =  {JAVA, LANG, "AutoCloseable".toCharArray()}; //$NON-NLS-1$
 	char[] CLOSE = "close".toCharArray(); //$NON-NLS-1$
 	// known helper functions for closing a Closeable (all receive a Closeable as their first argument):
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java
index e19710a..cae2eb1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeIds.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contributions for
@@ -14,6 +18,8 @@
  *								bug 358903 - Filter practically unimportant resource leak warnings
  *								bug 400421 - [compiler] Null analysis for fields does not take @com.google.inject.Inject into account
  *								bug 382069 - [null] Make the null analysis consider JUnit's assertNotNull similarly to assertions
+ *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
+ *								Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -119,11 +125,17 @@
 	final int T_ComGoogleCommonBasePreconditions = 73;
 	final int T_JavaUtilObjects = 74;
 
+	// java 8
+	final int T_JavaLangFunctionalInterface = 77;
+
 	// new in 3.9 to identify known @Inject annotations
 	final int T_JavaxInjectInject = 80;
 	final int T_ComGoogleInjectInject = 81;
-
-
+	// Java 8 - JEP 120
+	final int T_JavaLangAnnotationRepeatable = 90;
+	// If you add new type id, make sure to bump up T_LastWellKnownTypeId if there is a cross over.
+	final int T_LastWellKnownTypeId = 128;
+	
 	final int NoId = Integer.MAX_VALUE;
 
 	public static final int IMPLICIT_CONVERSION_MASK = 0xFF;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
new file mode 100644
index 0000000..6206380
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
@@ -0,0 +1,450 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.lookup;
+
+import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
+import org.eclipse.jdt.internal.compiler.util.Util;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
+import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
+
+/* TypeSystem: An abstraction responsible for keeping track of types that undergo "derivation" of some sort and the derived types produced thus.
+   Here we use the term derivation in the Pascal sense and not per object oriented parlance.
+   
+   As of Java SE8, a type can undergo derivation in a bunch of ways:
+   
+       - By being created arrays out of,
+       - By being parameterized,
+       - By being created raw forms of,
+       - By being the generic type which a wildcard type or an intersection type parameterizes,
+       - By being annotated.
+       
+   It is the responsibility of the TypeSystem to serve as the factory and ensure that unique types are created and maintained. Most of the
+   compiler depends on object identity given the derivation parameters are the same. E.g: If we dole out non-unique ParameterizedTypeBinding's
+   for two attempts to create List<String>, then one cannot be assigned to the other.
+   
+   Till Java SE7, we could manage to create a single binding for a type - not so with annotations coming into the picture. In order for
+   two uses of the same type to be annotated differently, the bindings for them need to be distinct and cannot be shared. If we start
+   doling out different bindings, then validating type identity and equivalence becomes an issue.
+   
+   What we do to solve the problem is produce different bindings when they need to be annotated differently, but stamp them with the
+   same id (TypeBinding#id). Thus types that fail == or != could quickly be ascertained to be mere annotation variants by comparing
+   the id field.
+       
+   This class is responsible for id stamping unique types. Only those types that are "derived from" in some form or participate in the 
+   derivation in some form (by being type arguments say) get tracked and id'd here. A type which is not thus derived from in one form or 
+   the other or participate in the derivation thus - we are completely oblivious to.
+   
+   TypeBinding.id computation: For primitive types and certain "well known" types, id assignment happens elsewhere. Here we start with an 
+   id value that is suitably high and proceed monotonically upwards so we will not accidentally collide with the id space in use already. 
+   id assignments happens in such a way that a naked type and its annotated variants - variously annotated - would all share the same id. 
+   Example: @T1 Map<@T2 String, @T3 Object> and Map<@T4 String, @T5 Object> and @T6 Map<String, Object> and @T7 Map<String, @T8 Object> and 
+   Map<String, @T9 Object> would all share the same id since the unadorned naked type in each case is the same: Map<String, Object>. None 
+   of this would share the id with Map<String, String>. Briefly put, if you take a certain annotated type and strip it of all annotations 
+   to come up with the naked type, that naked type and the annotated type would have the same id. Alternately, if you take a certain naked 
+   type and arrive at the universe of all differently annotated types, they would all share the same id while their bindings could be different - 
+   would be different unless they are identically annotated.
+   
+   Thus subsystems that are annotation agnostic could quickly ascertain binding equality by comparing the id field.
+*/
+public class TypeSystem {
+	
+	private int typeid = TypeIds.T_LastWellKnownTypeId;
+	private TypeBinding [][] types; 
+	private SimpleLookupTable annotationTypes; // cannot store in types, since AnnotationBinding is not a TypeBinding and we don't want types to operate at Binding level.
+	private LookupEnvironment environment;
+	
+	public TypeSystem(LookupEnvironment environment) {
+		this.environment = environment;
+		this.annotationTypes = new SimpleLookupTable(16);
+		this.typeid = TypeIds.T_LastWellKnownTypeId;
+		this.types = new TypeBinding[TypeIds.T_LastWellKnownTypeId * 2][]; 
+	}
+
+	// Given a type, answer its unannotated aka naked prototype. This is also a convenient way to "register" a type with TypeSystem and have it id stamped.
+	public final TypeBinding getUnannotatedType(TypeBinding type) {
+		if (type.id == TypeIds.NoId) {
+			if (type.hasTypeAnnotations())
+				throw new IllegalStateException();
+			int typesLength = this.types.length;
+			if (this.typeid == typesLength)
+				System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength);
+			this.types[type.id = this.typeid++] = new TypeBinding[4];
+		} else {
+			TypeBinding nakedType = this.types[type.id] == null ? null : this.types[type.id][0];
+			if (type.hasTypeAnnotations() && nakedType == null)
+				throw new IllegalStateException();
+			if (nakedType != null)
+				return nakedType;
+			this.types[type.id] = new TypeBinding[4];  // well known type, assigned id elsewhere.
+		}
+	
+		return this.types[type.id][0] = type;
+	}
+	
+	// Given a type, return all its variously annotated versions.
+	public TypeBinding[] getAnnotatedTypes(TypeBinding type) {
+		return Binding.NO_TYPES;
+	}
+
+	/* Note: parameters will not have type type annotations if lookup environment directly uses TypeSystem as its typeSystem. When ATS is used however
+	   they may be annotated and we need to materialize the unannotated versions and work on them.
+	*/ 
+	public ArrayBinding getArrayType(TypeBinding leafType, int dimensions) {
+		TypeBinding unannotatedLeafType = getUnannotatedType(leafType);
+		TypeBinding[] derivedTypes = this.types[unannotatedLeafType.id];
+		int i, length = derivedTypes.length;
+		for (i = 0; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) 
+				break;
+			if (!derivedType.isArrayType() || derivedType.hasTypeAnnotations())
+				continue;
+			if (derivedType.leafComponentType() == unannotatedLeafType && derivedType.dimensions() == dimensions) //$IDENTITY-COMPARISON$
+				return (ArrayBinding) derivedType;
+		}
+		if (i == length) {
+			System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
+			this.types[unannotatedLeafType.id] = derivedTypes;
+		}
+		TypeBinding arrayType = derivedTypes[i] = new ArrayBinding(unannotatedLeafType, dimensions, this.environment);
+		int typesLength = this.types.length;
+		if (this.typeid == typesLength)
+			System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength);
+		this.types[this.typeid] = new TypeBinding[1];
+		return (ArrayBinding) (this.types[arrayType.id = this.typeid++][0] = arrayType);
+	}
+	
+	public ArrayBinding getArrayType(TypeBinding leafComponentType, int dimensions, AnnotationBinding[] annotations) {
+		return getArrayType(leafComponentType, dimensions);
+	}
+
+	public ReferenceBinding getMemberType(ReferenceBinding memberType, ReferenceBinding enclosingType) {
+		return memberType;  // nothing to do for plain vanilla type system, they are already hooked.
+	}
+
+	/* Note: parameters will not have type type annotations if lookup environment directly uses TypeSystem. When AnnotatableTypeSystem is in use
+	   they may and we need to materialize the unannotated versions and work on them.
+	*/ 
+	public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType) {
+//{ObjectTeams: more arguments for role types:
+		return getParameterizedType(genericType, typeArguments, null, -1, enclosingType);
+	}
+	public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments,
+										ITeamAnchor teamAnchor, int valueParamPosition, ReferenceBinding enclosingType) {
+		if (teamAnchor == null && genericType instanceof DependentTypeBinding)
+			teamAnchor = ((DependentTypeBinding) genericType)._teamAnchor;
+// SH}
+
+		ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType);
+		int typeArgumentsLength = typeArguments == null ? 0: typeArguments.length;
+		TypeBinding [] unannotatedTypeArguments = typeArguments == null ? null : new TypeBinding[typeArgumentsLength];
+		for (int i = 0; i < typeArgumentsLength; i++) {
+			unannotatedTypeArguments[i] = getUnannotatedType(typeArguments[i]);
+		}
+		ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType);
+		
+		TypeBinding[] derivedTypes = this.types[unannotatedGenericType.id];
+		int i, length = derivedTypes.length;
+		for (i = 0 ; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) 
+				break;
+//{ObjectTeams: parameterized and/or anchored?
+/* orig:
+			if (!derivedType.isParameterizedType() || derivedType.actualType() != unannotatedGenericType || derivedType.hasTypeAnnotations()) //$IDENTITY-COMPARISON$
+				continue;
+  :giro */
+			if (!(derivedType instanceof ParameterizedTypeBinding)) // roles might answer 'false' to isParameterized(), still they are valid candidates, here
+				continue;
+			if (derivedType.actualType() != unannotatedGenericType) //$IDENTITY-COMPARISON$
+				continue;
+			if (derivedType.isRawType() && unannotatedTypeArguments != null)
+				continue;
+			// also match team anchor if given:
+			if (!isRoleTypeMatch(teamAnchor, valueParamPosition, derivedType))
+				continue;
+//SH}
+
+			if (derivedType.enclosingType() == unannotatedEnclosingType && Util.effectivelyEqual(derivedType.typeArguments(), unannotatedTypeArguments)) //$IDENTITY-COMPARISON$
+				return (ParameterizedTypeBinding) derivedType;
+		}
+
+		if (i == length) {
+			System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
+			this.types[unannotatedGenericType.id] = derivedTypes;
+		}
+//{ObjectTeams: dependent type?
+/* orig:	
+		TypeBinding parameterizedType = derivedTypes[i] = new ParameterizedTypeBinding(unannotatedGenericType, unannotatedTypeArguments, unannotatedEnclosingType, this.environment);
+  :giro */
+		ParameterizedTypeBinding parameterizedType;
+		if (teamAnchor == null) {
+			parameterizedType = new ParameterizedTypeBinding(unannotatedGenericType,unannotatedTypeArguments, unannotatedEnclosingType, this.environment);
+		} else {
+			if (genericType.isRole()) {
+				parameterizedType = new RoleTypeBinding(unannotatedGenericType, unannotatedTypeArguments, teamAnchor, unannotatedEnclosingType, this.environment);
+			} else {
+				parameterizedType = new DependentTypeBinding(unannotatedGenericType, unannotatedTypeArguments, teamAnchor, valueParamPosition, unannotatedEnclosingType, this.environment);
+			}
+		}
+		derivedTypes[i] = parameterizedType;
+// SH}
+
+	
+		int typesLength = this.types.length;
+		if (this.typeid == typesLength)
+			System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength);
+		this.types[this.typeid] = new TypeBinding[1];
+		return (ParameterizedTypeBinding) (this.types[parameterizedType.id = this.typeid++][0] = parameterizedType);
+	}
+	
+//{ObjectTeams: more parameters:
+/* orig:
+	public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments, ReferenceBinding enclosingType, AnnotationBinding[] annotations) {
+		return getParameterizedType(genericType, typeArguments, enclosingType);
+  :giro */
+	public ParameterizedTypeBinding getParameterizedType(ReferenceBinding genericType, TypeBinding[] typeArguments,
+					ITeamAnchor teamAnchor, int valueParamPosition, ReferenceBinding enclosingType, AnnotationBinding[] annotations) {
+		return getParameterizedType(genericType, typeArguments, teamAnchor, valueParamPosition, enclosingType);
+// SH}
+	}
+
+	/* Note: Parameters will not have type type annotations if lookup environment directly uses TypeSystem. However when AnnotatableTypeSystem is in use,
+	   they may and we need to materialize the unannotated versions and work on them.
+	*/ 
+	public RawTypeBinding getRawType(ReferenceBinding genericType, ReferenceBinding enclosingType) {
+		ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType);
+		ReferenceBinding unannotatedEnclosingType = enclosingType == null ? null : (ReferenceBinding) getUnannotatedType(enclosingType);
+	
+		TypeBinding[] derivedTypes = this.types[unannotatedGenericType.id];
+		int i, length = derivedTypes.length;
+		for (i = 0; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) 
+				break;
+			if (!derivedType.isRawType() || derivedType.actualType() != unannotatedGenericType || derivedType.hasTypeAnnotations()) //$IDENTITY-COMPARISON$
+				continue;
+			if (derivedType.enclosingType() == unannotatedEnclosingType) //$IDENTITY-COMPARISON$
+				return (RawTypeBinding) derivedType;
+		}
+
+		if (i == length) {
+			System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
+			this.types[unannotatedGenericType.id] = derivedTypes;
+		}
+		
+		TypeBinding rawTytpe = derivedTypes[i] = new RawTypeBinding(unannotatedGenericType, unannotatedEnclosingType, this.environment);
+		int typesLength = this.types.length;
+		if (this.typeid == typesLength)
+			System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength);
+		this.types[this.typeid] = new TypeBinding[1];
+		return (RawTypeBinding) (this.types[rawTytpe.id = this.typeid++][0] = rawTytpe);
+	}
+	
+	public RawTypeBinding getRawType(ReferenceBinding genericType, ReferenceBinding enclosingType, AnnotationBinding[] annotations) {
+		return getRawType(genericType, enclosingType);
+	}
+
+	/* Parameters will not have type type annotations if lookup environment directly uses TypeSystem. When AnnotatableTypeSystem is in use,
+	   they may and we need to materialize the unannotated versions and work on them.
+	*/ 
+	public WildcardBinding getWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind) {
+		if (genericType == null) // pseudo wildcard denoting composite bounds for lub computation
+			genericType = ReferenceBinding.LUB_GENERIC;
+		
+		ReferenceBinding unannotatedGenericType = (ReferenceBinding) getUnannotatedType(genericType);
+		int otherBoundsLength = otherBounds == null ? 0: otherBounds.length;
+		TypeBinding [] unannotatedOtherBounds = otherBounds == null ? null : new TypeBinding[otherBoundsLength];
+		for (int i = 0; i < otherBoundsLength; i++) {
+			unannotatedOtherBounds[i] = getUnannotatedType(otherBounds[i]);
+		}
+		TypeBinding unannotatedBound = bound == null ? null : getUnannotatedType(bound);
+
+		TypeBinding[] derivedTypes = this.types[unannotatedGenericType.id];  // by construction, cachedInfo != null now.
+		int i, length = derivedTypes.length;
+		for (i = 0; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) 
+				break;
+			if (!derivedType.isWildcard() || derivedType.actualType() != unannotatedGenericType || derivedType.hasTypeAnnotations()) //$IDENTITY-COMPARISON$
+				continue;
+			if (derivedType.rank() != rank || derivedType.boundKind() != boundKind || derivedType.bound() != unannotatedBound) //$IDENTITY-COMPARISON$
+				continue;
+			if (Util.effectivelyEqual(derivedType.additionalBounds(), unannotatedOtherBounds))
+				return (WildcardBinding) derivedType;
+		}
+		
+		if (i == length) {
+			System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
+			this.types[unannotatedGenericType.id] = derivedTypes;
+		}
+		TypeBinding wildcard = derivedTypes[i] = new WildcardBinding(unannotatedGenericType, rank, unannotatedBound, unannotatedOtherBounds, boundKind, this.environment);
+	
+		int typesLength = this.types.length;
+		if (this.typeid == typesLength)
+			System.arraycopy(this.types, 0, this.types = new TypeBinding[typesLength * 2][], 0, typesLength);
+		this.types[this.typeid] = new TypeBinding[1];
+		return (WildcardBinding) (this.types[wildcard.id = this.typeid++][0] = wildcard);
+	}
+	
+	public WildcardBinding getWildcard(ReferenceBinding genericType, int rank, TypeBinding bound, TypeBinding[] otherBounds, int boundKind, AnnotationBinding[] annotations) {
+		return getWildcard(genericType, rank, bound, otherBounds, boundKind);
+	}
+
+	public TypeBinding getAnnotatedType(TypeBinding type, AnnotationBinding[][] annotations) {
+		return type; // Nothing to do for plain vanilla type system.
+	}
+	
+	protected final TypeBinding /* @NonNull */ [] getDerivedTypes(TypeBinding keyType) {
+		keyType = getUnannotatedType(keyType);
+		return this.types[keyType.id];
+	}
+	
+	private TypeBinding cacheDerivedType(TypeBinding keyType, TypeBinding derivedType) {
+		if (keyType == null || derivedType == null || keyType.id == TypeIds.NoId)
+			throw new IllegalStateException();
+		
+		TypeBinding[] derivedTypes = this.types[keyType.id];
+		int i = 0, length = derivedTypes.length;
+		while (i < length && derivedTypes[i] != null) {
+			i++;
+		}
+		if (i == length) {
+			System.arraycopy(derivedTypes, 0, derivedTypes = new TypeBinding[length * 2], 0, length);
+			this.types[keyType.id] = derivedTypes;
+		}
+		return derivedTypes[i] = derivedType;
+	}
+	
+	protected final TypeBinding cacheDerivedType(TypeBinding keyType, TypeBinding nakedType, TypeBinding derivedType) {
+		
+		/* Cache the derived type, tagging it as a derivative of both the key type and the naked type.
+		   E.g: int @NonNull [] would be tagged as a derived type of both int and int []. This is not
+		   needed for correctness, but for annotated object reuse. We provide two alternate ways to
+		   annotate a type: 
+		   
+		   Taking parameterized types as an example, a call to getParamaterizedType can be made with annotations
+		   to create @NonNull List<@NonNull String> in one stroke. Or a parameterized type can be created first
+		   and then annotated via getAnnotatedType. In the former case, the tables get looked up with List as
+		   the key, in the latter with List<String> as the key.
+		   
+		   Binary vs source, substitutions, annotation re-attribution from SE7 locations etc trigger these
+		   alternate code paths. Unless care is exercised, we will end up with duplicate objects (that share
+		   the same TypeBinding.id => correctness is not an issue, but memory wastage is)
+		*/
+		cacheDerivedType(keyType, derivedType);
+		if (nakedType.id != keyType.id) {
+			cacheDerivedType(nakedType, derivedType);
+		}
+		return derivedType;
+	}
+	
+	/* Return a unique annotation binding for an annotation with either no or all default element-value pairs.
+	   We may return a resolved annotation when requested for unresolved one, but not vice versa. 
+	*/
+	public final AnnotationBinding getAnnotationType(ReferenceBinding annotationType, boolean requiredResolved) {
+		AnnotationBinding annotation = (AnnotationBinding) this.annotationTypes.get(annotationType);
+		if (annotation == null) {
+			if (requiredResolved)
+				annotation = new AnnotationBinding(annotationType, Binding.NO_ELEMENT_VALUE_PAIRS);
+			else 
+				annotation = new UnresolvedAnnotationBinding(annotationType, Binding.NO_ELEMENT_VALUE_PAIRS, this.environment);
+			this.annotationTypes.put(annotationType, annotation);
+		}
+		if (requiredResolved)
+			annotation.resolve();
+		return annotation;
+	}
+
+	public boolean isAnnotatedTypeSystem() {
+		return false;
+	}
+
+	public void reset() {
+		this.annotationTypes = new SimpleLookupTable(16);
+		this.typeid = TypeIds.T_LastWellKnownTypeId;
+		this.types = new TypeBinding[TypeIds.T_LastWellKnownTypeId * 2][];
+	}
+	
+	public void updateCaches(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType) {
+		final int unresolvedTypeId = unresolvedType.id;
+		if (unresolvedTypeId != TypeIds.NoId) {
+			if (this.types[unresolvedTypeId] != null && this.types[unresolvedTypeId][0] == unresolvedType) { //$IDENTITY-COMPARISON$
+				resolvedType.id = unresolvedTypeId;
+				this.types[unresolvedTypeId][0] = resolvedType;
+			}
+		}
+		if (this.annotationTypes.get(unresolvedType) != null) { // update the key
+			Object[] keys = this.annotationTypes.keyTable;
+			for (int i = 0, l = keys.length; i < l; i++) {
+				if (keys[i] == unresolvedType) {
+					keys[i] = resolvedType; // hashCode is based on compoundName so this works.
+					break;
+				}
+			}
+		}
+	}
+
+	public final TypeBinding getIntersectionCastType(ReferenceBinding[] intersectingTypes) {
+		int intersectingTypesLength = intersectingTypes == null ? 0 : intersectingTypes.length;
+		if (intersectingTypesLength == 0)
+			return null;
+		TypeBinding keyType = intersectingTypes[0];
+		if (keyType == null || intersectingTypesLength == 1)
+			return keyType;
+					
+		TypeBinding[] derivedTypes = getDerivedTypes(keyType);
+		int i, length = derivedTypes.length;
+		next:
+		for (i = 0; i < length; i++) {
+			TypeBinding derivedType = derivedTypes[i];
+			if (derivedType == null) 
+				break;
+			if (!derivedType.isIntersectionCastType())
+				continue;
+			ReferenceBinding [] priorIntersectingTypes = derivedType.getIntersectingTypes();
+			if (priorIntersectingTypes.length != intersectingTypesLength)
+				continue;
+			for (int j = 0; j < intersectingTypesLength; j++) {
+				if (intersectingTypes[j] != priorIntersectingTypes[j]) //$IDENTITY-COMPARISON$
+					continue next;
+			}	
+			return derivedType;
+		}
+		return cacheDerivedType(keyType, new IntersectionCastTypeBinding(intersectingTypes, this.environment));
+	}
+
+//{ObjectTeams: compare role types:
+	boolean isRoleTypeMatch(ITeamAnchor teamAnchor, int valueParamPosition, TypeBinding cachedType) {
+		if (teamAnchor != null) {
+			if (!(cachedType instanceof DependentTypeBinding))
+				return false;
+			if (!((DependentTypeBinding)cachedType)._teamAnchor.hasSameBestNameAs(teamAnchor))
+				return false;
+		}
+		if (   valueParamPosition > -1 							// position specified, requires dependent type
+		    && !(cachedType instanceof DependentTypeBinding))
+			return false;
+		if (   (cachedType instanceof DependentTypeBinding)		// dependent type specified, positions must match
+		    && ((DependentTypeBinding)cachedType)._valueParamPosition != valueParamPosition)
+			return false;
+		if (teamAnchor == null && RoleTypeBinding.isRoleType(cachedType)) // role type found though not requested?
+			return false;
+		return true;
+	}
+//SH}
+
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
index 71c2791..ea99164 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -14,16 +18,25 @@
  *     							bug 359362 - FUP of bug 349326: Resource leak on non-Closeable resource
  *								bug 358903 - Filter practically unimportant resource leak warnings
  *								bug 395002 - Self bound generic class doesn't resolve bounds properly for wildcards for certain parametrisation.
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
 import org.eclipse.jdt.core.compiler.CharOperation;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
+import org.eclipse.jdt.internal.compiler.ast.ASTNode;
+import org.eclipse.jdt.internal.compiler.ast.NullAnnotationMatching;
+import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
+import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.CallinCalloutBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.ITeamAnchor;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel;
+import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator.TypeArgumentUpdater;
 
 /**
  * Binding for a type parameter, held by source/binary type or method.
@@ -37,11 +50,11 @@
 	 * Denote the first explicit (binding) bound amongst the supertypes (from declaration in source)
 	 * If no superclass was specified, then it denotes the first superinterface, or null if none was specified.
 	 */
-	public TypeBinding firstBound;
+	public TypeBinding firstBound;             // MUST NOT be modified directly, use setter !
 
 	// actual resolved variable supertypes (if no superclass bound, then associated to Object)
-	public ReferenceBinding superclass;
-	public ReferenceBinding[] superInterfaces;
+	public ReferenceBinding superclass;        // MUST NOT be modified directly, use setter !
+	public ReferenceBinding[] superInterfaces; // MUST NOT be modified directly, use setter !
 //{ObjectTeams: additions: 
 	// bound in <B base R>:
 	public ReferenceBinding roletype;
@@ -60,6 +73,19 @@
 		this.environment = environment;
 		this.typeBits = TypeIds.BitUninitialized;
 	}
+	
+	public TypeVariableBinding(TypeVariableBinding prototype) {
+		super(prototype);
+		this.declaringElement = prototype.declaringElement;
+		this.rank = prototype.rank;
+		this.firstBound = prototype.firstBound;
+		this.superclass = prototype.superclass;
+		this.superInterfaces = prototype.superInterfaces;
+		this.genericTypeSignature = prototype.genericTypeSignature;
+		this.environment = prototype.environment;
+		prototype.tagBits |= TagBits.HasAnnotatedVariants;
+		this.tagBits &= ~TagBits.HasAnnotatedVariants;
+	}
 
 	/**
 	 * Returns true if the argument type satisfies all bounds of the type parameter
@@ -85,7 +111,7 @@
 //{ObjectTeams: added optional argument actualReceiverType:
 	private int internalBoundCheck(Substitution substitution, TypeBinding argumentType, ReferenceBinding actualReceiverType, Scope scope) {
 // SH}
-		if (argumentType == TypeBinding.NULL || argumentType == this) {
+		if (argumentType == TypeBinding.NULL || TypeBinding.equalsEquals(argumentType, this)) {
 			return TypeConstants.OK;
 		}
 		boolean hasSubstitution = substitution != null;
@@ -101,7 +127,7 @@
 			switch(wildcard.boundKind) {
 				case Wildcard.EXTENDS :
 					TypeBinding wildcardBound = wildcard.bound;
-					if (wildcardBound == this)
+					if (TypeBinding.equalsEquals(wildcardBound, this))
 						return TypeConstants.OK;
 					boolean isArrayBound = wildcardBound.isArrayType();
 					if (!wildcardBound.isInterface()) {
@@ -165,7 +191,7 @@
 		boolean unchecked = false;
 		if (this.superclass.id != TypeIds.T_JavaLangObject) {
 			TypeBinding substitutedSuperType = hasSubstitution ? Scope.substitute(substitution, this.superclass) : this.superclass;
-	    	if (substitutedSuperType != argumentType) {
+	    	if (TypeBinding.notEquals(substitutedSuperType, argumentType)) {
 				if (!argumentType.isCompatibleWith(substitutedSuperType, scope)) {
 				    return TypeConstants.MISMATCH;
 				}
@@ -220,7 +246,7 @@
 // SH}
 	    for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
 			TypeBinding substitutedSuperType = hasSubstitution ? Scope.substitute(substitution, this.superInterfaces[i]) : this.superInterfaces[i];
-	    	if (substitutedSuperType != argumentType) {
+	    	if (TypeBinding.notEquals(substitutedSuperType, argumentType)) {
 				if (!argumentType.isCompatibleWith(substitutedSuperType, scope)) {
 				    return TypeConstants.MISMATCH;
 				}
@@ -232,13 +258,20 @@
 				}
 	    	}
 	    }
+	    long nullTagBits = NullAnnotationMatching.validNullTagBits(this.tagBits);
+	    if (nullTagBits != 0) {
+	    	long argBits = NullAnnotationMatching.validNullTagBits(argumentType.tagBits);
+	    	if (argBits != nullTagBits) {
+//	    		System.err.println("TODO(stephan): issue proper error: bound conflict at "+String.valueOf(this.declaringElement.readableName()));
+	    	}
+	    }
 	    return unchecked ? TypeConstants.UNCHECKED : TypeConstants.OK;
 	}
 
 	public int boundsCount() {
 		if (this.firstBound == null) {
 			return 0;
-		} else if (this.firstBound == this.superclass) {
+		} else if (TypeBinding.equalsEquals(this.firstBound, this.superclass)) {
 			return this.superInterfaces.length + 1;
 		} else {
 			return this.superInterfaces.length;
@@ -252,6 +285,31 @@
 			return null;
 		return (VariableBinding) this.anchors[typeParamPosition];
 	}
+	
+	boolean inRecursiveFunction = false;
+	
+	@Override
+	public TypeBinding maybeWrapRoleType(ASTNode typedNode, TypeArgumentUpdater updater) {
+    	// inplace modifying the type variable. TODO(SH): is this ok, or do we need a copy?
+		if (this.inRecursiveFunction)
+			return this;
+		this.inRecursiveFunction = true;
+		try {
+			if (this.firstBound != null) {
+				if (this.firstBound instanceof ReferenceBinding)
+					this.firstBound= updater.updateArg((ReferenceBinding) this.firstBound);
+				else
+					this.firstBound = this.firstBound.maybeWrapRoleType(typedNode, updater);
+			}
+	    	this.superclass=  (ReferenceBinding) updater.updateArg(this.superclass);
+	    	if (this.superInterfaces != null)
+	        	for (int i = 0; i < this.superInterfaces.length; i++)
+					this.superInterfaces[i]= (ReferenceBinding)updater.updateArg(this.superInterfaces[i]);
+		} finally {
+			this.inRecursiveFunction = false;
+		}
+    	return this;
+	}
 // SH}
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#canBeInstantiated()
@@ -277,9 +335,10 @@
 			case Binding.BASE_TYPE :
 				if (actualType == TypeBinding.NULL) return;
 				TypeBinding boxedType = scope.environment().computeBoxingType(actualType);
-				if (boxedType == actualType) return;
+				if (boxedType == actualType) return; //$IDENTITY-COMPARISON$
 				actualType = boxedType;
 				break;
+			case Binding.POLY_TYPE: // cannot steer inference, only learn from it.
 			case Binding.WILDCARD_TYPE :
 				return; // wildcards are not true type expressions (JLS 15.12.2.7, p.453 2nd discussion)
 		}
@@ -355,10 +414,35 @@
 	    }
 	    return this.superclass.constantPoolName(); // java/lang/Object
 	}
+	
+	public TypeBinding clone(TypeBinding enclosingType) {
+		return new TypeVariableBinding(this);
+	}
+	public String annotatedDebugName() {
+		StringBuffer buffer = new StringBuffer(10);
+		buffer.append(super.annotatedDebugName());
+		if (this.superclass != null && TypeBinding.equalsEquals(this.firstBound, this.superclass)) {
+		    buffer.append(" extends ").append(this.superclass.annotatedDebugName()); //$NON-NLS-1$
+		}
+		if (this.superInterfaces != null && this.superInterfaces != Binding.NO_SUPERINTERFACES) {
+		   if (TypeBinding.notEquals(this.firstBound, this.superclass)) {
+		        buffer.append(" extends "); //$NON-NLS-1$
+	        }
+		    for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
+		        if (i > 0 || TypeBinding.equalsEquals(this.firstBound, this.superclass)) {
+		            buffer.append(" & "); //$NON-NLS-1$
+		        }
+				buffer.append(this.superInterfaces[i].annotatedDebugName());
+			}
+		}
+		return buffer.toString();
+	}
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#debugName()
 	 */
 	public String debugName() {
+		if (this.hasTypeAnnotations())
+			return super.annotatedDebugName();
 	    return new String(this.sourceName);
 	}
 	public TypeBinding erasure() {
@@ -375,7 +459,7 @@
 	    StringBuffer sig = new StringBuffer(10);
 	    sig.append(this.sourceName).append(':');
 	   	int interfaceLength = this.superInterfaces == null ? 0 : this.superInterfaces.length;
-	    if (interfaceLength == 0 || this.firstBound == this.superclass) {
+	    if (interfaceLength == 0 || TypeBinding.equalsEquals(this.firstBound, this.superclass)) {
 	    	if (this.superclass != null)
 		        sig.append(this.superclass.genericTypeSignature());
 	    }
@@ -397,7 +481,7 @@
 	}
 
 	boolean hasOnlyRawBounds() {
-		if (this.superclass != null && this.firstBound == this.superclass)
+		if (this.superclass != null && TypeBinding.equalsEquals(this.firstBound, this.superclass))
 			if (!this.superclass.isRawType())
 				return false;
 
@@ -427,10 +511,10 @@
 	 * Returns true if the type variable is directly bound to a given type
 	 */
 	public boolean isErasureBoundTo(TypeBinding type) {
-		if (this.superclass.erasure() == type)
+		if (TypeBinding.equalsEquals(this.superclass.erasure(), type))
 			return true;
 		for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
-			if (this.superInterfaces[i].erasure() == type)
+			if (TypeBinding.equalsEquals(this.superInterfaces[i].erasure(), type))
 				return true;
 		}
 		return false;
@@ -446,19 +530,19 @@
 	 * List<T1>> is interchangeable with <T2 extends List<T2>>.
 	 */
 	public boolean isInterchangeableWith(TypeVariableBinding otherVariable, Substitution substitute) {
-		if (this == otherVariable)
+		if (TypeBinding.equalsEquals(this, otherVariable))
 			return true;
 		int length = this.superInterfaces.length;
 		if (length != otherVariable.superInterfaces.length)
 			return false;
 
-		if (this.superclass != Scope.substitute(substitute, otherVariable.superclass))
+		if (TypeBinding.notEquals(this.superclass, Scope.substitute(substitute, otherVariable.superclass)))
 			return false;
 
 		next : for (int i = 0; i < length; i++) {
 			TypeBinding superType = Scope.substitute(substitute, otherVariable.superInterfaces[i]);
 			for (int j = 0; j < length; j++)
-				if (superType == this.superInterfaces[j])
+				if (TypeBinding.equalsEquals(superType, this.superInterfaces[j]))
 					continue next;
 			return false; // not a match
 		}
@@ -500,7 +584,7 @@
 	public TypeBinding[] otherUpperBounds() {
 		if (this.firstBound == null)
 			return Binding.NO_TYPES;
-		if (this.firstBound == this.superclass)
+		if (TypeBinding.equalsEquals(this.firstBound, this.superclass))
 			return this.superInterfaces;
 		int otherLength = this.superInterfaces.length - 1;
 		if (otherLength > 0) {
@@ -538,11 +622,21 @@
 		if ((this.modifiers & ExtraCompilerModifiers.AccUnresolved) == 0)
 			return this;
 
+		long nullTagBits = this.tagBits & TagBits.AnnotationNullMASK;
+		
 		TypeBinding oldSuperclass = this.superclass, oldFirstInterface = null;
 		if (this.superclass != null) {
 			ReferenceBinding resolveType = (ReferenceBinding) BinaryTypeBinding.resolveType(this.superclass, this.environment, true /* raw conversion */);
 			this.tagBits |= resolveType.tagBits & TagBits.ContainsNestedTypeReferences;
-			this.superclass = resolveType;
+			long superNullTagBits = resolveType.tagBits & TagBits.AnnotationNullMASK;
+			if (superNullTagBits != 0L) {
+				if (nullTagBits == 0L) {
+					this.tagBits |= (superNullTagBits | TagBits.HasNullTypeAnnotation);
+				} else {
+//					System.err.println("TODO(stephan): report proper error: conflict binary TypeVariable vs. first bound");
+				}
+			}
+			this.setSuperClass(resolveType);
 		}
 		ReferenceBinding[] interfaces = this.superInterfaces;
 		int length;
@@ -551,20 +645,33 @@
 			for (int i = length; --i >= 0;) {
 				ReferenceBinding resolveType = (ReferenceBinding) BinaryTypeBinding.resolveType(interfaces[i], this.environment, true /* raw conversion */);
 				this.tagBits |= resolveType.tagBits & TagBits.ContainsNestedTypeReferences;
+				long superNullTagBits = resolveType.tagBits & TagBits.AnnotationNullMASK;
+				if (superNullTagBits != 0L) {
+					if (nullTagBits == 0L) {
+						this.tagBits |= (superNullTagBits | TagBits.HasNullTypeAnnotation);
+					} else {
+//						System.err.println("TODO(stephan): report proper error: conflict binary TypeVariable vs. bound "+i);
+					}
+				}
 				interfaces[i] = resolveType;
 			}
 		}
 		// refresh the firstBound in case it changed
 		if (this.firstBound != null) {
-			if (this.firstBound == oldSuperclass) {
-				this.firstBound = this.superclass;
-			} else if (this.firstBound == oldFirstInterface) {
-				this.firstBound = interfaces[0];
+			if (TypeBinding.equalsEquals(this.firstBound, oldSuperclass)) {
+				this.setFirstBound(this.superclass);
+			} else if (TypeBinding.equalsEquals(this.firstBound, oldFirstInterface)) {
+				this.setFirstBound(interfaces[0]);
 			}
 		}
 		this.modifiers &= ~ExtraCompilerModifiers.AccUnresolved;
 		return this;
 	}
+	
+	public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+		this.environment.getUnannotatedType(this); // exposes original TVB/capture to type system for id stamping purposes.
+		super.setTypeAnnotations(annotations, evalNullAnnotations);
+	}
 	/**
      * @see org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#shortReadableName()
      */
@@ -583,6 +690,8 @@
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
+		if (this.hasTypeAnnotations())
+			return annotatedDebugName();
 		StringBuffer buffer = new StringBuffer(10);
 		buffer.append('<').append(this.sourceName);//.append('[').append(this.rank).append(']');
 //{ObjectTeams:
@@ -590,15 +699,15 @@
 			buffer.append(" base ").append(this.roletype.debugName()); //$NON-NLS-1$
 		} else
 // SH}
-		if (this.superclass != null && this.firstBound == this.superclass) {
+		if (this.superclass != null && TypeBinding.equalsEquals(this.firstBound, this.superclass)) {
 		    buffer.append(" extends ").append(this.superclass.debugName()); //$NON-NLS-1$
 		}
 		if (this.superInterfaces != null && this.superInterfaces != Binding.NO_SUPERINTERFACES) {
-		   if (this.firstBound != this.superclass) {
+		   if (TypeBinding.notEquals(this.firstBound, this.superclass)) {
 		        buffer.append(" extends "); //$NON-NLS-1$
 	        }
 		    for (int i = 0, length = this.superInterfaces.length; i < length; i++) {
-		        if (i > 0 || this.firstBound == this.superclass) {
+		        if (i > 0 || TypeBinding.equalsEquals(this.firstBound, this.superclass)) {
 		            buffer.append(" & "); //$NON-NLS-1$
 		        }
 				buffer.append(this.superInterfaces[i].debugName());
@@ -608,6 +717,10 @@
 		return buffer.toString();
 	}
 
+	// May still carry declaration site annotations.
+	public TypeBinding unannotated() {
+		return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+	}
 	/**
 	 * Upper bound doesn't perform erasure
 	 */
@@ -617,4 +730,99 @@
 		}
 		return this.superclass; // java/lang/Object
 	}
+
+	public void evaluateNullAnnotations(Scope scope, TypeParameter parameter) {
+		long nullTagBits = NullAnnotationMatching.validNullTagBits(this.tagBits);
+		if (this.firstBound != null && this.firstBound.isValidBinding()) {
+			long superNullTagBits = NullAnnotationMatching.validNullTagBits(this.firstBound.tagBits);
+			if (superNullTagBits != 0L) {
+				if (nullTagBits == 0L) {
+					nullTagBits |= superNullTagBits;
+				} else if (superNullTagBits != nullTagBits) {
+					// not finding either bound or ann should be considered a compiler bug
+					TypeReference bound = findBound(this.firstBound, parameter);
+					Annotation ann = bound.findAnnotation(superNullTagBits);
+					scope.problemReporter().contradictoryNullAnnotationsOnBounds(ann, nullTagBits);
+					this.tagBits &= ~TagBits.AnnotationNullMASK;
+				}
+			}
+		}	
+		ReferenceBinding[] interfaces = this.superInterfaces;
+		int length;
+		if ((length = interfaces.length) != 0) {
+			for (int i = length; --i >= 0;) {
+				ReferenceBinding resolveType = interfaces[i];
+				long superNullTagBits = NullAnnotationMatching.validNullTagBits(resolveType.tagBits);
+				if (superNullTagBits != 0L) {
+					if (nullTagBits == 0L) {
+						nullTagBits |= superNullTagBits;
+					} else if (superNullTagBits != nullTagBits) {
+						// not finding either bound or ann should be considered a compiler bug
+						TypeReference bound = findBound(this.firstBound, parameter);
+						Annotation ann = bound.findAnnotation(superNullTagBits);
+						scope.problemReporter().contradictoryNullAnnotationsOnBounds(ann, nullTagBits);
+						this.tagBits &= ~TagBits.AnnotationNullMASK;
+					}
+				}
+				interfaces[i] = resolveType;
+			}
+		}
+		if (nullTagBits != 0)
+			this.tagBits |= nullTagBits | TagBits.HasNullTypeAnnotation;
+	}
+	private TypeReference findBound(TypeBinding bound, TypeParameter parameter) {
+		if (parameter.type != null && TypeBinding.equalsEquals(parameter.type.resolvedType, bound))
+			return parameter.type;
+		TypeReference[] bounds = parameter.bounds;
+		if (bounds != null) {
+			for (int i = 0; i < bounds.length; i++) {
+				if (TypeBinding.equalsEquals(bounds[i].resolvedType, bound))
+					return bounds[i];
+			}
+		}
+		return null;
+	}
+
+	/* An annotated type variable use differs from its declaration exactly in its annotations and in nothing else.
+	   Propagate writes to all annotated variants so the clones evolve along.
+	*/
+	public TypeBinding setFirstBound(TypeBinding firstBound) {
+		this.firstBound = firstBound;
+		if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+			TypeBinding [] annotatedTypes = this.environment.getAnnotatedTypes(this);
+			for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+				TypeVariableBinding annotatedType = (TypeVariableBinding) annotatedTypes[i];
+				annotatedType.firstBound = firstBound;
+			}
+		}
+		return firstBound;
+	}
+	/* An annotated type variable use differs from its declaration exactly in its annotations and in nothing else.
+	   Propagate writes to all annotated variants so the clones evolve along.
+	*/
+	public ReferenceBinding setSuperClass(ReferenceBinding superclass) {
+		this.superclass = superclass;
+		if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+			TypeBinding [] annotatedTypes = this.environment.getAnnotatedTypes(this);
+			for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+				TypeVariableBinding annotatedType = (TypeVariableBinding) annotatedTypes[i];
+				annotatedType.superclass = superclass;
+			}
+		}
+		return superclass;
+	}
+	/* An annotated type variable use differs from its declaration exactly in its annotations and in nothing else.
+	   Propagate writes to all annotated variants so the clones evolve along.
+	*/
+	public ReferenceBinding [] setSuperInterfaces(ReferenceBinding[] superInterfaces) {
+		this.superInterfaces = superInterfaces;
+		if ((this.tagBits & TagBits.HasAnnotatedVariants) != 0) {
+			TypeBinding [] annotatedTypes = this.environment.getAnnotatedTypes(this);
+			for (int i = 0, length = annotatedTypes == null ? 0 : annotatedTypes.length; i < length; i++) {
+				TypeVariableBinding annotatedType = (TypeVariableBinding) annotatedTypes[i];
+				annotatedType.superInterfaces = superInterfaces;
+			}
+		}
+		return superInterfaces;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedAnnotationBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedAnnotationBinding.java
index 57952ea..b859167 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedAnnotationBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedAnnotationBinding.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -19,7 +23,7 @@
 	this.env = env;
 }
 
-public ReferenceBinding getAnnotationType() {
+public void resolve() { // in place resolution.
 	if (this.typeUnresolved) { // the type is resolved when requested
 		boolean wasToleratingMissingTypeProcessingAnnotations = this.env.mayTolerateMissingType;
 		this.env.mayTolerateMissingType = true; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=388042
@@ -31,13 +35,16 @@
 		}
 		this.typeUnresolved = false;
 	}
+}
+public ReferenceBinding getAnnotationType() {
+	resolve();
 	return this.type;
 }
 
 public ElementValuePair[] getElementValuePairs() {
 	if (this.env != null) {
 		if (this.typeUnresolved) {
-			getAnnotationType(); // resolve the annotation type
+			resolve();
 		}
 		// resolve method binding and value type (if unresolved) for each pair
 		for (int i = this.pairs.length; --i >= 0;) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java
index 1683193..63f143f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/UnresolvedReferenceBinding.java
@@ -1,16 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: UnresolvedReferenceBinding.java 19873 2009-04-13 16:51:05Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann - Contribution for bug 349326 - [1.7] new warning for missing try-with-resources
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Stephan Herrmann - Contributions for
+ *								bug 349326 - [1.7] new warning for missing try-with-resources
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -20,6 +26,7 @@
 
 ReferenceBinding resolvedType;
 TypeBinding[] wrappers;
+UnresolvedReferenceBinding prototype;
 
 //{ObjectTeams: make visible to subclass:
 protected
@@ -29,7 +36,25 @@
 	this.sourceName = compoundName[compoundName.length - 1]; // reasonable guess
 	this.fPackage = packageBinding;
 	this.wrappers = null;
+	this.prototype = this;
+	computeId();
 }
+
+public UnresolvedReferenceBinding(UnresolvedReferenceBinding prototype) {
+	super(prototype);
+	this.resolvedType = prototype.resolvedType;
+	this.wrappers = null;
+	this.prototype = prototype.prototype;
+}
+
+public TypeBinding clone(TypeBinding outerType) {
+	if (this.resolvedType != null || this.depth() > 0)
+		throw new IllegalStateException();
+	UnresolvedReferenceBinding copy = new UnresolvedReferenceBinding(this);
+	this.addWrapper(copy, null);
+	return copy;
+}
+
 void addWrapper(TypeBinding wrapper, LookupEnvironment environment) {
 	if (this.resolvedType != null) {
 		// the type reference B<B<T>.M> means a signature of <T:Ljava/lang/Object;>LB<LB<TT;>.M;>;
@@ -45,23 +70,40 @@
 		this.wrappers[length] = wrapper;
 	}
 }
+public boolean isUnresolvedType() {
+	return true;
+}
 public String debugName() {
 	return toString();
 }
+public int depth() {
+	// we don't yet have our enclosing types wired, but we know the nesting depth from our compoundName:
+	int last = this.compoundName.length-1;
+	return CharOperation.occurencesOf('$', this.compoundName[last]);
+}
 public boolean hasTypeBit(int bit) {
 	// shouldn't happen since we are not called before analyseCode(), but play safe:
 	return false;
 }
+
+public TypeBinding prototype() {
+	return this.prototype;
+}
+
 //{ObjectTeams: changed to public (was default-vis)
 public ReferenceBinding resolve(LookupEnvironment environment, boolean convertGenericToRawType) {
 // SH}
+	if (this != this.prototype) { //$IDENTITY-COMPARISON$
+		this.prototype.resolve(environment, convertGenericToRawType);
+		return this.resolvedType;
+	}
     ReferenceBinding targetType = this.resolvedType;
 	if (targetType == null) {
 		targetType = this.fPackage.getType0(this.compoundName[this.compoundName.length - 1]);
-		if (targetType == this) {
+		if (targetType == this) { //$IDENTITY-COMPARISON$
 			targetType = environment.askForType(this.compoundName);
 		}
-		if (targetType == null || targetType == this) { // could not resolve any better, error was already reported against it
+		if (targetType == null || targetType == this) { // could not resolve any better, error was already reported against it //$IDENTITY-COMPARISON$
 			// report the missing class file first - only if not resolving a previously missing type
 			if ((this.tagBits & TagBits.HasMissingType) == 0 && !environment.mayTolerateMissingType) {
 				environment.problemReporter.isClassPathCorrect(
@@ -80,7 +122,7 @@
 	return targetType;
 }
 void setResolvedType(ReferenceBinding targetType, LookupEnvironment environment) {
-	if (this.resolvedType == targetType) return; // already resolved
+	if (this.resolvedType == targetType) return; // already resolved //$IDENTITY-COMPARISON$
 
 	// targetType may be a source or binary type
 	this.resolvedType = targetType;
@@ -91,7 +133,22 @@
 			this.wrappers[i].swapUnresolved(this, targetType, environment);
 	environment.updateCaches(this, targetType);
 }
+
+public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding unannotatedType, LookupEnvironment environment) {
+	if (this.resolvedType != null) return;
+	ReferenceBinding annotatedType = (ReferenceBinding) unannotatedType.clone(null);
+	this.resolvedType = annotatedType;
+	annotatedType.setTypeAnnotations(getTypeAnnotations(), environment.globalOptions.isAnnotationBasedNullAnalysisEnabled);
+	annotatedType.id = unannotatedType.id = this.id;
+	if (this.wrappers != null)
+		for (int i = 0, l = this.wrappers.length; i < l; i++)
+			this.wrappers[i].swapUnresolved(this, annotatedType, environment);
+	environment.updateCaches(this, annotatedType);
+}
+
 public String toString() {
+	if (this.hasTypeAnnotations())
+		return super.annotatedDebugName() + "(unresolved)"; //$NON-NLS-1$
 	return "Unresolved type " + ((this.compoundName != null) ? CharOperation.toString(this.compoundName) : "UNNAMED"); //$NON-NLS-1$ //$NON-NLS-2$
 }
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java
index 999fdad..99ad441 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VariableBinding.java
@@ -5,12 +5,17 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for
  *								bug 331649 - [compiler][null] consider null annotations for fields
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -80,12 +85,16 @@
 
 	/** Answer true if null annotations are enabled and this field is specified @NonNull */
 	public boolean isNonNull() {
-		return (this.tagBits & TagBits.AnnotationNonNull) != 0;
+		return (this.tagBits & TagBits.AnnotationNonNull) != 0
+				|| (this.type != null 
+					&& (this.type.tagBits & TagBits.AnnotationNonNull) != 0);
 	}
 
 	/** Answer true if null annotations are enabled and this field is specified @Nullable */
 	public boolean isNullable() {
-		return (this.tagBits & TagBits.AnnotationNullable) != 0;
+		return (this.tagBits & TagBits.AnnotationNullable) != 0
+				|| (this.type != null 
+				&& (this.type.tagBits & TagBits.AnnotationNullable) != 0);
 	}
 
 	public char[] readableName() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
new file mode 100644
index 0000000..0d12fa1
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/VoidTypeBinding.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.lookup;
+
+// Give it an identity of its own to discriminate the fact that this type is not annotatable and so is a singleton.
+public class VoidTypeBinding extends BaseTypeBinding {
+
+	VoidTypeBinding() {
+		super(TypeIds.T_void, TypeConstants.VOID, new char[] { 'V' });
+	}
+	
+	public TypeBinding clone(TypeBinding enclosingType) {
+		return this;  // enforce solitude.
+	}
+	
+	public void setTypeAnnotations(AnnotationBinding[] annotations, boolean evalNullAnnotations) {
+		return; // reject misguided attempt.
+	}
+	
+	public TypeBinding unannotated() {
+		return this;
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
index 7591fcd..b59677a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/WildcardBinding.java
@@ -1,16 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for
  *     							bug 349326 - [1.7] new warning for missing try-with-resources
  *     							bug 359362 - FUP of bug 349326: Resource leak on non-Closeable resource
- *     Technical University Berlin - extended API and implementation
+ *								bug 358903 - Filter practically unimportant resource leak warnings
+ *								Bug 417295 - [1.8[[null] Massage type annotated null analysis to gel well with deep encoded type bindings.
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.lookup;
 
@@ -21,7 +27,9 @@
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator;
+import org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator.TypeArgumentUpdater;
 
 /*
  * A wildcard acts as an argument for parameterized types, allowing to
@@ -50,12 +58,6 @@
 		this.modifiers = ClassFileConstants.AccPublic | ExtraCompilerModifiers.AccGenericSignature; // treat wildcard as public
 		this.environment = environment;
 		initialize(genericType, bound, otherBounds);
-
-//		if (!genericType.isGenericType() && !(genericType instanceof UnresolvedReferenceBinding)) {
-//			RuntimeException e = new RuntimeException("WILDCARD with NON GENERIC");
-//			e.printStackTrace();
-//			throw e;
-//		}
 		if (genericType instanceof UnresolvedReferenceBinding)
 			((UnresolvedReferenceBinding) genericType).addWrapper(this, environment);
 		if (bound instanceof UnresolvedReferenceBinding)
@@ -64,6 +66,7 @@
 		this.typeBits = TypeIds.BitUninitialized;
 	}
 
+
 //{ObjectTeams: role wrapping?
 	public TypeBinding maybeWrapQualifiedRoleType(Scope scope, Expression anchorExpr, ASTNode typedNode) {
     	TypeBinding wrappedBound = RoleTypeCreator.maybeWrapQualifiedRoleType(scope, anchorExpr, this.bound, typedNode);
@@ -72,8 +75,48 @@
     	// TODO: wrap otherBounds?
     	return new WildcardBinding(this.genericType, this.rank, wrappedBound, this.otherBounds, this.boundKind, this.environment);
     }
+	@Override
+	public TypeBinding maybeWrapRoleType(ASTNode typedNode, TypeArgumentUpdater updater) {
+		TypeBinding newBound = null;
+		boolean haveChange = false;
+		if (this.bound instanceof ReferenceBinding) {
+			newBound = updater.updateArg((ReferenceBinding) this.bound);
+			haveChange = newBound != this.bound;
+		}
+		TypeBinding[] newOtherBounds = null;
+		if (this.otherBounds != null) {
+			newOtherBounds = new TypeBinding[this.otherBounds.length];
+			for (int i = 0; i < this.otherBounds.length; i++) {
+				if (this.otherBounds[i] instanceof ReferenceBinding) {
+					newOtherBounds[i] = updater.updateArg((ReferenceBinding) this.otherBounds[i]);
+					haveChange |= newOtherBounds[i] != this.otherBounds[i];
+				} else {
+					newOtherBounds[i] = this.otherBounds[i];
+				}
+			}
+		}
+		if (!haveChange)
+			return this;
+		return this.environment.createWildcard(this.genericType, this.rank, newBound, newOtherBounds, this.boundKind);
+	}
 // SH}
 
+	TypeBinding bound() {
+		return this.bound;
+	}
+	
+	int boundKind() {
+		return this.boundKind;
+	}
+	
+	protected ReferenceBinding actualType() {
+		return this.genericType;
+	}
+	
+	TypeBinding[] additionalBounds() {
+		return this.otherBounds;
+	}
+	
 	public int kind() {
 		return this.otherBounds == null ? Binding.WILDCARD_TYPE : Binding.INTERSECTION_TYPE;
 	}
@@ -126,7 +169,7 @@
 	public void collectSubstitutes(Scope scope, TypeBinding actualType, InferenceContext inferenceContext, int constraint) {
 
 		if ((this.tagBits & TagBits.HasTypeVariable) == 0) return;
-		if (actualType == TypeBinding.NULL) return;
+		if (actualType == TypeBinding.NULL || actualType.kind() == POLY_TYPE) return;
 
 		if (actualType.isCapture()) {
 			CaptureBinding capture = (CaptureBinding) actualType;
@@ -390,6 +433,32 @@
 		return erasure().constantPoolName();
 	}
 
+	public TypeBinding clone(TypeBinding immaterial) {
+		return new WildcardBinding(this.genericType, this.rank, this.bound, this.otherBounds, this.boundKind, this.environment);
+	}
+	
+	public String annotatedDebugName() {
+		StringBuffer buffer = new StringBuffer(16);
+		AnnotationBinding [] annotations = getTypeAnnotations();
+		for (int i = 0, length = annotations == null ? 0 : annotations.length; i < length; i++) {
+			buffer.append(annotations[i]);
+			buffer.append(' ');
+		}
+		switch (this.boundKind) {
+            case Wildcard.UNBOUND :
+                return buffer.append(TypeConstants.WILDCARD_NAME).toString();
+            case Wildcard.EXTENDS :
+            	if (this.otherBounds == null)
+                	return buffer.append(CharOperation.concat(TypeConstants.WILDCARD_NAME, TypeConstants.WILDCARD_EXTENDS, this.bound.annotatedDebugName().toCharArray())).toString();
+            	buffer.append(this.bound.annotatedDebugName());
+            	for (int i = 0, length = this.otherBounds.length; i < length; i++) {
+            		buffer.append(" & ").append(this.otherBounds[i].annotatedDebugName()); //$NON-NLS-1$
+            	}
+            	return buffer.toString();
+			default: // SUPER
+			    return buffer.append(CharOperation.concat(TypeConstants.WILDCARD_NAME, TypeConstants.WILDCARD_SUPER, this.bound.annotatedDebugName().toCharArray())).toString();
+        }
+	}
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#debugName()
 	 */
@@ -460,12 +529,12 @@
 			this.fPackage = someGenericType.getPackage();
 		}
 		if (someBound != null) {
-			this.tagBits |= someBound.tagBits & (TagBits.HasTypeVariable | TagBits.HasMissingType | TagBits.ContainsNestedTypeReferences);
+			this.tagBits |= someBound.tagBits & (TagBits.HasTypeVariable | TagBits.HasMissingType | TagBits.ContainsNestedTypeReferences | TagBits.HasNullTypeAnnotation);
 		}
 		if (someOtherBounds != null) {
 			for (int i = 0, max = someOtherBounds.length; i < max; i++) {
 				TypeBinding someOtherBound = someOtherBounds[i];
-				this.tagBits |= someOtherBound.tagBits & TagBits.ContainsNestedTypeReferences;
+				this.tagBits |= someOtherBound.tagBits & (TagBits.ContainsNestedTypeReferences | TagBits.HasNullTypeAnnotation);
 			}
 		}
 	}
@@ -509,6 +578,10 @@
 	    return true;
 	}
 
+	int rank() {
+		return this.rank;
+	}
+	
     /* (non-Javadoc)
      * @see org.eclipse.jdt.internal.compiler.lookup.Binding#readableName()
      */
@@ -533,6 +606,33 @@
         }
     }
 
+    public char[] nullAnnotatedReadableName(CompilerOptions options, boolean shortNames) {
+    	StringBuffer buffer = new StringBuffer(10);
+    	appendNullAnnotation(buffer, options);
+        switch (this.boundKind) {
+            case Wildcard.UNBOUND :
+                buffer.append(TypeConstants.WILDCARD_NAME);
+                break;
+            case Wildcard.EXTENDS :
+            	if (this.otherBounds == null) {
+            		buffer.append(TypeConstants.WILDCARD_NAME).append(TypeConstants.WILDCARD_EXTENDS);
+            		buffer.append(shortNames ? this.bound.shortReadableName(): this.bound.readableName());
+            	} else {
+	            	buffer.append(this.bound.nullAnnotatedReadableName(options, shortNames));
+	            	for (int i = 0, length = this.otherBounds.length; i < length; i++) {
+	            		buffer.append('&').append(this.otherBounds[i].nullAnnotatedReadableName(options, shortNames));
+	            	}
+            	}
+            	break;
+			default: // SUPER
+			    buffer.append(TypeConstants.WILDCARD_NAME).append(TypeConstants.WILDCARD_SUPER).append(this.bound.nullAnnotatedReadableName(options, shortNames));
+        }
+        int length;
+        char[] result = new char[length = buffer.length()];
+        buffer.getChars(0, length, result, 0);
+        return result;
+    }
+
 	ReferenceBinding resolve() {
 		if ((this.tagBits & TagBits.HasUnresolvedTypeVariables) == 0)
 			return this;
@@ -668,17 +768,17 @@
 
 	public void swapUnresolved(UnresolvedReferenceBinding unresolvedType, ReferenceBinding resolvedType, LookupEnvironment env) {
 		boolean affected = false;
-		if (this.genericType == unresolvedType) {
+		if (this.genericType == unresolvedType) { //$IDENTITY-COMPARISON$
 			this.genericType = resolvedType; // no raw conversion
 			affected = true;
 		}
-		if (this.bound == unresolvedType) {
+		if (this.bound == unresolvedType) { //$IDENTITY-COMPARISON$
 			this.bound = env.convertUnresolvedBinaryToRawType(resolvedType);
 			affected = true;
 		}
 		if (this.otherBounds != null) {
 			for (int i = 0, length = this.otherBounds.length; i < length; i++) {
-				if (this.otherBounds[i] == unresolvedType) {
+				if (this.otherBounds[i] == unresolvedType) { //$IDENTITY-COMPARISON$
 					this.otherBounds[i] = env.convertUnresolvedBinaryToRawType(resolvedType);
 					affected = true;
 				}
@@ -692,6 +792,8 @@
 	 * @see java.lang.Object#toString()
 	 */
 	public String toString() {
+		if (this.hasTypeAnnotations())
+			return annotatedDebugName();
         switch (this.boundKind) {
             case Wildcard.UNBOUND :
                 return new String(TypeConstants.WILDCARD_NAME);
@@ -718,4 +820,8 @@
 		}
 		return this.typeVariable;
 	}
+
+	public TypeBinding unannotated() {
+		return this.hasTypeAnnotations() ? this.environment.getUnannotatedType(this) : this;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
index 326a7fd..6a72ab4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java
@@ -530,8 +530,8 @@
 			isVarargs = false;
 			if (readToken() == TerminalTokens.TokenNameLBRACKET) {
 				// array declaration
-				int dimStart = this.scanner.getCurrentTokenStartPosition();
 				while (readToken() == TerminalTokens.TokenNameLBRACKET) {
+					int dimStart = this.scanner.getCurrentTokenStartPosition();
 					consumeToken();
 					if (readToken() != TerminalTokens.TokenNameRBRACKET) {
 						break nextArg;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java
new file mode 100644
index 0000000..6ee4085
--- /dev/null
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ConflictedParser.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.compiler.parser;
+
+public interface ConflictedParser {
+	
+	/* Return true if at the configuration the parser finds itself in, token would need to be disambiguated.
+	   At Java SE 8 time, we have three tokens that need to clarified: the use of '( and that of '<' and finally
+	   whether an @ begins a SE8 style type annotation or a SE5 declaration annotation. Where they can co-exist,
+	   we treat the type annotation as a declarative annotation.
+	*/
+	boolean atConflictScenario(int token);
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
index ad780d4..6f93621 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/JavadocTagConstants.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -169,6 +173,8 @@
 		{},
 		// since 1.7
 		{},
+		// since 1.8
+		{}
 	};
 	public static final char[][][] INLINE_TAGS = {
 		// since 1.0
@@ -187,6 +193,8 @@
 		{},
 		// since 1.7
 		{},
+		// since 1.8
+		{}
 	};
 	public final static int INLINE_TAGS_LENGTH = INLINE_TAGS.length;
 	public final static int BLOCK_TAGS_LENGTH = BLOCK_TAGS.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
index 1c754e9..911b6e8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Tom Tromey - patch for readTable(String) as described in http://bugs.eclipse.org/bugs/show_bug.cgi?id=32196
@@ -14,9 +18,18 @@
  *								bug 366003 - CCE in ASTNode.resolveAnnotations(ASTNode.java:639)
  *								bug 374605 - Unreasonable warning for enum-based switch statements
  *								bug 393719 - [compiler] inconsistent warnings on iteration variables
- *
+ *								bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
+ *								bug 383973 - [1.8][compiler] syntax recovery in the presence of default methods
+ *								bug 401035 - [1.8] A few tests have started failing recently
  *     Jesper S Moller - Contributions for
+ *							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *							bug 399695 - [1.8][compiler] [1.8][compiler] migrate parser to other syntax for default methods
+ *							bug 384567 - [1.5][compiler] Compiler accepts illegal modifiers on package declaration
  *									bug 393192 - Incomplete type hierarchy with > 10 annotations
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
+ *                          Bug 415821 - [1.8][compiler] CLASS_EXTENDS target type annotation missing for anonymous classes
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.parser;
 
@@ -34,12 +47,13 @@
 import org.eclipse.jdt.internal.compiler.ast.*;
 import org.eclipse.jdt.internal.compiler.ast.Expression.DecapsulationState;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.env.ICompilationUnit;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
+import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
-import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
 import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
@@ -55,24 +69,7 @@
 import org.eclipse.objectteams.otdt.core.compiler.IOTConstants;
 import org.eclipse.objectteams.otdt.core.compiler.OTNameUtils;
 import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.AbstractMethodMappingDeclaration;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.BaseAllocationExpression;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.BaseCallMessageSend;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.CallinMappingDeclaration;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.CalloutMappingDeclaration;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.FieldAccessSpec;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.GuardPredicateDeclaration;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.LiftingTypeReference;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.MethodSpec;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.ParameterMapping;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.PrecedenceDeclaration;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.QualifiedBaseReference;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.RoleClassLiteralAccess;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.TSuperMessageSend;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.TsuperReference;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.TypeAnchorReference;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.TypeValueParameter;
-import org.eclipse.objectteams.otdt.internal.core.compiler.ast.WithinStatement;
+import org.eclipse.objectteams.otdt.internal.core.compiler.ast.*;
 import org.eclipse.objectteams.otdt.internal.core.compiler.control.Config;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel;
 import org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.MethodSignatureEnhancer;
@@ -87,9 +84,8 @@
  * What: New consume methods
  *       All consume methods show as a comment the grammar rule(s) invoking this method.
  *
- * @version $Id: Parser.java 23404 2010-02-03 14:10:22Z stephan $
  */
-public class Parser implements  ParserBasicInformation, TerminalTokens, OperatorIds, TypeIds {
+public class Parser implements ConflictedParser, ParserBasicInformation, TerminalTokens, OperatorIds, TypeIds {
 	
 	protected static final int THIS_CALL = ExplicitConstructorCall.This;
 	protected static final int SUPER_CALL = ExplicitConstructorCall.Super;
@@ -144,7 +140,12 @@
 
 	public static final int RoundBracket = 0;
 
+//{ObjectTeams: changed byte to char to support larger grammar:
+/* orig:
     public static byte scope_la[] = null;
+  :giro */
+	public static char scope_la[] = null;
+// SH}
     public static char scope_lhs[] = null;
 
 	public static char scope_prefix[] = null;
@@ -159,7 +160,12 @@
 	protected final static int StackIncrement = 255;
 
 	public static char term_action[] = null;
+//{ObjectTeams: changed byte to char to support larger grammar:
+/* orig:
 	public static byte term_check[] = null;
+  :giro */
+	public static char term_check[] = null;
+// SH}
 
 	public static char terminal_index[] = null;
 
@@ -553,8 +559,14 @@
 		buildFileOfIntFor(prefix + (++i) + ".rsc", "in_symb", tokens); //$NON-NLS-2$ //$NON-NLS-1$
 	
 		byte[] newRhs = buildFileOfByteFor(prefix + (++i) + ".rsc", "rhs", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+//{ObjectTeams: changed byte to char to support larger grammar:
+/* orig:
 		buildFileOfByteFor(prefix + (++i) + ".rsc", "term_check", tokens); //$NON-NLS-2$ //$NON-NLS-1$
 		buildFileOfByteFor(prefix + (++i) + ".rsc", "scope_la", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+  :giro */
+		buildFileOfIntFor(prefix + (++i) + ".rsc", "term_check", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+		buildFileOfIntFor(prefix + (++i) + ".rsc", "scope_la", tokens); //$NON-NLS-2$ //$NON-NLS-1$
+// SH}
 	
 		String[] newName = buildFileForName(prefix + (++i) + ".rsc", new String(contents)); //$NON-NLS-1$
 	
@@ -652,8 +664,14 @@
 		in_symb = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
 	
 		rhs = readByteTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+//{ObjectTeams: changed byte to char to support larger grammar:
+/* orig:
 		term_check = readByteTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
 		scope_la = readByteTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+  :giro */
+		term_check = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+		scope_la = readTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
+// SH}
 	
 		name = readNameTable(prefix + (++i) + ".rsc"); //$NON-NLS-1$
 	
@@ -826,9 +844,9 @@
 /* orig:
 		return term_action[term_check[base_action[state]+sym] == sym ? base_action[state] + sym : base_action[state]];
   :giro */
-        return term_action[term_check[base_action[state]+sym] == (byte)sym ? base_action[state] + sym : base_action[state]];
+        return term_action[term_check[base_action[state]+sym] == (char)sym ? base_action[state] + sym : base_action[state]];
 // SH}
-	}	
+	}
 	protected int astLengthPtr;
 
 	protected int[] astLengthStack;
@@ -847,6 +865,23 @@
 	protected int expressionPtr;
 	protected Expression[] expressionStack = new Expression[ExpressionStackIncrement];
 	public int firstToken ; // handle for multiple parsing goals
+	
+	/* jsr308 -- Type annotation management, we now maintain type annotations in a separate stack
+	   as otherwise they get interspersed with other expressions and some of the code is not prepared
+	   to handle such interleaving and will look ugly if changed. 
+	   
+	   See consumeArrayCreationExpressionWithoutInitializer for example. 
+
+	   Where SE8 annotations occur in a place SE5 annotations are legal, the SE8 annotations end up in
+	   the expression stack as we have no way of distinguishing between the two.
+	*/  
+	protected int typeAnnotationPtr;
+	protected int typeAnnotationLengthPtr;
+	protected Annotation [] typeAnnotationStack = new Annotation[TypeAnnotationStackIncrement];
+	protected int [] typeAnnotationLengthStack;
+	// annotation stack
+	protected final static int TypeAnnotationStackIncrement = 100;
+	
 	// generics management
 	protected int genericsIdentifiersLengthPtr;
 	protected int[] genericsIdentifiersLengthStack = new int[GenericsStackIncrement];
@@ -929,6 +964,12 @@
 protected int lastJavadocEnd;
 public org.eclipse.jdt.internal.compiler.ReadManager readManager;
 private boolean shouldDeferRecovery = false; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=291040
+private int valueLambdaNestDepth = -1;
+private int stateStackLengthStack[] = new int[0];
+private boolean parsingJava8Plus;
+protected int unstackedAct = ERROR_ACTION;
+private boolean haltOnSyntaxError = false;
+private boolean tolerateDefaultClassMethods = false;
 
 
 //{ObjectTeams: context info while parsing separate role files:
@@ -937,15 +978,19 @@
 	public TypeDeclaration currentTeam = null;
 // SH}
 
-
+protected Parser () {
+	// Caveat Emptor: For inheritance purposes and then only in very special needs. Only minimal state is initialized !
+}
 public Parser(ProblemReporter problemReporter, boolean optimizeStringLiterals) {
 
 	this.problemReporter = problemReporter;
 	this.options = problemReporter.options;
 	this.optimizeStringLiterals = optimizeStringLiterals;
 	initializeScanner();
+	this.parsingJava8Plus = this.options.sourceLevel >= ClassFileConstants.JDK1_8;
 	this.astLengthStack = new int[50];
 	this.expressionLengthStack = new int[30];
+	this.typeAnnotationLengthStack = new int[30];
 	this.intStack = new int[50];
 	this.identifierStack = new char[30][];
 	this.identifierLengthStack = new int[30];
@@ -1006,7 +1051,7 @@
 	  if (   (this.firstToken == TokenNamePLUS_PLUS) // compilation unit
 		  || (this.firstToken == TokenNameQUESTION)) // package declaration
 	  {
-// orig:		  
+// orig:
 		this.compilationUnit.currentPackage = null;
 // :giro
 	  }
@@ -1172,7 +1217,7 @@
 
 	if (this.modifiersSourceStart < 0) this.modifiersSourceStart = this.scanner.startPosition;
 
-	if (this.currentElement != null && this.annotationRecoveryActivated) {
+	if (this.currentElement != null) {
 		this.currentElement.addModifier(flag, this.modifiersSourceStart);
 	}
 }
@@ -1302,7 +1347,7 @@
 		}
 	}
 }
-protected ParameterizedQualifiedTypeReference computeQualifiedGenericsFromRightSide(TypeReference rightSide, int dim) {
+protected ParameterizedQualifiedTypeReference computeQualifiedGenericsFromRightSide(TypeReference rightSide, int dim, Annotation [][] annotationsOnDimensions) {
 	int nameSize = this.identifierLengthStack[this.identifierLengthPtr];
 	int tokensSize = nameSize;
 	if (rightSide instanceof ParameterizedSingleTypeReference) {
@@ -1317,15 +1362,24 @@
 	TypeReference[][] typeArguments = new TypeReference[tokensSize][];
 	char[][] tokens = new char[tokensSize][];
 	long[] positions = new long[tokensSize];
+	Annotation [][] typeAnnotations = null;
 	if (rightSide instanceof ParameterizedSingleTypeReference) {
 		ParameterizedSingleTypeReference singleParameterizedTypeReference = (ParameterizedSingleTypeReference) rightSide;
 		tokens[nameSize] = singleParameterizedTypeReference.token;
 		positions[nameSize] = (((long) singleParameterizedTypeReference.sourceStart) << 32) + singleParameterizedTypeReference.sourceEnd;
 		typeArguments[nameSize] = singleParameterizedTypeReference.typeArguments;
+		if (singleParameterizedTypeReference.annotations != null) {
+			typeAnnotations = new Annotation[tokensSize][];
+		    typeAnnotations[nameSize] = singleParameterizedTypeReference.annotations[0];
+		}
 	} else if (rightSide instanceof SingleTypeReference) {
 		SingleTypeReference singleTypeReference = (SingleTypeReference) rightSide;
 		tokens[nameSize] = singleTypeReference.token;
 		positions[nameSize] = (((long) singleTypeReference.sourceStart) << 32) + singleTypeReference.sourceEnd;
+		if (singleTypeReference.annotations != null) {
+			typeAnnotations = new Annotation[tokensSize][];
+			typeAnnotations[nameSize] =  singleTypeReference.annotations[0];
+		}
 	} else if (rightSide instanceof ParameterizedQualifiedTypeReference) {
 		ParameterizedQualifiedTypeReference parameterizedTypeReference = (ParameterizedQualifiedTypeReference) rightSide;
 		TypeReference[][] rightSideTypeArguments = parameterizedTypeReference.typeArguments;
@@ -1334,12 +1388,22 @@
 		System.arraycopy(rightSideTokens, 0, tokens, nameSize, rightSideTokens.length);
 		long[] rightSidePositions = parameterizedTypeReference.sourcePositions;
 		System.arraycopy(rightSidePositions, 0, positions, nameSize, rightSidePositions.length);
+		Annotation [][] rightSideAnnotations = parameterizedTypeReference.annotations;
+		if (rightSideAnnotations != null) {
+			typeAnnotations = new Annotation[tokensSize][];
+			System.arraycopy(rightSideAnnotations, 0, typeAnnotations, nameSize, rightSideAnnotations.length);
+		}
 	} else if (rightSide instanceof QualifiedTypeReference) {
 		QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) rightSide;
 		char[][] rightSideTokens = qualifiedTypeReference.tokens;
 		System.arraycopy(rightSideTokens, 0, tokens, nameSize, rightSideTokens.length);
 		long[] rightSidePositions = qualifiedTypeReference.sourcePositions;
 		System.arraycopy(rightSidePositions, 0, positions, nameSize, rightSidePositions.length);
+		Annotation [][] rightSideAnnotations = qualifiedTypeReference.annotations;
+		if (rightSideAnnotations != null) {
+			typeAnnotations = new Annotation[tokensSize][];
+			System.arraycopy(rightSideAnnotations, 0, typeAnnotations, nameSize, rightSideAnnotations.length);
+		}
 	}
 
 	int currentTypeArgumentsLength = this.genericsLengthStack[this.genericsLengthPtr--];
@@ -1358,7 +1422,30 @@
 		typeArguments[nameSize - 1] = currentTypeArguments;
 	}
 	this.identifierLengthPtr--;
-	return new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, positions);
+	ParameterizedQualifiedTypeReference typeRef = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, annotationsOnDimensions, positions);
+
+	while (nameSize > 0) {
+		int length;
+		if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+			if (typeAnnotations == null)
+				typeAnnotations = new Annotation[tokensSize][];
+			System.arraycopy(
+					this.typeAnnotationStack,
+					(this.typeAnnotationPtr -= length) + 1,
+					typeAnnotations[nameSize - 1] = new Annotation[length],
+					0,
+					length);
+			if (nameSize == 1) {
+				typeRef.sourceStart = typeAnnotations[0][0].sourceStart;
+			}
+		}
+		nameSize--;
+	}
+	
+	if ((typeRef.annotations = typeAnnotations) != null) {
+		typeRef.bits |= ASTNode.HasTypeAnnotations;
+	}
+	return typeRef;
 }
 protected void concatExpressionLists() {
 	this.expressionLengthStack[--this.expressionLengthPtr]++;
@@ -1705,8 +1792,6 @@
 	this.expressionLengthPtr -- ;
 	arrayAllocation.initializer = (ArrayInitializer) this.expressionStack[this.expressionPtr--];
 
-	arrayAllocation.type = getTypeReference(0);
-	arrayAllocation.type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage
 	length = (this.expressionLengthStack[this.expressionLengthPtr--]);
 	this.expressionPtr -= length ;
 	System.arraycopy(
@@ -1715,6 +1800,16 @@
 		arrayAllocation.dimensions = new Expression[length],
 		0,
 		length);
+	Annotation[][] annotationsOnDimensions = getAnnotationsOnDimensions(length);
+	arrayAllocation.annotationsOnDimensions = annotationsOnDimensions;
+
+	arrayAllocation.type = getTypeReference(0);
+	arrayAllocation.type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage
+	if (annotationsOnDimensions != null) {
+		arrayAllocation.bits |= ASTNode.HasTypeAnnotations;
+		arrayAllocation.type.bits |= ASTNode.HasTypeAnnotations;
+	}
+
 	arrayAllocation.sourceStart = this.intStack[this.intPtr--];
 	if (arrayAllocation.initializer == null) {
 		arrayAllocation.sourceEnd = this.endStatementPosition;
@@ -1729,8 +1824,6 @@
 
 	int length;
 	ArrayAllocationExpression arrayAllocation = new ArrayAllocationExpression();
-	arrayAllocation.type = getTypeReference(0);
-	arrayAllocation.type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage
 	length = (this.expressionLengthStack[this.expressionLengthPtr--]);
 	this.expressionPtr -= length ;
 	System.arraycopy(
@@ -1739,6 +1832,14 @@
 		arrayAllocation.dimensions = new Expression[length],
 		0,
 		length);
+	Annotation[][] annotationsOnDimensions = getAnnotationsOnDimensions(length);
+	arrayAllocation.annotationsOnDimensions = annotationsOnDimensions;
+	arrayAllocation.type = getTypeReference(0);
+	arrayAllocation.type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage
+	if (annotationsOnDimensions != null) {
+		arrayAllocation.bits |= ASTNode.HasTypeAnnotations;
+		arrayAllocation.type.bits |= ASTNode.HasTypeAnnotations;
+	}
 	arrayAllocation.sourceStart = this.intStack[this.intPtr--];
 	if (arrayAllocation.initializer == null) {
 		arrayAllocation.sourceEnd = this.endStatementPosition;
@@ -1833,6 +1934,9 @@
 	// handle type arguments
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
 	pushOnGenericsLengthStack(0); // handle type arguments
+	 // signal absence of @308 annotations:
+	pushOnTypeAnnotationLengthStack(0); // no type annotation on 'base'
+	pushOnTypeAnnotationLengthStack(0); // no type annotation on SimpleName, TODO: should we admit type annotations here?
 }
 //SH}
 
@@ -2113,6 +2217,7 @@
 }
 protected void consumeBlock() {
 	// Block ::= OpenBlock '{' BlockStatementsopt '}'
+	// LambdaBody ::= NestedType NestedMethod  '{' BlockStatementsopt '}'
 	// simpler action for empty blocks
 
 	int statementsLength = this.astLengthStack[this.astLengthPtr--];
@@ -2840,8 +2945,8 @@
 	pushOnAstStack(caseStatement);
 }
 protected void consumeCastExpressionLL1() {
-	//CastExpression ::= '(' Expression ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
-	// Expression is used in order to make the grammar LL1
+	//CastExpression ::= '(' Name ')' InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
+	
 
 	//optimize push/pop
 
@@ -2856,9 +2961,43 @@
 	updateSourcePosition(cast);
 	cast.sourceEnd=exp.sourceEnd;
 }
-protected void consumeCastExpressionWithGenericsArray() {
-	// CastExpression ::= PushLPAREN Name TypeArguments Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+public IntersectionCastTypeReference createIntersectionCastTypeReference(TypeReference[] typeReferences) {
+	if (this.options.sourceLevel < ClassFileConstants.JDK1_8) {
+		problemReporter().intersectionCastNotBelow18(typeReferences);
+	}
+	return new IntersectionCastTypeReference(typeReferences);
+}
+protected void consumeCastExpressionLL1WithBounds() {
+	//CastExpression ::= '(' Name AdditionalBoundsList ')' UnaryExpressionNotPlusMinus
+	Expression cast;
+	Expression exp;
+	
+	int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+	TypeReference[] bounds = new TypeReference[additionalBoundsLength + 1];
+	this.genericsPtr -= additionalBoundsLength;
+	System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
 
+	pushOnGenericsLengthStack(0); // handle type arguments
+	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+	bounds[0] = getTypeReference(0);
+ 
+	this.expressionStack[this.expressionPtr] =
+		cast = new CastExpression(
+			exp=this.expressionStack[this.expressionPtr] ,
+			createIntersectionCastTypeReference(bounds));
+	updateSourcePosition(cast);
+	cast.sourceEnd=exp.sourceEnd;
+}
+protected void consumeCastExpressionWithGenericsArray() {
+	// CastExpression ::= PushLPAREN Name TypeArguments Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+	
+	TypeReference[] bounds = null;
+	int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (additionalBoundsLength > 0) {
+		bounds = new TypeReference[additionalBoundsLength + 1];
+		this.genericsPtr -= additionalBoundsLength;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
+	}
 	Expression exp;
 	Expression cast;
 	TypeReference castType;
@@ -2866,59 +3005,104 @@
 
 	int dim = this.intStack[this.intPtr--];
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
-
-	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(dim));
-	this.intPtr--;
+	if (additionalBoundsLength > 0) {
+		bounds[0] = getTypeReference(dim);
+		castType = createIntersectionCastTypeReference(bounds); 
+	} else {
+		castType = getTypeReference(dim);
+	}
+	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
+	this.intPtr--;  // pop position of '<'
 	castType.sourceEnd = end - 1;
 	castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
 	cast.sourceEnd = exp.sourceEnd;
 }
 protected void consumeCastExpressionWithNameArray() {
-	// CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+	// CastExpression ::= PushLPAREN Name Dims AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
 
 	Expression exp;
 	Expression cast;
 	TypeReference castType;
 	int end = this.intStack[this.intPtr--];
 
+	TypeReference[] bounds = null;
+	int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (additionalBoundsLength > 0) {
+		bounds = new TypeReference[additionalBoundsLength + 1];
+		this.genericsPtr -= additionalBoundsLength;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
+	}
 	// handle type arguments
 	pushOnGenericsLengthStack(0);
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
-
-	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(this.intStack[this.intPtr--]));
+	
+	if (additionalBoundsLength > 0) {
+		bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
+		castType = createIntersectionCastTypeReference(bounds);
+	} else {
+		castType = getTypeReference(this.intStack[this.intPtr--]);
+	}
+	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
 	castType.sourceEnd = end - 1;
 	castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
 	cast.sourceEnd = exp.sourceEnd;
 }
 protected void consumeCastExpressionWithPrimitiveType() {
-	// CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression
+	// CastExpression ::= PushLPAREN PrimitiveType Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpression
 
 	//this.intStack : posOfLeftParen dim posOfRightParen
 
+	TypeReference[] bounds = null;
+	int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (additionalBoundsLength > 0) {
+		bounds = new TypeReference[additionalBoundsLength + 1];
+		this.genericsPtr -= additionalBoundsLength;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
+	}
+	
 	//optimize the push/pop
-
 	Expression exp;
 	Expression cast;
 	TypeReference castType;
 	int end = this.intStack[this.intPtr--];
-	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = getTypeReference(this.intStack[this.intPtr--]));
+	if (additionalBoundsLength > 0) {
+		bounds[0] = getTypeReference(this.intStack[this.intPtr--]);
+		castType = createIntersectionCastTypeReference(bounds); 
+	} else {
+		castType = getTypeReference(this.intStack[this.intPtr--]);
+	}
+	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
 	castType.sourceEnd = end - 1;
 	castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
 	cast.sourceEnd = exp.sourceEnd;
 }
 protected void consumeCastExpressionWithQualifiedGenericsArray() {
-	// CastExpression ::= PushLPAREN Name OnlyTypeArguments '.' ClassOrInterfaceType Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+	// CastExpression ::= PushLPAREN Name OnlyTypeArguments '.' ClassOrInterfaceType Dimsopt AdditionalBoundsOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+
+	TypeReference[] bounds = null;
+	int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (additionalBoundsLength > 0) {
+		bounds = new TypeReference[additionalBoundsLength + 1];
+		this.genericsPtr -= additionalBoundsLength;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, bounds, 1, additionalBoundsLength);
+	}
+
 	Expression exp;
 	Expression cast;
 	TypeReference castType;
 	int end = this.intStack[this.intPtr--];
-
 	int dim = this.intStack[this.intPtr--];
+	Annotation [][] annotationsOnDimensions = dim == 0 ? null : getAnnotationsOnDimensions(dim);
 	TypeReference rightSide = getTypeReference(0);
+    castType = computeQualifiedGenericsFromRightSide(rightSide, dim, annotationsOnDimensions);
 
-	ParameterizedQualifiedTypeReference qualifiedParameterizedTypeReference = computeQualifiedGenericsFromRightSide(rightSide, dim);
-	this.intPtr--;
-	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType = qualifiedParameterizedTypeReference);
+    if (additionalBoundsLength > 0) {
+		bounds[0] = castType;
+		castType = createIntersectionCastTypeReference(bounds); 
+	}
+    
+    this.intPtr--;
+	this.expressionStack[this.expressionPtr] = cast = new CastExpression(exp = this.expressionStack[this.expressionPtr], castType);
 	castType.sourceEnd = end - 1;
 	castType.sourceStart = (cast.sourceStart = this.intStack[this.intPtr--]) + 1;
 	cast.sourceEnd = exp.sourceEnd;
@@ -2928,14 +3112,23 @@
 	optimizedConcatNodeLists();
 }
 protected void consumeCatchFormalParameter() {
-	// CatchFormalParameter ::= Modifiersopt CatchType VariableDeclaratorId
+	// CatchFormalParameter ::= Modifiersopt CatchType CatchLiftingTypeopt VariableDeclaratorId
+	// CatchLiftingType ::= 'as' Type
+
 	this.identifierLengthPtr--;
 	char[] identifierName = this.identifierStack[this.identifierPtr];
 	long namePositions = this.identifierPositionStack[this.identifierPtr--];
 	int extendedDimensions = this.intStack[this.intPtr--]; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=348369
 	TypeReference type = (TypeReference) this.astStack[this.astPtr--];
+//{ObjectTeams: LiftingTypeReference?
+	if (type instanceof LiftingTypeReference) {
+		TypeReference roleReference = getTypeReference(this.intStack[this.intPtr--]);
+		TypeReference baseReference = (TypeReference) this.astStack[this.astPtr--];
+		((LiftingTypeReference)type).setReferences(baseReference, roleReference);
+	}
+// SH}
 	if (extendedDimensions > 0) {
-		type = type.copyDims(type.dimensions() + extendedDimensions);
+		type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, null, false);
 		type.sourceEnd = this.endPosition;
 		// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391092
 		if (type instanceof UnionTypeReference) {
@@ -3126,6 +3319,7 @@
 	TypeReference superClass = getTypeReference(0);
 	// There is a class declaration on the top of stack
 	TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
+	typeDecl.bits |= (superClass.bits & ASTNode.HasTypeAnnotations);
 	typeDecl.superclass = superClass;
 	superClass.bits |= ASTNode.IsSuperType;
 	typeDecl.bodyStart = typeDecl.superclass.sourceEnd + 1;
@@ -3147,8 +3341,11 @@
 		typeDecl.superInterfaces = new TypeReference[length],
 		0,
 		length);
-	for (int i = 0, max = typeDecl.superInterfaces.length; i < max; i++) {
-		typeDecl.superInterfaces[i].bits |= ASTNode.IsSuperType;
+	TypeReference[] superinterfaces = typeDecl.superInterfaces;
+	for (int i = 0, max = superinterfaces.length; i < max; i++) {
+		TypeReference typeReference = superinterfaces[i];
+		typeDecl.bits |= (typeReference.bits & ASTNode.HasTypeAnnotations);
+		typeReference.bits |= ASTNode.IsSuperType;
 	}
 	typeDecl.bodyStart = typeDecl.superInterfaces[length-1].sourceEnd + 1;
 	this.listLength = 0; // reset after having read super-interfaces
@@ -3166,7 +3363,9 @@
 	// There is a class declaration on the top of stack
 	TypeDeclaration typeDecl = (TypeDeclaration) this.astStack[this.astPtr];
 	//baseclass
-	typeDecl.baseclass = getTypeReference(0);
+	TypeReference baseclass = getTypeReference(0);
+	typeDecl.bits |= (baseclass.bits & ASTNode.HasTypeAnnotations);
+	typeDecl.baseclass = baseclass;
 	typeDecl.baseclass.setBaseclassDecapsulation(DecapsulationState.ALLOWED);
 	typeDecl.bodyStart = typeDecl.baseclass.sourceEnd + 1;
 	// recovery
@@ -3572,9 +3771,11 @@
 			}
 		}
 
-		if (!this.diet || insideFieldInitializer){
-			// add it only in non-diet mode, if diet_bodies, then constructor call will be added elsewhere.
-			constructorCall = SuperReference.implicitSuperConstructorCall();
+		if (!this.options.ignoreMethodBodies) {
+			if (!this.diet || insideFieldInitializer){
+				// add it only in non-diet mode, if diet_bodies, then constructor call will be added elsewhere.
+				constructorCall = SuperReference.implicitSuperConstructorCall();
+			}
 		}
 	}
 
@@ -3781,7 +3982,8 @@
 	this.dimensions = 0;
 }
 protected void consumeDimWithOrWithOutExpr() {
-	// DimWithOrWithOutExpr ::= '[' ']'
+	// DimWithOrWithOutExpr ::= TypeAnnotationsopt '[' ']'
+	// DimWithOrWithOutExpr ::= TypeAnnotationsopt '[' Expression ']'
 	pushOnExpressionStack(null);
 
 	if(this.currentElement != null && this.currentToken == TokenNameLBRACE) {
@@ -4001,6 +4203,7 @@
 			localDeclaration.annotations = new Annotation[length],
 			0,
 			length);
+		localDeclaration.bits |= ASTNode.HasTypeAnnotations;
 	}
 	if (hasModifiers) {
 		localDeclaration.declarationSourceStart = declarationSourceStart;
@@ -4009,6 +4212,7 @@
 		localDeclaration.declarationSourceStart = type.sourceStart;
 	}
 	localDeclaration.type = type;
+	localDeclaration.bits |= (type.bits & ASTNode.HasTypeAnnotations);
 
 	ForeachStatement iteratorForStatement =
 		new ForeachStatement(
@@ -4026,6 +4230,7 @@
 	TypeDeclaration anonymousType = new TypeDeclaration(this.compilationUnit.compilationResult);
 	anonymousType.name = CharOperation.NO_CHAR;
 	anonymousType.bits |= (ASTNode.IsAnonymousType|ASTNode.IsLocalType);
+	anonymousType.bits |= (typeReference.bits & ASTNode.HasTypeAnnotations);
 	QualifiedAllocationExpression alloc = new QualifiedAllocationExpression(anonymousType);
 	markEnclosingMemberWithLocalType();
 	pushOnAstStack(anonymousType);
@@ -4098,7 +4303,9 @@
 
 	char[] identifierName = this.identifierStack[this.identifierPtr];
 	long namePosition = this.identifierPositionStack[this.identifierPtr];
-	int extendedDimension = this.intStack[this.intPtr--];
+	int extendedDimensions = this.intStack[this.intPtr--];
+	// pop any annotations on extended dimensions now, so they don't pollute the base dimensions.
+	Annotation [][] annotationsOnExtendedDimensions = extendedDimensions == 0 ? null : getAnnotationsOnDimensions(extendedDimensions);
 	AbstractVariableDeclaration declaration;
 	// create the ast node
 	boolean isLocalDeclaration = this.nestedMethod[this.nestedType] != 0;
@@ -4116,7 +4323,6 @@
 	this.identifierLengthPtr--;
 	TypeReference type;
 	int variableIndex = this.variablesCounter[this.nestedType];
-	int typeDim = 0;
 	if (variableIndex == 0) {
 		// first variable of the declaration (FieldDeclaration or LocalDeclaration)
 		if (isLocalDeclaration) {
@@ -4132,14 +4338,14 @@
 					0,
 					length);
 			}
-			type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
+			type = getTypeReference(this.intStack[this.intPtr--]); // type dimension
 			if (declaration.declarationSourceStart == -1) {
 				// this is true if there is no modifiers for the local variable declaration
 				declaration.declarationSourceStart = type.sourceStart;
 			}
 			pushOnAstStack(type);
 		} else {
-			type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
+			type = getTypeReference(this.intStack[this.intPtr--]); // type dimension
 			pushOnAstStack(type);
 			declaration.declarationSourceStart = this.intStack[this.intPtr--];
 			declaration.modifiers = this.intStack[this.intPtr--];
@@ -4160,7 +4366,6 @@
 		this.javadoc = null;
 	} else {
 		type = (TypeReference) this.astStack[this.astPtr - variableIndex];
-		typeDim = type.dimensions();
 		AbstractVariableDeclaration previousVariable =
 			(AbstractVariableDeclaration) this.astStack[this.astPtr];
 		declaration.declarationSourceStart = previousVariable.declarationSourceStart;
@@ -4172,12 +4377,9 @@
 		}
 	}
 
-	if (extendedDimension == 0) {
-		declaration.type = type;
-	} else {
-		int dimension = typeDim + extendedDimension;
-		declaration.type = copyDims(type, dimension);
-	}
+	declaration.type = extendedDimensions == 0 ? type : augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
+	declaration.bits |= (type.bits & ASTNode.HasTypeAnnotations);
+	
 	this.variablesCounter[this.nestedType]++;
 	pushOnAstStack(declaration);
 	// recovery
@@ -4313,6 +4515,7 @@
          enumConstant.annotations = new Annotation[length],
          0,
          length);
+		enumConstant.bits |= ASTNode.HasTypeAnnotations;
    }
    pushOnAstStack(enumConstant);
 	if (this.currentElement != null){
@@ -4339,18 +4542,18 @@
 	concatNodeLists();
 }
 protected void consumeEnumConstantWithClassBody() {
-   dispatchDeclarationInto(this.astLengthStack[this.astLengthPtr--]);
-   TypeDeclaration anonymousType = (TypeDeclaration) this.astStack[this.astPtr--]; // pop type
-   this.astLengthPtr--;
-   anonymousType.bodyEnd = this.endPosition;
-   anonymousType.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
-   final FieldDeclaration fieldDeclaration = ((FieldDeclaration) this.astStack[this.astPtr]);
-   fieldDeclaration.declarationEnd = this.endStatementPosition;
+	dispatchDeclarationInto(this.astLengthStack[this.astLengthPtr--]);
+	TypeDeclaration anonymousType = (TypeDeclaration) this.astStack[this.astPtr--]; // pop type
+	this.astLengthPtr--;
+	anonymousType.bodyEnd = this.endPosition;
+	anonymousType.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+	final FieldDeclaration fieldDeclaration = ((FieldDeclaration) this.astStack[this.astPtr]);
+	fieldDeclaration.declarationEnd = this.endStatementPosition;
 	int declarationSourceEnd = anonymousType.declarationSourceEnd;
 	fieldDeclaration.declarationSourceEnd = declarationSourceEnd;
-   this.intPtr --; // remove end position of the arguments
-   this.variablesCounter[this.nestedType] = 0;
-   this.nestedType--;
+	this.intPtr --; // remove end position of the arguments
+	this.variablesCounter[this.nestedType] = 0;
+	this.nestedType--;
 	ASTNode initialization = fieldDeclaration.initialization;
 	if (initialization != null) {
 		initialization.sourceEnd = declarationSourceEnd;
@@ -4894,57 +5097,105 @@
 	pushOnAstLengthStack(-1);
 }
 protected void consumeFormalParameter(boolean isVarArgs) {
-	// FormalParameter ::= Type VariableDeclaratorId ==> false
-	// FormalParameter ::= Modifiers Type VariableDeclaratorId ==> true
+	// FormalParameter ::= Modifiersopt Type VariableDeclaratorIdOrThis
+	// FormalParameter ::= Modifiersopt Type PushZeroTypeAnnotations '...' VariableDeclaratorIdOrThis
+	// FormalParameter ::= Modifiersopt Type @308... TypeAnnotations '...' VariableDeclaratorIdOrThis
 	/*
 	this.astStack :
 	this.identifierStack : type identifier
-	this.intStack : dim dim
+	this.intStack : dim dim 1||0  // 1 => normal parameter, 0 => this parameter
 	 ==>
 	this.astStack : Argument
 	this.identifierStack :
 	this.intStack :
 	*/
-
+	NameReference qualifyingNameReference = null;
+    boolean isReceiver = this.intStack[this.intPtr--] == 0;  // flag pushed in consumeExplicitThisParameter -> 0, consumeVariableDeclaratorIdParameter -> 1
+    if (isReceiver) {
+    	qualifyingNameReference = (NameReference) this.expressionStack[this.expressionPtr--];
+    	this.expressionLengthPtr --;
+    }
 	this.identifierLengthPtr--;
 	char[] identifierName = this.identifierStack[this.identifierPtr];
 	long namePositions = this.identifierPositionStack[this.identifierPtr--];
 	int extendedDimensions = this.intStack[this.intPtr--];
+	Annotation [][] annotationsOnExtendedDimensions = extendedDimensions == 0 ? null : getAnnotationsOnDimensions(extendedDimensions);
+	Annotation [] varArgsAnnotations = null;
 	int endOfEllipsis = 0;
+	int length;
 	if (isVarArgs) {
 		endOfEllipsis = this.intStack[this.intPtr--];
+		if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+			System.arraycopy(
+				this.typeAnnotationStack,
+				(this.typeAnnotationPtr -= length) + 1,
+				varArgsAnnotations = new Annotation[length],
+				0,
+				length);
+		} 
 	}
+//{ObjectTeams: LiftingTypeReference?
+	// Inserted via LiftingTypeopt, e.g.,:
+	// Modifiersopt Name DimsoptAnnotsopt LiftingTypeopt PotentialNameArray VariableDeclaratorIdOrThis
+	LiftingTypeReference ltr = null;
+	TypeReference roleRef = null;
+	if (this.astPtr > 0 && this.astStack[this.astPtr] instanceof LiftingTypeReference) {
+		ltr = (LiftingTypeReference) this.astStack[this.astPtr--];
+		this.astLengthPtr--;
+		// role side:
+		int roleFirstDimensions = this.intStack[this.intPtr--];
+		roleRef = getTypeReference(roleFirstDimensions);
+		int roleDimensions = roleFirstDimensions + extendedDimensions + (isVarArgs?1:0);
+		if (roleDimensions > roleFirstDimensions)
+			roleRef = roleRef.augmentTypeWithAdditionalDimensions(roleDimensions, null, false); // annotsOnDIms?
+		// done role side, the following balances the pushs from consumeBeginLiftingType():
+		this.genericsIdentifiersLengthPtr--;
+		this.genericsLengthPtr--;
+	}
+	// next is base side:
+// SH}
 	int firstDimensions = this.intStack[this.intPtr--];
-	final int typeDimensions = firstDimensions + extendedDimensions;
-//{ObjectTeams: LiftingTypeRefernce is introduced here as specific type reference
-/*	orig:
-	TypeReference type = getTypeReference(typeDimensions);
-  :giro */
-	TypeReference type = null;
-
-	if (this.astPtr > -1 && this.astStack[this.astPtr] instanceof LiftingTypeReference)
-		type = completeLiftingTypeReference(typeDimensions);
-	else
-		type = getTypeReference(typeDimensions);
-// Markus Witte}
+	TypeReference type = getTypeReference(firstDimensions);
+//{ObjectTeams: LiftingTypeReference? Compose:  FIXME?!? jdt moved some to getTypeReference?
+	if (ltr != null) {
+		ltr.setReferences(type, roleRef);
+		type = ltr;
+	}
+// SH}
+	if (isVarArgs || extendedDimensions != 0) {
+		if (isVarArgs) {
+			type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);	
+		} 
+		if (extendedDimensions != 0) {
+			type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
+		}
+		type.sourceEnd = type.isParameterizedTypeReference() ? this.endStatementPosition : this.endPosition;
+	}
 	if (isVarArgs) {
-		type = copyDims(type, typeDimensions + 1);
 		if (extendedDimensions == 0) {
 			type.sourceEnd = endOfEllipsis;
 		}
 		type.bits |= ASTNode.IsVarArgs; // set isVarArgs
 	}
 	int modifierPositions = this.intStack[this.intPtr--];
-	this.intPtr--;
-	Argument arg =
-		new Argument(
+	Argument arg;
+	if (isReceiver) {
+		arg = new Receiver(
+				identifierName, 
+				namePositions, 
+				type,
+				qualifyingNameReference,
+				this.intStack[this.intPtr--] & ~ClassFileConstants.AccDeprecated);
+	} else {
+		arg = new Argument(
 			identifierName,
 			namePositions,
 			type,
-			this.intStack[this.intPtr + 1] & ~ClassFileConstants.AccDeprecated); // modifiers
+			this.intStack[this.intPtr--] & ~ClassFileConstants.AccDeprecated); // modifiers
+	}
 	arg.declarationSourceStart = modifierPositions;
+	arg.bits |= (type.bits & ASTNode.HasTypeAnnotations);
 	// consume annotations
-	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
 		System.arraycopy(
 			this.expressionStack,
@@ -4952,6 +5203,7 @@
 			arg.annotations = new Annotation[length],
 			0,
 			length);
+		arg.bits |= ASTNode.HasTypeAnnotations;
 		RecoveredType currentRecoveryType = this.currentRecoveryType();
 		if (currentRecoveryType != null)
 			currentRecoveryType.annotationsConsumed(arg.annotations);
@@ -4973,8 +5225,31 @@
 		}
 	}
 }
+protected Annotation[][] getAnnotationsOnDimensions(int dimensionsCount) {
+	Annotation [][] dimensionsAnnotations = null;
+	if (dimensionsCount > 0) {
+		for (int i = 0; i < dimensionsCount; i++) {
+			Annotation [] annotations = null;
+			int length;
+			if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+				System.arraycopy(
+						this.typeAnnotationStack,
+						(this.typeAnnotationPtr -= length) + 1,
+						annotations = new Annotation[length],
+						0,
+						length);
+				if (dimensionsAnnotations == null) {
+					dimensionsAnnotations = new Annotation[dimensionsCount][];
+				}
+				dimensionsAnnotations[dimensionsCount - i - 1] = annotations;
+			}
+		}
+	}
+	return dimensionsAnnotations;
+}
 protected void consumeFormalParameterList() {
 	// FormalParameterList ::= FormalParameterList ',' FormalParameter
+	// TypeElidedFormalParameterList ::= TypeElidedFormalParameterList ',' TypeElidedFormalParameter
 	optimizedConcatNodeLists();
 }
 protected void consumeFormalParameterListopt() {
@@ -5031,6 +5306,9 @@
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
 	pushOnExpressionStack(getTypeReference(0));
 }
+protected void consumeInsideCastExpressionLL1WithBounds() {
+	// InsideCastExpressionLL1WithBounds ::= $empty
+}
 protected void consumeInsideCastExpressionWithQualifiedGenerics() {
 	// InsideCastExpressionWithQualifiedGenerics ::= $empty
 }
@@ -5130,8 +5408,11 @@
 		typeDecl.superInterfaces = new TypeReference[length],
 		0,
 		length);
-	for (int i = 0, max = typeDecl.superInterfaces.length; i < max; i++) {
-		typeDecl.superInterfaces[i].bits |= ASTNode.IsSuperType;
+	TypeReference[] superinterfaces = typeDecl.superInterfaces;
+	for (int i = 0, max = superinterfaces.length; i < max; i++) {
+		TypeReference typeReference = superinterfaces[i];
+		typeDecl.bits |= (typeReference.bits & ASTNode.HasTypeAnnotations);
+		typeReference.bits |= ASTNode.IsSuperType;
 	}
 	typeDecl.bodyStart = typeDecl.superInterfaces[length-1].sourceEnd + 1;
 	this.listLength = 0; // reset after having read super-interfaces
@@ -5327,8 +5608,12 @@
 	pushOnAstLengthStack(-1);
 	concatNodeLists();
 }
-protected void consumeInvalidMethodDeclaration() {
-	// InterfaceMemberDeclaration ::= InvalidMethodDeclaration
+protected void consumeInterfaceMethodDeclaration(boolean hasSemicolonBody) {
+	// InterfaceMemberDeclaration ::= DefaultMethodHeader MethodBody
+	// InterfaceMemberDeclaration ::= MethodHeader MethodBody
+	// -- the next rule is illegal but allows to give a more canonical error message from inside consumeInterfaceMethodDeclaration(): 
+	// InterfaceMemberDeclaration ::= DefaultMethodHeader ';'
+
 
 	/*
 	this.astStack : modifiers arguments throws statements
@@ -5340,24 +5625,38 @@
 	this.intStack :
 	*/
 
-	// pop the position of the {  (body of the method) pushed in block decl
-	this.intPtr--;
-	// retrieve end position of method declarator
+	if (!hasSemicolonBody) {
+		// pop the position of the {  (body of the method) pushed in block decl
+		this.intPtr--;
+		// retrieve end position of method declarator
 
-	//statements
-	this.realBlockPtr--;
-	int length;
-	if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
-		this.astPtr -= length;
+		//statements
+		this.realBlockPtr--;
+		int length;
+		if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+			this.astPtr -= length;
+		}
 	}
 
 	//watch for } that could be given as a unicode ! ( u007D is '}' )
 	MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
 	md.bodyEnd = this.endPosition;
 	md.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
-
-	// report the problem and continue the parsing - narrowing the problem onto the method
-	if(!this.statementRecoveryActivated) problemReporter().abstractMethodNeedingNoBody(md);
+	
+	boolean isDefault = (md.modifiers & ExtraCompilerModifiers.AccDefaultMethod) != 0;
+	boolean isStatic = (md.modifiers & ClassFileConstants.AccStatic) != 0;
+	boolean bodyAllowed = isDefault || isStatic;
+	if (this.parsingJava8Plus) {
+		if (bodyAllowed && hasSemicolonBody) {
+			md.modifiers |= ExtraCompilerModifiers.AccSemicolonBody; // avoid complaints regarding undocumented empty body
+		}
+	} else {
+		if (isDefault) problemReporter().defaultMethodsNotBelow18(md);
+		if (isStatic) problemReporter().staticInterfaceMethodsNotBelow18(md);
+	}
+	if (!bodyAllowed && !this.statementRecoveryActivated && !hasSemicolonBody) {
+		problemReporter().abstractMethodNeedingNoBody(md);
+	}
 }
 protected void consumeLabel() {
 	// Do nothing
@@ -5423,12 +5722,19 @@
     pushOnIntStack(dims1);
 }
 private void consumeLiftingType() {
-	// LiftingType ::= ClassType 'as' ClassType
+	// LiftingType ::= 'as' BeginLiftingType Type
+	// CatchLiftingTypeopt ::= 'as' Type
 
 	LiftingTypeReference liftingType = new LiftingTypeReference();
 	// still waiting for dims, so can't yet construct the details.
 	pushOnAstStack(liftingType);
-	pushOnIntStack(0);
+}
+private void consumeBeginLiftingType() {
+	// BeginLiftingType ::= $empty
+
+	// demarcate base side (already pushed) from role side (next to be consumed)
+	pushOnGenericsLengthStack(0); // handle type arguments
+	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
 }
 // SH}
 
@@ -5447,8 +5753,9 @@
 	}
 
 }
-protected void consumeMarkerAnnotation() {
-	// MarkerAnnotation ::= '@' Name
+protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
+	// MarkerAnnotation ::= AnnotationName
+	// MarkerTypeAnnotation ::= TypeAnnotationName
 	MarkerAnnotation markerAnnotation = null;
 
 	int oldIndex = this.identifierPtr;
@@ -5456,7 +5763,11 @@
 	TypeReference typeReference = getAnnotationType();
 	markerAnnotation = new MarkerAnnotation(typeReference, this.intStack[this.intPtr--]);
 	markerAnnotation.declarationSourceEnd = markerAnnotation.sourceEnd;
-	pushOnExpressionStack(markerAnnotation);
+	if (isTypeAnnotation) {
+		pushOnTypeAnnotationStack(markerAnnotation);
+	} else {
+		pushOnExpressionStack(markerAnnotation);
+	}
 	if(!this.statementRecoveryActivated &&
 			this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
 			this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
@@ -5506,7 +5817,7 @@
 	// MethodBody ::= NestedMethod '{' BlockStatementsopt '}'
 	this.nestedMethod[this.nestedType] --;
 }
-protected void consumeMethodDeclaration(boolean isNotAbstract) {
+protected void consumeMethodDeclaration(boolean isNotAbstract, boolean isDefaultMethod) {
 	// MethodDeclaration ::= MethodHeader MethodBody
 	// AbstractMethodDeclaration ::= MethodHeader ';'
 
@@ -5532,8 +5843,10 @@
 	if (isNotAbstract) {
 		//statements
 		explicitDeclarations = this.realBlockStack[this.realBlockPtr--];
-		if (!this.options.ignoreMethodBodies) {
-			if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+		if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+			if (this.options.ignoreMethodBodies) {
+				this.astPtr -= length;
+			} else {
 				System.arraycopy(
 					this.astStack,
 					(this.astPtr -= length) + 1,
@@ -5541,9 +5854,6 @@
 					0,
 					length);
 			}
-		} else {
-			length = this.astLengthStack[this.astLengthPtr--];
-			this.astPtr -= length;
 		}
 	}
 
@@ -5566,6 +5876,9 @@
 	// a trailing comment behind the end of the method
 	md.bodyEnd = this.endPosition;
 	md.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
+	if (isDefaultMethod && !this.tolerateDefaultClassMethods) {
+		problemReporter().defaultModifierIllegallySpecified(md.bodyStart, this.endPosition);
+	}
 }
 protected void consumeMethodHeader() {
 	// MethodHeader ::= MethodHeaderName MethodHeaderParameters MethodHeaderExtendedDims ThrowsClauseopt
@@ -5635,15 +5948,13 @@
 	// MethodHeaderExtendedDims ::= Dimsopt
 	// now we update the returnType of the method
 	MethodDeclaration md = (MethodDeclaration) this.astStack[this.astPtr];
-	int extendedDims = this.intStack[this.intPtr--];
+	int extendedDimensions = this.intStack[this.intPtr--];
 	if(md.isAnnotationMethod()) {
-		((AnnotationMethodDeclaration)md).extendedDimensions = extendedDims;
+		((AnnotationMethodDeclaration)md).extendedDimensions = extendedDimensions;
 	}
-	if (extendedDims != 0) {
-		TypeReference returnType = md.returnType;
+	if (extendedDimensions != 0) {
 		md.sourceEnd = this.endPosition;
-		int dims = returnType.dimensions() + extendedDims;
-		md.returnType = copyDims(returnType, dims);
+		md.returnType = augmentTypeWithAdditionalDimensions(md.returnType, extendedDimensions, getAnnotationsOnDimensions(extendedDimensions), false);
 		if (this.currentToken == TokenNameLBRACE){
 			md.bodyStart = this.endPosition + 1;
 		}
@@ -5734,7 +6045,11 @@
 	long selectorSource = this.identifierPositionStack[this.identifierPtr--];
 	this.identifierLengthPtr--;
 	//type
-	md.returnType = getTypeReference(this.intStack[this.intPtr--]);
+	TypeReference returnType = getTypeReference(this.intStack[this.intPtr--]);
+	if (isAnnotationMethod)
+		rejectIllegalLeadingTypeAnnotations(returnType);
+	md.returnType = returnType;
+	md.bits |= (returnType.bits & ASTNode.HasTypeAnnotations);
 
 	// consume type parameters
 	int length = this.genericsLengthStack[this.genericsLengthPtr--];
@@ -5791,12 +6106,48 @@
 	md.sourceEnd = 	this.rParenPos;
 	//arguments
 	if (length != 0) {
-		System.arraycopy(
-			this.astStack,
-			this.astPtr + 1,
-			md.arguments = new Argument[length],
-			0,
-			length);
+		Argument arg = (Argument) this.astStack[this.astPtr + 1];
+		if (arg.isReceiver()) {
+			md.receiver = (Receiver) arg;
+			if (length > 1) {
+				System.arraycopy(
+					this.astStack,
+					this.astPtr + 2,
+					md.arguments = new Argument[length - 1],
+					0,
+					length - 1);
+			}
+			// Receiver annotations can only be type annotations; move to the type
+			Annotation[] annotations = arg.annotations;
+			if (annotations != null && annotations.length > 0) {
+				// The code assumes that receiver.type.annotations[0] will be null/empty
+				TypeReference type = arg.type;
+				if (type.annotations == null) {
+					type.bits |= ASTNode.HasTypeAnnotations;
+					type.annotations = new Annotation[type.getAnnotatableLevels()][];
+					md.bits |= ASTNode.HasTypeAnnotations;
+				}
+				type.annotations[0] = annotations;
+				int annotationSourceStart = annotations[0].sourceStart;
+				if (type.sourceStart > annotationSourceStart)
+					type.sourceStart = annotationSourceStart;
+				arg.annotations = null;
+			}
+			md.bits |= (arg.type.bits & ASTNode.HasTypeAnnotations);
+		} else {
+			System.arraycopy(
+					this.astStack,
+					this.astPtr + 1,
+					md.arguments = new Argument[length],
+					0,
+					length);
+			for (int i = 0, max = md.arguments.length; i < max; i++) {
+				if ((md.arguments[i].bits & ASTNode.HasTypeAnnotations) != 0) {
+					md.bits |= ASTNode.HasTypeAnnotations;
+					break;
+				}
+			}
+		}
 	}
 //{ObjectTeams: enhance callin method:
 	if (md.isCallin()) {
@@ -5906,6 +6257,17 @@
 		m.receiver = getUnspecifiedReference();
 		m.sourceStart = m.receiver.sourceStart;
 	}
+	int length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--];
+	Annotation [] typeAnnotations;
+	if (length != 0) {
+		System.arraycopy(
+				this.typeAnnotationStack,
+				(this.typeAnnotationPtr -= length) + 1,
+				typeAnnotations = new Annotation[length],
+				0,
+				length);
+		problemReporter().misplacedTypeAnnotations(typeAnnotations[0], typeAnnotations[typeAnnotations.length - 1]);
+	}
 	pushOnExpressionStack(m);
 }
 protected void consumeMethodInvocationNameWithTypeArguments() {
@@ -5924,7 +6286,7 @@
 	int length = this.genericsLengthStack[this.genericsLengthPtr--];
 	this.genericsPtr -= length;
 	System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length);
-	this.intPtr--;
+	this.intPtr--;  // consume position of '<'
 
 	m.receiver = getUnspecifiedReference();
 	m.sourceStart = m.receiver.sourceStart;
@@ -5958,7 +6320,7 @@
 	int length = this.genericsLengthStack[this.genericsLengthPtr--];
 	this.genericsPtr -= length;
 	System.arraycopy(this.genericsStack, this.genericsPtr + 1, m.typeArguments = new TypeReference[length], 0, length);
-	this.intPtr--;
+	this.intPtr--; // consume position of '<'
 
 	m.receiver = this.expressionStack[this.expressionPtr];
 	m.sourceStart = m.receiver.sourceStart;
@@ -6239,6 +6601,37 @@
 	// Resources ::= Resources ';' Resource
 	concatNodeLists();
 }
+protected void consumeTypeAnnotation() {
+	// TypeAnnotation ::= NormalTypeAnnotation
+	// TypeAnnotation ::= MarkerTypeAnnotation
+	// TypeAnnotation ::= SingleMemberTypeAnnotation
+	
+	if (!this.statementRecoveryActivated &&
+			this.options.sourceLevel < ClassFileConstants.JDK1_8 &&
+			this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+		Annotation annotation = this.typeAnnotationStack[this.typeAnnotationPtr];
+		problemReporter().invalidUsageOfTypeAnnotations(annotation);
+	}
+	this.dimensions = this.intStack[this.intPtr--]; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=417660
+}
+protected void consumeOneMoreTypeAnnotation() {
+	// TypeAnnotations ::= TypeAnnotations TypeAnnotation
+//{ObjectTeams: inside a sentinel-delimited list?
+	if (this.typeAnnotationLengthPtr > 1) {
+		int l = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr-2];
+		if (this.typeAnnotationPtr - l - 1 > -1) {
+			if (this.typeAnnotationStack[this.typeAnnotationPtr - l - 1] == annotationSentinel) {
+				// so we have a sentinal delimited list of annotations at lenghts[-2]
+				// merge into that list rather than in into the list at [-1]
+				this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr-2]++;
+				this.typeAnnotationLengthStack[--this.typeAnnotationLengthPtr] = 0;
+				return;
+			}
+		}
+	}
+// SH}
+	this.typeAnnotationLengthStack[--this.typeAnnotationLengthPtr]++;
+}
 protected void consumeNameArrayType() {
 	pushOnGenericsLengthStack(0); // handle type arguments
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
@@ -6267,8 +6660,9 @@
 	this.nestedMethod[this.nestedType] = 0;
 	this.variablesCounter[this.nestedType] = 0;
 }
-protected void consumeNormalAnnotation() {
-	// NormalAnnotation ::= '@' Name '(' MemberValuePairsopt ')'
+protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
+	// NormalTypeAnnotation ::= TypeAnnotationName '(' MemberValuePairsopt ')'
+	// NormalAnnotation ::= AnnotationName '(' MemberValuePairsopt ')'
 	NormalAnnotation normalAnnotation = null;
 
 	int oldIndex = this.identifierPtr;
@@ -6285,7 +6679,12 @@
 			length);
 	}
 	normalAnnotation.declarationSourceEnd = this.rParenPos;
-	pushOnExpressionStack(normalAnnotation);
+	
+	if (isTypeAnnotation) {
+		pushOnTypeAnnotationStack(normalAnnotation);
+	} else {
+		pushOnExpressionStack(normalAnnotation);
+	}
 
 	if(this.currentElement != null) {
 		annotationRecoveryCheckPoint(normalAnnotation.sourceStart, normalAnnotation.declarationSourceEnd);
@@ -6302,9 +6701,13 @@
 	}
 	this.recordStringLiterals = true;
 }
-protected void consumeOneDimLoop() {
+protected void consumeOneDimLoop(boolean isAnnotated) {
 	// OneDimLoop ::= '[' ']'
+	// OneDimLoop ::= TypeAnnotations '[' ']'
 	this.dimensions++;
+	if (!isAnnotated) {
+		pushOnTypeAnnotationLengthStack(0); // signal no annotations for the current dimension.
+	}
 }
 protected void consumeOnlySynchronized() {
 	// OnlySynchronized ::= 'synchronized'
@@ -6358,7 +6761,7 @@
 	impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
 }
 protected void consumePackageDeclarationName() {
-	// PackageDeclarationName ::= 'package' Name
+	// PackageDeclarationName ::= PackageComment 'package' Name RejectTypeAnnotations
 	/* build an ImportRef build from the last name
 	stored in the identifier stack. */
 
@@ -6400,7 +6803,7 @@
 	}
 }
 protected void consumePackageDeclarationNameWithModifiers() {
-	// PackageDeclarationName ::= Modifiers 'package' Name
+	// PackageDeclarationName ::= Modifiers 'package' PushRealModifiers Name RejectTypeAnnotations
 	/* build an ImportRef build from the last name
 	stored in the identifier stack. */
 
@@ -6418,7 +6821,8 @@
 		0,
 		length);
 
-	int packageModifiersSourceStart = this.intStack[this.intPtr--]; // we don't need the modifiers start
+	int packageModifiersSourceStart = this.intStack[this.intPtr--];
+	int packageModifiersSourceEnd = packageModifiersSourceStart; // Unless there were any
 	int packageModifiers = this.intStack[this.intPtr--];
 
 //{ObjectTeams: ROFI: handle role files within a  team package
@@ -6437,15 +6841,24 @@
 			0,
 			length);
 		impt.declarationSourceStart = packageModifiersSourceStart;
-		this.intPtr--; // we don't need the position of the 'package keyword
+		packageModifiersSourceEnd = this.intStack[this.intPtr--] - 2; // we don't need the position of the 'package keyword
 	} else {
 		impt.declarationSourceStart = this.intStack[this.intPtr--];
+		packageModifiersSourceEnd = impt.declarationSourceStart - 2;
 		// get possible comment source start
 		if (this.javadoc != null) {
 			impt.declarationSourceStart = this.javadoc.sourceStart;
 		}
 	}
 
+//{ObjectTeams: hide team modifier:
+	packageModifiers &= ~ClassFileConstants.AccTeam;
+// SH}
+	if (packageModifiers != 0) {
+		problemReporter().illegalModifiers(packageModifiersSourceStart, packageModifiersSourceEnd);
+	}
+	
+	
 	if (this.currentToken == TokenNameSEMICOLON){
 		impt.declarationSourceEnd = this.scanner.currentPosition - 1;
 	} else {
@@ -6471,6 +6884,10 @@
 
 	pushOnAstLengthStack(0);
 	pushOnIntStack(0); // flagging no mappings
+	this.scanner._insideParameterMapping = false;
+}
+protected void consumeParameterMappings() {
+	this.scanner._insideParameterMapping = false;	
 }
 protected void consumeParameterMappingList() {
 	// CallinParameterMappingList  ::= CallinParameterMappingList ',' ParameterMapping
@@ -6501,11 +6918,8 @@
 
 	char[] ident = getIdentifier();
 	long pos = this.identifierPositionStack[this.identifierPtr--];
-	this.intPtr--; // start pos of '->' token (unused)
-	int bindingKind = this.intStack[this.intPtr--];
-	assert(bindingKind == TerminalTokens.TokenNameBINDOUT);
 
-	pushOnAstStack(new ParameterMapping(bindingKind, expression, new SingleNameReference(ident, pos)));
+	pushOnAstStack(new ParameterMapping(TerminalTokens.TokenNameBINDOUT, expression, new SingleNameReference(ident, pos)));
 }
 /** consumes what is known to be a single identifier (currently only ident of param map) */
 protected char[] getIdentifier() {
@@ -6527,6 +6941,8 @@
 	jumpOverMethodBody();
 	pushOnIntStack(1); // signal that we have param mappings
 	pushOnAstLengthStack(0); // no mappings yet
+	
+	this.scanner._insideParameterMapping = true;
 }
 //SH}
 
@@ -6844,9 +7260,10 @@
 
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
 	pushOnGenericsLengthStack(0);
-
+	ClassLiteralAccess cla;
 	pushOnExpressionStack(
-		new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--])));
+		cla = new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--])));
+	rejectIllegalTypeAnnotations(cla.type); // javac correctly rejects annotations on dimensions here.
 }
 protected void consumePrimaryNoNewArrayName() {
 	// PrimaryNoNewArray ::= Name '.' 'class'
@@ -6856,17 +7273,55 @@
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
 	pushOnGenericsLengthStack(0);
 	TypeReference typeReference = getTypeReference(0);
+	
+	rejectIllegalTypeAnnotations(typeReference);
 
 	pushOnExpressionStack(
 		new ClassLiteralAccess(this.intStack[this.intPtr--], typeReference));
 }
+protected void rejectIllegalLeadingTypeAnnotations(TypeReference typeReference) {
+	// Reject misplaced annotations prefixed to a type reference; Used when the grammar is permissive enough to allow them in the first place.
+	Annotation [][]  annotations = typeReference.annotations;
+	if (annotations != null && annotations[0] != null) {
+		problemReporter().misplacedTypeAnnotations(annotations[0][0], annotations[0][annotations[0].length - 1]);
+		annotations[0] = null;  // don't complain further.
+	}
+}
+private void rejectIllegalTypeAnnotations(TypeReference typeReference) {
+	rejectIllegalTypeAnnotations(typeReference, false);
+}
+private void rejectIllegalTypeAnnotations(TypeReference typeReference, boolean tolerateAnnotationsOnDimensions) {
+	// Reject misplaced annotations on type reference; Used when grammar is permissive enough to allow them in the first place.
+	Annotation [][]  annotations = typeReference.annotations;
+	Annotation[] misplacedAnnotations;
+	for (int i = 0, length = annotations == null ? 0 : annotations.length; i < length; i++) {
+		misplacedAnnotations =  annotations[i];
+		if (misplacedAnnotations != null) {
+			problemReporter().misplacedTypeAnnotations(misplacedAnnotations[0], misplacedAnnotations[misplacedAnnotations.length - 1]);
+		}
+	}
+	annotations = typeReference.getAnnotationsOnDimensions(true);
+	for (int i = 0, length = annotations == null ? 0 : annotations.length; i < length; i++) {
+		misplacedAnnotations = annotations[i];
+		if (misplacedAnnotations != null) {
+			if (tolerateAnnotationsOnDimensions)
+				problemReporter().toleratedMisplacedTypeAnnotations(misplacedAnnotations[0], misplacedAnnotations[misplacedAnnotations.length - 1]);
+			else 
+				problemReporter().misplacedTypeAnnotations(misplacedAnnotations[0], misplacedAnnotations[misplacedAnnotations.length - 1]);
+		}
+	}
+	typeReference.annotations = null;
+	typeReference.setAnnotationsOnDimensions(null);
+	typeReference.bits &= ~ASTNode.HasTypeAnnotations;
+}
 protected void consumePrimaryNoNewArrayNameSuper() {
 	// PrimaryNoNewArray ::= Name '.' 'super'
 	// handle type arguments
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
 	pushOnGenericsLengthStack(0);
+	// javac does not accept annotations here anywhere ...
 	TypeReference typeReference = getTypeReference(0);
-
+	rejectIllegalTypeAnnotations(typeReference);
 	pushOnExpressionStack(
 		new QualifiedSuperReference(
 			typeReference,
@@ -6878,9 +7333,9 @@
 	// handle type arguments
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
 	pushOnGenericsLengthStack(0); // handle type arguments
-
+	// javac does not accept annotations here anywhere ...
 	TypeReference typeReference = getTypeReference(0);
-
+	rejectIllegalTypeAnnotations(typeReference);
 	pushOnExpressionStack(
 		new QualifiedThisReference(
 			typeReference,
@@ -6890,21 +7345,25 @@
 protected void consumePrimaryNoNewArrayPrimitiveArrayType() {
 	// PrimaryNoNewArray ::= PrimitiveType Dims '.' 'class'
 	this.intPtr--; // remove the class start position
+	ClassLiteralAccess cla;
 	pushOnExpressionStack(
-		new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--])));
+		cla = new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(this.intStack[this.intPtr--])));
+	rejectIllegalTypeAnnotations(cla.type, true /* tolerate annotations on dimensions for bug compatibility for now */);
 }
 protected void consumePrimaryNoNewArrayPrimitiveType() {
 	// PrimaryNoNewArray ::= PrimitiveType '.' 'class'
 	this.intPtr--; // remove the class start position
+	ClassLiteralAccess cla;
 	pushOnExpressionStack(
-		new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(0)));
+		cla = new ClassLiteralAccess(this.intStack[this.intPtr--], getTypeReference(0)));
+	rejectIllegalTypeAnnotations(cla.type);
 }
 protected void consumePrimaryNoNewArrayThis() {
 	// PrimaryNoNewArray ::= 'this'
 	pushOnExpressionStack(new ThisReference(this.intStack[this.intPtr--], this.endPosition));
 }
 protected void consumePrimaryNoNewArrayWithName() {
-	// PrimaryNoNewArray ::=  PushLPAREN Expression PushRPAREN
+	// PrimaryNoNewArray ::=  PushLPAREN Name PushRPAREN
 	pushOnExpressionStack(getUnspecifiedReferenceOptimized());
 	final Expression parenthesizedExpression = this.expressionStack[this.expressionPtr];
 	updateSourcePosition(parenthesizedExpression);
@@ -6929,6 +7388,25 @@
 	resetModifiers();
 	pushOnExpressionStackLengthStack(0);
 }
+protected void consumePushCombineModifiers() {
+	// ModifiersWithDefault ::= Modifiersopt 'default' Modifiersopt'
+	// int stack on entry : ... Modifiers, ModifiersSourceStart, defaultSourceStart, defaultSourceEnd, Modifiers', Modifiers'SourceStart <<--- intPtr
+	// int stack on exit : ... combinedModifiers, combinedModifiersSourceStart <<--- intPtr
+	
+	this.intPtr--; // pop modifiers'SourceStart, real location is with earlier block
+	int newModifiers = this.intStack[this.intPtr--] | ExtraCompilerModifiers.AccDefaultMethod; // pop modifiers
+	this.intPtr -= 2; // pop location of 'default' keyword
+	
+	if ((this.intStack[this.intPtr - 1] & newModifiers) != 0) { // duplicate modifier(s) ?
+		newModifiers |= ExtraCompilerModifiers.AccAlternateModifierProblem;
+	}
+	this.intStack[this.intPtr - 1] |= newModifiers; // merge them in place
+	// Also fix number of annotations-modifiers:
+	this.expressionLengthStack[this.expressionLengthPtr - 1] += this.expressionLengthStack[this.expressionLengthPtr--];
+	if (this.currentElement != null) {
+		this.currentElement.addModifier(newModifiers, this.intStack[this.intPtr]);
+	}
+}
 protected void consumePushModifiersForHeader() {
 	checkComment(); // might update modifiers with AccDeprecated
 	pushOnIntStack(this.modifiers); // modifiers
@@ -6947,12 +7425,20 @@
 	pushOnIntStack(this.modifiersSourceStart);
 	resetModifiers();
 }
-protected void consumeQualifiedName() {
+protected void consumeQualifiedName(boolean qualifiedNameIsAnnotated) {
 	// QualifiedName ::= Name '.' SimpleName
+	// QualifiedName ::= Name '.' TypeAnnotations SimpleName 
 	/*back from the recursive loop of QualifiedName.
 	Updates identifier length into the length stack*/
 
 	this.identifierLengthStack[--this.identifierLengthPtr]++;
+	if (!qualifiedNameIsAnnotated) {
+		pushOnTypeAnnotationLengthStack(0);
+	}
+}
+protected void consumeUnannotatableQualifiedName() {
+	// UnannotatableName ::= UnannotatableName '.' SimpleName
+	this.identifierLengthStack[--this.identifierLengthPtr]++;
 }
 protected void consumeRecoveryMethodHeaderName() {
 	// this method is call only inside recovery
@@ -7035,2159 +7521,2720 @@
 	// PushRPAREN ::= ')'
 	pushOnIntStack(this.rParenPos);
 }
+protected void consumeNonTypeUseName() { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=383596
+	// RejectTypeAnnotations ::= $empty
+	// We can get here with type annotation stack empty, because completion parser manipulates the identifier stacks even without rule reduction. See completionIdentifierCheck
+	for (int i = this.identifierLengthStack[this.identifierLengthPtr]; i > 0 && this.typeAnnotationLengthPtr >= 0; --i) {
+		int length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--];
+		Annotation [] typeAnnotations;
+		if (length != 0) {
+			System.arraycopy(
+					this.typeAnnotationStack,
+					(this.typeAnnotationPtr -= length) + 1,
+					typeAnnotations = new Annotation[length],
+					0,
+					length);
+			problemReporter().misplacedTypeAnnotations(typeAnnotations[0], typeAnnotations[typeAnnotations.length - 1]);
+		}
+	}
+}
+protected void consumeZeroTypeAnnotations() {
+	// PushZeroTypeAnnotations ::= $empty
+	// Name ::= SimpleName
+	// TypeAnnotationsopt ::= $empty
+	pushOnTypeAnnotationLengthStack(0); // signal absence of @308 annotations.
+}
 // This method is part of an automatic generation : do NOT edit-modify
 protected void consumeRule(int act) {
   switch ( act ) {
-    case 35 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); }  //$NON-NLS-1$
+    case 39 : if (DEBUG) { System.out.println("Type ::= PrimitiveType"); }  //$NON-NLS-1$
 		    consumePrimitiveType();  
 			break;
  
-    case 52 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
+    case 53 : if (DEBUG) { System.out.println("ReferenceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
 		    consumeReferenceType();  
 			break;
  
-    case 56 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); }  //$NON-NLS-1$
+    case 57 : if (DEBUG) { System.out.println("ClassOrInterface ::= Name"); }  //$NON-NLS-1$
 		    consumeClassOrInterfaceName();  
 			break;
  
-    case 57 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); }  //$NON-NLS-1$
+    case 58 : if (DEBUG) { System.out.println("ClassOrInterface ::= GenericType DOT Name"); }  //$NON-NLS-1$
 		    consumeClassOrInterface();  
 			break;
  
-    case 58 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); }  //$NON-NLS-1$
+    case 59 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface TypeArguments"); }  //$NON-NLS-1$
 		    consumeGenericType();  
 			break;
  
-    case 59 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); }  //$NON-NLS-1$
+    case 60 : if (DEBUG) { System.out.println("GenericType ::= ClassOrInterface LESS GREATER"); }  //$NON-NLS-1$
 		    consumeGenericTypeWithDiamond();  
 			break;
  
-    case 60 : if (DEBUG) { System.out.println("LiftingType ::= ClassType as ClassType"); }  //$NON-NLS-1$
+    case 62 : if (DEBUG) { System.out.println("LiftingTypeopt ::= as BeginLiftingType Type"); }  //$NON-NLS-1$
 		    consumeLiftingType();  
 			break;
  
-    case 61 : if (DEBUG) { System.out.println("ArrayLiftingType ::= ArrayType as ArrayType"); }  //$NON-NLS-1$
-		    consumeLiftingTypeArray();  
+    case 63 : if (DEBUG) { System.out.println("BeginLiftingType ::="); }  //$NON-NLS-1$
+		    consumeBeginLiftingType();  
 			break;
  
-    case 62 : if (DEBUG) { System.out.println("InvalidDeclaredArrayLifting ::= ClassType as ArrayType"); }  //$NON-NLS-1$
-		    consumeLiftingTypeArrayInvalid();  
+    case 65 : if (DEBUG) { System.out.println("CatchLiftingTypeopt ::= as Type"); }  //$NON-NLS-1$
+		    consumeLiftingType();  
 			break;
  
-    case 63 : if (DEBUG) { System.out.println("InvalidDeclaredArrayLifting ::= ArrayType as ClassType"); }  //$NON-NLS-1$
-		    consumeLiftingTypeArrayInvalid();  
-			break;
- 
-    case 64 : if (DEBUG) { System.out.println("BaseAnchoredType ::= base DOT SimpleName"); }  //$NON-NLS-1$
+    case 66 : if (DEBUG) { System.out.println("BaseAnchoredType ::= base DOT SimpleName"); }  //$NON-NLS-1$
 		    consumeBaseAnchoredType();  
 			break;
  
-    case 67 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); }  //$NON-NLS-1$
+    case 69 : if (DEBUG) { System.out.println("ArrayTypeWithTypeArgumentsName ::= GenericType DOT Name"); }  //$NON-NLS-1$
 		    consumeArrayTypeWithTypeArgumentsName();  
 			break;
  
-    case 68 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); }  //$NON-NLS-1$
+    case 70 : if (DEBUG) { System.out.println("ArrayType ::= PrimitiveType Dims"); }  //$NON-NLS-1$
 		    consumePrimitiveArrayType();  
 			break;
  
-    case 69 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); }  //$NON-NLS-1$
+    case 71 : if (DEBUG) { System.out.println("ArrayType ::= Name Dims"); }  //$NON-NLS-1$
 		    consumeNameArrayType();  
 			break;
  
-    case 70 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); }  //$NON-NLS-1$
+    case 72 : if (DEBUG) { System.out.println("ArrayType ::= ArrayTypeWithTypeArgumentsName Dims"); }  //$NON-NLS-1$
 		    consumeGenericTypeNameArrayType();  
 			break;
  
-    case 71 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); }  //$NON-NLS-1$
+    case 73 : if (DEBUG) { System.out.println("ArrayType ::= GenericType Dims"); }  //$NON-NLS-1$
 		    consumeGenericTypeArrayType();  
 			break;
  
-    case 76 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); }  //$NON-NLS-1$
-		    consumeQualifiedName();  
+    case 75 : if (DEBUG) { System.out.println("Name ::= SimpleName"); }  //$NON-NLS-1$
+		    consumeZeroTypeAnnotations();  
 			break;
  
-    case 77 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); }  //$NON-NLS-1$
-		    consumeCompilationUnit();  
+    case 80 : if (DEBUG) { System.out.println("UnannotatableName ::= UnannotatableName DOT SimpleName"); }  //$NON-NLS-1$
+		    consumeUnannotatableQualifiedName();  
 			break;
  
-    case 78 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnit();  
+    case 81 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT SimpleName"); }  //$NON-NLS-1$
+		    consumeQualifiedName(false);  
 			break;
  
-    case 79 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnit();  
+    case 82 : if (DEBUG) { System.out.println("QualifiedName ::= Name DOT TypeAnnotations SimpleName"); }  //$NON-NLS-1$
+		    consumeQualifiedName(true);  
 			break;
  
-    case 80 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnitWithTypes();  
+    case 83 : if (DEBUG) { System.out.println("TypeAnnotationsopt ::="); }  //$NON-NLS-1$
+		    consumeZeroTypeAnnotations();  
 			break;
  
-    case 81 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnitWithTypes();  
+     case 87 : if (DEBUG) { System.out.println("TypeAnnotations0 ::= TypeAnnotations0 TypeAnnotation"); }  //$NON-NLS-1$
+		    consumeOneMoreTypeAnnotation();  
 			break;
  
-    case 82 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnit();  
+     case 88 : if (DEBUG) { System.out.println("TypeAnnotation ::= NormalTypeAnnotation"); }  //$NON-NLS-1$
+		    consumeTypeAnnotation();  
 			break;
  
-    case 83 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnitWithTypes();  
+     case 89 : if (DEBUG) { System.out.println("TypeAnnotation ::= MarkerTypeAnnotation"); }  //$NON-NLS-1$
+		    consumeTypeAnnotation();  
 			break;
  
-    case 84 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
-		    consumeInternalCompilationUnitWithTypes();  
+     case 90 : if (DEBUG) { System.out.println("TypeAnnotation ::= SingleMemberTypeAnnotation"); }  //$NON-NLS-1$
+		    consumeTypeAnnotation();  
 			break;
  
-    case 85 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); }  //$NON-NLS-1$
-		    consumeEmptyInternalCompilationUnit();  
-			break;
- 
-    case 86 : if (DEBUG) { System.out.println("ReduceImports ::="); }  //$NON-NLS-1$
-		    consumeReduceImports();  
-			break;
- 
-    case 87 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); }  //$NON-NLS-1$
-		    consumeEnterCompilationUnit();  
-			break;
- 
-    case 105 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
-		    consumeCatchHeader();  
-			break;
- 
-    case 107 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); }  //$NON-NLS-1$
-		    consumeImportDeclarations();  
-			break;
- 
-    case 109 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); }  //$NON-NLS-1$
-		    consumeTypeDeclarations();  
-			break;
- 
-    case 110 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); }  //$NON-NLS-1$
-		    consumePackageDeclaration();  
-			break;
- 
-    case 111 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); }  //$NON-NLS-1$
-		    consumePackageDeclarationNameWithModifiers();  
-			break;
- 
-    case 112 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); }  //$NON-NLS-1$
-		    consumePackageDeclarationName();  
-			break;
- 
-    case 113 : if (DEBUG) { System.out.println("PackageComment ::="); }  //$NON-NLS-1$
-		    consumePackageComment();  
-			break;
- 
-    case 119 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); }  //$NON-NLS-1$
-		    consumeImportDeclaration();  
-			break;
- 
-    case 120 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import ImportName"); }  //$NON-NLS-1$
-		    consumeSingleTypeImportDeclarationName();  
-			break;
- 
-    case 122 : if (DEBUG) { System.out.println("ImportName ::= Name DOT team DOT Name"); }  //$NON-NLS-1$
-		    consumeNameContainingTeam();  
-			break;
- 
-    case 123 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
-		    consumeImportDeclaration();  
-			break;
- 
-    case 124 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); }  //$NON-NLS-1$
-		    consumeTypeImportOnDemandDeclarationName();  
-			break;
- 
-     case 127 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeEmptyTypeDeclaration();  
-			break;
- 
-    case 131 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); }  //$NON-NLS-1$
-		    consumeModifiers2();  
-			break;
- 
-    case 143 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); }  //$NON-NLS-1$
-		    consumeAnnotationAsModifier();  
-			break;
- 
-    case 147 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); }  //$NON-NLS-1$
-		    consumeClassDeclaration();  
-			break;
- 
-    case 148 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); }  //$NON-NLS-1$
-		    consumeClassHeader();  
-			break;
- 
-    case 149 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); }  //$NON-NLS-1$
-		    consumeTypeHeaderNameWithTypeParameters();  
-			break;
- 
-    case 151 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); }  //$NON-NLS-1$
-		    consumeClassHeaderName1();  
-			break;
- 
-    case 152 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); }  //$NON-NLS-1$
-		    consumeClassHeaderExtends();  
-			break;
- 
-    case 153 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); }  //$NON-NLS-1$
-		    consumeClassHeaderImplements();  
-			break;
- 
-    case 156 : if (DEBUG) { System.out.println("ClassHeaderPlayedBy ::= playedBy ClassType"); }  //$NON-NLS-1$
-		    consumeClassHeaderPlayedBy();  
-			break;
- 
-    case 162 : if (DEBUG) { System.out.println("PredicateHeader ::= when"); }  //$NON-NLS-1$
-		    consumePredicate(false);  
-			break;
- 
-    case 164 : if (DEBUG) { System.out.println("BasePredicateHeader ::= base when"); }  //$NON-NLS-1$
-		    consumePredicate(true);  
-			break;
- 
-    case 165 : if (DEBUG) { System.out.println("PredicateBody ::= LPAREN ForceNoDiet Expression..."); }  //$NON-NLS-1$
-		    consumePredicateExpression();  
-			break;
- 
-    case 166 : if (DEBUG) { System.out.println("PredicateBody ::= LPAREN RPAREN"); }  //$NON-NLS-1$
-		    consumePredicateMissingExpression();  
-			break;
- 
-    case 167 : if (DEBUG) { System.out.println("ForceBaseIsIdentifier ::="); }  //$NON-NLS-1$
-		    consumeForceBaseIsIdentifier();  
-			break;
- 
-    case 168 : if (DEBUG) { System.out.println("RestoreBaseKeyword ::="); }  //$NON-NLS-1$
-		    consumeRestoreBaseKeyword();  
-			break;
- 
-    case 170 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); }  //$NON-NLS-1$
-		    consumeInterfaceTypeList();  
-			break;
- 
-    case 171 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
-		    consumeInterfaceType();  
-			break;
- 
-    case 174 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); }  //$NON-NLS-1$
-		    consumeClassBodyDeclarations();  
-			break;
- 
-    case 178 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); }  //$NON-NLS-1$
-		    consumeClassBodyDeclaration();  
-			break;
- 
-    case 179 : if (DEBUG) { System.out.println("Diet ::="); }  //$NON-NLS-1$
-		    consumeDiet();  
-			break;
-
-    case 180 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); }  //$NON-NLS-1$
-		    consumeClassBodyDeclaration();  
-			break;
- 
-    case 181 : if (DEBUG) { System.out.println("CreateInitializer ::="); }  //$NON-NLS-1$
-		    consumeCreateInitializer();  
-			break;
-
-    case 190 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeEmptyTypeDeclaration();  
-			break;
-
-    case 193 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); }  //$NON-NLS-1$
-		    consumeFieldDeclaration();  
-			break;
- 
-    case 195 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); }  //$NON-NLS-1$
-		    consumeVariableDeclarators();  
-			break;
- 
-    case 198 : if (DEBUG) { System.out.println("EnterVariable ::="); }  //$NON-NLS-1$
-		    consumeEnterVariable();  
-			break;
- 
-    case 199 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); }  //$NON-NLS-1$
-		    consumeExitVariableWithInitialization();  
-			break;
- 
-    case 200 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); }  //$NON-NLS-1$
-		    consumeExitVariableWithoutInitialization();  
-			break;
- 
-    case 201 : if (DEBUG) { System.out.println("ForceNoDiet ::="); }  //$NON-NLS-1$
-		    consumeForceNoDiet();  
-			break;
- 
-    case 202 : if (DEBUG) { System.out.println("RestoreDiet ::="); }  //$NON-NLS-1$
-		    consumeRestoreDiet();  
-			break;
- 
-    case 207 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
-		    // set to true to consume a method with a body
- consumeMethodDeclaration(true);  
-			break;
- 
-    case 208 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); }  //$NON-NLS-1$
-		    // set to false to consume a method without body
- consumeMethodDeclaration(false);  
-			break;
- 
-    case 209 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); }  //$NON-NLS-1$
-		    consumeMethodHeader();  
-			break;
- 
-    case 210 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); }  //$NON-NLS-1$
-		    consumeMethodHeaderNameWithTypeParameters(false);  
-			break;
- 
-    case 211 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); }  //$NON-NLS-1$
-		    consumeMethodHeaderName(false);  
-			break;
- 
-    case 212 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); }  //$NON-NLS-1$
-		    consumeMethodHeaderRightParen();  
-			break;
- 
-    case 213 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); }  //$NON-NLS-1$
-		    consumeMethodHeaderExtendedDims();  
-			break;
- 
-    case 214 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); }  //$NON-NLS-1$
-		    consumeMethodHeaderThrowsClause();  
-			break;
- 
-    case 215 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
-		    consumeConstructorHeader();  
-			break;
- 
-    case 216 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); }  //$NON-NLS-1$
-		    consumeConstructorHeaderNameWithTypeParameters();  
-			break;
- 
-    case 217 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); }  //$NON-NLS-1$
-		    consumeConstructorHeaderName();  
-			break;
- 
-    case 219 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); }  //$NON-NLS-1$
-		    consumeFormalParameterList();  
-			break;
- 
-    case 220 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type..."); }  //$NON-NLS-1$
-		    consumeFormalParameter(false);  
-			break;
- 
-    case 221 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type ELLIPSIS..."); }  //$NON-NLS-1$
-		    consumeFormalParameter(true);  
-			break;
- 
-    case 222 : if (DEBUG) { System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); }  //$NON-NLS-1$
-		    consumeCatchFormalParameter();  
-			break;
- 
-    case 223 : if (DEBUG) { System.out.println("CatchType ::= UnionType"); }  //$NON-NLS-1$
-		    consumeCatchType();  
-			break;
- 
-    case 224 : if (DEBUG) { System.out.println("UnionType ::= Type"); }  //$NON-NLS-1$
-		    consumeUnionTypeAsClassType();  
-			break;
- 
-    case 225 : if (DEBUG) { System.out.println("UnionType ::= UnionType OR Type"); }  //$NON-NLS-1$
-		    consumeUnionType();  
-			break;
- 
-    case 227 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); }  //$NON-NLS-1$
-		    consumeClassTypeList();  
-			break;
- 
-    case 228 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); }  //$NON-NLS-1$
-		    consumeClassTypeElt();  
-			break;
- 
-    case 229 : if (DEBUG) { System.out.println("MethodBody ::= Predicateopt NestedMethod LBRACE..."); }  //$NON-NLS-1$
-		    consumeMethodBody();  
-			break;
- 
-    case 230 : if (DEBUG) { System.out.println("NestedMethod ::="); }  //$NON-NLS-1$
-		    consumeNestedMethod();  
-			break;
- 
-    case 234 : if (DEBUG) { System.out.println("CalloutBinding ::= CalloutHeaderLong..."); }  //$NON-NLS-1$
-		    consumeCalloutBindingLong();  
-			break;
- 
-    case 235 : if (DEBUG) { System.out.println("CalloutHeaderLong ::= CalloutBindingLeftLong..."); }  //$NON-NLS-1$
-		    consumeCalloutHeader();  
-			break;
- 
-    case 236 : if (DEBUG) { System.out.println("CalloutHeaderLong ::= CalloutBindingLeftLong..."); }  //$NON-NLS-1$
-		    consumeCalloutHeader();  
-			break;
- 
-    case 237 : if (DEBUG) { System.out.println("CalloutBindingLeftLong ::= MethodSpecLong CalloutKind"); }  //$NON-NLS-1$
-		    consumeCalloutBindingLeft(true);  
-			break;
- 
-    case 238 : if (DEBUG) { System.out.println("CalloutBinding ::= Modifiersopt CalloutBindingLeftShort"); }  //$NON-NLS-1$
-		    consumeCalloutHeader();  
-			break;
- 
-    case 239 : if (DEBUG) { System.out.println("CalloutBindingLeftShort ::= MethodSpecShort CalloutKind"); }  //$NON-NLS-1$
-		    consumeCalloutBindingLeft(false);  
-			break;
- 
-    case 240 : if (DEBUG) { System.out.println("CalloutBinding ::= Modifiersopt CalloutBindingLeftShort"); }  //$NON-NLS-1$
-		    consumeCalloutParameterMappingsInvalid();  
-			break;
- 
-    case 245 : if (DEBUG) { System.out.println("CalloutModifier ::= get"); }  //$NON-NLS-1$
-		    consumeCalloutModifier(TokenNameget);  
-			break;
- 
-    case 246 : if (DEBUG) { System.out.println("CalloutModifier ::= set"); }  //$NON-NLS-1$
-		    consumeCalloutModifier(TokenNameset);  
-			break;
- 
-    case 248 : if (DEBUG) { System.out.println("CalloutParameterMappingsopt ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeParameterMappingsEmpty();  
-			break;
- 
-    case 252 : if (DEBUG) { System.out.println("CalloutParameterMappingList ::=..."); }  //$NON-NLS-1$
-		    consumeParameterMappingList();  
-			break;
- 
-    case 253 : if (DEBUG) { System.out.println("ParameterMapping ::= Expression BINDOUT Identifier"); }  //$NON-NLS-1$
-		    consumeParameterMappingOut();  
-			break;
- 
-    case 254 : if (DEBUG) { System.out.println("ParameterMapping ::= Identifier BINDIN..."); }  //$NON-NLS-1$
-		    consumeParameterMappingIn();  
-			break;
- 
-    case 255 : if (DEBUG) { System.out.println("NestedParamMappings ::="); }  //$NON-NLS-1$
-		    consumeNestedParamMappings();  
-			break;
- 
-    case 256 : if (DEBUG) { System.out.println("CallinBinding ::= CallinHeaderLong..."); }  //$NON-NLS-1$
-		    consumeCallinBindingLong();  
-			break;
- 
-    case 257 : if (DEBUG) { System.out.println("CallinHeaderLong ::= CallinBindingLeftLong..."); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
-			break;
- 
-    case 258 : if (DEBUG) { System.out.println("CallinHeaderLong ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
-			break;
- 
-    case 259 : if (DEBUG) { System.out.println("CallinBindingLeftLong ::= MethodSpecLong BINDIN"); }  //$NON-NLS-1$
-		    consumeCallinBindingLeft(true);  
-			break;
- 
-    case 260 : if (DEBUG) { System.out.println("CallinBinding ::= Modifiersopt CallinBindingLeftShort..."); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
-			break;
- 
-    case 261 : if (DEBUG) { System.out.println("CallinBinding ::= Modifiersopt CallinLabel Modifiersopt"); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
-			break;
- 
-    case 262 : if (DEBUG) { System.out.println("CallinBindingLeftShort ::= MethodSpecShort BINDIN"); }  //$NON-NLS-1$
-		    consumeCallinBindingLeft(false);  
-			break;
- 
-    case 263 : if (DEBUG) { System.out.println("CallinLabel ::= SimpleName COLON"); }  //$NON-NLS-1$
-		    consumeCallinLabel();  
-			break;
- 
-    case 264 : if (DEBUG) { System.out.println("CallinModifier ::= replace"); }  //$NON-NLS-1$
-		    consumeCallinModifier(TokenNamereplace);  
-			break;
- 
-    case 265 : if (DEBUG) { System.out.println("CallinModifier ::= before"); }  //$NON-NLS-1$
-		    consumeCallinModifier(TokenNamebefore);  
-			break;
- 
-    case 266 : if (DEBUG) { System.out.println("CallinModifier ::= after"); }  //$NON-NLS-1$
-		    consumeCallinModifier(TokenNameafter);  
-			break;
- 
-    case 267 : if (DEBUG) { System.out.println("InvalidCallinModifier ::="); }  //$NON-NLS-1$
-		    consumeCallinModifierMissing();  
-			break;
- 
-    case 268 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt..."); }  //$NON-NLS-1$
-		    consumeCallinBindingInvalid(false,false);  
-			break;
- 
-    case 269 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
-		    consumeCallinBindingInvalid(false,false);  
-			break;
- 
-    case 270 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt..."); }  //$NON-NLS-1$
-		    consumeCallinBindingInvalid(false,true);  
-			break;
- 
-    case 271 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
-		    consumeCallinBindingInvalid(false,true);  
-			break;
- 
-    case 272 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= CallinBindingLeftLong..."); }  //$NON-NLS-1$
-		    consumeCallinBindingInvalid(true,false);  
-			break;
- 
-    case 273 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
-		    consumeCallinBindingInvalid(true,false);  
-			break;
- 
-    case 275 : if (DEBUG) { System.out.println("CallinParameterMappingsopt ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeParameterMappingsEmpty();  
-			break;
- 
-    case 279 : if (DEBUG) { System.out.println("CallinParameterMappingList ::=..."); }  //$NON-NLS-1$
-		    consumeParameterMappingList();  
-			break;
- 
-    case 280 : if (DEBUG) { System.out.println("MethodSpecShort ::= SimpleName"); }  //$NON-NLS-1$
-		    consumeMethodSpecShort();  
-			break;
- 
-    case 281 : if (DEBUG) { System.out.println("MethodSpecLong ::= MethodHeaderName..."); }  //$NON-NLS-1$
-		    consumeMethodSpecLong(false);  
-			break;
- 
-    case 282 : if (DEBUG) { System.out.println("MethodSpecLong ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
-		    consumeMethodSpecLongCtor();  
-			break;
- 
-    case 283 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= MethodHeaderName..."); }  //$NON-NLS-1$
-		    consumeMethodSpecLong(false);  
-			break;
- 
-    case 284 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= MethodSpecNamePlus..."); }  //$NON-NLS-1$
-		    consumeMethodSpecLong(true);  
-			break;
- 
-    case 285 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
-		    consumeMethodSpecLong(false);  
-			break;
- 
-    case 286 : if (DEBUG) { System.out.println("MethodSpecNamePlus ::= Modifiersopt Type PLUS Identifier"); }  //$NON-NLS-1$
-		    consumeMethodHeaderName(false);  
-			break;
- 
-    case 287 : if (DEBUG) { System.out.println("CalloutFieldSpecLong ::= CalloutModifier Type Identifier"); }  //$NON-NLS-1$
-		    consumeFieldSpecLong();  
-			break;
- 
-    case 290 : if (DEBUG) { System.out.println("BaseMethodSpecListShort ::= BaseMethodSpecListShort..."); }  //$NON-NLS-1$
-		    consumeMethodSpecList();  
-			break;
- 
-    case 294 : if (DEBUG) { System.out.println("MethodSpecListLong ::= MethodSpecListLong COMMA..."); }  //$NON-NLS-1$
-		    consumeMethodSpecList();  
-			break;
- 
-    case 295 : if (DEBUG) { System.out.println("PrecedenceDeclaration ::= precedence BindingNames..."); }  //$NON-NLS-1$
-		    consumePrecedenceDeclaration(false);  
-			break;
- 
-    case 296 : if (DEBUG) { System.out.println("PrecedenceDeclaration ::= precedence after BindingNames"); }  //$NON-NLS-1$
-		    consumePrecedenceDeclaration(true);  
-			break;
- 
-    case 298 : if (DEBUG) { System.out.println("BindingNames ::= BindingNames COMMA BindingName"); }  //$NON-NLS-1$
-		    consumeBindingNames();  
-			break;
- 
-    case 299 : if (DEBUG) { System.out.println("BindingName ::= Name"); }  //$NON-NLS-1$
-		    consumeBindingName();  
-			break;
- 
-    case 300 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); }  //$NON-NLS-1$
-		    consumeStaticInitializer();  
-			break;
-
-    case 301 : if (DEBUG) { System.out.println("StaticOnly ::= static"); }  //$NON-NLS-1$
-		    consumeStaticOnly();  
-			break;
- 
-    case 302 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); }  //$NON-NLS-1$
-		    consumeConstructorDeclaration() ;  
-			break;
- 
-    case 303 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); }  //$NON-NLS-1$
-		    consumeInvalidConstructorDeclaration() ;  
-			break;
- 
-    case 304 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(0, THIS_CALL);  
-			break;
- 
-    case 305 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL);  
-			break;
- 
-    case 306 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(0,SUPER_CALL);  
-			break;
- 
-    case 307 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL);  
-			break;
- 
-    case 308 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= tsuper LPAREN..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(0,TSUPER_CALL);  
-			break;
- 
-    case 309 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT tsuper LPAREN"); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(2,TSUPER_CALL);  
-			break;
- 
-    case 310 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(1, SUPER_CALL);  
-			break;
- 
-    case 311 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL);  
-			break;
- 
-    case 312 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(2, SUPER_CALL);  
-			break;
- 
-    case 313 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL);  
-			break;
- 
-    case 314 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(1, THIS_CALL);  
-			break;
- 
-    case 315 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL);  
-			break;
- 
-    case 316 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocation(2, THIS_CALL);  
-			break;
- 
-    case 317 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL);  
-			break;
- 
-    case 318 : if (DEBUG) { System.out.println("BaseConstructorExpression ::= base LPAREN..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationBase(0);  
-			break;
- 
-    case 319 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= base LPAREN..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationBase(1);  
-			break;
- 
-    case 320 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= Primary DOT base LPAREN..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationBase(2);  
-			break;
- 
-    case 321 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= Name DOT base LPAREN..."); }  //$NON-NLS-1$
-		    consumeExplicitConstructorInvocationBase(3);  
-			break;
- 
-    case 322 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); }  //$NON-NLS-1$
-		    consumeInterfaceDeclaration();  
-			break;
- 
-    case 323 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); }  //$NON-NLS-1$
-		    consumeInterfaceHeader();  
-			break;
- 
-    case 324 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); }  //$NON-NLS-1$
-		    consumeTypeHeaderNameWithTypeParameters();  
-			break;
- 
-    case 326 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); }  //$NON-NLS-1$
-		    consumeInterfaceHeaderName1();  
-			break;
- 
-    case 327 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); }  //$NON-NLS-1$
-		    consumeInterfaceHeaderExtends();  
-			break;
- 
-    case 330 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); }  //$NON-NLS-1$
-		    consumeInterfaceMemberDeclarations();  
-			break;
- 
-    case 331 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeEmptyTypeDeclaration();  
-			break;
- 
-    case 333 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
-		    consumeInvalidMethodDeclaration();  
-			break;
- 
-    case 334 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
-		    consumeInvalidConstructorDeclaration(true);  
-			break;
- 
-    case 335 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
-		    consumeInvalidConstructorDeclaration(false);  
-			break;
- 
-    case 347 : if (DEBUG) { System.out.println("PushLeftBrace ::="); }  //$NON-NLS-1$
-		    consumePushLeftBrace();  
-			break;
- 
-    case 348 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); }  //$NON-NLS-1$
-		    consumeEmptyArrayInitializer();  
-			break;
- 
-    case 349 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
-		    consumeArrayInitializer();  
-			break;
- 
-    case 350 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
-		    consumeArrayInitializer();  
-			break;
- 
-    case 352 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); }  //$NON-NLS-1$
-		    consumeVariableInitializers();  
-			break;
- 
-    case 353 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); }  //$NON-NLS-1$
-		    consumeBlock();  
-			break;
- 
-    case 354 : if (DEBUG) { System.out.println("OpenBlock ::="); }  //$NON-NLS-1$
-		    consumeOpenBlock() ;  
-			break;
- 
-    case 356 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); }  //$NON-NLS-1$
-		    consumeBlockStatements() ;  
-			break;
- 
-    case 360 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); }  //$NON-NLS-1$
-		    consumeInvalidInterfaceDeclaration();  
-			break;
- 
-    case 361 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); }  //$NON-NLS-1$
-		    consumeInvalidAnnotationTypeDeclaration();  
-			break;
- 
-    case 362 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); }  //$NON-NLS-1$
-		    consumeInvalidEnumDeclaration();  
-			break;
- 
-    case 363 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); }  //$NON-NLS-1$
-		    consumeLocalVariableDeclarationStatement();  
-			break;
- 
-    case 364 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); }  //$NON-NLS-1$
-		    consumeLocalVariableDeclaration();  
-			break;
- 
-    case 365 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); }  //$NON-NLS-1$
-		    consumeLocalVariableDeclaration();  
-			break;
- 
-    case 366 : if (DEBUG) { System.out.println("PushModifiers ::="); }  //$NON-NLS-1$
-		    consumePushModifiers();  
-			break;
- 
-    case 367 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); }  //$NON-NLS-1$
-		    consumePushModifiersForHeader();  
-			break;
- 
-    case 368 : if (DEBUG) { System.out.println("PushRealModifiers ::="); }  //$NON-NLS-1$
-		    consumePushRealModifiers();  
-			break;
- 
-    case 396 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeEmptyStatement();  
-			break;
- 
-    case 397 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); }  //$NON-NLS-1$
-		    consumeStatementLabel() ;  
-			break;
- 
-    case 398 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); }  //$NON-NLS-1$
-		    consumeStatementLabel() ;  
-			break;
- 
-    case 399 : if (DEBUG) { System.out.println("Label ::= Identifier"); }  //$NON-NLS-1$
-		    consumeLabel() ;  
-			break;
- 
-     case 400 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); }  //$NON-NLS-1$
-		    consumeExpressionStatement();  
-			break;
- 
-    case 410 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
-		    consumeStatementIfNoElse();  
-			break;
- 
-    case 411 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
-		    consumeStatementIfWithElse();  
-			break;
- 
-    case 412 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); }  //$NON-NLS-1$
-		    consumeStatementIfWithElse();  
-			break;
- 
-    case 413 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
-		    consumeStatementSwitch() ;  
-			break;
- 
-    case 414 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); }  //$NON-NLS-1$
-		    consumeEmptySwitchBlock() ;  
-			break;
- 
-    case 417 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); }  //$NON-NLS-1$
-		    consumeSwitchBlock() ;  
-			break;
- 
-    case 419 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); }  //$NON-NLS-1$
-		    consumeSwitchBlockStatements() ;  
-			break;
- 
-    case 420 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); }  //$NON-NLS-1$
-		    consumeSwitchBlockStatement() ;  
-			break;
- 
-    case 422 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); }  //$NON-NLS-1$
-		    consumeSwitchLabels() ;  
-			break;
- 
-     case 423 : if (DEBUG) { System.out.println("SwitchLabel ::= case ConstantExpression COLON"); }  //$NON-NLS-1$
-		    consumeCaseLabel();  
-			break;
- 
-     case 424 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); }  //$NON-NLS-1$
-		    consumeDefaultLabel();  
-			break;
- 
-    case 425 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
-		    consumeStatementWhile() ;  
-			break;
- 
-    case 426 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); }  //$NON-NLS-1$
-		    consumeStatementWhile() ;  
-			break;
- 
-    case 427 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); }  //$NON-NLS-1$
-		    consumeStatementDo() ;  
-			break;
- 
-    case 428 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); }  //$NON-NLS-1$
-		    consumeStatementFor() ;  
-			break;
- 
-    case 429 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); }  //$NON-NLS-1$
-		    consumeStatementFor() ;  
-			break;
- 
-    case 430 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); }  //$NON-NLS-1$
-		    consumeForInit() ;  
-			break;
- 
-    case 434 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); }  //$NON-NLS-1$
-		    consumeStatementExpressionList() ;  
-			break;
- 
-    case 435 : if (DEBUG) { System.out.println("WithinStatement ::= within LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
-		    consumeWithinStatement();  
-			break;
- 
-    case 436 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); }  //$NON-NLS-1$
-		    consumeSimpleAssertStatement() ;  
-			break;
- 
-    case 437 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); }  //$NON-NLS-1$
-		    consumeAssertStatement() ;  
-			break;
- 
-    case 438 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); }  //$NON-NLS-1$
-		    consumeStatementBreak() ;  
-			break;
- 
-    case 439 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); }  //$NON-NLS-1$
-		    consumeStatementBreakWithLabel() ;  
-			break;
- 
-    case 440 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); }  //$NON-NLS-1$
-		    consumeStatementContinue() ;  
-			break;
- 
-    case 441 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); }  //$NON-NLS-1$
-		    consumeStatementContinueWithLabel() ;  
-			break;
- 
-    case 442 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); }  //$NON-NLS-1$
-		    consumeStatementReturn() ;  
-			break;
- 
-    case 443 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); }  //$NON-NLS-1$
-		    consumeStatementThrow();  
-			break;
- 
-    case 444 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); }  //$NON-NLS-1$
-		    consumeStatementSynchronized();  
-			break;
- 
-    case 445 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); }  //$NON-NLS-1$
-		    consumeOnlySynchronized();  
-			break;
- 
-    case 446 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); }  //$NON-NLS-1$
-		    consumeStatementTry(false, false);  
-			break;
- 
-    case 447 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); }  //$NON-NLS-1$
-		    consumeStatementTry(true, false);  
-			break;
- 
-    case 448 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
-		    consumeStatementTry(false, true);  
-			break;
- 
-    case 449 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
-		    consumeStatementTry(true, true);  
-			break;
- 
-    case 450 : if (DEBUG) { System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); }  //$NON-NLS-1$
-		    consumeResourceSpecification();  
-			break;
- 
-    case 451 : if (DEBUG) { System.out.println(";opt ::="); }  //$NON-NLS-1$
-		    consumeResourceOptionalTrailingSemiColon(false);  
-			break;
- 
-    case 452 : if (DEBUG) { System.out.println(";opt ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeResourceOptionalTrailingSemiColon(true);  
-			break;
- 
-    case 453 : if (DEBUG) { System.out.println("Resources ::= Resource"); }  //$NON-NLS-1$
-		    consumeSingleResource();  
-			break;
- 
-    case 454 : if (DEBUG) { System.out.println("Resources ::= Resources TrailingSemiColon Resource"); }  //$NON-NLS-1$
-		    consumeMultipleResources();  
-			break;
- 
-    case 455 : if (DEBUG) { System.out.println("TrailingSemiColon ::= SEMICOLON"); }  //$NON-NLS-1$
-		    consumeResourceOptionalTrailingSemiColon(true);  
-			break;
- 
-    case 456 : if (DEBUG) { System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); }  //$NON-NLS-1$
-		    consumeResourceAsLocalVariableDeclaration();  
-			break;
- 
-    case 457 : if (DEBUG) { System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); }  //$NON-NLS-1$
-		    consumeResourceAsLocalVariableDeclaration();  
-			break;
- 
-    case 459 : if (DEBUG) { System.out.println("ExitTryBlock ::="); }  //$NON-NLS-1$
-		    consumeExitTryBlock();  
-			break;
- 
-    case 461 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); }  //$NON-NLS-1$
-		    consumeCatches();  
-			break;
- 
-    case 462 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
-		    consumeStatementCatch() ;  
-			break;
- 
-    case 464 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); }  //$NON-NLS-1$
-		    consumeLeftParen();  
-			break;
- 
-    case 465 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); }  //$NON-NLS-1$
-		    consumeRightParen();  
-			break;
- 
-    case 470 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayThis();  
-			break;
- 
-    case 471 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArray();  
-			break;
- 
-    case 472 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayWithName();  
-			break;
- 
-    case 476 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayNameThis();  
-			break;
- 
-    case 477 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT super"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayNameSuper();  
-			break;
- 
-    case 478 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayName();  
-			break;
- 
-    case 479 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayArrayType();  
-			break;
- 
-    case 480 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayPrimitiveArrayType();  
-			break;
- 
-    case 481 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); }  //$NON-NLS-1$
-		    consumePrimaryNoNewArrayPrimitiveType();  
-			break;
- 
-    case 482 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); }  //$NON-NLS-1$
-		    consumeRoleClassLiteral();  
-			break;
- 
-    case 485 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); }  //$NON-NLS-1$
-		    consumeAllocationHeader();  
-			break;
- 
-    case 486 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); }  //$NON-NLS-1$
-		    consumeClassInstanceCreationExpressionWithTypeArguments();  
-			break;
- 
-    case 487 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType..."); }  //$NON-NLS-1$
-		    consumeClassInstanceCreationExpression();  
-			break;
- 
-    case 488 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
-		    consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;  
-			break;
- 
-    case 489 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
-		    consumeClassInstanceCreationExpressionQualified() ;  
-			break;
- 
-    case 490 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
-		    consumeClassInstanceCreationExpressionQualified() ;  
-			break;
- 
-    case 491 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
-		    consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;  
-			break;
- 
-    case 492 : if (DEBUG) { System.out.println("EnterInstanceCreationArgumentList ::="); }  //$NON-NLS-1$
-		    consumeEnterInstanceCreationArgumentList();  
-			break;
- 
-    case 493 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT"); }  //$NON-NLS-1$
-		    consumeClassInstanceCreationExpressionName() ;  
-			break;
- 
-    case 494 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); }  //$NON-NLS-1$
-		    consumeClassBodyopt();  
-			break;
- 
-    case 496 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
-		    consumeEnterAnonymousClassBody(false);  
-			break;
- 
-    case 497 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); }  //$NON-NLS-1$
-		    consumeClassBodyopt();  
-			break;
- 
-    case 499 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
-		    consumeEnterAnonymousClassBody(true);  
-			break;
- 
-    case 501 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); }  //$NON-NLS-1$
-		    consumeArgumentList();  
-			break;
- 
-    case 502 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); }  //$NON-NLS-1$
-		    consumeArrayCreationHeader();  
-			break;
- 
-    case 503 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); }  //$NON-NLS-1$
-		    consumeArrayCreationHeader();  
-			break;
- 
-    case 504 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
-		    consumeArrayCreationExpressionWithoutInitializer();  
-			break;
- 
-    case 505 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); }  //$NON-NLS-1$
-		    consumeArrayCreationExpressionWithInitializer();  
-			break;
- 
-    case 506 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
-		    consumeArrayCreationExpressionWithoutInitializer();  
-			break;
- 
-    case 507 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); }  //$NON-NLS-1$
-		    consumeArrayCreationExpressionWithInitializer();  
-			break;
- 
-    case 509 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); }  //$NON-NLS-1$
-		    consumeDimWithOrWithOutExprs();  
-			break;
- 
-     case 511 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= LBRACKET RBRACKET"); }  //$NON-NLS-1$
-		    consumeDimWithOrWithOutExpr();  
-			break;
- 
-     case 512 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); }  //$NON-NLS-1$
-		    consumeDims();  
-			break;
- 
-     case 515 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); }  //$NON-NLS-1$
-		    consumeOneDimLoop();  
-			break;
- 
-    case 516 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); }  //$NON-NLS-1$
-		    consumeFieldAccess(false);  
-			break;
- 
-    case 517 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); }  //$NON-NLS-1$
-		    consumeFieldAccess(true);  
-			break;
- 
-    case 518 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
-		    consumeMethodInvocationName();  
-			break;
- 
-    case 519 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationNameWithTypeArguments();  
-			break;
- 
-    case 520 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationPrimaryWithTypeArguments();  
-			break;
- 
-    case 521 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationPrimary();  
-			break;
- 
-    case 522 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationSuperWithTypeArguments();  
-			break;
- 
-    case 523 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationSuper();  
-			break;
- 
-    case 524 : if (DEBUG) { System.out.println("MethodInvocation ::= tsuper DOT Identifier LPAREN..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationTSuper(UNQUALIFIED);  
-			break;
- 
-    case 525 : if (DEBUG) { System.out.println("MethodInvocation ::= tsuper DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationTSuperWithTypeArguments(0);  
-			break;
- 
-    case 526 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT tsuper DOT Identifier..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationTSuper(QUALIFIED);  
-			break;
- 
-    case 527 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT tsuper DOT..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationTSuperWithTypeArguments(2);  
-			break;
- 
-    case 528 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT Identifier LPAREN..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationBase(false);  
-			break;
- 
-    case 529 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationBaseWithTypeArguments(false);  
-			break;
- 
-    case 530 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT super DOT Identifier..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationBase(true);  
-			break;
- 
-    case 531 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT super DOT..."); }  //$NON-NLS-1$
-		    consumeMethodInvocationBaseWithTypeArguments(true);  
-			break;
- 
-    case 532 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); }  //$NON-NLS-1$
-		    consumeArrayAccess(true);  
-			break;
- 
-    case 533 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); }  //$NON-NLS-1$
-		    consumeArrayAccess(false);  
-			break;
- 
-    case 534 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); }  //$NON-NLS-1$
-		    consumeArrayAccess(false);  
-			break;
- 
-    case 536 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); }  //$NON-NLS-1$
-		    consumePostfixExpression();  
-			break;
- 
-    case 539 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.PLUS,true);  
-			break;
- 
-    case 540 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.MINUS,true);  
-			break;
- 
-    case 541 : if (DEBUG) { System.out.println("PushPosition ::="); }  //$NON-NLS-1$
-		    consumePushPosition();  
-			break;
- 
-    case 544 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.PLUS);  
-			break;
- 
-    case 545 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.MINUS);  
-			break;
- 
-    case 547 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.PLUS,false);  
-			break;
- 
-    case 548 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.MINUS,false);  
-			break;
- 
-    case 550 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.TWIDDLE);  
-			break;
- 
-    case 551 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.NOT);  
-			break;
- 
-    case 553 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); }  //$NON-NLS-1$
-		    consumeCastExpressionWithPrimitiveType();  
-			break;
- 
-    case 554 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
-		    consumeCastExpressionWithGenericsArray();  
-			break;
- 
-    case 555 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
-		    consumeCastExpressionWithQualifiedGenericsArray();  
-			break;
- 
-    case 556 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); }  //$NON-NLS-1$
-		    consumeCastExpressionLL1();  
-			break;
- 
-    case 557 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims PushRPAREN..."); }  //$NON-NLS-1$
-		    consumeCastExpressionWithNameArray();  
-			break;
- 
-    case 558 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); }  //$NON-NLS-1$
-		    consumeOnlyTypeArgumentsForCastExpression();  
-			break;
- 
-    case 559 : if (DEBUG) { System.out.println("InsideCastExpression ::="); }  //$NON-NLS-1$
-		    consumeInsideCastExpression();  
-			break;
- 
-    case 560 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); }  //$NON-NLS-1$
-		    consumeInsideCastExpressionLL1();  
-			break;
- 
-    case 561 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); }  //$NON-NLS-1$
-		    consumeInsideCastExpressionWithQualifiedGenerics();  
-			break;
- 
-    case 563 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.MULTIPLY);  
-			break;
- 
-    case 564 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.DIVIDE);  
-			break;
- 
-    case 565 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.REMAINDER);  
-			break;
- 
-    case 567 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.PLUS);  
-			break;
- 
-    case 568 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.MINUS);  
-			break;
- 
-    case 570 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.LEFT_SHIFT);  
-			break;
- 
-    case 571 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);  
-			break;
- 
-    case 572 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);  
-			break;
- 
-    case 574 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.LESS);  
-			break;
- 
-    case 575 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.GREATER);  
-			break;
- 
-    case 576 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.LESS_EQUAL);  
-			break;
- 
-    case 577 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.GREATER_EQUAL);  
-			break;
- 
-    case 579 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); }  //$NON-NLS-1$
-		    consumeInstanceOfExpression();  
-			break;
- 
-    case 581 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); }  //$NON-NLS-1$
-		    consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);  
-			break;
- 
-    case 582 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); }  //$NON-NLS-1$
-		    consumeEqualityExpression(OperatorIds.NOT_EQUAL);  
-			break;
- 
-    case 584 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.AND);  
-			break;
- 
-    case 586 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.XOR);  
-			break;
- 
-    case 588 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.OR);  
-			break;
- 
-    case 590 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.AND_AND);  
-			break;
- 
-    case 592 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.OR_OR);  
-			break;
- 
-    case 594 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
-		    consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;  
-			break;
- 
-    case 597 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); }  //$NON-NLS-1$
-		    consumeAssignment();  
-			break;
- 
-    case 599 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); }  //$NON-NLS-1$
-		    ignoreExpressionAssignment(); 
-			break;
- 
-    case 600 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(EQUAL);  
-			break;
- 
-    case 601 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(MULTIPLY);  
-			break;
- 
-    case 602 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(DIVIDE);  
-			break;
- 
-    case 603 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(REMAINDER);  
-			break;
- 
-    case 604 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(PLUS);  
-			break;
- 
-    case 605 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(MINUS);  
-			break;
- 
-    case 606 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(LEFT_SHIFT);  
-			break;
- 
-    case 607 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(RIGHT_SHIFT);  
-			break;
- 
-    case 608 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);  
-			break;
- 
-    case 609 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(AND);  
-			break;
- 
-    case 610 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(XOR);  
-			break;
- 
-    case 611 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); }  //$NON-NLS-1$
-		    consumeAssignmentOperator(OR);  
-			break;
- 
-    case 615 : if (DEBUG) { System.out.println("Expressionopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyExpression();  
-			break;
- 
-    case 620 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyClassBodyDeclarationsopt();  
-			break;
- 
-    case 621 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
-		    consumeClassBodyDeclarationsopt();  
-			break;
- 
-     case 622 : if (DEBUG) { System.out.println("Modifiersopt ::="); }  //$NON-NLS-1$
-		    consumeDefaultModifiers();  
-			break;
- 
-    case 623 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); }  //$NON-NLS-1$
-		    consumeModifiers();  
-			break;
- 
-    case 624 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyBlockStatementsopt();  
-			break;
- 
-     case 626 : if (DEBUG) { System.out.println("Dimsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyDimsopt();  
-			break;
- 
-     case 628 : if (DEBUG) { System.out.println("ArgumentListopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyArgumentListopt();  
-			break;
- 
-    case 632 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); }  //$NON-NLS-1$
-		    consumeFormalParameterListopt();  
-			break;
- 
-     case 636 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyInterfaceMemberDeclarationsopt();  
-			break;
- 
-     case 637 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
-		    consumeInterfaceMemberDeclarationsopt();  
-			break;
- 
-    case 638 : if (DEBUG) { System.out.println("NestedType ::="); }  //$NON-NLS-1$
-		    consumeNestedType();  
-			break;
-
-     case 639 : if (DEBUG) { System.out.println("ForInitopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyForInitopt();  
-			break;
- 
-     case 641 : if (DEBUG) { System.out.println("ForUpdateopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyForUpdateopt();  
-			break;
- 
-     case 645 : if (DEBUG) { System.out.println("Catchesopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyCatchesopt();  
-			break;
- 
-     case 647 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); }  //$NON-NLS-1$
-		    consumeEnumDeclaration();  
-			break;
- 
-     case 648 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); }  //$NON-NLS-1$
-		    consumeEnumHeader();  
-			break;
- 
-     case 649 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); }  //$NON-NLS-1$
-		    consumeEnumHeaderName();  
-			break;
- 
-     case 650 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); }  //$NON-NLS-1$
-		    consumeEnumHeaderNameWithTypeParameters();  
-			break;
- 
-     case 651 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); }  //$NON-NLS-1$
-		    consumeEnumBodyNoConstants();  
-			break;
- 
-     case 652 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); }  //$NON-NLS-1$
-		    consumeEnumBodyNoConstants();  
-			break;
- 
-     case 653 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); }  //$NON-NLS-1$
-		    consumeEnumBodyWithConstants();  
-			break;
- 
-     case 654 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); }  //$NON-NLS-1$
-		    consumeEnumBodyWithConstants();  
-			break;
- 
-    case 656 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); }  //$NON-NLS-1$
-		    consumeEnumConstants();  
-			break;
- 
-    case 657 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
-		    consumeEnumConstantHeaderName();  
-			break;
- 
-    case 658 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); }  //$NON-NLS-1$
-		    consumeEnumConstantHeader();  
-			break;
- 
-    case 659 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); }  //$NON-NLS-1$
-		    consumeEnumConstantWithClassBody();  
-			break;
- 
-    case 660 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); }  //$NON-NLS-1$
-		    consumeEnumConstantNoClassBody();  
-			break;
- 
-    case 661 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
-		    consumeArguments();  
-			break;
- 
-    case 662 : if (DEBUG) { System.out.println("Argumentsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyArguments();  
-			break;
- 
-    case 664 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); }  //$NON-NLS-1$
-		    consumeEnumDeclarations();  
-			break;
- 
-    case 665 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyEnumDeclarations();  
-			break;
- 
-    case 667 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); }  //$NON-NLS-1$
-		    consumeEnhancedForStatement();  
-			break;
- 
-    case 668 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); }  //$NON-NLS-1$
-		    consumeEnhancedForStatement();  
-			break;
- 
-    case 669 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); }  //$NON-NLS-1$
-		    consumeEnhancedForStatementHeaderInit(false);  
-			break;
- 
-    case 670 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); }  //$NON-NLS-1$
-		    consumeEnhancedForStatementHeaderInit(true);  
-			break;
- 
-    case 671 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); }  //$NON-NLS-1$
-		    consumeEnhancedForStatementHeader();  
-			break;
- 
-    case 672 : if (DEBUG) { System.out.println("SingleBaseImportDeclaration ::=..."); }  //$NON-NLS-1$
-		    consumeImportDeclaration();  
-			break;
- 
-    case 673 : if (DEBUG) { System.out.println("SingleBaseImportDeclarationName ::= import base Name"); }  //$NON-NLS-1$
-		    consumeSingleBaseImportDeclarationName();  
-			break;
- 
-    case 674 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); }  //$NON-NLS-1$
-		    consumeImportDeclaration();  
-			break;
- 
-    case 675 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); }  //$NON-NLS-1$
-		    consumeSingleStaticImportDeclarationName();  
-			break;
- 
-    case 676 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
-		    consumeImportDeclaration();  
-			break;
- 
-    case 677 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); }  //$NON-NLS-1$
-		    consumeStaticImportOnDemandDeclarationName();  
-			break;
- 
-    case 678 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
-		    consumeTypeArguments();  
-			break;
- 
-    case 679 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
-		    consumeOnlyTypeArguments();  
-			break;
- 
-    case 681 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
-		    consumeTypeArgumentList1();  
-			break;
- 
-    case 683 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); }  //$NON-NLS-1$
-		    consumeTypeArgumentList();  
-			break;
- 
-    case 684 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); }  //$NON-NLS-1$
-		    consumeTypeArgument();  
-			break;
- 
-    case 689 : if (DEBUG) { System.out.println("TypeAnchor ::= AT Name"); }  //$NON-NLS-1$
-		    consumeTypeAnchor(false);  
-			break;
- 
-    case 690 : if (DEBUG) { System.out.println("TypeAnchor ::= AT base"); }  //$NON-NLS-1$
-		    consumeTypeAnchor(true);  
-			break;
- 
-    case 691 : if (DEBUG) { System.out.println("TypeAnchor ::= AT this"); }  //$NON-NLS-1$
-		    skipThisAnchor();  
-			break;
- 
-    case 692 : if (DEBUG) { System.out.println("TypeAnchor ::= AT Name DOT base"); }  //$NON-NLS-1$
-		    consumeQualifiedBaseTypeAnchor();  
-			break;
- 
-    case 695 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); }  //$NON-NLS-1$
-		    consumeReferenceType1();  
-			break;
- 
-    case 696 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
-		    consumeTypeArgumentReferenceType1();  
-			break;
- 
-    case 698 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
-		    consumeTypeArgumentList2();  
-			break;
- 
-    case 701 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); }  //$NON-NLS-1$
-		    consumeReferenceType2();  
-			break;
- 
-    case 702 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
-		    consumeTypeArgumentReferenceType2();  
-			break;
- 
-    case 704 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
-		    consumeTypeArgumentList3();  
-			break;
- 
-    case 707 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
-		    consumeReferenceType3();  
-			break;
- 
-    case 708 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION"); }  //$NON-NLS-1$
-		    consumeWildcard();  
-			break;
- 
-    case 709 : if (DEBUG) { System.out.println("Wildcard ::= QUESTION WildcardBounds"); }  //$NON-NLS-1$
-		    consumeWildcardWithBounds();  
-			break;
- 
-    case 710 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); }  //$NON-NLS-1$
-		    consumeWildcardBoundsExtends();  
-			break;
- 
-    case 711 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); }  //$NON-NLS-1$
-		    consumeWildcardBoundsSuper();  
-			break;
- 
-    case 712 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION GREATER"); }  //$NON-NLS-1$
-		    consumeWildcard1();  
-			break;
- 
-    case 713 : if (DEBUG) { System.out.println("Wildcard1 ::= QUESTION WildcardBounds1"); }  //$NON-NLS-1$
-		    consumeWildcard1WithBounds();  
-			break;
- 
-    case 714 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); }  //$NON-NLS-1$
-		    consumeWildcardBounds1Extends();  
-			break;
- 
-    case 715 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); }  //$NON-NLS-1$
-		    consumeWildcardBounds1Super();  
-			break;
- 
-    case 716 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION RIGHT_SHIFT"); }  //$NON-NLS-1$
-		    consumeWildcard2();  
-			break;
- 
-    case 717 : if (DEBUG) { System.out.println("Wildcard2 ::= QUESTION WildcardBounds2"); }  //$NON-NLS-1$
-		    consumeWildcard2WithBounds();  
-			break;
- 
-    case 718 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); }  //$NON-NLS-1$
-		    consumeWildcardBounds2Extends();  
-			break;
- 
-    case 719 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); }  //$NON-NLS-1$
-		    consumeWildcardBounds2Super();  
-			break;
- 
-    case 720 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
-		    consumeWildcard3();  
-			break;
- 
-    case 721 : if (DEBUG) { System.out.println("Wildcard3 ::= QUESTION WildcardBounds3"); }  //$NON-NLS-1$
-		    consumeWildcard3WithBounds();  
-			break;
- 
-    case 722 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); }  //$NON-NLS-1$
-		    consumeWildcardBounds3Extends();  
-			break;
- 
-    case 723 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); }  //$NON-NLS-1$
-		    consumeWildcardBounds3Super();  
-			break;
- 
-    case 724 : if (DEBUG) { System.out.println("TypeParameterHeader ::= Identifier"); }  //$NON-NLS-1$
-		    consumeTypeParameterHeader();  
-			break;
- 
-    case 725 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); }  //$NON-NLS-1$
-		    consumeTypeParameters();  
-			break;
- 
-    case 727 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
-		    consumeTypeParameterList();  
-			break;
- 
-    case 729 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
-		    consumeTypeParameterWithExtends();  
-			break;
- 
-    case 730 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
-		    consumeTypeParameterWithExtendsAndBounds();  
-			break;
- 
-    case 731 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader base ReferenceType"); }  //$NON-NLS-1$
-		    consumeTypeParameterWithBase();  
-			break;
- 
-    case 735 : if (DEBUG) { System.out.println("TypeValueParameter ::= TypeParameterHeader Identifier"); }  //$NON-NLS-1$
-		    consumeTypeValueParameter();  
-			break;
- 
-    case 740 : if (DEBUG) { System.out.println("TypeBoundOpt ::= extends ReferenceType"); }  //$NON-NLS-1$
-		    consumeBoundsOfAnchoredTypeParameter();  
-			break;
- 
-    case 742 : if (DEBUG) { System.out.println("TypeBoundOpt1 ::= extends ReferenceType1"); }  //$NON-NLS-1$
-		    consumeBoundsOfAnchoredTypeParameter();  
-			break;
- 
-    case 743 : if (DEBUG) { System.out.println("AnchoredTypeParameterHeader0 ::= TypeParameterHeader..."); }  //$NON-NLS-1$
-		    consumeAnchoredTypeParameter();  
-			break;
- 
-    case 745 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); }  //$NON-NLS-1$
-		    consumeAdditionalBoundList();  
-			break;
- 
-    case 746 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); }  //$NON-NLS-1$
-		    consumeAdditionalBound();  
-			break;
- 
-    case 748 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
-		    consumeTypeParameterList1();  
-			break;
- 
-    case 749 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); }  //$NON-NLS-1$
-		    consumeTypeParameter1();  
-			break;
- 
-    case 750 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
-		    consumeTypeParameter1WithExtends();  
-			break;
- 
-    case 751 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader base..."); }  //$NON-NLS-1$
-		    consumeTypeParameter1WithBase();  
-			break;
- 
-    case 752 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
-		    consumeTypeParameter1WithExtendsAndBounds();  
-			break;
- 
-    case 754 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); }  //$NON-NLS-1$
-		    consumeAdditionalBoundList1();  
-			break;
- 
-    case 755 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); }  //$NON-NLS-1$
-		    consumeAdditionalBound1();  
-			break;
- 
-    case 761 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.PLUS);  
-			break;
- 
-    case 762 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.MINUS);  
-			break;
- 
-    case 765 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.TWIDDLE);  
-			break;
- 
-    case 766 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); }  //$NON-NLS-1$
-		    consumeUnaryExpression(OperatorIds.NOT);  
-			break;
- 
-    case 769 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.MULTIPLY);  
-			break;
- 
-    case 770 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.MULTIPLY);  
-			break;
- 
-    case 771 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.DIVIDE);  
-			break;
- 
-    case 772 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.DIVIDE);  
-			break;
- 
-    case 773 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.REMAINDER);  
-			break;
- 
-    case 774 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.REMAINDER);  
-			break;
- 
-    case 776 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.PLUS);  
-			break;
- 
-    case 777 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.PLUS);  
-			break;
- 
-    case 778 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.MINUS);  
-			break;
- 
-    case 779 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.MINUS);  
-			break;
- 
-    case 781 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.LEFT_SHIFT);  
-			break;
- 
-    case 782 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT);  
-			break;
- 
-    case 783 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);  
-			break;
- 
-    case 784 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT);  
-			break;
- 
-    case 785 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);  
-			break;
- 
-    case 786 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT);  
-			break;
- 
-    case 788 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.LESS);  
-			break;
- 
-    case 789 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.LESS);  
-			break;
- 
-    case 790 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.GREATER);  
-			break;
- 
-    case 791 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.GREATER);  
-			break;
- 
-    case 792 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.LESS_EQUAL);  
-			break;
- 
-    case 793 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL);  
-			break;
- 
-    case 794 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.GREATER_EQUAL);  
-			break;
- 
-    case 795 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL);  
-			break;
- 
-    case 797 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); }  //$NON-NLS-1$
-		    consumeInstanceOfExpressionWithName();  
-			break;
- 
-    case 798 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeInstanceOfExpression();  
-			break;
- 
-    case 800 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);  
-			break;
- 
-    case 801 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); }  //$NON-NLS-1$
-		    consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL);  
-			break;
- 
-    case 802 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeEqualityExpression(OperatorIds.NOT_EQUAL);  
-			break;
- 
-    case 803 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); }  //$NON-NLS-1$
-		    consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL);  
-			break;
- 
-    case 805 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.AND);  
-			break;
- 
-    case 806 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.AND);  
-			break;
- 
-    case 808 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.XOR);  
-			break;
- 
-    case 809 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.XOR);  
-			break;
- 
-    case 811 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.OR);  
-			break;
- 
-    case 812 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.OR);  
-			break;
- 
-    case 814 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.AND_AND);  
-			break;
- 
-    case 815 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.AND_AND);  
-			break;
- 
-    case 817 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeBinaryExpression(OperatorIds.OR_OR);  
-			break;
- 
-    case 818 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); }  //$NON-NLS-1$
-		    consumeBinaryExpressionWithName(OperatorIds.OR_OR);  
-			break;
- 
-    case 820 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); }  //$NON-NLS-1$
-		    consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;  
-			break;
- 
-    case 821 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); }  //$NON-NLS-1$
-		    consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ;  
-			break;
- 
-    case 825 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeDeclarationHeaderName() ;  
-			break;
- 
-    case 826 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;  
-			break;
- 
-    case 827 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;  
-			break;
- 
-    case 828 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeDeclarationHeaderName() ;  
-			break;
- 
-    case 829 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeDeclarationHeader() ;  
-			break;
- 
-    case 830 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeDeclaration() ;  
-			break;
- 
-    case 832 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyAnnotationTypeMemberDeclarationsopt() ;  
-			break;
- 
-    case 833 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeMemberDeclarationsopt() ;  
-			break;
- 
-    case 835 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeMemberDeclarations() ;  
-			break;
- 
-    case 836 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); }  //$NON-NLS-1$
-		    consumeMethodHeaderNameWithTypeParameters(true);  
-			break;
- 
-    case 837 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
-		    consumeMethodHeaderName(true);  
-			break;
- 
-    case 838 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyMethodHeaderDefaultValue() ;  
-			break;
- 
-    case 839 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); }  //$NON-NLS-1$
-		    consumeMethodHeaderDefaultValue();  
-			break;
- 
-    case 840 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); }  //$NON-NLS-1$
-		    consumeMethodHeader();  
-			break;
- 
-    case 841 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); }  //$NON-NLS-1$
-		    consumeAnnotationTypeMemberDeclaration() ;  
-			break;
- 
-    case 849 : if (DEBUG) { System.out.println("AnnotationName ::= AT Name"); }  //$NON-NLS-1$
+    case 91 : if (DEBUG) { System.out.println("TypeAnnotationName ::= AT308 UnannotatableName"); }  //$NON-NLS-1$
 		    consumeAnnotationName() ;  
 			break;
  
-    case 850 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
-		    consumeNormalAnnotation() ;  
+    case 92 : if (DEBUG) { System.out.println("NormalTypeAnnotation ::= TypeAnnotationName LPAREN..."); }  //$NON-NLS-1$
+		    consumeNormalAnnotation(true) ;  
 			break;
  
-    case 851 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); }  //$NON-NLS-1$
-		    consumeEmptyMemberValuePairsopt() ;  
+    case 93 : if (DEBUG) { System.out.println("MarkerTypeAnnotation ::= TypeAnnotationName"); }  //$NON-NLS-1$
+		    consumeMarkerAnnotation(true) ;  
 			break;
  
-    case 854 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); }  //$NON-NLS-1$
-		    consumeMemberValuePairs() ;  
+    case 94 : if (DEBUG) { System.out.println("SingleMemberTypeAnnotation ::= TypeAnnotationName LPAREN"); }  //$NON-NLS-1$
+		    consumeSingleMemberAnnotation(true) ;  
 			break;
  
-    case 855 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); }  //$NON-NLS-1$
-		    consumeMemberValuePair() ;  
+    case 95 : if (DEBUG) { System.out.println("RejectTypeAnnotations ::="); }  //$NON-NLS-1$
+		    consumeNonTypeUseName();  
 			break;
  
-    case 856 : if (DEBUG) { System.out.println("EnterMemberValue ::="); }  //$NON-NLS-1$
-		    consumeEnterMemberValue() ;  
+    case 96 : if (DEBUG) { System.out.println("PushZeroTypeAnnotations ::="); }  //$NON-NLS-1$
+		    consumeZeroTypeAnnotations();  
 			break;
  
-    case 857 : if (DEBUG) { System.out.println("ExitMemberValue ::="); }  //$NON-NLS-1$
-		    consumeExitMemberValue() ;  
+    case 97 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= this"); }  //$NON-NLS-1$
+		    consumeExplicitThisParameter(false);  
 			break;
  
-    case 859 : if (DEBUG) { System.out.println("MemberValue ::= Name"); }  //$NON-NLS-1$
-		    consumeMemberValueAsName() ;  
+    case 98 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= UnannotatableName DOT this"); }  //$NON-NLS-1$
+		    consumeExplicitThisParameter(true);  
 			break;
  
-    case 862 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
-		    consumeMemberValueArrayInitializer() ;  
+    case 99 : if (DEBUG) { System.out.println("VariableDeclaratorIdOrThis ::= VariableDeclaratorId"); }  //$NON-NLS-1$
+		    consumeVariableDeclaratorIdParameter();  
 			break;
  
-    case 863 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
-		    consumeMemberValueArrayInitializer() ;  
+    case 100 : if (DEBUG) { System.out.println("CompilationUnit ::= EnterCompilationUnit..."); }  //$NON-NLS-1$
+		    consumeCompilationUnit();  
 			break;
  
-    case 864 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
-		    consumeEmptyMemberValueArrayInitializer() ;  
+    case 101 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration"); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnit();  
 			break;
  
-    case 865 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
-		    consumeEmptyMemberValueArrayInitializer() ;  
+    case 102 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnit();  
 			break;
  
-    case 866 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); }  //$NON-NLS-1$
-		    consumeEnterMemberValueArrayInitializer() ;  
+    case 103 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnitWithTypes();  
 			break;
  
-    case 868 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); }  //$NON-NLS-1$
-		    consumeMemberValues() ;  
+    case 104 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= PackageDeclaration..."); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnitWithTypes();  
 			break;
  
-    case 869 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); }  //$NON-NLS-1$
-		    consumeMarkerAnnotation() ;  
+    case 105 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnit();  
 			break;
  
-    case 870 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); }  //$NON-NLS-1$
-		    consumeSingleMemberAnnotationMemberValue() ;  
+    case 106 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= TypeDeclarations"); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnitWithTypes();  
 			break;
  
-    case 871 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
-		    consumeSingleMemberAnnotation() ;  
+    case 107 : if (DEBUG) { System.out.println("InternalCompilationUnit ::= ImportDeclarations..."); }  //$NON-NLS-1$
+		    consumeInternalCompilationUnitWithTypes();  
 			break;
  
-    case 872 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); }  //$NON-NLS-1$
-		    consumeRecoveryMethodHeaderNameWithTypeParameters();  
+    case 108 : if (DEBUG) { System.out.println("InternalCompilationUnit ::="); }  //$NON-NLS-1$
+		    consumeEmptyInternalCompilationUnit();  
 			break;
  
-    case 873 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
-		    consumeRecoveryMethodHeaderName();  
+    case 109 : if (DEBUG) { System.out.println("ReduceImports ::="); }  //$NON-NLS-1$
+		    consumeReduceImports();  
 			break;
  
-    case 874 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
+    case 110 : if (DEBUG) { System.out.println("EnterCompilationUnit ::="); }  //$NON-NLS-1$
+		    consumeEnterCompilationUnit();  
+			break;
+ 
+    case 128 : if (DEBUG) { System.out.println("CatchHeader ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
+		    consumeCatchHeader();  
+			break;
+ 
+    case 130 : if (DEBUG) { System.out.println("ImportDeclarations ::= ImportDeclarations..."); }  //$NON-NLS-1$
+		    consumeImportDeclarations();  
+			break;
+ 
+    case 132 : if (DEBUG) { System.out.println("TypeDeclarations ::= TypeDeclarations TypeDeclaration"); }  //$NON-NLS-1$
+		    consumeTypeDeclarations();  
+			break;
+ 
+    case 133 : if (DEBUG) { System.out.println("PackageDeclaration ::= PackageDeclarationName SEMICOLON"); }  //$NON-NLS-1$
+		    consumePackageDeclaration();  
+			break;
+ 
+    case 134 : if (DEBUG) { System.out.println("PackageDeclarationName ::= Modifiers package..."); }  //$NON-NLS-1$
+		    consumePackageDeclarationNameWithModifiers();  
+			break;
+ 
+    case 135 : if (DEBUG) { System.out.println("PackageDeclarationName ::= PackageComment package Name"); }  //$NON-NLS-1$
+		    consumePackageDeclarationName();  
+			break;
+ 
+    case 136 : if (DEBUG) { System.out.println("PackageComment ::="); }  //$NON-NLS-1$
+		    consumePackageComment();  
+			break;
+ 
+    case 142 : if (DEBUG) { System.out.println("SingleTypeImportDeclaration ::=..."); }  //$NON-NLS-1$
+		    consumeImportDeclaration();  
+			break;
+ 
+    case 143 : if (DEBUG) { System.out.println("SingleTypeImportDeclarationName ::= import ImportName..."); }  //$NON-NLS-1$
+		    consumeSingleTypeImportDeclarationName();  
+			break;
+ 
+    case 145 : if (DEBUG) { System.out.println("ImportName ::= Name DOT team DOT Name"); }  //$NON-NLS-1$
+		    consumeNameContainingTeam();  
+			break;
+ 
+    case 146 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
+		    consumeImportDeclaration();  
+			break;
+ 
+    case 147 : if (DEBUG) { System.out.println("TypeImportOnDemandDeclarationName ::= import Name DOT..."); }  //$NON-NLS-1$
+		    consumeTypeImportOnDemandDeclarationName();  
+			break;
+ 
+     case 150 : if (DEBUG) { System.out.println("TypeDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeEmptyTypeDeclaration();  
+			break;
+ 
+    case 154 : if (DEBUG) { System.out.println("Modifiers ::= Modifiers Modifier"); }  //$NON-NLS-1$
+		    consumeModifiers2();  
+			break;
+ 
+    case 166 : if (DEBUG) { System.out.println("Modifier ::= Annotation"); }  //$NON-NLS-1$
+		    consumeAnnotationAsModifier();  
+			break;
+ 
+    case 170 : if (DEBUG) { System.out.println("ClassDeclaration ::= ClassHeader ClassBody"); }  //$NON-NLS-1$
+		    consumeClassDeclaration();  
+			break;
+ 
+    case 171 : if (DEBUG) { System.out.println("ClassHeader ::= ClassHeaderName ClassHeaderExtendsopt..."); }  //$NON-NLS-1$
+		    consumeClassHeader();  
+			break;
+ 
+    case 172 : if (DEBUG) { System.out.println("ClassHeaderName ::= ClassHeaderName1 TypeParameters"); }  //$NON-NLS-1$
+		    consumeTypeHeaderNameWithTypeParameters();  
+			break;
+ 
+    case 174 : if (DEBUG) { System.out.println("ClassHeaderName1 ::= Modifiersopt class Identifier"); }  //$NON-NLS-1$
+		    consumeClassHeaderName1();  
+			break;
+ 
+    case 175 : if (DEBUG) { System.out.println("ClassHeaderExtends ::= extends ClassType"); }  //$NON-NLS-1$
+		    consumeClassHeaderExtends();  
+			break;
+ 
+    case 176 : if (DEBUG) { System.out.println("ClassHeaderImplements ::= implements InterfaceTypeList"); }  //$NON-NLS-1$
+		    consumeClassHeaderImplements();  
+			break;
+ 
+    case 179 : if (DEBUG) { System.out.println("ClassHeaderPlayedBy ::= playedBy ClassType"); }  //$NON-NLS-1$
+		    consumeClassHeaderPlayedBy();  
+			break;
+ 
+    case 185 : if (DEBUG) { System.out.println("PredicateHeader ::= when"); }  //$NON-NLS-1$
+		    consumePredicate(false);  
+			break;
+ 
+    case 187 : if (DEBUG) { System.out.println("BasePredicateHeader ::= base when"); }  //$NON-NLS-1$
+		    consumePredicate(true);  
+			break;
+ 
+    case 188 : if (DEBUG) { System.out.println("PredicateBody ::= LPAREN ForceNoDiet Expression..."); }  //$NON-NLS-1$
+		    consumePredicateExpression();  
+			break;
+ 
+    case 189 : if (DEBUG) { System.out.println("PredicateBody ::= LPAREN RPAREN"); }  //$NON-NLS-1$
+		    consumePredicateMissingExpression();  
+			break;
+ 
+    case 190 : if (DEBUG) { System.out.println("ForceBaseIsIdentifier ::="); }  //$NON-NLS-1$
+		    consumeForceBaseIsIdentifier();  
+			break;
+ 
+    case 191 : if (DEBUG) { System.out.println("RestoreBaseKeyword ::="); }  //$NON-NLS-1$
+		    consumeRestoreBaseKeyword();  
+			break;
+ 
+    case 193 : if (DEBUG) { System.out.println("InterfaceTypeList ::= InterfaceTypeList COMMA..."); }  //$NON-NLS-1$
+		    consumeInterfaceTypeList();  
+			break;
+ 
+    case 194 : if (DEBUG) { System.out.println("InterfaceType ::= ClassOrInterfaceType"); }  //$NON-NLS-1$
+		    consumeInterfaceType();  
+			break;
+ 
+    case 197 : if (DEBUG) { System.out.println("ClassBodyDeclarations ::= ClassBodyDeclarations..."); }  //$NON-NLS-1$
+		    consumeClassBodyDeclarations();  
+			break;
+ 
+    case 201 : if (DEBUG) { System.out.println("ClassBodyDeclaration ::= Diet NestedMethod..."); }  //$NON-NLS-1$
+		    consumeClassBodyDeclaration();  
+			break;
+ 
+    case 202 : if (DEBUG) { System.out.println("Diet ::="); }  //$NON-NLS-1$
+		    consumeDiet();  
+			break;
+
+    case 203 : if (DEBUG) { System.out.println("Initializer ::= Diet NestedMethod CreateInitializer..."); }  //$NON-NLS-1$
+		    consumeClassBodyDeclaration();  
+			break;
+ 
+    case 204 : if (DEBUG) { System.out.println("CreateInitializer ::="); }  //$NON-NLS-1$
+		    consumeCreateInitializer();  
+			break;
+
+    case 213 : if (DEBUG) { System.out.println("ClassMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeEmptyTypeDeclaration();  
+			break;
+
+    case 216 : if (DEBUG) { System.out.println("FieldDeclaration ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+		    consumeFieldDeclaration();  
+			break;
+ 
+    case 218 : if (DEBUG) { System.out.println("VariableDeclarators ::= VariableDeclarators COMMA..."); }  //$NON-NLS-1$
+		    consumeVariableDeclarators();  
+			break;
+ 
+    case 221 : if (DEBUG) { System.out.println("EnterVariable ::="); }  //$NON-NLS-1$
+		    consumeEnterVariable();  
+			break;
+ 
+    case 222 : if (DEBUG) { System.out.println("ExitVariableWithInitialization ::="); }  //$NON-NLS-1$
+		    consumeExitVariableWithInitialization();  
+			break;
+ 
+    case 223 : if (DEBUG) { System.out.println("ExitVariableWithoutInitialization ::="); }  //$NON-NLS-1$
+		    consumeExitVariableWithoutInitialization();  
+			break;
+ 
+    case 224 : if (DEBUG) { System.out.println("ForceNoDiet ::="); }  //$NON-NLS-1$
+		    consumeForceNoDiet();  
+			break;
+ 
+    case 225 : if (DEBUG) { System.out.println("RestoreDiet ::="); }  //$NON-NLS-1$
+		    consumeRestoreDiet();  
+			break;
+ 
+    case 230 : if (DEBUG) { System.out.println("MethodDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
+		    // set to true to consume a method with a body
+ consumeMethodDeclaration(true, false);  
+			break;
+ 
+    case 231 : if (DEBUG) { System.out.println("MethodDeclaration ::= DefaultMethodHeader MethodBody"); }  //$NON-NLS-1$
+		    // set to true to consume a method with a body
+ consumeMethodDeclaration(true, true);  
+			break;
+ 
+    case 232 : if (DEBUG) { System.out.println("AbstractMethodDeclaration ::= MethodHeader SEMICOLON"); }  //$NON-NLS-1$
+		    // set to false to consume a method without body
+ consumeMethodDeclaration(false, false);  
+			break;
+ 
+    case 233 : if (DEBUG) { System.out.println("MethodHeader ::= MethodHeaderName FormalParameterListopt"); }  //$NON-NLS-1$
 		    consumeMethodHeader();  
 			break;
  
-    case 875 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
+    case 234 : if (DEBUG) { System.out.println("DefaultMethodHeader ::= DefaultMethodHeaderName..."); }  //$NON-NLS-1$
 		    consumeMethodHeader();  
 			break;
  
-    case 878 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= RecoveryCallinBindingLeftLong"); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
+    case 235 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt TypeParameters Type..."); }  //$NON-NLS-1$
+		    consumeMethodHeaderNameWithTypeParameters(false);  
 			break;
  
-    case 879 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
+    case 236 : if (DEBUG) { System.out.println("MethodHeaderName ::= Modifiersopt Type Identifier LPAREN"); }  //$NON-NLS-1$
+		    consumeMethodHeaderName(false);  
 			break;
  
-    case 880 : if (DEBUG) { System.out.println("RecoveryCallinBindingLeftLong ::= RecoveryMethodSpecLong"); }  //$NON-NLS-1$
-		    consumeCallinBindingLeft(true);  
+    case 237 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault..."); }  //$NON-NLS-1$
+		    consumeMethodHeaderNameWithTypeParameters(false);  
 			break;
  
-    case 881 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt..."); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
+    case 238 : if (DEBUG) { System.out.println("DefaultMethodHeaderName ::= ModifiersWithDefault Type..."); }  //$NON-NLS-1$
+		    consumeMethodHeaderName(false);  
 			break;
  
-    case 882 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
-		    consumeCallinHeader();  
+    case 239 : if (DEBUG) { System.out.println("ModifiersWithDefault ::= Modifiersopt default..."); }  //$NON-NLS-1$
+		    consumePushCombineModifiers();  
 			break;
  
-    case 883 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::= RecoveryCalloutBindingLeftLong"); }  //$NON-NLS-1$
+    case 240 : if (DEBUG) { System.out.println("MethodHeaderRightParen ::= RPAREN"); }  //$NON-NLS-1$
+		    consumeMethodHeaderRightParen();  
+			break;
+ 
+    case 241 : if (DEBUG) { System.out.println("MethodHeaderExtendedDims ::= Dimsopt"); }  //$NON-NLS-1$
+		    consumeMethodHeaderExtendedDims();  
+			break;
+ 
+    case 242 : if (DEBUG) { System.out.println("MethodHeaderThrowsClause ::= throws ClassTypeList"); }  //$NON-NLS-1$
+		    consumeMethodHeaderThrowsClause();  
+			break;
+ 
+    case 243 : if (DEBUG) { System.out.println("ConstructorHeader ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
+		    consumeConstructorHeader();  
+			break;
+ 
+    case 244 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt TypeParameters..."); }  //$NON-NLS-1$
+		    consumeConstructorHeaderNameWithTypeParameters();  
+			break;
+ 
+    case 245 : if (DEBUG) { System.out.println("ConstructorHeaderName ::= Modifiersopt Identifier LPAREN"); }  //$NON-NLS-1$
+		    consumeConstructorHeaderName();  
+			break;
+ 
+    case 247 : if (DEBUG) { System.out.println("FormalParameterList ::= FormalParameterList COMMA..."); }  //$NON-NLS-1$
+		    consumeFormalParameterList();  
+			break;
+ 
+    case 248 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type LiftingTypeopt..."); }  //$NON-NLS-1$
+		    consumeFormalParameter(false);  
+			break;
+ 
+    case 249 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type LiftingTypeopt..."); }  //$NON-NLS-1$
+		    consumeFormalParameter(true);  
+			break;
+ 
+    case 250 : if (DEBUG) { System.out.println("FormalParameter ::= Modifiersopt Type LiftingTypeopt..."); }  //$NON-NLS-1$
+		    consumeFormalParameter(true);  
+			break;
+ 
+    case 251 : if (DEBUG) { System.out.println("CatchFormalParameter ::= Modifiersopt CatchType..."); }  //$NON-NLS-1$
+		    consumeCatchFormalParameter();  
+			break;
+ 
+    case 252 : if (DEBUG) { System.out.println("CatchType ::= UnionType"); }  //$NON-NLS-1$
+		    consumeCatchType();  
+			break;
+ 
+    case 253 : if (DEBUG) { System.out.println("UnionType ::= Type"); }  //$NON-NLS-1$
+		    consumeUnionTypeAsClassType();  
+			break;
+ 
+    case 254 : if (DEBUG) { System.out.println("UnionType ::= UnionType OR Type"); }  //$NON-NLS-1$
+		    consumeUnionType();  
+			break;
+ 
+    case 256 : if (DEBUG) { System.out.println("ClassTypeList ::= ClassTypeList COMMA ClassTypeElt"); }  //$NON-NLS-1$
+		    consumeClassTypeList();  
+			break;
+ 
+    case 257 : if (DEBUG) { System.out.println("ClassTypeElt ::= ClassType"); }  //$NON-NLS-1$
+		    consumeClassTypeElt();  
+			break;
+ 
+    case 258 : if (DEBUG) { System.out.println("MethodBody ::= Predicateopt NestedMethod LBRACE..."); }  //$NON-NLS-1$
+		    consumeMethodBody();  
+			break;
+ 
+    case 259 : if (DEBUG) { System.out.println("NestedMethod ::="); }  //$NON-NLS-1$
+		    consumeNestedMethod();  
+			break;
+ 
+    case 263 : if (DEBUG) { System.out.println("CalloutBinding ::= CalloutHeaderLong..."); }  //$NON-NLS-1$
+		    consumeCalloutBindingLong();  
+			break;
+ 
+    case 264 : if (DEBUG) { System.out.println("CalloutHeaderLong ::= CalloutBindingLeftLong..."); }  //$NON-NLS-1$
 		    consumeCalloutHeader();  
 			break;
  
-    case 884 : if (DEBUG) { System.out.println("RecoveryCalloutBindingLeftLong ::=..."); }  //$NON-NLS-1$
+    case 265 : if (DEBUG) { System.out.println("CalloutHeaderLong ::= CalloutBindingLeftLong..."); }  //$NON-NLS-1$
+		    consumeCalloutHeader();  
+			break;
+ 
+    case 266 : if (DEBUG) { System.out.println("CalloutBindingLeftLong ::= MethodSpecLong CalloutKind"); }  //$NON-NLS-1$
 		    consumeCalloutBindingLeft(true);  
 			break;
  
-    case 885 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::= RecoveryCalloutBindingLeftLong"); }  //$NON-NLS-1$
+    case 267 : if (DEBUG) { System.out.println("CalloutBinding ::= Modifiersopt CalloutBindingLeftShort"); }  //$NON-NLS-1$
 		    consumeCalloutHeader();  
 			break;
  
-    case 886 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::= Modifiersopt..."); }  //$NON-NLS-1$
+    case 268 : if (DEBUG) { System.out.println("CalloutBindingLeftShort ::= MethodSpecShort CalloutKind"); }  //$NON-NLS-1$
+		    consumeCalloutBindingLeft(false);  
+			break;
+ 
+    case 269 : if (DEBUG) { System.out.println("CalloutBinding ::= Modifiersopt CalloutBindingLeftShort"); }  //$NON-NLS-1$
+		    consumeCalloutParameterMappingsInvalid();  
+			break;
+ 
+    case 274 : if (DEBUG) { System.out.println("CalloutModifier ::= get"); }  //$NON-NLS-1$
+		    consumeCalloutModifier(TokenNameget);  
+			break;
+ 
+    case 275 : if (DEBUG) { System.out.println("CalloutModifier ::= set"); }  //$NON-NLS-1$
+		    consumeCalloutModifier(TokenNameset);  
+			break;
+ 
+    case 277 : if (DEBUG) { System.out.println("CalloutParameterMappingsopt ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeParameterMappingsEmpty();  
+			break;
+ 
+    case 278 : if (DEBUG) { System.out.println("CalloutParameterMappings ::= with NestedParamMappings..."); }  //$NON-NLS-1$
+		    consumeParameterMappings();  
+			break;
+ 
+    case 281 : if (DEBUG) { System.out.println("CalloutParameterMappingList ::=..."); }  //$NON-NLS-1$
+		    consumeParameterMappingList();  
+			break;
+ 
+    case 282 : if (DEBUG) { System.out.println("ParameterMapping ::= Expression SYNTHBINDOUT Identifier"); }  //$NON-NLS-1$
+		    consumeParameterMappingOut();  
+			break;
+ 
+    case 283 : if (DEBUG) { System.out.println("ParameterMapping ::= Identifier BINDIN..."); }  //$NON-NLS-1$
+		    consumeParameterMappingIn();  
+			break;
+ 
+    case 284 : if (DEBUG) { System.out.println("NestedParamMappings ::="); }  //$NON-NLS-1$
+		    consumeNestedParamMappings();  
+			break;
+ 
+    case 285 : if (DEBUG) { System.out.println("CallinBinding ::= CallinHeaderLong..."); }  //$NON-NLS-1$
+		    consumeCallinBindingLong();  
+			break;
+ 
+    case 286 : if (DEBUG) { System.out.println("CallinHeaderLong ::= CallinBindingLeftLong..."); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 287 : if (DEBUG) { System.out.println("CallinHeaderLong ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 288 : if (DEBUG) { System.out.println("CallinBindingLeftLong ::= MethodSpecLong BINDIN"); }  //$NON-NLS-1$
+		    consumeCallinBindingLeft(true);  
+			break;
+ 
+    case 289 : if (DEBUG) { System.out.println("CallinBinding ::= Modifiersopt CallinBindingLeftShort..."); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 290 : if (DEBUG) { System.out.println("CallinBinding ::= Modifiersopt CallinLabel Modifiersopt"); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 291 : if (DEBUG) { System.out.println("CallinBindingLeftShort ::= MethodSpecShort BINDIN"); }  //$NON-NLS-1$
+		    consumeCallinBindingLeft(false);  
+			break;
+ 
+    case 292 : if (DEBUG) { System.out.println("CallinLabel ::= SimpleName COLON"); }  //$NON-NLS-1$
+		    consumeCallinLabel();  
+			break;
+ 
+    case 293 : if (DEBUG) { System.out.println("CallinModifier ::= replace"); }  //$NON-NLS-1$
+		    consumeCallinModifier(TokenNamereplace);  
+			break;
+ 
+    case 294 : if (DEBUG) { System.out.println("CallinModifier ::= before"); }  //$NON-NLS-1$
+		    consumeCallinModifier(TokenNamebefore);  
+			break;
+ 
+    case 295 : if (DEBUG) { System.out.println("CallinModifier ::= after"); }  //$NON-NLS-1$
+		    consumeCallinModifier(TokenNameafter);  
+			break;
+ 
+    case 296 : if (DEBUG) { System.out.println("InvalidCallinModifier ::="); }  //$NON-NLS-1$
+		    consumeCallinModifierMissing();  
+			break;
+ 
+    case 297 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt..."); }  //$NON-NLS-1$
+		    consumeCallinBindingInvalid(false,false);  
+			break;
+ 
+    case 298 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
+		    consumeCallinBindingInvalid(false,false);  
+			break;
+ 
+    case 299 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt..."); }  //$NON-NLS-1$
+		    consumeCallinBindingInvalid(false,true);  
+			break;
+ 
+    case 300 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
+		    consumeCallinBindingInvalid(false,true);  
+			break;
+ 
+    case 301 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= CallinBindingLeftLong..."); }  //$NON-NLS-1$
+		    consumeCallinBindingInvalid(true,false);  
+			break;
+ 
+    case 302 : if (DEBUG) { System.out.println("InvalidCallinBinding ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
+		    consumeCallinBindingInvalid(true,false);  
+			break;
+ 
+    case 304 : if (DEBUG) { System.out.println("CallinParameterMappingsopt ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeParameterMappingsEmpty();  
+			break;
+ 
+    case 305 : if (DEBUG) { System.out.println("CallinParameterMappings ::= with NestedParamMappings..."); }  //$NON-NLS-1$
+		    consumeParameterMappings();  
+			break;
+ 
+    case 308 : if (DEBUG) { System.out.println("CallinParameterMappingList ::=..."); }  //$NON-NLS-1$
+		    consumeParameterMappingList();  
+			break;
+ 
+    case 309 : if (DEBUG) { System.out.println("MethodSpecShort ::= SimpleName"); }  //$NON-NLS-1$
+		    consumeMethodSpecShort();  
+			break;
+ 
+    case 310 : if (DEBUG) { System.out.println("MethodSpecLong ::= MethodHeaderName..."); }  //$NON-NLS-1$
+		    consumeMethodSpecLong(false);  
+			break;
+ 
+    case 311 : if (DEBUG) { System.out.println("MethodSpecLong ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
+		    consumeMethodSpecLongCtor();  
+			break;
+ 
+    case 312 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= MethodHeaderName..."); }  //$NON-NLS-1$
+		    consumeMethodSpecLong(false);  
+			break;
+ 
+    case 313 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= MethodSpecNamePlus..."); }  //$NON-NLS-1$
+		    consumeMethodSpecLong(true);  
+			break;
+ 
+    case 314 : if (DEBUG) { System.out.println("BaseMethodSpecLong ::= ConstructorHeaderName..."); }  //$NON-NLS-1$
+		    consumeMethodSpecLong(false);  
+			break;
+ 
+    case 315 : if (DEBUG) { System.out.println("MethodSpecNamePlus ::= Modifiersopt Type PLUS Identifier"); }  //$NON-NLS-1$
+		    consumeMethodHeaderName(false);  
+			break;
+ 
+    case 316 : if (DEBUG) { System.out.println("CalloutFieldSpecLong ::= CalloutModifier Type Identifier"); }  //$NON-NLS-1$
+		    consumeFieldSpecLong();  
+			break;
+ 
+    case 319 : if (DEBUG) { System.out.println("BaseMethodSpecListShort ::= BaseMethodSpecListShort..."); }  //$NON-NLS-1$
+		    consumeMethodSpecList();  
+			break;
+ 
+    case 323 : if (DEBUG) { System.out.println("MethodSpecListLong ::= MethodSpecListLong COMMA..."); }  //$NON-NLS-1$
+		    consumeMethodSpecList();  
+			break;
+ 
+    case 324 : if (DEBUG) { System.out.println("PrecedenceDeclaration ::= precedence BindingNames..."); }  //$NON-NLS-1$
+		    consumePrecedenceDeclaration(false);  
+			break;
+ 
+    case 325 : if (DEBUG) { System.out.println("PrecedenceDeclaration ::= precedence after BindingNames"); }  //$NON-NLS-1$
+		    consumePrecedenceDeclaration(true);  
+			break;
+ 
+    case 327 : if (DEBUG) { System.out.println("BindingNames ::= BindingNames COMMA BindingName"); }  //$NON-NLS-1$
+		    consumeBindingNames();  
+			break;
+ 
+    case 328 : if (DEBUG) { System.out.println("BindingName ::= Name"); }  //$NON-NLS-1$
+		    consumeBindingName();  
+			break;
+ 
+    case 329 : if (DEBUG) { System.out.println("StaticInitializer ::= StaticOnly Block"); }  //$NON-NLS-1$
+		    consumeStaticInitializer();  
+			break;
+
+    case 330 : if (DEBUG) { System.out.println("StaticOnly ::= static"); }  //$NON-NLS-1$
+		    consumeStaticOnly();  
+			break;
+ 
+    case 331 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader MethodBody"); }  //$NON-NLS-1$
+		    consumeConstructorDeclaration() ;  
+			break;
+ 
+    case 332 : if (DEBUG) { System.out.println("ConstructorDeclaration ::= ConstructorHeader SEMICOLON"); }  //$NON-NLS-1$
+		    consumeInvalidConstructorDeclaration() ;  
+			break;
+ 
+    case 333 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= this LPAREN..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(0, THIS_CALL);  
+			break;
+ 
+    case 334 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments this"); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationWithTypeArguments(0,THIS_CALL);  
+			break;
+ 
+    case 335 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= super LPAREN..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(0,SUPER_CALL);  
+			break;
+ 
+    case 336 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= OnlyTypeArguments..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationWithTypeArguments(0,SUPER_CALL);  
+			break;
+ 
+    case 337 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= tsuper LPAREN..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(0,TSUPER_CALL);  
+			break;
+ 
+    case 338 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT tsuper LPAREN"); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(2,TSUPER_CALL);  
+			break;
+ 
+    case 339 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT super..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(1, SUPER_CALL);  
+			break;
+ 
+    case 340 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationWithTypeArguments(1, SUPER_CALL);  
+			break;
+ 
+    case 341 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT super LPAREN"); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(2, SUPER_CALL);  
+			break;
+ 
+    case 342 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationWithTypeArguments(2, SUPER_CALL);  
+			break;
+ 
+    case 343 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT this..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(1, THIS_CALL);  
+			break;
+ 
+    case 344 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Primary DOT..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationWithTypeArguments(1, THIS_CALL);  
+			break;
+ 
+    case 345 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT this LPAREN"); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocation(2, THIS_CALL);  
+			break;
+ 
+    case 346 : if (DEBUG) { System.out.println("ExplicitConstructorInvocation ::= Name DOT..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationWithTypeArguments(2, THIS_CALL);  
+			break;
+ 
+    case 347 : if (DEBUG) { System.out.println("BaseConstructorExpression ::= base LPAREN..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationBase(0);  
+			break;
+ 
+    case 348 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= base LPAREN..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationBase(1);  
+			break;
+ 
+    case 349 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= Primary DOT base LPAREN..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationBase(2);  
+			break;
+ 
+    case 350 : if (DEBUG) { System.out.println("BaseConstructorInvocation ::= Name DOT base LPAREN..."); }  //$NON-NLS-1$
+		    consumeExplicitConstructorInvocationBase(3);  
+			break;
+ 
+    case 351 : if (DEBUG) { System.out.println("InterfaceDeclaration ::= InterfaceHeader InterfaceBody"); }  //$NON-NLS-1$
+		    consumeInterfaceDeclaration();  
+			break;
+ 
+    case 352 : if (DEBUG) { System.out.println("InterfaceHeader ::= InterfaceHeaderName..."); }  //$NON-NLS-1$
+		    consumeInterfaceHeader();  
+			break;
+ 
+    case 353 : if (DEBUG) { System.out.println("InterfaceHeaderName ::= InterfaceHeaderName1..."); }  //$NON-NLS-1$
+		    consumeTypeHeaderNameWithTypeParameters();  
+			break;
+ 
+    case 355 : if (DEBUG) { System.out.println("InterfaceHeaderName1 ::= Modifiersopt interface..."); }  //$NON-NLS-1$
+		    consumeInterfaceHeaderName1();  
+			break;
+ 
+    case 356 : if (DEBUG) { System.out.println("InterfaceHeaderExtends ::= extends InterfaceTypeList"); }  //$NON-NLS-1$
+		    consumeInterfaceHeaderExtends();  
+			break;
+ 
+    case 359 : if (DEBUG) { System.out.println("InterfaceMemberDeclarations ::=..."); }  //$NON-NLS-1$
+		    consumeInterfaceMemberDeclarations();  
+			break;
+ 
+    case 360 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeEmptyTypeDeclaration();  
+			break;
+ 
+    case 362 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); }  //$NON-NLS-1$
+		    consumeInterfaceMethodDeclaration(false);  
+			break;
+ 
+    case 363 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= MethodHeader MethodBody"); }  //$NON-NLS-1$
+		    consumeInterfaceMethodDeclaration(false);  
+			break;
+ 
+    case 364 : if (DEBUG) { System.out.println("InterfaceMemberDeclaration ::= DefaultMethodHeader..."); }  //$NON-NLS-1$
+		    consumeInterfaceMethodDeclaration(true);  
+			break;
+ 
+    case 365 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
+		    consumeInvalidConstructorDeclaration(true);  
+			break;
+ 
+    case 366 : if (DEBUG) { System.out.println("InvalidConstructorDeclaration ::= ConstructorHeader..."); }  //$NON-NLS-1$
+		    consumeInvalidConstructorDeclaration(false);  
+			break;
+ 
+    case 378 : if (DEBUG) { System.out.println("PushLeftBrace ::="); }  //$NON-NLS-1$
+		    consumePushLeftBrace();  
+			break;
+ 
+    case 379 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace ,opt RBRACE"); }  //$NON-NLS-1$
+		    consumeEmptyArrayInitializer();  
+			break;
+ 
+    case 380 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
+		    consumeArrayInitializer();  
+			break;
+ 
+    case 381 : if (DEBUG) { System.out.println("ArrayInitializer ::= LBRACE PushLeftBrace..."); }  //$NON-NLS-1$
+		    consumeArrayInitializer();  
+			break;
+ 
+    case 383 : if (DEBUG) { System.out.println("VariableInitializers ::= VariableInitializers COMMA..."); }  //$NON-NLS-1$
+		    consumeVariableInitializers();  
+			break;
+ 
+    case 384 : if (DEBUG) { System.out.println("Block ::= OpenBlock LBRACE BlockStatementsopt RBRACE"); }  //$NON-NLS-1$
+		    consumeBlock();  
+			break;
+ 
+    case 385 : if (DEBUG) { System.out.println("OpenBlock ::="); }  //$NON-NLS-1$
+		    consumeOpenBlock() ;  
+			break;
+ 
+    case 387 : if (DEBUG) { System.out.println("BlockStatements ::= BlockStatements BlockStatement"); }  //$NON-NLS-1$
+		    consumeBlockStatements() ;  
+			break;
+ 
+    case 391 : if (DEBUG) { System.out.println("BlockStatement ::= InterfaceDeclaration"); }  //$NON-NLS-1$
+		    consumeInvalidInterfaceDeclaration();  
+			break;
+ 
+    case 392 : if (DEBUG) { System.out.println("BlockStatement ::= AnnotationTypeDeclaration"); }  //$NON-NLS-1$
+		    consumeInvalidAnnotationTypeDeclaration();  
+			break;
+ 
+    case 393 : if (DEBUG) { System.out.println("BlockStatement ::= EnumDeclaration"); }  //$NON-NLS-1$
+		    consumeInvalidEnumDeclaration();  
+			break;
+ 
+    case 394 : if (DEBUG) { System.out.println("LocalVariableDeclarationStatement ::=..."); }  //$NON-NLS-1$
+		    consumeLocalVariableDeclarationStatement();  
+			break;
+ 
+    case 395 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Type PushModifiers..."); }  //$NON-NLS-1$
+		    consumeLocalVariableDeclaration();  
+			break;
+ 
+    case 396 : if (DEBUG) { System.out.println("LocalVariableDeclaration ::= Modifiers Type..."); }  //$NON-NLS-1$
+		    consumeLocalVariableDeclaration();  
+			break;
+ 
+    case 397 : if (DEBUG) { System.out.println("PushModifiers ::="); }  //$NON-NLS-1$
+		    consumePushModifiers();  
+			break;
+ 
+    case 398 : if (DEBUG) { System.out.println("PushModifiersForHeader ::="); }  //$NON-NLS-1$
+		    consumePushModifiersForHeader();  
+			break;
+ 
+    case 399 : if (DEBUG) { System.out.println("PushRealModifiers ::="); }  //$NON-NLS-1$
+		    consumePushRealModifiers();  
+			break;
+ 
+    case 427 : if (DEBUG) { System.out.println("EmptyStatement ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeEmptyStatement();  
+			break;
+ 
+    case 428 : if (DEBUG) { System.out.println("LabeledStatement ::= Label COLON Statement"); }  //$NON-NLS-1$
+		    consumeStatementLabel() ;  
+			break;
+ 
+    case 429 : if (DEBUG) { System.out.println("LabeledStatementNoShortIf ::= Label COLON..."); }  //$NON-NLS-1$
+		    consumeStatementLabel() ;  
+			break;
+ 
+    case 430 : if (DEBUG) { System.out.println("Label ::= Identifier"); }  //$NON-NLS-1$
+		    consumeLabel() ;  
+			break;
+ 
+     case 431 : if (DEBUG) { System.out.println("ExpressionStatement ::= StatementExpression SEMICOLON"); }  //$NON-NLS-1$
+		    consumeExpressionStatement();  
+			break;
+ 
+    case 441 : if (DEBUG) { System.out.println("IfThenStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+		    consumeStatementIfNoElse();  
+			break;
+ 
+    case 442 : if (DEBUG) { System.out.println("IfThenElseStatement ::= if LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+		    consumeStatementIfWithElse();  
+			break;
+ 
+    case 443 : if (DEBUG) { System.out.println("IfThenElseStatementNoShortIf ::= if LPAREN Expression..."); }  //$NON-NLS-1$
+		    consumeStatementIfWithElse();  
+			break;
+ 
+    case 444 : if (DEBUG) { System.out.println("SwitchStatement ::= switch LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+		    consumeStatementSwitch() ;  
+			break;
+ 
+    case 445 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE RBRACE"); }  //$NON-NLS-1$
+		    consumeEmptySwitchBlock() ;  
+			break;
+ 
+    case 448 : if (DEBUG) { System.out.println("SwitchBlock ::= LBRACE SwitchBlockStatements..."); }  //$NON-NLS-1$
+		    consumeSwitchBlock() ;  
+			break;
+ 
+    case 450 : if (DEBUG) { System.out.println("SwitchBlockStatements ::= SwitchBlockStatements..."); }  //$NON-NLS-1$
+		    consumeSwitchBlockStatements() ;  
+			break;
+ 
+    case 451 : if (DEBUG) { System.out.println("SwitchBlockStatement ::= SwitchLabels BlockStatements"); }  //$NON-NLS-1$
+		    consumeSwitchBlockStatement() ;  
+			break;
+ 
+    case 453 : if (DEBUG) { System.out.println("SwitchLabels ::= SwitchLabels SwitchLabel"); }  //$NON-NLS-1$
+		    consumeSwitchLabels() ;  
+			break;
+ 
+     case 454 : if (DEBUG) { System.out.println("SwitchLabel ::= case ConstantExpression COLON"); }  //$NON-NLS-1$
+		    consumeCaseLabel();  
+			break;
+ 
+     case 455 : if (DEBUG) { System.out.println("SwitchLabel ::= default COLON"); }  //$NON-NLS-1$
+		    consumeDefaultLabel();  
+			break;
+ 
+    case 456 : if (DEBUG) { System.out.println("WhileStatement ::= while LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+		    consumeStatementWhile() ;  
+			break;
+ 
+    case 457 : if (DEBUG) { System.out.println("WhileStatementNoShortIf ::= while LPAREN Expression..."); }  //$NON-NLS-1$
+		    consumeStatementWhile() ;  
+			break;
+ 
+    case 458 : if (DEBUG) { System.out.println("DoStatement ::= do Statement while LPAREN Expression..."); }  //$NON-NLS-1$
+		    consumeStatementDo() ;  
+			break;
+ 
+    case 459 : if (DEBUG) { System.out.println("ForStatement ::= for LPAREN ForInitopt SEMICOLON..."); }  //$NON-NLS-1$
+		    consumeStatementFor() ;  
+			break;
+ 
+    case 460 : if (DEBUG) { System.out.println("ForStatementNoShortIf ::= for LPAREN ForInitopt..."); }  //$NON-NLS-1$
+		    consumeStatementFor() ;  
+			break;
+ 
+    case 461 : if (DEBUG) { System.out.println("ForInit ::= StatementExpressionList"); }  //$NON-NLS-1$
+		    consumeForInit() ;  
+			break;
+ 
+    case 465 : if (DEBUG) { System.out.println("StatementExpressionList ::= StatementExpressionList..."); }  //$NON-NLS-1$
+		    consumeStatementExpressionList() ;  
+			break;
+ 
+    case 466 : if (DEBUG) { System.out.println("WithinStatement ::= within LPAREN Expression RPAREN..."); }  //$NON-NLS-1$
+		    consumeWithinStatement();  
+			break;
+ 
+    case 467 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression SEMICOLON"); }  //$NON-NLS-1$
+		    consumeSimpleAssertStatement() ;  
+			break;
+ 
+    case 468 : if (DEBUG) { System.out.println("AssertStatement ::= assert Expression COLON Expression"); }  //$NON-NLS-1$
+		    consumeAssertStatement() ;  
+			break;
+ 
+    case 469 : if (DEBUG) { System.out.println("BreakStatement ::= break SEMICOLON"); }  //$NON-NLS-1$
+		    consumeStatementBreak() ;  
+			break;
+ 
+    case 470 : if (DEBUG) { System.out.println("BreakStatement ::= break Identifier SEMICOLON"); }  //$NON-NLS-1$
+		    consumeStatementBreakWithLabel() ;  
+			break;
+ 
+    case 471 : if (DEBUG) { System.out.println("ContinueStatement ::= continue SEMICOLON"); }  //$NON-NLS-1$
+		    consumeStatementContinue() ;  
+			break;
+ 
+    case 472 : if (DEBUG) { System.out.println("ContinueStatement ::= continue Identifier SEMICOLON"); }  //$NON-NLS-1$
+		    consumeStatementContinueWithLabel() ;  
+			break;
+ 
+    case 473 : if (DEBUG) { System.out.println("ReturnStatement ::= return Expressionopt SEMICOLON"); }  //$NON-NLS-1$
+		    consumeStatementReturn() ;  
+			break;
+ 
+    case 474 : if (DEBUG) { System.out.println("ThrowStatement ::= throw Expression SEMICOLON"); }  //$NON-NLS-1$
+		    consumeStatementThrow();  
+			break;
+ 
+    case 475 : if (DEBUG) { System.out.println("SynchronizedStatement ::= OnlySynchronized LPAREN..."); }  //$NON-NLS-1$
+		    consumeStatementSynchronized();  
+			break;
+ 
+    case 476 : if (DEBUG) { System.out.println("OnlySynchronized ::= synchronized"); }  //$NON-NLS-1$
+		    consumeOnlySynchronized();  
+			break;
+ 
+    case 477 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catches"); }  //$NON-NLS-1$
+		    consumeStatementTry(false, false);  
+			break;
+ 
+    case 478 : if (DEBUG) { System.out.println("TryStatement ::= try TryBlock Catchesopt Finally"); }  //$NON-NLS-1$
+		    consumeStatementTry(true, false);  
+			break;
+ 
+    case 479 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
+		    consumeStatementTry(false, true);  
+			break;
+ 
+    case 480 : if (DEBUG) { System.out.println("TryStatementWithResources ::= try ResourceSpecification"); }  //$NON-NLS-1$
+		    consumeStatementTry(true, true);  
+			break;
+ 
+    case 481 : if (DEBUG) { System.out.println("ResourceSpecification ::= LPAREN Resources ;opt RPAREN"); }  //$NON-NLS-1$
+		    consumeResourceSpecification();  
+			break;
+ 
+    case 482 : if (DEBUG) { System.out.println(";opt ::="); }  //$NON-NLS-1$
+		    consumeResourceOptionalTrailingSemiColon(false);  
+			break;
+ 
+    case 483 : if (DEBUG) { System.out.println(";opt ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeResourceOptionalTrailingSemiColon(true);  
+			break;
+ 
+    case 484 : if (DEBUG) { System.out.println("Resources ::= Resource"); }  //$NON-NLS-1$
+		    consumeSingleResource();  
+			break;
+ 
+    case 485 : if (DEBUG) { System.out.println("Resources ::= Resources TrailingSemiColon Resource"); }  //$NON-NLS-1$
+		    consumeMultipleResources();  
+			break;
+ 
+    case 486 : if (DEBUG) { System.out.println("TrailingSemiColon ::= SEMICOLON"); }  //$NON-NLS-1$
+		    consumeResourceOptionalTrailingSemiColon(true);  
+			break;
+ 
+    case 487 : if (DEBUG) { System.out.println("Resource ::= Type PushModifiers VariableDeclaratorId..."); }  //$NON-NLS-1$
+		    consumeResourceAsLocalVariableDeclaration();  
+			break;
+ 
+    case 488 : if (DEBUG) { System.out.println("Resource ::= Modifiers Type PushRealModifiers..."); }  //$NON-NLS-1$
+		    consumeResourceAsLocalVariableDeclaration();  
+			break;
+ 
+    case 490 : if (DEBUG) { System.out.println("ExitTryBlock ::="); }  //$NON-NLS-1$
+		    consumeExitTryBlock();  
+			break;
+ 
+    case 492 : if (DEBUG) { System.out.println("Catches ::= Catches CatchClause"); }  //$NON-NLS-1$
+		    consumeCatches();  
+			break;
+ 
+    case 493 : if (DEBUG) { System.out.println("CatchClause ::= catch LPAREN CatchFormalParameter RPAREN"); }  //$NON-NLS-1$
+		    consumeStatementCatch() ;  
+			break;
+ 
+    case 495 : if (DEBUG) { System.out.println("PushLPAREN ::= LPAREN"); }  //$NON-NLS-1$
+		    consumeLeftParen();  
+			break;
+ 
+    case 496 : if (DEBUG) { System.out.println("PushRPAREN ::= RPAREN"); }  //$NON-NLS-1$
+		    consumeRightParen();  
+			break;
+ 
+    case 501 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= this"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayThis();  
+			break;
+ 
+    case 502 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Expression_NotName..."); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArray();  
+			break;
+ 
+    case 503 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PushLPAREN Name PushRPAREN"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayWithName();  
+			break;
+ 
+    case 507 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT this"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayNameThis();  
+			break;
+ 
+    case 508 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT super"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayNameSuper();  
+			break;
+ 
+    case 509 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name DOT class"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayName();  
+			break;
+ 
+    case 510 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= Name Dims DOT class"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayArrayType();  
+			break;
+ 
+    case 511 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType Dims DOT class"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayPrimitiveArrayType();  
+			break;
+ 
+    case 512 : if (DEBUG) { System.out.println("PrimaryNoNewArray ::= PrimitiveType DOT class"); }  //$NON-NLS-1$
+		    consumePrimaryNoNewArrayPrimitiveType();  
+			break;
+ 
+    case 513 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); }  //$NON-NLS-1$
+		    consumeRoleClassLiteral();  
+			break;
+ 
+    case 519 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); }  //$NON-NLS-1$
+		    consumeReferenceExpressionTypeArgumentsAndTrunk(false);  
+			break;
+ 
+    case 520 : if (DEBUG) { System.out.println("ReferenceExpressionTypeArgumentsAndTrunk0 ::=..."); }  //$NON-NLS-1$
+		    consumeReferenceExpressionTypeArgumentsAndTrunk(true);  
+			break;
+ 
+    case 521 : if (DEBUG) { System.out.println("ReferenceExpression ::= PrimitiveType Dims COLON_COLON"); }  //$NON-NLS-1$
+		    consumeReferenceExpressionTypeForm(true);  
+			break;
+ 
+    case 522 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name Dimsopt COLON_COLON..."); }  //$NON-NLS-1$
+		    consumeReferenceExpressionTypeForm(false);  
+			break;
+ 
+    case 523 : if (DEBUG) { System.out.println("ReferenceExpression ::= Name BeginTypeArguments..."); }  //$NON-NLS-1$
+		    consumeReferenceExpressionGenericTypeForm();  
+			break;
+ 
+    case 524 : if (DEBUG) { System.out.println("ReferenceExpression ::= Primary COLON_COLON..."); }  //$NON-NLS-1$
+		    consumeReferenceExpressionPrimaryForm();  
+			break;
+ 
+    case 525 : if (DEBUG) { System.out.println("ReferenceExpression ::= super COLON_COLON..."); }  //$NON-NLS-1$
+		    consumeReferenceExpressionSuperForm();  
+			break;
+ 
+    case 526 : if (DEBUG) { System.out.println("NonWildTypeArgumentsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyTypeArguments();  
+			break;
+ 
+    case 528 : if (DEBUG) { System.out.println("IdentifierOrNew ::= Identifier"); }  //$NON-NLS-1$
+		    consumeIdentifierOrNew(false);  
+			break;
+ 
+    case 529 : if (DEBUG) { System.out.println("IdentifierOrNew ::= new"); }  //$NON-NLS-1$
+		    consumeIdentifierOrNew(true);  
+			break;
+ 
+    case 530 : if (DEBUG) { System.out.println("LambdaExpression ::= LambdaParameters ARROW LambdaBody"); }  //$NON-NLS-1$
+		    consumeLambdaExpression();  
+			break;
+ 
+    case 531 : if (DEBUG) { System.out.println("LambdaParameters ::= Identifier"); }  //$NON-NLS-1$
+		    consumeTypeElidedLambdaParameter(false);  
+			break;
+ 
+    case 537 : if (DEBUG) { System.out.println("TypeElidedFormalParameterList ::=..."); }  //$NON-NLS-1$
+		    consumeFormalParameterList();  
+			break;
+ 
+    case 538 : if (DEBUG) { System.out.println("TypeElidedFormalParameter ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
+		    consumeTypeElidedLambdaParameter(true);  
+			break;
+ 
+    case 540 : if (DEBUG) { System.out.println("LambdaBody ::= NestedType NestedMethod LBRACE..."); }  //$NON-NLS-1$
+		    consumeBlock();  
+			break;
+ 
+    case 541 : if (DEBUG) { System.out.println("ElidedLeftBraceAndReturn ::="); }  //$NON-NLS-1$
+		    consumeElidedLeftBraceAndReturn();  
+			break;
+ 
+    case 542 : if (DEBUG) { System.out.println("AllocationHeader ::= new ClassType LPAREN..."); }  //$NON-NLS-1$
+		    consumeAllocationHeader();  
+			break;
+ 
+    case 543 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new..."); }  //$NON-NLS-1$
+		    consumeClassInstanceCreationExpressionWithTypeArguments();  
+			break;
+ 
+    case 544 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= new ClassType..."); }  //$NON-NLS-1$
+		    consumeClassInstanceCreationExpression();  
+			break;
+ 
+    case 545 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
+		    consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;  
+			break;
+ 
+    case 546 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::= Primary DOT new..."); }  //$NON-NLS-1$
+		    consumeClassInstanceCreationExpressionQualified() ;  
+			break;
+ 
+    case 547 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
+		    consumeClassInstanceCreationExpressionQualified() ;  
+			break;
+ 
+    case 548 : if (DEBUG) { System.out.println("ClassInstanceCreationExpression ::=..."); }  //$NON-NLS-1$
+		    consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() ;  
+			break;
+ 
+    case 549 : if (DEBUG) { System.out.println("EnterInstanceCreationArgumentList ::="); }  //$NON-NLS-1$
+		    consumeEnterInstanceCreationArgumentList();  
+			break;
+ 
+    case 550 : if (DEBUG) { System.out.println("ClassInstanceCreationExpressionName ::= Name DOT"); }  //$NON-NLS-1$
+		    consumeClassInstanceCreationExpressionName() ;  
+			break;
+ 
+    case 551 : if (DEBUG) { System.out.println("UnqualifiedClassBodyopt ::="); }  //$NON-NLS-1$
+		    consumeClassBodyopt();  
+			break;
+ 
+    case 553 : if (DEBUG) { System.out.println("UnqualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
+		    consumeEnterAnonymousClassBody(false);  
+			break;
+ 
+    case 554 : if (DEBUG) { System.out.println("QualifiedClassBodyopt ::="); }  //$NON-NLS-1$
+		    consumeClassBodyopt();  
+			break;
+ 
+    case 556 : if (DEBUG) { System.out.println("QualifiedEnterAnonymousClassBody ::="); }  //$NON-NLS-1$
+		    consumeEnterAnonymousClassBody(true);  
+			break;
+ 
+    case 558 : if (DEBUG) { System.out.println("ArgumentList ::= ArgumentList COMMA Expression"); }  //$NON-NLS-1$
+		    consumeArgumentList();  
+			break;
+ 
+    case 559 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new PrimitiveType..."); }  //$NON-NLS-1$
+		    consumeArrayCreationHeader();  
+			break;
+ 
+    case 560 : if (DEBUG) { System.out.println("ArrayCreationHeader ::= new ClassOrInterfaceType..."); }  //$NON-NLS-1$
+		    consumeArrayCreationHeader();  
+			break;
+ 
+    case 561 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
+		    consumeArrayCreationExpressionWithoutInitializer();  
+			break;
+ 
+    case 562 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new PrimitiveType"); }  //$NON-NLS-1$
+		    consumeArrayCreationExpressionWithInitializer();  
+			break;
+ 
+    case 563 : if (DEBUG) { System.out.println("ArrayCreationWithoutArrayInitializer ::= new..."); }  //$NON-NLS-1$
+		    consumeArrayCreationExpressionWithoutInitializer();  
+			break;
+ 
+    case 564 : if (DEBUG) { System.out.println("ArrayCreationWithArrayInitializer ::= new..."); }  //$NON-NLS-1$
+		    consumeArrayCreationExpressionWithInitializer();  
+			break;
+ 
+    case 566 : if (DEBUG) { System.out.println("DimWithOrWithOutExprs ::= DimWithOrWithOutExprs..."); }  //$NON-NLS-1$
+		    consumeDimWithOrWithOutExprs();  
+			break;
+ 
+     case 568 : if (DEBUG) { System.out.println("DimWithOrWithOutExpr ::= TypeAnnotationsopt LBRACKET..."); }  //$NON-NLS-1$
+		    consumeDimWithOrWithOutExpr();  
+			break;
+ 
+     case 569 : if (DEBUG) { System.out.println("Dims ::= DimsLoop"); }  //$NON-NLS-1$
+		    consumeDims();  
+			break;
+ 
+     case 572 : if (DEBUG) { System.out.println("OneDimLoop ::= LBRACKET RBRACKET"); }  //$NON-NLS-1$
+		    consumeOneDimLoop(false);  
+			break;
+ 
+     case 573 : if (DEBUG) { System.out.println("OneDimLoop ::= TypeAnnotations LBRACKET RBRACKET"); }  //$NON-NLS-1$
+		    consumeOneDimLoop(true);  
+			break;
+ 
+    case 574 : if (DEBUG) { System.out.println("FieldAccess ::= Primary DOT Identifier"); }  //$NON-NLS-1$
+		    consumeFieldAccess(false);  
+			break;
+ 
+    case 575 : if (DEBUG) { System.out.println("FieldAccess ::= super DOT Identifier"); }  //$NON-NLS-1$
+		    consumeFieldAccess(true);  
+			break;
+ 
+    case 576 : if (DEBUG) { System.out.println("MethodInvocation ::= Name LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
+		    consumeMethodInvocationName();  
+			break;
+ 
+    case 577 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationNameWithTypeArguments();  
+			break;
+ 
+    case 578 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationPrimaryWithTypeArguments();  
+			break;
+ 
+    case 579 : if (DEBUG) { System.out.println("MethodInvocation ::= Primary DOT Identifier LPAREN..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationPrimary();  
+			break;
+ 
+    case 580 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationSuperWithTypeArguments();  
+			break;
+ 
+    case 581 : if (DEBUG) { System.out.println("MethodInvocation ::= super DOT Identifier LPAREN..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationSuper();  
+			break;
+ 
+    case 582 : if (DEBUG) { System.out.println("MethodInvocation ::= tsuper DOT Identifier LPAREN..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationTSuper(UNQUALIFIED);  
+			break;
+ 
+    case 583 : if (DEBUG) { System.out.println("MethodInvocation ::= tsuper DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationTSuperWithTypeArguments(0);  
+			break;
+ 
+    case 584 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT tsuper DOT Identifier..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationTSuper(QUALIFIED);  
+			break;
+ 
+    case 585 : if (DEBUG) { System.out.println("MethodInvocation ::= Name DOT tsuper DOT..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationTSuperWithTypeArguments(2);  
+			break;
+ 
+    case 586 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT Identifier LPAREN..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationBase(false);  
+			break;
+ 
+    case 587 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT OnlyTypeArguments..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationBaseWithTypeArguments(false);  
+			break;
+ 
+    case 588 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT super DOT Identifier..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationBase(true);  
+			break;
+ 
+    case 589 : if (DEBUG) { System.out.println("MethodInvocation ::= base DOT super DOT..."); }  //$NON-NLS-1$
+		    consumeMethodInvocationBaseWithTypeArguments(true);  
+			break;
+ 
+    case 590 : if (DEBUG) { System.out.println("ArrayAccess ::= Name LBRACKET Expression RBRACKET"); }  //$NON-NLS-1$
+		    consumeArrayAccess(true);  
+			break;
+ 
+    case 591 : if (DEBUG) { System.out.println("ArrayAccess ::= PrimaryNoNewArray LBRACKET Expression..."); }  //$NON-NLS-1$
+		    consumeArrayAccess(false);  
+			break;
+ 
+    case 592 : if (DEBUG) { System.out.println("ArrayAccess ::= ArrayCreationWithArrayInitializer..."); }  //$NON-NLS-1$
+		    consumeArrayAccess(false);  
+			break;
+ 
+    case 594 : if (DEBUG) { System.out.println("PostfixExpression ::= Name"); }  //$NON-NLS-1$
+		    consumePostfixExpression();  
+			break;
+ 
+    case 597 : if (DEBUG) { System.out.println("PostIncrementExpression ::= PostfixExpression PLUS_PLUS"); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.PLUS,true);  
+			break;
+ 
+    case 598 : if (DEBUG) { System.out.println("PostDecrementExpression ::= PostfixExpression..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.MINUS,true);  
+			break;
+ 
+    case 599 : if (DEBUG) { System.out.println("PushPosition ::="); }  //$NON-NLS-1$
+		    consumePushPosition();  
+			break;
+ 
+    case 602 : if (DEBUG) { System.out.println("UnaryExpression ::= PLUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.PLUS);  
+			break;
+ 
+    case 603 : if (DEBUG) { System.out.println("UnaryExpression ::= MINUS PushPosition UnaryExpression"); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.MINUS);  
+			break;
+ 
+    case 605 : if (DEBUG) { System.out.println("PreIncrementExpression ::= PLUS_PLUS PushPosition..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.PLUS,false);  
+			break;
+ 
+    case 606 : if (DEBUG) { System.out.println("PreDecrementExpression ::= MINUS_MINUS PushPosition..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.MINUS,false);  
+			break;
+ 
+    case 608 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= TWIDDLE PushPosition..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.TWIDDLE);  
+			break;
+ 
+    case 609 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus ::= NOT PushPosition..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.NOT);  
+			break;
+ 
+    case 611 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN PrimitiveType Dimsopt..."); }  //$NON-NLS-1$
+		    consumeCastExpressionWithPrimitiveType();  
+			break;
+ 
+    case 612 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
+		    consumeCastExpressionWithGenericsArray();  
+			break;
+ 
+    case 613 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name..."); }  //$NON-NLS-1$
+		    consumeCastExpressionWithQualifiedGenericsArray();  
+			break;
+ 
+    case 614 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name PushRPAREN..."); }  //$NON-NLS-1$
+		    consumeCastExpressionLL1();  
+			break;
+ 
+    case 615 : if (DEBUG) { System.out.println("CastExpression ::= BeginIntersectionCast PushLPAREN..."); }  //$NON-NLS-1$
+		    consumeCastExpressionLL1WithBounds();  
+			break;
+ 
+    case 616 : if (DEBUG) { System.out.println("CastExpression ::= PushLPAREN Name Dims..."); }  //$NON-NLS-1$
+		    consumeCastExpressionWithNameArray();  
+			break;
+ 
+    case 617 : if (DEBUG) { System.out.println("AdditionalBoundsListOpt ::="); }  //$NON-NLS-1$
+		    consumeZeroAdditionalBounds();  
+			break;
+ 
+    case 621 : if (DEBUG) { System.out.println("OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments"); }  //$NON-NLS-1$
+		    consumeOnlyTypeArgumentsForCastExpression();  
+			break;
+ 
+    case 622 : if (DEBUG) { System.out.println("InsideCastExpression ::="); }  //$NON-NLS-1$
+		    consumeInsideCastExpression();  
+			break;
+ 
+    case 623 : if (DEBUG) { System.out.println("InsideCastExpressionLL1 ::="); }  //$NON-NLS-1$
+		    consumeInsideCastExpressionLL1();  
+			break;
+ 
+    case 624 : if (DEBUG) { System.out.println("InsideCastExpressionLL1WithBounds ::="); }  //$NON-NLS-1$
+		    consumeInsideCastExpressionLL1WithBounds ();  
+			break;
+ 
+    case 625 : if (DEBUG) { System.out.println("InsideCastExpressionWithQualifiedGenerics ::="); }  //$NON-NLS-1$
+		    consumeInsideCastExpressionWithQualifiedGenerics();  
+			break;
+ 
+    case 627 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.MULTIPLY);  
+			break;
+ 
+    case 628 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.DIVIDE);  
+			break;
+ 
+    case 629 : if (DEBUG) { System.out.println("MultiplicativeExpression ::= MultiplicativeExpression..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.REMAINDER);  
+			break;
+ 
+    case 631 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression PLUS..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.PLUS);  
+			break;
+ 
+    case 632 : if (DEBUG) { System.out.println("AdditiveExpression ::= AdditiveExpression MINUS..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.MINUS);  
+			break;
+ 
+    case 634 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression LEFT_SHIFT..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.LEFT_SHIFT);  
+			break;
+ 
+    case 635 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression RIGHT_SHIFT..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);  
+			break;
+ 
+    case 636 : if (DEBUG) { System.out.println("ShiftExpression ::= ShiftExpression UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);  
+			break;
+ 
+    case 638 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.LESS);  
+			break;
+ 
+    case 639 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression GREATER..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.GREATER);  
+			break;
+ 
+    case 640 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression LESS_EQUAL"); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.LESS_EQUAL);  
+			break;
+ 
+    case 641 : if (DEBUG) { System.out.println("RelationalExpression ::= RelationalExpression..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.GREATER_EQUAL);  
+			break;
+ 
+    case 643 : if (DEBUG) { System.out.println("InstanceofExpression ::= InstanceofExpression instanceof"); }  //$NON-NLS-1$
+		    consumeInstanceOfExpression();  
+			break;
+ 
+    case 645 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression EQUAL_EQUAL..."); }  //$NON-NLS-1$
+		    consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);  
+			break;
+ 
+    case 646 : if (DEBUG) { System.out.println("EqualityExpression ::= EqualityExpression NOT_EQUAL..."); }  //$NON-NLS-1$
+		    consumeEqualityExpression(OperatorIds.NOT_EQUAL);  
+			break;
+ 
+    case 648 : if (DEBUG) { System.out.println("AndExpression ::= AndExpression AND EqualityExpression"); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.AND);  
+			break;
+ 
+    case 650 : if (DEBUG) { System.out.println("ExclusiveOrExpression ::= ExclusiveOrExpression XOR..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.XOR);  
+			break;
+ 
+    case 652 : if (DEBUG) { System.out.println("InclusiveOrExpression ::= InclusiveOrExpression OR..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.OR);  
+			break;
+ 
+    case 654 : if (DEBUG) { System.out.println("ConditionalAndExpression ::= ConditionalAndExpression..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.AND_AND);  
+			break;
+ 
+    case 656 : if (DEBUG) { System.out.println("ConditionalOrExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.OR_OR);  
+			break;
+ 
+    case 658 : if (DEBUG) { System.out.println("ConditionalExpression ::= ConditionalOrExpression..."); }  //$NON-NLS-1$
+		    consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;  
+			break;
+ 
+    case 661 : if (DEBUG) { System.out.println("Assignment ::= PostfixExpression AssignmentOperator..."); }  //$NON-NLS-1$
+		    consumeAssignment();  
+			break;
+ 
+    case 663 : if (DEBUG) { System.out.println("Assignment ::= InvalidArrayInitializerAssignement"); }  //$NON-NLS-1$
+		    ignoreExpressionAssignment(); 
+			break;
+ 
+    case 664 : if (DEBUG) { System.out.println("AssignmentOperator ::= EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(EQUAL);  
+			break;
+ 
+    case 665 : if (DEBUG) { System.out.println("AssignmentOperator ::= MULTIPLY_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(MULTIPLY);  
+			break;
+ 
+    case 666 : if (DEBUG) { System.out.println("AssignmentOperator ::= DIVIDE_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(DIVIDE);  
+			break;
+ 
+    case 667 : if (DEBUG) { System.out.println("AssignmentOperator ::= REMAINDER_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(REMAINDER);  
+			break;
+ 
+    case 668 : if (DEBUG) { System.out.println("AssignmentOperator ::= PLUS_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(PLUS);  
+			break;
+ 
+    case 669 : if (DEBUG) { System.out.println("AssignmentOperator ::= MINUS_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(MINUS);  
+			break;
+ 
+    case 670 : if (DEBUG) { System.out.println("AssignmentOperator ::= LEFT_SHIFT_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(LEFT_SHIFT);  
+			break;
+ 
+    case 671 : if (DEBUG) { System.out.println("AssignmentOperator ::= RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(RIGHT_SHIFT);  
+			break;
+ 
+    case 672 : if (DEBUG) { System.out.println("AssignmentOperator ::= UNSIGNED_RIGHT_SHIFT_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(UNSIGNED_RIGHT_SHIFT);  
+			break;
+ 
+    case 673 : if (DEBUG) { System.out.println("AssignmentOperator ::= AND_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(AND);  
+			break;
+ 
+    case 674 : if (DEBUG) { System.out.println("AssignmentOperator ::= XOR_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(XOR);  
+			break;
+ 
+    case 675 : if (DEBUG) { System.out.println("AssignmentOperator ::= OR_EQUAL"); }  //$NON-NLS-1$
+		    consumeAssignmentOperator(OR);  
+			break;
+ 
+    case 676 : if (DEBUG) { System.out.println("Expression ::= AssignmentExpression"); }  //$NON-NLS-1$
+		    consumeExpression();  
+			break;
+ 
+    case 679 : if (DEBUG) { System.out.println("Expressionopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyExpression();  
+			break;
+ 
+    case 684 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyClassBodyDeclarationsopt();  
+			break;
+ 
+    case 685 : if (DEBUG) { System.out.println("ClassBodyDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
+		    consumeClassBodyDeclarationsopt();  
+			break;
+ 
+     case 686 : if (DEBUG) { System.out.println("Modifiersopt ::="); }  //$NON-NLS-1$
+		    consumeDefaultModifiers();  
+			break;
+ 
+    case 687 : if (DEBUG) { System.out.println("Modifiersopt ::= Modifiers"); }  //$NON-NLS-1$
+		    consumeModifiers();  
+			break;
+ 
+    case 688 : if (DEBUG) { System.out.println("BlockStatementsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyBlockStatementsopt();  
+			break;
+ 
+     case 690 : if (DEBUG) { System.out.println("Dimsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyDimsopt();  
+			break;
+ 
+     case 692 : if (DEBUG) { System.out.println("ArgumentListopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyArgumentListopt();  
+			break;
+ 
+    case 696 : if (DEBUG) { System.out.println("FormalParameterListopt ::="); }  //$NON-NLS-1$
+		    consumeFormalParameterListopt();  
+			break;
+ 
+     case 700 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyInterfaceMemberDeclarationsopt();  
+			break;
+ 
+     case 701 : if (DEBUG) { System.out.println("InterfaceMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
+		    consumeInterfaceMemberDeclarationsopt();  
+			break;
+ 
+    case 702 : if (DEBUG) { System.out.println("NestedType ::="); }  //$NON-NLS-1$
+		    consumeNestedType();  
+			break;
+
+     case 703 : if (DEBUG) { System.out.println("ForInitopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyForInitopt();  
+			break;
+ 
+     case 705 : if (DEBUG) { System.out.println("ForUpdateopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyForUpdateopt();  
+			break;
+ 
+     case 709 : if (DEBUG) { System.out.println("Catchesopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyCatchesopt();  
+			break;
+ 
+     case 711 : if (DEBUG) { System.out.println("EnumDeclaration ::= EnumHeader EnumBody"); }  //$NON-NLS-1$
+		    consumeEnumDeclaration();  
+			break;
+ 
+     case 712 : if (DEBUG) { System.out.println("EnumHeader ::= EnumHeaderName ClassHeaderImplementsopt"); }  //$NON-NLS-1$
+		    consumeEnumHeader();  
+			break;
+ 
+     case 713 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier"); }  //$NON-NLS-1$
+		    consumeEnumHeaderName();  
+			break;
+ 
+     case 714 : if (DEBUG) { System.out.println("EnumHeaderName ::= Modifiersopt enum Identifier..."); }  //$NON-NLS-1$
+		    consumeEnumHeaderNameWithTypeParameters();  
+			break;
+ 
+     case 715 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumBodyDeclarationsopt RBRACE"); }  //$NON-NLS-1$
+		    consumeEnumBodyNoConstants();  
+			break;
+ 
+     case 716 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE COMMA EnumBodyDeclarationsopt..."); }  //$NON-NLS-1$
+		    consumeEnumBodyNoConstants();  
+			break;
+ 
+     case 717 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants COMMA..."); }  //$NON-NLS-1$
+		    consumeEnumBodyWithConstants();  
+			break;
+ 
+     case 718 : if (DEBUG) { System.out.println("EnumBody ::= LBRACE EnumConstants..."); }  //$NON-NLS-1$
+		    consumeEnumBodyWithConstants();  
+			break;
+ 
+    case 720 : if (DEBUG) { System.out.println("EnumConstants ::= EnumConstants COMMA EnumConstant"); }  //$NON-NLS-1$
+		    consumeEnumConstants();  
+			break;
+ 
+    case 721 : if (DEBUG) { System.out.println("EnumConstantHeaderName ::= Modifiersopt Identifier"); }  //$NON-NLS-1$
+		    consumeEnumConstantHeaderName();  
+			break;
+ 
+    case 722 : if (DEBUG) { System.out.println("EnumConstantHeader ::= EnumConstantHeaderName..."); }  //$NON-NLS-1$
+		    consumeEnumConstantHeader();  
+			break;
+ 
+    case 723 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader ForceNoDiet..."); }  //$NON-NLS-1$
+		    consumeEnumConstantWithClassBody();  
+			break;
+ 
+    case 724 : if (DEBUG) { System.out.println("EnumConstant ::= EnumConstantHeader"); }  //$NON-NLS-1$
+		    consumeEnumConstantNoClassBody();  
+			break;
+ 
+    case 725 : if (DEBUG) { System.out.println("Arguments ::= LPAREN ArgumentListopt RPAREN"); }  //$NON-NLS-1$
+		    consumeArguments();  
+			break;
+ 
+    case 726 : if (DEBUG) { System.out.println("Argumentsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyArguments();  
+			break;
+ 
+    case 728 : if (DEBUG) { System.out.println("EnumDeclarations ::= SEMICOLON ClassBodyDeclarationsopt"); }  //$NON-NLS-1$
+		    consumeEnumDeclarations();  
+			break;
+ 
+    case 729 : if (DEBUG) { System.out.println("EnumBodyDeclarationsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyEnumDeclarations();  
+			break;
+ 
+    case 731 : if (DEBUG) { System.out.println("EnhancedForStatement ::= EnhancedForStatementHeader..."); }  //$NON-NLS-1$
+		    consumeEnhancedForStatement();  
+			break;
+ 
+    case 732 : if (DEBUG) { System.out.println("EnhancedForStatementNoShortIf ::=..."); }  //$NON-NLS-1$
+		    consumeEnhancedForStatement();  
+			break;
+ 
+    case 733 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Type..."); }  //$NON-NLS-1$
+		    consumeEnhancedForStatementHeaderInit(false);  
+			break;
+ 
+    case 734 : if (DEBUG) { System.out.println("EnhancedForStatementHeaderInit ::= for LPAREN Modifiers"); }  //$NON-NLS-1$
+		    consumeEnhancedForStatementHeaderInit(true);  
+			break;
+ 
+    case 735 : if (DEBUG) { System.out.println("EnhancedForStatementHeader ::=..."); }  //$NON-NLS-1$
+		    consumeEnhancedForStatementHeader();  
+			break;
+ 
+    case 736 : if (DEBUG) { System.out.println("SingleBaseImportDeclaration ::=..."); }  //$NON-NLS-1$
+		    consumeImportDeclaration();  
+			break;
+ 
+    case 737 : if (DEBUG) { System.out.println("SingleBaseImportDeclarationName ::= import base Name"); }  //$NON-NLS-1$
+		    consumeSingleBaseImportDeclarationName();  
+			break;
+ 
+    case 738 : if (DEBUG) { System.out.println("SingleStaticImportDeclaration ::=..."); }  //$NON-NLS-1$
+		    consumeImportDeclaration();  
+			break;
+ 
+    case 739 : if (DEBUG) { System.out.println("SingleStaticImportDeclarationName ::= import static Name"); }  //$NON-NLS-1$
+		    consumeSingleStaticImportDeclarationName();  
+			break;
+ 
+    case 740 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclaration ::=..."); }  //$NON-NLS-1$
+		    consumeImportDeclaration();  
+			break;
+ 
+    case 741 : if (DEBUG) { System.out.println("StaticImportOnDemandDeclarationName ::= import static..."); }  //$NON-NLS-1$
+		    consumeStaticImportOnDemandDeclarationName();  
+			break;
+ 
+    case 742 : if (DEBUG) { System.out.println("TypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
+		    consumeTypeArguments();  
+			break;
+ 
+    case 743 : if (DEBUG) { System.out.println("OnlyTypeArguments ::= LESS TypeArgumentList1"); }  //$NON-NLS-1$
+		    consumeOnlyTypeArguments();  
+			break;
+ 
+    case 745 : if (DEBUG) { System.out.println("TypeArgumentList1 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
+		    consumeTypeArgumentList1();  
+			break;
+ 
+    case 747 : if (DEBUG) { System.out.println("TypeArgumentList ::= TypeArgumentList COMMA TypeArgument"); }  //$NON-NLS-1$
+		    consumeTypeArgumentList();  
+			break;
+ 
+    case 748 : if (DEBUG) { System.out.println("TypeArgument ::= ReferenceType"); }  //$NON-NLS-1$
+		    consumeTypeArgument();  
+			break;
+ 
+    case 755 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument ::=..."); }  //$NON-NLS-1$
+		    consumeTypeArgumentFromAnchor();  
+			break;
+ 
+    case 756 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationsOnTypeArgumentFromAnchor();  
+			break;
+ 
+    case 758 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument1 ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationsOnTypeArgumentFromAnchor();  
+			break;
+ 
+    case 759 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument1 ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationsOnTypeArgumentFromAnchor();  
+			break;
+ 
+    case 761 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument2 ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationsOnTypeArgumentFromAnchor();  
+			break;
+ 
+    case 762 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument2 ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationsOnTypeArgumentFromAnchor();  
+			break;
+ 
+    case 764 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument3 ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationsOnTypeArgumentFromAnchor();  
+			break;
+ 
+    case 765 : if (DEBUG) { System.out.println("TypeAnchorOrAnnotatedTypeArgument3 ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationsOnTypeArgumentFromAnchor();  
+			break;
+ 
+    case 766 : if (DEBUG) { System.out.println("NotAnAnchor ::="); }  //$NON-NLS-1$
+		    convertTypeAnchor(0);  
+			break;
+ 
+    case 767 : if (DEBUG) { System.out.println("NotAnAnchor ::= LPAREN SingleMemberAnnotationMemberValue"); }  //$NON-NLS-1$
+		    convertTypeAnchor(1);  
+			break;
+ 
+    case 768 : if (DEBUG) { System.out.println("NotAnAnchor ::= LPAREN MemberValuePairsopt RPAREN"); }  //$NON-NLS-1$
+		    convertTypeAnchor(2);  
+			break;
+ 
+    case 771 : if (DEBUG) { System.out.println("TentativeTypeAnchor ::= ATOT UnannotatableName"); }  //$NON-NLS-1$
+		    consumeTypeAnchor(false);  
+			break;
+ 
+    case 772 : if (DEBUG) { System.out.println("TypeAnchor ::= ATOT base"); }  //$NON-NLS-1$
+		    consumeTypeAnchor(true);  
+			break;
+ 
+    case 773 : if (DEBUG) { System.out.println("TypeAnchor ::= ATOT this"); }  //$NON-NLS-1$
+		    skipThisAnchor();  
+			break;
+ 
+    case 774 : if (DEBUG) { System.out.println("TypeAnchor ::= ATOT UnannotatableName DOT base"); }  //$NON-NLS-1$
+		    consumeQualifiedBaseTypeAnchor();  
+			break;
+ 
+    case 777 : if (DEBUG) { System.out.println("ReferenceType1 ::= ReferenceType GREATER"); }  //$NON-NLS-1$
+		    consumeReferenceType1();  
+			break;
+ 
+    case 778 : if (DEBUG) { System.out.println("ReferenceType1 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
+		    consumeTypeArgumentReferenceType1();  
+			break;
+ 
+    case 780 : if (DEBUG) { System.out.println("TypeArgumentList2 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
+		    consumeTypeArgumentList2();  
+			break;
+ 
+    case 783 : if (DEBUG) { System.out.println("ReferenceType2 ::= ReferenceType RIGHT_SHIFT"); }  //$NON-NLS-1$
+		    consumeReferenceType2();  
+			break;
+ 
+    case 784 : if (DEBUG) { System.out.println("ReferenceType2 ::= ClassOrInterface LESS..."); }  //$NON-NLS-1$
+		    consumeTypeArgumentReferenceType2();  
+			break;
+ 
+    case 786 : if (DEBUG) { System.out.println("TypeArgumentList3 ::= TypeArgumentList COMMA..."); }  //$NON-NLS-1$
+		    consumeTypeArgumentList3();  
+			break;
+ 
+    case 789 : if (DEBUG) { System.out.println("ReferenceType3 ::= ReferenceType UNSIGNED_RIGHT_SHIFT"); }  //$NON-NLS-1$
+		    consumeReferenceType3();  
+			break;
+ 
+    case 790 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION"); }  //$NON-NLS-1$
+		    consumeWildcard();  
+			break;
+ 
+    case 791 : if (DEBUG) { System.out.println("Wildcard ::= TypeAnnotationsopt QUESTION WildcardBounds"); }  //$NON-NLS-1$
+		    consumeWildcardWithBounds();  
+			break;
+ 
+    case 792 : if (DEBUG) { System.out.println("WildcardBounds ::= extends ReferenceType"); }  //$NON-NLS-1$
+		    consumeWildcardBoundsExtends();  
+			break;
+ 
+    case 793 : if (DEBUG) { System.out.println("WildcardBounds ::= super ReferenceType"); }  //$NON-NLS-1$
+		    consumeWildcardBoundsSuper();  
+			break;
+ 
+    case 794 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION GREATER"); }  //$NON-NLS-1$
+		    consumeWildcard1();  
+			break;
+ 
+    case 795 : if (DEBUG) { System.out.println("Wildcard1 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+		    consumeWildcard1WithBounds();  
+			break;
+ 
+    case 796 : if (DEBUG) { System.out.println("WildcardBounds1 ::= extends ReferenceType1"); }  //$NON-NLS-1$
+		    consumeWildcardBounds1Extends();  
+			break;
+ 
+    case 797 : if (DEBUG) { System.out.println("WildcardBounds1 ::= super ReferenceType1"); }  //$NON-NLS-1$
+		    consumeWildcardBounds1Super();  
+			break;
+ 
+    case 798 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION RIGHT_SHIFT"); }  //$NON-NLS-1$
+		    consumeWildcard2();  
+			break;
+ 
+    case 799 : if (DEBUG) { System.out.println("Wildcard2 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+		    consumeWildcard2WithBounds();  
+			break;
+ 
+    case 800 : if (DEBUG) { System.out.println("WildcardBounds2 ::= extends ReferenceType2"); }  //$NON-NLS-1$
+		    consumeWildcardBounds2Extends();  
+			break;
+ 
+    case 801 : if (DEBUG) { System.out.println("WildcardBounds2 ::= super ReferenceType2"); }  //$NON-NLS-1$
+		    consumeWildcardBounds2Super();  
+			break;
+ 
+    case 802 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+		    consumeWildcard3();  
+			break;
+ 
+    case 803 : if (DEBUG) { System.out.println("Wildcard3 ::= TypeAnnotationsopt QUESTION..."); }  //$NON-NLS-1$
+		    consumeWildcard3WithBounds();  
+			break;
+ 
+    case 804 : if (DEBUG) { System.out.println("WildcardBounds3 ::= extends ReferenceType3"); }  //$NON-NLS-1$
+		    consumeWildcardBounds3Extends();  
+			break;
+ 
+    case 805 : if (DEBUG) { System.out.println("WildcardBounds3 ::= super ReferenceType3"); }  //$NON-NLS-1$
+		    consumeWildcardBounds3Super();  
+			break;
+ 
+    case 806 : if (DEBUG) { System.out.println("TypeParameterHeader ::= TypeAnnotationsopt Identifier"); }  //$NON-NLS-1$
+		    consumeTypeParameterHeader();  
+			break;
+ 
+    case 807 : if (DEBUG) { System.out.println("TypeParameters ::= LESS TypeParameterList1"); }  //$NON-NLS-1$
+		    consumeTypeParameters();  
+			break;
+ 
+    case 809 : if (DEBUG) { System.out.println("TypeParameterList ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
+		    consumeTypeParameterList();  
+			break;
+ 
+    case 811 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+		    consumeTypeParameterWithExtends();  
+			break;
+ 
+    case 812 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+		    consumeTypeParameterWithExtendsAndBounds();  
+			break;
+ 
+    case 813 : if (DEBUG) { System.out.println("TypeParameter ::= TypeParameterHeader base ReferenceType"); }  //$NON-NLS-1$
+		    consumeTypeParameterWithBase();  
+			break;
+ 
+    case 817 : if (DEBUG) { System.out.println("TypeValueParameter ::= TypeParameterHeader Identifier"); }  //$NON-NLS-1$
+		    consumeTypeValueParameter();  
+			break;
+ 
+    case 822 : if (DEBUG) { System.out.println("TypeBoundOpt ::= extends ReferenceType"); }  //$NON-NLS-1$
+		    consumeBoundsOfAnchoredTypeParameter();  
+			break;
+ 
+    case 824 : if (DEBUG) { System.out.println("TypeBoundOpt1 ::= extends ReferenceType1"); }  //$NON-NLS-1$
+		    consumeBoundsOfAnchoredTypeParameter();  
+			break;
+ 
+    case 825 : if (DEBUG) { System.out.println("AnchoredTypeParameterHeader0 ::= TypeParameterHeader..."); }  //$NON-NLS-1$
+		    consumeAnchoredTypeParameter();  
+			break;
+ 
+    case 827 : if (DEBUG) { System.out.println("AdditionalBoundList ::= AdditionalBoundList..."); }  //$NON-NLS-1$
+		    consumeAdditionalBoundList();  
+			break;
+ 
+    case 828 : if (DEBUG) { System.out.println("AdditionalBound ::= AND ReferenceType"); }  //$NON-NLS-1$
+		    consumeAdditionalBound();  
+			break;
+ 
+    case 830 : if (DEBUG) { System.out.println("TypeParameterList1 ::= TypeParameterList COMMA..."); }  //$NON-NLS-1$
+		    consumeTypeParameterList1();  
+			break;
+ 
+    case 831 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader GREATER"); }  //$NON-NLS-1$
+		    consumeTypeParameter1();  
+			break;
+ 
+    case 832 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+		    consumeTypeParameter1WithExtends();  
+			break;
+ 
+    case 833 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader base..."); }  //$NON-NLS-1$
+		    consumeTypeParameter1WithBase();  
+			break;
+ 
+    case 834 : if (DEBUG) { System.out.println("TypeParameter1 ::= TypeParameterHeader extends..."); }  //$NON-NLS-1$
+		    consumeTypeParameter1WithExtendsAndBounds();  
+			break;
+ 
+    case 836 : if (DEBUG) { System.out.println("AdditionalBoundList1 ::= AdditionalBoundList..."); }  //$NON-NLS-1$
+		    consumeAdditionalBoundList1();  
+			break;
+ 
+    case 837 : if (DEBUG) { System.out.println("AdditionalBound1 ::= AND ReferenceType1"); }  //$NON-NLS-1$
+		    consumeAdditionalBound1();  
+			break;
+ 
+    case 843 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= PLUS PushPosition..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.PLUS);  
+			break;
+ 
+    case 844 : if (DEBUG) { System.out.println("UnaryExpression_NotName ::= MINUS PushPosition..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.MINUS);  
+			break;
+ 
+    case 847 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= TWIDDLE..."); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.TWIDDLE);  
+			break;
+ 
+    case 848 : if (DEBUG) { System.out.println("UnaryExpressionNotPlusMinus_NotName ::= NOT PushPosition"); }  //$NON-NLS-1$
+		    consumeUnaryExpression(OperatorIds.NOT);  
+			break;
+ 
+    case 851 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.MULTIPLY);  
+			break;
+ 
+    case 852 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name MULTIPLY..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.MULTIPLY);  
+			break;
+ 
+    case 853 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.DIVIDE);  
+			break;
+ 
+    case 854 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name DIVIDE..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.DIVIDE);  
+			break;
+ 
+    case 855 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.REMAINDER);  
+			break;
+ 
+    case 856 : if (DEBUG) { System.out.println("MultiplicativeExpression_NotName ::= Name REMAINDER..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.REMAINDER);  
+			break;
+ 
+    case 858 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.PLUS);  
+			break;
+ 
+    case 859 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name PLUS..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.PLUS);  
+			break;
+ 
+    case 860 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.MINUS);  
+			break;
+ 
+    case 861 : if (DEBUG) { System.out.println("AdditiveExpression_NotName ::= Name MINUS..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.MINUS);  
+			break;
+ 
+    case 863 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.LEFT_SHIFT);  
+			break;
+ 
+    case 864 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name LEFT_SHIFT..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.LEFT_SHIFT);  
+			break;
+ 
+    case 865 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.RIGHT_SHIFT);  
+			break;
+ 
+    case 866 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name RIGHT_SHIFT..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.RIGHT_SHIFT);  
+			break;
+ 
+    case 867 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= ShiftExpression_NotName..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.UNSIGNED_RIGHT_SHIFT);  
+			break;
+ 
+    case 868 : if (DEBUG) { System.out.println("ShiftExpression_NotName ::= Name UNSIGNED_RIGHT_SHIFT..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.UNSIGNED_RIGHT_SHIFT);  
+			break;
+ 
+    case 870 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.LESS);  
+			break;
+ 
+    case 871 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.LESS);  
+			break;
+ 
+    case 872 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= ShiftExpression_NotName"); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.GREATER);  
+			break;
+ 
+    case 873 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.GREATER);  
+			break;
+ 
+    case 874 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.LESS_EQUAL);  
+			break;
+ 
+    case 875 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name LESS_EQUAL..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.LESS_EQUAL);  
+			break;
+ 
+    case 876 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.GREATER_EQUAL);  
+			break;
+ 
+    case 877 : if (DEBUG) { System.out.println("RelationalExpression_NotName ::= Name GREATER_EQUAL..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.GREATER_EQUAL);  
+			break;
+ 
+    case 879 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::= Name instanceof..."); }  //$NON-NLS-1$
+		    consumeInstanceOfExpressionWithName();  
+			break;
+ 
+    case 880 : if (DEBUG) { System.out.println("InstanceofExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeInstanceOfExpression();  
+			break;
+ 
+    case 882 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeEqualityExpression(OperatorIds.EQUAL_EQUAL);  
+			break;
+ 
+    case 883 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name EQUAL_EQUAL..."); }  //$NON-NLS-1$
+		    consumeEqualityExpressionWithName(OperatorIds.EQUAL_EQUAL);  
+			break;
+ 
+    case 884 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeEqualityExpression(OperatorIds.NOT_EQUAL);  
+			break;
+ 
+    case 885 : if (DEBUG) { System.out.println("EqualityExpression_NotName ::= Name NOT_EQUAL..."); }  //$NON-NLS-1$
+		    consumeEqualityExpressionWithName(OperatorIds.NOT_EQUAL);  
+			break;
+ 
+    case 887 : if (DEBUG) { System.out.println("AndExpression_NotName ::= AndExpression_NotName AND..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.AND);  
+			break;
+ 
+    case 888 : if (DEBUG) { System.out.println("AndExpression_NotName ::= Name AND EqualityExpression"); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.AND);  
+			break;
+ 
+    case 890 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.XOR);  
+			break;
+ 
+    case 891 : if (DEBUG) { System.out.println("ExclusiveOrExpression_NotName ::= Name XOR AndExpression"); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.XOR);  
+			break;
+ 
+    case 893 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.OR);  
+			break;
+ 
+    case 894 : if (DEBUG) { System.out.println("InclusiveOrExpression_NotName ::= Name OR..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.OR);  
+			break;
+ 
+    case 896 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.AND_AND);  
+			break;
+ 
+    case 897 : if (DEBUG) { System.out.println("ConditionalAndExpression_NotName ::= Name AND_AND..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.AND_AND);  
+			break;
+ 
+    case 899 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeBinaryExpression(OperatorIds.OR_OR);  
+			break;
+ 
+    case 900 : if (DEBUG) { System.out.println("ConditionalOrExpression_NotName ::= Name OR_OR..."); }  //$NON-NLS-1$
+		    consumeBinaryExpressionWithName(OperatorIds.OR_OR);  
+			break;
+ 
+    case 902 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::=..."); }  //$NON-NLS-1$
+		    consumeConditionalExpression(OperatorIds.QUESTIONCOLON) ;  
+			break;
+ 
+    case 903 : if (DEBUG) { System.out.println("ConditionalExpression_NotName ::= Name QUESTION..."); }  //$NON-NLS-1$
+		    consumeConditionalExpressionWithName(OperatorIds.QUESTIONCOLON) ;  
+			break;
+ 
+    case 907 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeDeclarationHeaderName() ;  
+			break;
+ 
+    case 908 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= Modifiers AT..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;  
+			break;
+ 
+    case 909 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() ;  
+			break;
+ 
+    case 910 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeaderName ::= AT..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeDeclarationHeaderName() ;  
+			break;
+ 
+    case 911 : if (DEBUG) { System.out.println("AnnotationTypeDeclarationHeader ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeDeclarationHeader() ;  
+			break;
+ 
+    case 912 : if (DEBUG) { System.out.println("AnnotationTypeDeclaration ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeDeclaration() ;  
+			break;
+ 
+    case 914 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyAnnotationTypeMemberDeclarationsopt() ;  
+			break;
+ 
+    case 915 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarationsopt ::= NestedType..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeMemberDeclarationsopt() ;  
+			break;
+ 
+    case 917 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclarations ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeMemberDeclarations() ;  
+			break;
+ 
+    case 918 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt..."); }  //$NON-NLS-1$
+		    consumeMethodHeaderNameWithTypeParameters(true);  
+			break;
+ 
+    case 919 : if (DEBUG) { System.out.println("AnnotationMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+		    consumeMethodHeaderName(true);  
+			break;
+ 
+    case 920 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyMethodHeaderDefaultValue() ;  
+			break;
+ 
+    case 921 : if (DEBUG) { System.out.println("AnnotationMethodHeaderDefaultValueopt ::= DefaultValue"); }  //$NON-NLS-1$
+		    consumeMethodHeaderDefaultValue();  
+			break;
+ 
+    case 922 : if (DEBUG) { System.out.println("AnnotationMethodHeader ::= AnnotationMethodHeaderName..."); }  //$NON-NLS-1$
+		    consumeMethodHeader();  
+			break;
+ 
+    case 923 : if (DEBUG) { System.out.println("AnnotationTypeMemberDeclaration ::=..."); }  //$NON-NLS-1$
+		    consumeAnnotationTypeMemberDeclaration() ;  
+			break;
+ 
+    case 931 : if (DEBUG) { System.out.println("AnnotationName ::= AT UnannotatableName"); }  //$NON-NLS-1$
+		    consumeAnnotationName() ;  
+			break;
+ 
+    case 932 : if (DEBUG) { System.out.println("NormalAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
+		    consumeNormalAnnotation(false) ;  
+			break;
+ 
+    case 933 : if (DEBUG) { System.out.println("MemberValuePairsopt ::="); }  //$NON-NLS-1$
+		    consumeEmptyMemberValuePairsopt() ;  
+			break;
+ 
+    case 936 : if (DEBUG) { System.out.println("MemberValuePairs ::= MemberValuePairs COMMA..."); }  //$NON-NLS-1$
+		    consumeMemberValuePairs() ;  
+			break;
+ 
+    case 937 : if (DEBUG) { System.out.println("MemberValuePair ::= SimpleName EQUAL EnterMemberValue..."); }  //$NON-NLS-1$
+		    consumeMemberValuePair() ;  
+			break;
+ 
+    case 938 : if (DEBUG) { System.out.println("EnterMemberValue ::="); }  //$NON-NLS-1$
+		    consumeEnterMemberValue() ;  
+			break;
+ 
+    case 939 : if (DEBUG) { System.out.println("ExitMemberValue ::="); }  //$NON-NLS-1$
+		    consumeExitMemberValue() ;  
+			break;
+ 
+    case 941 : if (DEBUG) { System.out.println("MemberValue ::= Name"); }  //$NON-NLS-1$
+		    consumeMemberValueAsName() ;  
+			break;
+ 
+    case 944 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+		    consumeMemberValueArrayInitializer() ;  
+			break;
+ 
+    case 945 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+		    consumeMemberValueArrayInitializer() ;  
+			break;
+ 
+    case 946 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+		    consumeEmptyMemberValueArrayInitializer() ;  
+			break;
+ 
+    case 947 : if (DEBUG) { System.out.println("MemberValueArrayInitializer ::=..."); }  //$NON-NLS-1$
+		    consumeEmptyMemberValueArrayInitializer() ;  
+			break;
+ 
+    case 948 : if (DEBUG) { System.out.println("EnterMemberValueArrayInitializer ::="); }  //$NON-NLS-1$
+		    consumeEnterMemberValueArrayInitializer() ;  
+			break;
+ 
+    case 950 : if (DEBUG) { System.out.println("MemberValues ::= MemberValues COMMA MemberValue"); }  //$NON-NLS-1$
+		    consumeMemberValues() ;  
+			break;
+ 
+    case 951 : if (DEBUG) { System.out.println("MarkerAnnotation ::= AnnotationName"); }  //$NON-NLS-1$
+		    consumeMarkerAnnotation(false) ;  
+			break;
+ 
+    case 952 : if (DEBUG) { System.out.println("SingleMemberAnnotationMemberValue ::= MemberValue"); }  //$NON-NLS-1$
+		    consumeSingleMemberAnnotationMemberValue() ;  
+			break;
+ 
+    case 953 : if (DEBUG) { System.out.println("SingleMemberAnnotation ::= AnnotationName LPAREN..."); }  //$NON-NLS-1$
+		    consumeSingleMemberAnnotation(false) ;  
+			break;
+ 
+    case 954 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt TypeParameters"); }  //$NON-NLS-1$
+		    consumeRecoveryMethodHeaderNameWithTypeParameters();  
+			break;
+ 
+    case 955 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= Modifiersopt Type..."); }  //$NON-NLS-1$
+		    consumeRecoveryMethodHeaderName();  
+			break;
+ 
+    case 956 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault..."); }  //$NON-NLS-1$
+		    consumeRecoveryMethodHeaderNameWithTypeParameters();  
+			break;
+ 
+    case 957 : if (DEBUG) { System.out.println("RecoveryMethodHeaderName ::= ModifiersWithDefault Type"); }  //$NON-NLS-1$
+		    consumeRecoveryMethodHeaderName();  
+			break;
+ 
+    case 958 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
+		    consumeMethodHeader();  
+			break;
+ 
+    case 959 : if (DEBUG) { System.out.println("RecoveryMethodHeader ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
+		    consumeMethodHeader();  
+			break;
+ 
+    case 962 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= RecoveryCallinBindingLeftLong"); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 963 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 964 : if (DEBUG) { System.out.println("RecoveryCallinBindingLeftLong ::= RecoveryMethodSpecLong"); }  //$NON-NLS-1$
+		    consumeCallinBindingLeft(true);  
+			break;
+ 
+    case 965 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt..."); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 966 : if (DEBUG) { System.out.println("RecoveryCallinHeader ::= Modifiersopt CallinLabel..."); }  //$NON-NLS-1$
+		    consumeCallinHeader();  
+			break;
+ 
+    case 967 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::= RecoveryCalloutBindingLeftLong"); }  //$NON-NLS-1$
 		    consumeCalloutHeader();  
 			break;
  
-    case 887 : if (DEBUG) { System.out.println("RecoveryMethodSpecLong ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
+    case 968 : if (DEBUG) { System.out.println("RecoveryCalloutBindingLeftLong ::=..."); }  //$NON-NLS-1$
+		    consumeCalloutBindingLeft(true);  
+			break;
+ 
+    case 969 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::= RecoveryCalloutBindingLeftLong"); }  //$NON-NLS-1$
+		    consumeCalloutHeader();  
+			break;
+ 
+    case 970 : if (DEBUG) { System.out.println("RecoveryCalloutHeader ::= Modifiersopt..."); }  //$NON-NLS-1$
+		    consumeCalloutHeader();  
+			break;
+ 
+    case 971 : if (DEBUG) { System.out.println("RecoveryMethodSpecLong ::= RecoveryMethodHeaderName..."); }  //$NON-NLS-1$
 		    consumeMethodSpecLong(false);  
 			break;
  
 	}
 }
+protected void consumeVariableDeclaratorIdParameter () {
+	pushOnIntStack(1);  // signal "normal" variable declarator id parameter.
+}
+protected void consumeExplicitThisParameter(boolean isQualified) {
+	// VariableDeclaratorIdOrThis ::= 'this'
+	// VariableDeclaratorIdOrThis ::= UnannotatableName '.' 'this'
+	// VariableDeclaratorIdOrThis ::= VariableDeclaratorId
+
+	NameReference qualifyingNameReference = null;
+	if (isQualified) {
+		qualifyingNameReference = getUnspecifiedReference(false); // By construction the qualified name is unannotated here, so we should not meddle with the type annotation stack
+	}
+	pushOnExpressionStack(qualifyingNameReference);
+	int thisStart = this.intStack[this.intPtr--];
+	pushIdentifier(ConstantPool.This, (((long) thisStart << 32)) + (thisStart + 3));
+	pushOnIntStack(0);  // extended dimensions ...
+	pushOnIntStack(0);  // signal explicit this
+}
+protected void consumeLambdaExpression() {
+	
+	// LambdaExpression ::= LambdaParameters '->' LambdaBody
+
+//{ObjectTeams: pop two ints pushed in consumeToken(ARROW) (aka TokenNameBINDOUT)
+	this.intPtr -= 2;
+// SH}
+
+	this.astLengthPtr--; 	// pop length for LambdaBody (always 1)
+	Statement body = (Statement) this.astStack[this.astPtr--];
+	if (body instanceof Block) {
+		this.nestedType--; 	// matching NestedType in "LambdaBody ::= NestedType NestedMethod  '{' BlockStatementsopt '}'"
+		this.intPtr--; 		// position after '{' pushed during consumeNestedMethod()
+		if (this.options.ignoreMethodBodies) {
+			body = new Block(0);
+		}
+	}
+	Argument [] arguments = null;
+	int length = this.astLengthStack[this.astLengthPtr--];
+	this.astPtr -= length;
+	//arguments
+	if (length != 0) {
+		System.arraycopy(
+			this.astStack,
+			this.astPtr + 1,
+			arguments = new Argument[length],
+			0,
+			length);
+	}
+	for (int i = 0; i < length; i++) {
+		if (arguments[i].isReceiver()) {
+			problemReporter().illegalThis(arguments[i]);
+		}
+	}
+	LambdaExpression lexp = new LambdaExpression(this.compilationUnit.compilationResult, arguments, body);
+	this.intPtr--;  // ')' position, discard for now.
+	lexp.sourceStart = this.intStack[this.intPtr--]; // '(' position or identifier position.
+	lexp.sourceEnd = body.sourceEnd;
+	lexp.hasParentheses = (this.scanner.getSource()[lexp.sourceStart] == '(');
+	if (body instanceof Expression) {
+		Expression expression = (Expression) body;
+		expression.statementEnd = body.sourceEnd;
+	}
+	pushOnExpressionStack(lexp);
+	if (!this.parsingJava8Plus) {
+		problemReporter().lambdaExpressionsNotBelow18(lexp);
+	}
+	this.listLength = 0; // reset this.listLength after having read all parameters
+}
+
+protected void consumeTypeElidedLambdaParameter(boolean parenthesized) {
+
+	// LambdaParameters ::= Identifier
+	// TypeElidedFormalParameter ::= Modifiersopt Identifier
+	
+	int modifier = ClassFileConstants.AccDefault;
+	int annotationLength = 0;
+	int modifiersStart = 0;
+	if (parenthesized) { // The grammar is permissive enough to allow optional modifiers for the parenthesized version, they should be rejected if present. 
+		modifiersStart = this.intStack[this.intPtr--];
+		modifier = this.intStack[this.intPtr--];
+		// pop annotations
+		annotationLength = this.expressionLengthStack[this.expressionLengthPtr--];
+		this.expressionPtr -= annotationLength;
+	}
+	
+	this.identifierLengthPtr--;
+	char[] identifierName = this.identifierStack[this.identifierPtr];
+	long namePositions = this.identifierPositionStack[this.identifierPtr--];
+
+	Argument arg =
+		new Argument(
+			identifierName,
+			namePositions,
+			null, // elided type
+			ClassFileConstants.AccDefault,
+			true);
+	arg.declarationSourceStart = (int) (namePositions >>> 32);
+	if (modifier != ClassFileConstants.AccDefault || annotationLength != 0) {
+		problemReporter().illegalModifiersForElidedType(arg);
+		arg.declarationSourceStart = modifiersStart;
+	} 
+	pushOnAstStack(arg);
+	if (!parenthesized) { // in the absence of '(' and ')', record positions.
+		pushOnIntStack(arg.declarationSourceStart);
+		pushOnIntStack(arg.declarationSourceEnd);
+	}
+	/* if incomplete method header, this.listLength counter will not have been reset,
+		indicating that some arguments are available on the stack */
+	this.listLength++;
+}
+protected void consumeElidedLeftBraceAndReturn() {
+	/* ElidedLeftBraceAndReturn ::= $empty
+	   Alert ! Sleight of hand - Part I : Record stack depth now that we are at the state with the kernel item
+	   ElidedLeftBraceAndReturn .Expression ElidedSemicolonAndRightBrace
+	*/
+	int stackLength = this.stateStackLengthStack.length;
+	if (++this.valueLambdaNestDepth >= stackLength) {
+		System.arraycopy(
+			this.stateStackLengthStack, 0,
+			this.stateStackLengthStack = new int[stackLength + 4], 0,
+			stackLength);
+	}
+	this.stateStackLengthStack[this.valueLambdaNestDepth] = this.stateStackTop;  
+}
+protected void consumeExpression() {
+	/* Expression ::= AssignmentExpression
+	   Alert ! Sleight of hand - Part II: See if we are at the state with the item: "ElidedLeftBraceAndReturn Expression .ElidedSemicolonAndRightBrace"
+       If so, push back the current token into the lexer stream, materialize the synthetic terminal marker symbol, switch and continue.
+    */   
+	if (this.valueLambdaNestDepth >= 0 && this.stateStackLengthStack[this.valueLambdaNestDepth] == this.stateStackTop - 1) {
+		this.valueLambdaNestDepth--;
+		this.scanner.ungetToken(this.currentToken);
+		this.currentToken = TokenNameElidedSemicolonAndRightBrace; // conjure a rabbit out of the hat ...
+		Expression exp = this.expressionStack[this.expressionPtr--];
+		this.expressionLengthPtr--;
+		pushOnAstStack(exp);
+	}
+}
+protected void consumeIdentifierOrNew(boolean newForm) {
+	// IdentifierOrNew ::= 'Identifier'
+	// IdentifierOrNew ::= 'new'
+	if (newForm) {
+		int newStart = this.intStack[this.intPtr--];
+		pushIdentifier(ConstantPool.Init, (((long) newStart << 32)) + (newStart + 2));
+	}
+}
+protected void consumeEmptyTypeArguments() {
+	// NonWildTypeArgumentsopt ::= $empty
+	pushOnGenericsLengthStack(0); // signal absence of type arguments.
+}
+protected void consumeReferenceExpressionTypeForm(boolean isPrimitive) { // actually Name or Type form.
+	
+	// ReferenceExpression ::= PrimitiveType Dims '::' NonWildTypeArgumentsopt IdentifierOrNew
+	// ReferenceExpression ::= Name Dimsopt '::' NonWildTypeArgumentsopt IdentifierOrNew
+
+	ReferenceExpression referenceExpression;
+	TypeReference [] typeArguments = null;
+	char [] selector;
+	int sourceEnd;
+
+	sourceEnd = (int) this.identifierPositionStack[this.identifierPtr];
+	selector = this.identifierStack[this.identifierPtr--];
+	this.identifierLengthPtr--;
+	
+	int length = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (length > 0) {
+		this.genericsPtr -= length;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
+		this.intPtr--;  // pop type arguments source start.
+	}
+	
+	int dimension = this.intStack[this.intPtr--];
+	boolean typeAnnotatedName = false;
+	for (int i = this.identifierLengthStack[this.identifierLengthPtr], j = 0; i > 0 && this.typeAnnotationLengthPtr >= 0; --i, j++) {
+		length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr - j];
+		if (length != 0) {
+			typeAnnotatedName = true;
+			break;
+		}
+	}
+	
+	if (dimension > 0 || typeAnnotatedName) {
+		if (!isPrimitive) {
+			pushOnGenericsLengthStack(0);
+			pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+		}
+		referenceExpression = new ReferenceExpression(this.compilationUnit.compilationResult, getTypeReference(dimension), typeArguments, selector, sourceEnd);
+	} else {
+		referenceExpression = new ReferenceExpression(this.compilationUnit.compilationResult, getUnspecifiedReference(), typeArguments, selector, sourceEnd);
+	}
+	pushOnExpressionStack(referenceExpression);
+
+	if (!this.parsingJava8Plus) {
+		problemReporter().referenceExpressionsNotBelow18(referenceExpression);
+	}
+}
+protected void consumeReferenceExpressionPrimaryForm() {
+	// ReferenceExpression ::= Primary '::' NonWildTypeArgumentsopt Identifier
+
+	ReferenceExpression referenceExpression;
+	TypeReference [] typeArguments = null;
+	char [] selector;
+	int sourceEnd;
+
+	sourceEnd = (int) this.identifierPositionStack[this.identifierPtr];
+	selector = this.identifierStack[this.identifierPtr--];
+	this.identifierLengthPtr--;
+
+	int length = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (length > 0) {
+		this.genericsPtr -= length;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
+		this.intPtr--;  // pop type arguments source start.
+	}
+	
+	Expression primary = this.expressionStack[this.expressionPtr--];
+	this.expressionLengthPtr--;
+	referenceExpression = new ReferenceExpression(this.compilationUnit.compilationResult, primary, typeArguments, selector, sourceEnd);
+	pushOnExpressionStack(referenceExpression);
+	if (!this.parsingJava8Plus) {
+		problemReporter().referenceExpressionsNotBelow18(referenceExpression);
+	}
+}
+protected void consumeReferenceExpressionSuperForm() {
+	// ReferenceExpression ::= 'super' '::' NonWildTypeArgumentsopt Identifier
+
+	ReferenceExpression referenceExpression;
+	TypeReference [] typeArguments = null;
+	char [] selector;
+	int sourceEnd;
+
+	sourceEnd = (int) this.identifierPositionStack[this.identifierPtr];
+	selector = this.identifierStack[this.identifierPtr--];
+	this.identifierLengthPtr--;
+
+	int length = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (length > 0) {
+		this.genericsPtr -= length;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
+		this.intPtr--;  // pop type arguments source start.
+	}
+	
+	SuperReference superReference = new SuperReference(this.intStack[this.intPtr--], this.endPosition);
+	referenceExpression = new ReferenceExpression(this.compilationUnit.compilationResult, superReference, typeArguments, selector, sourceEnd);
+	pushOnExpressionStack(referenceExpression);
+	if (!this.parsingJava8Plus) {
+		problemReporter().referenceExpressionsNotBelow18(referenceExpression);
+	}
+}
+protected void consumeReferenceExpressionTypeArgumentsAndTrunk(boolean qualified) {
+	// ReferenceExpressionTypeArgumentsAndTrunk ::= OnlyTypeArguments Dimsopt ==> qualified == false
+	// ReferenceExpressionTypeArgumentsAndTrunk ::= OnlyTypeArguments '.' ClassOrInterfaceType Dimsopt ==> qualified == true
+	pushOnIntStack(qualified ? 1 : 0);
+	pushOnIntStack(this.scanner.startPosition - 1); // mark position of :: as the end of type
+}
+protected void consumeReferenceExpressionGenericTypeForm() {
+
+	// ReferenceExpression ::= Name BeginTypeArguments ReferenceExpressionTypeArgumentsAndTrunk '::' NonWildTypeArgumentsopt IdentifierOrNew
+	
+	ReferenceExpression referenceExpression;
+	TypeReference type;
+	TypeReference [] typeArguments = null;
+	char [] selector;
+	int sourceEnd;
+
+	sourceEnd = (int) this.identifierPositionStack[this.identifierPtr];
+	selector = this.identifierStack[this.identifierPtr--];
+	this.identifierLengthPtr--;
+
+	int length = this.genericsLengthStack[this.genericsLengthPtr--];
+	if (length > 0) {
+		this.genericsPtr -= length;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments = new TypeReference[length], 0, length);
+		this.intPtr--;  // pop type arguments source start.
+	}
+	
+	int typeSourceEnd = this.intStack[this.intPtr--];
+	boolean qualified = this.intStack[this.intPtr--] != 0;
+	int dims = this.intStack[this.intPtr--];
+	if (qualified) {
+		Annotation [][] annotationsOnDimensions = dims == 0 ? null : getAnnotationsOnDimensions(dims);
+		TypeReference rightSide = getTypeReference(0);
+		type = computeQualifiedGenericsFromRightSide(rightSide, dims, annotationsOnDimensions);
+	} else {		
+		pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
+		type = getTypeReference(dims);
+	}
+	this.intPtr--; // pop '<' position
+	type.sourceEnd = typeSourceEnd;
+	
+	referenceExpression = new ReferenceExpression(this.compilationUnit.compilationResult, type, typeArguments, selector, sourceEnd);
+
+	pushOnExpressionStack(referenceExpression);
+	if (!this.parsingJava8Plus) {
+		problemReporter().referenceExpressionsNotBelow18(referenceExpression);
+	}
+}
 protected void consumeEnterInstanceCreationArgumentList() {
-    this.shouldDeferRecovery = true;
+	this.shouldDeferRecovery = true;
 }
 protected void consumeSimpleAssertStatement() {
 	// AssertStatement ::= 'assert' Expression ';'
 	this.expressionLengthPtr--;
 	pushOnAstStack(new AssertStatement(this.expressionStack[this.expressionPtr--], this.intStack[this.intPtr--]));
 }
-protected void consumeSingleMemberAnnotation() {
-	// SingleMemberAnnotation ::= '@' Name '(' MemberValue ')'
+protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
+	// SingleMemberTypeAnnotation ::= TypeAnnotationName '(' SingleMemberAnnotationMemberValue ')'
+	// SingleMemberAnnotation ::= AnnotationName '(' SingleMemberAnnotationMemberValue ')'
 	SingleMemberAnnotation singleMemberAnnotation = null;
 
 	int oldIndex = this.identifierPtr;
@@ -9197,8 +10244,12 @@
 	singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
 	this.expressionLengthPtr--;
 	singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
-	pushOnExpressionStack(singleMemberAnnotation);
-
+	
+	if (isTypeAnnotation) {
+		pushOnTypeAnnotationStack(singleMemberAnnotation);
+	} else {
+		pushOnExpressionStack(singleMemberAnnotation);
+	}
 
 	if(this.currentElement != null) {
 		annotationRecoveryCheckPoint(singleMemberAnnotation.sourceStart, singleMemberAnnotation.declarationSourceEnd);
@@ -9228,7 +10279,7 @@
 	// Resources ::= Resource
 }
 protected void consumeSingleStaticImportDeclarationName() {
-	// SingleTypeImportDeclarationName ::= 'import' 'static' Name
+	// SingleTypeImportDeclarationName ::= 'import' Name RejectTypeAnnotations
 	/* push an ImportRef build from the last name
 	stored in the identifier stack. */
 
@@ -9688,7 +10739,7 @@
 			this.endStatementPosition);
 }
 protected void consumeStaticImportOnDemandDeclarationName() {
-	// TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
+	// StaticImportOnDemandDeclarationName ::= 'import' 'static' Name '.' RejectTypeAnnotations '*'
 	/* push an ImportRef build from the last name
 	stored in the identifier stack. */
 
@@ -10118,7 +11169,14 @@
 		case TokenNameLPAREN :
 			this.lParenPos = this.scanner.startPosition;
 			break;
+		case TokenNameAT308:
+			pushOnIntStack(this.dimensions); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=417660: Stack the dimensions, they get unstacked in consumeTypeAnnotation.
+			this.dimensions = 0;
+			//$FALL-THROUGH$
 		case TokenNameAT :
+//{ObjectTeams: 3rd variant of '@':
+		case TokenNameATOT:
+// SH}
 			pushOnIntStack(this.scanner.startPosition);
 			break;
 		case TokenNameQUESTION  :
@@ -10211,69 +11269,157 @@
 	       && CharOperation.equals(this.compilationUnit.currentPackage.tokens, IOTConstants.ORG_OBJECTTEAMS);
 }
 // SH}
-protected void consumeTypeArgument() {
-	pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--]));
-}
-protected void consumeTypeArgumentList() {
-	concatGenericsLists();
-}
-protected void consumeTypeArgumentList1() {
-	concatGenericsLists();
-}
-protected void consumeTypeArgumentList2() {
-	concatGenericsLists();
-}
-protected void consumeTypeArgumentList3() {
-	concatGenericsLists();
-}
-protected void consumeTypeArgumentReferenceType1() {
-	concatGenericsLists();
-	pushOnGenericsStack(getTypeReference(0));
-	this.intPtr--;
-}
-protected void consumeTypeArgumentReferenceType2() {
-	concatGenericsLists();
-	pushOnGenericsStack(getTypeReference(0));
-	this.intPtr--;
-}
-protected void consumeTypeArguments() {
-	concatGenericsLists();
-	this.intPtr--;
-
-	if(!this.statementRecoveryActivated &&
-			this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
-			this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
-		int length = this.genericsLengthStack[this.genericsLengthPtr];
-		problemReporter().invalidUsageOfTypeArguments(
-			(TypeReference)this.genericsStack[this.genericsPtr - length + 1],
-			(TypeReference)this.genericsStack[this.genericsPtr]);
-	}
-}
 //{ObjectTeams: new syntax for dependent types.
 protected void consumeTypeAnchor(boolean haveBase) {
-	// TypeArgument  ::= '@' Name
-	// TypeArgument  ::= '@' 'base'
-	// TypeArgument1 ::= '@' Name
-	// TypeArgument1 ::= '@' 'base'
+	// TentativeTypeAnchor ::= '@OT' UnannotatableName
+	// TypeAnchor ::= '@OT' 'base'
+	//   where '@OT' is the synthetic token returned by the parser when a '@' is in a position suitable for a type anchor
 
+	// see also skipThisAnchor() and consumeQualifiedBaseTypeAnchor() for related productions
+	
 	NameReference anchor = haveBase ?
 		  newBaseReference()
-		: getUnspecifiedReference();
+		: getUnspecifiedReference(false);
 	pushOnGenericsStack(new TypeAnchorReference(anchor, this.intStack[this.intPtr--]));
+	// anchor has no type annotations, yet it will be consumed in a context where type annotations are possible
+	pushOnTypeAnnotationLengthStack(0);
+}
+// this sentinel annotation is pushed below a type annotation that was converted from a type anchor.
+// it signals to a subsequent type annotation that it shall be merged into the existing list
+static final Annotation annotationSentinel = new MarkerAnnotation(new SingleTypeReference("annotationSentinel".toCharArray(), 0), 0); //$NON-NLS-1$
+protected void convertTypeAnchor(int annotationKind) {
+	// rule number corresponds to argument annotationKind:
+	// (0) NotAnAnchor ::= $empty
+	// (1) NotAnAnchor -> '(' SingleMemberAnnotationMemberValue ')'
+	// (2) NotAnAnchor -> '(' MemberValuePairsopt ')'
+	//   this set of rules is inserted between
+	//   - what could have been a type anchor and
+	//   - the next element showing that the interpretation as type anchor was inappropriate
+	//   At this point we convert the type anchor into the bits that would have been produced in a vanilla JDT
+
+	// retrieve unwanted type anchor:
+	TypeAnchorReference anchor = (TypeAnchorReference) this.genericsStack[this.genericsPtr--];
+	this.genericsLengthPtr--;
+	// convert to type reference:
+	TypeReference annotationTypeRef = null;
+	if (anchor.anchor instanceof SingleNameReference) {
+		long pos = (((long)anchor.anchor.sourceStart)<<32) + anchor.anchor.sourceEnd;
+		annotationTypeRef = new SingleTypeReference(anchor.getLastToken(), pos);
+	} else if (anchor.anchor instanceof QualifiedNameReference) {
+		QualifiedNameReference qualifiedNameReference = (QualifiedNameReference) anchor.anchor;
+		char[][] tokens = qualifiedNameReference.tokens;
+		long[] poss = qualifiedNameReference.sourcePositions;
+		annotationTypeRef = new QualifiedTypeReference(tokens, poss);
+	}
+	// and wrap that in an anntation:
+	Annotation annotation;
+	switch (annotationKind) {
+		case 0 : // no member values
+			annotation = new MarkerAnnotation(annotationTypeRef, anchor.sourceStart);
+			annotation.declarationSourceEnd = anchor.sourceEnd;
+			break;
+		case 1 : // single member value
+			// extracted from consumeSingleMemberAnnotation:
+			SingleMemberAnnotation singleMemberAnnotation = new SingleMemberAnnotation(annotationTypeRef, anchor.sourceStart);
+			singleMemberAnnotation.memberValue = this.expressionStack[this.expressionPtr--];
+			this.expressionLengthPtr--;
+			singleMemberAnnotation.declarationSourceEnd = this.rParenPos;
+			annotation = singleMemberAnnotation;
+			break;
+		case 2 : // arbitrary member value pairs
+			// extracted from consumeNormalAnnotation:
+			NormalAnnotation normalAnnotation = new NormalAnnotation(annotationTypeRef, anchor.sourceStart);
+			int length;
+			if ((length = this.astLengthStack[this.astLengthPtr--]) != 0) {
+				System.arraycopy(
+						this.astStack,
+						(this.astPtr -= length) + 1,
+						normalAnnotation.memberValuePairs = new MemberValuePair[length],
+						0,
+						length);
+			}
+			normalAnnotation.declarationSourceEnd = this.rParenPos;
+			annotation = normalAnnotation;
+			break;
+		default:
+			throw new InternalCompilerError("Unexpected annotation kind: "+annotationKind); //$NON-NLS-1$
+	}
+	// and push it back
+	this.typeAnnotationLengthPtr--; // drop the empty list pushed in consumeTypeAnchor()
+	pushOnTypeAnnotationStack(annotationSentinel);
+	pushOnTypeAnnotationStack(annotation);
+}
+protected void consumeTypeArgumentFromAnchor() {
+	// TypeAnchorOrAnnotatedTypeArgument -> TentativeTypeAnchor NotAnAnchor ReferenceType
+
+	// the Name in ReferenceType has pushed an annotation length,
+	// merge that into the previous empty list (from convertTypeAnchor()):
+	int dim = this.intStack[this.intPtr];
+	int ptr = this.typeAnnotationLengthPtr;
+	if (dim > 1) {
+		this.typeAnnotationLengthStack[ptr-dim] += this.typeAnnotationLengthStack[ptr-dim+1];
+		System.arraycopy(this.typeAnnotationLengthStack, ptr-dim+2, this.typeAnnotationLengthStack, ptr-dim+1, dim-1);
+	} else {
+		this.typeAnnotationLengthStack[ptr-1] += this.typeAnnotationLengthStack[ptr];		
+	}
+	this.typeAnnotationLengthPtr--;
+	// collect everything into a regular type argument:
+	consumeTypeArgument();
+	this.typeAnnotationPtr--; // drop the annotationSentinel
+}
+protected void consumeAnnotationsOnTypeArgumentFromAnchor() {
+	// TypeAnchorOrAnnotatedTypeArgument -> TentativeTypeAnchor NotAnAnchor Wildcard
+
+	// TypeAnchorOrAnnotatedTypeArgument1 -> TentativeTypeAnchor NotAnAnchor ReferenceType1
+	// TypeAnchorOrAnnotatedTypeArgument1 -> TentativeTypeAnchor NotAnAnchor Wildcard1
+
+	// TypeAnchorOrAnnotatedTypeArgument2 -> TentativeTypeAnchor NotAnAnchor ReferenceType2
+	// TypeAnchorOrAnnotatedTypeArgument2 -> TentativeTypeAnchor NotAnAnchor Wildcard2
+
+	// in all these cases a type reference (with dims) already exists
+	// and only type annotations need to be added/merged (if any)
+	
+	TypeReference ref = (TypeReference) this.genericsStack[this.genericsPtr];
+	// insert or merge converted annotation at first level into ref's annotations:
+	int length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--];
+	if (length != 0) {
+		if (ref.annotations == null)
+			ref.annotations = new Annotation[ref.getAnnotatableLevels()][];
+		Annotation[] annotations = ref.annotations[0];
+		int oldLen = 0;
+		if (annotations != null) {
+			oldLen = annotations.length;
+			System.arraycopy(annotations, 0, annotations = new Annotation[oldLen+length], length, oldLen);
+		} else {
+			annotations = new Annotation[length];				
+		}
+		System.arraycopy(
+				this.typeAnnotationStack,
+				(this.typeAnnotationPtr -= length) + 1,
+				annotations,
+				0,
+				length);
+		ref.annotations[0] = annotations;
+		ref.sourceStart = annotations[0].sourceStart;
+		ref.bits |= ASTNode.HasTypeAnnotations;
+	}
+	// type references are already on genericsStack, will be collected by consumeTypeArgumentList1()
+	this.typeAnnotationPtr--; // drop the annotationSentinel
 }
 protected NameReference newBaseReference() {
 	return new SingleNameReference(IOTConstants._OT_BASE, (((long)this.intStack[this.intPtr--])<<32)+this.intStack[this.intPtr--]);
 }
 protected void skipThisAnchor() {
-	// TypeAnchor ::= '@' 'this'
+	// TypeAnchor ::= '@OT' 'this'
+	//   where '@OT' is the synthetic token returned by the parser when a '@' is in a position suitable for a type anchor
 
 	// Cannot use ThisReference as type anchor.
 	// Since R<@this> is redundant, simply drop the argument (see also concatGenericsList()).
 	this.intPtr-=2;
 }
 protected void consumeQualifiedBaseTypeAnchor() {
-	// TypeArgument  ::= '@' Name '.' 'base'
-	// TypeArgument1 ::= '@' Name '.' 'base'
+	// TypeAnchor ::= '@OT' UnannotatableName '.' 'base'
+	//   where '@OT' is the synthetic token returned by the parser when a '@' is in a position suitable for a type anchor
 
 	// handle type arguments (see consumePrimaryNoNewArrayNameThis):
 	pushOnGenericsIdentifiersLengthStack(this.identifierLengthStack[this.identifierLengthPtr]);
@@ -10282,6 +11428,8 @@
 	
 	Reference anchor = new QualifiedBaseReference(prefix, this.intStack[this.intPtr--], this.intStack[this.intPtr--]);
 	pushOnGenericsStack(new TypeAnchorReference(anchor, this.intStack[this.intPtr--]));
+	// anchor has not type annotations, yet it will be consumed in a context where type annotations are possible
+	pushOnTypeAnnotationLengthStack(0);
 }
 protected void consumeTypeValueParameter() {
 	// TypeParameter1 ::= TypeParameterHeader Identifier '>'
@@ -10316,6 +11464,44 @@
 	parameter.bounds = new TypeReference[] { bound };
 }
 // SH}
+protected void consumeTypeArgument() {
+	pushOnGenericsStack(getTypeReference(this.intStack[this.intPtr--]));
+}
+protected void consumeTypeArgumentList() {
+	concatGenericsLists();
+}
+protected void consumeTypeArgumentList1() {
+	concatGenericsLists();
+}
+protected void consumeTypeArgumentList2() {
+	concatGenericsLists();
+}
+protected void consumeTypeArgumentList3() {
+	concatGenericsLists();
+}
+protected void consumeTypeArgumentReferenceType1() {
+	concatGenericsLists();
+	pushOnGenericsStack(getTypeReference(0));
+	this.intPtr--; // pop '<' position.
+}
+protected void consumeTypeArgumentReferenceType2() {
+	concatGenericsLists();
+	pushOnGenericsStack(getTypeReference(0));
+	this.intPtr--;
+}
+protected void consumeTypeArguments() {
+	concatGenericsLists();
+	this.intPtr--;
+
+	if(!this.statementRecoveryActivated &&
+			this.options.sourceLevel < ClassFileConstants.JDK1_5 &&
+			this.lastErrorEndPositionBeforeRecovery < this.scanner.currentPosition) {
+		int length = this.genericsLengthStack[this.genericsLengthPtr];
+		problemReporter().invalidUsageOfTypeArguments(
+			(TypeReference)this.genericsStack[this.genericsPtr - length + 1],
+			(TypeReference)this.genericsStack[this.genericsPtr]);
+	}
+}
 protected void consumeTypeDeclarations() {
 	// TypeDeclarations ::= TypeDeclarations TypeDeclaration
 	concatNodeLists();
@@ -10348,7 +11534,7 @@
 	}
 }
 protected void consumeTypeImportOnDemandDeclarationName() {
-	// TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
+	// TypeImportOnDemandDeclarationName ::= 'import' Name '.' RejectTypeAnnotations '*'
 	/* push an ImportRef build from the last name
 	stored in the identifier stack. */
 
@@ -10391,6 +11577,7 @@
 	typeParameter.declarationSourceEnd = superType.sourceEnd;
 	typeParameter.type = superType;
 	superType.bits |= ASTNode.IsSuperType;
+	typeParameter.bits |= (superType.bits & ASTNode.HasTypeAnnotations);
 	this.genericsStack[this.genericsPtr] = typeParameter;
 }
 protected void consumeTypeParameter1WithExtendsAndBounds() {
@@ -10403,15 +11590,28 @@
 	TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
 	typeParameter.declarationSourceEnd = bounds[additionalBoundsLength - 1].sourceEnd;
 	typeParameter.type = superType;
+	typeParameter.bits |= (superType.bits & ASTNode.HasTypeAnnotations);
 	superType.bits |= ASTNode.IsSuperType;
 	typeParameter.bounds = bounds;
 	for (int i = 0, max = bounds.length; i < max; i++) {
-		bounds[i].bits |= ASTNode.IsSuperType;
+		TypeReference bound = bounds[i];
+		bound.bits |= ASTNode.IsSuperType;
+		typeParameter.bits |= (bound.bits & ASTNode.HasTypeAnnotations);
 	}
 }
 protected void consumeTypeParameterHeader() {
-	//TypeParameterHeader ::= Identifier
+	//TypeParameterHeader ::= TypeAnnotationsopt Identifier
 	TypeParameter typeParameter = new TypeParameter();
+	int length;
+	if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+		System.arraycopy(
+				this.typeAnnotationStack,
+				(this.typeAnnotationPtr -= length) + 1,
+				typeParameter.annotations = new Annotation[length],
+				0,
+				length);
+		typeParameter.bits |= ASTNode.HasTypeAnnotations;
+	}
 	long pos = this.identifierPositionStack[this.identifierPtr];
 	final int end = (int) pos;
 	typeParameter.declarationSourceEnd = end;
@@ -10463,6 +11663,7 @@
 	TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
 	typeParameter.declarationSourceEnd = superType.sourceEnd;
 	typeParameter.type = superType;
+	typeParameter.bits |= (superType.bits & ASTNode.HasTypeAnnotations);
 	superType.bits |= ASTNode.IsSuperType;
 }
 //{ObjectTeams: <B base R>
@@ -10496,13 +11697,20 @@
 	TypeReference superType = getTypeReference(this.intStack[this.intPtr--]);
 	TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
 	typeParameter.type = superType;
+	typeParameter.bits |= (superType.bits & ASTNode.HasTypeAnnotations);
 	superType.bits |= ASTNode.IsSuperType;
 	typeParameter.bounds = bounds;
 	typeParameter.declarationSourceEnd = bounds[additionalBoundsLength - 1].sourceEnd;
 	for (int i = 0, max = bounds.length; i < max; i++) {
-		bounds[i].bits |= ASTNode.IsSuperType;
+		TypeReference bound = bounds[i];
+		bound.bits |= ASTNode.IsSuperType;
+		typeParameter.bits |= (bound.bits & ASTNode.HasTypeAnnotations);
 	}
 }
+protected void consumeZeroAdditionalBounds() {
+	if (this.currentToken == TokenNameRPAREN)  // Signal zero additional bounds - do this only when the cast type is fully seen (i.e not in error path)
+		pushOnGenericsLengthStack(0);          // Not all stacks are adjusted - this is not meant to be popped by getTypeReference
+}
 protected void consumeUnaryExpression(int op) {
 	// UnaryExpression ::= '+' PushPosition UnaryExpression
 	// UnaryExpression ::= '-' PushPosition UnaryExpression
@@ -10595,12 +11803,14 @@
 	final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
 	wildcard.sourceEnd = this.intStack[this.intPtr--];
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	pushOnGenericsStack(wildcard);
 }
 protected void consumeWildcard1() {
 	final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
 	wildcard.sourceEnd = this.intStack[this.intPtr--];
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	pushOnGenericsStack(wildcard);
 }
 protected void consumeWildcard1WithBounds() {
@@ -10611,6 +11821,7 @@
 	final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
 	wildcard.sourceEnd = this.intStack[this.intPtr--];
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	pushOnGenericsStack(wildcard);
 }
 protected void consumeWildcard2WithBounds() {
@@ -10621,6 +11832,7 @@
 	final Wildcard wildcard = new Wildcard(Wildcard.UNBOUND);
 	wildcard.sourceEnd = this.intStack[this.intPtr--];
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	pushOnGenericsStack(wildcard);
 }
 protected void consumeWildcard3WithBounds() {
@@ -10633,6 +11845,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	this.genericsStack[this.genericsPtr] = wildcard;
 }
 protected void consumeWildcardBounds1Super() {
@@ -10642,6 +11855,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	this.genericsStack[this.genericsPtr] = wildcard;
 }
 protected void consumeWildcardBounds2Extends() {
@@ -10650,6 +11864,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	this.genericsStack[this.genericsPtr] = wildcard;
 }
 protected void consumeWildcardBounds2Super() {
@@ -10659,6 +11874,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	this.genericsStack[this.genericsPtr] = wildcard;
 }
 protected void consumeWildcardBounds3Extends() {
@@ -10667,6 +11883,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	this.genericsStack[this.genericsPtr] = wildcard;
 }
 protected void consumeWildcardBounds3Super() {
@@ -10676,6 +11893,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	this.genericsStack[this.genericsPtr] = wildcard;
 }
 protected void consumeWildcardBoundsExtends() {
@@ -10684,6 +11902,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	pushOnGenericsStack(wildcard);
 }
 protected void consumeWildcardBoundsSuper() {
@@ -10693,6 +11912,7 @@
 	wildcard.sourceEnd = wildcard.bound.sourceEnd;
 	this.intPtr--; // remove end position of the '?'
 	wildcard.sourceStart = this.intStack[this.intPtr--];
+	annotateTypeReference(wildcard);
 	pushOnGenericsStack(wildcard);
 }
 protected void consumeWildcardWithBounds() {
@@ -10755,12 +11975,14 @@
 	m.explicitDeclarations = c.explicitDeclarations;
 	m.returnType = null;
 	m.javadoc = c.javadoc;
+	m.bits = c.bits;
 	return m;
 }
 
-protected TypeReference copyDims(TypeReference typeRef, int dim) {
-	return typeRef.copyDims(dim);
+protected TypeReference augmentTypeWithAdditionalDimensions(TypeReference typeReference, int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
+	return typeReference.augmentTypeWithAdditionalDimensions(additionalDimensions, additionalAnnotations, isVarargs);
 }
+
 protected FieldDeclaration createFieldDeclaration(char[] fieldDeclarationName, int sourceStart, int sourceEnd) {
 	return new FieldDeclaration(fieldDeclarationName, sourceStart, sourceEnd);
 }
@@ -11347,6 +12569,26 @@
 	exp.bits |= Binding.TYPE;
 	return exp;
 }
+protected void annotateTypeReference(Wildcard ref) {
+	int length;
+	if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+		if (ref.annotations == null)
+			ref.annotations = new Annotation[ref.getAnnotatableLevels()][];
+		System.arraycopy(
+				this.typeAnnotationStack,
+				(this.typeAnnotationPtr -= length) + 1,
+				ref.annotations[0] = new Annotation[length],
+				0,
+				length);
+		if (ref.sourceStart > ref.annotations[0][0].sourceStart) {
+			ref.sourceStart = ref.annotations[0][0].sourceStart;
+		}
+		ref.bits |= ASTNode.HasTypeAnnotations;
+	}
+	if (ref.bound != null) {
+		ref.bits |= (ref.bound.bits & ASTNode.HasTypeAnnotations);
+	}
+}
 protected TypeReference getTypeReference(int dim) {
 //{ObjectTeams: wrap to introduce 2nd parameter
 	return getTypeReference(dim, false);  
@@ -11360,14 +12602,18 @@
 			problemReporter().syntaxErrorIllegalDeclaredLifting(this.referenceContext, ltr);
 		return ltr.baseReference; // don't surface illegal LTR
 	}
-// SH}
+//SH}
 	/* build a Reference on a variable that may be qualified or not
 	 This variable is a type reference and dim will be its dimensions*/
 
 	TypeReference ref;
+	Annotation [][] annotationsOnDimensions = null;
 	int length = this.identifierLengthStack[this.identifierLengthPtr--];
 	if (length < 0) { //flag for precompiled type reference on base types
-		ref = TypeReference.baseTypeReference(-length, dim);
+		if (dim > 0) {
+			annotationsOnDimensions = getAnnotationsOnDimensions(dim);
+		}
+		ref = TypeReference.baseTypeReference(-length, dim, annotationsOnDimensions);
 		ref.sourceStart = this.intStack[this.intPtr--];
 		if (dim == 0) {
 			ref.sourceEnd = this.intStack[this.intPtr--];
@@ -11381,7 +12627,7 @@
 			// generic type
 			ref = getTypeReferenceForGenericType(dim, length, numberOfIdentifiers);
 		} else if (length == 1) {
-			// single variable reference
+			// single type reference
 			this.genericsLengthPtr--; // pop the 0
 			if (dim == 0) {
 				ref =
@@ -11389,16 +12635,21 @@
 						this.identifierStack[this.identifierPtr],
 						this.identifierPositionStack[this.identifierPtr--]);
 			} else {
+				annotationsOnDimensions = getAnnotationsOnDimensions(dim);
 				ref =
 					new ArrayTypeReference(
 						this.identifierStack[this.identifierPtr],
 						dim,
+						annotationsOnDimensions,
 						this.identifierPositionStack[this.identifierPtr--]);
 				ref.sourceEnd = this.endPosition;
+				if (annotationsOnDimensions != null) {
+					ref.bits |= ASTNode.HasTypeAnnotations;
+				}
 			}
 		} else {
 			this.genericsLengthPtr--;
-			//Qualified variable reference
+			//Qualified type reference
 			char[][] tokens = new char[length][];
 			this.identifierPtr -= length;
 			long[] positions = new long[length];
@@ -11412,11 +12663,32 @@
 			if (dim == 0) {
 				ref = new QualifiedTypeReference(tokens, positions);
 			} else {
-				ref = new ArrayQualifiedTypeReference(tokens, dim, positions);
+				annotationsOnDimensions = getAnnotationsOnDimensions(dim);
+				ref = new ArrayQualifiedTypeReference(tokens, dim, annotationsOnDimensions, positions);
 				ref.sourceEnd = this.endPosition;
+				if (annotationsOnDimensions != null) {
+					ref.bits |= ASTNode.HasTypeAnnotations;
+				}
 			}
 		}
 	}
+	int levels = ref.getAnnotatableLevels();
+	for (int i = levels - 1; i >= 0; i--) {
+		if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+			if (ref.annotations == null)
+				ref.annotations = new Annotation[levels][];
+			System.arraycopy(
+					this.typeAnnotationStack,
+					(this.typeAnnotationPtr -= length) + 1,
+					ref.annotations[i] = new Annotation[length],
+					0,
+					length);
+			if (i == 0) {
+				ref.sourceStart = ref.annotations[0][0].sourceStart;
+			}
+			ref.bits |= ASTNode.HasTypeAnnotations;
+		}
+	}
 	return ref;
 }
 //{ObjectTeams: when retrieving a type from stacks and when finding a lifting type reference,
@@ -11436,6 +12708,7 @@
 }
 //SH}
 protected TypeReference getTypeReferenceForGenericType(int dim, int identifierLength, int numberOfIdentifiers) {
+	Annotation[][] annotationsOnDimensions = dim == 0 ? null : getAnnotationsOnDimensions(dim);
 	if (identifierLength == 1 && numberOfIdentifiers == 1) {
 		int currentTypeArgumentsLength = this.genericsLengthStack[this.genericsLengthPtr--];
 		TypeReference[] typeArguments = null;
@@ -11446,7 +12719,7 @@
 			this.genericsPtr -= currentTypeArgumentsLength;
 			System.arraycopy(this.genericsStack, this.genericsPtr + 1, typeArguments, 0, currentTypeArgumentsLength);
 		}
-		ParameterizedSingleTypeReference parameterizedSingleTypeReference = new ParameterizedSingleTypeReference(this.identifierStack[this.identifierPtr], typeArguments, dim, this.identifierPositionStack[this.identifierPtr--]);
+		ParameterizedSingleTypeReference parameterizedSingleTypeReference = new ParameterizedSingleTypeReference(this.identifierStack[this.identifierPtr], typeArguments, dim, annotationsOnDimensions, this.identifierPositionStack[this.identifierPtr--]);
 		if (dim != 0) {
 			parameterizedSingleTypeReference.sourceEnd = this.endStatementPosition;
 		}
@@ -11488,7 +12761,7 @@
 				currentIdentifiersLength = this.identifierLengthStack[this.identifierLengthPtr--];
 			}
 		}
-		ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, positions);
+		ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference = new ParameterizedQualifiedTypeReference(tokens, typeArguments, dim, annotationsOnDimensions, positions);
 		if (dim != 0) {
 			parameterizedQualifiedTypeReference.sourceEnd = this.endStatementPosition;
 		}
@@ -11501,8 +12774,13 @@
 	}
 }
 protected NameReference getUnspecifiedReference() {
+	return getUnspecifiedReference(true);
+}
+protected NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
 	/* build a (unspecified) NameReference which may be qualified*/
-
+	if (rejectTypeAnnotations) { // Compensate for overpermissive grammar.
+		consumeNonTypeUseName();
+	}
 	int length;
 	NameReference ref;
 	if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1)
@@ -11534,7 +12812,7 @@
 	a field access. This optimization is IMPORTANT while it results
 	that when a NameReference is build, the type checker should always
 	look for that it is not a type reference */
-
+	consumeNonTypeUseName();
 	int length;
 	NameReference ref;
 	if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1) {
@@ -11593,11 +12871,11 @@
 	this.scanner.foundTaskCount = 0;
 	this.scanner.recordLineSeparator = true;
 }
-public void goForExpression() {
+public void goForExpression(boolean recordLineSeparator) {
 	//tells the scanner to go for an expression parsing
 
 	this.firstToken = TokenNameREMAINDER;
-	this.scanner.recordLineSeparator = true; // recovery goals must record line separators
+	this.scanner.recordLineSeparator = recordLineSeparator; // recovery goals must record line separators
 }
 public void goForFieldDeclaration(){
 	//tells the scanner to go for field declaration parsing
@@ -11750,6 +13028,8 @@
 	this.astLengthPtr = -1;
 	this.expressionPtr = -1;
 	this.expressionLengthPtr = -1;
+	this.typeAnnotationLengthPtr = -1;
+	this.typeAnnotationPtr = -1;
 	this.identifierPtr = -1;
 	this.identifierLengthPtr	= -1;
 	this.intPtr = -1;
@@ -11760,6 +13040,7 @@
 	this.compilationUnit = null;
 	this.referenceContext = null;
 	this.endStatementPosition = 0;
+	this.valueLambdaNestDepth = -1;
 
 	//remove objects from stack too, while the same parser/compiler couple is
 	//re-used between two compilations ....
@@ -11926,6 +13207,7 @@
 	this.nextIgnoredToken = -1;
 	do {
 		try {
+			this.scanner.lookBack[0] = this.scanner.lookBack[1] = TokenNameNotAToken; // stay clear of the voodoo in the present method
 			this.nextIgnoredToken = this.scanner.getNextToken();
 			if(this.scanner.currentPosition == this.scanner.startPosition){
 				this.scanner.currentPosition++; // on fake completion identifier
@@ -11934,6 +13216,8 @@
 
 		} catch(InvalidInputException e){
 			pos = this.scanner.currentPosition;
+		} finally {
+			this.scanner.lookBack[0] = this.scanner.lookBack[1] = TokenNameNotAToken; // steer clear of the voodoo in the present method
 		}
 	} while (this.nextIgnoredToken < 0);
 
@@ -12088,6 +13372,74 @@
 
 	this.astLengthStack[--this.astLengthPtr]++;
 }
+public boolean atConflictScenario(int token) {
+	
+	/* Answer true if the parser is at a configuration where the scanner must look ahead and help disambiguate between (a) '<' as an operator and '<' as the
+	   start of <type argument> and (b) the use of '(' in '(' expression ')' and '( type ')' and '(' lambda formal parameters ')'. (c) whether the token @
+	   begins a Java SE5 style declaration annotation or if it begins a SE8 style type annotation. When requested thus, the scanner helps by fabricating 
+	   synthetic tokens and injecting them into the stream ahead of the tokens that trigger conflicts in the absence of these artificial tokens. These 
+	   manufactured token help transform the grammar into LALR(1) by splitting the states so that they have unambigious prefixes.
+	   
+	   We do this by claiming to the automaton that the next token seen is the (suitable) synthetic token and observing the response of the state machine. 
+	   Error signals we are NOT at a conflict site, while shift or shift/reduce signals that we are. Accept is impossible, while there may be intermediate
+	   reductions that are called for -- It is axiomatic of the push down automaton that corresponds to the LALR grammar that it will never shift on invalid
+	   input.
+	   
+	   Obviously, the dry runs should not alter the parser state in any way or otherwise cause side effects. Proof by argument that this is the case:
+	   
+	       - The only pieces of state needed to answer the question are: this.stack, this.stateStackTop and the last action variable `act`. None of the various
+	         and sundry stacks used in the AST constructions process are touched here.
+	       - As we reduce, we DON'T call the semantic action functions i.e the consume* method calls are skipped.
+	       - Lexer stream is left untouched.
+	       - this.stateStackTop and the last action variable `act` of the automaton are readily cloned, these being primitives and changes are to the replicas.
+	       - We never remove elements from the state stack here (or elsewhere for that matter). Pops are implemented by mere adjustments of the stack pointer.
+	       - During this algorithm, either the stack pointer monotonically decreases or stays fixed. (The only way for the stack pointer to increase would call
+	         for a shift or a shift/reduce at which point the algorithm is ready to terminate already.) This means that we don't have to replicate the stack. 
+	         Pushes can be mimiced by writing to a local stackTopState variable, leaving the original stack untouched.
+	         
+	    Though this code looks complex, we should exit early in most situations.     
+	 */
+	int lastAction = this.unstackedAct;
+	if (lastAction == ERROR_ACTION) { // automaton is not running.
+		return false;
+	}
+	int stackTop = this.stateStackTop;        // local copy of stack pointer
+	int stackTopState = this.stack[stackTop]; // single cell non write through "alternate stack" - the automaton's stack pointer either stays fixed during this manoeuvre or monotonically decreases.
+	int highWaterMark = stackTop;
+	
+//{ObjectTeams: check both special variants of '@':
+/* orig:
+	if (token != TokenNameAT) {
+  :giro */
+	if (token != TokenNameAT && token != TokenNameATOT) {
+// SH}
+		token = token == TokenNameLPAREN ? TokenNameBeginLambda : TokenNameBeginTypeArguments;
+	}
+	
+	// A rotated version of the automaton - cf. parse()'s for(;;)
+	for (;;) {  
+		if (lastAction > ERROR_ACTION) {  
+			lastAction -= ERROR_ACTION;    /* shift-reduce on loop entry from above, reduce on loop back */
+			do { /* reduce */
+				stackTop -= rhs[lastAction] - 1;
+				if (stackTop < highWaterMark) {
+					stackTopState = this.stack[highWaterMark = stackTop];
+				} // else stackTopState is upto date already.
+				lastAction = ntAction(stackTopState, lhs[lastAction]);
+			} while (lastAction <= NUM_RULES);
+		}
+		highWaterMark = ++stackTop;
+		stackTopState = lastAction; // "push"
+		lastAction = tAction(lastAction, token); // can be looked up from a precomputed cache.
+		if (lastAction <= NUM_RULES) {
+			stackTop --; 
+		    lastAction += ERROR_ACTION;
+			continue;
+		}
+		// Error => false, Shift, Shift/Reduce => true, Accept => impossible. 
+		return lastAction != ERROR_ACTION;
+	}
+}
 /*main loop of the automat
 When a rule is reduced, the method consumeRule(int) is called with the number
 of the consumed rule. When a terminal is consumed, the method consumeToken(int) is
@@ -12113,6 +13465,9 @@
 	int act = START_STATE;
 	this.stateStackTop = -1;
 	this.currentToken = getFirstToken();
+	
+try {
+	this.scanner.setActiveParser(this);
 	ProcessTerminals : for (;;) {
 		int stackLength = this.stack.length;
 		if (++this.stateStackTop >= stackLength) {
@@ -12165,6 +13520,7 @@
 				this.recordStringLiterals = oldValue;
 			}
 			try {
+				this.unstackedAct = act;
 				this.currentToken = this.scanner.getNextToken();
 			} catch(InvalidInputException e){
 				if (!this.hasReportedError){
@@ -12174,6 +13530,8 @@
 				this.lastCheckPoint = this.scanner.currentPosition;
 				this.currentToken = 0;
 				this.restartRecovery = true;
+			} finally {
+				this.unstackedAct = ERROR_ACTION;
 			}
 			if(this.statementRecoveryActivated) {
 				jumpOverType();
@@ -12194,6 +13552,7 @@
 					this.recordStringLiterals = oldValue;
 				}
 				try{
+					this.unstackedAct = act;
 					this.currentToken = this.scanner.getNextToken();
 				} catch(InvalidInputException e){
 					if (!this.hasReportedError){
@@ -12203,6 +13562,8 @@
 					this.lastCheckPoint = this.scanner.currentPosition;
 					this.currentToken = 0;
 					this.restartRecovery = true;
+				} finally {
+					this.unstackedAct = ERROR_ACTION;
 				}
 				if(this.statementRecoveryActivated) {
 					jumpOverType();
@@ -12222,8 +13583,8 @@
 				System.out.println(name[non_terminal_index[lhs[act]]]);
 			}
 
-			consumeRule(act);
 			this.stateStackTop -= (rhs[act] - 1);
+			consumeRule(act);
 			act = ntAction(this.stack[this.stateStackTop], lhs[act]);
 
 			if (DEBUG_AUTOMATON) {
@@ -12238,6 +13599,9 @@
 			System.out.println("----------------------------------------");  //$NON-NLS-1$
 		}
 	}
+} finally {
+	this.scanner.setActiveParser(null);
+}
 
 	if (DEBUG_AUTOMATON) {
 		System.out.println("- End ----------------------------------");  //$NON-NLS-1$
@@ -12424,7 +13788,7 @@
 	//convert bugs into parse error
 
 	initialize();
-	goForExpression();
+	goForExpression(true /* record line separators */);
 	this.nestedMethod[this.nestedType]++;
 
 	this.referenceContext = type;
@@ -12755,6 +14119,7 @@
 // SH}
 public ASTNode[] parseClassBodyDeclarations(char[] source, int offset, int length, CompilationUnitDeclaration unit) {
 	boolean oldDiet = this.diet;
+	boolean oldTolerateDefaultClassMethods = this.tolerateDefaultClassMethods;
 	/* automaton initialization */
 	initialize();
 	goForClassBodyDeclarations();
@@ -12781,11 +14146,13 @@
 	/* run automaton */
 	try {
 		this.diet = true;
+		this.tolerateDefaultClassMethods = this.parsingJava8Plus;
 		parse();
 	} catch (AbortCompilation ex) {
 		this.lastAct = ERROR_ACTION;
 	} finally {
 		this.diet = oldDiet;
+		this.tolerateDefaultClassMethods = oldTolerateDefaultClassMethods;
 	}
 
 	ASTNode[] result = null;
@@ -12886,10 +14253,16 @@
 	}
 	return result;
 }
-public Expression parseExpression(char[] source, int offset, int length, CompilationUnitDeclaration unit) {
+
+public Expression parseLambdaExpression(char[] source, int offset, int length, CompilationUnitDeclaration unit, boolean recordLineSeparators) {
+	this.haltOnSyntaxError = true; // unexposed/unshared object, no threading concerns.
+	return parseExpression(source, offset, length, unit, recordLineSeparators);
+}
+
+public Expression parseExpression(char[] source, int offset, int length, CompilationUnitDeclaration unit, boolean recordLineSeparators) {
 
 	initialize();
-	goForExpression();
+	goForExpression(recordLineSeparators);
 	this.nestedMethod[this.nestedType]++;
 
 	this.referenceContext = unit;
@@ -13078,11 +14451,7 @@
  return this.problemReporter;
 }
 //carp}
-protected void pushIdentifier() {
-	/*push the consumeToken on the identifier stack.
-	Increase the total number of identifier in the stack.
-	identifierPtr points on the next top */
-
+protected void pushIdentifier(char [] identifier, long position) {
 	int stackLength = this.identifierStack.length;
 	if (++this.identifierPtr >= stackLength) {
 		System.arraycopy(
@@ -13094,9 +14463,8 @@
 			this.identifierPositionStack = new long[stackLength + 20], 0,
 			stackLength);
 	}
-	this.identifierStack[this.identifierPtr] = this.scanner.getCurrentIdentifierSource();
-	this.identifierPositionStack[this.identifierPtr] =
-		(((long) this.scanner.startPosition) << 32) + (this.scanner.currentPosition - 1);
+	this.identifierStack[this.identifierPtr] = identifier;
+	this.identifierPositionStack[this.identifierPtr] = position;
 
 	stackLength = this.identifierLengthStack.length;
 	if (++this.identifierLengthPtr >= stackLength) {
@@ -13106,6 +14474,16 @@
 			stackLength);
 	}
 	this.identifierLengthStack[this.identifierLengthPtr] = 1;
+	if (this.parsingJava8Plus && identifier.length == 1 && identifier[0] == '_') {
+		problemReporter().illegalUseOfUnderscoreAsAnIdentifier((int) (position >>> 32), (int) position);
+	}
+}
+protected void pushIdentifier() {
+	/*push the consumeToken on the identifier stack.
+	Increase the total number of identifier in the stack.
+	identifierPtr points on the next top */
+
+	pushIdentifier(this.scanner.getCurrentIdentifierSource(), (((long) this.scanner.startPosition) << 32) + (this.scanner.currentPosition - 1));
 }
 protected void pushIdentifier(int flag) {
 	/*push a special flag on the stack :
@@ -13156,6 +14534,55 @@
 	}
 	this.astLengthStack[this.astLengthPtr] = 1;
 }
+protected void pushOnTypeAnnotationStack(Annotation annotation) {
+
+//{ObjectTeams: detect the situation of having pushed the sentinel plus exactly one type annotation:
+	boolean atSentinel = this.typeAnnotationPtr > 0 
+			&& this.typeAnnotationPtr <= this.typeAnnotationStack.length 
+			&& this.typeAnnotationStack[this.typeAnnotationPtr-1] == annotationSentinel
+			&& this.typeAnnotationLengthPtr > -1
+			&& this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr] == 1;
+// SH}
+
+	int stackLength = this.typeAnnotationStack.length;
+	if (++this.typeAnnotationPtr >= stackLength) {
+		System.arraycopy(
+			this.typeAnnotationStack, 0,
+			this.typeAnnotationStack = new Annotation[stackLength + TypeAnnotationStackIncrement], 0,
+			stackLength);
+	}
+	this.typeAnnotationStack[this.typeAnnotationPtr] = annotation;
+
+//{ObjectTeams: the sentinel is not part of any list, don't record a length
+	if (annotation == annotationSentinel)
+		return;
+// SH}
+
+	stackLength = this.typeAnnotationLengthStack.length;
+	if (++this.typeAnnotationLengthPtr >= stackLength) {
+		System.arraycopy(
+			this.typeAnnotationLengthStack, 0,
+			this.typeAnnotationLengthStack = new int[stackLength + TypeAnnotationStackIncrement], 0,
+			stackLength);
+	}
+//{ObjectTeams: at the sentinal situation we merge this new annotation into the previous list:
+  if (atSentinel)
+	this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr-1]++;
+  else
+// SH}
+	this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr] = 1;
+}
+protected void pushOnTypeAnnotationLengthStack(int pos) {
+
+	int stackLength = this.typeAnnotationLengthStack.length;
+	if (++this.typeAnnotationLengthPtr >= stackLength) {
+		System.arraycopy(
+			this.typeAnnotationLengthStack, 0,
+			this.typeAnnotationLengthStack = new int[stackLength + TypeAnnotationStackIncrement], 0,
+			stackLength);
+	}
+	this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr] = pos;
+}
 protected void pushOnExpressionStack(Expression expr) {
 
 	int stackLength = this.expressionStack.length;
@@ -13691,6 +15118,8 @@
 	this.astLengthPtr = -1;
 	this.expressionPtr = -1;
 	this.expressionLengthPtr = -1;
+	this.typeAnnotationLengthPtr = -1;
+	this.typeAnnotationPtr = -1;
 	this.identifierPtr = -1;
 	this.identifierLengthPtr	= -1;
 	this.intPtr = -1;
@@ -13705,6 +15134,7 @@
 	this.genericsIdentifiersLengthPtr = -1;
 	this.genericsLengthPtr = -1;
 	this.genericsPtr = -1;
+	this.valueLambdaNestDepth = -1;
 }
 /*
  * Reset context so as to resume to regular parse loop
@@ -13753,6 +15183,8 @@
 	}
 }
 protected boolean resumeOnSyntaxError() {
+	if (this.haltOnSyntaxError)
+		return false;
 	/* request recovery initialization */
 	if (this.currentElement == null){
 //{ObjectTeams:
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
index 26e9b03..af51c9f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/ParserBasicInformation.java
@@ -4,7 +4,15 @@
  * 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
- *
+ *  
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -15,22 +23,22 @@
 public interface ParserBasicInformation {
     public final static int
 
-      ERROR_SYMBOL      = 129,
+      ERROR_SYMBOL      = 138,
       MAX_NAME_LENGTH   = 41,
-      NUM_STATES        = 1267,
+      NUM_STATES        = 1361,
 
-      NT_OFFSET         = 129,
-      SCOPE_UBOUND      = 196,
-      SCOPE_SIZE        = 197,
-      LA_STATE_OFFSET   = 15117,
+      NT_OFFSET         = 138,
+      SCOPE_UBOUND      = 372,
+      SCOPE_SIZE        = 373,
+      LA_STATE_OFFSET   = 19235,
       MAX_LA            = 1,
-      NUM_RULES         = 887,
-      NUM_TERMINALS     = 129,
-      NUM_NON_TERMINALS = 394,
-      NUM_SYMBOLS       = 523,
-      START_STATE       = 1022,
-      EOFT_SYMBOL       = 73,
-      EOLT_SYMBOL       = 73,
-      ACCEPT_ACTION     = 15116,
-      ERROR_ACTION      = 15117;
+      NUM_RULES         = 971,
+      NUM_TERMINALS     = 138,
+      NUM_NON_TERMINALS = 433,
+      NUM_SYMBOLS       = 571,
+      START_STATE       = 1532,
+      EOFT_SYMBOL       = 65,
+      EOLT_SYMBOL       = 65,
+      ACCEPT_ACTION     = 19234,
+      ERROR_ACTION      = 19235;
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java
index 91cf227..2e2c03a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredMethod.java
@@ -1,15 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: RecoveredMethod.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Jesper S Moller - Bug 392671
+ *          NPE with a method with explicit this and a following incomplete parameter
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.parser;
 
@@ -522,7 +528,11 @@
 						parser.consumeMethodHeaderRightParen();
 						/* fix-up positions, given they were updated against rParenPos, which did not get set */
 						if (parser.currentElement == this){ // parameter addition might have added an awaiting (no return type) method - see 1FVXQZ4 */
-							this.methodDeclaration.sourceEnd = this.methodDeclaration.arguments[this.methodDeclaration.arguments.length-1].sourceEnd;
+							if (this.methodDeclaration.arguments != null) {
+								this.methodDeclaration.sourceEnd = this.methodDeclaration.arguments[this.methodDeclaration.arguments.length-1].sourceEnd;
+							} else {
+								this.methodDeclaration.sourceEnd = this.methodDeclaration.receiver.sourceEnd;
+							}
 							this.methodDeclaration.bodyStart = this.methodDeclaration.sourceEnd+1;
 							parser.lastCheckPoint = this.methodDeclaration.bodyStart;
 						}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java
index 0d71178..25f8392 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveredType.java
@@ -1,15 +1,21 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
- *     Stephan Herrmann - Contribution for Bug 366003 - CCE in ASTNode.resolveAnnotations(ASTNode.java:639)
+ *     Stephan Herrmann - Contributions for
+ *								bug 366003 - CCE in ASTNode.resolveAnnotations(ASTNode.java:639)
+ *								bug 383973 - [1.8][compiler] syntax recovery in the presence of default methods
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.parser;
 
@@ -123,11 +129,16 @@
 		this.pendingTypeParameters = null;
 	}
 
-	if(this.pendingAnnotationCount > 0) {
+	if(this.pendingAnnotationCount > 0 || this.pendingModifiers != 0) {
 		element.attach(
 				this.pendingAnnotations,
 				this.pendingAnnotationCount,
+//{ObjectTeams: AccTeam was obviously not meant for us:
+/* orig:
 				this.pendingModifiers,
+  :giro */
+				this.pendingModifiers & ~ClassFileConstants.AccTeam,
+// SH}
 				this.pendingModifersSourceStart);
 	}
 	resetPendingModifiers();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java
index 3b6d4ff..8fe5d13 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/RecoveryScanner.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2009 IBM Corporation and others.
+ * Copyright (c) 2006, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -137,7 +141,7 @@
 		this.data.removedTokenUsed[this.data.removedTokensPtr] = false;
 	}
 
-	public int getNextToken() throws InvalidInputException {
+	protected int getNextToken0() throws InvalidInputException {
 		if(this.pendingTokensPtr > -1) {
 			int nextToken = this.pendingTokens[this.pendingTokensPtr--];
 			if(nextToken == TerminalTokens.TokenNameIdentifier){
@@ -173,7 +177,7 @@
 		}
 
 		int previousLocation = this.currentPosition;
-		int currentToken = super.getNextToken();
+		int currentToken = super.getNextToken0();
 
 		if(this.data.replacedTokens != null) {
 			for (int i = 0; i <= this.data.replacedTokensPtr; i++) {
@@ -204,7 +208,7 @@
 					this.data.removedTokenUsed[i] = true;
 					this.currentPosition = this.data.removedTokensEnd[i] + 1;
 					this.precededByRemoved = false;
-					return getNextToken();
+					return getNextToken0();
 				}
 			}
 		}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
index 096b59a..fa4c9b8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/Scanner.java
@@ -1,15 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
  *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
+ *     Jesper S Moller  -. Contribution for bug 400830: [1.8][formatter] Code formatter for Java 8
  *******************************************************************************/
 package org.eclipse.jdt.internal.compiler.parser;
 
@@ -100,7 +105,77 @@
 	public boolean _precedenceSeen = false;
 
     // after a '.' even 'team' can be an identifier:
-    private int _dotSeen = 0; // 0: no, 1: previos, 2: this token
+    protected int _dotSeen = 0; // 0: no, 1: previos, 2: this token
+
+    public boolean _insideParameterMapping = false;
+    enum LookaheadState { INIT, ONE_TOKEN, ID_SEEN, TWO_TOKENS, ID_CONSUMED }
+    /** 
+     * A little state machine for lookahead of up-to 2 tokens.
+     * This is used to disambiguate whether a '->' inside parameter mappings is
+     * an ARROW (lambda) or a SYNTHBINDOUT (parameter mapping role-to-base) 
+     */
+    protected class BindoutLookahead {
+    	
+    	LookaheadState state = LookaheadState.INIT;
+    	int[] tokens = new int[2];
+    	char[] identifier = null;
+    	int[][] positions = new int[2][];
+    	
+		public BindoutLookahead() throws InvalidInputException {
+			int token = this.tokens[0] = getNextToken0();
+			this.positions[0] = new int[] {Scanner.this.startPosition, Scanner.this.currentPosition};
+			if (token == TerminalTokens.TokenNameIdentifier) {
+				this.state = LookaheadState.ID_SEEN;
+				this.identifier = getCurrentIdentifierSource();
+			}
+		}
+		public char[] getIdentifier() {
+			if (this.state == LookaheadState.TWO_TOKENS) {
+				return this.identifier;
+			}
+			return null;
+		}
+		public int getNextToken() throws InvalidInputException {
+			switch (this.state) {
+				case INIT :
+					// == initialization failed to match anything	=> signal no match
+					this.state = LookaheadState.ONE_TOKEN;
+					return TerminalTokens.TokenNameNotAToken;
+				case ONE_TOKEN :
+					// == we have one non-matching token			=> pop that token and unregister 
+					Scanner.this._bindoutLookahead = null;
+					return popToken(0);
+				case ID_SEEN :
+					// == we've seen an identifier					=> check if second token matches, too
+					this.tokens[1] = Scanner.this.getNextToken0();
+					this.positions[1] = new int[] {Scanner.this.startPosition, Scanner.this.currentPosition};
+					this.state = LookaheadState.TWO_TOKENS;
+					switch (this.tokens[1]) {
+						case TerminalTokens.TokenNameCOMMA :	  // more mappings?
+						case TerminalTokens.TokenNameSEMICOLON :  // more mappings? (wrong delimiter, though)
+						case TerminalTokens.TokenNameRBRACE :	  // end of parameter mappings?
+							return TokenNameSYNTHBINDOUT; 		  // match, tweak '->' to mean SYNTHBINDOUT
+						default:
+							return TerminalTokens.TokenNameARROW; // no match, '->' should be interpreted as normal
+					}
+				case TWO_TOKENS :
+					// == we've seen & stored two tokens			=> pop the identifier now
+					this.state = LookaheadState.ID_CONSUMED;
+					return popToken(0);
+				case ID_CONSUMED :
+					// == identifier has already been consumed		=> pop the second token and unregister
+					Scanner.this._bindoutLookahead = null;
+					return popToken(1);
+			}
+			return TerminalTokens.TokenNameNotAToken;
+		}
+		private int popToken(int i) {
+			Scanner.this.startPosition = this.positions[i][0];
+			Scanner.this.currentPosition = this.positions[i][1];
+			return this.tokens[i];
+		}
+    }
+    protected BindoutLookahead _bindoutLookahead = null;
 
     public void resetOTFlags() {
     	this._isOTSource = this.parseOTJonly;
@@ -108,6 +183,8 @@
     	this._forceBaseIsIdentifier = false;
     	this._callinSeen = false;
     	this._calloutSeen = false;
+    	this._insideParameterMapping = false;
+    	this._bindoutLookahead = null;
     }
     
     public void setOTFlags(CompilerOptions options) {
@@ -305,7 +382,13 @@
 		newEntry5 = 0,
 		newEntry6 = 0;
 	public boolean insideRecovery = false;
-
+	int lookBack[] = new int[2]; // fall back to spring forward.
+	private int nextToken = TokenNameNotAToken; // allows for one token push back, only the most recent token can be reliably ungotten.
+	private VanguardScanner vanguardScanner;
+	private VanguardParser vanguardParser;
+	private ConflictedParser activeParser = null;
+	private boolean consumingEllipsisAnnotations = false;
+	
 	public static final int RoundBracket = 0;
 	public static final int SquareBracket = 1;
 	public static final int CurlyBracket = 2;
@@ -335,6 +418,8 @@
 	this.tokenizeComments = tokenizeComments;
 	this.tokenizeWhiteSpace = tokenizeWhiteSpace;
 	this.sourceLevel = sourceLevel;
+	this.lookBack[0] = this.lookBack[1] = this.nextToken = TokenNameNotAToken;
+	this.consumingEllipsisAnnotations = false;
 	this.complianceLevel = complianceLevel;
 	this.checkNonExternalizedStringLiterals = checkNonExternalizedStringLiterals;
 	if (taskTags != null) {
@@ -532,6 +617,13 @@
 }
 
 public char[] getCurrentIdentifierSource() {
+//{ObjectTeams: respect look-ahead:
+	if (this._bindoutLookahead != null) {
+		char[] result = this._bindoutLookahead.getIdentifier();
+		if (result != null)
+			return result;
+	}
+// SH}
 	//return the token REAL source (aka unicodes are precomputed)
 	if (this.withoutUnicodePtr != 0) {
 		//0 is used as a fast test flag so the real first char is in position 1
@@ -1238,7 +1330,44 @@
 		return TokenNameERROR;
 	}
 }
+public void ungetToken(int unambiguousToken) {
+	if (this.nextToken != TokenNameNotAToken) {
+		throw new ArrayIndexOutOfBoundsException("Single cell array overflow"); //$NON-NLS-1$
+	}
+	this.nextToken = unambiguousToken;
+}
+
 public int getNextToken() throws InvalidInputException {
+	
+	int token;
+	if (this.nextToken != TokenNameNotAToken) {
+		token = this.nextToken;
+		this.nextToken = TokenNameNotAToken;
+		return token; // presumed to be unambiguous.
+	}
+	
+//{ObjectTeams: consume lookahead for parameter mappings:
+	if (this._bindoutLookahead != null) {
+		int result = this._bindoutLookahead.getNextToken();
+		if (result != TerminalTokens.TokenNameNotAToken)
+			return result;
+	}
+// SH}
+
+	token = getNextToken0();
+	if (this.activeParser == null) { // anybody interested in the grammatical structure of the program should have registered.
+		return token;
+	}
+	if (token == TokenNameLPAREN || token == TokenNameLESS || token == TokenNameAT) {
+		token = disambiguatedToken(token);
+	} else if (token == TokenNameELLIPSIS) {
+		this.consumingEllipsisAnnotations = false;
+	}
+	this.lookBack[0] = this.lookBack[1];
+	this.lookBack[1] = token;
+	return token;
+}
+protected int getNextToken0() throws InvalidInputException {
 //{ObjectTeams: support '.' 'team':
 	if (this._dotSeen > 0)
 		this._dotSeen--; // "aging"
@@ -1392,13 +1521,20 @@
 							return TokenNameMINUS_MINUS;
 						if (test > 0)
 							return TokenNameMINUS_EQUAL;
-//{ObjectTeams: check for callout binding after '-' tokens
-						else {
-							if (test < 0 && this._isOTSource)
-								if (getNextChar('>')) {
-									this._calloutSeen = true;
-									return TokenNameBINDOUT;
+//{ObjectTeams: set _calloutSeen?
+/* orig:
+						if (getNextChar('>'))
+							return TokenNameARROW;
+  :giro */
+						if (getNextChar('>')) {
+							if (this._isOTSource) {
+								this._calloutSeen = true; // TODO distinguish from ARROW?
+								if (this._insideParameterMapping) {
+									this._bindoutLookahead = new BindoutLookahead();
+									return this._bindoutLookahead.getNextToken();
 								}
+							}
+							return TokenNameARROW;
 						}
 // Markus Witte}
 						return TokenNameMINUS;
@@ -1502,6 +1638,8 @@
 				case '?' :
 					return TokenNameQUESTION;
 				case ':' :
+					if (getNextChar(':'))
+						return TokenNameCOLON_COLON;
 					return TokenNameCOLON;
 				case '\'' :
 					{
@@ -2773,7 +2911,6 @@
 	return;
 }
 // SH}
-
 public final boolean jumpOverUnicodeWhiteSpace() throws InvalidInputException {
 	//BOOLEAN
 	//handle the case of unicode. Jump over the next whiteSpace
@@ -3234,6 +3371,12 @@
 	}
 	this.commentPtr = -1; // reset comment stack
 	this.foundTaskCount = 0;
+	this.lookBack[0] = this.lookBack[1] = this.nextToken = TokenNameNotAToken;
+	this.consumingEllipsisAnnotations = false;
+//{ObjectTeams: lookahead on '->':
+	this._insideParameterMapping = false;
+	this._bindoutLookahead = null;
+// SH}
 }
 
 protected final void scanEscapeCharacter() throws InvalidInputException {
@@ -4617,7 +4760,7 @@
 	if (this.currentPosition > this.eofPosition)
 		return "behind the EOF\n\n" + new String(this.source); //$NON-NLS-1$
 	if (this.currentPosition <= 0)
-		return "NOT started!\n\n"+ new String(this.source); //$NON-NLS-1$
+		return "NOT started!\n\n"+ (this.source != null ? new String(this.source) : ""); //$NON-NLS-1$ //$NON-NLS-2$
 
 	StringBuffer buffer = new StringBuffer();
 	if (this.startPosition < 1000) {
@@ -4634,7 +4777,11 @@
 	if (middleLength > -1) {
 		buffer.append(this.source, this.startPosition, middleLength);
 	}
-	buffer.append("<-- Ends here\n===============================\n"); //$NON-NLS-1$
+	if (this.nextToken != TerminalTokens.TokenNameNotAToken) {
+		buffer.append("<-- Ends here [in pipeline " + toStringAction(this.nextToken) + "]\n===============================\n"); //$NON-NLS-1$ //$NON-NLS-2$
+	} else {
+		buffer.append("<-- Ends here\n===============================\n"); //$NON-NLS-1$
+	}
 
 	buffer.append(this.source, (this.currentPosition - 1) + 1, this.eofPosition - (this.currentPosition - 1) - 1);
 
@@ -4789,8 +4936,6 @@
 //{ObjectTeams: deal with callins/callouts
 		case TokenNameBINDIN :
 			return "<-"; //$NON-NLS-1$
-		case TokenNameBINDOUT :
-			return "->"; //$NON-NLS-1$
 		case TokenNameCALLOUT_OVERRIDE :
 			return "=>"; //$NON-NLS-1$
 // Markus Witte}
@@ -4810,6 +4955,8 @@
 			return "+="; //$NON-NLS-1$
 		case TokenNameMINUS_EQUAL :
 			return "-="; //$NON-NLS-1$
+		case TokenNameARROW :
+			return "->"; //$NON-NLS-1$
 		case TokenNameMULTIPLY_EQUAL :
 			return "*="; //$NON-NLS-1$
 		case TokenNameDIVIDE_EQUAL :
@@ -4874,6 +5021,8 @@
 			return "?"; //$NON-NLS-1$
 		case TokenNameCOLON :
 			return ":"; //$NON-NLS-1$
+		case TokenNameCOLON_COLON :
+			return "::"; //$NON-NLS-1$
 		case TokenNameCOMMA :
 			return ","; //$NON-NLS-1$
 		case TokenNameDOT :
@@ -4991,4 +5140,295 @@
 			return false;
 	}
 }
+
+// Vanguard Scanner - A Private utility helper class for the scanner.
+private static final class VanguardScanner extends Scanner {
+	
+	public VanguardScanner(long sourceLevel, long complianceLevel) {
+		super (false /*comment*/, false /*whitespace*/, false /*nls*/, sourceLevel, complianceLevel, null/*taskTag*/, null/*taskPriorities*/, false /*taskCaseSensitive*/);
+	}
+	
+	public int getNextToken() throws InvalidInputException {
+		int token = getNextToken0();
+		if (token == TokenNameAT && atTypeAnnotation()) {
+			token = TokenNameAT308;
+		}
+		return token == TokenNameEOF ? TokenNameNotAToken : token; 
+	}
+}
+
+private static final class Goal {
+	
+	int first;      // steer the parser towards a single minded pursuit.
+	int [] follow;  // the definite terminal symbols that signal the successful reduction to goal.
+	int rule;
+
+	static int LambdaParameterListRule = 0;
+	static int IntersectionCastRule = 0;
+	static int ReferenceExpressionRule = 0;
+	static int VarargTypeAnnotationsRule  = 0;
+	
+	static Goal LambdaParameterListGoal;
+	static Goal IntersectionCastGoal;
+	static Goal VarargTypeAnnotationGoal;
+	static Goal ReferenceExpressionGoal;
+	
+	static {
+		
+		for (int i = 1; i <= ParserBasicInformation.NUM_RULES; i++) {  // 0 == $acc
+			if ("ParenthesizedLambdaParameterList".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				LambdaParameterListRule = i;
+			else 
+			if ("ParenthesizedCastNameAndBounds".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				IntersectionCastRule = i;
+			else 
+			if ("ReferenceExpressionTypeArgumentsAndTrunk".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				ReferenceExpressionRule = i;
+			else 
+			if ("TypeAnnotations".equals(Parser.name[Parser.non_terminal_index[Parser.lhs[i]]])) //$NON-NLS-1$
+				VarargTypeAnnotationsRule = i;
+		}
+		
+		LambdaParameterListGoal =  new Goal(TokenNameARROW, new int[] { TokenNameARROW }, LambdaParameterListRule);
+		IntersectionCastGoal =     new Goal(TokenNameLPAREN, followSetOfCast(), IntersectionCastRule);
+		VarargTypeAnnotationGoal = new Goal(TokenNameAT, new int[] { TokenNameELLIPSIS }, VarargTypeAnnotationsRule);
+		ReferenceExpressionGoal =  new Goal(TokenNameLESS, new int[] { TokenNameCOLON_COLON }, ReferenceExpressionRule);
+	}
+
+
+	Goal(int first, int [] follow, int rule) {
+		this.first = first;
+		this.follow = follow;
+		this.rule = rule;
+	}
+	
+	boolean hasBeenReached(int act, int token) {
+		/*
+		System.out.println("[Goal = " + Parser.name[Parser.non_terminal_index[Parser.lhs[this.rule]]] + "]  " + "Saw: " + Parser.name[Parser.non_terminal_index[Parser.lhs[act]]] + "::" +  //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+				Parser.name[Parser.terminal_index[token]]);
+		*/
+		if (act == this.rule) {
+			for (int i = 0, length = this.follow.length; i < length; i++)
+				if (this.follow[i] == token)
+					return true;
+		}
+		return false;
+	}
+	
+	private static int [] followSetOfCast() {
+		return new int [] { TokenNameIdentifier, TokenNamenew, TokenNamesuper, TokenNamethis,
+				TokenNamefalse, TokenNametrue, TokenNamenull, 
+				TokenNameIntegerLiteral, TokenNameLongLiteral, TokenNameFloatingPointLiteral, TokenNameDoubleLiteral, TokenNameCharacterLiteral, TokenNameStringLiteral, 
+				TokenNameNOT, TokenNameTWIDDLE, TokenNameLPAREN
+		};
+	}
+}
+// Vanguard Parser - A Private utility helper class for the scanner.
+private static final class VanguardParser extends Parser {
+	
+	public static final boolean SUCCESS = true;
+	public static final boolean FAILURE = false;
+	
+	public VanguardParser(VanguardScanner scanner) {
+		this.scanner = scanner;
+	}
+	
+	// Canonical LALR pushdown automaton identical to Parser.parse() minus side effects of any kind, returns the rule reduced.
+	protected boolean parse(Goal goal) {
+		try {
+			int act = START_STATE;
+			this.stateStackTop = -1;
+			this.currentToken = goal.first; 
+			ProcessTerminals : for (;;) {
+				int stackLength = this.stack.length;
+				if (++this.stateStackTop >= stackLength) {
+					System.arraycopy(
+						this.stack, 0,
+						this.stack = new int[stackLength + StackIncrement], 0,
+						stackLength);
+				}
+				this.stack[this.stateStackTop] = act;
+
+				act = Parser.tAction(act, this.currentToken);
+				if (act == ERROR_ACTION) {
+					return FAILURE;
+				}
+				if (act <= NUM_RULES) {
+					this.stateStackTop--;
+				} else if (act > ERROR_ACTION) { /* shift-reduce */
+					this.unstackedAct = act;
+					try {
+						this.currentToken = this.scanner.getNextToken();
+					} finally {
+						this.unstackedAct = ERROR_ACTION;
+					}
+					act -= ERROR_ACTION;
+				} else {
+				    if (act < ACCEPT_ACTION) { /* shift */
+				    	this.unstackedAct = act;
+						try {
+							this.currentToken = this.scanner.getNextToken();
+						} finally {
+							this.unstackedAct = ERROR_ACTION;
+						}
+						continue ProcessTerminals;
+					}
+				    return FAILURE; // accept - we should never reach this state, we accept at reduce with a right member of follow set below.
+				}
+
+				// ProcessNonTerminals :
+				do { /* reduce */
+					if (goal.hasBeenReached(act, this.currentToken))
+						return SUCCESS;
+					this.stateStackTop -= (Parser.rhs[act] - 1);
+					act = Parser.ntAction(this.stack[this.stateStackTop], Parser.lhs[act]);
+				} while (act <= NUM_RULES);
+			}
+		} catch (Exception e) {
+			return FAILURE;
+		}
+	}
+	public String toString() {
+		return "\n\n\n----------------Scanner--------------\n" + this.scanner.toString(); //$NON-NLS-1$;
+	}
+}
+
+private VanguardParser getVanguardParser() {
+	if (this.vanguardParser == null) {
+		this.vanguardScanner = new VanguardScanner(this.sourceLevel, this.complianceLevel);
+		this.vanguardParser = new VanguardParser(this.vanguardScanner);
+		this.vanguardScanner.setActiveParser(this.vanguardParser);
+	}
+	this.vanguardScanner.setSource(this.source);
+	this.vanguardScanner.resetTo(this.startPosition, this.eofPosition - 1);
+	return this.vanguardParser;
+}
+
+protected final boolean maybeAtLambdaOrCast() { // Could the '(' we saw just now herald a lambda parameter list or a cast expression ? (the possible locations for both are identical.)
+
+	switch (this.lookBack[1]) {
+		case TokenNameIdentifier:
+		case TokenNamecatch:
+		case TokenNamethis:
+		case TokenNamesuper:
+		case TokenNameif:
+		case TokenNameswitch:
+		case TokenNamewhile:
+		case TokenNamefor:
+		case TokenNamesynchronized:
+		case TokenNametry:
+			return false; // not a viable prefix for cast or lambda.
+		default:
+			return this.activeParser.atConflictScenario(TokenNameLPAREN);
+	}
+}
+		
+
+protected final boolean maybeAtReferenceExpression() { // Did the '<' we saw just now herald a reference expression's type arguments and trunk ?
+	switch (this.lookBack[1]) {
+		case TokenNameIdentifier:
+			switch (this.lookBack[0]) {
+				case TokenNameSEMICOLON:  // for (int i = 0; i < 10; i++);
+				case TokenNameRBRACE:     // class X { void foo() {} X<String> x = null; }
+				case TokenNameclass:      // class X<T> {}
+				case TokenNameinterface:  // interface I<T> {}
+				case TokenNameenum:       // enum E<T> {}
+				case TokenNamefinal:      // final Collection<String>
+				case TokenNameLESS:       // Collection<IScalarData<AbstractData>>
+				case TokenNameGREATER:    // public <T> List<T> foo() { /* */ }
+				case TokenNameRIGHT_SHIFT:// static <T extends SelfType<T>> List<T> makeSingletonList(T t) { /* */ }
+				case TokenNamenew:        // new ArrayList<String>();
+				case TokenNamepublic:     // public List<String> foo() {}
+				case TokenNameabstract:   // abstract List<String> foo() {}
+				case TokenNameprivate:    // private List<String> foo() {}
+				case TokenNameprotected:  // protected List<String> foo() {}
+				case TokenNamestatic:     // public static List<String> foo() {}
+				case TokenNameextends:    // <T extends Y<Z>>
+				case TokenNamesuper:      // ? super Context<N>
+				case TokenNameAND:        // T extends Object & Comparable<? super T>
+				case TokenNameimplements: // class A implements I<Z>
+				case TokenNamethrows:     // throws Y<Z>
+				case TokenNameAT:         // @Deprecated <T> void foo() {} 
+				case TokenNameinstanceof: // if (o instanceof List<E>[])  
+					return false;
+				default:
+					break;
+			}
+			break;
+		case TokenNameNotAToken: // Not kosher, don't touch.
+			break;
+		default:
+			return false;
+	}
+	return this.activeParser.atConflictScenario(TokenNameLESS);
+}
+private final boolean maybeAtEllipsisAnnotationsStart() { // Did the '@' we saw just now herald a type annotation on a ... ? Presumed to be at type annotation already.
+	if (this.consumingEllipsisAnnotations)
+		return false;
+	switch (this.lookBack[1]) {
+		case TokenNamenew:
+		case TokenNameCOMMA:
+		case TokenNameextends:
+		case TokenNamesuper:
+		case TokenNameimplements:
+		case TokenNameDOT:
+		case TokenNameLBRACE:
+		case TokenNameinstanceof:
+		case TokenNameLESS:
+		case TokenNameAND:
+		case TokenNamethrows:
+			return false;
+		default:
+			return true;
+	}
+}
+protected final boolean atTypeAnnotation() { // Did the '@' we saw just now herald a type annotation ? We should not ask the parser whether it would shift @308 !
+	return !this.activeParser.atConflictScenario(TokenNameAT);
+}
+//{ObjectTeams: one more variant of '@' to check: 
+protected final boolean atTypeAnchor() { // Did the '@' we saw just now herald a type anchor ?
+	return this.activeParser.atConflictScenario(TokenNameATOT);
+}
+// SH}
+public void setActiveParser(ConflictedParser parser) {
+	this.activeParser  = parser;
+	this.lookBack[0] = this.lookBack[1] = TokenNameNotAToken;  // no hand me downs please.
+}
+private int disambiguatedToken(int token) {
+	final VanguardParser parser = getVanguardParser();
+	if (token == TokenNameLPAREN  && maybeAtLambdaOrCast()) {
+		if (parser.parse(Goal.LambdaParameterListGoal) == VanguardParser.SUCCESS) {
+			this.nextToken = TokenNameLPAREN;
+			return TokenNameBeginLambda;
+		}
+		this.vanguardScanner.resetTo(this.startPosition, this.eofPosition - 1);
+		if (parser.parse(Goal.IntersectionCastGoal) == VanguardParser.SUCCESS) {
+			this.nextToken = TokenNameLPAREN;
+			return TokenNameBeginIntersectionCast;
+		}
+	} else if (token == TokenNameLESS && maybeAtReferenceExpression()) {
+		if (parser.parse(Goal.ReferenceExpressionGoal) == VanguardParser.SUCCESS) {
+			this.nextToken = TokenNameLESS;
+			return TokenNameBeginTypeArguments;
+		}
+	} else if (token == TokenNameAT && atTypeAnnotation()) {
+//{ObjectTeams: '@' can mean 3 things now:
+	  if (atTypeAnchor()) {
+		token = TokenNameATOT;
+	  } else {
+// orig:
+		token = TokenNameAT308;
+		if (maybeAtEllipsisAnnotationsStart()) {
+			if (parser.parse(Goal.VarargTypeAnnotationGoal) == VanguardParser.SUCCESS) {
+				this.consumingEllipsisAnnotations = true;
+				this.nextToken = TokenNameAT308;
+				return TokenNameAT308DOTDOTDOT;
+			}
+		}
+// :giro
+	  }
+// SH
+	}
+	return token;
+}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
index eb56a26..f8c8539 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/TerminalTokens.java
@@ -4,7 +4,16 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -29,140 +38,155 @@
 public interface TerminalTokens {
 
 	// special tokens not part of grammar - not autogenerated
-	int
+	int 
+		TokenNameNotAToken = 0,
 	    TokenNameWHITESPACE = 1000,
 		TokenNameCOMMENT_LINE = 1001,
 		TokenNameCOMMENT_BLOCK = 1002,
 		TokenNameCOMMENT_JAVADOC = 1003;
 
 	int
-      TokenNameIdentifier = 22,
-      TokenNameabstract = 60,
-      TokenNameassert = 93,
-      TokenNameboolean = 33,
-      TokenNamebreak = 94,
-      TokenNamebyte = 34,
-      TokenNamecase = 114,
-      TokenNamecatch = 111,
-      TokenNamechar = 35,
-      TokenNameclass = 78,
-      TokenNamecontinue = 95,
-      TokenNameconst = 127,
-      TokenNamedefault = 108,
-      TokenNamedo = 96,
-      TokenNamedouble = 36,
-      TokenNameelse = 117,
-      TokenNameenum = 106,
-      TokenNameextends = 107,
-      TokenNamefalse = 47,
-      TokenNamefinal = 61,
-      TokenNamefinally = 115,
-      TokenNamefloat = 37,
-      TokenNamefor = 97,
-      TokenNamegoto = 128,
-      TokenNameif = 98,
-      TokenNameimplements = 125,
-      TokenNameimport = 112,
-      TokenNameinstanceof = 14,
-      TokenNameint = 38,
-      TokenNameinterface = 80,
-      TokenNamelong = 39,
-      TokenNamenative = 62,
-      TokenNamenew = 44,
-      TokenNamenull = 48,
-      TokenNamepackage = 113,
-      TokenNameprivate = 63,
-      TokenNameprotected = 64,
-      TokenNamepublic = 65,
-      TokenNamereturn = 99,
-      TokenNameshort = 40,
-      TokenNamestatic = 57,
-      TokenNamestrictfp = 66,
-      TokenNamesuper = 42,
-      TokenNameswitch = 100,
-      TokenNamesynchronized = 58,
-      TokenNamethis = 43,
-      TokenNamethrow = 101,
-      TokenNamethrows = 118,
-      TokenNametransient = 67,
-      TokenNametrue = 49,
-      TokenNametry = 102,
-      TokenNamevoid = 41,
-      TokenNamevolatile = 68,
+      TokenNameIdentifier = 19,
+      TokenNameabstract = 54,
+      TokenNameassert = 82,
+      TokenNameboolean = 109,
+      TokenNamebreak = 83,
+      TokenNamebyte = 110,
+      TokenNamecase = 111,
+      TokenNamecatch = 112,
+      TokenNamechar = 113,
+      TokenNameclass = 73,
+      TokenNamecontinue = 84,
+      TokenNameconst = 136,
+      TokenNamedefault = 79,
+      TokenNamedo = 85,
+      TokenNamedouble = 114,
+      TokenNameelse = 124,
+      TokenNameenum = 76,
+      TokenNameextends = 105,
+      TokenNamefalse = 40,
+      TokenNamefinal = 55,
+      TokenNamefinally = 122,
+      TokenNamefloat = 115,
+      TokenNamefor = 86,
+      TokenNamegoto = 137,
+      TokenNameif = 87,
+      TokenNameimplements = 133,
+      TokenNameimport = 116,
+      TokenNameinstanceof = 17,
+      TokenNameint = 117,
+      TokenNameinterface = 74,
+      TokenNamelong = 118,
+      TokenNamenative = 56,
+      TokenNamenew = 37,
+      TokenNamenull = 41,
+      TokenNamepackage = 106,
+      TokenNameprivate = 57,
+      TokenNameprotected = 58,
+      TokenNamepublic = 59,
+      TokenNamereturn = 88,
+      TokenNameshort = 119,
+      TokenNamestatic = 50,
+      TokenNamestrictfp = 60,
+      TokenNamesuper = 35,
+      TokenNameswitch = 89,
+      TokenNamesynchronized = 51,
+      TokenNamethis = 36,
+      TokenNamethrow = 90,
+      TokenNamethrows = 125,
+      TokenNametransient = 61,
+      TokenNametrue = 42,
+      TokenNametry = 91,
+      TokenNamevoid = 120,
+      TokenNamevolatile = 62,
       TokenNamewhile = 81,
-      TokenNameas = 103,
-      TokenNamebase = 31,
-      TokenNamecallin = 69,
-      TokenNameplayedBy = 126,
-      TokenNameprecedence = 116,
-      TokenNamereadonly = 70,
-      TokenNameteam = 59,
-      TokenNametsuper = 46,
-      TokenNamewhen = 109,
-      TokenNamewith = 110,
-      TokenNamewithin = 104,
-      TokenNamereplace = 120,
-      TokenNameafter = 119,
-      TokenNamebefore = 121,
-      TokenNameget = 122,
-      TokenNameset = 123,
-      TokenNameIntegerLiteral = 50,
-      TokenNameLongLiteral = 51,
-      TokenNameFloatingPointLiteral = 52,
-      TokenNameDoubleLiteral = 53,
-      TokenNameCharacterLiteral = 54,
-      TokenNameStringLiteral = 55,
-      TokenNamePLUS_PLUS = 9,
-      TokenNameMINUS_MINUS = 10,
-      TokenNameEQUAL_EQUAL = 18,
-      TokenNameLESS_EQUAL = 15,
-      TokenNameGREATER_EQUAL = 16,
-      TokenNameNOT_EQUAL = 19,
-      TokenNameLEFT_SHIFT = 17,
-      TokenNameRIGHT_SHIFT = 12,
-      TokenNameUNSIGNED_RIGHT_SHIFT = 13,
-      TokenNamePLUS_EQUAL = 82,
-      TokenNameMINUS_EQUAL = 83,
-      TokenNameMULTIPLY_EQUAL = 84,
-      TokenNameDIVIDE_EQUAL = 85,
-      TokenNameAND_EQUAL = 86,
-      TokenNameOR_EQUAL = 87,
-      TokenNameXOR_EQUAL = 88,
-      TokenNameREMAINDER_EQUAL = 89,
-      TokenNameLEFT_SHIFT_EQUAL = 90,
-      TokenNameRIGHT_SHIFT_EQUAL = 91,
-      TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 92,
-      TokenNameOR_OR = 27,
-      TokenNameAND_AND = 25,
-      TokenNamePLUS = 2,
-      TokenNameMINUS = 3,
-      TokenNameNOT = 71,
-      TokenNameREMAINDER = 6,
-      TokenNameXOR = 21,
-      TokenNameAND = 20,
-      TokenNameMULTIPLY = 4,
-      TokenNameOR = 23,
-      TokenNameTWIDDLE = 72,
-      TokenNameDIVIDE = 7,
-      TokenNameGREATER = 11,
-      TokenNameLESS = 5,
-      TokenNameLPAREN = 26,
-      TokenNameRPAREN = 28,
-      TokenNameLBRACE = 74,
-      TokenNameRBRACE = 32,
-      TokenNameLBRACKET = 8,
-      TokenNameRBRACKET = 76,
-      TokenNameSEMICOLON = 29,
-      TokenNameQUESTION = 24,
-      TokenNameCOLON = 56,
-      TokenNameCOMMA = 30,
+      TokenNameas = 127,
+      TokenNamebase = 33,
+      TokenNamecallin = 63,
+      TokenNameplayedBy = 134,
+      TokenNameprecedence = 123,
+      TokenNamereadonly = 64,
+      TokenNameteam = 52,
+      TokenNametsuper = 38,
+      TokenNamewhen = 107,
+      TokenNamewith = 108,
+      TokenNamewithin = 92,
+      TokenNamereplace = 128,
+      TokenNameafter = 126,
+      TokenNamebefore = 129,
+      TokenNameget = 130,
+      TokenNameset = 131,
+      TokenNameIntegerLiteral = 43,
+      TokenNameLongLiteral = 44,
+      TokenNameFloatingPointLiteral = 45,
+      TokenNameDoubleLiteral = 46,
+      TokenNameCharacterLiteral = 47,
+      TokenNameStringLiteral = 48,
+      TokenNamePLUS_PLUS = 2,
+      TokenNameMINUS_MINUS = 3,
+      TokenNameEQUAL_EQUAL = 20,
+      TokenNameLESS_EQUAL = 14,
+      TokenNameGREATER_EQUAL = 15,
+      TokenNameNOT_EQUAL = 21,
+      TokenNameLEFT_SHIFT = 18,
+      TokenNameRIGHT_SHIFT = 13,
+      TokenNameUNSIGNED_RIGHT_SHIFT = 16,
+      TokenNamePLUS_EQUAL = 93,
+      TokenNameMINUS_EQUAL = 94,
+      TokenNameMULTIPLY_EQUAL = 95,
+      TokenNameDIVIDE_EQUAL = 96,
+      TokenNameAND_EQUAL = 97,
+      TokenNameOR_EQUAL = 98,
+      TokenNameXOR_EQUAL = 99,
+      TokenNameREMAINDER_EQUAL = 100,
+      TokenNameLEFT_SHIFT_EQUAL = 101,
+      TokenNameRIGHT_SHIFT_EQUAL = 102,
+      TokenNameUNSIGNED_RIGHT_SHIFT_EQUAL = 103,
+      TokenNameOR_OR = 31,
+      TokenNameAND_AND = 30,
+      TokenNamePLUS = 4,
+      TokenNameMINUS = 5,
+      TokenNameNOT = 67,
+      TokenNameREMAINDER = 9,
+      TokenNameXOR = 25,
+      TokenNameAND = 22,
+      TokenNameMULTIPLY = 8,
+      TokenNameOR = 28,
+      TokenNameTWIDDLE = 68,
+      TokenNameDIVIDE = 10,
+      TokenNameGREATER = 12,
+      TokenNameLESS = 11,
+      TokenNameLPAREN = 23,
+      TokenNameRPAREN = 24,
+      TokenNameLBRACE = 53,
+      TokenNameRBRACE = 34,
+      TokenNameLBRACKET = 7,
+      TokenNameRBRACKET = 70,
+      TokenNameSEMICOLON = 27,
+      TokenNameQUESTION = 29,
+      TokenNameCOLON = 66,
+      TokenNameCOMMA = 32,
       TokenNameDOT = 1,
-      TokenNameEQUAL = 77,
-      TokenNameAT = 45,
-      TokenNameELLIPSIS = 124,
-      TokenNameBINDIN = 79,
-      TokenNameBINDOUT = 75,
-      TokenNameCALLOUT_OVERRIDE = 105,
-      TokenNameEOF = 73,
-      TokenNameERROR = 129;
+      TokenNameEQUAL = 75,
+      TokenNameAT = 39,
+      TokenNameELLIPSIS = 132,
+      TokenNameARROW = 77,
+      TokenNameCOLON_COLON = 6,
+      TokenNameBeginLambda = 49,
+      TokenNameBeginIntersectionCast = 69,
+      TokenNameBeginTypeArguments = 80,
+      TokenNameElidedSemicolonAndRightBrace = 71,
+      TokenNameAT308 = 26,
+      TokenNameAT308DOTDOTDOT = 135,
+      TokenNameATOT = 121,
+      TokenNameBINDIN = 78,
+      TokenNameCALLOUT_OVERRIDE = 104,
+      TokenNameSYNTHBINDOUT = 72,
+      TokenNameEOF = 65,
+      TokenNameERROR = 138;
+
+
+	// This alias is statically inserted by generateOTParser.sh:
+	int TokenNameBINDOUT = TokenNameARROW;
 }
+
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
index 7cb5028..ea3c6ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/DiagnoseParser.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
- * $Id: DiagnoseParser.java 19876 2009-04-13 19:39:46Z stephan $
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -15,6 +18,7 @@
 
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.parser.ConflictedParser;
 import org.eclipse.jdt.internal.compiler.parser.Parser;
 import org.eclipse.jdt.internal.compiler.parser.ParserBasicInformation;
 import org.eclipse.jdt.internal.compiler.parser.RecoveryScanner;
@@ -32,7 +36,7 @@
  *
  * @version $Id: DiagnoseParser.java 19876 2009-04-13 19:39:46Z stephan $
  */
-public class DiagnoseParser implements ParserBasicInformation, TerminalTokens {
+public class DiagnoseParser implements ParserBasicInformation, TerminalTokens, ConflictedParser {
 	private static final boolean DEBUG = false;
 	private boolean DEBUG_PARSECHECK = false;
 
@@ -205,6 +209,7 @@
 			oldRecord = this.recoveryScanner.record;
 			this.recoveryScanner.record = record;
 		}
+		this.parser.scanner.setActiveParser(this);
 		try {
 			this.lexStream.reset();
 
@@ -448,6 +453,7 @@
 			if(this.recoveryScanner != null) {
 				this.recoveryScanner.record = oldRecord;
 			}
+			this.parser.scanner.setActiveParser(null);
 		}
 		return;
 	}
@@ -455,8 +461,9 @@
 //{ObjectTeams: WATCHOUT: needs to be updated with each new grammar!!!!
 	private void setScannerState(int act) {
 		switch(act) {
-		case 237: this.lexStream.forceBaseIsIdentifier(); break; // ForceBaseIsIdentifier
-		case 238: this.lexStream.restoreBaseKeyword(); break;    // RestoreBaseKeyword
+		case 190: this.lexStream.forceBaseIsIdentifier(); break; // ForceBaseIsIdentifier
+		case 191: this.lexStream.restoreBaseKeyword(); break;    // RestoreBaseKeyword
+		case 284: this.parser.scanner._insideParameterMapping = true; break; // NestedParamMappings
 		}
 	}
 //SH}
@@ -1458,6 +1465,9 @@
 	            do  {
 	                this.tempStackTop -= (Parser.rhs[act]-1);
 	                int lhs_symbol = Parser.lhs[act];
+//{ObjectTeams: integrate stateful scanner:
+	                setScannerState(act);
+// SH}
 	                act =  (this.tempStackTop > max_pos
 	                            ?  this.tempStack[this.tempStackTop]
 	                            :  stck[this.tempStackTop]);
@@ -1543,6 +1553,9 @@
 								 	continue next;
 								}
 	                            top -= (Parser.rhs[act]-1);
+//{ObjectTeams: integrate stateful scanner:
+		                        setScannerState(act);
+// SH}
 	                            act = Parser.ntAction(stck[top], Parser.lhs[act]);
 	                        }
 	                        top++;
@@ -2156,6 +2169,7 @@
 			max_pos = max_pos < this.tempStackTop ? max_pos : this.tempStackTop;
 		} // process_terminal;
 	}
+
 	private void reportError(int msgCode, int nameIndex, int leftToken, int rightToken) {
 		reportError(msgCode, nameIndex, leftToken, rightToken, 0);
 	}
@@ -2303,10 +2317,13 @@
 	            	addedTokens = new int[Parser.scope_rhs.length - Parser.scope_suffix[- nameIndex]];
 	            }
 
+	            int insertedToken = TokenNameNotAToken;
 				for (int i = Parser.scope_suffix[- nameIndex]; Parser.scope_rhs[i] != 0; i++) {
 					buf.append(Parser.readableName[Parser.scope_rhs[i]]);
 					if (Parser.scope_rhs[i + 1] != 0) // any more symbols to print?
 						buf.append(' ');
+					else
+						insertedToken = Parser.reverse_index[Parser.scope_rhs[i]];
 
 					if(addedTokens != null) {
 	                	int tmpAddedToken = Parser.reverse_index[Parser.scope_rhs[i]];
@@ -2345,6 +2362,13 @@
 	            }
 
 				if (scopeNameIndex != 0) {
+					if (insertedToken == TokenNameElidedSemicolonAndRightBrace) {
+						/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=383046, we should never ever report the diagnostic, "Syntax error, insert ElidedSemicolonAndRightBraceto complete LambdaBody"
+						   as it is a synthetic token. Instead we should simply repair and move on. See how the regular Parser behaves at Parser.consumeElidedLeftBraceAndReturn and Parser.consumeExpression.
+						   See also: point (4) in https://bugs.eclipse.org/bugs/show_bug.cgi?id=380194#c15
+						*/
+						break;
+					}
 					if(this.reportProblem) problemReporter().parseErrorInsertToComplete(
 						errorStart,
 						errorEnd,
@@ -2479,12 +2503,14 @@
 	            if(this.recoveryScanner != null) {
 	            	addedTokens = new int[Parser.scope_rhs.length - Parser.scope_suffix[- nameIndex]];
 	            }
-
+	            int insertedToken = TokenNameNotAToken;
 	            for (int i = Parser.scope_suffix[- nameIndex]; Parser.scope_rhs[i] != 0; i++) {
 
 	                buf.append(Parser.readableName[Parser.scope_rhs[i]]);
 	                if (Parser.scope_rhs[i+1] != 0)
 	                     buf.append(' ');
+	                else
+	                	insertedToken = Parser.reverse_index[Parser.scope_rhs[i]];
 
 	                if(addedTokens != null) {
 	                	int tmpAddedToken = Parser.reverse_index[Parser.scope_rhs[i]];
@@ -2520,6 +2546,13 @@
 	            	this.recoveryScanner.insertTokens(addedTokens, completedToken, errorEnd);
 	            }
 	            if (scopeNameIndex != 0) {
+	            	if (insertedToken == TokenNameElidedSemicolonAndRightBrace) {
+						/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=383046, we should never ever report the diagnostic, "Syntax error, insert ElidedSemicolonAndRightBraceto complete LambdaBody"
+						   as it is a synthetic token. Instead we should simply repair and move on. See how the regular Parser behaves at Parser.consumeElidedLeftBraceAndReturn and Parser.consumeExpression.
+						   See also: point (4) in https://bugs.eclipse.org/bugs/show_bug.cgi?id=380194#c15
+						*/
+						break;
+					}
 	                if(this.reportProblem) problemReporter().parseErrorInsertToComplete(
 						errorStart,
 						errorEnd,
@@ -2606,4 +2639,14 @@
 
 		return res.toString();
 	}
+
+	public boolean atConflictScenario(int token) {
+		/* There is too much voodoo that goes on here in DiagnoseParser (multiple machines, lexer stream reset etc.)
+		   So we take a simple minded view that we will always ask for disambiguation, except there is one scenario 
+		   that needs special handling, we let the lexer stream deal with that: In X<String>.Y<Integer>:: the second
+		   '<' should not be tagged for disambiguation. If a synthetic token gets injected there, there will be syntax
+		   error. See that this is not a problem for the regular/normal parser.
+		*/ 
+		return (token == TokenNameLPAREN || token == TokenNameAT || (token == TokenNameLESS && !this.lexStream.awaitingColonColon()));
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/LexStream.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/LexStream.java
index 16a809e..81c8beb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/LexStream.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/diagnose/LexStream.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
- * $Id: LexStream.java 19876 2009-04-13 19:39:46Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -58,6 +61,7 @@
 
 	private int previousInterval = -1;
 	private int currentInterval = -1;
+	private boolean awaitingColonColon;
 
 	public LexStream(int size, Scanner scanner, int[] intervalStartToSkip, int[] intervalEndToSkip, int[] intervalFlagsToSkip, int firstToken, int init, int eof) {
 		this.tokenCache = new Token[size];
@@ -73,7 +77,7 @@
 		this.intervalStartToSkip = intervalStartToSkip;
 		this.intervalEndToSkip = intervalEndToSkip;
 		this.intervalFlagsToSkip = intervalFlagsToSkip;
-
+		this.awaitingColonColon = false;
 		scanner.resetTo(init, eof);
 //{ObjectTeams: fresh start?
 		if (init == 0)
@@ -89,6 +93,11 @@
 		while(tokenNotFound) {
 			try {
 				int tokenKind =  this.scanner.getNextToken();
+				if (tokenKind == TokenNameBeginTypeArguments) {
+					this.awaitingColonColon = true;
+				} else if (tokenKind == TokenNameCOLON_COLON) {
+					this.awaitingColonColon = false;
+				}
 				if(tokenKind != TokenNameEOF) {
 					int start = this.scanner.getCurrentTokenStartPosition();
 					int end = this.scanner.getCurrentTokenEndPosition();
@@ -309,4 +318,8 @@
 
 		return res.toString();
 	}
+
+	public boolean awaitingColonColon() {
+		return this.awaitingColonColon;
+	}
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
index ff0b82d..068865c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser1.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
index 344cc01..e54bda8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser10.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
index 45dab48..688cf64 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser11.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
index 7dbb0b5..08c9dde 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser12.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
index f28f13b..eff883a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser13.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
index b5cd23b..13af708 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser14.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
index d62b647..477f2de 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser15.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
index 5d848dc..e694120 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser16.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
index 700600d..d1d6f53 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser17.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
index 5ecd5b6..e4e4737 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser18.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
index 088d4bd..db4d2fc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser19.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
index ca05a2c..8515b79 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser2.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
index eadb7d2..32275d3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser20.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
index 8f26ee6..1dc67ee 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser21.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc
index 6c768b0..0ee108b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser22.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc
index 636ffd2..a83d8d6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser23.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc
index da4cf44..c349a69 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser24.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
index c058720..01d3e53 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser3.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
index 1cdfa48..7bb0135 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser4.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
index 1cf0ea7..0480577 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser5.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
index 6904e40..a37083b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser6.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
index ab5aa38..b3d412d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser7.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
index 9dac692..3dfa9a2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser8.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
index 745377b..5e50132 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/parser9.rsc
Binary files differ
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props
index cc0035b..c37ddaf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser/readableNames.props
@@ -1,13 +1,3 @@
-###############################################################################
-# Copyright (c) 2012 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
-###############################################################################
 ,opt=,
 ;opt=;
 AbstractMethodDeclaration=MethodDeclaration
@@ -15,6 +5,7 @@
 AdditionalBound=AdditionalBound
 AdditionalBoundList1=AdditionalBoundList1
 AdditionalBoundList=AdditionalBoundList
+AdditionalBoundsListOpt=AdditionalBoundsListOpt
 AdditiveExpression=Expression
 AdditiveExpression_NotName=Expression
 AllocationHeader=AllocationHeader
@@ -33,6 +24,7 @@
 AnnotationTypeMemberDeclaration=AnnotationTypeMemberDeclaration
 AnnotationTypeMemberDeclarations=AnnotationTypeMemberDeclarations
 AnnotationTypeMemberDeclarationsopt=AnnotationTypeMemberDeclarations
+AnyTypeAnchor=typeAnchor
 ArgumentList=ArgumentList
 ArgumentListopt=ArgumentList
 Arguments=Arguments
@@ -42,7 +34,6 @@
 ArrayCreationWithArrayInitializer=ArrayCreationWithArrayInitializer
 ArrayCreationWithoutArrayInitializer=ArrayCreationWithoutArrayInitializer
 ArrayInitializer=ArrayInitializer
-ArrayLiftingType=ArrayLiftingType
 ArrayType=ArrayType
 ArrayTypeWithTypeArgumentsName=ArrayTypeWithTypeArgumentsName
 AssertStatement=AssertStatement
@@ -88,9 +79,11 @@
 CalloutParameterMappings=CalloutParameterMappings
 CalloutParameterMappingsopt=EmptyParameterMappings
 CastExpression=CastExpression
+CastNameAndBounds=CastNameAndBounds
 CatchClause=CatchClause
 CatchFormalParameter=FormalParameter
 CatchHeader=CatchHeader
+CatchLiftingTypeopt=LiftingType
 CatchType=CatchType
 Catches=Catches
 Catchesopt=Catches
@@ -130,6 +123,8 @@
 ConstructorHeaderName=ConstructorHeaderName
 ContinueStatement=ContinueStatement
 CreateInitializer=CreateInitializer
+DefaultMethodHeader=MethodDeclaration
+DefaultMethodHeaderName=MethodHeaderName
 DefaultValue=DefaultValue
 Diet=Diet
 DimWithOrWithOutExpr=Dimension
@@ -138,6 +133,7 @@
 DimsLoop=Dimensions
 Dimsopt=Dimensions
 DoStatement=DoStatement
+ElidedLeftBraceAndReturn=ElidedLeftBraceAndReturn
 EmptyStatement=EmptyStatement
 EnhancedForStatement=EnhancedForStatement
 EnhancedForStatementHeader=EnhancedForStatementHeader
@@ -192,6 +188,7 @@
 Header1=Header1
 Header2=Header2
 Header=Header
+IdentifierOrNew=IdentifierOrNew
 IfThenElseStatement=IfStatement
 IfThenElseStatementNoShortIf=IfStatement
 IfThenStatement=IfStatement
@@ -203,6 +200,7 @@
 Initializer=Initializer
 InsideCastExpression=InsideCastExpression
 InsideCastExpressionLL1=InsideCastExpression
+InsideCastExpressionLL1WithBounds=InsideCastExpression
 InsideCastExpressionWithQualifiedGenerics=InsideCastExpression
 InstanceofExpression=Expression
 InstanceofExpression_NotName=Expression
@@ -224,16 +222,20 @@
 InvalidCallinBinding=InvalidCallinBinding
 InvalidCallinModifier=InvalidCallinModifier
 InvalidConstructorDeclaration=InvalidConstructorDeclaration
-InvalidDeclaredArrayLifting=InvalidDeclaredArrayLifting
 InvalidInitializer=InvalidInitializer
 Label=Label
 LabeledStatement=LabeledStatement
 LabeledStatementNoShortIf=LabeledStatement
-LiftingType=LiftingType
+LambdaBody=LambdaBody
+LambdaExpression=LambdaExpression
+LambdaParameterList=LambdaParameterList
+LambdaParameters=TypeElidedFormalParameter
+LiftingTypeopt=LiftingType
 Literal=Literal
 LocalVariableDeclaration=LocalVariableDeclaration
 LocalVariableDeclarationStatement=LocalVariableDeclarationStatement
 MarkerAnnotation=MarkerAnnotation
+MarkerTypeAnnotation=MarkerAnnotation
 MemberValue=MemberValue
 MemberValueArrayInitializer=MemberValueArrayInitializer
 MemberValuePair=MemberValuePair
@@ -256,6 +258,7 @@
 MethodSpecsLong=MethodSpecsLong
 Modifier=Modifier
 Modifiers=Modifiers
+ModifiersWithDefault=Modifiers
 Modifiersopt=Modifiers
 MultiplicativeExpression=Expression
 MultiplicativeExpression_NotName=Expression
@@ -263,7 +266,10 @@
 NestedMethod=NestedMethod
 NestedParamMappings=NestedParameterMappings
 NestedType=NestedType
+NonWildTypeArgumentsopt=NonWildTypeArgumentsopt
 NormalAnnotation=NormalAnnotation
+NormalTypeAnnotation=NormalAnnotation
+NotAnAnchor=annotatedTypeArgument
 NumericType=NumericType
 OneDimLoop=Dimension
 OnlySynchronized=OnlySynchronized
@@ -274,6 +280,8 @@
 PackageDeclaration=PackageDeclaration
 PackageDeclarationName=PackageDeclarationName
 ParameterMapping=ParameterMapping
+ParenthesizedCastNameAndBounds=ParenthesizedCastNameAndBounds
+ParenthesizedLambdaParameterList=ParenthesizedLambdaParameterList
 PostDecrementExpression=PostDecrementExpression
 PostIncrementExpression=PostIncrementExpression
 PostfixExpression=Expression
@@ -293,6 +301,7 @@
 PushPosition=PushPosition
 PushRPAREN=)
 PushRealModifiers=PushRealModifiers
+PushZeroTypeAnnotations=ZeroTypeAnnotations
 QualifiedClassBodyopt=ClassBody
 QualifiedEnterAnonymousClassBody=EnterAnonymousClassBody
 QualifiedName=QualifiedName
@@ -305,10 +314,14 @@
 RecoveryMethodHeaderName=MethodHeaderName
 RecoveryMethodSpecLong=MethodSpecLong
 ReduceImports=ReduceImports
+ReferenceExpression=ReferenceExpression
+ReferenceExpressionTypeArgumentsAndTrunk0=ReferenceExpressionTypeArgumentsAndTrunk
+ReferenceExpressionTypeArgumentsAndTrunk=ReferenceExpressionTypeArgumentsAndTrunk
 ReferenceType1=ReferenceType1
 ReferenceType2=ReferenceType2
 ReferenceType3=ReferenceType3
 ReferenceType=ReferenceType
+RejectTypeAnnotations=RejectTypeAnnotations
 RelationalExpression=Expression
 RelationalExpression_NotName=Expression
 Resource=Resource
@@ -325,6 +338,7 @@
 SingleBaseImportDeclarationName=SingleBaseImportDeclarationName
 SingleMemberAnnotation=SingleMemberAnnotation
 SingleMemberAnnotationMemberValue=MemberValue
+SingleMemberTypeAnnotation=SingleMemberAnnotation
 SingleStaticImportDeclaration=SingleStaticImportDeclaration
 SingleStaticImportDeclarationName=SingleStaticImportDeclarationName
 SingleTypeImportDeclaration=SingleTypeImportDeclaration
@@ -345,6 +359,7 @@
 SwitchLabels=SwitchLabels
 SwitchStatement=SwitchStatement
 SynchronizedStatement=SynchronizedStatement
+TentativeTypeAnchor=typeAnchor
 ThrowStatement=ThrowStatement
 TrailingSemiColon=;
 TryBlock=Block
@@ -352,6 +367,15 @@
 TryStatementWithResources=TryStatementWithResources
 Type=Type
 TypeAnchor=typeAnchor
+TypeAnchorOrAnnotatedTypeArgument1=TypeArgument
+TypeAnchorOrAnnotatedTypeArgument2=TypeArgument
+TypeAnchorOrAnnotatedTypeArgument3=TypeArgument
+TypeAnchorOrAnnotatedTypeArgument=TypeArgument
+TypeAnnotation=TypeAnnotation
+TypeAnnotationName=AnnotationName
+TypeAnnotations0=TypeAnnotations
+TypeAnnotations=TypeAnnotations
+TypeAnnotationsopt=TypeAnnotationsopt
 TypeArgument1=TypeArgument1
 TypeArgument2=TypeArgument2
 TypeArgument3=TypeArgument3
@@ -365,6 +389,8 @@
 TypeBoundOpt=TypeParameterBound
 TypeDeclaration=TypeDeclaration
 TypeDeclarations=TypeDeclarations
+TypeElidedFormalParameter=TypeElidedFormalParameter
+TypeElidedFormalParameterList=TypeElidedFormalParameterList
 TypeImportOnDemandDeclaration=TypeImportOnDemandDeclaration
 TypeImportOnDemandDeclarationName=TypeImportOnDemandDeclarationName
 TypeParameter1=TypeParameter1
@@ -374,6 +400,7 @@
 TypeParameterList=TypeParameterList
 TypeParameters=TypeParameters
 TypeValueParameter=TypeValueParameter
+UnannotatableName=UnannotatableQualifiedName
 UnaryExpression=Expression
 UnaryExpressionNotPlusMinus=Expression
 UnaryExpressionNotPlusMinus_NotName=Expression
@@ -383,6 +410,7 @@
 UnqualifiedEnterAnonymousClassBody=EnterAnonymousClassBody
 VariableDeclarator=VariableDeclarator
 VariableDeclaratorId=VariableDeclaratorId
+VariableDeclaratorIdOrThis=VariableDeclaratorId
 VariableDeclarators=VariableDeclarators
 VariableInitializer=VariableInitializer
 VariableInitializers=VariableInitializers
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
index fd0c035..7ab9175 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -41,7 +45,7 @@
 
 	public final static String[] NoArgument = CharOperation.NO_STRINGS;
 
-	final public IErrorHandlingPolicy policy;
+	public IErrorHandlingPolicy policy;
 	public final IProblemFactory problemFactory;
 	public final CompilerOptions options;
 
@@ -146,6 +150,14 @@
 	if (severity == ProblemSeverities.Ignore)
 		return;
 
+	 boolean mandatory = (severity & (ProblemSeverities.Error | ProblemSeverities.Optional)) == ProblemSeverities.Error;
+	 if (this.policy.ignoreAllErrors()) { 
+		 // Error is not to be exposed, but clients may need still notification as to whether there are silently-ignored-errors.
+		 if (mandatory)
+			 referenceContext.tagAsHavingIgnoredMandatoryErrors(problemId);
+		 return;
+	 }
+
 	if ((severity & ProblemSeverities.Optional) != 0 && problemId != IProblem.Task  && !this.options.ignoreSourceFolderWarningOption) {
 //{ObjectTeams: NPE prevention:
 	  if (unitResult != null) {
@@ -288,7 +300,6 @@
 
 	switch (severity & ProblemSeverities.Error) {
 		case ProblemSeverities.Error :
-			boolean mandatory = ((severity & ProblemSeverities.Optional) == 0);
 			record(problem, unitResult, referenceContext, mandatory);
 			if ((severity & ProblemSeverities.Fatal) != 0) {
 				// don't abort or tag as error if the error is suppressed
@@ -338,7 +349,13 @@
 		referenceContext,
 		unitResult);
 }
-public void record(CategorizedProblem problem, CompilationResult unitResult, ReferenceContext referenceContext, boolean optionalError) {
-	unitResult.record(problem, referenceContext, optionalError);
+public void record(CategorizedProblem problem, CompilationResult unitResult, ReferenceContext referenceContext, boolean mandatoryError) {
+	unitResult.record(problem, referenceContext, mandatoryError);
+}
+/** @return old policy. */
+public IErrorHandlingPolicy switchErrorHandlingPolicy(IErrorHandlingPolicy newPolicy) {
+	IErrorHandlingPolicy presentPolicy = this.policy;
+	this.policy = newPolicy;
+	return presentPolicy;
 }
 }
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index ee85629..80f3c8e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -20,16 +24,37 @@
  *								bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
  *								bug 365859 - [compiler][null] distinguish warnings based on flow analysis vs. null annotations
  *								bug 374605 - Unreasonable warning for enum-based switch statements
+ *								bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
+ *								bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
  *								bug 388281 - [compiler][null] inheritance of null annotations as an option
  *								bug 376053 - [compiler][resource] Strange potential resource leak problems
  *								bug 381443 - [compiler][null] Allow parameter widening from @NonNull to unannotated
  *								bug 393719 - [compiler] inconsistent warnings on iteration variables
+ *								bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
+ *								bug 388739 - [1.8][compiler] consider default methods when detecting whether a class needs to be declared abstract
  *								bug 331649 - [compiler][null] consider null annotations for fields
  *								bug 382789 - [compiler][null] warn when syntactically-nonnull expression is compared against null
  *								bug 376590 - Private fields with @Inject are ignored by unused field validation
  *								bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
- *								bug 395681 - [compiler] Improve simulation of javac6 behavior from bug 317719 after fixing bug 388795
- *******************************************************************************/
+ *								bug 402028 - [1.8][compiler] null analysis for reference expressions 
+ *								bug 401796 - [1.8][compiler] don't treat default methods as overriding an independent inherited abstract method
+ *								bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
+ *								bug 392384 - [1.8][compiler][null] Restore nullness info from type annotations in class files
+ *								Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+ *								Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+ *								Bug 415291 - [1.8][null] differentiate type incompatibilities due to null annotations
+ *								Bug 415850 - [1.8] Ensure RunJDTCoreTests can cope with null annotations enabled
+ *								Bug 414380 - [compiler][internal] QualifiedNameReference#indexOfFirstFieldBinding does not point to the first field
+ *								Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+ *								Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+ *      Jesper S Moller <jesper@selskabet.org> -  Contributions for
+ *								bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+ *								bug 382721 - [1.8][compiler] Effectively final variables needs special treatment
+ *								bug 384567 - [1.5][compiler] Compiler accepts illegal modifiers on package declaration
+ *								bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
+ *								bug 412151 - [1.8][compiler] Check repeating annotation's collection type
+ *								bug 419209 - [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
+ ********************************************************************************/
 package org.eclipse.jdt.internal.compiler.problem;
 
 import java.io.CharConversionException;
@@ -78,24 +103,29 @@
 import org.eclipse.jdt.internal.compiler.ast.FakedTrackingVariable;
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.FieldReference;
+import org.eclipse.jdt.internal.compiler.ast.FunctionalExpression;
 import org.eclipse.jdt.internal.compiler.ast.ImportReference;
 import org.eclipse.jdt.internal.compiler.ast.Initializer;
 import org.eclipse.jdt.internal.compiler.ast.InstanceOfExpression;
 import org.eclipse.jdt.internal.compiler.ast.JavadocSingleTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.LabeledStatement;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
 import org.eclipse.jdt.internal.compiler.ast.Literal;
 import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.MemberValuePair;
 import org.eclipse.jdt.internal.compiler.ast.MessageSend;
 import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.NameReference;
+import org.eclipse.jdt.internal.compiler.ast.NullAnnotationMatching;
 import org.eclipse.jdt.internal.compiler.ast.NullLiteral;
 import org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Receiver;
 import org.eclipse.jdt.internal.compiler.ast.Reference;
+import org.eclipse.jdt.internal.compiler.ast.ReferenceExpression;
 import org.eclipse.jdt.internal.compiler.ast.ReturnStatement;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
 import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
@@ -117,10 +147,12 @@
 import org.eclipse.jdt.internal.compiler.impl.ReferenceContext;
 import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
+import org.eclipse.jdt.internal.compiler.lookup.CaptureBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.InvocationSite;
 import org.eclipse.jdt.internal.compiler.lookup.LocalVariableBinding;
+import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
 import org.eclipse.jdt.internal.compiler.lookup.MemberTypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodScope;
@@ -374,6 +406,8 @@
 
 		case IProblem.PotentialNullLocalVariableReference:
 		case IProblem.PotentialNullMessageSendReference:
+		case IProblem.ArrayReferencePotentialNullReference:
+		case IProblem.DereferencingNullableExpression:
 		case IProblem.PotentialNullExpressionReference:
 		case IProblem.PotentialNullUnboxing:
 			return CompilerOptions.PotentialNullReference;
@@ -392,6 +426,9 @@
 		case IProblem.NonNullMessageSendComparisonYieldsFalse:
 		case IProblem.RedundantNullCheckOnNonNullSpecdField:
 		case IProblem.NonNullSpecdFieldComparisonYieldsFalse:
+		case IProblem.RedundantNullCheckAgainstNonNullType:
+		case IProblem.RedundantNullCheckOnField:
+		case IProblem.FieldComparisonYieldsFalse:
 			return CompilerOptions.RedundantNullCheck;
 
 		case IProblem.RequiredNonNullButProvidedNull:
@@ -401,10 +438,15 @@
 		case IProblem.IllegalDefinitionToNonNullParameter:
 		case IProblem.ParameterLackingNullableAnnotation:
 		case IProblem.CannotImplementIncompatibleNullness:
-		case IProblem.UninitializedNonNullField:
-		case IProblem.UninitializedNonNullFieldHintMissingDefault:
 		case IProblem.ConflictingNullAnnotations:
 		case IProblem.ConflictingInheritedNullAnnotations:
+		case IProblem.NullityMismatchingTypeAnnotation:
+		case IProblem.NullityMismatchingTypeAnnotationSuperHint:
+		case IProblem.NullityMismatchTypeArgument:
+		case IProblem.UninitializedNonNullField:
+		case IProblem.UninitializedNonNullFieldHintMissingDefault:
+		case IProblem.ReferenceExpressionParameterMismatchPromisedNullable:
+		case IProblem.ReferenceExpressionReturnNullRedef:
 			return CompilerOptions.NullSpecViolation;
 
 		case IProblem.ParameterLackingNonNullAnnotation:
@@ -413,6 +455,11 @@
 		case IProblem.RequiredNonNullButProvidedPotentialNull:
 			return CompilerOptions.NullAnnotationInferenceConflict;
 		case IProblem.RequiredNonNullButProvidedUnknown:
+		case IProblem.NullityUncheckedTypeAnnotationDetail:
+		case IProblem.NullityUncheckedTypeAnnotationDetailSuperHint:
+		case IProblem.ReferenceExpressionParameterRequiredNonnullUnchecked:
+		case IProblem.ReferenceExpressionReturnNullRedefUnchecked:
+		case IProblem.UnsafeNullnessCast:
 			return CompilerOptions.NullUncheckedConversion;
 		case IProblem.RedundantNullAnnotation:
 		case IProblem.RedundantNullDefaultAnnotation:
@@ -674,7 +721,7 @@
 			
 		case IProblem.UnusedTypeParameter:
 			return CompilerOptions.UnusedTypeParameter;
-	}
+}
 	return 0;
 }
 /**
@@ -1045,7 +1092,7 @@
 		location.sourceEnd);
 }
 public void annotationCircularity(TypeBinding sourceType, TypeBinding otherType, TypeReference reference) {
-	if (sourceType == otherType)
+	if (TypeBinding.equalsEquals(sourceType, otherType))
 		this.handle(
 			IProblem.AnnotationCircularitySelfReference,
 			new String[] {new String(sourceType.readableName())},
@@ -1161,8 +1208,8 @@
 		reference.sourceStart,
 		reference.sourceEnd);
 }
-public void argumentTypeCannotBeVoid(SourceTypeBinding type, AbstractMethodDeclaration methodDecl, Argument arg) {
-	String[] arguments = new String[] {new String(methodDecl.selector), new String(arg.name)};
+public void argumentTypeCannotBeVoid(ASTNode methodDecl, Argument arg) {
+	String[] arguments = new String[] { new String(arg.name) };
 	this.handle(
 		IProblem.ArgumentTypeCannotBeVoid,
 		arguments,
@@ -1279,6 +1326,16 @@
 			location.sourceEnd);
 	}
 }
+public void bytecodeExceeds64KLimit(LambdaExpression location) {
+	MethodBinding method = location.binding;
+		this.handle(
+			IProblem.BytecodeExceeds64KLimit,
+			new String[] {new String(method.selector), typesAsString(method, false)},
+			new String[] {new String(method.selector), typesAsString(method, true)},
+			ProblemSeverities.Error | ProblemSeverities.Abort | ProblemSeverities.Fatal,
+			location.sourceStart,
+			location.sourceEnd);
+}
 public void bytecodeExceeds64KLimit(TypeDeclaration location) {
 	this.handle(
 		IProblem.BytecodeExceeds64KLimitForClinit,
@@ -1342,13 +1399,13 @@
 		expresssion.sourceStart,
 		expresssion.sourceEnd);
 }
-public void cannotDireclyInvokeAbstractMethod(MessageSend messageSend, MethodBinding method) {
+public void cannotDireclyInvokeAbstractMethod(ASTNode invocationSite, MethodBinding method) {
 	this.handle(
 		IProblem.DirectInvocationOfAbstractMethod,
 		new String[] {new String(method.declaringClass.readableName()), new String(method.selector), typesAsString(method, false)},
 		new String[] {new String(method.declaringClass.shortReadableName()), new String(method.selector), typesAsString(method, true)},
-		messageSend.sourceStart,
-		messageSend.sourceEnd);
+		invocationSite.sourceStart,
+		invocationSite.sourceEnd);
 }
 public void cannotExtendEnum(SourceTypeBinding type, TypeReference superclass, TypeBinding superTypeBinding) {
 	String name = new String(type.sourceName());
@@ -1371,7 +1428,7 @@
 		importRef.sourceStart,
 		importRef.sourceEnd);
 }
-public void cannotInstantiate(TypeReference typeRef, TypeBinding type) {
+public void cannotInstantiate(Expression typeRef, TypeBinding type) {
 	this.handle(
 		IProblem.InvalidClassInstantiation,
 		new String[] {new String(type.readableName())},
@@ -1439,6 +1496,15 @@
 		nodeSourceStart(local, location),
 		nodeSourceEnd(local, location));
 }
+public void cannotReferToNonEffectivelyFinalOuterLocal(LocalVariableBinding local, ASTNode location) {
+	String[] arguments = new String[] { new String(local.readableName()) };
+	this.handle(
+		IProblem.OuterLocalMustBeEffectivelyFinal, 
+		arguments,
+		arguments,
+		nodeSourceStart(local, location),
+		nodeSourceEnd(local, location));
+}
 public void cannotReturnInInitializer(ASTNode location) {
 	this.handle(
 		IProblem.CannotReturnInInitializer,
@@ -1497,6 +1563,51 @@
 		reference.sourceStart,
 		reference.sourceEnd);
 }
+public void targetTypeIsNotAFunctionalInterface(FunctionalExpression target) {
+	this.handle(
+		IProblem.TargetTypeNotAFunctionalInterface,
+		NoArgument,
+		NoArgument,
+		target.sourceStart,
+		target.sourceEnd);
+}
+public void illFormedParameterizationOfFunctionalInterface(FunctionalExpression target) {
+	this.handle(
+		IProblem.illFormedParameterizationOfFunctionalInterface,
+		NoArgument,
+		NoArgument,
+		target.sourceStart,
+		target.sourceEnd);
+}
+public void lambdaSignatureMismatched(LambdaExpression target) {
+	this.handle(
+		IProblem.lambdaSignatureMismatched,
+		NoArgument,
+		NoArgument,
+		target.sourceStart,
+		target.sourceEnd);
+}
+
+public void lambdaParameterTypeMismatched(Argument argument, TypeReference type, TypeBinding expectedParameterType) {
+	String name = new String(argument.name);
+	String expectedTypeFullName = new String(expectedParameterType.readableName());
+	String expectedTypeShortName = new String(expectedParameterType.shortReadableName());
+	this.handle(
+			expectedParameterType.isTypeVariable() ? IProblem.IncompatibleLambdaParameterType : IProblem.lambdaParameterTypeMismatched,
+			new String[] { name, expectedTypeFullName },
+			new String[] { name, expectedTypeShortName },
+			type.sourceStart,
+			type.sourceEnd);
+}
+public void lambdaExpressionCannotImplementGenericMethod(LambdaExpression lambda, MethodBinding sam) {
+	final String selector = new String(sam.selector);
+	this.handle(
+			IProblem.NoGenericLambda, 
+			new String[] { selector, new String(sam.declaringClass.readableName())},
+			new String[] { selector, new String(sam.declaringClass.shortReadableName())},
+			lambda.sourceStart,
+			lambda.sourceEnd);
+}
 public void caseExpressionMustBeConstant(Expression expression) {
 	this.handle(
 		IProblem.NonConstantExpression,
@@ -1642,6 +1753,11 @@
 				return ProblemSeverities.Ignore;
 			}
 			break;
+		// For compatibility with javac 8b111 for now.	
+		case IProblem.RepeatableAnnotationWithRepeatingContainerAnnotation:
+		case IProblem.IllegalUseOfUnderscoreAsAnIdentifier:
+		case IProblem.ToleratedMisplacedTypeAnnotations:	
+			return ProblemSeverities.Warning;
 	}
 	int irritant = getIrritant(problemID);
 	if (irritant != 0) {
@@ -1686,6 +1802,28 @@
 		0,
 		0);
 }
+public void defaultMethodOverridesObjectMethod(MethodBinding currentMethod) {
+	// Java 8 feature
+	AbstractMethodDeclaration method = currentMethod.sourceMethod();
+	int sourceStart = 0;
+	int sourceEnd = 0;
+	if (method != null) {
+		sourceStart = method.sourceStart;
+		sourceEnd = method.sourceEnd;
+	}
+	this.handle(
+		IProblem.DefaultMethodOverridesObjectMethod,
+		NoArgument, NoArgument,
+		sourceStart, sourceEnd);
+}
+
+public void defaultModifierIllegallySpecified(int sourceStart, int sourceEnd) {
+	this.handle(
+		IProblem.IllegalDefaultModifierSpecification,
+		NoArgument, NoArgument,
+		sourceStart, sourceEnd);
+}
+
 public void deprecatedField(FieldBinding field, ASTNode location) {
 	int severity = computeSeverity(IProblem.UsingDeprecatedField);
 	if (severity == ProblemSeverities.Ignore) return;
@@ -1769,6 +1907,13 @@
 		annotation.sourceStart,
 		annotation.sourceEnd);
 }
+public void explitAnnotationTargetRequired(Annotation annotation) {
+	this.handle(IProblem.ExplicitAnnotationTargetRequired,
+			NoArgument,
+			NoArgument,
+			annotation.sourceStart,
+			annotation.sourceEnd);
+}
 public void polymorphicMethodNotBelow17(ASTNode node) {
 	this.handle(
 			IProblem.PolymorphicMethodNotBelow17,
@@ -1785,9 +1930,9 @@
 			node.sourceStart,
 			node.sourceEnd);
 }
-public void duplicateAnnotation(Annotation annotation) {
+public void duplicateAnnotation(Annotation annotation, long sourceLevel) {
 	this.handle(
-		IProblem.DuplicateAnnotation,
+		sourceLevel >= ClassFileConstants.JDK1_8 ? IProblem.DuplicateAnnotationNotMarkedRepeatable : IProblem.DuplicateAnnotation,
 		new String[] {new String(annotation.resolvedType.readableName())},
 		new String[] {new String(annotation.resolvedType.shortReadableName())},
 		annotation.sourceStart,
@@ -1865,9 +2010,12 @@
 	if (inheritedMethod1.isCallin() != inheritedMethod2.isCallin())
 		return;
 // SH}
-	if (inheritedMethod1.declaringClass != inheritedMethod2.declaringClass) {
+	if (TypeBinding.notEquals(inheritedMethod1.declaringClass, inheritedMethod2.declaringClass)) {
+		int problemID = (inheritedMethod1.isDefaultMethod() && inheritedMethod2.isDefaultMethod())
+				? IProblem.DuplicateInheritedDefaultMethods
+				: IProblem.DuplicateInheritedMethods;
 		this.handle(
-			IProblem.DuplicateInheritedMethods,
+			problemID,
 			new String[] {
 		        new String(inheritedMethod1.selector),
 				typesAsString(inheritedMethod1, inheritedMethod1.original().parameters, false),
@@ -2166,6 +2314,26 @@
 		messageSend.sourceStart,
 		messageSend.sourceEnd);
 }
+public void errorNoMethodFor(Expression expression, TypeBinding recType, char [] selector, TypeBinding[] params) {
+	StringBuffer buffer = new StringBuffer();
+	StringBuffer shortBuffer = new StringBuffer();
+	for (int i = 0, length = params.length; i < length; i++) {
+		if (i != 0){
+			buffer.append(", "); //$NON-NLS-1$
+			shortBuffer.append(", "); //$NON-NLS-1$
+		}
+		buffer.append(new String(params[i].readableName()));
+		shortBuffer.append(new String(params[i].shortReadableName()));
+	}
+
+	int id = recType.isArrayType() ? IProblem.NoMessageSendOnArrayType : IProblem.NoMessageSendOnBaseType;
+	this.handle(
+		id,
+		new String[] { new String(recType.readableName()), new String(selector), buffer.toString() },
+		new String[] { new String(recType.shortReadableName()), new String(selector), shortBuffer.toString() },
+		expression.sourceStart,
+		expression.sourceEnd);
+}
 public void errorThisSuperInStatic(ASTNode reference) {
 	String[] arguments = new String[] {reference.isSuper() ? "super" : "this"}; //$NON-NLS-2$ //$NON-NLS-1$
 	this.handle(
@@ -2204,7 +2372,7 @@
 			&& field.isStatic()
 			&& field.isPrivate()
 			&& field.isFinal()
-			&& TypeBinding.LONG == field.type) {
+			&& TypeBinding.equalsEquals(TypeBinding.LONG, field.type)) {
 		ReferenceBinding referenceBinding = field.declaringClass;
 		if (referenceBinding != null) {
 			if (referenceBinding.findSuperTypeOriginatingFrom(TypeIds.T_JavaIoSerializable, false /*Serializable is not a class*/) != null) {
@@ -2510,7 +2678,7 @@
 		end = reference.sourceEnd;
 	}
 
-	if (sourceType == superType)
+	if (TypeBinding.equalsEquals(sourceType, superType))
 		this.handle(
 			IProblem.HierarchyCircularitySelfReference,
 			new String[] {new String(sourceType.readableName()) },
@@ -2533,7 +2701,7 @@
 	start = reference.sourceStart;
 	end = reference.sourceEnd;
 
-	if (type == superType)
+	if (TypeBinding.equalsEquals(type, superType))
 		this.handle(
 			IProblem.HierarchyCircularitySelfReference,
 			new String[] {new String(type.readableName()) },
@@ -2579,6 +2747,15 @@
 		methodDecl.sourceStart,
 		methodDecl.sourceEnd);
 }
+public void illegalAbstractModifierCombinationForMethod(AbstractMethodDeclaration methodDecl) {
+	String[] arguments = new String[] {new String(methodDecl.selector)};
+	this.handle(
+		IProblem.IllegalStrictfpForAbstractInterfaceMethod,
+		arguments,
+		arguments,
+		methodDecl.sourceStart,
+		methodDecl.sourceEnd);
+}
 public void illegalAccessFromTypeVariable(TypeVariableBinding variable, ASTNode location) {
 	if ((location.bits & ASTNode.InsideJavadoc)!= 0) {
 		javadocInvalidReference(location.sourceStart, location.sourceEnd);
@@ -2705,6 +2882,16 @@
 		fieldDecl.sourceStart,
 		fieldDecl.sourceEnd);
 }
+public void illegalModifierCombinationForInterfaceMethod(AbstractMethodDeclaration methodDecl) {
+	String[] arguments = new String[] {new String(methodDecl.selector)};
+	this.handle(
+		IProblem.IllegalModifierCombinationForInterfaceMethod,
+		arguments,
+		arguments,
+		methodDecl.sourceStart,
+		methodDecl.sourceEnd);
+}
+
 public void illegalModifierForAnnotationField(FieldDeclaration fieldDecl) {
 	String name = new String(fieldDecl.name);
 	this.handle(
@@ -2822,11 +3009,13 @@
 		fieldDecl.sourceStart,
 		fieldDecl.sourceEnd);
 }
-public void illegalModifierForInterfaceMethod(AbstractMethodDeclaration methodDecl) {
+public void illegalModifierForInterfaceMethod(AbstractMethodDeclaration methodDecl, boolean isJDK18orGreater) {
 	// cannot include parameter types since they are not resolved yet
 	// and the error message would be too long
 	this.handle(
-		IProblem.IllegalModifierForInterfaceMethod,
+		isJDK18orGreater 
+			? IProblem.IllegalModifierForInterfaceMethod18 
+			: IProblem.IllegalModifierForInterfaceMethod,
 		new String[] {
 			new String(methodDecl.selector)
 		},
@@ -2954,6 +3143,108 @@
 		argType.sourceStart,
 		argType.sourceEnd);
 }
+public void illegalVarargInLambda(Argument argType) {
+	String[] arguments = new String[] { CharOperation.toString(argType.type.getTypeName())};
+	this.handle(
+		IProblem.IllegalVarargInLambda,
+		arguments,
+		arguments,
+		argType.sourceStart,
+		argType.sourceEnd);
+}
+public void illegalThisDeclaration(Argument argument) {
+	String[] arguments = NoArgument;
+	this.handle(
+		IProblem.IllegalDeclarationOfThisParameter,
+		arguments,
+		arguments,
+		argument.sourceStart,
+		argument.sourceEnd);
+}
+public void illegalSourceLevelForThis(Argument argument) {
+	String[] arguments = NoArgument;
+	this.handle(
+		IProblem.ExplicitThisParameterNotBelow18,
+		arguments,
+		arguments,
+		argument.sourceStart,
+		argument.sourceEnd);
+}
+public void disallowedThisParameter(Receiver receiver) {
+	String[] arguments = NoArgument;
+	this.handle(
+		IProblem.DisallowedExplicitThisParameter,
+		arguments,
+		arguments,
+		receiver.sourceStart,
+		receiver.sourceEnd);
+}
+public void illegalQualifierForExplicitThis(Receiver receiver, TypeBinding expectedType) {
+	String[] problemArguments = new String[] { new String(expectedType.sourceName())};
+	this.handle(
+		IProblem.IllegalQualifierForExplicitThis,
+		problemArguments,
+		problemArguments,
+		(receiver.qualifyingName == null) ? receiver.sourceStart : receiver.qualifyingName.sourceStart,
+		receiver.sourceEnd);
+}
+public void illegalQualifierForExplicitThis2(Receiver receiver) {
+	this.handle(
+		IProblem.IllegalQualifierForExplicitThis2,
+		NoArgument,
+		NoArgument,
+		receiver.qualifyingName.sourceStart,
+		receiver.sourceEnd);
+}
+public void illegalTypeForExplicitThis(Receiver receiver, TypeBinding expectedType) {
+	this.handle(
+		IProblem.IllegalTypeForExplicitThis,
+		new String[] { new String(expectedType.readableName())},
+		new String[] { new String(expectedType.shortReadableName())},
+		receiver.type.sourceStart,
+		receiver.type.sourceEnd);
+}
+public void illegalThis(Argument argument) {
+	String[] arguments = NoArgument;
+	this.handle(
+		IProblem.ExplicitThisParameterNotInLambda,
+		arguments,
+		arguments,
+		argument.sourceStart,
+		argument.sourceEnd);
+}
+public void defaultMethodsNotBelow18(MethodDeclaration md) {
+	this.handle(
+			IProblem.DefaultMethodNotBelow18,
+			NoArgument,
+			NoArgument,
+			md.bodyStart,
+			md.bodyEnd);
+}
+public void staticInterfaceMethodsNotBelow18(MethodDeclaration md) {
+	this.handle(
+			IProblem.StaticInterfaceMethodNotBelow18,
+			NoArgument,
+			NoArgument,
+			md.bodyStart,
+			md.bodyEnd);
+}
+public void referenceExpressionsNotBelow18(ReferenceExpression rexp) {
+	this.handle(
+			rexp.isMethodReference() ? IProblem.MethodReferenceNotBelow18 : IProblem.ConstructorReferenceNotBelow18,
+			NoArgument,
+			NoArgument,
+			rexp.sourceStart,
+			rexp.sourceEnd);
+}
+public void lambdaExpressionsNotBelow18(LambdaExpression lexp) {
+	this.handle(
+			IProblem.LambdaExpressionNotBelow18,
+			NoArgument,
+			NoArgument,
+			lexp.sourceStart,
+			lexp.sourceEnd);
+}
 public void illegalVisibilityModifierCombinationForField(ReferenceBinding type, FieldDeclaration fieldDecl) {
 	String[] arguments = new String[] {new String(fieldDecl.name)};
 	this.handle(
@@ -3057,7 +3348,7 @@
 	invalidType(importRef, (TypeBinding)expectedImport);
 }
 public void incompatibleExceptionInThrowsClause(SourceTypeBinding type, MethodBinding currentMethod, MethodBinding inheritedMethod, ReferenceBinding exceptionType) {
-	if (type == currentMethod.declaringClass) {
+	if (TypeBinding.equalsEquals(type, currentMethod.declaringClass)) {
 		int id;
 		if (currentMethod.declaringClass.isInterface()
 				&& !inheritedMethod.isPublic()){ // interface inheriting Object protected method
@@ -3306,6 +3597,22 @@
 		location.sourceStart,
 		location.sourceEnd);
 }
+public void inheritedDefaultMethodConflictsWithOtherInherited(SourceTypeBinding type, MethodBinding defaultMethod, MethodBinding otherMethod) {
+	TypeDeclaration typeDecl = type.scope.referenceContext;
+	String[] problemArguments = new String[] { 
+			String.valueOf(defaultMethod.readableName()), 
+			String.valueOf(defaultMethod.declaringClass.readableName()), 
+			String.valueOf(otherMethod.declaringClass.readableName()) };
+	String[] messageArguments = new String[] { 
+			String.valueOf(defaultMethod.shortReadableName()), 
+			String.valueOf(defaultMethod.declaringClass.shortReadableName()), 
+			String.valueOf(otherMethod.declaringClass.shortReadableName()) };	
+	this.handle(IProblem.InheritedDefaultMethodConflictsWithOtherInherited,
+			problemArguments,
+			messageArguments,
+			typeDecl.sourceStart,
+			typeDecl.sourceEnd);
+}
 private void inheritedMethodReducesVisibility(int sourceStart, int sourceEnd, MethodBinding concreteMethod, MethodBinding[] abstractMethods) {
 	StringBuffer concreteSignature = new StringBuffer();
 	concreteSignature
@@ -4140,6 +4447,13 @@
 					String parameterTypeNames = typesAsString(problemMethod.parameters, false);
 					String closestParameterTypeShortNames = typesAsString(shownMethod, true);
 					String parameterTypeShortNames = typesAsString(problemMethod.parameters, true);
+					if (closestParameterTypeNames.equals(parameterTypeNames)) {
+						// include null annotations, maybe they show the difference:
+						closestParameterTypeNames = typesAsString(shownMethod, false, true);
+						parameterTypeNames = typesAsString(problemMethod.parameters, false, true);
+						closestParameterTypeShortNames = typesAsString(shownMethod, true, true);
+						parameterTypeShortNames = typesAsString(problemMethod.parameters, true, true);
+					}
 					if (closestParameterTypeShortNames.equals(parameterTypeShortNames)) {
 						closestParameterTypeShortNames = closestParameterTypeNames;
 						parameterTypeShortNames = parameterTypeNames;
@@ -4194,6 +4508,20 @@
 		case ProblemReasons.NonStaticReferenceInStaticContext :
 			id = IProblem.StaticMethodRequested;
 			break;
+		case ProblemReasons.NonStaticOrAlienTypeReceiver:
+			this.handle(
+					IProblem.NonStaticOrAlienTypeReceiver,
+					new String[] {
+							new String(method.declaringClass.readableName()),
+					        new String(method.selector),
+					},
+					new String[] {
+							new String(method.declaringClass.shortReadableName()),
+					        new String(method.selector),
+					},
+					(int) (messageSend.nameSourcePosition >>> 32),
+					(int) messageSend.nameSourcePosition);
+			return;
 		case ProblemReasons.ReceiverTypeNotVisible :
 			this.handle(
 				IProblem.NotVisibleType,	// cannot occur in javadoc comments
@@ -4773,6 +5101,47 @@
 		argument.type.sourceStart,
 		argument.sourceEnd);
 }
+
+public void invalidUsageOfTypeAnnotations(Annotation annotation) {
+	this.handle(
+			IProblem.InvalidUsageOfTypeAnnotations,
+			NoArgument,
+			NoArgument,
+			annotation.sourceStart,
+			annotation.sourceEnd);
+}
+public void toleratedMisplacedTypeAnnotations(Annotation first, Annotation last) {
+	this.handle(
+			IProblem.ToleratedMisplacedTypeAnnotations,
+			NoArgument,
+			NoArgument,
+			first.sourceStart,
+			last.sourceEnd);	
+}
+public void misplacedTypeAnnotations(Annotation first, Annotation last) {
+	this.handle(
+			IProblem.MisplacedTypeAnnotations,
+			NoArgument,
+			NoArgument,
+			first.sourceStart,
+			last.sourceEnd);	
+}
+public void illegalUsageOfTypeAnnotations(Annotation annotation) {
+	this.handle(
+			IProblem.IllegalUsageOfTypeAnnotations,
+			NoArgument,
+			NoArgument,
+			annotation.sourceStart,
+			annotation.sourceEnd);	
+}
+public void illegalTypeAnnotationsInStaticMemberAccess(Annotation first, Annotation last) {
+	this.handle(
+			IProblem.IllegalTypeAnnotationsInStaticMemberAccess,
+			NoArgument,
+			NoArgument,
+			first.sourceStart,
+			last.sourceEnd);
+}
 public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl, Object location) {
 	this.referenceContext = compUnitDecl;
 	String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)};
@@ -5773,8 +6142,19 @@
 	Binding binding = null;
 	String[] arguments = null;
 	int start = 0, end = 0;
-
 	Expression location = expr;
+
+	if (expr.resolvedType != null) {
+		long tagBits = expr.resolvedType.tagBits & TagBits.AnnotationNullMASK;
+		if (tagBits == TagBits.AnnotationNonNull) {
+			problemId = IProblem.RedundantNullCheckAgainstNonNullType;
+			arguments = new String[] { String.valueOf(expr.resolvedType.nullAnnotatedReadableName(this.options, true)) };
+			start = nodeSourceStart(location);
+			end = nodeSourceEnd(location);
+			handle(problemId, arguments, arguments, start, end);
+			return true;
+		}
+	}
 	// unwrap uninteresting nodes:
 	while (true) {
 		if (expr instanceof Assignment)
@@ -5806,6 +6186,12 @@
 			char[][] nonNullName = this.options.nonNullAnnotationName;
 			arguments = new String[] { new String(field.name), 
 									   new String(nonNullName[nonNullName.length-1]) };
+		} else {
+			// signaling redundancy based on syntactic analysis:
+			problemId = checkForNull
+					? IProblem.FieldComparisonYieldsFalse
+					: IProblem.RedundantNullCheckOnField;
+			arguments = new String[] { String.valueOf(field.name)};
 		}
 		binding = field;
 		start = nodeSourceStart(binding, location);
@@ -5849,7 +6235,36 @@
 	this.handle(problemId, arguments, arguments, start, end);
 	return true;
 }
+public void nullAnnotationUnsupportedLocation(Annotation annotation) {
+	String[] arguments = new String[] {
+		String.valueOf(annotation.resolvedType.readableName())
+	};
+	String[] shortArguments = new String[] {
+		String.valueOf(annotation.resolvedType.shortReadableName())
+	};
+	handle(IProblem.NullAnnotationUnsupportedLocation,
+		arguments, shortArguments, annotation.sourceStart, annotation.sourceEnd);
+}
+public void nullAnnotationUnsupportedLocation(TypeReference type) {
+	int sourceEnd = type.sourceEnd;
+	if (type instanceof ParameterizedSingleTypeReference) {
+		ParameterizedSingleTypeReference typeReference = (ParameterizedSingleTypeReference) type;
+		TypeReference[] typeArguments = typeReference.typeArguments;
+		if (typeArguments[typeArguments.length - 1].sourceEnd > typeReference.sourceEnd) {
+			sourceEnd = retrieveClosingAngleBracketPosition(typeReference.sourceEnd);
+		} else {
+			sourceEnd = type.sourceEnd;
+		}
+	} else if (type instanceof ParameterizedQualifiedTypeReference) {
+		ParameterizedQualifiedTypeReference typeReference = (ParameterizedQualifiedTypeReference) type;
+		sourceEnd = retrieveClosingAngleBracketPosition(typeReference.sourceEnd);
+	} else {
+		sourceEnd = type.sourceEnd;
+	}
 
+	handle(IProblem.NullAnnotationUnsupportedLocationAtType,
+		NoArgument, NoArgument, type.sourceStart, sourceEnd);
+}
 public void localVariableNullInstanceof(LocalVariableBinding local, ASTNode location) {
 	int severity = computeSeverity(IProblem.NullLocalVariableInstanceofYieldsFalse);
 	if (severity == ProblemSeverities.Ignore) return;
@@ -5893,6 +6308,10 @@
 		potentialNullUnboxing(location, local.type);
 		return;
 	}
+	if ((local.type.tagBits & TagBits.AnnotationNullable) != 0 && location instanceof Expression) {
+		dereferencingNullableExpression((Expression) location);
+		return;
+	}
 	int severity = computeSeverity(IProblem.PotentialNullLocalVariableReference);
 	if (severity == ProblemSeverities.Ignore) return;
 	String[] arguments = new String[] {new String(local.name)};
@@ -5922,16 +6341,15 @@
 	String[] argumentsShort = new String[] { String.valueOf(boxType.shortReadableName()) };
 	this.handle(IProblem.NullUnboxing, arguments, argumentsShort, expression.sourceStart, expression.sourceEnd);
 }
-public void nullableFieldDereference(VariableBinding variable, long position) {
-	String[] arguments = new String[] {new String(variable.name)};
+public void nullableFieldDereference(FieldBinding variable, long position) {
 	char[][] nullableName = this.options.nullableAnnotationName;
-		arguments = new String[] {new String(variable.name), new String(nullableName[nullableName.length-1])};
+	String[] arguments = new String[] {new String(variable.name), new String(nullableName[nullableName.length-1])};
 	this.handle(
 		IProblem.NullableFieldReference,
 		arguments,
 		arguments,
 		(int)(position >>> 32),
-		(int)(position));
+		(int)position);
 }
 
 public void localVariableRedundantCheckOnNonNull(LocalVariableBinding local, ASTNode location) {
@@ -6144,6 +6562,15 @@
 		type.sourceStart,
 		type.sourceEnd);
 }
+public void notAFunctionalInterface(TypeDeclaration type) {
+	TypeBinding binding = type.binding;
+	this.handle(
+		IProblem.InterfaceNotFunctionalInterface,
+		new String[] {new String(binding.readableName()), },
+		new String[] {new String(binding.shortReadableName()),},
+		type.sourceStart,
+		type.sourceEnd);
+}
 public void missingEnumConstantCase(SwitchStatement switchStatement, FieldBinding enumConstant) {
 	this.handle(
 		switchStatement.defaultCase == null ? IProblem.MissingEnumConstantCase : IProblem.MissingEnumConstantCaseDespiteDefault,
@@ -6285,7 +6712,16 @@
 			end);
 }
 
-public void missingTypeInMethod(MessageSend messageSend, MethodBinding method) {
+public void missingTypeInMethod(ASTNode astNode, MethodBinding method) {
+	int nameSourceStart, nameSourceEnd;
+	if (astNode instanceof MessageSend) {
+		MessageSend messageSend = astNode instanceof MessageSend ? (MessageSend) (astNode) : null;
+		nameSourceStart = (int) (messageSend.nameSourcePosition >>> 32);
+		nameSourceEnd = (int) messageSend.nameSourcePosition;
+	} else {
+		nameSourceStart = astNode.sourceStart;
+		nameSourceEnd = astNode.sourceEnd;
+	}
 	List missingTypes = method.collectMissingTypes(null);
 	if (missingTypes == null) {
 		System.err.println("The method " + method + " is wrongly tagged as containing missing types"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -6306,8 +6742,8 @@
 			        typesAsString(method, true),
 			       	new String(missingType.shortReadableName()),
 			},
-			(int) (messageSend.nameSourcePosition >>> 32),
-			(int) messageSend.nameSourcePosition);
+			nameSourceStart,
+			nameSourceEnd);
 }
 public void missingValueForAnnotationMember(Annotation annotation, char[] memberName) {
 	String memberString = new String(memberName);
@@ -6411,6 +6847,14 @@
 		boundReference.sourceStart,
 		boundReference.sourceEnd);
 }
+private int nodeSourceEnd(ASTNode node) {
+	if (node instanceof Reference) {
+		Binding field = ((Reference) node).lastFieldBinding();
+		if (field != null)
+			return nodeSourceEnd(field, node);
+	}
+	return node.sourceEnd;
+}
 private int nodeSourceEnd(Binding field, ASTNode node) {
 	return nodeSourceEnd(field, node, 0);
 }
@@ -6467,6 +6911,14 @@
 	}
 	return node.sourceEnd;
 }
+private int nodeSourceStart(ASTNode node) {
+	if (node instanceof Reference) {
+		Binding field = ((Reference) node).lastFieldBinding();
+		if (field != null)
+			return nodeSourceStart(field, node);
+	}
+	return node.sourceStart;
+}
 private int nodeSourceStart(Binding field, ASTNode node) {
 	return nodeSourceStart(field, node, 0);
 }
@@ -6825,13 +7277,13 @@
 }
 private String parameterBoundAsString(TypeVariableBinding typeVariable, boolean makeShort) {
     StringBuffer nameBuffer = new StringBuffer(10);
-    if (typeVariable.firstBound == typeVariable.superclass) {
+    if (TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.superclass)) {
         nameBuffer.append(makeShort ? typeVariable.superclass.shortReadableName() : typeVariable.superclass.readableName());
     }
     int length;
     if ((length = typeVariable.superInterfaces.length) > 0) {
 	    for (int i = 0; i < length; i++) {
-	        if (i > 0 || typeVariable.firstBound == typeVariable.superclass) nameBuffer.append(" & "); //$NON-NLS-1$
+	        if (i > 0 || TypeBinding.equalsEquals(typeVariable.firstBound, typeVariable.superclass)) nameBuffer.append(" & "); //$NON-NLS-1$
 	        nameBuffer.append(makeShort ? typeVariable.superInterfaces[i].shortReadableName() : typeVariable.superInterfaces[i].readableName());
 	    }
 	}
@@ -7255,6 +7707,82 @@
 		arrayRef.sourceStart,
 		arrayRef.sourceEnd);
 }
+public void repeatedAnnotationWithContainer(Annotation annotation, Annotation container) {
+	this.handle(
+		IProblem.RepeatedAnnotationWithContainerAnnotation,
+		new String[] {new String(annotation.resolvedType.readableName()), new String(container.resolvedType.readableName())},
+		new String[] {new String(annotation.resolvedType.shortReadableName()), new String(container.resolvedType.shortReadableName())},
+		annotation.sourceStart,
+		annotation.sourceEnd);
+}
+public void containerAnnotationTypeMustHaveValue(ASTNode markerNode, ReferenceBinding containerAnnotationType) {
+	this.handle(
+		IProblem.ContainerAnnotationTypeMustHaveValue,
+		new String[] {new String(containerAnnotationType.readableName())},
+		new String[] {new String(containerAnnotationType.shortReadableName())},
+		markerNode.sourceStart,
+		markerNode.sourceEnd);
+}
+public void containerAnnotationTypeHasWrongValueType(ASTNode markerNode, ReferenceBinding containerAnnotationType, ReferenceBinding annotationType, TypeBinding returnType) {
+	this.handle(
+		IProblem.ContainerAnnotationTypeHasWrongValueType,
+		new String[] {new String(containerAnnotationType.readableName()), new String(annotationType.readableName()), new String(returnType.readableName())},
+		new String[] {new String(containerAnnotationType.shortReadableName()), new String(annotationType.shortReadableName()), new String(returnType.shortReadableName())},
+		markerNode.sourceStart,
+		markerNode.sourceEnd);
+}
+public void containerAnnotationTypeHasNonDefaultMembers(ASTNode markerNode, ReferenceBinding containerAnnotationType, char[] selector) {
+	this.handle(
+		IProblem.ContainerAnnotationTypeHasNonDefaultMembers,
+		new String[] {new String(containerAnnotationType.readableName()), new String(selector)},
+		new String[] {new String(containerAnnotationType.shortReadableName()), new String(selector)},
+		markerNode.sourceStart,
+		markerNode.sourceEnd);
+}
+public void containerAnnotationTypeHasShorterRetention(ASTNode markerNode, ReferenceBinding annotationType, String annotationRetention, ReferenceBinding containerAnnotationType, String containerRetention) {
+	this.handle(
+		IProblem.ContainerAnnotationTypeHasShorterRetention,
+		new String[] {new String(annotationType.readableName()), annotationRetention, new String(containerAnnotationType.readableName()), containerRetention},
+		new String[] {new String(annotationType.shortReadableName()), annotationRetention, new String(containerAnnotationType.shortReadableName()), containerRetention},
+		markerNode.sourceStart,
+		markerNode.sourceEnd);
+}
+public void repeatableAnnotationTypeTargetMismatch(ASTNode markerNode, ReferenceBinding annotationType, ReferenceBinding containerAnnotationType, String unmetTargets) {
+	this.handle(
+		IProblem.RepeatableAnnotationTypeTargetMismatch,
+		new String[] {new String(annotationType.readableName()), new String(containerAnnotationType.readableName()), unmetTargets},
+		new String[] {new String(annotationType.shortReadableName()), new String(containerAnnotationType.shortReadableName()), unmetTargets},
+		markerNode.sourceStart,
+		markerNode.sourceEnd);
+}
+
+public void repeatableAnnotationTypeIsDocumented(ASTNode markerNode, ReferenceBinding annotationType, ReferenceBinding containerAnnotationType) {
+	this.handle(
+		IProblem.RepeatableAnnotationTypeIsDocumented,
+		new String[] {new String(annotationType.readableName()), new String(containerAnnotationType.readableName())},
+		new String[] {new String(annotationType.shortReadableName()), new String(containerAnnotationType.shortReadableName())},
+		markerNode.sourceStart,
+		markerNode.sourceEnd);
+}
+
+public void repeatableAnnotationTypeIsInherited(ASTNode markerNode, ReferenceBinding annotationType, ReferenceBinding containerAnnotationType) {
+	this.handle(
+		IProblem.RepeatableAnnotationTypeIsInherited,
+		new String[] {new String(annotationType.readableName()), new String(containerAnnotationType.readableName())},
+		new String[] {new String(annotationType.shortReadableName()), new String(containerAnnotationType.shortReadableName())},
+		markerNode.sourceStart,
+		markerNode.sourceEnd);
+}
+
+public void repeatableAnnotationWithRepeatingContainer(Annotation annotation, ReferenceBinding containerType) {
+	this.handle(
+		IProblem.RepeatableAnnotationWithRepeatingContainerAnnotation,
+		new String[] {new String(annotation.resolvedType.readableName()), new String(containerType.readableName())},
+		new String[] {new String(annotation.resolvedType.shortReadableName()), new String(containerType.shortReadableName())},
+		annotation.sourceStart,
+		annotation.sourceEnd);
+}
+
 public void reset() {
 	this.positionScanner = null;
 }
@@ -7606,6 +8134,11 @@
 	String errorTokenName,
 	String expectedToken) {
 
+	if (currentKind == TerminalTokens.TokenNameAT && expectedToken != null && expectedToken.equals("@")) { //$NON-NLS-1$
+		// In the diagnose parser case, we don't have the wherewithal to discriminate when we should hand out @308 vs @. So we always answer @.
+		// We should silently recover so swallow the message.
+		return;
+	}
 	String eTokenName;
 	if (isKeyword(currentKind) ||
 		isLiteral(currentKind) ||
@@ -7617,6 +8150,7 @@
 
 	String[] arguments;
 	if(expectedToken != null) {
+		expectedToken = replaceIfSynthetic(expectedToken);
 		arguments = new String[] {eTokenName, expectedToken};
 	} else {
 		arguments = new String[] {eTokenName};
@@ -7628,6 +8162,19 @@
 		startPosition,
 		endPosition);
 }
+private String replaceIfSynthetic(String token) {
+	/* Java 8 grammar changes use some synthetic tokens to make the grammar LALR(1). These tokens should not be exposed in messages
+	   as it would make no sense to the programmer whatsoever. Replace such artificial tokens with some "suitable"  alternative. At
+	   the moment, there are two synthetic tokens that need such massaging viz : "BeginLambda" and "BeginTypeArguments". There is a
+	   third synthetic token "ElidedSemicolonAndRightBrace" that we don't expect to show up in messages since it is manufactured by
+	   the parser automatically.
+	*/
+	if (token.equals("BeginTypeArguments")) //$NON-NLS-1$
+		return "."; //$NON-NLS-1$
+	if (token.equals("BeginLambda")) //$NON-NLS-1$
+		return "("; //$NON-NLS-1$
+	return token;
+}
 public void task(String tag, String message, String priority, int start, int end){
 	this.handle(
 		IProblem.Task,
@@ -7831,9 +8378,19 @@
 // SH}
 	char[] actualShortReadableName = actualType.shortReadableName();
 	char[] expectedShortReadableName = expectedType.shortReadableName();
+	char[] actualReadableName = actualType.readableName();
+	char[] expectedReadableName = expectedType.readableName();
 	if (CharOperation.equals(actualShortReadableName, expectedShortReadableName)) {
-		actualShortReadableName = actualType.readableName();
-		expectedShortReadableName = expectedType.readableName();
+		if (CharOperation.equals(actualReadableName, expectedReadableName)) {
+			// if full type names are equal, assume the incompatibility is due to mismatching null annotations:
+			actualReadableName = actualType.nullAnnotatedReadableName(this.options, false);
+			expectedReadableName = expectedType.nullAnnotatedReadableName(this.options, false);
+			actualShortReadableName = actualType.nullAnnotatedReadableName(this.options, true);
+			expectedShortReadableName = expectedType.nullAnnotatedReadableName(this.options, true);
+		} else {
+			actualShortReadableName = actualReadableName;
+			expectedShortReadableName = expectedReadableName;
+		}
 	}
 	this.handle(
 /*OT:*/	problemId,
@@ -7879,6 +8436,12 @@
 	return typesAsString(methodBinding, methodBinding.parameters, makeShort);
 }
 private String typesAsString(MethodBinding methodBinding, TypeBinding[] parameters, boolean makeShort) {
+	return typesAsString(methodBinding, parameters, makeShort, false);
+}
+private String typesAsString(MethodBinding methodBinding, boolean makeShort, boolean showNullAnnotations) {
+	return typesAsString(methodBinding, methodBinding.parameters, makeShort, showNullAnnotations);
+}
+private String typesAsString(MethodBinding methodBinding, TypeBinding[] parameters, boolean makeShort, boolean showNullAnnotations) {
 	if (methodBinding.isPolymorphic()) {
 		// get the original polymorphicMethod method
 		TypeBinding[] types = methodBinding.original().parameters;
@@ -7892,7 +8455,10 @@
 			if (isVarargType) {
 				type = ((ArrayBinding)type).elementsType();
 			}
-			buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
+			if (showNullAnnotations)
+				buffer.append(new String(type.nullAnnotatedReadableName(this.options, makeShort)));
+			else
+				buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
 			if (isVarargType) {
 				buffer.append("..."); //$NON-NLS-1$
 			}
@@ -7909,7 +8475,10 @@
 		if (isVarargType) {
 			type = ((ArrayBinding)type).elementsType();
 		}
-		buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
+		if (showNullAnnotations)
+			buffer.append(new String(type.nullAnnotatedReadableName(this.options, makeShort)));
+		else
+			buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
 		if (isVarargType) {
 			buffer.append("..."); //$NON-NLS-1$
 		}
@@ -7920,13 +8489,19 @@
 	return buffer.toString();
 }
 private String typesAsString(TypeBinding[] types, boolean makeShort) {
+	return typesAsString(types, makeShort, false);
+}
+private String typesAsString(TypeBinding[] types, boolean makeShort, boolean showNullAnnotations) {
 	StringBuffer buffer = new StringBuffer(10);
 	for (int i = 0, length = types.length; i < length; i++) {
 		if (i != 0) {
 			buffer.append(", "); //$NON-NLS-1$
 		}
 		TypeBinding type = types[i];
-		buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
+		if (showNullAnnotations)
+			buffer.append(new String(type.nullAnnotatedReadableName(this.options, makeShort)));
+		else
+			buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
 	}
 //{ObjectTeams: heuristically beautify:
 	MethodSignatureEnhancer.beautifyTypesString(buffer, makeShort);
@@ -8286,8 +8861,8 @@
 	}
 // SH}
     int problemId = (nameRef.bits & Binding.VARIABLE) != 0 && (nameRef.bits & Binding.TYPE) == 0
-    		? IProblem.UnresolvedVariable
-    		: IProblem.UndefinedName;
+    	? IProblem.UnresolvedVariable
+    	: IProblem.UndefinedName;
 	this.handle(
 		problemId,
 		arguments,
@@ -8315,6 +8890,22 @@
 		castExpression.sourceStart,
 		castExpression.sourceEnd);
 }
+public void unsafeNullnessCast(CastExpression castExpression, Scope scope) {
+	TypeBinding castedExpressionType = castExpression.expression.resolvedType;
+	TypeBinding castExpressionResolvedType = castExpression.resolvedType;
+	this.handle(
+		IProblem.UnsafeNullnessCast,
+		new String[]{
+			new String(castedExpressionType.nullAnnotatedReadableName(this.options, false)),
+			new String(castExpressionResolvedType.nullAnnotatedReadableName(this.options, false))
+		},
+		new String[]{
+			new String(castedExpressionType.nullAnnotatedReadableName(this.options, true)),
+			new String(castExpressionResolvedType.nullAnnotatedReadableName(this.options, true))
+		},
+		castExpression.sourceStart,
+		castExpression.sourceEnd);
+}
 public void unsafeGenericArrayForVarargs(TypeBinding leafComponentType, ASTNode location) {
 	int severity = computeSeverity(IProblem.UnsafeGenericArrayForVarargs);
 	if (severity == ProblemSeverities.Ignore) return;
@@ -8435,7 +9026,7 @@
 	if (severity == ProblemSeverities.Ignore) return;
 	int start = type.sourceStart();
 	int end = type.sourceEnd();
-	if (currentMethod.declaringClass == type) {
+	if (TypeBinding.equalsEquals(currentMethod.declaringClass, type)) {
 		ASTNode location = ((MethodDeclaration) currentMethod.sourceMethod()).returnType;
 		start = location.sourceStart();
 		end = location.sourceEnd();
@@ -8625,7 +9216,7 @@
 	if (CharOperation.equals(TypeConstants.SERIALVERSIONUID, field.name)
 			&& field.isStatic()
 			&& field.isFinal()
-			&& TypeBinding.LONG == field.type) {
+			&& TypeBinding.equalsEquals(TypeBinding.LONG, field.type)) {
 		ReferenceBinding referenceBinding = field.declaringClass;
 		if (referenceBinding != null) {
 			if (referenceBinding.findSuperTypeOriginatingFrom(TypeIds.T_JavaIoSerializable, false /*Serializable is not a class*/) != null) {
@@ -8814,6 +9405,14 @@
 		sourceStart,
 		sourceEnd);
 }
+public void illegalUseOfUnderscoreAsAnIdentifier(int sourceStart, int sourceEnd) {
+	this.handle(
+		IProblem.IllegalUseOfUnderscoreAsAnIdentifier,
+		NoArgument,
+		NoArgument,
+		sourceStart,
+		sourceEnd);
+}
 public void varargsArgumentNeedCast(MethodBinding method, TypeBinding argumentType, InvocationSite location) {
 	int severity = this.options.getSeverity(CompilerOptions.VarargsArgumentNeedCast);
 	if (severity == ProblemSeverities.Ignore) return;
@@ -8878,8 +9477,8 @@
 		        typesAsString(method2, true),
 		        new String(method2.declaringClass.shortReadableName())
 		},
-		method1.declaringClass == type ? method1.sourceStart() : type.sourceStart(),
-		method1.declaringClass == type ? method1.sourceEnd() : type.sourceEnd());
+		TypeBinding.equalsEquals(method1.declaringClass, type) ? method1.sourceStart() : type.sourceStart(),
+		TypeBinding.equalsEquals(method1.declaringClass, type) ? method1.sourceEnd() : type.sourceEnd());
 }
 public void safeVarargsOnFixedArityMethod(MethodBinding method) {
 	String [] arguments = new String[] { new String(method.isConstructor() ? method.declaringClass.shortReadableName() : method.selector)}; 
@@ -9135,32 +9734,44 @@
 
 public void nullityMismatch(Expression expression, TypeBinding providedType, TypeBinding requiredType, int nullStatus, char[][] annotationName) {
 	if ((nullStatus & FlowInfo.NULL) != 0) {
-		nullityMismatchIsNull(expression, requiredType, annotationName);
+		nullityMismatchIsNull(expression, requiredType);
 		return;
 	}
+	if (expression instanceof MessageSend) {
+		if ((((MessageSend) expression).binding.tagBits & TagBits.AnnotationNullable) != 0) {
+			nullityMismatchSpecdNullable(expression, requiredType, this.options.nonNullAnnotationName);
+			return;
+		}
+	}
 	if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0) {
 		VariableBinding var = expression.localVariableBinding();
 		if (var == null && expression instanceof Reference) {
 			var = ((Reference)expression).lastFieldBinding();
 		}
 		if (var != null && var.isNullable()) {
-			nullityMismatchSpecdNullable(expression, requiredType, annotationName);
-			return;
-		}
+					nullityMismatchSpecdNullable(expression, requiredType, annotationName);
+					return;
+				}
 		nullityMismatchPotentiallyNull(expression, requiredType, annotationName);
 		return;
 	}
-	nullityMismatchIsUnknown(expression, providedType, requiredType, annotationName);
+	if (this.options.sourceLevel < ClassFileConstants.JDK1_8)
+		nullityMismatchIsUnknown(expression, providedType, requiredType, annotationName);
+	else
+		nullityMismatchingTypeAnnotation(expression, providedType, requiredType, NullAnnotationMatching.NULL_ANNOTATIONS_UNCHECKED);
 }
-public void nullityMismatchIsNull(Expression expression, TypeBinding requiredType, char[][] annotationName) {
+public void nullityMismatchIsNull(Expression expression, TypeBinding requiredType) {
+	if (requiredType instanceof CaptureBinding) {
+		CaptureBinding capture = (CaptureBinding) requiredType;
+		if (capture.wildcard != null)
+			requiredType = capture.wildcard;
+	}
 	int problemId = IProblem.RequiredNonNullButProvidedNull;
 	String[] arguments = new String[] {
-			String.valueOf(CharOperation.concatWith(annotationName, '.')),
-			String.valueOf(requiredType.readableName())
+			annotatedTypeName(requiredType, this.options.nonNullAnnotationName)
 	};
 	String[] argumentsShort = new String[] {
-			String.valueOf(annotationName[annotationName.length-1]),
-			String.valueOf(requiredType.shortReadableName())
+			shortAnnotatedTypeName(requiredType, this.options.nonNullAnnotationName)
 	};
 	this.handle(problemId, arguments, argumentsShort, expression.sourceStart, expression.sourceEnd);
 }
@@ -9168,13 +9779,11 @@
 	int problemId = IProblem.RequiredNonNullButProvidedSpecdNullable;
 	char[][] nullableName = this.options.nullableAnnotationName;
 	String[] arguments = new String[] {
-			String.valueOf(CharOperation.concatWith(annotationName, '.')),
-			String.valueOf(requiredType.readableName()),
+			annotatedTypeName(requiredType, annotationName),
 			String.valueOf(CharOperation.concatWith(nullableName, '.'))
 	};
 	String[] argumentsShort = new String[] {
-			String.valueOf(annotationName[annotationName.length-1]),
-			String.valueOf(requiredType.shortReadableName()),
+			shortAnnotatedTypeName(requiredType, annotationName),
 			String.valueOf(nullableName[nullableName.length-1])
 	};
 	this.handle(problemId, arguments, argumentsShort, expression.sourceStart, expression.sourceEnd);
@@ -9183,13 +9792,11 @@
 	int problemId = IProblem.RequiredNonNullButProvidedPotentialNull;
 	char[][] nullableName = this.options.nullableAnnotationName;
 	String[] arguments = new String[] {
-			String.valueOf(CharOperation.concatWith(annotationName, '.')),
-			String.valueOf(requiredType.readableName()),
+			annotatedTypeName(requiredType, annotationName),
 			String.valueOf(CharOperation.concatWith(nullableName, '.'))
 	};
 	String[] argumentsShort = new String[] {
-			String.valueOf(annotationName[annotationName.length-1]),
-			String.valueOf(requiredType.shortReadableName()),
+			shortAnnotatedTypeName(requiredType, annotationName),
 			String.valueOf(nullableName[nullableName.length-1])
 	};
 	this.handle(problemId, arguments, argumentsShort, expression.sourceStart, expression.sourceEnd);
@@ -9198,13 +9805,11 @@
 	int problemId = IProblem.RequiredNonNullButProvidedUnknown;
 	String[] arguments = new String[] {
 			String.valueOf(providedType.readableName()),
-			String.valueOf(CharOperation.concatWith(annotationName, '.')),
-			String.valueOf(requiredType.readableName())
+			annotatedTypeName(requiredType, annotationName)
 	};
 	String[] argumentsShort = new String[] {
 			String.valueOf(providedType.shortReadableName()),
-			String.valueOf(annotationName[annotationName.length-1]),
-			String.valueOf(requiredType.shortReadableName())
+			shortAnnotatedTypeName(requiredType, annotationName)
 	};
 	this.handle(problemId, arguments, argumentsShort, expression.sourceStart, expression.sourceEnd);
 }
@@ -12810,27 +13415,6 @@
 }
 // SH}
 
-public void nullityMismatch(Expression expression, TypeBinding requiredType, int nullStatus, char[][] annotationName) {
-	int problemId = IProblem.RequiredNonNullButProvidedUnknown;
-	if ((nullStatus & FlowInfo.NULL) != 0)
-		problemId = IProblem.RequiredNonNullButProvidedNull;
-	if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0)
-		problemId = IProblem.RequiredNonNullButProvidedPotentialNull;
-	String[] arguments = new String[] {
-			String.valueOf(CharOperation.concatWith(annotationName, '.')),
-			String.valueOf(requiredType.readableName())
-	};
-	String[] argumentsShort = new String[] {
-			String.valueOf(annotationName[annotationName.length-1]),
-			String.valueOf(requiredType.shortReadableName())
-	};
-	this.handle(
-		problemId,
-		arguments,
-		argumentsShort,
-		expression.sourceStart,
-		expression.sourceEnd);
-}
 public void illegalRedefinitionToNonNullParameter(Argument argument, ReferenceBinding declaringClass, char[][] inheritedAnnotationName) {
 	int sourceStart = argument.type.sourceStart;
 	if (argument.annotations != null) {
@@ -12863,8 +13447,8 @@
 public void parameterLackingNullableAnnotation(Argument argument, ReferenceBinding declaringClass, char[][] inheritedAnnotationName) {
 	this.handle(
 		IProblem.ParameterLackingNullableAnnotation, 
-		new String[] { new String(argument.name), new String(declaringClass.readableName()), CharOperation.toString(inheritedAnnotationName)},
-		new String[] { new String(argument.name), new String(declaringClass.shortReadableName()), new String(inheritedAnnotationName[inheritedAnnotationName.length-1])},
+		new String[] { new String(declaringClass.readableName()), CharOperation.toString(inheritedAnnotationName)},
+		new String[] { new String(declaringClass.shortReadableName()), new String(inheritedAnnotationName[inheritedAnnotationName.length-1])},
 		argument.type.sourceStart,
 		argument.type.sourceEnd);
 }
@@ -12910,6 +13494,92 @@
 		sourceStart,
 		methodDecl.returnType.sourceEnd);
 }
+public void parameterLackingNullableAnnotation(ReferenceExpression location, MethodBinding descriptorMethod, int idx, int paramOffset,
+				char[][] providedAnnotationName, char/*@Nullable*/[][] requiredAnnotationName, TypeBinding requiredType) {
+	StringBuffer requiredPrefix = new StringBuffer(); 
+	StringBuffer requiredShortPrefix = new StringBuffer(); 
+	if (requiredAnnotationName != null) {
+		requiredPrefix.append('@').append(CharOperation.toString(requiredAnnotationName)).append(' ');
+		requiredShortPrefix.append('@').append(requiredAnnotationName[requiredAnnotationName.length-1]).append(' ');
+	}
+	TypeBinding provided = descriptorMethod.parameters[idx+paramOffset];
+	StringBuffer methodSignature = new StringBuffer();
+	methodSignature
+		.append(descriptorMethod.declaringClass.readableName())
+		.append('.')
+		.append(descriptorMethod.readableName());
+	StringBuffer shortSignature = new StringBuffer();
+	shortSignature
+		.append(descriptorMethod.declaringClass.shortReadableName())
+		.append('.')
+		.append(descriptorMethod.shortReadableName());
+	this.handle(
+			IProblem.ReferenceExpressionParameterMismatchPromisedNullable, 
+			new String[] { String.valueOf(idx+1), 
+							requiredPrefix.toString(), String.valueOf(requiredType.readableName()),
+							CharOperation.toString(providedAnnotationName), String.valueOf(provided.readableName()),
+							methodSignature.toString() },
+			new String[] { String.valueOf(idx+1), 
+							requiredShortPrefix.toString(), String.valueOf(requiredType.shortReadableName()),
+							String.valueOf(providedAnnotationName[providedAnnotationName.length-1]), String.valueOf(provided.shortReadableName()),
+							shortSignature.toString() },
+			location.sourceStart,
+			location.sourceEnd);
+}
+public void parameterRequiresNonnull(ReferenceExpression location, MethodBinding descriptorMethod, int idx,
+				char[][] nonNullAnnotationName, TypeBinding requiredType) {
+	StringBuffer methodSignature = new StringBuffer();
+	methodSignature
+		.append(descriptorMethod.declaringClass.readableName())
+		.append('.')
+		.append(descriptorMethod.readableName());
+
+	StringBuffer shortSignature = new StringBuffer();
+	shortSignature
+		.append(descriptorMethod.declaringClass.shortReadableName())
+		.append('.')
+		.append(descriptorMethod.shortReadableName());
+	this.handle(
+		IProblem.ReferenceExpressionParameterRequiredNonnullUnchecked, 
+		new String[] { String.valueOf(idx+1),
+					methodSignature.toString(),
+					CharOperation.toString(nonNullAnnotationName), String.valueOf(requiredType.readableName()) },
+		new String[] { String.valueOf(idx+1),
+					shortSignature.toString(),
+					String.valueOf(nonNullAnnotationName[nonNullAnnotationName.length-1]), String.valueOf(requiredType.shortReadableName()) },
+		location.sourceStart,
+		location.sourceEnd);
+}
+public void illegalReturnRedefinition(ASTNode location, MethodBinding descriptorMethod,
+			char[][] nonNullAnnotationName, 
+			char/*@Nullable*/[][] providedAnnotationName, TypeBinding providedType) {
+	StringBuffer methodSignature = new StringBuffer()
+		.append(descriptorMethod.declaringClass.readableName())
+		.append('.')
+		.append(descriptorMethod.readableName());
+	StringBuffer shortSignature = new StringBuffer()
+		.append(descriptorMethod.declaringClass.shortReadableName())
+		.append('.')
+		.append(descriptorMethod.shortReadableName());
+	StringBuffer providedPrefix = new StringBuffer(); 
+	StringBuffer providedShortPrefix = new StringBuffer(); 
+	if (providedAnnotationName != null) {
+		providedPrefix.append('@').append(CharOperation.toString(providedAnnotationName)).append(' ');
+		providedShortPrefix.append('@').append(providedAnnotationName[providedAnnotationName.length-1]).append(' ');
+	}
+	this.handle(
+		providedAnnotationName == null
+			? IProblem.ReferenceExpressionReturnNullRedefUnchecked
+			: IProblem.ReferenceExpressionReturnNullRedef,
+		new String[] { methodSignature.toString(),
+						CharOperation.toString(nonNullAnnotationName), String.valueOf(descriptorMethod.returnType.readableName()),
+						providedPrefix.toString(), String.valueOf(providedType.readableName())},
+		new String[] { shortSignature.toString(),
+						String.valueOf(nonNullAnnotationName[nonNullAnnotationName.length-1]), String.valueOf(descriptorMethod.returnType.shortReadableName()),
+						providedShortPrefix.toString(), String.valueOf(providedType.shortReadableName())},
+		location.sourceStart,
+		location.sourceEnd);
+}
 public void messageSendPotentialNullReference(MethodBinding method, ASTNode location) {
 	String[] arguments = new String[] {new String(method.readableName())};
 	this.handle(
@@ -13027,7 +13697,18 @@
 	this.handle(IProblem.ContradictoryNullAnnotations, arguments, shortArguments, annotation.sourceStart, annotation.sourceEnd);
 }
 
-// conflict default <-> inherited
+public void contradictoryNullAnnotationsOnBounds(Annotation annotation, long previousTagBit) {
+	char[][] annotationName = previousTagBit == TagBits.AnnotationNonNull ? this.options.nonNullAnnotationName : this.options.nullableAnnotationName;
+	String[] arguments = {
+		new String(CharOperation.concatWith(annotationName, '.')),
+	};
+	String[] shortArguments = {
+		new String(annotationName[annotationName.length-1]),
+	};
+	this.handle(IProblem.ContradictoryNullAnnotationsOnBound, arguments, shortArguments, annotation.sourceStart, annotation.sourceEnd);
+}
+
+//conflict default <-> inherited
 public void conflictingNullAnnotations(MethodBinding currentMethod, ASTNode location, MethodBinding inheritedMethod)
 {
 	char[][] nonNullAnnotationName = this.options.nonNullAnnotationName;
@@ -13065,20 +13746,76 @@
 	this.handle(IProblem.ConflictingInheritedNullAnnotations, arguments, shortArguments, location.sourceStart, location.sourceEnd);
 }
 
-public void illegalAnnotationForBaseType(TypeReference type, Annotation[] annotations, char[] annotationName, long nullAnnotationTagBit)
+public void illegalAnnotationForBaseType(TypeReference type, Annotation[] annotations, long nullAnnotationTagBit)
 {
 	int typeId = (nullAnnotationTagBit == TagBits.AnnotationNullable) 
 			? TypeIds.T_ConfiguredAnnotationNullable : TypeIds.T_ConfiguredAnnotationNonNull;
-	String[] args = new String[] { new String(annotationName), new String(type.getLastToken()) };
+	char[][] annotationNames = (nullAnnotationTagBit == TagBits.AnnotationNonNull)
+			? this.options.nonNullAnnotationName
+			: this.options.nullableAnnotationName;
+	String[] args = new String[] { new String(annotationNames[annotationNames.length-1]), new String(type.getLastToken()) };
 	Annotation annotation = findAnnotation(annotations, typeId);
 	int start = annotation != null ? annotation.sourceStart : type.sourceStart;
+	int end = annotation != null ? annotation.sourceEnd : type.sourceEnd;
 	this.handle(IProblem.IllegalAnnotationForBaseType,
 			args,
 			args,
 			start,
-			type.sourceEnd);
+			end);
 }
 
+public void illegalAnnotationForBaseType(Annotation annotation, TypeBinding type)
+{
+	String[] args = new String[] {
+		new String(annotation.resolvedType.shortReadableName()),
+		new String(type.readableName())
+	};
+	this.handle(IProblem.IllegalAnnotationForBaseType,
+			args,
+			args,
+			annotation.sourceStart,
+			annotation.sourceEnd);
+}
+
+private String annotatedTypeName(TypeBinding type, char[][] annotationName) {
+	if ((type.tagBits & TagBits.AnnotationNullMASK) != 0)
+		return String.valueOf(type.nullAnnotatedReadableName(this.options, false));
+	int dims = 0;
+	char[] typeName = type.readableName();
+	char[] annotationDisplayName = CharOperation.concatWith(annotationName, '.');
+	return internalAnnotatedTypeName(annotationDisplayName, typeName, dims);
+}
+private String shortAnnotatedTypeName(TypeBinding type, char[][] annotationName) {
+	if ((type.tagBits & TagBits.AnnotationNullMASK) != 0)
+		return String.valueOf(type.nullAnnotatedReadableName(this.options, true));
+	int dims = 0;
+	char[] typeName = type.shortReadableName();
+	char[] annotationDisplayName = annotationName[annotationName.length-1];
+	return internalAnnotatedTypeName(annotationDisplayName, typeName, dims);
+}
+
+String internalAnnotatedTypeName(char[] annotationName, char[] typeName, int dims) {
+	char[] fullName;
+	if (dims > 0) {
+		int plainLen = annotationName.length+typeName.length+2; // adding '@' and ' ' ...
+		fullName = new char[plainLen+(2*dims)]; // ... and []* 
+		System.arraycopy(typeName, 0, fullName, 0, typeName.length);
+		fullName[typeName.length] = ' ';
+		fullName[typeName.length+1] = '@';
+		System.arraycopy(annotationName, 0, fullName, typeName.length+2, annotationName.length);
+		for (int i=0; i<dims; i++) {
+			fullName[plainLen+i] = '[';
+			fullName[plainLen+i+1] = ']';
+		}
+	} else {
+		fullName = new char[annotationName.length+typeName.length+2]; // adding '@' and ' ' 
+		fullName[0] = '@';
+		System.arraycopy(annotationName, 0, fullName, 1, annotationName.length);
+		fullName[annotationName.length+1] = ' ';
+		System.arraycopy(typeName, 0, fullName, annotationName.length+2, typeName.length);
+	}
+	return String.valueOf(fullName);
+}
 private Annotation findAnnotation(Annotation[] annotations, int typeId) {
 	if (annotations != null) {
 		// should have a @NonNull/@Nullable annotation, search for it:
@@ -13121,6 +13858,369 @@
 			compUnitDecl.currentPackage.sourceEnd);
 	}
 }
+
+public void illegalModifiersForElidedType(Argument argument) {
+	String[] arg = new String[] {new String(argument.name)};
+	this.handle(
+			IProblem.IllegalModifiersForElidedType,
+			arg,
+			arg,
+			argument.declarationSourceStart,
+			argument.declarationSourceEnd);
+}
+
+public void illegalModifiers(int modifierSourceStart, int modifiersSourceEnd) {
+	this.handle(
+			IProblem.IllegalModifiers,
+			NoArgument,
+			NoArgument,
+			modifierSourceStart,
+			modifiersSourceEnd);
+}
+
+public void arrayReferencePotentialNullReference(ArrayReference arrayReference) {
+	// TODO(stephan): merge with other expressions
+	this.handle(IProblem.ArrayReferencePotentialNullReference, NoArgument, NoArgument, arrayReference.sourceStart, arrayReference.sourceEnd);
+	
+}
+public void nullityMismatchingTypeAnnotation(Expression expression, TypeBinding providedType, TypeBinding requiredType, NullAnnotationMatching status) 
+{
+	if (providedType.id == TypeIds.T_null) {
+		nullityMismatchIsNull(expression, requiredType);
+		return;
+	}
+	String[] arguments ;
+	String[] shortArguments;
+		
+	int problemId = 0;
+	if (status.superTypeHint != null) {
+		problemId = (status.isUnchecked()
+			? IProblem.NullityUncheckedTypeAnnotationDetailSuperHint
+			: IProblem.NullityMismatchingTypeAnnotationSuperHint);
+		arguments      = new String[] { null, null, status.superTypeHintName(this.options, false) };
+		shortArguments = new String[] { null, null, status.superTypeHintName(this.options, true) };
+	} else {
+		problemId = (status.isUnchecked()
+			? IProblem.NullityUncheckedTypeAnnotationDetail
+			: IProblem.NullityMismatchingTypeAnnotation);
+		arguments      = new String[2];
+		shortArguments = new String[2];
+	}
+	arguments[0] = String.valueOf(requiredType.nullAnnotatedReadableName(this.options, false));
+	arguments[1] = String.valueOf(providedType.nullAnnotatedReadableName(this.options, false));
+	shortArguments[0] = String.valueOf(requiredType.nullAnnotatedReadableName(this.options, true));
+	shortArguments[1] = String.valueOf(providedType.nullAnnotatedReadableName(this.options, true));
+	this.handle(problemId, arguments, shortArguments, expression.sourceStart, expression.sourceEnd);
+}
+
+public void nullityMismatchTypeArgument(TypeBinding typeVariable, TypeBinding typeArgument, ASTNode location) {
+	long tagBits = typeVariable.tagBits & TagBits.AnnotationNullMASK;
+	char[][] annotationName = tagBits == TagBits.AnnotationNonNull ? this.options.nonNullAnnotationName : this.options.nullableAnnotationName;
+	String[] arguments = {
+		String.valueOf(typeVariable.readableName()),
+		String.valueOf(CharOperation.concatWith(annotationName, '.')),
+		String.valueOf(typeArgument.nullAnnotatedReadableName(this.options, false))
+	};
+	String[] shortArguments = {
+		String.valueOf(typeVariable.shortReadableName()),
+		String.valueOf(annotationName[annotationName.length-1]),
+		String.valueOf(typeArgument.nullAnnotatedReadableName(this.options, true))
+	};
+	this.handle(
+			IProblem.NullityMismatchTypeArgument, 
+			arguments, 
+			shortArguments, 
+			location.sourceStart, 
+			location.sourceEnd);
+}
+
+public void dereferencingNullableExpression(Expression expression) {
+	if (expression instanceof MessageSend) {
+		MessageSend send = (MessageSend) expression;
+		messageSendPotentialNullReference(send.binding, send);
+		return;
+	}
+	char[][] nullableName = this.options.nullableAnnotationName;
+	char[] nullableShort = nullableName[nullableName.length-1];
+	String[] arguments = { String.valueOf(nullableShort) };
+	// TODO(stephan): more sophisticated handling for various kinds of expressions
+	int start = nodeSourceStart(expression);
+	int end = nodeSourceEnd(expression);
+	this.handle(IProblem.DereferencingNullableExpression, arguments, arguments, start, end);
+}
+public void dereferencingNullableExpression(long positions, LookupEnvironment env) {
+	char[][] nullableName = env.getNullableAnnotationName();
+	char[] nullableShort = nullableName[nullableName.length-1];
+	String[] arguments = { String.valueOf(nullableShort) };
+	this.handle(IProblem.DereferencingNullableExpression, arguments, arguments, (int)(positions>>>32), (int)(positions&0xFFFF));
+}
+public void onlyReferenceTypesInIntersectionCast(TypeReference typeReference) {
+	this.handle(
+			IProblem.IllegalBasetypeInIntersectionCast,
+			NoArgument,
+			NoArgument,
+			typeReference.sourceStart,
+			typeReference.sourceEnd);
+}
+public void illegalArrayTypeInIntersectionCast(TypeReference typeReference) {
+	this.handle(
+			IProblem.IllegalArrayTypeInIntersectionCast,
+			NoArgument,
+			NoArgument,
+			typeReference.sourceStart,
+			typeReference.sourceEnd);
+}
+public void intersectionCastNotBelow18(TypeReference[] typeReferences) {
+	int length = typeReferences.length;
+	this.handle(
+			IProblem.IntersectionCastNotBelow18,
+			NoArgument,
+			NoArgument,
+			typeReferences[0].sourceStart,
+			typeReferences[length -1].sourceEnd);
+}
+
+public void duplicateBoundInIntersectionCast(TypeReference typeReference) {
+	this.handle(
+			IProblem.DuplicateBoundInIntersectionCast,
+			NoArgument,
+			NoArgument,
+			typeReference.sourceStart,
+			typeReference.sourceEnd);
+}
+
+public void multipleFunctionalInterfaces(FunctionalExpression functionalExpression) {
+	this.handle(
+			IProblem.MultipleFunctionalInterfaces,
+			NoArgument,
+			NoArgument,
+			functionalExpression.sourceStart,
+			functionalExpression.sourceEnd);
+}
+public void lambdaRedeclaresArgument(Argument argument) {
+	String[] arguments = new String[] {new String(argument.name)};
+	this.handle(
+		IProblem.LambdaRedeclaresArgument,
+		arguments,
+		arguments,
+		argument.sourceStart,
+		argument.sourceEnd);
+}
+public void lambdaRedeclaresLocal(LocalDeclaration local) {
+	String[] arguments = new String[] {new String(local.name)};
+	this.handle(
+		IProblem.LambdaRedeclaresLocal,
+		arguments,
+		arguments,
+		local.sourceStart,
+		local.sourceEnd);
+}
+
+public void descriptorHasInvisibleType(FunctionalExpression expression, ReferenceBinding referenceBinding) {
+	this.handle(
+		IProblem.LambdaDescriptorMentionsUnmentionable,
+		new String[] { new String(referenceBinding.readableName()) },
+		new String[] { new String(referenceBinding.shortReadableName()) },
+		expression.sourceStart,
+		expression.sourceEnd);
+}
+
+public void methodReferenceSwingsBothWays(ReferenceExpression expression, MethodBinding instanceMethod, MethodBinding nonInstanceMethod) {
+	char [] selector = instanceMethod.selector;
+	TypeBinding receiverType = instanceMethod.declaringClass;
+	StringBuffer buffer1 = new StringBuffer();
+	StringBuffer shortBuffer1 = new StringBuffer();
+	TypeBinding [] parameters = instanceMethod.parameters;
+	for (int i = 0, length = parameters.length; i < length; i++) {
+		if (i != 0){
+			buffer1.append(", "); //$NON-NLS-1$
+			shortBuffer1.append(", "); //$NON-NLS-1$
+		}
+		buffer1.append(new String(parameters[i].readableName()));
+		shortBuffer1.append(new String(parameters[i].shortReadableName()));
+	}
+	StringBuffer buffer2 = new StringBuffer();
+	StringBuffer shortBuffer2 = new StringBuffer();
+	parameters = nonInstanceMethod.parameters;
+	for (int i = 0, length = parameters.length; i < length; i++) {
+		if (i != 0){
+			buffer2.append(", "); //$NON-NLS-1$
+			shortBuffer2.append(", "); //$NON-NLS-1$
+		}
+		buffer2.append(new String(parameters[i].readableName()));
+		shortBuffer2.append(new String(parameters[i].shortReadableName()));
+	}
+
+	int id = IProblem.MethodReferenceSwingsBothWays;
+	this.handle(
+		id,
+		new String[] { new String(receiverType.readableName()), new String(selector), buffer1.toString(), new String(selector), buffer2.toString() },
+		new String[] { new String(receiverType.shortReadableName()), new String(selector), shortBuffer1.toString(), new String(selector), shortBuffer2.toString() },
+		expression.sourceStart,
+		expression.sourceEnd);
+}
+
+public void methodMustBeAccessedStatically(ReferenceExpression expression, MethodBinding nonInstanceMethod) {
+	TypeBinding receiverType = nonInstanceMethod.declaringClass;
+	char [] selector = nonInstanceMethod.selector;
+	StringBuffer buffer = new StringBuffer();
+	StringBuffer shortBuffer = new StringBuffer();
+	TypeBinding [] parameters = nonInstanceMethod.parameters;
+	for (int i = 0, length = parameters.length; i < length; i++) {
+		if (i != 0){
+			buffer.append(", "); //$NON-NLS-1$
+			shortBuffer.append(", "); //$NON-NLS-1$
+		}
+		buffer.append(new String(parameters[i].readableName()));
+		shortBuffer.append(new String(parameters[i].shortReadableName()));
+	}
+	int id = IProblem.StaticMethodShouldBeAccessedStatically;
+	this.handle(
+		id,
+		new String[] { new String(receiverType.readableName()), new String(selector), buffer.toString() },
+		new String[] { new String(receiverType.shortReadableName()), new String(selector), shortBuffer.toString() },
+		expression.sourceStart,
+		expression.sourceEnd);
+}
+
+public void methodMustBeAccessedWithInstance(ReferenceExpression expression, MethodBinding instanceMethod) {
+	TypeBinding receiverType = instanceMethod.declaringClass;
+	char [] selector = instanceMethod.selector;
+	StringBuffer buffer = new StringBuffer();
+	StringBuffer shortBuffer = new StringBuffer();
+	TypeBinding [] parameters = instanceMethod.parameters;
+	for (int i = 0, length = parameters.length; i < length; i++) {
+		if (i != 0) {
+			buffer.append(", "); //$NON-NLS-1$
+			shortBuffer.append(", "); //$NON-NLS-1$
+		}
+		buffer.append(new String(parameters[i].readableName()));
+		shortBuffer.append(new String(parameters[i].shortReadableName()));
+	}
+	int id = IProblem.StaticMethodRequested;
+	this.handle(
+		id,
+		new String[] { new String(receiverType.readableName()), new String(selector), buffer.toString() },
+		new String[] { new String(receiverType.shortReadableName()), new String(selector), shortBuffer.toString() },
+		expression.sourceStart,
+		expression.sourceEnd);
+}
+
+public void invalidArrayConstructorReference(ReferenceExpression expression, TypeBinding lhsType, TypeBinding[] parameters) {
+	StringBuffer buffer = new StringBuffer();
+	StringBuffer shortBuffer = new StringBuffer();
+	for (int i = 0, length = parameters.length; i < length; i++) {
+		if (i != 0) {
+			buffer.append(", "); //$NON-NLS-1$
+			shortBuffer.append(", "); //$NON-NLS-1$
+		}
+		buffer.append(new String(parameters[i].readableName()));
+		shortBuffer.append(new String(parameters[i].shortReadableName()));
+	}
+	int id = IProblem.InvalidArrayConstructorReference;
+	this.handle(
+		id,
+		new String[] { new String(lhsType.readableName()), buffer.toString() },
+		new String[] { new String(lhsType.shortReadableName()), shortBuffer.toString() },
+		expression.sourceStart,
+		expression.sourceEnd);
+}
+
+public void constructedArrayIncompatible(ReferenceExpression expression, TypeBinding receiverType, TypeBinding returnType) {
+	this.handle(
+			IProblem.ConstructedArrayIncompatible,
+			new String[] { new String(receiverType.readableName()), new String(returnType.readableName()) },
+			new String[] { new String(receiverType.shortReadableName()), new String(returnType.shortReadableName()) },
+			expression.sourceStart,
+			expression.sourceEnd);
+}
+
+public void danglingReference(ReferenceExpression expression, TypeBinding receiverType, char[] selector, TypeBinding[] descriptorParameters) {
+	StringBuffer buffer = new StringBuffer();
+	StringBuffer shortBuffer = new StringBuffer();
+	TypeBinding [] parameters = descriptorParameters;
+	for (int i = 0, length = parameters.length; i < length; i++) {
+		if (i != 0) {
+			buffer.append(", "); //$NON-NLS-1$
+			shortBuffer.append(", "); //$NON-NLS-1$
+		}
+		buffer.append(new String(parameters[i].readableName()));
+		shortBuffer.append(new String(parameters[i].shortReadableName()));
+	}
+	
+	int id = IProblem.DanglingReference;
+	this.handle(
+		id,
+		new String[] { new String(receiverType.readableName()), new String(selector), buffer.toString() },
+		new String[] { new String(receiverType.shortReadableName()), new String(selector), shortBuffer.toString() },
+		expression.sourceStart,
+		expression.sourceEnd);
+}
+public void unhandledException(TypeBinding exceptionType, ReferenceExpression location) {
+	this.handle(IProblem.UnhandledException,
+		new String[] {new String(exceptionType.readableName())},
+		new String[] {new String(exceptionType.shortReadableName())},
+		location.sourceStart,
+		location.sourceEnd);
+}
+
+public void incompatibleReturnType(ReferenceExpression expression, MethodBinding method, TypeBinding returnType) {
+	if (method.isConstructor()) {
+		this.handle(IProblem.ConstructionTypeMismatch,
+				new String[] { new String(method.declaringClass.readableName()), new String(returnType.readableName())},
+				new String[] { new String(method.declaringClass.shortReadableName()), new String(returnType.shortReadableName())},
+				expression.sourceStart,
+				expression.sourceEnd);
+		
+	} else {
+		StringBuffer buffer = new StringBuffer();
+		StringBuffer shortBuffer = new StringBuffer();
+		TypeBinding [] parameters = method.parameters;
+		for (int i = 0, length = parameters.length; i < length; i++) {
+			if (i != 0) {
+				buffer.append(", "); //$NON-NLS-1$
+				shortBuffer.append(", "); //$NON-NLS-1$
+			}
+			buffer.append(new String(parameters[i].readableName()));
+			shortBuffer.append(new String(parameters[i].shortReadableName()));
+		}
+		String selector = new String(method.selector);
+		this.handle(IProblem.IncompatibleMethodReference,
+				new String[] { selector, buffer.toString(), new String(method.declaringClass.readableName()), new String(method.returnType.readableName()), new String(returnType.readableName())},
+				new String[] { selector, shortBuffer.toString(), new String(method.declaringClass.shortReadableName()), new String(method.returnType.shortReadableName()), new String(returnType.shortReadableName())},
+				expression.sourceStart,
+				expression.sourceEnd);
+	}
+}
+
+public void illegalSuperAccess(TypeBinding superType, TypeBinding directSuperType, ASTNode location) {
+	if (directSuperType.problemId() != ProblemReasons.AttemptToBypassDirectSuper)
+		needImplementation(location);
+	handle(IProblem.SuperAccessCannotBypassDirectSuper, 
+			new String[] { String.valueOf(superType.readableName()), String.valueOf(directSuperType.readableName()) },
+			new String[] { String.valueOf(superType.shortReadableName()), String.valueOf(directSuperType.shortReadableName()) },
+			location.sourceStart,
+			location.sourceEnd);
+}
+public void illegalSuperCallBypassingOverride(InvocationSite location, MethodBinding targetMethod, ReferenceBinding overrider) {
+	this.handle(IProblem.SuperCallCannotBypassOverride,
+			new String[] { 	String.valueOf(targetMethod.readableName()),
+							String.valueOf(targetMethod.declaringClass.readableName()),
+							String.valueOf(overrider.readableName()) },
+			new String[] { 	String.valueOf(targetMethod.shortReadableName()),
+							String.valueOf(targetMethod.declaringClass.shortReadableName()),
+							String.valueOf(overrider.shortReadableName()) },
+			location.sourceStart(),
+			location.sourceEnd());
+}
+public void disallowedTargetForContainerAnnotation(Annotation annotation, TypeBinding containerAnnotationType) {
+	this.handle(
+		IProblem.DisallowedTargetForContainerAnnotationType,
+		new String[] {new String(annotation.resolvedType.readableName()), new String(containerAnnotationType.readableName())},
+		new String[] {new String(annotation.resolvedType.shortReadableName()), new String(containerAnnotationType.shortReadableName())},
+		annotation.sourceStart,
+		annotation.sourceEnd);
+}
 public void uninternedIdentityComparison(EqualExpression expr, TypeBinding lhs, TypeBinding rhs) {
 	
 	char [] lhsName = lhs.sourceName();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
index 22d0da4..36c92f3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -4,7 +4,12 @@
 # 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
-# 
+#
+# This is an implementation of an early-draft specification developed under the Java
+# Community Process (JCP) and is made available for testing and evaluation purposes
+# only. The code is not compatible with any specification of the JCP.
+#
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
 #		Benjamin Muskalla - Contribution for bug 239066
@@ -18,12 +23,27 @@
 #							bug 365531 - [compiler][null] investigate alternative strategy for internally encoding nullness defaults
 #							bug 365859 - [compiler][null] distinguish warnings based on flow analysis vs. null annotations
 #							bug 374605 - Unreasonable warning for enum-based switch statements
+#							bug 382353 - [1.8][compiler] Implementation property modifiers should be accepted on default methods.
+#							bug 382347 - [1.8][compiler] Compiler accepts incorrect default method inheritance
 #							bug 388281 - [compiler][null] inheritance of null annotations as an option
 #							bug 381443 - [compiler][null] Allow parameter widening from @NonNull to unannotated
-#							bug 393719 - [compiler] inconsistent warnings on iteration variables
 #							bug 331649 - [compiler][null] consider null annotations for fields
+#							bug 393719 - [compiler] inconsistent warnings on iteration variables
+#							bug 392862 - [1.8][compiler][null] Evaluate null annotations on array types
 #							bug 382789 - [compiler][null] warn when syntactically-nonnull expression is compared against null
-#							bug 400761 - [compiler][null] null may be return as boolean without a diagnostic
+#							bug 402028 - [1.8][compiler] null analysis for reference expressions
+#							bug 401796 - [1.8][compiler] don't treat default methods as overriding an independent inherited abstract method
+#							bug 404649 - [1.8][compiler] detect illegal reference to indirect or redundant super
+#							Bug 392099 - [1.8][compiler][null] Apply null annotation on types for null analysis
+#							Bug 415043 - [1.8][null] Follow-up re null type annotations after bug 392099
+#							Bug 392238 - [1.8][compiler][null] Detect semantically invalid null type annotations
+#							Bug 416307 - [1.8][compiler][null] subclass with type parameter substitution confuses null checking
+#		Jesper S Moller <jesper@selskabet.org> - Contributions for
+#							bug 382701 - [1.8][compiler] Implement semantic analysis of Lambda expressions & Reference expression
+#							bug 384567 - [1.5][compiler] Compiler accepts illegal modifiers on package declaration
+#							Bug 412153 - [1.8][compiler] Check validity of annotations which may be repeatable
+#							Bug 412151 - [1.8][compiler] Check repeating annotation's collection type
+#							Bug 419209 - [1.8] Repeating container annotations should be rejected in the presence of annotation it contains
 ###############################################################################
 0 = {0}
 1 = super cannot be used in java.lang.Object
@@ -44,7 +64,7 @@
 22 = No enclosing instance of the type {0} is accessible in scope
 23 = Illegal enclosing instance specification for type {0}
 24 = Cannot define static initializer in inner type {0}
-25 = Cannot refer to a non-final variable {0} inside an inner class defined in a different method
+25 = Cannot refer to the non-final local variable {0} defined in an enclosing scope
 26 = The member interface {0} can only be defined inside a top-level class or interface or in a static context
 27 = Cannot use an expression of the type {0} as a valid enclosing instance
 28 = No enclosing instance of type {0} is available due to some intermediate constructor invocation
@@ -88,15 +108,18 @@
 81 = The blank final field {0} may not have been initialized
 82 = The final field {0} may already have been assigned
 83 = {0} cannot be resolved to a variable
+84 = This static method of interface {0} can only be accessed as {0}.{1}
 
-90 = The local variable {0} is hiding another local variable defined in an enclosing type scope
+90 = The local variable {0} is hiding another local variable defined in an enclosing scope
 91 = The local variable {0} is hiding a field from type {1}
-92 = The field {0}.{1} is hiding another local variable defined in an enclosing type scope
+92 = The field {0}.{1} is hiding another local variable defined in an enclosing scope
 93 = The field {0}.{1} is hiding a field from type {2}
-94 = The parameter {0} is hiding another local variable defined in an enclosing type scope
+94 = The parameter {0} is hiding another local variable defined in an enclosing scope
 95 = The parameter {0} is hiding a field from type {1}
 96 = The serializable class {0} does not declare a static final serialVersionUID field of type long
-
+97 = Lambda expression''s parameter {0} cannot redeclare another local variable defined in an enclosing scope. 
+98 = Lambda expression''s local variable {0} cannot redeclare another local variable defined in an enclosing scope. 
+99 = The type {0} from the descriptor computed for the target context is not visible here.  
 100 = The method {1}({2}) is undefined for the type {0}
 101 = The method {1}({2}) from the type {0} is not visible
 102 = The method {1}({2}) is ambiguous for the type {0}
@@ -120,7 +143,12 @@
 120 = The method {1}({2}) from the type {0} refers to the missing type {3}
 121 = The method {1}({2}) from the type {0} can be declared as static
 122 = The method {1}({2}) from the type {0} can potentially be declared as static
-
+123 = Ambiguous method reference: both {1}({2}) and {3}({4}) from the type {0} are eligible
+124 = The method {1}({2}) from the type {0} should be accessed in a static way 
+125 = Incompatible parameter list for array constructor. Expected (int), but found ({1})
+126 = Constructed array {0} cannot be assigned to {1} as required in the interface descriptor  
+127 = The type {0} does not define {1}({2}) that is applicable here
+128 = The type of {0}({1}) from the type {2} is {3}, this is incompatible with the descriptor''s return type: {4}
 129 = The constructor {0}({1}) refers to the missing type {2}
 130 = The constructor {0}({1}) is undefined
 131 = The constructor {0}({1}) is not visible
@@ -254,8 +282,8 @@
 301 = Duplicate modifier for the type {0}
 302 = Illegal modifier for the class {0}; only public, abstract & final are permitted
 303 = Illegal modifier for the interface {0}; only public & abstract are permitted
-304 = Illegal modifier for the member class {0}; only public, protected, private, static, abstract & final are permitted
-305 = Illegal modifier for the member interface {0}; only public, protected, private, static & abstract are permitted
+304 = Illegal modifier for the member class {0}; only public, protected, private, abstract, static & final are permitted
+305 = Illegal modifier for the member interface {0}; only public, protected, private, abstract & static are permitted
 306 = Illegal modifier for the local class {0}; only abstract or final is permitted
 307 = Access restriction: {0}
 308 = The class {0} can be either abstract or final, not both
@@ -313,13 +341,13 @@
 355 = Duplicate method {0}({2}) in type {1}
 356 = Illegal modifier for parameter {0}; only final is permitted
 357 = Duplicate modifier for the method {1} in type {0}
-358 = Illegal modifier for the method {0}; only public, protected, private, static, final, abstract, synchronized & native are permitted
+358 = Illegal modifier for the method {0}; only public, protected, private, abstract, static, final, synchronized, native & strictfp are permitted
 359 = Illegal modifier for the interface method {0}; only public & abstract are permitted
 360 = The method {1} in type {0} can only set one of public / protected / private
 361 = The method {1} cannot be declared static; static methods can only be declared in a static or top level type
 362 = The abstract method {1} in type {0} can only set a visibility modifier, one of public or protected
 363 = The abstract method {1} in type {0} can only be defined by an abstract class
-364 = void is an invalid type for the parameter {1} of the method {0}
+364 = void is an invalid type for the parameter {1} of a method
 ###[obsolete] 365 = An array of void is an invalid type for the parameter {1} of the method {0}
 ###[obsolete] 366 = An array of void is an invalid return type for the method {0}
 367 = The native method {1} cannot also be declared strictfp
@@ -396,7 +424,8 @@
 440 = 'assert' should not be used as an identifier, since it is a reserved keyword from source level 1.4 on
 441 = 'enum' should not be used as an identifier, since it is a reserved keyword from source level 1.5 on
 442 = Enum constants cannot be surrounded by parenthesis
-443 = The uninterned types {0} and {1} should not be compared using ==/!= operators.
+443 = '_' should not be used as an identifier, since it is a reserved keyword from source level 1.8 on
+444 = The uninterned types {0} and {1} should not be compared using ==/!= operators.
 
 450 = {0}{1}
 
@@ -559,11 +588,11 @@
 601 = Extended dimensions are illegal in an annotation attribute declaration
 602 = Package annotations must be in file package-info.java
 603 = Illegal modifier for the annotation type {0}; only public & abstract are permitted
-604 = Illegal modifier for the member annotation type {0}; only public, protected, private, static & abstract are permitted
+604 = Illegal modifier for the member annotation type {0}; only public, protected, private, abstract & static are permitted
 605 = Invalid type {0} for the annotation attribute {2}.{1}; only primitive type, String, Class, annotation, enumeration are permitted or 1-dimensional arrays thereof
 606 = Cycle detected: the annotation type {0} cannot contain attributes of the annotation type itself
 607 = Cycle detected: a cycle exists between annotation attributes of {0} and {1}
-608 = Duplicate annotation @{0}
+608 = Duplicate annotation @{0}. Repeated annotations are allowed only at source level 1.8 or above
 609 = The annotation @{0} must define the attribute {1}
 610 = Duplicate attribute {0} in annotation @{1}
 611 = The attribute {0} is undefined for the annotation type {1}
@@ -592,13 +621,39 @@
 634 = The method {0}({1}) of type {2} must override or implement a supertype method
 635 = Unnecessary @SuppressWarnings("{0}")
 636 = The method {0}({1}) of type {2} should be tagged with @Override since it actually overrides a superinterface method
-
+637 = Syntax error, type annotations are available only when source level is at least 1.8
+638 = Explicit 'this' parameter is allowed only in instance methods of non-anonymous classes and inner class constructors
+639 = Syntax error, type annotations are illegal here
+640 = Type annotations are not allowed on type names used to access static members
+641 = Type annotation is illegal for a method that returns void
+642 = Only the first formal parameter may be declared explicitly as 'this'
+643 = Explicit declaration of 'this' parameter is allowed only at source level 1.8 or above
+644 = Default methods are allowed only at source level 1.8 or above
+645 = Lambda expressions are allowed only at source level 1.8 or above
+646 = Method references are allowed only at source level 1.8 or above
+647 = Constructor references are allowed only at source level 1.8 or above
+648 = Lambda expressions cannot declare a this parameter
+649 = Annotation types that do not specify explicit target element types cannot be applied here
+650 = The declared type of the explicit ''this'' parameter is expected to be {0}
+651 = The explicit ''this'' parameter is expected to be qualified with {0}
+652 = The explicit 'this' parameter for a method cannot have a qualifying name
+653 = The target type of this expression must be a functional interface
+654 = The variable argument type {0} of the lambda expression must be the last parameter
+655 = The target type of this expression is not a well formed parameterized type due to bound(s) mismatch
+656 = Lambda expression's signature does not match the signature of the functional interface method
+657 = Lambda expression''s parameter {0} is expected to be of type {1}
+658 = Incompatible type specified for lambda expression''s parameter {0}
+659 = Illegal lambda expression: Method {0} of type {1} is generic 
 ### MORE GENERICS
 660 = Unused type arguments for the non generic constructor {0}({1}) of type {2}; it should not be parameterized with arguments <{3}>
 661 = Unused type parameter {0}
 
 ### MORE TYPE RELATED
 662 = Illegal attempt to create arrays of union types
+663 = Local variable {0} defined in an enclosing scope must be final or effectively final
+664 = Invalid ''@FunctionalInterface'' annotation; {0} is not a functional interface
+665 = The constructed object of type {0} is incompatible with the descriptor''s return type: {1}
+666 = Syntax error, type annotations are illegal here
 
 ### NULL ANALYSIS FOR OTHER EXPRESSIONS
 670 = Null comparison always yields false: this expression cannot be null
@@ -687,22 +742,42 @@
 889 = Resource ''{0}'' should be managed by try-with-resource
 890 = Cannot switch on an enum value for source level below 1.5. Only convertible int values are permitted
 
+#### Java 8
+891 = Additional bounds are not allowed in cast operator at source levels below 1.8
+892 = Base types are not allowed in intersection cast operator
+893 = Arrays are not allowed in intersection cast operator
+894 = Duplicate type in intersection cast operator
+895 = The target type of this expression is not a functional interface: more than one of the intersecting interfaces are functional
+896 = Static methods are allowed in interfaces only at source level 1.8 or above
+
+897 = Duplicate annotation of non-repeatable type @{0}. Only annotation types marked @Repeatable can be used multiple times at one target.
+898 = The annotation @{0} cannot be repeated at this location since its container annotation type @{1} is disallowed at this location
+899 = The repeatable annotation @{0} may not be repeated where its container annotation type @{1} is also used directly
+902 = The value method in the container annotation type @{0} must be of type {1}[] but is {2}
+903 = The container annotation type @{0} must declare a member value()
+904 = The container annotation type @{0} must declare a default value for the annotation attribute ''{1}''
+905 = Retention ''{1}'' of @{0} is longer than the retention of its container annotation type @{2}, which is ''{3}''
+906 = The container annotation type @{1} is allowed at targets where the repeatable annotation type @{0} is not: {2}
+907 = The repeatable annotation type @{0} is marked @Documented, but its container annotation type @{1} is not
+908 = The repeatable annotation type @{0} is marked @Inherited, but its container annotation type @{1} is not
+909 = The repeatable annotation @{0} may not be present where its container annotation type @{1} is repeated
+
 ### NULL ANNOTATIONS
-910 = Null type mismatch: required ''@{0} {1}'' but the provided value is null
-911 = Null type mismatch: required ''@{0} {1}'' but the provided value is inferred as @{2}
-912 = Null type safety: The expression of type {0} needs unchecked conversion to conform to ''@{1} {2}''
+910 = Null type mismatch: required ''{0}'' but the provided value is null
+911 = Null type mismatch: required ''{0}'' but the provided value is inferred as @{1}
+912 = Null type safety: The expression of type ''{0}'' needs unchecked conversion to conform to ''{1}''
 913 = A default nullness annotation has not been specified for the package {0}
 914 = The return type is incompatible with the @{1} return from {0}
 915 = Illegal redefinition of parameter {0}, inherited method from {1} declares this parameter as @{2}
 916 = Illegal redefinition of parameter {0}, inherited method from {1} does not constrain this parameter
-917 = Missing non-null annotation: inherited method from {0} declares this parameter as @{1}
-918 = Missing nullable annotation: inherited method from {1} declares this parameter as @{2}
+917 = Missing non-null annotation: inherited method from {0} specifies this parameter as @{1}
+918 = Missing nullable annotation: inherited method from {0} specifies this parameter as @{1}
 919 = Potential null pointer access: The method {0} may return null
 920 = Redundant null check: The method {0} cannot return null
 921 = The method {0} from {1} cannot implement the corresponding method from {2} due to incompatible nullness constraints
 922 = The nullness annotation is redundant with a default that applies to this location
 923 = The nullness annotation @{0} is not applicable for the primitive type {1}
-924 = Potential null pointer access: The field {0} is declared as @{1}
+924 = Potential null pointer access: The field {0} is specified as @{1}
 925 = Nullness default is redundant with the global default
 926 = Nullness default is redundant with a default specified for the enclosing package {0}
 927 = Nullness default is redundant with a default specified for the enclosing type {0}
@@ -711,14 +786,49 @@
 930 = A default nullness annotation has not been specified for the type {0}
 931 = Redundant null check: The variable {0} is specified as @{1}
 932 = Null comparison always yields false: The variable {0} is specified as @{1}
-933 = Null type mismatch: required ''@{0} {1}'' but the provided value is specified as @{2}
+933 = Null type mismatch: required ''{0}'' but the provided value is specified as @{1}
 934 = The @{0} field {1} may not have been initialized
 935 = The @{0} field {1} may not have been initialized. Note that a problem regarding missing ''default:'' on ''switch'' has been suppressed, which is perhaps related to this problem
 936 = Null comparison always yields false: The method {0} cannot return null
-937 = Redundant null check: The field {0} is declared as @{1}
-938 = Null comparison always yields false: The field {0} is declared as @{1}
+937 = Redundant null check: The field {0} is specified as @{1}
+938 = Null comparison always yields false: The field {0} is specified as @{1}
 939 = The default ''@{0}'' conflicts with the inherited ''@{1}'' annotation in the overridden method from {2} 
 940 = Conflict between inherited null annotations ''@{0}'' declared in {1} versus ''@{2}'' declared in {3} 
+941 = Redundant null check: The field {0} cannot be null at this location (ignoring concurrency)
+942 = Null comparison always yields false: The field {0} cannot be null at this location (ignoring concurrency)
+
+951 = Potential null pointer access: array element may be null
+952 = Potential null pointer access: this expression has a ''@{0}'' type
+953 = Null type mismatch (type annotations): required ''{0}'' but this expression has type ''{1}''
+954 = Null type mismatch (type annotations): required ''{0}'' but this expression has type ''{1}'', corresponding supertype is ''{2}''
+955 = Null type safety (type annotations): The expression of type ''{1}'' needs unchecked conversion to conform to ''{0}''
+956 = Null type safety (type annotations): The expression of type ''{1}'' needs unchecked conversion to conform to ''{0}'', corresponding supertype is ''{2}''
+957 = Null type mismatch at parameter {0}: required ''{1}{2}'' but provided ''@{3} {4}'' via method descriptor {5}
+958 = Null type safety: parameter {0} provided via method descriptor {1} needs unchecked conversion to conform to ''@{2} {3}''
+959 = Null type mismatch at method return type: Method descriptor {0} promises ''@{1} {2}'' but referenced method provides ''{3}{4}''
+960 = Null type safety at method return type: Method descriptor {0} promises ''@{1} {2}'' but referenced method provides ''{3}{4}''
+961 = Redundant null check: comparing ''{0}'' against null
+962 = The nullness annotation ''{0}'' is not applicable at this location
+963 = Nullness annotations are not applicable at this location 
+964 = Null constraint mismatch: The type ''{2}'' is not a valid substitute for the type parameter ''{0}'' which is constrained as ''@{1}''
+965 = This nullness annotation conflicts with a ''@{0}'' annotation which is effective on the same type parameter 
+966 = Null type safety: Unchecked cast from {0} to {1}
+
+# Java 8
+1001 = Syntax error, modifiers and annotations are not allowed for the lambda parameter {0} as its type is elided
+1002 = Syntax error, modifiers are not allowed here
+
+# Default methods:
+# variant of 359: 
+1050 = Illegal modifier for the interface method {0}; only public, abstract, default, static and strictfp are permitted
+1051 = A default method cannot override a method from java.lang.Object 
+1052 = The default method {0} inherited from {1} conflicts with another method inherited from {2}
+1053 = Duplicate default methods named {0} with the parameters ({1}) and ({2}) are inherited from the types {3} and {4}
+1054 = Illegal reference to super type {0}, cannot bypass the more specific direct super type {1}
+1055 = Illegal reference to super method {0} from type {1}, cannot bypass the more specific override from type {2}
+1056 = Illegal combination of modifiers for the interface method {0}; only one of abstract, default, or static permitted
+1057 = strictfp is not permitted for abstract interface method {0}
+1058 = Default methods are allowed only in interfaces with source level 1.8 or greater.
 
 ### ELABORATIONS
 ## Access restrictions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfType.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfType.java
index 7931e51..1e8e9ba 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfType.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/HashtableOfType.java
@@ -60,6 +60,31 @@
 	}
 	return null;
 }
+// Returns old value.
+public ReferenceBinding getput(char[] key, ReferenceBinding value) {
+	ReferenceBinding retVal = null;
+	int length = this.keyTable.length,
+		index = CharOperation.hashCode(key) % length;
+	int keyLength = key.length;
+	char[] currentKey;
+	while ((currentKey = this.keyTable[index]) != null) {
+		if (currentKey.length == keyLength && CharOperation.equals(currentKey, key)) {
+			retVal = this.valueTable[index];
+			this.valueTable[index] = value;
+			return retVal;
+		}
+		if (++index == length) {
+			index = 0;
+		}
+	}
+	this.keyTable[index] = key;
+	this.valueTable[index] = value;
+
+	// assumes the threshold is never equal to the size of the table
+	if (++this.elementSize > this.threshold)
+		rehash();
+	return retVal;
+}
 public ReferenceBinding put(char[] key, ReferenceBinding value) {
 	int length = this.keyTable.length,
 		index = CharOperation.hashCode(key) % length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java
index e6d5dcd..28003dc 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Sorting.java
@@ -1,16 +1,22 @@
 /**********************************************************************
- * Copyright 2008, 2013 Technical University Berlin, Germany and others.
+ * Copyright 2008, 2012 Technical University Berlin, Germany 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *		Stephan Herrmann - Initial API and implementation
  **********************************************************************/
 package org.eclipse.jdt.internal.compiler.util;
 
+import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
+import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeIds;
 
 /**
@@ -71,7 +77,7 @@
 			// search superclass within input:
 			int j = 0;
 			for(j=0; j<input.length; j++)
-				if (input[j] == superclass)
+				if (TypeBinding.equalsEquals(input[j], superclass))
 					break;
 			if (j < input.length)
 				// depth first traversal:
@@ -80,4 +86,30 @@
 		}
 		return o;
 	}
-}
\ No newline at end of file
+	public static MethodBinding[] concreteFirst(MethodBinding[] methods, int length) {
+		if (length == 0 || (length > 0 && !methods[0].isAbstract()))
+			return methods;
+		MethodBinding[] copy = new MethodBinding[length];
+		int idx = 0;
+		for (int i=0; i<length; i++)
+			if (!methods[i].isAbstract())
+				copy[idx++] = methods[i];
+		for (int i=0; i<length; i++)
+			if (methods[i].isAbstract())
+				copy[idx++] = methods[i];
+		return copy;
+	}
+	public static MethodBinding[] abstractFirst(MethodBinding[] methods, int length) {
+		if (length == 0 || (length > 0 && methods[0].isAbstract()))
+			return methods;
+		MethodBinding[] copy = new MethodBinding[length];
+		int idx = 0;
+		for (int i=0; i<length; i++)
+			if (methods[i].isAbstract())
+				copy[idx++] = methods[i];
+		for (int i=0; i<length; i++)
+			if (!methods[i].isAbstract())
+				copy[idx++] = methods[i];
+		return copy;
+	}
+}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
index 0b1b841..6c87dd1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/util/Util.java
@@ -1612,4 +1612,20 @@
 				return scanTypeSignature(string, start);
 		}
 	}
+
+	public static boolean effectivelyEqual(Object [] one, Object [] two) {
+		if (one == two)
+			return true;
+		int oneLength = one == null ? 0 : one.length;
+		int twoLength = two == null ? 0 : two.length;
+		if (oneLength != twoLength)
+			return false;
+		if (oneLength == 0)
+			return true;
+		for (int i = 0; i < one.length; i++) {
+			if (one[i] != two[i])
+				return false;
+		}
+		return true;
+	}
 }
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java
index 446b4c8..faf64fb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/core/compiler/OTNameUtils.java
@@ -100,6 +100,8 @@
 
 	/** Does name denote a synthetic marker interface used for marking tsuper methods? */
 	public static boolean isTSuperMarkerInterface(char[] name) {
+		if (name == null) // some types like LocalTypeBinding and IntersectionCastTypeBinding don't have a name
+			return false;
 		int lastDollar = CharOperation.lastIndexOf('$', name);
 		if (lastDollar > -1)
 			name = CharOperation.subarray(name, lastDollar+1, -1);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java
index 63a4362..0fa3c74 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/AbstractMethodMappingDeclaration.java
@@ -177,6 +177,10 @@
 	{
 		this.ignoreFurtherInvestigation = true;
 	}
+	
+	public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
+		// nothing here
+	}
 
 	public void resetErrorFlag() {
 		this.ignoreFurtherInvestigation = false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java
index 7aaaeae..2e13ad3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/FieldAccessSpec.java
@@ -92,7 +92,7 @@
 			this.arguments = new Argument[] {
 				new Argument(name, nameSourcePositions, type, 0)
 			};
-			this.returnType = TypeReference.baseTypeReference(TypeIds.T_void, 0);
+			this.returnType = TypeReference.baseTypeReference(TypeIds.T_void, 0, null);
 			this.returnType.sourceStart = this.sourceStart;
 			this.returnType.sourceEnd   = this.sourceEnd;
 		} else {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java
index 147084b..c5bb210 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/LiftingTypeReference.java
@@ -29,7 +29,7 @@
 package org.eclipse.objectteams.otdt.internal.core.compiler.ast;
 
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
-import org.eclipse.jdt.internal.compiler.ast.ArrayTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.CharLiteral;
 import org.eclipse.jdt.internal.compiler.ast.DoubleLiteral;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
@@ -40,6 +40,7 @@
 import org.eclipse.jdt.internal.compiler.ast.LongLiteral;
 import org.eclipse.jdt.internal.compiler.ast.NullLiteral;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ClassScope;
 import org.eclipse.jdt.internal.compiler.lookup.MissingTypeBinding;
@@ -97,8 +98,16 @@
 	public TypeReference copyDims(int dim){
 		//return a type reference copy of me with some dimensions
 		//warning : the new type ref has a null binding
+		throw new InternalCompilerError("Method not applicable");
+//		return new ArrayTypeReference(this.roleToken,dim,(((long)this.sourceStart)<<32)+this.sourceEnd) ;
+	}
 
-		return new ArrayTypeReference(this.roleToken,dim,(((long)this.sourceStart)<<32)+this.sourceEnd) ;
+	@Override
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs)
+	{
+		this.baseReference = this.baseReference.augmentTypeWithAdditionalDimensions(additionalDimensions, additionalAnnotations, isVarargs);
+		// FIXME check consistency
+		return this;
 	}
 
 	// The binding is basically the baseReference's binding.
@@ -197,7 +206,7 @@
 	    			ITeamAnchor anchor = null;
 	    			if (roleRefType.baseclass() instanceof RoleTypeBinding)
 	    				anchor = ((RoleTypeBinding)roleRefType.baseclass())._teamAnchor;
-	    			roleBase = parameterizedRole.environment.createParameterizedType((ReferenceBinding)roleBase.original(), typeArgs, anchor, -1, roleBase.enclosingType());
+	    			roleBase = parameterizedRole.environment.createParameterizedType((ReferenceBinding)roleBase.original(), typeArgs, anchor, -1, roleBase.enclosingType(), Binding.NO_ANNOTATIONS);
 	    		}
 	    		// THE compatibility check:
 		    	if (   !baseType.isCompatibleWith(roleBase)
@@ -223,7 +232,7 @@
 	// faked argument, to avoid subsequent errors when resolving
 	// an invalid lifting call.
 	private TypeBinding invalidate(TypeBinding variableType) {
-	    if (this.fakedArgument != null) {
+	    if (this.fakedArgument != null && variableType != null) {
 	        int start = this.roleReference.sourceStart;
 	        int end   = this.roleReference.sourceEnd;
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialTranslationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialTranslationExpression.java
index eb2b5ff..584a97e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialTranslationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/PotentialTranslationExpression.java
@@ -111,7 +111,7 @@
 
 		                    this.expression = new CastExpression(
 		                            this.expression,
-		                            TypeReference.baseTypeReference(this.expectedType.id,0));
+		                            TypeReference.baseTypeReference(this.expectedType.id,0,null));
 		                    this.expression.constant = Constant.NotAConstant;
 		                    ((CastExpression)this.expression).checkCastTypesCompatibility(
 		                            scope,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java
index 0943fc8..b9fdb0c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleClassLiteralAccess.java
@@ -34,17 +34,20 @@
 import org.eclipse.jdt.internal.compiler.ast.Statement;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Wildcard;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.flow.FlowContext;
 import org.eclipse.jdt.internal.compiler.flow.FlowInfo;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
+import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
+import org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding;
 import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError;
 import org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding;
 import org.eclipse.objectteams.otdt.internal.core.compiler.model.RoleModel;
@@ -201,7 +204,20 @@
 			gen = new AstGenerator(roleDecl.scope.compilerOptions().sourceLevel, roleDecl.sourceStart, roleDecl.sourceEnd);
 		else
 			gen = new AstGenerator(teamDecl.scope.compilerOptions().sourceLevel, teamDecl.sourceStart, teamDecl.sourceEnd);
-		TypeReference[] typeArguments = new TypeReference[] {gen.singleTypeReference(roleBinding.sourceName())};
+
+		// return type reference is either "Class<Role>" or "Class<Role<?,?...>>"
+		TypeVariableBinding[] typeVariables = roleBinding.typeVariables();
+		TypeReference roleTypeRef;
+		if (typeVariables != Binding.NO_TYPE_VARIABLES) {
+			Wildcard[] wildcards = new Wildcard[typeVariables.length];
+			for (int i = 0; i < typeVariables.length; i++)
+				wildcards[i] = gen.wildcard(Wildcard.UNBOUND);
+			roleTypeRef = gen.parameterizedSingleTypeReference(roleBinding.sourceName(), wildcards, 0);
+		} else {
+			roleTypeRef = gen.singleTypeReference(roleBinding.sourceName());
+		}
+		TypeReference[] typeArguments = new TypeReference[] {roleTypeRef};
+
 		MethodDeclaration method = gen.method(teamDecl.compilationResult,
 				(teamBinding.isRole())
 					? ClassFileConstants.AccPublic // advertized via ifc, must be public
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleInitializationMethod.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleInitializationMethod.java
index c51f0fc..c9339bb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleInitializationMethod.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/RoleInitializationMethod.java
@@ -88,7 +88,7 @@
 	 */
 	public RoleInitializationMethod(CompilationResult compilationResult) {
 		super(compilationResult);
-		this.returnType = TypeReference.baseTypeReference(TypeIds.T_void, 0);
+		this.returnType = TypeReference.baseTypeReference(TypeIds.T_void, 0, null);
 		this.selector = INIT_METHOD_NAME;
 		this.bits |= ASTNode.NeedFreeReturn;
 		this.isGenerated = true;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java
index c5fd902..5565389 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeAnchorReference.java
@@ -22,6 +22,7 @@
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.ASTVisitor;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.Argument;
 import org.eclipse.jdt.internal.compiler.ast.Expression;
 import org.eclipse.jdt.internal.compiler.ast.FieldReference;
@@ -103,9 +104,8 @@
 	}
 
 	@Override
-	public TypeReference copyDims(int dim) {
-		// TODO Auto-generated method stub
-		return null;
+	public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
+		throw new InternalCompilerError("Method not applicable");
 	}
 
 	@Override
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeContainerMethod.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeContainerMethod.java
index a7a0a1b..d7a4856 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeContainerMethod.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/ast/TypeContainerMethod.java
@@ -62,7 +62,7 @@
 		setStatements(new Statement[] {localType});
 		this.selector = SELECTOR;
 		this.isGenerated = true;
-		this.returnType = TypeReference.baseTypeReference(TypeIds.T_void, 0);
+		this.returnType = TypeReference.baseTypeReference(TypeIds.T_void, 0, null);
 	}
 
 	public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java
index d3a82bf..86d1fa9 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/bytecode/ConstantPoolObjectReader.java
@@ -33,6 +33,7 @@
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileStruct;
+import org.eclipse.jdt.internal.compiler.classfmt.TypeAnnotationWalker;
 import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.impl.Constant;
 import org.eclipse.jdt.internal.compiler.lookup.ArrayBinding;
@@ -150,10 +151,10 @@
         char[] typeName = getUtf8(ref);
         if (useGenerics)
         	return this._environment.getTypeFromTypeSignature(
-        				new SignatureWrapper(typeName), Binding.NO_TYPE_VARIABLES, this._srcModel.getBinding(), null); // no missing type info available
+        				new SignatureWrapper(typeName), Binding.NO_TYPE_VARIABLES, this._srcModel.getBinding(), null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER); // no missing type info available
         else
         	return this._environment.getTypeFromSignature(
-        				typeName, 0, typeName.length-1, false/*GENERIC*/, this._srcModel.getBinding(), null); // no missing type info available
+        				typeName, 0, typeName.length-1, false/*GENERIC*/, this._srcModel.getBinding(), null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER); // no missing type info available
     }
 
 	private int getInteger(int index){
@@ -210,7 +211,8 @@
 		}
 
 		// follows: decoding of array, leaf component type needs 'L' for reference bindings:
-		TypeBinding typeBinding = this._environment.getTypeFromSignature(name_str, 0, -1, false, this._srcModel.getBinding(), null);
+		TypeBinding typeBinding = this._environment.getTypeFromSignature(name_str, 0, -1, false, this._srcModel.getBinding(),
+																			null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
 		if (!typeBinding.leafComponentType().isBaseType()) {
 			ReferenceBinding referenceBinding = (ReferenceBinding)typeBinding.leafComponentType();
 			if (referenceBinding instanceof UnresolvedReferenceBinding) {
@@ -527,14 +529,16 @@
 					while ((nextChar = methodSignature[++end]) != ';'){/*empty*/}
 
 				if (i >= startIndex)   // skip the synthetic arg if necessary
-					parameters[i - startIndex] = this._environment.getTypeFromSignature(methodSignature, index, end, false/*GENERIC*/, this._srcModel.getBinding(), null); // no missing type info available
+					parameters[i - startIndex] = this._environment.getTypeFromSignature(methodSignature, index, end, false/*GENERIC*/, this._srcModel.getBinding(),
+																						null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER); // no missing type info available
 				index = end + 1;
 			}
 		}
 		return new MethodBinding(
 				methodModifiers,
 				methodSelector,
-				this._environment.getTypeFromSignature(methodSignature, index + 1, -1, false/*GENERIC*/, this._srcModel.getBinding(), null),   // index is currently pointing at the ')'
+				this._environment.getTypeFromSignature(methodSignature, index + 1, -1, false/*GENERIC*/, this._srcModel.getBinding(),   // index is currently pointing at the ')'
+														null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER),
 				parameters,
 				Binding.NO_EXCEPTIONS,
 				declaringClass);
@@ -657,8 +661,10 @@
 				separatorPosDescriptor = CharOperation.indexOf(';', descriptor);
 			}
 			if (separatorPosMethod > 0 && separatorPosDescriptor > 0) {
-				TypeBinding type1 = this._environment.getTypeFromSignature(signature, 1, separatorPosMethod, false/*GENERIC*/, this._srcModel.getBinding(), null);
-				TypeBinding type2 = this._environment.getTypeFromSignature(descriptor, 1, separatorPosDescriptor, false/*GENERIC*/, this._srcModel.getBinding(), null);
+				TypeBinding type1 = this._environment.getTypeFromSignature(signature, 1, separatorPosMethod, false/*GENERIC*/, this._srcModel.getBinding(),
+																			null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
+				TypeBinding type2 = this._environment.getTypeFromSignature(descriptor, 1, separatorPosDescriptor, false/*GENERIC*/, this._srcModel.getBinding(),
+																			null, TypeAnnotationWalker.EMPTY_ANNOTATION_WALKER);
 				if (!type1.isTeam() || !type2.isTeam())
 					return false;
 				if (!type1.isCompatibleWith(type2))
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java
index 1be6bf6..b78cdf0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/DeclaredLifting.java
@@ -809,10 +809,11 @@
 				// tricky case: need to discard type parameters, but retain/recreate the role type wrapping:
 				RoleTypeBinding baseRole = (RoleTypeBinding)boundBase;
 				boundBase = environment.createParameterizedType(baseRole._declaredRoleType, 
-															 	null, 					// erase type parameters 
-																baseRole._teamAnchor, 	// but retain anchor
-																-1,						// valueParamPosition 
-																baseRole.enclosingType());
+															 	null, 					// erase type parameters
+															 	baseRole._teamAnchor, 	// but retain anchor
+																-1,						// valueParamPosition
+																baseRole.enclosingType(), 
+																Binding.NO_ANNOTATIONS);
 			}
 			// only RTB but not parameterized: leave unchanged.
 		} else {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java
index 202be9b..5dd09ef 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/Lifting.java
@@ -22,6 +22,7 @@
 import org.eclipse.jdt.core.compiler.CharOperation;
 import org.eclipse.jdt.core.compiler.IProblem;
 import org.eclipse.jdt.internal.compiler.ast.*;
+import org.eclipse.jdt.internal.compiler.ast.Expression.DecapsulationState;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.codegen.BranchLabel;
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
@@ -1010,7 +1011,8 @@
         // _OT$team_param._OT$cache_OT$RootRole
         return this._gen.fieldReference(
     				this._gen.setPos(ThisReference.implicitThis()),
-					LiftingEnvironment.getCacheName(this._boundRootRoleModel));
+					LiftingEnvironment.getCacheName(this._boundRootRoleModel),
+					DecapsulationState.REPORTED);
     }
 
     private Block createTryCastBlock(
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java
index 74cd461..e132189 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lifting/LiftingEnvironment.java
@@ -328,11 +328,11 @@
 	    // hoping, that no-one maliciously accesses the cache.
 	    
 	    // if base is generic, we refer to it via the raw type, suppress that warning:
-	    if (usingRawType) {
-		    field.annotations = new Annotation[] {
-		    	gen.singleStringsMemberAnnotation(TypeConstants.JAVA_LANG_SUPPRESSWARNINGS, new char[][]{"rawtypes".toCharArray()}) //$NON-NLS-1$ 
-		    };
-	    }
+//	    if (usingRawType) {
+//		    field.annotations = new Annotation[] {
+//		    	gen.singleStringsMemberAnnotation(TypeConstants.JAVA_LANG_SUPPRESSWARNINGS, new char[][]{"rawtypes".toCharArray()}) //$NON-NLS-1$ 
+//		    };
+//	    }
 	    
 	    AstEdit.addField(teamDecl, field, true, false/*typeProblem*/, false);
 		teamDecl.getTeamModel().addCache(field);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java
index 8279312..d36a115 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AbstractOTReferenceBinding.java
@@ -69,7 +69,14 @@
 
 	// allow to see this as a ReferenceBinding:
 	protected abstract ReferenceBinding _this();
-
+	
+	public AbstractOTReferenceBinding(ReferenceBinding prototype) {
+		super(prototype);
+	}
+	
+	protected AbstractOTReferenceBinding() {
+		super();
+	}
 	// === Start OT-additions: ===
 	/** If set to true, assume that this class implements o.o.IBoundBase (will be added by the OTRE) */
 	private boolean isBoundBase = false;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java
index 7b71c84..a30aef8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/AnchorMapping.java
@@ -293,7 +293,7 @@
     * @param currentMethod  a candidate for the current method call
     */
    public static boolean areTypesEqual(TypeBinding t1, TypeBinding t2, MethodBinding currentMethod) {
-   		if (t1 == t2)
+   		if (TypeBinding.equalsEquals(t1, t2))
    			return true;
    		if (   t1 instanceof RoleTypeBinding
    			&& t2 instanceof RoleTypeBinding)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
index c62eb0b..59de08a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/DependentTypeBinding.java
@@ -399,6 +399,11 @@
 	public ReferenceBinding rawBaseclass() {
 		return this.type.rawBaseclass();
 	}
+	
+	@Override
+	public TypeBinding original() {
+		return this.type.original();
+	}
 
 	@Override
 	public void setIsBoundBase(ReferenceBinding roleType) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
index 3222e95..5109d11 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/RoleTypeBinding.java
@@ -763,10 +763,12 @@
      * and for determining overriding.
      */
     public boolean isCompatibleWith(TypeBinding right, /*@Nullable*/ Scope captureScope) {
-        if (right == this)
+        if (TypeBinding.equalsEquals(right, this))
             return true;
         if (!(right instanceof ReferenceBinding))
             return false;
+        if (right.isRawType() && this.erasure().isCompatibleWith(right, captureScope))
+        	return true;
 
         ReferenceBinding referenceBinding = (ReferenceBinding) right;
         if (isRoleType(referenceBinding))
@@ -781,13 +783,13 @@
         	}
 
     		// compensate weakened signature:
-    		if (rightRole._staticallyKnownTeam != this._staticallyKnownTeam) {
+    		if (TypeBinding.notEquals(rightRole._staticallyKnownTeam, this._staticallyKnownTeam)) {
     			if (TeamModel.areTypesCompatible(
     					rightTeam,
 						this._staticallyKnownTeam))
     			{
     				ReferenceBinding leftStrengthened = this._teamAnchor.getMemberTypeOfType(internalName());
-    				if (leftStrengthened != this)
+    				if (TypeBinding.notEquals(leftStrengthened, this))
     					return leftStrengthened.isCompatibleWith(right, captureScope);
     			}
     			else if (TeamModel.areTypesCompatible(
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java
index 32dd4f2..bd34a7f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/lookup/TeamAnchor.java
@@ -794,7 +794,7 @@
 			LookupEnvironment   env) 
 	{
 	    DependentTypeBinding dependentTypeBinding =
-	    	(DependentTypeBinding)env.createParameterizedType(typeBinding, arguments, this, paramPosition, typeBinding.enclosingType());
+	    	(DependentTypeBinding)env.createParameterizedType(typeBinding, arguments, this, paramPosition, typeBinding.enclosingType(), Binding.NO_ANNOTATIONS);
 	    return (dimensions > 0)
 	    	? dependentTypeBinding.getArrayType(dimensions)
 	    	: dependentTypeBinding;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java
index 3a1364f..1d310b3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/mappings/CallinImplementor.java
@@ -773,7 +773,7 @@
 			TypeBinding[] typeArguments = liftMethod[0].typeVariables();
 			if (typeArguments != Binding.NO_TYPE_VARIABLES)
 				try {
-					roleVarType = Config.getLookupEnvironment().createParameterizedType(roleVarType, typeArguments, null, -1, roleModel.getBinding().enclosingType());
+					roleVarType = Config.getLookupEnvironment().createParameterizedType(roleVarType, typeArguments, null, -1, roleModel.getBinding().enclosingType(), Binding.NO_ANNOTATIONS);
 				} catch (NotConfiguredException e) {
 					e.logWarning("Cannot lookup parameterized type"); //$NON-NLS-1$
 				}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
index 9fe51d2..7354e00 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/model/TeamModel.java
@@ -33,6 +33,7 @@
 import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.PackageBinding;
@@ -84,6 +85,9 @@
 
 	// can lifting fail due to role abstractness?
     public static final int HasAbstractRelevantRole = ASTNode.Bit10;
+    
+    // did a nested team require correction of team/role flags?
+    public static final int HasClassKindProblem = ASTNode.Bit11;
 
 	/** The Marker interface created for this Team (_TSuper__OT__TeamName); */
 	public TypeDeclaration markerInterface;
@@ -610,7 +614,7 @@
 		if (roleType.isParameterizedType()) {
 			// consult original role type for type arguments:
 			ParameterizedTypeBinding ptb = (ParameterizedTypeBinding)roleType;
-			TypeBinding parameterized = ptb.environment.createParameterizedType(roleRefType, ptb.arguments, anchor, -1, roleRefType.enclosingType());
+			TypeBinding parameterized = ptb.environment.createParameterizedType(roleRefType, ptb.arguments, anchor, -1, roleRefType.enclosingType(), Binding.NO_ANNOTATIONS);
 			if (dimensions > 0)
 				return ptb.environment.createArrayType(parameterized, dimensions);
 			return parameterized;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java
index 93b8b47..c7574ee 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/ReflectionGenerator.java
@@ -38,6 +38,7 @@
 import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
+import org.eclipse.jdt.internal.compiler.ast.Expression.DecapsulationState;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
@@ -406,7 +407,7 @@
 		 */
 		return gen.ifStatement(
 					gen.messageSend(
-							gen.fieldReference(gen.thisReference(), cacheName),
+							gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 							CONTAINS_KEY,
 							new Expression[] { gen.singleNameReference(_OT_BASE_ARG) }
 					),
@@ -427,7 +428,7 @@
 					ADD_ALL,
 					new Expression[] {
 						gen.messageSend(
-							gen.fieldReference(gen.thisReference(), cacheName),
+							gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 							VALUES,
 							null
 						)
@@ -456,7 +457,7 @@
 					gen.assignment(
 						gen.singleNameReference(FIRST_RESULT),
 						gen.messageSend(
-							gen.fieldReference(gen.thisReference(),cacheName),
+							gen.fieldReference(gen.thisReference(),cacheName,DecapsulationState.REPORTED),
 							GET,
 							new Expression[] {
 								gen.singleNameReference(_OT_BASE_ARG)
@@ -470,7 +471,7 @@
 				});
 		return gen.ifStatement(
 					gen.messageSend(
-							gen.fieldReference(gen.thisReference(), cacheName),
+							gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 							CONTAINS_KEY,
 							new Expression[] { gen.singleNameReference(_OT_BASE_ARG) }
 					),
@@ -517,7 +518,7 @@
 		Block innerThen = gen.block(new Statement[] {
 					gen.assignment(
 						gen.singleNameReference(  FIRST_CACHE),
-						gen.fieldReference(gen.thisReference(),cacheName)
+						gen.fieldReference(gen.thisReference(),cacheName,DecapsulationState.REPORTED)
 					),
 					gen.assignment(
 						gen.singleNameReference(FIRST_NAME),
@@ -543,7 +544,7 @@
 						),
 						gen.ifStatement(
 							gen.messageSend(
-								gen.fieldReference(gen.thisReference(), cacheName),
+								gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 								CONTAINS_KEY,
 								new Expression[] { gen.singleNameReference(FOUND_BASE) }
 							),
@@ -652,7 +653,7 @@
 							    gen.returnStatement(
 							    	// <cacheName>.containsKey(_OT$base_arg)
 									gen.messageSend(
-										gen.fieldReference(gen.thisReference(), cacheName),
+										gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 										CONTAINS_KEY,
 										new Expression[] { gen.singleNameReference(_OT_BASE_ARG) }
 									)
@@ -666,7 +667,7 @@
 										IS_INSTANCE,
 										new Expression[] {
 											gen.messageSend(
-												gen.fieldReference(gen.thisReference(), cacheName),
+												gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 												GET,
 												new Expression[] { gen.singleNameReference(_OT_BASE_ARG) },
 												objectBinding // pretend to return object even if role is confined (avoid lowering)
@@ -690,7 +691,7 @@
 		 * 		}
 		 */
 		Expression messageSendGet = gen.messageSend(
-				gen.fieldReference(gen.thisReference(), cacheName),
+				gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 				GET,
 				new Expression[] { gen.singleNameReference(_OT_BASE_ARG) }
 		);
@@ -738,7 +739,7 @@
 							gen.assignment(
 								gen.singleNameReference(VALUES),
 								gen.messageSend(
-									gen.fieldReference(gen.thisReference(), cacheName),
+									gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 									VALUES,
 									null
 								)
@@ -852,7 +853,7 @@
 								new Expression[0]
 							)),
 					gen.messageSend(
-						gen.fieldReference(gen.thisReference(), cacheName),
+						gen.fieldReference(gen.thisReference(), cacheName, DecapsulationState.REPORTED),
 						REMOVE,
 						new Expression[] {
 						    gen.singleNameReference(BASE_OBJ)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java
index 838a9dd..b133889 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/statemachine/transformer/RoleMigrationImplementor.java
@@ -307,7 +307,7 @@
 		FieldBinding baseField = roleBinding.getField(IOTConstants._OT_BASE, true);
 		// accessing the cache (using remove() and put()):
 		ReferenceBinding cacheTypeBinding = (ReferenceBinding) scope.getType(IOTConstants.WEAK_HASH_MAP, 3);
-		MethodBinding remove = cacheTypeBinding.getMethod(scope, "remove".toCharArray()); //$NON-NLS-1$
+		MethodBinding remove = getMethod(cacheTypeBinding, "remove".toCharArray(), 1); //$NON-NLS-1$
 		MethodBinding put    = cacheTypeBinding.getMethod(scope, "put".toCharArray()); //$NON-NLS-1$
 		// accessing the base object (using _OT$removeRole() and _OT$addRole()):
 		ReferenceBinding iboundBase = (ReferenceBinding) scope.getType(IOTConstants.ORG_OBJECTTEAMS_IBOUNDBASE, 3);
@@ -350,6 +350,21 @@
 
 		codeStream.return_();
 	}
+	
+	static MethodBinding getMethod(ReferenceBinding declaringClass, char[] selector, int numParams) {
+		MethodBinding[] methods = declaringClass.getMethods(selector);
+		MethodBinding found = null;
+		for (int i = 0; i < methods.length; i++) {
+			if (methods[i].parameters.length == numParams) {
+				if (found != null)
+					throw new IncompatibleClassChangeError("More than 1 "+String.valueOf(selector)+" method found"); //$NON-NLS-1$ //$NON-NLS-2$
+				found = methods[i];
+			}
+		}
+		if (found == null)
+			throw new IncompatibleClassChangeError("Required "+String.valueOf(selector)+" method not found"); //$NON-NLS-1$ //$NON-NLS-2$
+		return found;
+	}
 
 	// pre: call target (base) is on stack
 	static void genAddOrRemoveRole(CodeStream codeStream, Scope scope, ReferenceBinding iboundBase, boolean isAdding) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
index 815e87e..985fb32 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/AstGenerator.java
@@ -222,8 +222,14 @@
     }
 
 	public FieldReference fieldReference (Expression receiver, char[] name) {
+		return fieldReference(receiver, name, DecapsulationState.NONE);
+	}
+
+	public FieldReference fieldReference (Expression receiver, char[] name, DecapsulationState baseDecapsulation) {
 		FieldReference field = new FieldReference(name, this.pos);
 		field.receiver = receiver;
+		if (baseDecapsulation != DecapsulationState.NONE)
+			field.setBaseclassDecapsulation(baseDecapsulation);
 		return field;
 	}
 
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java
index b9872c5..fc666cf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/Protections.java
@@ -29,7 +29,6 @@
 import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.Scope;
 import org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
-import org.eclipse.jdt.internal.compiler.lookup.TagBits;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.objectteams.otdt.core.exceptions.InternalCompilerError;
 import org.eclipse.objectteams.otdt.internal.core.compiler.ast.TSuperMessageSend;
@@ -88,8 +87,7 @@
                 	modifiers |= AccTeam;
                 	type.modifiers |= AccTeam;
                 }
-        		type.binding.tagBits |= TagBits.HasClassKindProblem;
-        		type.getTeamModel(); // initialize
+        		type.getTeamModel().tagBits |= TeamModel.HasClassKindProblem; // initialize
         		for (int i = 0; i < type.memberTypes.length; i++) {
 					type.memberTypes[i].modifiers |= AccRole;
 					type.memberTypes[i].enclosingType = type;
@@ -109,7 +107,8 @@
     }
 
     public static boolean hasClassKindProblem(ReferenceBinding binding) {
-    	if ((binding.tagBits & TagBits.HasClassKindProblem) != 0)
+    	TeamModel model = binding._teamModel;
+    	if (model != null && (model.tagBits & TeamModel.HasClassKindProblem) != 0)
     		return true;
     	if (binding.enclosingType() != null)
     		return hasClassKindProblem(binding.enclosingType());
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java
index ca2c67e..4af553e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java
@@ -67,62 +67,9 @@
     static boolean doingSignatures = false;
 
 	/** Simulate map() HOF over all arguments of a type for recursive wrapping. */
-	static abstract class TypeArgumentUpdater {
-		/** the function argument ot map(). */
-		abstract TypeBinding updateArg(ReferenceBinding arg);
-		/** Entry: perform the update. */
-		TypeBinding updateType(TypeBinding type, ASTNode typedNode)
-		{
-			// first check whether we need to work at all:
-
-			if (!type.isParameterizedType())
-				return type;
-			// don't wrap args of cache-field reference:
-			if (typedNode != null && typedNode instanceof FieldReference)
-				if (CharOperation.prefixEquals(IOTConstants.CACHE_PREFIX,
-											   ((FieldReference)typedNode).token))
-					return type;
-
-			// consider arrays:
-			TypeBinding origType = type;
-			int dimensions = type.dimensions();
-			type = type.leafComponentType();
-			//
-			ParameterizedTypeBinding genericType = (ParameterizedTypeBinding)type; // checked above
-			if (genericType.arguments == null)
-				return origType;
-
-			boolean modified = false;
-			TypeBinding[] arguments = new TypeBinding[genericType.arguments.length];
-			for (int i = 0; i < arguments.length; i++)
-			{
-				TypeBinding arg = genericType.arguments[i];
-				if (   arg instanceof ReferenceBinding
-					&& !arg.isTypeVariable())
-					arguments[i] = updateArg((ReferenceBinding)arg);
-				else
-					arguments[i] = arg;
-
-				// must avoid nulls in arguments (no longer observed in otjld-tests):
-				if (arguments[i] == null) {
-					arguments[i] = new ProblemReferenceBinding(arg.internalName(),
-									   (arg instanceof ReferenceBinding) ? (ReferenceBinding)arg: null,
-									   ProblemReasons.NotFound);
-					continue; // not a good modification
-				}
-				modified |= (arguments[i] != arg);
-			}
-			if (!modified)
-				return origType;
-
-			// yes, we have a modification
-			LookupEnvironment environment = ((ParameterizedTypeBinding)type).environment;
-			TypeBinding newType = environment.createParameterizedType((ReferenceBinding) type.erasure(), arguments, type.enclosingType()); 
-			if (dimensions == 0)
-				return newType;
-			else
-				return environment.createArrayType(newType, dimensions);
-		}
+	public interface TypeArgumentUpdater {
+		/** the function argument to map(). */
+		public abstract TypeBinding updateArg(ReferenceBinding arg);
 	}
 
 	/**
@@ -169,14 +116,13 @@
 			return ((CaptureBinding) refBinding).maybeWrapQualifiedRoleType(scope, anchorExpr, typedNode, originalType);
 
     	TypeBinding wrappedRoleType = internalWrapQualifiedRoleType(scope, anchorExpr, originalType, typedNode, refBinding, dimensions);
-		return new TypeArgumentUpdater() {
-						@Override
-						TypeBinding updateArg(ReferenceBinding arg) {
+		return wrappedRoleType.maybeWrapRoleType(typedNode, new TypeArgumentUpdater() {
+						public TypeBinding updateArg(ReferenceBinding arg) {
 			        		if (arg instanceof WildcardBinding)
 					        	return ((WildcardBinding) arg).maybeWrapQualifiedRoleType(scope, anchorExpr, typedNode);
 			        		return arg;
 						}
-					}.updateType(wrappedRoleType, typedNode);
+					});
     }
     static TypeBinding internalWrapQualifiedRoleType (
     		final Scope      scope,
@@ -196,11 +142,11 @@
 
         if (existingAnchor == null) {
         	if (!refBinding.isDirectRole())
-        		return new TypeArgumentUpdater() {
-					TypeBinding updateArg(ReferenceBinding arg) {
+        		return originalType.maybeWrapRoleType(typedNode, new TypeArgumentUpdater() {
+					public TypeBinding updateArg(ReferenceBinding arg) {
 						return maybeWrapQualifiedRoleType(scope, anchorExpr, arg, typedNode);
 					}
-        		}.updateType(originalType, typedNode);
+        		});
         } else {
             if (  !(existingAnchor instanceof TThisBinding)) {
             	// possibly have two significant anchors..
@@ -606,24 +552,17 @@
 	        		}
 	        	};
 	        }
-	        ReferenceBinding refBinding = (ReferenceBinding)typeToWrap;
-	        if (refBinding.isTypeVariable()) {
-	        	// inplace modifying the type variable. TODO(SH): is this ok, or do we need a copy?
-	        	TypeVariableBinding typeVariable= (TypeVariableBinding)refBinding;
-	        	typeVariable.firstBound= maybeWrapUnqualifiedRoleType(scope, site, typeVariable.firstBound, typedNode, problemReporter);
-	        	typeVariable.superclass= (ReferenceBinding)maybeWrapUnqualifiedRoleType(scope, site, typeVariable.superclass, typedNode, problemReporter);
-	        	if (typeVariable.superInterfaces != null)
-		        	for (int i = 0; i < typeVariable.superInterfaces.length; i++)
-						typeVariable.superInterfaces[i]= (ReferenceBinding)maybeWrapUnqualifiedRoleType(scope, site, typeVariable.superInterfaces[i], typedNode, problemReporter);
+	        if (typeToWrap instanceof IntersectionCastTypeBinding) { // FIXME (recurse?)
 	        	return originalType;
 	        }
+	        ReferenceBinding refBinding = (ReferenceBinding)typeToWrap;
 	        if (  !refBinding.isDirectRole()) {
 	        	final ProblemReporter reporter = problemReporter;
-	            return new TypeArgumentUpdater() {
-					TypeBinding updateArg(ReferenceBinding arg) {
+	            return originalType.maybeWrapRoleType(typedNode, new TypeArgumentUpdater() {
+					public TypeBinding updateArg(ReferenceBinding arg) {
 						return maybeWrapUnqualifiedRoleType(scope, site, arg, typedNode, reporter);
 					}
-	        	}.updateType(originalType, typedNode);
+	        	});
 	        }
 
 	        // already wrapped:
@@ -1597,12 +1536,12 @@
 											ReferenceBinding baseSideType)
 	{
 		TypeArgumentUpdater typeArgumentUpdater = new TypeArgumentUpdater () {
-			TypeBinding updateArg(ReferenceBinding arg) {
+			public TypeBinding updateArg(ReferenceBinding arg) {
 				return maybeInstantiateFromPlayedBy(scope, arg);
 			}
 		};
 		if (!baseSideType.isDirectRole())
-			return (ReferenceBinding)typeArgumentUpdater.updateType(baseSideType, null);
+			return (ReferenceBinding)baseSideType.maybeWrapRoleType(null, typeArgumentUpdater);
 
 		ITeamAnchor baseSideAnchor = getPlayedByAnchor(scope);
 // FIXME(SH): strengthen base type?
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
index c27e48c..289e3b4 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AST.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -21,7 +25,6 @@
 import java.util.StringTokenizer;
 
 import org.eclipse.core.runtime.IProgressMonitor;
-
 import org.eclipse.jdt.core.IClassFile;
 import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaProject;
@@ -118,7 +121,7 @@
      * </p>
      *
 	 * @since 3.0
-	 * @deprecated Clients should use the {@link #JLS4} AST API instead.
+	 * @deprecated Clients should use the {@link #JLS8} AST API instead.
 	 */
 	public static final int JLS2 = 2;
 
@@ -142,7 +145,7 @@
      * </p>
      *
 	 * @since 3.1
-	 * @deprecated Clients should use the {@link #JLS4} AST API instead.
+	 * @deprecated Clients should use the {@link #JLS8} AST API instead.
 	 */
 	public static final int JLS3 = 3;
 	
@@ -166,8 +169,32 @@
 	 * </p>
 	 *
 	 * @since 3.7.1
+	 * @deprecated Clients should use the {@link #JLS8} AST API instead.
 	 */
 	public static final int JLS4 = 4;
+	
+	/**
+	 * Internal synonym for {@link #JLS4}. Use to alleviate
+	 * deprecation warnings.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	/*package*/ static final int JLS4_INTERNAL = JLS4;
+	
+	/**
+	 * Constant for indicating the AST API that handles JLS8.
+	 * <p>
+	 * This API is capable of handling all constructs in the
+	 * Java language as described in the Java Language
+	 * Specification, Java SE 8 Edition (JLS8) as specified by JSR337.
+	 * JLS8 is a superset of all earlier versions of the
+	 * Java language, and the JLS8 API can be used to manipulate
+	 * programs written in all versions of the Java language
+	 * up to and including Java SE 8 (aka JDK 1.8).
+	 * </p>
+	 *
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final int JLS8 = 8;
 
 	/*
 	 * Must not collide with a value for ICompilationUnit constants
@@ -259,7 +286,7 @@
 	 * Creates a new Java abstract syntax tree
      * (AST) following the specified set of API rules.
      * <p>
-     * Clients should use this method specifying {@link #JLS4} as the
+     * Clients should use this method specifying {@link #JLS8} as the
      * AST level in all cases, even when dealing with source of earlier JDK versions like 1.3 or 1.4.
      * </p>
      *
@@ -669,7 +696,7 @@
 						null/*taskPriorities*/,
 						true/*taskCaseSensitive*/);
 				break;
-			case JLS4 :
+			case JLS4_INTERNAL :
 				this.apiLevel = level;
 				// initialize a scanner
 				this.scanner = new Scanner(
@@ -682,6 +709,19 @@
 						null/*taskPriorities*/,
 						true/*taskCaseSensitive*/);
 				break;
+			case JLS8 :
+				this.apiLevel = level;
+				// initialize a scanner
+				this.scanner = new Scanner(
+						true /*comment*/,
+						true /*whitespace*/,
+						false /*nls*/,
+						ClassFileConstants.JDK1_8 /*sourceLevel*/,
+						ClassFileConstants.JDK1_8 /*complianceLevel*/,
+						null/*taskTag*/,
+						null/*taskPriorities*/,
+						true/*taskCaseSensitive*/);
+				break;	
 			default:
 				throw new IllegalArgumentException("Unsupported JLS level"); //$NON-NLS-1$
 		}
@@ -762,6 +802,7 @@
 	 * @return a new unparented node owned by this AST
 	 * @exception IllegalArgumentException if <code>nodeClass</code> is
 	 * <code>null</code> or is not a concrete node type class
+	 * or is not supported for this AST's API level
 	 * @since 3.0
 	 */
 	public ASTNode createInstance(Class nodeClass) {
@@ -788,7 +829,9 @@
 		} catch (InvocationTargetException e) {
 			// concrete AST node classes do not die in the constructor
 			// therefore nodeClass is not legit
-			throw new IllegalArgumentException();
+			IllegalArgumentException iae = new IllegalArgumentException();
+			iae.initCause(e.getCause());
+			throw iae;
 		}
 	}
 
@@ -803,7 +846,7 @@
 	 * constants declared on {@link ASTNode}
 	 * @return a new unparented node owned by this AST
 	 * @exception IllegalArgumentException if <code>nodeType</code> is
-	 * not a legal AST node type
+	 * not a legal AST node type or if it's not supported for this AST's API level
 	 * @since 3.0
 	 */
 	public ASTNode createInstance(int nodeType) {
@@ -961,6 +1004,14 @@
 	}
 
 	/**
+	 * A local method to workaround calling deprecated method in array type.
+	 * @deprecated
+	 */
+	private void setArrayComponentType(ArrayType arrayType, Type type) {
+		arrayType.setComponentType(type);
+	}
+
+	/**
 	 * Creates and returns a new unparented annotation type declaration
 	 * node for an unspecified, but legal, name; no modifiers; no javadoc;
 	 * and an empty list of member declarations.
@@ -1105,54 +1156,86 @@
 
 	/**
 	 * Creates and returns a new unparented array type node with the given
-	 * component type, which may be another array type.
+	 * element type, which cannot be an array type for API levels JLS8 and later.
+	 * By default, the array type has one non-annotated dimension.
+	 * <p>
+	 * For JLS4 and before, the given component type may be another array type.
 	 *
-	 * @param componentType the component type (possibly another array type)
+	 * @param elementType element type for API level JLS8 and later, or the
+	 * component type (possibly another array type) for levels less than JLS8
 	 * @return a new unparented array type node
 	 * @exception IllegalArgumentException if:
 	 * <ul>
 	 * <li>the node belongs to a different AST</li>
 	 * <li>the node already has a parent</li>
+	 * <li>API level is JLS8 or later and type is an array type</li>
 	 * </ul>
 	 */
-	public ArrayType newArrayType(Type componentType) {
-		ArrayType result = new ArrayType(this);
-		result.setComponentType(componentType);
+	public ArrayType newArrayType(Type elementType) {
+		ArrayType result;
+		if (this.apiLevel < AST.JLS8) {
+			result = new ArrayType(this);
+			setArrayComponentType(result, elementType);
+			return result;
+		}
+		if (elementType.isArrayType()) {
+			throw new IllegalArgumentException();
+		}
+		result = new ArrayType(this);
+		result.setElementType(elementType);
 		return result;
 	}
 
 	/**
 	 * Creates and returns a new unparented array type node with the given
-	 * element type and number of (additional) dimensions.
+	 * element type and number of dimensions.
 	 * <p>
-	 * Note that if the element type passed in is an array type, the
+	 * For JLS4 and before, the element type passed in can be an array type, but in that case, the
 	 * element type of the result will not be the same as what was passed in.
+	 * For JLS4 and before, the dimensions cannot be 0.
 	 * </p>
 	 *
-	 * @param elementType the element type (can be an array type)
-	 * @param dimensions the number of dimensions, a positive number
+	 * @param elementType the element type (cannot be an array type for JLS8 and later)
+	 * @param dimensions the number of dimensions, a non-negative number
 	 * @return a new unparented array type node
 	 * @exception IllegalArgumentException if:
 	 * <ul>
 	 * <li>the node belongs to a different AST</li>
 	 * <li>the node already has a parent</li>
 	 * <li>the element type is null</li>
-	 * <li>the number of dimensions is lower than 1</li>
-	 * <li>the number of dimensions is greater than 1000</li>
+	 * <li>the number of dimensions is lower than 0 (for JLS4 and before: lower than 1)</li>
+	 * <li>the number of dimensions is greater than 255</li>
+	 * <li>for levels from JLS8 and later, if the element type is an array type </li>
 	 * </ul>
 	 */
 	public ArrayType newArrayType(Type elementType, int dimensions) {
 		if (elementType == null) {
 			throw new IllegalArgumentException();
 		}
-		if (dimensions < 1 || dimensions > 1000) {
-			// we would blow our stacks anyway with a 1000-D array
+		if (dimensions < 0 || dimensions > 255) {
+			// max as per Java VM spec
 			throw new IllegalArgumentException();
 		}
-		ArrayType result = new ArrayType(this);
-		result.setComponentType(elementType);
-		for (int i = 2; i <= dimensions; i++) {
-			result = newArrayType(result);
+		ArrayType result;
+		if (this.apiLevel < AST.JLS8) {
+			if (dimensions < 1) {
+				throw new IllegalArgumentException();
+			}
+			result = new ArrayType(this);
+			setArrayComponentType(result, elementType);
+			for (int i = 2; i <= dimensions; i++) {
+				result = newArrayType(result);
+			}
+			return result;
+		}
+		//level >= JLS8
+		if (elementType.isArrayType()) {
+			throw new IllegalArgumentException();
+		}
+		result = new ArrayType(this, 0);
+		result.setElementType(elementType);
+		for (int i = 0; i < dimensions; ++i) {
+			result.dimensions().add(new Dimension(this));
 		}
 		return result;
 
@@ -1398,14 +1481,16 @@
 // km(merge) }
 
 	/**
-	 * Creates a new unparented union type node owned by this AST.
-	 * By default, the union type has no types.
-	 *
-	 * @return a new unparented do statement node
-	 * @since 3.7.1
+	 * Creates an unparented creation reference node owned by this AST.
+	 * By default, the type is unspecified (but legal), and there are no type arguments.
+	 * 
+	 * @return a new unparented creation reference expression node
+	 * @exception UnsupportedOperationException if this operation is used in a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
 	 */
-	public UnionType newUnionType() {
-		return new UnionType(this);
+	public CreationReference newCreationReference() {
+		CreationReference result = new CreationReference(this);
+		return result;
 	}
 
 	/**
@@ -1476,6 +1561,20 @@
 	}
 
 	/**
+	 * Creates an unparented expression method reference node owned by this AST.
+	 * By default, the expression and method name are unspecified (but legal),
+	 * and there are no type arguments.
+	 * 
+	 * @return a new unparented expression method reference expression node
+	 * @exception UnsupportedOperationException if this operation is used in a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public ExpressionMethodReference newExpressionMethodReference() {
+		ExpressionMethodReference result = new ExpressionMethodReference(this);
+		return result;
+	}
+
+	/**
 	 * Creates a new unparented expression statement node owned by this AST,
 	 * for the given expression.
 	 * <p>
@@ -1501,6 +1600,25 @@
 	}
 
 	/**
+	 * Creates and returns a new unparented annotatable dimension node
+	 * (Supported only in JLS8 level).
+	 *
+	 * @return a new unparented annotatable dimension node
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 * @exception UnsupportedOperationException if this operation is used
+	 *            in a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public Dimension newDimension() {
+		Dimension result = new Dimension(this);
+		return result;
+	}
+
+	/**
 	 * Creates and returns a new unparented field access expression node
 	 * owned by this AST. By default, the expression and field are both
 	 * unspecified, but legal, names.
@@ -1706,6 +1824,20 @@
 	}
 
 	/**
+	 * Creates an unparented lambda expression node owned by this AST.
+	 * By default, the new lambda expression has parentheses enabled, contains an empty argument
+	 * list, and the body is an empty block.
+	 * 
+	 * @return a new unparented lambda expression node
+	 * @exception UnsupportedOperationException if this operation is used in a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public LambdaExpression newLambdaExpression() {
+		LambdaExpression result = new LambdaExpression(this);
+		return result;
+	}
+
+	/**
 	 * Creates and returns a new line comment placeholder node.
 	 * <p>
 	 * Note that this node type is used to recording the source
@@ -1870,10 +2002,12 @@
 	/**
 	 * Creates and returns a list of new unparented modifier nodes
 	 * for the given modifier flags. When multiple modifiers are
-	 * requested the modifiers nodes will appear in the following order:
-	 * public, protected, private, abstract, static, final, synchronized,
-	 * native, strictfp, transient, volatile. This order is consistent
-	 * with the recommendations in JLS2 8.1.1, 8.3.1, and 8.4.3.
+	 * requested, the modifier nodes will appear in the following order:
+	 * <pre> public protected private
+	 * abstract default static final synchronized native strictfp transient volatile</pre>
+	 * <p>
+	 * This order is consistent with the recommendations in JLS8 ("*Modifier:" rules in chapters 8 and 9).
+	 * </p>
 	 *
 	 * @param flags bitwise or of modifier flags declared on {@link Modifier}
 	 * @return a possibly empty list of new unparented modifier nodes
@@ -1899,6 +2033,9 @@
 		if (Modifier.isAbstract(flags)) {
 			result.add(newModifier(Modifier.ModifierKeyword.ABSTRACT_KEYWORD));
 		}
+		if (Modifier.isDefault(flags)) {
+			result.add(newModifier(Modifier.ModifierKeyword.DEFAULT_KEYWORD));
+		}
 		if (Modifier.isStatic(flags)) {
 			result.add(newModifier(Modifier.ModifierKeyword.STATIC_KEYWORD));
 		}
@@ -2093,6 +2230,29 @@
 	}
 
 	/**
+	 * Creates and returns a new unparented package qualified type node with
+	 * the given qualifier and name.
+	 *
+	 * @param qualifier the package qualifier type node
+	 * @param name the simple name being qualified
+	 * @return a new unparented qualified type node
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * a JLS2, JLS3 and JLS4 AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public PackageQualifiedType newPackageQualifiedType(Name qualifier, SimpleName name) {
+		PackageQualifiedType result = new PackageQualifiedType(this);
+		result.setQualifier(qualifier);
+		result.setName(name);
+		return result;
+	}
+
+	/**
 	 * Creates and returns a new unparented parameterized type node with the
 	 * given type and an empty list of type arguments.
 	 *
@@ -2331,7 +2491,7 @@
 
 	/**
 	 * Creates an unparented "super" method invocation expression node owned by
-	 * this AST. By default, the name of the method is unspecified (but legal)
+	 * this AST. By default, the name of the method is unspecified (but legal),
 	 * there is no qualifier, no type arguments, and the list of arguments is empty.
 	 *
 	 * @return a new unparented  "super" method invocation
@@ -2343,6 +2503,19 @@
 	}
 
 	/**
+	 * Creates and returns a new unparented super method reference node owned by
+	 * this AST. By default, the name of the method is unspecified (but legal),
+	 * and there is no qualifier and no type arguments.
+	 *
+	 * @return a new unparented super method reference node
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public SuperMethodReference newSuperMethodReference() {
+		SuperMethodReference result = new SuperMethodReference(this);
+		return result;
+	}
+
+	/**
 	 * Creates a new unparented switch case statement node owned by
 	 * this AST. By default, the expression is unspecified, but legal.
 	 *
@@ -2550,6 +2723,20 @@
 	}
 
 	/**
+	 * Creates an unparented type method reference node owned by this AST.
+	 * By default, the type and method name are unspecified (but legal),
+	 * and there are no type arguments.
+	 * 
+	 * @return a new unparented type method reference node
+	 * @exception UnsupportedOperationException if this operation is used in a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public TypeMethodReference newTypeMethodReference() {
+		TypeMethodReference result = new TypeMethodReference(this);
+		return result;
+	}
+
+	/**
 	 * Creates and returns a new unparented type parameter type node with an
 	 * unspecified type variable name and an empty list of type bounds.
 	 *
@@ -2564,6 +2751,32 @@
 	}
 
 	/**
+	 * Creates a new unparented union type node owned by this AST.
+	 * By default, the union type has no types.
+	 *
+	 * @return a new unparented UnionType node
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * a JLS2 or JLS3 AST
+	 * @since 3.7.1
+	 */
+	public UnionType newUnionType() {
+		return new UnionType(this);
+	}
+
+	/**
+	 * Creates a new unparented intersection type node owned by this AST.
+	 * By default, the intersection type has no types.
+	 *
+	 * @return a new unparented IntersectionType node
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public IntersectionType newIntersectionType() {
+		return new IntersectionType(this);
+	}
+
+	/**
 	 * Creates a new unparented local variable declaration expression node
 	 * owned by this AST, for the given variable declaration fragment. By
 	 * default, there are no modifiers and the base type is unspecified
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
index 521be6b..4c600b8 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTConverter.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -38,6 +42,7 @@
 import org.eclipse.jdt.internal.compiler.ast.Argument;
 import org.eclipse.jdt.internal.compiler.ast.FieldReference;
 import org.eclipse.jdt.internal.compiler.ast.ForeachStatement;
+import org.eclipse.jdt.internal.compiler.ast.IntersectionCastTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.JavadocArgumentExpression;
 import org.eclipse.jdt.internal.compiler.ast.JavadocFieldReference;
 import org.eclipse.jdt.internal.compiler.ast.JavadocMessageSend;
@@ -48,17 +53,23 @@
 import org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression;
+import org.eclipse.jdt.internal.compiler.ast.QualifiedSuperReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Receiver;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
 import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.StringLiteralConcatenation;
+import org.eclipse.jdt.internal.compiler.ast.SuperReference;
 import org.eclipse.jdt.internal.compiler.ast.TypeReference;
+import org.eclipse.jdt.internal.compiler.ast.UnionTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.Wildcard;
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.WrapperKind;
 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.jdt.internal.compiler.lookup.BlockScope;
 import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
+import org.eclipse.jdt.internal.compiler.lookup.PackageBinding;
+import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeBinding;
 import org.eclipse.jdt.internal.compiler.lookup.TypeConstants;
 import org.eclipse.jdt.internal.compiler.parser.RecoveryScanner;
@@ -91,6 +102,7 @@
 class ASTConverter {
 
 	protected AST ast;
+	private ASTNode referenceContext;
 	protected Comment[] commentsTable;
 	char[] compilationUnitSource;
 	int compilationUnitSourceLength;
@@ -109,6 +121,7 @@
 
 	public ASTConverter(Map options, boolean resolveBindings, IProgressMonitor monitor) {
 		this.resolveBindings = resolveBindings;
+		this.referenceContext = null;
 		Object sourceModeSetting = options.get(JavaCore.COMPILER_SOURCE);
 		long sourceLevel = CompilerOptions.versionToJdkLevel(sourceModeSetting);
 		if (sourceLevel == 0) {
@@ -448,6 +461,52 @@
 		}
 	}
 
+	private void checkAndSetMalformed(ASTNode spannedNode, ASTNode spanningNode) {
+		if ((spannedNode.getFlags() & ASTNode.MALFORMED) != 0) {
+			spanningNode.setFlags(spanningNode.getFlags() | ASTNode.MALFORMED);
+		}
+	}
+
+	/** 
+	 * Internal access method to SingleVariableDeclaration#setExtraDimensions() for avoiding deprecated warnings
+	 *
+	 * @param node
+	 * @param dimensions
+	 * @deprecated
+	 */
+	private static void internalSetExtraDimensions(SingleVariableDeclaration node, int dimensions) {
+		node.setExtraDimensions(dimensions);
+	}
+	/** 
+	 * Internal access method to VariableDeclarationFragment#setExtraDimensions() for avoiding deprecated warnings
+	 *
+	 * @param node
+	 * @param dimensions
+	 * @deprecated
+	 */
+	private static void internalSetExtraDimensions(VariableDeclarationFragment node, int dimensions) {
+		node.setExtraDimensions(dimensions);
+	}
+	/** 
+	 * Internal access method to MethodDeclaration#setExtraDimension() for avoiding deprecated warnings
+	 *
+	 * @param node
+	 * @param dimensions
+	 * @deprecated
+	 */
+	private static void internalSetExtraDimensions(MethodDeclaration node, int dimensions) {
+		node.setExtraDimensions(dimensions);
+	}
+	/** 
+	 * Internal access method to MethodDeclaration#thrownExceptions() for avoiding deprecated warnings
+	 *
+	 * @param node
+	 * @deprecated
+	 */
+	private static List internalThownExceptions(MethodDeclaration node) {
+		return node.thrownExceptions();
+	}
+
 //{ObjectTeams: detect synthetic elements to ignore:
 	private boolean shouldIgnore(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration field) {
 		return field.isGenerated || field.copyInheritanceSrc != null || Flags.isSynthetic(field.modifiers);
@@ -553,15 +612,27 @@
 
 	protected void completeRecord(ArrayType arrayType, org.eclipse.jdt.internal.compiler.ast.ASTNode astNode) {
 		ArrayType array = arrayType;
+		this.recordNodes(arrayType, astNode);
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			this.recordNodes(arrayType.getElementType(), astNode);
+			return;
+		}
 		int dimensions = array.getDimensions();
 		for (int i = 0; i < dimensions; i++) {
-			Type componentType = array.getComponentType();
+			Type componentType = componentType(array);
 			this.recordNodes(componentType, astNode);
 			if (componentType.isArrayType()) {
 				array = (ArrayType) componentType;
 			}
 		}
 	}
+	
+	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
 
 	public ASTNode convert(boolean isInterface, org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration methodDeclaration) {
 		checkCanceled();
@@ -569,6 +640,8 @@
 			return convert((org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration) methodDeclaration);
 		}
 		MethodDeclaration methodDecl = new MethodDeclaration(this.ast);
+		ASTNode oldReferenceContext = this.referenceContext;
+		this.referenceContext = methodDecl;
 		setModifiers(methodDecl, methodDeclaration);
 		boolean isConstructor = methodDeclaration.isConstructor();
 		methodDecl.setConstructor(isConstructor);
@@ -582,13 +655,35 @@
 		int methodHeaderEnd = methodDeclaration.sourceEnd;
 		int thrownExceptionsLength = thrownExceptions == null ? 0 : thrownExceptions.length;
 		if (thrownExceptionsLength > 0) {
-			Name thrownException;
-			int i = 0;
-			do {
-				thrownException = convert(thrownExceptions[i++]);
-				methodDecl.thrownExceptions().add(thrownException);
-			} while (i < thrownExceptionsLength);
-			methodHeaderEnd = thrownException.getStartPosition() + thrownException.getLength();
+			if (this.ast.apiLevel() < AST.JLS8) {
+				Name thrownException;
+				int i = 0;
+				do {
+					TypeReference typeRef = thrownExceptions[i++];
+					thrownException = convert(typeRef);
+					if (typeRef.annotations != null && typeRef.annotations.length > 0) {
+						thrownException.setFlags(thrownException.getFlags() | ASTNode.MALFORMED);
+					}
+					internalThownExceptions(methodDecl).add(thrownException);
+				} while (i < thrownExceptionsLength);
+				methodHeaderEnd = thrownException.getStartPosition() + thrownException.getLength();				
+			} else {
+				Type thrownExceptionType;
+				int i = 0;
+				do {
+					thrownExceptionType = convertType(thrownExceptions[i++]);
+					methodDecl.thrownExceptionTypes().add(thrownExceptionType);
+				} while (i < thrownExceptionsLength);
+				methodHeaderEnd = thrownExceptionType.getStartPosition() + thrownExceptionType.getLength();				
+			}
+		}
+
+		if (methodDeclaration.receiver != null) {
+			if(this.ast.apiLevel >= AST.JLS8) {
+				convertAndSetReceiver(methodDeclaration, methodDecl);
+			} else {
+				methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED);
+			}
 		}
 //{ObjectTeams:
 /* orig:
@@ -635,7 +730,12 @@
 				// get the positions of the right parenthesis
 				int rightParenthesisPosition = retrieveEndOfRightParenthesisPosition(end, method.bodyEnd);
 				int extraDimensions = retrieveExtraDimension(rightParenthesisPosition, method.bodyEnd);
-				methodDecl.setExtraDimensions(extraDimensions);
+				if (this.ast.apiLevel >= AST.JLS8) {
+					setExtraAnnotatedDimensions(rightParenthesisPosition, this.scanner.currentPosition, typeReference,
+												methodDecl.extraDimensions(), extraDimensions);
+				} else {
+					internalSetExtraDimensions(methodDecl, extraDimensions);
+				}
 				setTypeForMethodDeclaration(methodDecl, returnType, extraDimensions);
 			} else {
 				// no return type for a method that is not a constructor
@@ -708,11 +808,12 @@
 					}
 				}
 			}
-			if (block != null
-					&& (Modifier.isAbstract(methodDecl.getModifiers())
-							|| Modifier.isNative(methodDecl.getModifiers())
-							|| isInterface)) {
-				methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED);
+			if (block != null) {
+				if ((methodDeclaration.modifiers & (ClassFileConstants.AccAbstract | ClassFileConstants.AccNative)) != 0
+						|| (isInterface && (this.ast.apiLevel < AST.JLS8 ||
+							(methodDeclaration.modifiers & (ClassFileConstants.AccStatic | ExtraCompilerModifiers.AccDefaultMethod)) == 0))) {
+					methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED);
+				}
 			}
 		} else {
 			// syntax error in this method declaration
@@ -765,6 +866,7 @@
 			recordNodes(methodName, methodDeclaration);
 			methodDecl.resolveBinding();
 		}
+		this.referenceContext = oldReferenceContext;
 		return methodDecl;
 	}
 
@@ -935,6 +1037,30 @@
 		return annotationTypeMemberDeclaration2;
 	}
 
+	private void convertAndSetReceiver(AbstractMethodDeclaration method, MethodDeclaration methodDecl) {
+		Receiver receiver = method.receiver;
+		if (receiver.qualifyingName != null) {
+			final SimpleName name = new SimpleName(this.ast);
+			name.internalSetIdentifier(new String(receiver.qualifyingName.getName()[0]));
+			int start = receiver.qualifyingName.sourceStart;
+			int nameEnd = receiver.qualifyingName.sourceEnd;
+			name.setSourceRange(start, nameEnd - start + 1);
+			methodDecl.setReceiverQualifier(name);
+			if (this.resolveBindings) {
+				recordNodes(name, receiver);
+			}
+		}
+		Type type = convertType(receiver.type);
+		methodDecl.setReceiverType(type);
+		if (receiver.modifiers != 0) {
+			methodDecl.setFlags(methodDecl.getFlags() | ASTNode.MALFORMED);
+		}
+		if (this.resolveBindings) {
+			recordNodes(type, receiver);
+			type.resolveBinding();
+		}
+	}
+
 	public SingleVariableDeclaration convert(org.eclipse.jdt.internal.compiler.ast.Argument argument) {
 		SingleVariableDeclaration variableDecl = new SingleVariableDeclaration(this.ast);
 		setModifiers(variableDecl, argument);
@@ -953,7 +1079,12 @@
 		variableDecl.setName(name);
 		final int typeSourceEnd = argument.type.sourceEnd;
 		final int extraDimensions = retrieveExtraDimension(nameEnd + 1, typeSourceEnd);
-		variableDecl.setExtraDimensions(extraDimensions);
+		if (this.ast.apiLevel >= AST.JLS8) {
+			setExtraAnnotatedDimensions(nameEnd + 1, this.scanner.currentPosition, argument.type,
+										variableDecl.extraDimensions(), extraDimensions);
+		} else {
+			internalSetExtraDimensions(variableDecl, extraDimensions);
+		}
 		final boolean isVarArgs = argument.isVarArgs();
 		if (isVarArgs && extraDimensions == 0) {
 			// remove the ellipsis from the type source end
@@ -967,7 +1098,28 @@
 		 * See PR http://bugs.eclipse.org/bugs/show_bug.cgi?id=23284
 		 */
 		if (isVarArgs) {
+			Dimension lastDimension = null;
+			if (this.ast.apiLevel() >= AST.JLS8) {
+				if (type.isArrayType()) { // should always be true
+					List dimensions = ((ArrayType) type).dimensions();
+					if (!dimensions.isEmpty()) {
+						lastDimension = (Dimension) dimensions.get(dimensions.size() - 1);
+					}
+				}
+			}
 			setTypeForSingleVariableDeclaration(variableDecl, type, extraDimensions + 1);
+			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=391898
+			if (this.ast.apiLevel() >= AST.JLS8) {
+				if (lastDimension != null) { // should always be true
+					List annotations = lastDimension.annotations();
+					Iterator iter = annotations.iterator();
+					while (iter.hasNext()) {
+						Annotation annotation = (Annotation) iter.next();
+						annotation.setParent(null, null);
+						variableDecl.varargsAnnotations().add(annotation);
+					}
+				}
+			}
 			if (extraDimensions != 0) {
 				variableDecl.setFlags(variableDecl.getFlags() | ASTNode.MALFORMED);
 			}
@@ -1029,24 +1181,19 @@
 		ArrayType arrayType = null;
 		if (type.isArrayType()) {
 			arrayType = (ArrayType) type;
+			if (expression.annotationsOnDimensions != null) {
+				if (this.ast.apiLevel() < AST.JLS8) {
+					arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED);
+				} else {
+					setTypeAnnotationsAndSourceRangeOnArray(arrayType, expression.annotationsOnDimensions);
+				}
+			}
 		} else {
-			arrayType = this.ast.newArrayType(type, dimensionsLength);
-			if (this.resolveBindings) {
-				completeRecord(arrayType, expression);
-			}
-			int start = type.getStartPosition();
-			int end = type.getStartPosition() + type.getLength();
-			int previousSearchStart = end - 1;
-			ArrayType componentType = (ArrayType) type.getParent();
-			for (int i = 0; i < dimensionsLength; i++) {
-				previousSearchStart = retrieveRightBracketPosition(previousSearchStart + 1, this.compilationUnitSourceLength);
-				componentType.setSourceRange(start, previousSearchStart - start + 1);
-				componentType = (ArrayType) componentType.getParent();
-			}
+			arrayType = convertToArray(type, type.getStartPosition(), -1, dimensionsLength, expression.annotationsOnDimensions);
 		}
 		arrayCreation.setType(arrayType);
 		if (this.resolveBindings) {
-			recordNodes(arrayType, expression);
+			completeRecord(arrayType, expression);
 		}
 		if (expression.initializer != null) {
 			arrayCreation.setInitializer(convert(expression.initializer));
@@ -1129,6 +1276,8 @@
 	 */
 	public TypeDeclaration convert(org.eclipse.jdt.internal.compiler.ast.ASTNode[] nodes) {
 		final TypeDeclaration typeDecl = new TypeDeclaration(this.ast);
+		ASTNode oldReferenceContext = this.referenceContext;
+		this.referenceContext = typeDecl;
 		typeDecl.setInterface(false);
 		int nodesLength = nodes.length;
 		for (int i = 0; i < nodesLength; i++) {
@@ -1177,6 +1326,7 @@
 				}
 			}
 		}
+		this.referenceContext = oldReferenceContext;
 		return typeDecl;
 	}
 
@@ -1836,6 +1986,12 @@
 		if (expression instanceof org.eclipse.jdt.internal.compiler.ast.TypeReference) {
 			return convert((org.eclipse.jdt.internal.compiler.ast.TypeReference) expression);
 		}
+		if (expression instanceof org.eclipse.jdt.internal.compiler.ast.LambdaExpression) {
+			return convert((org.eclipse.jdt.internal.compiler.ast.LambdaExpression) expression);
+		}
+		if (expression instanceof org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) {
+			return convert((org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) expression);
+		}
 //{ObjectTeams: more expressions:
 		if (expression instanceof org.eclipse.objectteams.otdt.internal.core.compiler.ast.BaseCallMessageSend)
 		{
@@ -2327,6 +2483,50 @@
 		return expr;
 	}
 
+	public Expression convert(org.eclipse.jdt.internal.compiler.ast.LambdaExpression lambda) {
+		if (this.ast.apiLevel < AST.JLS8) {
+			return createFakeNullLiteral(lambda);		
+		}
+		final LambdaExpression	lambdaExpression = new LambdaExpression(this.ast);
+		if (this.resolveBindings) {
+			recordNodes(lambdaExpression, lambda);
+		}
+		org.eclipse.jdt.internal.compiler.ast.Argument[] arguments = lambda.arguments;
+		if (arguments != null) {
+			int argumentsLength = arguments.length;
+			for (int i = 0; i < argumentsLength; i++) {
+				org.eclipse.jdt.internal.compiler.ast.Argument argument = arguments[i];
+				if (argument.type == null) {
+					VariableDeclarationFragment variableDeclarationFragment = new VariableDeclarationFragment(this.ast);
+					SimpleName simpleName = new SimpleName(this.ast);
+					simpleName.internalSetIdentifier(new String(argument.name));
+					int start = argument.sourceStart;
+					int end = argument.sourceEnd;
+					simpleName.setSourceRange(start, end - start + 1);
+					if (this.resolveBindings) {
+						recordNodes(simpleName, argument);
+						recordNodes(variableDeclarationFragment, argument);
+					}
+					variableDeclarationFragment.setName(simpleName);
+					variableDeclarationFragment.setSourceRange(start, end - start + 1);
+					lambdaExpression.parameters().add(variableDeclarationFragment);					
+				} else {
+					SingleVariableDeclaration singleVariableDeclaration = convert(argument);
+					lambdaExpression.parameters().add(singleVariableDeclaration);					
+				}
+			}
+		}
+		if (lambda.body instanceof org.eclipse.jdt.internal.compiler.ast.Expression) {
+			lambdaExpression.setBody(convert((org.eclipse.jdt.internal.compiler.ast.Expression) lambda.body));
+		} else {
+			lambdaExpression.setBody(convert((org.eclipse.jdt.internal.compiler.ast.Block) lambda.body));
+		}
+		int sourceStart = lambda.sourceStart;
+		lambdaExpression.setSourceRange(sourceStart, lambda.sourceEnd - sourceStart + 1);
+		lambdaExpression.setParentheses(lambda.hasParentheses);
+		return lambdaExpression;
+	}
+
 	public MarkerAnnotation convert(org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation annotation) {
 		final MarkerAnnotation markerAnnotation = new MarkerAnnotation(this.ast);
 		setTypeNameForAnnotation(annotation, markerAnnotation);
@@ -2644,6 +2844,79 @@
 		return null; // cannot be reached
 	}
 
+	public Expression convert(org.eclipse.jdt.internal.compiler.ast.ReferenceExpression reference) {
+		if (this.ast.apiLevel < AST.JLS8) {
+			return createFakeNullLiteral(reference);
+		}
+		Expression result = null;
+		org.eclipse.jdt.internal.compiler.ast.Expression lhs = reference.lhs;
+		org.eclipse.jdt.internal.compiler.ast.TypeReference[] arguments = reference.typeArguments;
+		int start = arguments != null && arguments.length > 0 ? arguments[arguments.length - 1].sourceEnd + 1 : reference.lhs.sourceEnd + 1;
+		final SimpleName name = new SimpleName(this.ast);
+		retrieveIdentifierAndSetPositions(start, reference.sourceEnd, name);
+		name.internalSetIdentifier(new String(reference.selector));
+		if (this.resolveBindings) {
+			recordNodes(name, reference);
+		}
+		List typeArguments = null;
+		if (name.getStartPosition() == -1 && name.getIdentifier().equals("<init>")) { // check for "new"  //$NON-NLS-1$
+			retrieveInitAndSetPositions(start, reference.sourceEnd, name);
+			Type type = null;
+			if (lhs instanceof TypeReference) {
+				type = convertType((TypeReference) lhs);
+			} else if (lhs instanceof NameReference) {
+				Name typeName = convert((NameReference) lhs);
+				SimpleType simpleType = new SimpleType(this.ast);
+				simpleType.setName(typeName);
+				if (this.resolveBindings) {
+					recordNodes(simpleType, lhs);
+				}
+				simpleType.setSourceRange(lhs.sourceStart, lhs.sourceEnd - lhs.sourceStart + 1);
+				type = simpleType;
+			}
+			CreationReference creationReference = new CreationReference(this.ast);
+			creationReference.setType(type);
+			typeArguments = creationReference.typeArguments();
+			result = creationReference;
+		} else if (lhs instanceof TypeReference) {
+			TypeMethodReference typeMethodReference = new TypeMethodReference(this.ast);
+			typeMethodReference.setType(convertType((TypeReference) lhs));
+			typeMethodReference.setName(name);
+			typeArguments = typeMethodReference.typeArguments();
+			result = typeMethodReference;
+		} else if (lhs instanceof SuperReference) {
+			SuperMethodReference superMethodReference = new SuperMethodReference(this.ast);
+			superMethodReference.setName(name);
+			typeArguments = superMethodReference.typeArguments();
+			result = superMethodReference;
+		} else if (lhs instanceof QualifiedSuperReference) {
+			SuperMethodReference superMethodReference = new SuperMethodReference(this.ast);
+			superMethodReference.setQualifier(convert((QualifiedSuperReference)lhs));
+			superMethodReference.setName(name);
+			typeArguments = superMethodReference.typeArguments();
+			result = superMethodReference;
+		} else {
+			ExpressionMethodReference expressionMethodReference = new ExpressionMethodReference(this.ast);
+			expressionMethodReference.setExpression(convert(lhs));
+			typeArguments = expressionMethodReference.typeArguments();
+			expressionMethodReference.setName(name);
+			result = expressionMethodReference;
+		}
+		if (typeArguments != null && arguments != null) {
+			int argumentsLength = arguments.length;
+			for (int i = 0; i < argumentsLength; i++) {
+				org.eclipse.jdt.internal.compiler.ast.TypeReference argument = arguments[i];
+				typeArguments.add(convertType(argument));
+			}
+		}
+		if (this.resolveBindings) {
+			recordNodes(result, reference);
+		}
+		int sourceStart = reference.sourceStart; 
+		result.setSourceRange(sourceStart, reference.sourceEnd - sourceStart + 1);
+		return result;
+	}
+
 	public ReturnStatement convert(org.eclipse.jdt.internal.compiler.ast.ReturnStatement statement) {
 		final ReturnStatement returnStatement = new ReturnStatement(this.ast);
 		returnStatement.setSourceRange(statement.sourceStart, statement.sourceEnd - statement.sourceStart + 1);
@@ -2935,13 +3208,15 @@
 		}
 
 		checkCanceled();
+		TypeDeclaration typeDecl; // OT: initialized below
+		ASTNode oldReferenceContext = this.referenceContext;
 //{ObjectTeams: if TypeDeclaration is a role, it is a RoleTypeDeclaration, otherwise it is just a
     	//TypeDeclaration
-	  TypeDeclaration typeDecl;
       if (!typeDeclaration.isRole())
       {
 //ike}
 		typeDecl = new TypeDeclaration(this.ast);
+		this.referenceContext = typeDecl;
 		if (typeDeclaration.modifiersSourceStart != -1) {
 			setModifiers(typeDecl, typeDeclaration);
 		}
@@ -3015,6 +3290,7 @@
     	for (org.eclipse.objectteams.otdt.internal.core.compiler.ast.PrecedenceDeclaration aPrecedence : typeDeclaration.precedences)
     		typeDecl.precedences().add(convertPrecedence(aPrecedence));
 //ike}
+		this.referenceContext = oldReferenceContext;
 		return typeDecl;
 	}
 
@@ -3030,6 +3306,13 @@
 		int end = typeParameter.sourceEnd;
 		simpleName.setSourceRange(start, end - start + 1);
 		typeParameter2.setName(simpleName);
+		int annotationsStart = start;
+		org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = typeParameter.annotations;
+		if (annotations != null) {
+			if (annotations[0] != null)
+				annotationsStart = annotations[0].sourceStart;
+			annotateTypeParameter(typeParameter2, typeParameter.annotations);
+		}
 		final TypeReference superType = typeParameter.type;
 		end = typeParameter.declarationSourceEnd;
 		if (superType != null) {
@@ -3050,7 +3333,7 @@
 				typeParameter2.setHasBaseBound(true);
 // SH}
 		}
-		start = typeParameter.declarationSourceStart;
+		start = annotationsStart < typeParameter.declarationSourceStart ? annotationsStart : typeParameter.declarationSourceStart;
 		end = retrieveClosingAngleBracketPosition(end);
 		typeParameter2.setSourceRange(start, end - start + 1);
 		if (this.resolveBindings) {
@@ -3210,6 +3493,30 @@
 		return packageDeclaration;
 	}
 
+	private ArrayType convertToArray(Type elementType, int sourceStart, int length, int dimensions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) {
+		ArrayType arrayType = this.ast.newArrayType(elementType, dimensions);
+		if (length > 0) arrayType.setSourceRange(sourceStart, length);
+		if (this.ast.apiLevel() < AST.JLS8) {
+			if (annotationsOnDimensions != null) {
+				arrayType.setFlags(arrayType.getFlags() | ASTNode.MALFORMED);
+			}
+			ArrayType subarrayType = arrayType;
+			int index = dimensions - 1;
+			int arrayEnd = retrieveProperRightBracketPosition(dimensions, sourceStart);
+			while (index > 0) {
+				subarrayType = (ArrayType) componentType(subarrayType);
+				int end = retrieveProperRightBracketPosition(index, sourceStart);
+				subarrayType.setSourceRange(sourceStart, end - sourceStart + 1);
+				index--;
+			}
+			if (length <= 0) arrayType.setSourceRange(sourceStart, arrayEnd - sourceStart + 1);
+			return arrayType;
+		}
+
+		setTypeAnnotationsAndSourceRangeOnArray(arrayType, annotationsOnDimensions);
+		return arrayType;
+	}
+
 	private EnumDeclaration convertToEnumDeclaration(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration) {
 		checkCanceled();
 		// enum declaration cannot be built if the source is not >= 1.5, since enum is then seen as an identifier
@@ -3301,7 +3608,12 @@
 		name.setSourceRange(start, nameEnd - start + 1);
 		variableDecl.setName(name);
 		final int extraDimensions = retrieveExtraDimension(nameEnd + 1, localDeclaration.type.sourceEnd);
-		variableDecl.setExtraDimensions(extraDimensions);
+		if (this.ast.apiLevel >= AST.JLS8) {
+			setExtraAnnotatedDimensions(nameEnd + 1, this.scanner.currentPosition, localDeclaration.type,
+					variableDecl.extraDimensions(), extraDimensions);
+		} else {
+			internalSetExtraDimensions(variableDecl, extraDimensions);
+		}
 		Type type = convertType(localDeclaration.type);
 		int typeEnd = type.getStartPosition() + type.getLength() - 1;
 		// https://bugs.eclipse.org/393719 - [compiler] inconsistent warnings on iteration variables
@@ -3323,6 +3635,17 @@
 		return variableDecl;
 	}
 
+	private Dimension convertToDimensions(int start, int end, org.eclipse.jdt.internal.compiler.ast.Annotation[] annotation) {
+		int length = annotation == null ? 0 : annotation.length;
+		Dimension dimension = this.ast.newDimension();
+		for (int i = 0; i < length; i++) {
+			Annotation annot = convert(annotation[i]);
+			dimension.annotations().add(annot);
+		}
+		retrieveDimensionAndSetPositions(start, end, dimension);
+		return dimension;
+	}
+
 	protected VariableDeclarationFragment convertToVariableDeclarationFragment(org.eclipse.jdt.internal.compiler.ast.FieldDeclaration fieldDeclaration) {
 		final VariableDeclarationFragment variableDeclarationFragment = new VariableDeclarationFragment(this.ast);
 		final SimpleName name = new SimpleName(this.ast);
@@ -3332,7 +3655,12 @@
 		int start = fieldDeclaration.sourceEnd;
 		int end = start;
 		int extraDimensions = retrieveExtraDimension(fieldDeclaration.sourceEnd + 1, fieldDeclaration.declarationSourceEnd );
-		variableDeclarationFragment.setExtraDimensions(extraDimensions);
+		if (this.ast.apiLevel >= AST.JLS8) {
+			setExtraAnnotatedDimensions(fieldDeclaration.sourceEnd + 1, this.scanner.currentPosition,
+					fieldDeclaration.type, variableDeclarationFragment.extraDimensions(), extraDimensions);
+		} else {
+			internalSetExtraDimensions(variableDeclarationFragment, extraDimensions);
+		}
 		if (fieldDeclaration.initialization != null) {
 			final Expression expression = convert(fieldDeclaration.initialization);
 			variableDeclarationFragment.setInitializer(expression);
@@ -3370,7 +3698,13 @@
 		int start = localDeclaration.sourceEnd;
 		org.eclipse.jdt.internal.compiler.ast.Expression initialization = localDeclaration.initialization;
 		int extraDimension = retrieveExtraDimension(localDeclaration.sourceEnd + 1, this.compilationUnitSourceLength);
-		variableDeclarationFragment.setExtraDimensions(extraDimension);
+		if (this.ast.apiLevel >= AST.JLS8) {
+			setExtraAnnotatedDimensions(localDeclaration.sourceEnd + 1, this.scanner.currentPosition,
+					localDeclaration.type, variableDeclarationFragment.extraDimensions(), extraDimension);
+		} else {
+			internalSetExtraDimensions(variableDeclarationFragment, extraDimension);
+		}
+
 		boolean hasInitialization = initialization != null;
 		int end;
 		if (hasInitialization) {
@@ -3401,6 +3735,47 @@
 		return variableDeclarationFragment;
 	}
 
+	protected void setExtraAnnotatedDimensions(int start, int end, TypeReference type, final List extraAnnotatedDimensions, int extraDimension) {
+		if (extraDimension > 0) {
+			org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDims = type.getAnnotationsOnDimensions(true);
+			int length = (annotationsOnDims == null) ? 0 : annotationsOnDims.length;
+			for (int i = (length - extraDimension); i < length; i++) {
+				Dimension dim = convertToDimensions(start, end, (annotationsOnDims == null) ? null : annotationsOnDims[i]);
+				extraAnnotatedDimensions.add(dim);
+				start = dim.getStartPosition() + dim.getLength();
+			}
+		}
+	}
+
+	private void setTypeAnnotationsOnDimension(Dimension currentDimension, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions, int dimension) {
+		if (annotationsOnDimensions == null) return;
+		org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations = annotationsOnDimensions[dimension];
+		if (annotations != null) {
+			for (int j = 0, length = annotations.length; j < length; j++) {
+				Annotation annotation = convert(annotations[j]);
+				currentDimension.annotations().add(annotation);
+			}
+		}
+	}
+	
+	private void setTypeAnnotationsAndSourceRangeOnArray(ArrayType arrayType, org.eclipse.jdt.internal.compiler.ast.Annotation[][] annotationsOnDimensions) {
+		List dimensions = arrayType.dimensions();
+		Type elementType = arrayType.getElementType();
+		int start = elementType.getStartPosition();
+		int endElement = start + elementType.getLength();
+		int length = arrayType.getLength();
+		int end = (length <= 0) ? retrieveProperRightBracketPosition(dimensions.size(), endElement) : start + length - 1;
+		arrayType.setSourceRange(start, end - start + 1);
+		
+		start = endElement;
+		for (int i = 0; i < dimensions.size(); i++) {
+			Dimension currentDimension = (Dimension) dimensions.get(i);
+			setTypeAnnotationsOnDimension(currentDimension, annotationsOnDimensions, i);
+			retrieveDimensionAndSetPositions(start, end, currentDimension);
+			start = currentDimension.getStartPosition() + currentDimension.getLength();
+		}
+	}
+
 	protected VariableDeclarationStatement convertToVariableDeclarationStatement(org.eclipse.jdt.internal.compiler.ast.LocalDeclaration localDeclaration) {
 		final VariableDeclarationFragment variableDeclarationFragment = convertToVariableDeclarationFragment(localDeclaration);
 		final VariableDeclarationStatement variableDeclarationStatement = new VariableDeclarationStatement(this.ast);
@@ -3417,7 +3792,57 @@
 		return variableDeclarationStatement;
 	}
 
+	private int annotateType(AnnotatableType type, org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations) {
+		int annotationsEnd = 0;
+		switch(this.ast.apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				type.setFlags(type.getFlags() | ASTNode.MALFORMED);
+				break;
+			default:
+				if (annotations == null) break;
+				int start = type.getStartPosition();
+				int length = type.getLength();
+				int annotationsLength = annotations.length;
+				for (int i = 0; i < annotationsLength; i++) {
+					org.eclipse.jdt.internal.compiler.ast.Annotation typeAnnotation = annotations[i];
+					if (typeAnnotation != null) {
+						Annotation annotation = convert(typeAnnotation);
+						type.annotations().add(annotation);
+						annotationsEnd = annotation.getStartPosition() + annotation.getLength();
+					}
+				}
+				int annotationsStart;
+				if (annotations[0] != null && (annotationsStart = annotations[0].sourceStart) < start && annotationsStart > 0) {
+					length +=  start - annotationsStart;
+					start = annotationsStart;
+				}
+				type.setSourceRange(start, length);
+		}
+		return annotationsEnd;
+	}
+	private void annotateTypeParameter(TypeParameter typeParameter, org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations) {
+		switch(this.ast.apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				typeParameter.setFlags(typeParameter.getFlags() | ASTNode.MALFORMED);
+				break;
+			default:
+				int annotationsLength = annotations.length;
+				for (int i = 0; i < annotationsLength; i++) {
+					org.eclipse.jdt.internal.compiler.ast.Annotation typeAnnotation = annotations[i];
+					if (typeAnnotation != null) {
+						Annotation annotation = convert(typeAnnotation);
+						typeParameter.annotations().add(annotation);
+					}
+				}
+		}
+	}
+
 	public Type convertType(TypeReference typeReference) {
+		org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations;
 		if (typeReference instanceof Wildcard) {
 			final Wildcard wildcard = (Wildcard) typeReference;
 			final WildcardType wildcardType = new WildcardType(this.ast);
@@ -3434,6 +3859,9 @@
 			if (this.resolveBindings) {
 				recordNodes(wildcardType, typeReference);
 			}
+			if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
+				annotateType(wildcardType, annotations);
+			}
 			return wildcardType;
 		}
 		Type type = null;
@@ -3457,7 +3885,8 @@
 			length = typeReference.sourceEnd - typeReference.sourceStart + 1;
 			// need to find out if this is an array type of primitive types or not
 			if (isPrimitiveType(name)) {
-				int end = retrieveEndOfElementTypeNamePosition(sourceStart, sourceStart + length);
+				int[] positions = retrieveEndOfElementTypeNamePosition(sourceStart, sourceStart + length);
+				int end = positions[1];
 				if (end == -1) {
 					end = sourceStart + length - 1;
 				}
@@ -3465,15 +3894,24 @@
 				primitiveType.setPrimitiveTypeCode(getPrimitiveTypeCode(name));
 				primitiveType.setSourceRange(sourceStart, end - sourceStart + 1);
 				type = primitiveType;
+				if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
+					annotateType(primitiveType, annotations);
+				}
 			} else if (typeReference instanceof ParameterizedSingleTypeReference) {
 				ParameterizedSingleTypeReference parameterizedSingleTypeReference = (ParameterizedSingleTypeReference) typeReference;
 				final SimpleName simpleName = new SimpleName(this.ast);
 				simpleName.internalSetIdentifier(new String(name));
-				int end = retrieveEndOfElementTypeNamePosition(sourceStart, sourceStart + length);
+				int[] positions = retrieveEndOfElementTypeNamePosition(sourceStart, sourceStart + length);
+				int end = positions[1];
 				if (end == -1) {
 					end = sourceStart + length - 1;
 				}
-				simpleName.setSourceRange(sourceStart, end - sourceStart + 1);
+				if (positions[0] != -1) {
+					simpleName.setSourceRange(positions[0], end - positions[0] + 1);
+				} else {
+					simpleName.setSourceRange(sourceStart, end - sourceStart + 1);					
+				}
+
 				switch(this.ast.apiLevel) {
 					case AST.JLS2_INTERNAL :
 						SimpleType simpleType = new SimpleType(this.ast);
@@ -3489,6 +3927,12 @@
 						simpleType = new SimpleType(this.ast);
 						simpleType.setName(simpleName);
 						simpleType.setSourceRange(simpleName.getStartPosition(), simpleName.getLength());
+						if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
+							annotateType(simpleType, annotations);
+						}
+						int newSourceStart = simpleType.getStartPosition();
+						if (newSourceStart > 0 && newSourceStart < sourceStart) 
+							sourceStart = newSourceStart;
 						final ParameterizedType parameterizedType = new ParameterizedType(this.ast);
 						parameterizedType.setType(simpleType);
 						type = parameterizedType;
@@ -3525,11 +3969,16 @@
 				simpleName.internalSetIdentifier(new String(name));
 				// we need to search for the starting position of the first brace in order to set the proper length
 				// PR http://dev.eclipse.org/bugs/show_bug.cgi?id=10759
-				int end = retrieveEndOfElementTypeNamePosition(sourceStart, sourceStart + length);
+				int[] positions = retrieveEndOfElementTypeNamePosition(sourceStart, sourceStart + length);
+				int end = positions[1];
 				if (end == -1) {
 					end = sourceStart + length - 1;
 				}
-				simpleName.setSourceRange(sourceStart, end - sourceStart + 1);
+				if (positions[0] != -1) {
+					simpleName.setSourceRange(positions[0], end - positions[0] + 1);
+				} else {
+					simpleName.setSourceRange(sourceStart, end - sourceStart + 1);
+				}
 				final SimpleType simpleType = new SimpleType(this.ast);
 				simpleType.setName(simpleName);
 				type = simpleType;
@@ -3538,18 +3987,12 @@
 				if (this.resolveBindings) {
 					this.recordNodes(simpleName, typeReference);
 				}
+				if (typeReference.annotations != null && (annotations = typeReference.annotations[0]) != null) {
+					annotateType(simpleType, annotations);
+				}
 			}
 			if (dimensions != 0) {
-				type = this.ast.newArrayType(type, dimensions);
-				type.setSourceRange(sourceStart, length);
-				ArrayType subarrayType = (ArrayType) type;
-				int index = dimensions - 1;
-				while (index > 0) {
-					subarrayType = (ArrayType) subarrayType.getComponentType();
-					int end = retrieveProperRightBracketPosition(index, sourceStart);
-					subarrayType.setSourceRange(sourceStart, end - sourceStart + 1);
-					index--;
-				}
+				type = convertToArray(type, sourceStart, length, dimensions, typeReference.getAnnotationsOnDimensions(true));
 				if (this.resolveBindings) {
 					// store keys for inner types
 					completeRecord((ArrayType) type, typeReference);
@@ -3560,6 +4003,10 @@
 				ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference = (ParameterizedQualifiedTypeReference) typeReference;
 				char[][] tokens = parameterizedQualifiedTypeReference.tokens;
 				TypeReference[][] typeArguments = parameterizedQualifiedTypeReference.typeArguments;
+				org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations = parameterizedQualifiedTypeReference.annotations;
+				TypeReference[] arguments = null;
+				int lenth = tokens.length;
+				int firstTypeIndex = lenth - 1;
 				long[] positions = parameterizedQualifiedTypeReference.sourcePositions;
 				sourceStart = (int)(positions[0]>>>32);
 				switch(this.ast.apiLevel) {
@@ -3572,139 +4019,192 @@
 						final SimpleType simpleType = new SimpleType(this.ast);
 						simpleType.setName(qualifiedName);
 						simpleType.setSourceRange(sourceStart, length);
+						simpleType.setFlags(simpleType.getFlags() | ASTNode.MALFORMED);
 						type = simpleType;
 					}
 					break;
 					default :
-						if (typeArguments != null) {
-							int numberOfEnclosingType = 0;
-							int startingIndex = 0;
-							int endingIndex = 0;
-							for (int i = 0, max = typeArguments.length; i < max; i++) {
-								if (typeArguments[i] != null) {
-									numberOfEnclosingType++;
-								} else if (numberOfEnclosingType == 0) {
-									endingIndex++;
-								}
+						for (int i = 0; i < lenth; ++i) {
+							if (typeArguments != null && typeArguments[i] != null) {
+								firstTypeIndex = i;
+								break;
 							}
-							Name name = null;
-							if (endingIndex - startingIndex == 0) {
-								final SimpleName simpleName = new SimpleName(this.ast);
-								simpleName.internalSetIdentifier(new String(tokens[startingIndex]));
-								recordPendingNameScopeResolution(simpleName);
-								int start = (int)(positions[startingIndex]>>>32);
-								int end = (int) positions[startingIndex];
-								simpleName.setSourceRange(start, end - start + 1);
-								simpleName.index = 1;
-								name = simpleName;
-								if (this.resolveBindings) {
-									recordNodes(simpleName, typeReference);
-								}
-							} else {
-								name = this.setQualifiedNameNameAndSourceRanges(tokens, positions, endingIndex, typeReference);
+							if (typeAnnotations != null && typeAnnotations[i] != null) {
+								firstTypeIndex = i;
+								break;
 							}
-							SimpleType simpleType = new SimpleType(this.ast);
-							simpleType.setName(name);
-							int start = (int)(positions[startingIndex]>>>32);
-							int end = (int) positions[endingIndex];
-							simpleType.setSourceRange(start, end - start + 1);
-							ParameterizedType parameterizedType = new ParameterizedType(this.ast);
-							parameterizedType.setType(simpleType);
+						}						
+						
+						Name name = null;						
+						if (firstTypeIndex == 0) {
+							final SimpleName simpleName = new SimpleName(this.ast);
+							simpleName.setIdentifier(new String(tokens[0]));
+							recordPendingNameScopeResolution(simpleName);
+							int start = (int) (positions[0] >>> 32);
+							int end = (int) positions[0];
+							simpleName.setSourceRange(start, end - start + 1);
+							simpleName.index = 1;
+							name = simpleName;
 							if (this.resolveBindings) {
-								recordNodes(simpleType, typeReference);
+								recordNodes(simpleName, typeReference);
+							}
+						} else {
+							name = this.setQualifiedNameNameAndSourceRanges(tokens, positions, firstTypeIndex, typeReference);
+						}
+						
+						SimpleType simpleType = new SimpleType(this.ast);
+						simpleType.setName(name);
+						setSourceRangeAnnotationsAndRecordNodes(typeReference, simpleType, positions, typeAnnotations, firstTypeIndex, 0, firstTypeIndex);
+						int start = simpleType.getStartPosition();
+						int end = (int)positions[firstTypeIndex];
+						Type currentType = simpleType;						
+						int indexOfEnclosingType = 1;
+						if (typeArguments != null && (arguments = typeArguments[firstTypeIndex]) != null) {
+							int arglen = arguments.length;
+							ParameterizedType parameterizedType = new ParameterizedType(this.ast);
+							parameterizedType.index = indexOfEnclosingType;
+							parameterizedType.setType(currentType);
+							if (this.resolveBindings) {
 								recordNodes(parameterizedType, typeReference);
 							}
-							start = simpleType.getStartPosition();
-							end = start + simpleType.getLength() - 1;
-							for (int i = 0, max = typeArguments[endingIndex].length; i < max; i++) {
-								final Type type2 = convertType(typeArguments[endingIndex][i]);
+							Type type2 = null; 
+							for (int i = 0; i < arglen; ++i ) {
+								type2 = convertType(arguments[i]);
 								parameterizedType.typeArguments().add(type2);
-								end = type2.getStartPosition() + type2.getLength() - 1;
 							}
-							int indexOfEnclosingType = 1;
-							parameterizedType.index = indexOfEnclosingType;
+							end = type2 != null ? type2.getStartPosition() + type2.getLength() - 1 : end;
 							end = retrieveClosingAngleBracketPosition(end + 1);
-							length = end + 1;
 							parameterizedType.setSourceRange(start, end - start + 1);
-							startingIndex = endingIndex + 1;
-							Type currentType = parameterizedType;
-							while(startingIndex < typeArguments.length) {
-								SimpleName simpleName = new SimpleName(this.ast);
-								simpleName.internalSetIdentifier(new String(tokens[startingIndex]));
-								simpleName.index = startingIndex + 1;
-								start = (int)(positions[startingIndex]>>>32);
-								end = (int) positions[startingIndex];
-								simpleName.setSourceRange(start, end - start + 1);
-								recordPendingNameScopeResolution(simpleName);
-								QualifiedType qualifiedType = new QualifiedType(this.ast);
-								qualifiedType.setQualifier(currentType);
-								qualifiedType.setName(simpleName);
-								if (this.resolveBindings) {
-									recordNodes(simpleName, typeReference);
-									recordNodes(qualifiedType, typeReference);
+							currentType = parameterizedType;
+						}
+						
+						for (int i = firstTypeIndex + 1; i < lenth; ++i) {
+							SimpleName simpleName = new SimpleName(this.ast);
+							simpleName.setIdentifier(new String(tokens[i]));
+							simpleName.index = i + 1;
+							start = (int) (positions[i] >>> 32);
+							end = (int) positions[i];
+							simpleName.setSourceRange(start, end - start + 1);
+							recordPendingNameScopeResolution(simpleName);
+							QualifiedType qualifiedType = new QualifiedType(this.ast);
+							qualifiedType.setQualifier(currentType);
+							qualifiedType.setName(simpleName);
+							start = currentType.getStartPosition();
+							end = simpleName.getStartPosition() + simpleName.getLength() - 1;
+							qualifiedType.setSourceRange(start, end - start + 1);
+							if (typeAnnotations != null &&  (annotations = typeAnnotations[i]) != null) {
+								int nextPosition = annotateType(qualifiedType, annotations);
+								if (simpleName.getStartPosition() < nextPosition && nextPosition <= end) {
+									simpleName.setSourceRange(nextPosition, end - nextPosition + 1);
+									trimWhiteSpacesAndComments(simpleName);
 								}
-								start = currentType.getStartPosition();
-								end = simpleName.getStartPosition() + simpleName.getLength() - 1;
-								qualifiedType.setSourceRange(start, end - start + 1);
-								indexOfEnclosingType++;
-								if (typeArguments[startingIndex] != null) {
-									qualifiedType.index = indexOfEnclosingType;
-									ParameterizedType parameterizedType2 = new ParameterizedType(this.ast);
-									parameterizedType2.setType(qualifiedType);
-									parameterizedType2.index = indexOfEnclosingType;
-									if (this.resolveBindings) {
-										recordNodes(parameterizedType2, typeReference);
-									}
-									for (int i = 0, max = typeArguments[startingIndex].length; i < max; i++) {
-										final Type type2 = convertType(typeArguments[startingIndex][i]);
-										parameterizedType2.typeArguments().add(type2);
-										end = type2.getStartPosition() + type2.getLength() - 1;
-									}
-									end = retrieveClosingAngleBracketPosition(end + 1);
-									length = end + 1;
-									parameterizedType2.setSourceRange(start, end - start + 1);
-									currentType = parameterizedType2;
-								} else {
-									currentType = qualifiedType;
-									qualifiedType.index = indexOfEnclosingType;
-								}
-								startingIndex++;
 							}
 							if (this.resolveBindings) {
-								this.recordNodes(currentType, typeReference);
+								recordNodes(simpleName, typeReference);
+								recordNodes(qualifiedType, typeReference);
 							}
-							type = currentType;
-							length -= sourceStart;
+							currentType = qualifiedType;
+							indexOfEnclosingType++;
+							
+							if (typeArguments != null && (arguments = typeArguments[i]) != null) {
+								int arglen = arguments.length;
+								qualifiedType.index = indexOfEnclosingType;
+								ParameterizedType parameterizedType = new ParameterizedType(this.ast);
+								parameterizedType.index = indexOfEnclosingType;
+								parameterizedType.setType(currentType);
+								if (this.resolveBindings) {
+									recordNodes(parameterizedType, typeReference);
+								}
+								Type type2 = null; 
+								for (int j = 0; j < arglen; ++j ) {
+									type2 = convertType(arguments[j]);
+									parameterizedType.typeArguments().add(type2);
+								}
+								end = type2 != null ? type2.getStartPosition() + type2.getLength() - 1 : end;
+								end = retrieveClosingAngleBracketPosition(end + 1);
+								parameterizedType.setSourceRange(start, end - start + 1);
+								currentType = parameterizedType;
+							} else {
+								qualifiedType.index = indexOfEnclosingType;
+							}
 						}
+						type = currentType;
 				}
-			} else if (typeReference instanceof org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) {
-				char[][] name = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).getTypeName();
+			} else if (typeReference instanceof org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) {			
+				QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) typeReference;
+				long[] positions = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).sourcePositions;
+				org.eclipse.jdt.internal.compiler.ast.Annotation [][] typeAnnotations = typeReference.annotations;
+				char [][] tokens = qualifiedTypeReference.tokens;
+				int lenth = tokens.length;
+				int firstTypeIndex = lenth;
+				
+				if (typeAnnotations != null) {
+					for (int i = 0; i < lenth; ++i) {
+						if (typeAnnotations[i] != null) {
+							firstTypeIndex = i;
+							break;
+						}
+					}
+				}  
+				sourceStart = (int)(positions[0]>>>32);
 //{ObjectTeams: revert anchored types like in MyTeam.this._OT$base.R => base.R
-				org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding =
+				org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBindingOT =
 					((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).resolvedType;
-				if (typeBinding != null) {
-					typeBinding = typeBinding.leafComponentType();
-					if (typeBinding instanceof RoleTypeBinding) {
-						RoleTypeBinding rtb = (RoleTypeBinding)typeBinding;
+				if (typeBindingOT != null) {
+					typeBindingOT = typeBindingOT.leafComponentType();
+					if (typeBindingOT instanceof RoleTypeBinding) {
+						RoleTypeBinding rtb = (RoleTypeBinding)typeBindingOT;
 						if (rtb.hasExplicitAnchor()) {
 							char[][] newName = CharOperation.splitOn('.', rtb.optimalName());
 							// refuse to use best name which is longer than source name.
-							if (name.length >= newName.length)
-								name = newName;
+							if (tokens.length >= newName.length)
+								tokens = newName;
 						}
 					}
 				}
-//	 SH}
-				int nameLength = name.length;
-				long[] positions = ((org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference) typeReference).sourcePositions;
-				sourceStart = (int)(positions[0]>>>32);
-				length = (int)(positions[nameLength - 1] & 0xFFFFFFFF) - sourceStart + 1;
-				final Name qualifiedName = this.setQualifiedNameNameAndSourceRanges(name, positions, typeReference);
-				final SimpleType simpleType = new SimpleType(this.ast);
-				simpleType.setName(qualifiedName);
-				type = simpleType;
-				type.setSourceRange(sourceStart, length);
-			} else {
+// SH}
+				Name name = null;
+				Type currentType = null;
+				if (firstTypeIndex == lenth) {//Just a QualifiedName
+					name = setQualifiedNameNameAndSourceRanges(tokens, positions, lenth - 1, typeReference);
+					currentType = createSimpleType(name, typeReference, positions, 0, lenth - 1);
+				} else {
+					if (firstTypeIndex <= 1) {
+						name = createSimpleName(typeReference, positions, tokens, 0 );
+						firstTypeIndex = 1;
+					} else {
+						name = setQualifiedNameNameAndSourceRanges(tokens, positions, firstTypeIndex - 1, typeReference);
+					}						
+
+					org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding = typeReference.resolvedType;
+					boolean createPackageQualifiedType = false;
+					if (typeBinding instanceof ReferenceBinding) {
+						ReferenceBinding referenceBinding = (ReferenceBinding)typeBinding;			
+						PackageBinding packageBinding = referenceBinding.getPackage();
+						if (packageBinding != null && Arrays.equals(name.toString().toCharArray(), packageBinding.readableName())) {
+							createPackageQualifiedType = true;
+						}
+					}
+					
+					if (createPackageQualifiedType && this.ast.apiLevel >= AST.JLS8) {
+						PackageQualifiedType packageQualifiedType = new PackageQualifiedType(this.ast);
+						packageQualifiedType.setQualifier(name);
+						packageQualifiedType.setName(createSimpleName(typeReference, positions, tokens, firstTypeIndex));
+						setSourceRangeAnnotationsAndRecordNodes(typeReference, packageQualifiedType, positions, typeAnnotations, firstTypeIndex, 0, firstTypeIndex);
+						currentType = packageQualifiedType;																	
+					} else {
+						SimpleType simpleType = this.ast.newSimpleType(name);	
+						setSourceRangeAnnotationsAndRecordNodes(typeReference, simpleType, positions, typeAnnotations, 0, 0, name.index > 0 ? name.index - 1 : 0);
+						currentType = createQualifiedType(typeReference, positions,  typeAnnotations, tokens, firstTypeIndex, simpleType);
+						if (createPackageQualifiedType) 
+							currentType.setFlags(currentType.getFlags() | ASTNode.MALFORMED);
+					}
+					for (int i = firstTypeIndex + 1; i < lenth; ++i) {
+						currentType = createQualifiedType(typeReference, positions,  typeAnnotations, tokens, i, currentType);
+					}					
+				}
+				type = currentType;
+			} else if (typeReference instanceof UnionTypeReference){
 				TypeReference[] typeReferences = ((org.eclipse.jdt.internal.compiler.ast.UnionTypeReference) typeReference).typeReferences;
 				switch(this.ast.apiLevel) {
 					case AST.JLS2_INTERNAL :
@@ -3732,28 +4232,42 @@
 						length = endPosition - start; /* + 1 - 1 == 0 */
 						type.setSourceRange(start, length);
 				}
+			} else if (typeReference instanceof IntersectionCastTypeReference) {
+				TypeReference[] typeReferences = ((IntersectionCastTypeReference) typeReference).typeReferences;
+				switch(this.ast.apiLevel) {
+					case AST.JLS2_INTERNAL :
+					case AST.JLS3_INTERNAL :
+					case AST.JLS4_INTERNAL :
+						type = this.convertType(typeReferences[0]);
+						int start = typeReference.sourceStart;
+						int endPosition = typeReference.sourceEnd;
+						length = endPosition - start + 1;
+						type.setSourceRange(start, length);
+						type.setFlags(type.getFlags() | ASTNode.MALFORMED);
+						break;
+					default:
+						// intersection type reference
+						final IntersectionType castType = new IntersectionType(this.ast);
+						for (int i = 0, max = typeReferences.length; i < max; i++) {
+							castType.types().add(this.convertType(typeReferences[i]));
+						}
+						type = castType;
+						List types = castType.types();
+						int size = types.size();
+						start = ((Type) types.get(0)).getStartPosition();
+						Type lastType = (Type) types.get(size - 1);
+						endPosition = lastType.getStartPosition() + lastType.getLength();
+						length = endPosition - start;
+						type.setSourceRange(start, length);
+				}
 			}
 
 			length = typeReference.sourceEnd - sourceStart + 1;
 			if (dimensions != 0) {
-				type = this.ast.newArrayType(type, dimensions);
+				type = convertToArray(type, sourceStart, -1, dimensions, typeReference.getAnnotationsOnDimensions(true));
 				if (this.resolveBindings) {
 					completeRecord((ArrayType) type, typeReference);
 				}
-				int end = retrieveEndOfDimensionsPosition(sourceStart+length, this.compilationUnitSourceLength);
-				if (end != -1) {
-					type.setSourceRange(sourceStart, end - sourceStart + 1);
-				} else {
-					type.setSourceRange(sourceStart, length);
-				}
-				ArrayType subarrayType = (ArrayType) type;
-				int index = dimensions - 1;
-				while (index > 0) {
-					subarrayType = (ArrayType) subarrayType.getComponentType();
-					end = retrieveProperRightBracketPosition(index, sourceStart);
-					subarrayType.setSourceRange(sourceStart, end - sourceStart + 1);
-					index--;
-				}
 			}
 		}
 		if (this.resolveBindings) {
@@ -3784,6 +4298,66 @@
 		return type;
 	}
 
+	private QualifiedType createQualifiedType(TypeReference typeReference, long[] positions,
+			org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations, char[][] tokens, int index,
+			Type qualifier) {
+		SimpleName simpleName = createSimpleName(typeReference, positions, tokens, index);
+		QualifiedType qualifiedType = new QualifiedType(this.ast);
+		qualifiedType.setQualifier(qualifier);
+		qualifiedType.setName(simpleName);
+		int start = qualifier.getStartPosition();
+		int end = simpleName.getStartPosition() + simpleName.getLength() - 1;
+		setSourceRangeAnnotationsAndRecordNodes(typeReference, qualifiedType, typeAnnotations, index, start, end);
+		return qualifiedType;
+	}
+
+	private SimpleType createSimpleType(Name name, TypeReference typeReference, long[] positions,
+			int startIndex, int endIndex) {
+		SimpleType simpleType = new SimpleType(this.ast);
+		simpleType.setName(name);
+		int start = (int)(positions[startIndex] >>> 32);
+		int end = (int)positions[endIndex];
+		simpleType.setSourceRange(start, end - start + 1);
+		if (this.resolveBindings) {
+			recordNodes(simpleType, typeReference);
+		}
+		return simpleType;
+	}
+
+	private void setSourceRangeAnnotationsAndRecordNodes(TypeReference typeReference, AnnotatableType annotatableType,
+			org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations, int index, int start, int end) {
+		org.eclipse.jdt.internal.compiler.ast.Annotation[] annotations;
+		int length = end - start + 1;
+		annotatableType.setSourceRange(start, length);
+		if (typeAnnotations != null && (annotations = typeAnnotations[index]) != null) {
+			annotateType(annotatableType, annotations);
+		}
+		if (this.resolveBindings) {
+			recordNodes(annotatableType, typeReference);
+		}
+	}
+
+	private void setSourceRangeAnnotationsAndRecordNodes(TypeReference typeReference, AnnotatableType annotatableType, 
+			long[] positions, org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations, int index, int startIndex, int endIndex) {
+		int start = (int) (positions[startIndex] >>> 32);
+		int end = (int) positions[endIndex];
+		setSourceRangeAnnotationsAndRecordNodes(typeReference, annotatableType, typeAnnotations, index, start, end);
+	}
+
+	private SimpleName createSimpleName(TypeReference typeReference, long[] positions, char[][] tokens, int index) {
+		final SimpleName simpleName = new SimpleName(this.ast);
+		simpleName.internalSetIdentifier(new String(tokens[index]));
+		recordPendingNameScopeResolution(simpleName);
+		int start = (int) (positions[index] >>> 32);
+		int end = (int) positions[index];
+		simpleName.setSourceRange(start, end - start + 1);
+		simpleName.index = index + 1;
+		if (this.resolveBindings) {
+			recordNodes(simpleName, typeReference);
+		}
+		return simpleName;
+	}
+
 	protected Comment createComment(int[] positions) {
 		// Create comment node
 		Comment comment = null;
@@ -3822,6 +4396,21 @@
 		emptyStatement.setSourceRange(start, end - start + 1);
 		return emptyStatement;
 	}
+
+	/**
+	 * Warning: Callers of this method must ensure that the fake literal node is not recorded in
+	 * {@link #recordNodes(ASTNode, org.eclipse.jdt.internal.compiler.ast.ASTNode)}, see bug 403444!
+	 */
+	protected Expression createFakeNullLiteral(org.eclipse.jdt.internal.compiler.ast.FunctionalExpression expression) {
+		if (this.referenceContext != null) {
+			this.referenceContext.setFlags(this.referenceContext.getFlags() | ASTNode.MALFORMED);
+		}
+		NullLiteral nullLiteral = new NullLiteral(this.ast);
+		nullLiteral.setFlags(nullLiteral.getFlags() | ASTNode.MALFORMED);
+		nullLiteral.setSourceRange(expression.sourceStart, expression.sourceEnd - expression.sourceStart + 1);
+		return nullLiteral;
+	}
+
 	/**
 	 * @return a new modifier
 	 */
@@ -4112,6 +4701,10 @@
 	}
 
 	protected void recordNodes(ASTNode node, org.eclipse.jdt.internal.compiler.ast.ASTNode oldASTNode) {
+		// Do not record the fake literal node created in lieu of functional expressions at JLS levels < 8, as it would lead to CCE down the road.
+		if (oldASTNode instanceof org.eclipse.jdt.internal.compiler.ast.FunctionalExpression && node instanceof NullLiteral) {
+			return;
+		}
 		this.ast.getBindingResolver().store(node, oldASTNode);
 	}
 
@@ -4244,11 +4837,23 @@
 	 * Remove whitespaces and comments before and after the expression.
 	 */
 	private void trimWhiteSpacesAndComments(org.eclipse.jdt.internal.compiler.ast.Expression expression) {
-		int start = expression.sourceStart;
-		int end = expression.sourceEnd;
+		int[] positions = trimWhiteSpacesAndComments(expression.sourceStart, expression.sourceEnd);
+		expression.sourceStart = positions[0];
+		expression.sourceEnd = positions[1];
+	}
+	private void trimWhiteSpacesAndComments(ASTNode node) {
+		int start = node.getStartPosition();
+		int end = start + node.getLength() - 1;
+		int[] positions = trimWhiteSpacesAndComments(start, end);
+		start = positions[0];
+		end = positions[1];
+		node.setSourceRange(start, end - start + 1);
+	}
+	private int [] trimWhiteSpacesAndComments(int start, int end) {
+		int [] positions = new int[]{start, end};
 		int token;
-		int trimLeftPosition = expression.sourceStart;
-		int trimRightPosition = expression.sourceEnd;
+		int trimLeftPosition = start;
+		int trimRightPosition = end;
 		boolean first = true;
 		Scanner removeBlankScanner = this.ast.scanner;
 		try {
@@ -4270,9 +4875,9 @@
 						}
 						break;
 					case TerminalTokens.TokenNameEOF :
-						expression.sourceStart = trimLeftPosition;
-						expression.sourceEnd = trimRightPosition;
-						return;
+						positions[0] = trimLeftPosition;
+						positions[1] = trimRightPosition;
+						return positions;
 					default :
 						/*
 						 * if we find something else than a whitespace or a comment,
@@ -4286,6 +4891,7 @@
 		} catch (InvalidInputException e){
 			// ignore
 		}
+		return positions;
 	}
 
 	/**
@@ -4436,48 +5042,33 @@
 	}
 
 	/**
-	 * This method is used to retrieve the ending position for a type declaration when the dimension is right after the type
-	 * name.
-	 * For example:
-	 *    int[] i; => return 5, but int i[] => return -1;
-	 * @return int the dimension found
+	 * This method is used to retrieve the start and end position of a name or primitive type token.
+	 * 
+	 * @return int[] a single dimensional array, with two elements, for the start and end positions of the name respectively
 	 */
-	protected int retrieveEndOfDimensionsPosition(int start, int end) {
+	protected int[] retrieveEndOfElementTypeNamePosition(int start, int end) {
 		this.scanner.resetTo(start, end);
-		int foundPosition = -1;
+		boolean isAnnotation = false;
 		try {
 			int token;
+			int count = 0;
 			while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
 				switch(token) {
-					case TerminalTokens.TokenNameLBRACKET:
-					case TerminalTokens.TokenNameCOMMENT_BLOCK:
-					case TerminalTokens.TokenNameCOMMENT_JAVADOC:
-					case TerminalTokens.TokenNameCOMMENT_LINE:
+					case TerminalTokens.TokenNameLPAREN:
+						++count;
 						break;
-					case TerminalTokens.TokenNameRBRACKET://166
-						foundPosition = this.scanner.currentPosition - 1;
+					case TerminalTokens.TokenNameRPAREN:
+						--count;
 						break;
-					default:
-						return foundPosition;
-				}
-			}
-		} catch(InvalidInputException e) {
-			// ignore
-		}
-		return foundPosition;
-	}
-
-	/**
-	 * This method is used to retrieve the position just before the left bracket.
-	 * @return int the dimension found, -1 if none
-	 */
-	protected int retrieveEndOfElementTypeNamePosition(int start, int end) {
-		this.scanner.resetTo(start, end);
-		try {
-			int token;
-			while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
-				switch(token) {
+					case TerminalTokens.TokenNameAT:
+						isAnnotation = true;
+						break;
 					case TerminalTokens.TokenNameIdentifier:
+						if (isAnnotation) {
+							isAnnotation = false;
+							break;
+						}
+						//$FALL-THROUGH$
 					case TerminalTokens.TokenNamebyte:
 					case TerminalTokens.TokenNamechar:
 					case TerminalTokens.TokenNamedouble:
@@ -4486,13 +5077,14 @@
 					case TerminalTokens.TokenNamelong:
 					case TerminalTokens.TokenNameshort:
 					case TerminalTokens.TokenNameboolean:
-						return this.scanner.currentPosition - 1;
+						if (count > 0) break;
+						return new int[]{this.scanner.startPosition, this.scanner.currentPosition - 1};
 				}
 			}
 		} catch(InvalidInputException e) {
 			// ignore
 		}
-		return -1;
+		return new int[]{-1, -1};
 	}
 
 	/**
@@ -4503,10 +5095,18 @@
 		this.scanner.resetTo(start, end);
 		try {
 			int token;
+			int count = 0;
 			while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
 				switch(token) {
 					case TerminalTokens.TokenNameRPAREN:
-						return this.scanner.currentPosition;
+						count--;
+						if (count <= 0) return this.scanner.currentPosition;
+						 break;
+					case TerminalTokens.TokenNameLPAREN:
+						count++;
+						//$FALL-THROUGH$
+					default:
+						break;
 				}
 			}
 		} catch(InvalidInputException e) {
@@ -4527,15 +5127,36 @@
 		this.scanner.resetTo(start, end);
 		int dimensions = 0;
 		try {
-			int token;
+			int token, lParenCount = 0;
+			boolean isAnnotation = false, foundAnnotation = false;
 			while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
+				if (foundAnnotation) {
+					if (token == TerminalTokens.TokenNameLPAREN) ++lParenCount;
+					else if (token == TerminalTokens.TokenNameRPAREN) {
+						--lParenCount;
+						continue;
+					}
+					if (lParenCount > 0) continue;
+				}
 				switch(token) {
 					case TerminalTokens.TokenNameLBRACKET:
 					case TerminalTokens.TokenNameCOMMENT_BLOCK:
 					case TerminalTokens.TokenNameCOMMENT_JAVADOC:
 					case TerminalTokens.TokenNameCOMMENT_LINE:
+						isAnnotation = false;
+						break;
+					case TerminalTokens.TokenNameAT:
+						isAnnotation = true;
+						foundAnnotation = true; /* check for params */
+						break;
+					case TerminalTokens.TokenNameIdentifier:
+						if (!isAnnotation) {
+							return dimensions;
+						}
+						isAnnotation = false;
 						break;
 					case TerminalTokens.TokenNameRBRACKET://166
+						isAnnotation = false;
 						dimensions++;
 						break;
 					default:
@@ -4548,6 +5169,45 @@
 		return dimensions;
 	}
 
+	protected void retrieveDimensionAndSetPositions(int start, int end, Dimension dim) {
+		this.scanner.resetTo(start, end);
+		int token;
+		int count = 0, lParenCount = 0;
+		boolean startSet = false;
+		try {
+			while((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF)  {
+				if (token != TerminalTokens.TokenNameWHITESPACE) {
+					if (!startSet) {
+						start = this.scanner.startPosition;
+						startSet = true;
+					}
+					switch(token) {
+						case TerminalTokens.TokenNameRBRACKET:
+							if (lParenCount > 0) break;
+							--count;
+							if (count > 0) break;
+							int endDim = this.scanner.currentPosition - 1;
+							dim.setSourceRange(start, endDim - start + 1);
+							return;
+						case TerminalTokens.TokenNameLBRACKET:
+							if (lParenCount > 0) break;
+							count++;
+							break;
+						case TerminalTokens.TokenNameLPAREN:
+							lParenCount++;
+							break;
+						case TerminalTokens.TokenNameRPAREN:
+							--lParenCount;
+							break;
+						default:
+							break;
+					}
+				}
+			}
+		} catch(InvalidInputException e) {
+			// ignore
+		}
+	}
 	protected void retrieveIdentifierAndSetPositions(int start, int end, Name name) {
 		this.scanner.resetTo(start, end);
 		int token;
@@ -4589,6 +5249,29 @@
 	}
 
 	/**
+	 * retrieves the start and and of new and set the positions of the name
+	 * @param start position to start search
+	 * @param end position to end search
+	 * @param name object where these positions will be updated.
+	 */
+	protected void retrieveInitAndSetPositions(int start, int end, Name name) {
+		this.scanner.resetTo(start, end);
+		int token;
+		try {
+			while((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF)  {
+				if (token == TerminalTokens.TokenNamenew) {
+					int startName = this.scanner.startPosition;
+					int endName = this.scanner.currentPosition;
+					name.setSourceRange(startName, endName - startName);
+					return;
+				}
+			}
+		} catch(InvalidInputException e) {
+			// ignore
+		}
+	}
+
+	/**
 	 * This method is used to retrieve position before the next comma or semi-colon.
 	 * @param initializerEnd the given initializer end exclusive
 	 * @return int the position found.
@@ -4599,10 +5282,22 @@
 		int balance = 0;
 		int pos = initializerEnd > nameEnd ? initializerEnd - 1 : nameEnd;
 		try {
-			int token;
+			int token, lParenCount = 0;
+			boolean hasAnnotations = false;
 			while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
 				hasTokens = true;
+				if (hasAnnotations) {
+					if (token == TerminalTokens.TokenNameLPAREN) ++lParenCount;
+					else if (token == TerminalTokens.TokenNameRPAREN) {
+						--lParenCount; 
+						continue;
+					}
+					if (lParenCount > 0) continue;
+				}
 				switch(token) {
+					case TerminalTokens.TokenNameAT:
+						hasAnnotations = true;
+						break;
 					case TerminalTokens.TokenNameLBRACE :
 					case TerminalTokens.TokenNameLBRACKET :
 						balance++;
@@ -4632,10 +5327,22 @@
 	protected int retrieveProperRightBracketPosition(int bracketNumber, int start) {
 		this.scanner.resetTo(start, this.compilationUnitSourceLength);
 		try {
-			int token, count = 0;
+			int token, count = 0, lParentCount = 0, balance = 0;
 			while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
 				switch(token) {
+					case TerminalTokens.TokenNameLPAREN:
+						++lParentCount;
+						break;
+					case TerminalTokens.TokenNameRPAREN:
+						--lParentCount;
+						break;
+					case TerminalTokens.TokenNameLBRACKET:
+						++balance;
+						break;
 					case TerminalTokens.TokenNameRBRACKET:
+						--balance;
+						if (lParentCount > 0) break;
+						if (balance > 0) break;
 						count++;
 						if (count == bracketNumber) {
 							return this.scanner.currentPosition - 1;
@@ -4691,32 +5398,6 @@
 	}
 
 	/**
-	 * This method is used to retrieve the position of the right bracket.
-	 * @return int the dimension found, -1 if none
-	 */
-	protected int retrieveRightBracketPosition(int start, int end) {
-		this.scanner.resetTo(start, end);
-		try {
-			int token;
-			int balance = 0;
-			while ((token = this.scanner.getNextToken()) != TerminalTokens.TokenNameEOF) {
-				switch(token) {
-					case TerminalTokens.TokenNameLBRACKET :
-						balance++;
-						break;
-					case TerminalTokens.TokenNameRBRACKET :
-						balance--;
-						if (balance == 0) return this.scanner.currentPosition - 1;
-						break;
-				}
-			}
-		} catch(InvalidInputException e) {
-			// ignore
-		}
-		return -1;
-	}
-
-	/**
 	 * This method is used to retrieve the start position of the block.
 	 * @return int the dimension found, -1 if none
 	 */
@@ -4849,6 +5530,9 @@
 					case TerminalTokens.TokenNamestrictfp:
 						modifier = createModifier(Modifier.ModifierKeyword.STRICTFP_KEYWORD);
 						break;
+					case TerminalTokens.TokenNamedefault:
+						modifier = createModifier(Modifier.ModifierKeyword.DEFAULT_KEYWORD);
+						break;
 					case TerminalTokens.TokenNameAT :
 						// we have an annotation
 						if (annotations != null && indexInAnnotations < annotations.length) {
@@ -5284,7 +5968,7 @@
 	}
 
 	protected QualifiedName setQualifiedNameNameAndSourceRanges(char[][] typeName, long[] positions, org.eclipse.jdt.internal.compiler.ast.ASTNode node) {
-		int length = typeName.length;
+	    int length = typeName.length;
 		final SimpleName firstToken = new SimpleName(this.ast);
 		firstToken.internalSetIdentifier(new String(typeName[0]));
 		firstToken.index = 1;
@@ -5340,7 +6024,7 @@
 		return name;
 	}
 
-	protected QualifiedName setQualifiedNameNameAndSourceRanges(char[][] typeName, long[] positions, int endingIndex, org.eclipse.jdt.internal.compiler.ast.ASTNode node) {
+	protected QualifiedName setQualifiedNameNameAndSourceRanges(char[][] typeName, long[] positions, int endingIndex, org.eclipse.jdt.internal.compiler.ast.TypeReference node) {
  		int length = endingIndex + 1;
 		final SimpleName firstToken = new SimpleName(this.ast);
 		firstToken.internalSetIdentifier(new String(typeName[0]));
@@ -5432,26 +6116,16 @@
 					this.ast.getBindingResolver().updateKey(type, elementType);
 					fieldDeclaration.setType(elementType);
 				} else {
-					int start = type.getStartPosition();
-					ArrayType subarrayType = arrayType;
-					int index = extraDimension;
-					while (index > 0) {
-						subarrayType = (ArrayType) subarrayType.getComponentType();
-						index--;
-					}
-					int end = retrieveProperRightBracketPosition(remainingDimensions, start);
-					subarrayType.setSourceRange(start, end - start + 1);
-					// cut the child loose from its parent (without creating garbage)
-					subarrayType.setParent(null, null);
+					ArrayType subarrayType = extractSubArrayType(arrayType, remainingDimensions, extraDimension);
 					fieldDeclaration.setType(subarrayType);
-					updateInnerPositions(subarrayType, remainingDimensions);
 					this.ast.getBindingResolver().updateKey(type, subarrayType);
 				}
+				checkAndSetMalformed(type, fieldDeclaration);
 			} else {
 				fieldDeclaration.setType(type);
 			}
 		} else {
-			if (type.isArrayType()) {
+			if (type.isArrayType() && (this.ast.apiLevel() < AST.JLS8)) {
 				// update positions of the component types of the array type
 				int dimensions = ((ArrayType) type).getDimensions();
 				updateInnerPositions(type, dimensions);
@@ -5460,6 +6134,35 @@
 		}
 	}
 
+	/** extracts the subArrayType for a given declaration for AST levels less
+	 * @param arrayType parent type
+	 * @param remainingDimensions 
+	 * @param dimensionsToRemove
+	 * @return an ArrayType
+	 */
+	private ArrayType extractSubArrayType(ArrayType arrayType, int remainingDimensions, int dimensionsToRemove) {
+		ArrayType subArrayType = arrayType;
+		int start = subArrayType.getStartPosition();
+		if (this.ast.apiLevel() < AST.JLS8) {
+			while (dimensionsToRemove > 0 ) {
+				subArrayType = (ArrayType) componentType(subArrayType);
+				dimensionsToRemove--;
+			}
+			updateInnerPositions(subArrayType, remainingDimensions);
+		} else {
+			List dimensions = subArrayType.dimensions();
+			while (dimensionsToRemove > 0 ) {
+				dimensions.remove(dimensions.size() - 1);
+				dimensionsToRemove--;
+			}
+		}
+		int end = retrieveProperRightBracketPosition(remainingDimensions, start);
+		subArrayType.setSourceRange(start, end - start + 1);
+		// cut the child loose from its parent (without creating garbage)
+		subArrayType.setParent(null, null);
+		return subArrayType;
+	}
+
 	protected void setTypeForMethodDeclaration(MethodDeclaration methodDeclaration, Type type, int extraDimension) {
 		if (extraDimension != 0) {
 			if (type.isArrayType()) {
@@ -5480,28 +6183,18 @@
 						break;
 					}
 				} else {
-					int start = type.getStartPosition();
-					ArrayType subarrayType = arrayType;
-					int index = extraDimension;
-					while (index > 0) {
-						subarrayType = (ArrayType) subarrayType.getComponentType();
-						index--;
-					}
-					int end = retrieveProperRightBracketPosition(remainingDimensions, start);
-					subarrayType.setSourceRange(start, end - start + 1);
-					// cut the child loose from its parent (without creating garbage)
-					subarrayType.setParent(null, null);
-					updateInnerPositions(subarrayType, remainingDimensions);
+					ArrayType subarrayType = extractSubArrayType(arrayType, remainingDimensions, extraDimension);
 					switch(this.ast.apiLevel) {
 						case AST.JLS2_INTERNAL :
 							methodDeclaration.internalSetReturnType(subarrayType);
 							break;
 						default :
 							methodDeclaration.setReturnType2(subarrayType);
-						break;
+							break;
 					}
 					this.ast.getBindingResolver().updateKey(type, subarrayType);
 				}
+				checkAndSetMalformed(type, methodDeclaration);
 			} else {
 				switch(this.ast.apiLevel) {
 					case AST.JLS2_INTERNAL :
@@ -5541,21 +6234,12 @@
 					this.ast.getBindingResolver().updateKey(type, elementType);
 					singleVariableDeclaration.setType(elementType);
 				} else {
-					int start = type.getStartPosition();
-					ArrayType subarrayType = arrayType;
-					int index = extraDimension;
-					while (index > 0) {
-						subarrayType = (ArrayType) subarrayType.getComponentType();
-						index--;
-					}
-					int end = retrieveProperRightBracketPosition(remainingDimensions, start);
-					subarrayType.setSourceRange(start, end - start + 1);
-					// cut the child loose from its parent (without creating garbage)
-					subarrayType.setParent(null, null);
-					updateInnerPositions(subarrayType, remainingDimensions);
-					singleVariableDeclaration.setType(subarrayType);
+					ArrayType subarrayType = extractSubArrayType(arrayType, remainingDimensions, extraDimension);
 					this.ast.getBindingResolver().updateKey(type, subarrayType);
+					singleVariableDeclaration.setType(subarrayType);
 				}
+				checkAndSetMalformed(type, singleVariableDeclaration);
+					
 			} else {
 				singleVariableDeclaration.setType(type);
 			}
@@ -5577,21 +6261,11 @@
 					this.ast.getBindingResolver().updateKey(type, elementType);
 					variableDeclarationExpression.setType(elementType);
 				} else {
-					int start = type.getStartPosition();
-					ArrayType subarrayType = arrayType;
-					int index = extraDimension;
-					while (index > 0) {
-						subarrayType = (ArrayType) subarrayType.getComponentType();
-						index--;
-					}
-					int end = retrieveProperRightBracketPosition(remainingDimensions, start);
-					subarrayType.setSourceRange(start, end - start + 1);
-					// cut the child loose from its parent (without creating garbage)
-					subarrayType.setParent(null, null);
-					updateInnerPositions(subarrayType, remainingDimensions);
+					ArrayType subarrayType = extractSubArrayType(arrayType, remainingDimensions, extraDimension);
 					variableDeclarationExpression.setType(subarrayType);
 					this.ast.getBindingResolver().updateKey(type, subarrayType);
 				}
+				checkAndSetMalformed(type, variableDeclarationExpression);
 			} else {
 				variableDeclarationExpression.setType(type);
 			}
@@ -5613,21 +6287,11 @@
 					this.ast.getBindingResolver().updateKey(type, elementType);
 					variableDeclarationStatement.setType(elementType);
 				} else {
-					int start = type.getStartPosition();
-					ArrayType subarrayType = arrayType;
-					int index = extraDimension;
-					while (index > 0) {
-						subarrayType = (ArrayType) subarrayType.getComponentType();
-						index--;
-					}
-					int end = retrieveProperRightBracketPosition(remainingDimensions, start);
-					subarrayType.setSourceRange(start, end - start + 1);
-					// cut the child loose from its parent (without creating garbage)
-					subarrayType.setParent(null, null);
-					updateInnerPositions(subarrayType, remainingDimensions);
+					ArrayType subarrayType = extractSubArrayType(arrayType, remainingDimensions, extraDimension);
 					variableDeclarationStatement.setType(subarrayType);
 					this.ast.getBindingResolver().updateKey(type, subarrayType);
 				}
+				checkAndSetMalformed(type, variableDeclarationStatement);
 			} else {
 				variableDeclarationStatement.setType(type);
 			}
@@ -5640,13 +6304,13 @@
 		if (dimensions > 1) {
 			// need to set positions for intermediate array type see 42839
 			int start = type.getStartPosition();
-			Type currentComponentType = ((ArrayType) type).getComponentType();
+			Type currentComponentType = componentType(((ArrayType) type));
 			int searchedDimension = dimensions - 1;
 			int rightBracketEndPosition = start;
 			while (currentComponentType.isArrayType()) {
 				rightBracketEndPosition = retrieveProperRightBracketPosition(searchedDimension, start);
 				currentComponentType.setSourceRange(start, rightBracketEndPosition - start + 1);
-				currentComponentType = ((ArrayType) currentComponentType).getComponentType();
+				currentComponentType = componentType(((ArrayType) currentComponentType));
 				searchedDimension--;
 			}
 		}
@@ -6235,8 +6899,12 @@
 		String realName = tokens[tokens.length - 1];
 		SimpleName fieldName = this.ast.newSimpleName(realName);
 		int start = fieldAccessSpec.sourceStart;
-		int end = retrieveEndOfElementTypeNamePosition(start,
+		int[] positions = retrieveEndOfElementTypeNamePosition(start,
 				fieldAccessSpec.sourceEnd);
+		if (positions[0] != -1)
+			start = positions[0];
+		int end = positions[1];
+
 		fieldName.setSourceRange(start, end - start + 1);
 		result.setName(fieldName);
 
@@ -6265,7 +6933,10 @@
 
 		SimpleName methodName = this.ast.newSimpleName(new String(methodSpec.selector));
 		int start = methodSpec.sourceStart;
-		int end = retrieveEndOfElementTypeNamePosition(start, methodSpec.sourceEnd);
+		int[] positions = retrieveEndOfElementTypeNamePosition(start, methodSpec.sourceEnd);
+		if (positions[0] != -1)
+			start = positions[0];
+		int end = positions[1];
 		methodName.setSourceRange(start, end - start + 1);
 		result.setName(methodName);
 
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java
index eabb3fe..b8e1e9a 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTMatcher.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -163,6 +167,13 @@
 	}
 
 	/**
+	 * @deprecated
+	 */
+	private Type componentType(ArrayType array) {
+		return array.getComponentType();
+	}
+
+	/**
 	 * Returns whether the given node and the other object match.
 	 * <p>
 	 * The default implementation provided by this class tests whether the
@@ -329,7 +340,12 @@
 			return false;
 		}
 		ArrayType o = (ArrayType) other;
-		return safeSubtreeMatch(node.getComponentType(), o.getComponentType());
+		int level = node.getAST().apiLevel;
+		if (level < AST.JLS8) {
+			return safeSubtreeMatch(componentType(node), componentType(o));
+		}
+		return safeSubtreeMatch(node.getElementType(), o.getElementType())
+				&& safeSubtreeListMatch(node.dimensions(), o.dimensions());
 	}
 
 	/**
@@ -697,17 +713,39 @@
 	 * @return <code>true</code> if the subtree matches, or
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
-	 * @since 3.7.1
+	 * @since 3.9 BETA_JAVA8
 	 */
-	public boolean match(UnionType node, Object other) {
-		if (!(other instanceof UnionType)) {
+	public boolean match(CreationReference node, Object other) {
+		if (!(other instanceof CreationReference)) {
 			return false;
 		}
-		UnionType o = (UnionType) other;
-		return
-			safeSubtreeListMatch(
-				node.types(),
-				o.types());
+		CreationReference o = (CreationReference) other;
+		return (
+			safeSubtreeMatch(node.getType(), o.getType())
+				&& safeSubtreeListMatch(node.typeArguments(), o.typeArguments()));
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 *
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean match(Dimension node, Object other) {
+		if (!(other instanceof Dimension)) {
+			return false;
+		}
+		Dimension o = (Dimension) other;
+		return safeSubtreeListMatch(node.annotations(), o.annotations());
 	}
 
 	/**
@@ -855,6 +893,32 @@
 	 * @return <code>true</code> if the subtree matches, or
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean match(ExpressionMethodReference node, Object other) {
+		if (!(other instanceof ExpressionMethodReference)) {
+			return false;
+		}
+		ExpressionMethodReference o = (ExpressionMethodReference) other;
+		return (
+			safeSubtreeMatch(node.getExpression(), o.getExpression())
+				&& safeSubtreeListMatch(node.typeArguments(), o.typeArguments())
+				&& safeSubtreeMatch(node.getName(), o.getName()));
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 *
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
 	 */
 	public boolean match(ExpressionStatement node, Object other) {
 		if (!(other instanceof ExpressionStatement)) {
@@ -1052,6 +1116,41 @@
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
 	 */
+	public boolean match(Initializer node, Object other) {
+		if (!(other instanceof Initializer)) {
+			return false;
+		}
+		Initializer o = (Initializer) other;
+		int level = node.getAST().apiLevel;
+		if (level == AST.JLS2_INTERNAL) {
+			if (node.getModifiers() != o.getModifiers()) {
+				return false;
+			}
+		}
+		if (level >= AST.JLS3_INTERNAL) {
+			if (!safeSubtreeListMatch(node.modifiers(), o.modifiers())) {
+				return false;
+			}
+		}
+		return (
+				safeSubtreeMatch(node.getJavadoc(), o.getJavadoc())
+				&& safeSubtreeMatch(node.getBody(), o.getBody()));
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 *
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
+	 */
 	public boolean match(InstanceofExpression node, Object other) {
 		if (!(other instanceof InstanceofExpression)) {
 			return false;
@@ -1075,26 +1174,14 @@
 	 * @return <code>true</code> if the subtree matches, or
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
+	 * @since 3.9 BETA_JAVA8
 	 */
-	public boolean match(Initializer node, Object other) {
-		if (!(other instanceof Initializer)) {
+	public boolean match(IntersectionType node, Object other) {
+		if (!(other instanceof IntersectionType)) {
 			return false;
 		}
-		Initializer o = (Initializer) other;
-		int level = node.getAST().apiLevel;
-		if (level == AST.JLS2_INTERNAL) {
-			if (node.getModifiers() != o.getModifiers()) {
-				return false;
-			}
-		}
-		if (level >= AST.JLS3_INTERNAL) {
-			if (!safeSubtreeListMatch(node.modifiers(), o.modifiers())) {
-				return false;
-			}
-		}
-		return (
-				safeSubtreeMatch(node.getJavadoc(), o.getJavadoc())
-				&& safeSubtreeMatch(node.getBody(), o.getBody()));
+		IntersectionType o = (IntersectionType) other;
+		return safeSubtreeListMatch(node.types(), o.types());
 	}
 
 	/**
@@ -1177,6 +1264,31 @@
 	 * Returns whether the given node and the other object match.
 	 * <p>
 	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 * 
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean match(LambdaExpression node, Object other) {
+		if (!(other instanceof LambdaExpression)) {
+			return false;
+		}
+		LambdaExpression o = (LambdaExpression) other;
+		return	(node.hasParentheses() == o.hasParentheses())
+				&& safeSubtreeListMatch(node.parameters(), o.parameters())
+				&& safeSubtreeMatch(node.getBody(), o.getBody());
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
 	 * other object is a node of the same type. Subclasses may override
 	 * this method as needed.
 	 * </p>
@@ -1357,37 +1469,31 @@
 		}
 		MethodDeclaration o = (MethodDeclaration) other;
 		int level = node.getAST().apiLevel;
-		if (level == AST.JLS2_INTERNAL) {
-			if (node.getModifiers() != o.getModifiers()) {
-				return false;
-			}
-			if (!safeSubtreeMatch(node.internalGetReturnType(), o.internalGetReturnType())) {
-				return false;
-			}
-		}
-		if (level >= AST.JLS3_INTERNAL) {
-			if (!safeSubtreeListMatch(node.modifiers(), o.modifiers())) {
-				return false;
-			}
-			if (!safeSubtreeMatch(node.getReturnType2(), o.getReturnType2())) {
-				return false;
-			}
-			// n.b. compare type parameters even for constructors
-			if (!safeSubtreeListMatch(node.typeParameters(), o.typeParameters())) {
-				return false;
-			}
-		}
-		return ((node.isConstructor() == o.isConstructor())
+		return node.isConstructor() == o.isConstructor()
 				&& safeSubtreeMatch(node.getJavadoc(), o.getJavadoc())
+				&& (level >= AST.JLS3_INTERNAL
+						? safeSubtreeListMatch(node.modifiers(), o.modifiers())
+								&& safeSubtreeListMatch(node.typeParameters(), o.typeParameters())
+								// n.b. compare return type even for constructors
+								&& safeSubtreeMatch(node.getReturnType2(), o.getReturnType2())
+						: node.getModifiers() == o.getModifiers()
+								// n.b. compare return type even for constructors
+								&& safeSubtreeMatch(node.internalGetReturnType(), o.internalGetReturnType()))
 				&& safeSubtreeMatch(node.getName(), o.getName())
-				// n.b. compare return type even for constructors
+				&& (level >= AST.JLS8
+						? safeSubtreeMatch(node.getReceiverType(), o.getReceiverType())
+								&& safeSubtreeMatch(node.getReceiverQualifier(), o.getReceiverQualifier())
+						: true)
 				&& safeSubtreeListMatch(node.parameters(), o.parameters())
-	 			&& node.getExtraDimensions() == o.getExtraDimensions()
-				&& safeSubtreeListMatch(node.thrownExceptions(), o.thrownExceptions())
+				&& (level >= AST.JLS8
+						? safeSubtreeListMatch(node.extraDimensions(), o.extraDimensions())
+								&& safeSubtreeListMatch(node.thrownExceptionTypes(), o.thrownExceptionTypes())
+						: node.getExtraDimensions() == o.getExtraDimensions()
+								&& safeSubtreeListMatch(node.internalThrownExceptions(), o.internalThrownExceptions()))
 //{ObjectTeams:
 				&& safeSubtreeMatch(node.getGuardPredicate(), o.getGuardPredicate())
 // SH}
-				&& safeSubtreeMatch(node.getBody(), o.getBody()));
+				&& safeSubtreeMatch(node.getBody(), o.getBody());
 	}
 
 	/**
@@ -1553,6 +1659,31 @@
 	 * @return <code>true</code> if the subtree matches, or
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean match(PackageQualifiedType node, Object other) {
+		if (!(other instanceof PackageQualifiedType)) {
+			return false;
+		}
+		PackageQualifiedType o = (PackageQualifiedType) other;
+		return safeSubtreeMatch(node.getQualifier(), o.getQualifier())
+				&& safeSubtreeListMatch(node.annotations(), o.annotations())
+				&& safeSubtreeMatch(node.getName(), o.getName());
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 *
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
 	 * @since 3.1
 	 */
 	public boolean match(ParameterizedType node, Object other) {
@@ -1653,7 +1784,9 @@
 			return false;
 		}
 		PrimitiveType o = (PrimitiveType) other;
-		return (node.getPrimitiveTypeCode() == o.getPrimitiveTypeCode());
+		int level = node.getAST().apiLevel;
+		return (level >= AST.JLS8 ? safeSubtreeListMatch(node.annotations(), o.annotations()) : true)
+				&& node.getPrimitiveTypeCode() == o.getPrimitiveTypeCode();
 	}
 
 	/**
@@ -1675,9 +1808,8 @@
 			return false;
 		}
 		QualifiedName o = (QualifiedName) other;
-		return (
-			safeSubtreeMatch(node.getQualifier(), o.getQualifier())
-				&& safeSubtreeMatch(node.getName(), o.getName()));
+		return safeSubtreeMatch(node.getQualifier(), o.getQualifier())
+				&& safeSubtreeMatch(node.getName(), o.getName());
 	}
 
 	/**
@@ -1700,9 +1832,10 @@
 			return false;
 		}
 		QualifiedType o = (QualifiedType) other;
-		return (
-			safeSubtreeMatch(node.getQualifier(), o.getQualifier())
-				&& safeSubtreeMatch(node.getName(), o.getName()));
+		int level = node.getAST().apiLevel;
+		return safeSubtreeMatch(node.getQualifier(), o.getQualifier())
+				&& (level >= AST.JLS8 ? safeSubtreeListMatch(node.annotations(), o.annotations()) : true)
+				&& safeSubtreeMatch(node.getName(), o.getName());
 	}
 
 	/**
@@ -1768,7 +1901,9 @@
 			return false;
 		}
 		SimpleType o = (SimpleType) other;
-		return safeSubtreeMatch(node.getName(), o.getName());
+		int level = node.getAST().apiLevel;
+		return (level >= AST.JLS8 ? safeSubtreeListMatch(node.annotations(), o.annotations()) : true)
+				&& safeSubtreeMatch(node.getName(), o.getName());
 	}
 
 	/**
@@ -1819,23 +1954,20 @@
 		}
 		SingleVariableDeclaration o = (SingleVariableDeclaration) other;
 		int level = node.getAST().apiLevel;
-		if (level == AST.JLS2_INTERNAL) {
-			if (node.getModifiers() != o.getModifiers()) {
-				return false;
-			}
-		}
-		if (level >= AST.JLS3_INTERNAL) {
-			if (!safeSubtreeListMatch(node.modifiers(), o.modifiers())) {
-				return false;
-			}
-			if (node.isVarargs() != o.isVarargs()) {
-				return false;
-			}
-		}
-		return
-		    safeSubtreeMatch(node.getType(), o.getType())
+		return (level >= AST.JLS3_INTERNAL
+						? safeSubtreeListMatch(node.modifiers(), o.modifiers())
+						: node.getModifiers() == o.getModifiers())
+				&& safeSubtreeMatch(node.getType(), o.getType())
+				&& (level >= AST.JLS8 && node.isVarargs()
+						? safeSubtreeListMatch(node.varargsAnnotations(), o.varargsAnnotations())
+						: true)
+				&& (level >= AST.JLS3_INTERNAL
+						? node.isVarargs() == o.isVarargs()
+						: true)
 				&& safeSubtreeMatch(node.getName(), o.getName())
-	 			&& node.getExtraDimensions() == o.getExtraDimensions()
+				&& ((level >= AST.JLS8)
+						? safeSubtreeListMatch(node.extraDimensions(), o.extraDimensions())
+						: node.getExtraDimensions() == o.getExtraDimensions())
 				&& safeSubtreeMatch(node.getInitializer(), o.getInitializer());
 	}
 
@@ -1957,6 +2089,32 @@
 	 * @return <code>true</code> if the subtree matches, or
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
+	 *   
+	 *   @since 3.9 BETA_JAVA8
+	 */
+	public boolean match(SuperMethodReference node, Object other) {
+		if (!(other instanceof SuperMethodReference)) {
+			return false;
+		}
+		SuperMethodReference o = (SuperMethodReference) other;
+		return (safeSubtreeMatch(node.getQualifier(), o.getQualifier())
+				&& safeSubtreeListMatch(node.typeArguments(), o.typeArguments())
+				&& safeSubtreeMatch(node.getName(), o.getName()));
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 *
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
 	 */
 	public boolean match(SwitchCase node, Object other) {
 		if (!(other instanceof SwitchCase)) {
@@ -2125,19 +2283,11 @@
 			return false;
 		}
 		TryStatement o = (TryStatement) other;
-		switch(node.getAST().apiLevel) {
-			case AST.JLS2_INTERNAL :
-			case AST.JLS3_INTERNAL :
-				return (
-						safeSubtreeMatch(node.getBody(), o.getBody())
-							&& safeSubtreeListMatch(node.catchClauses(), o.catchClauses())
-							&& safeSubtreeMatch(node.getFinally(), o.getFinally()));
-		}
-		return (
-			safeSubtreeListMatch(node.resources(), o.resources())
-			&& safeSubtreeMatch(node.getBody(), o.getBody())
-			&& safeSubtreeListMatch(node.catchClauses(), o.catchClauses())
-			&& safeSubtreeMatch(node.getFinally(), o.getFinally()));
+		int level = node.getAST().apiLevel;
+		return (level >= AST.JLS4_INTERNAL ? safeSubtreeListMatch(node.resources(), o.resources()) : true)
+				&& safeSubtreeMatch(node.getBody(), o.getBody())
+				&& safeSubtreeListMatch(node.catchClauses(), o.catchClauses())
+				&& safeSubtreeMatch(node.getFinally(), o.getFinally());
 	}
 
 	/**
@@ -2257,6 +2407,32 @@
 	 * @return <code>true</code> if the subtree matches, or
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean match(TypeMethodReference node, Object other) {
+		if (!(other instanceof TypeMethodReference)) {
+			return false;
+		}
+		TypeMethodReference o = (TypeMethodReference) other;
+		return (
+			safeSubtreeMatch(node.getType(), o.getType())
+				&& safeSubtreeListMatch(node.typeArguments(), o.typeArguments())
+				&& safeSubtreeMatch(node.getName(), o.getName()));
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 *
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
 	 * @since 3.1
 	 */
 	public boolean match(TypeParameter node, Object other) {
@@ -2264,11 +2440,14 @@
 			return false;
 		}
 		TypeParameter o = (TypeParameter) other;
-		return safeSubtreeMatch(node.getName(), o.getName())
 //{ObjectTeams: value parameter & <B base R>:
-				&& node.isValueParameter() == o.isValueParameter()
-				&& node.hasBaseBound() == o.hasBaseBound()
+		if (node.isValueParameter() != o.isValueParameter()
+			|| node.hasBaseBound() != o.hasBaseBound())
+			return false;
 // SH}
+		int level = node.getAST().apiLevel;
+		return (level >= AST.JLS8 ? safeSubtreeListMatch(node.annotations(), o.annotations()) : true)
+				&& safeSubtreeMatch(node.getName(), o.getName())
 				&& safeSubtreeListMatch(node.typeBounds(), o.typeBounds());
 	}
 
@@ -2285,6 +2464,29 @@
 	 * @return <code>true</code> if the subtree matches, or
 	 *   <code>false</code> if they do not match or the other object has a
 	 *   different node type or is <code>null</code>
+	 * @since 3.7.1
+	 */
+	public boolean match(UnionType node, Object other) {
+		if (!(other instanceof UnionType)) {
+			return false;
+		}
+		UnionType o = (UnionType) other;
+		return safeSubtreeListMatch(node.types(),	o.types());
+	}
+
+	/**
+	 * Returns whether the given node and the other object match.
+	 * <p>
+	 * The default implementation provided by this class tests whether the
+	 * other object is a node of the same type with structurally isomorphic
+	 * child subtrees. Subclasses may override this method as needed.
+	 * </p>
+	 *
+	 * @param node the node
+	 * @param other the other object, or <code>null</code>
+	 * @return <code>true</code> if the subtree matches, or
+	 *   <code>false</code> if they do not match or the other object has a
+	 *   different node type or is <code>null</code>
 	 */
 	public boolean match(VariableDeclarationExpression node, Object other) {
 		if (!(other instanceof VariableDeclarationExpression)) {
@@ -2329,9 +2531,12 @@
 			return false;
 		}
 		VariableDeclarationFragment o = (VariableDeclarationFragment) other;
+		int level = node.getAST().apiLevel;
 		return safeSubtreeMatch(node.getName(), o.getName())
-			&& node.getExtraDimensions() == o.getExtraDimensions()
-			&& safeSubtreeMatch(node.getInitializer(), o.getInitializer());
+				&& (level >= AST.JLS8
+						? safeSubtreeListMatch(node.extraDimensions(), o.extraDimensions())
+						: node.getExtraDimensions() == o.getExtraDimensions())
+				&& safeSubtreeMatch(node.getInitializer(), o.getInitializer());
 	}
 
 	/**
@@ -2412,8 +2617,10 @@
 			return false;
 		}
 		WildcardType o = (WildcardType) other;
-		return node.isUpperBound() == o.isUpperBound()
-		&& safeSubtreeMatch(node.getBound(), o.getBound());
+		int level = node.getAST().apiLevel;
+		return (level >= AST.JLS8 ? safeSubtreeListMatch(node.annotations(), o.annotations()) : true)
+				&& node.isUpperBound() == o.isUpperBound()
+				&& safeSubtreeMatch(node.getBound(), o.getBound());
 	}
 
 //{ObjectTeams: match methods for OT-specific types
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
index 0dde4ac..7a41baa 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTNode.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -126,10 +130,26 @@
  */
 public abstract class ASTNode {
 	/*
+	 * ATTENTION: When doing anything to the ASTNode hierarchy, do not try to
+	 * reinvent the wheel.
+	 * 
+	 * Look out for precedents with
+	 * - the same structural property type
+	 * - for child node properties: the same optionality (can be null / lazy initialization blurbs and impl.)
+	 * - the same declaring node type kind (abstract supertype or concrete type)
+	 * - a similar history (added in JLSx API, below JLSx only, replaced by {@link #xx})
+	 * ..., and copy what was done there. Most of the code and
+	 * Javadoc in this package should look like it was created by a code generator.
+	 * 
+	 * In subclasses of ASTNode, order properties by order of occurrence in source.
+	 * In general classes that list all AST node types, order alphabetically.  
+	 */
+
+	/*
 	 * INSTRUCTIONS FOR ADDING NEW CONCRETE AST NODE TYPES
 	 *
 	 * There are several things that need to be changed when a
-	 * new concrete AST node type (call it "FooBar"):
+	 * new concrete AST node type (call it "FooBar") is added:
 	 *
 	 * 1. Create the FooBar AST node type class.
 	 * The most effective way to do this is to copy a similar
@@ -144,7 +164,7 @@
 	 *
 	 * 4. Add AST.newFooBar() factory method.
 	 *
-	 * 5. Add ASTVisitor.visit(FooBar) and endVisit(FooBar) methods.
+	 * 5. Add ASTVisitor.visit(FooBar) and endVisit(FooBar) methods. Same for DefaultASTVisitor.
 	 *
 	 * 6. Add ASTMatcher.match(FooBar,Object) method.
 	 *
@@ -154,12 +174,57 @@
 	 * 8. Add NaiveASTFlattener.visit(FooBar) method to illustrate
 	 * how these nodes should be serialized.
 	 *
-	 * 9. Update the AST test suites.
+	 * 9. Update the AST test suites (ASTVisitorTest, etc.)
 	 *
 	 * The next steps are to update AST.parse* to start generating
 	 * the new type of nodes, and ASTRewrite to serialize them back out.
 	 */
 
+	/*
+	 * INSTRUCTIONS FOR ADDING A NEW PROPERTY TO AN AST NODE TYPE
+	 * 
+	 * For concrete node types, use e.g. properties of SimpleName or ClassInstanceCreation
+	 * as templates:
+	 * 
+	 * 1. Copy/paste the field, property descriptor, and getter/setter.
+	 * 
+	 * 2. Adjust everything to the new property name and type. In the field's
+	 * Javadoc, properly document default value, initialization, and applicable
+	 * API levels.
+	 * 
+	 * 3. Add/remove @since tags as necessary.
+	 * 
+	 * 4. Search for references to the members in the template, and add similar
+	 * references in corresponding places for the new property.
+	 * 
+	 * 
+	 * For abstract node types, use AbstractTypeDeclaration as a template:
+	 * 
+	 * 1. Same steps as above, but take extra care to copy and adjust the
+	 * *internal*() methods as well. 
+	 * 
+	 * 2. Search for references to the members in the template, and add similar
+	 * references in corresponding places for the new property (e.g. property
+	 * descriptor in each leaf type).
+	 */
+
+	/*
+	 * INSTRUCTIONS FOR REPLACING/DEPRECATING A PROPERTY OF AN AST NODE
+	 * 
+	 * To replace a simple property with a child list property, see e.g. how
+	 * SingleVariableDeclaration replaced MODIFIERS_PROPERTY with
+	 * MODIFIERS2_PROPERTY.
+	 * 
+	 * 1. Reuse the old property id.
+	 * 
+	 * 2. Deprecate all references to the old property, except for the old
+	 * getter, which should compute the value from the new property in
+	 * later API levels.
+	 * 
+	 * To completely replace a property, see how ClassInstanceCreation replaced
+	 * NAME_PROPERTY with TYPE_PROPERTY.
+	 */
+
 	/**
 	 * Node type constant indicating a node of type
 	 * <code>AnonymousClassDeclaration</code>.
@@ -770,6 +835,72 @@
 	 */
 	public static final int UNION_TYPE = 84;
 
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>Dimension</code>.
+	 *
+	 * @see Dimension
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final int DIMENSION = 85;
+
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>LambdaExpression</code>.
+	 * @see LambdaExpression
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final int LAMBDA_EXPRESSION = 86;
+
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>IntersectionType</code>.
+	 *
+	 * @see IntersectionType
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final int INTERSECTION_TYPE = 87;
+
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>QualifiedType</code>.
+	 * @see QualifiedType
+	 * @since 3.9 BETA_JAV8
+	 */
+	public static final int PACKAGE_QUALIFIED_TYPE = 88;
+
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>CreationReference</code>.
+	 * @see CreationReference
+	 * @since 3.9 BETA_JAV8
+	 */
+	public static final int CREATION_REFERENCE = 89;
+
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>ExpressionMethodReference</code>.
+	 * @see ExpressionMethodReference
+	 * @since 3.9 BETA_JAV8
+	 */
+	public static final int EXPRESSION_METHOD_REFERENCE = 90;
+
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>SuperMethhodReference</code>.
+	 * @see SuperMethodReference
+	 * @since 3.9 BETA_JAV8
+	 */
+	public static final int SUPER_METHOD_REFERENCE = 91;
+
+	/**
+	 * Node type constant indicating a node of type
+	 * <code>TypeMethodReference</code>.
+	 * @see TypeMethodReference
+	 * @since 3.9 BETA_JAV8
+	 */
+	public static final int TYPE_METHOD_REFERENCE = 92;
+
 //{ObjectTeams: required OT specific node type constants added
 
 	/**
@@ -777,93 +908,93 @@
 	 * <code>MethodSpec</code>.
 	 * @see MethodSpec
 	 */
-	public static final int METHOD_SPEC = 85;
+	public static final int METHOD_SPEC = 93;
 
 	/**
 	 * Node type constant indicating a node of type
 	 * <code>CallinMappingDeclaration</code>.
 	 * @see CallinMappingDeclaration
 	 */
-	public static final int CALLIN_MAPPING_DECLARATION = 86;
+	public static final int CALLIN_MAPPING_DECLARATION = 94;
 
 	/**
 	 * Node type constant indicating a node of type
 	 * <code>CalloutMappingDeclaration</code>.
 	 * @see CalloutMappingDeclaration
 	 */
-	public static final int CALLOUT_MAPPING_DECLARATION = 87;
+	public static final int CALLOUT_MAPPING_DECLARATION = 95;
 
 	/**
 	 * Node type constant indicating a node of type
 	 * <code>LiftingType</code>.
 	 * @see LiftingType
 	 */
-	public static final int LIFTING_TYPE = 88;
+	public static final int LIFTING_TYPE = 96;
 
 	/**
 	 * Node type constant indicating a node of type
 	 * <code>WithinStatement</code>.
 	 * @see WithinStatement
 	 */
-	public static final int WITHIN_STATEMENT = 89;
+	public static final int WITHIN_STATEMENT = 97;
 
 	/**
 	 * Node type constant indicating a node of type
 	 * <code>BaseConstructorMessageSend</code>.
 	 * @see BaseConstructorInvocation
 	 */
-	public static final int BASE_CONSTRUCTOR_INVOCATION = 90;
+	public static final int BASE_CONSTRUCTOR_INVOCATION = 98;
 
     /**
      * Node type constant indicating a node of type
      * <code>ParameterMapping</code>.
      * @see ParameterMapping
      */
-    public static final int PARAMETER_MAPPING = 91;
+    public static final int PARAMETER_MAPPING = 99;
 
     /**
      * Node type constant indicating a node of type
      * <code>BaseCallMessageSend</code>.
      * @see BaseCallMessageSend
      */
-     public static final int BASE_CALL_MESSAGE_SEND = 92;
+     public static final int BASE_CALL_MESSAGE_SEND = 100;
 
      /**
  	 * Node type constant indicating a node of type
  	 * <code>FieldAccessSpec</code>.
  	 * @see FieldAccessSpec
  	 */
- 	public static final int FIELD_ACCESS_SPEC = 93;
+ 	public static final int FIELD_ACCESS_SPEC = 101;
 
     /**
      * Node type constant indicating a node of type
      * <code>RoleTypeDelaration</code>.
      * @see RoleTypeDeclaration
      */
-    public static final int ROLE_TYPE_DECLARATION = 94;
+    public static final int ROLE_TYPE_DECLARATION = 102;
 
     /**
      * Node type constant indicating a node of type
      * <code>TSuperMessageSend</code>.
      * @see TSuperMessageSend
      */
-     public static final int TSUPER_MESSAGE_SEND = 95;
+     public static final int TSUPER_MESSAGE_SEND = 103;
 
      /**
       * Node type constant indicating a node of type
       * <code>TSuperCallMessageSend</code>.
       * @see TSuperMessageSend
       */
-      public static final int TSUPER_CONSTRUCTOR_INVOCATION = 96;
+      public static final int TSUPER_CONSTRUCTOR_INVOCATION = 104;
 
-      public static final int TYPE_ANCHOR = 97;
+      public static final int TYPE_ANCHOR = 105;
 
-      public static final int PRECEDENCE_DECLARATION = 98;
+      public static final int PRECEDENCE_DECLARATION = 106;
 
-      public static final int GUARD_PREDICATE_DECLARATION = 99;
+      public static final int GUARD_PREDICATE_DECLARATION = 107;
 
       /** @since 1.3.1 */
-      public static final int METHOD_BINDING_OPERATOR = 100;
+      public static final int METHOD_BINDING_OPERATOR = 108;
 //gbr}
 
 	/**
@@ -920,8 +1051,10 @@
 				return ConstructorInvocation.class;
 			case CONTINUE_STATEMENT :
 				return ContinueStatement.class;
-			case UNION_TYPE :
-				return UnionType.class;
+			case CREATION_REFERENCE :
+				return CreationReference.class;
+			case DIMENSION:
+				return Dimension.class;
 			case DO_STATEMENT :
 				return DoStatement.class;
 			case EMPTY_STATEMENT :
@@ -932,6 +1065,8 @@
 				return EnumConstantDeclaration.class;
 			case ENUM_DECLARATION :
 				return EnumDeclaration.class;
+			case EXPRESSION_METHOD_REFERENCE :
+				return ExpressionMethodReference.class;
 			case EXPRESSION_STATEMENT :
 				return ExpressionStatement.class;
 			case FIELD_ACCESS :
@@ -950,10 +1085,14 @@
 				return Initializer.class;
 			case INSTANCEOF_EXPRESSION :
 				return InstanceofExpression.class;
+			case INTERSECTION_TYPE:
+				return IntersectionType.class;
 			case JAVADOC :
 				return Javadoc.class;
 			case LABELED_STATEMENT :
 				return LabeledStatement.class;
+			case LAMBDA_EXPRESSION :
+				return LambdaExpression.class;
 			case LINE_COMMENT :
 				return LineComment.class;
 			case MARKER_ANNOTATION :
@@ -980,6 +1119,8 @@
 				return NumberLiteral.class;
 			case PACKAGE_DECLARATION :
 				return PackageDeclaration.class;
+			case PACKAGE_QUALIFIED_TYPE :
+				return PackageQualifiedType.class;
 			case PARAMETERIZED_TYPE :
 				return ParameterizedType.class;
 			case PARENTHESIZED_EXPRESSION :
@@ -1012,6 +1153,8 @@
 				return SuperFieldAccess.class;
 			case SUPER_METHOD_INVOCATION :
 				return SuperMethodInvocation.class;
+			case SUPER_METHOD_REFERENCE :
+				return SuperMethodReference.class;
 			case SWITCH_CASE:
 				return SwitchCase.class;
 			case SWITCH_STATEMENT :
@@ -1032,10 +1175,14 @@
 				return TypeDeclaration.class;
 			case TYPE_DECLARATION_STATEMENT :
 				return TypeDeclarationStatement.class;
+			case TYPE_METHOD_REFERENCE :
+				return TypeMethodReference.class;
 			case TYPE_LITERAL :
 				return TypeLiteral.class;
 			case TYPE_PARAMETER :
 				return TypeParameter.class;
+			case UNION_TYPE :
+				return UnionType.class;
 			case VARIABLE_DECLARATION_EXPRESSION :
 				return VariableDeclarationExpression.class;
 			case VARIABLE_DECLARATION_FRAGMENT :
@@ -1087,7 +1234,7 @@
 	/**
 	 * Owning AST.
      * <p>
-     * N.B. This ia a private field, but declared as package-visible
+     * N.B. This is a private field, but declared as package-visible
      * for more efficient access from inner classes.
      * </p>
 	 */
@@ -1120,7 +1267,7 @@
 	private Object property1 = null;
 
 	/**
-	 * Auxillary field used in representing node properties efficiently.
+	 * Auxiliary field used in representing node properties efficiently.
 	 *
 	 * @see #property1
 	 */
@@ -1214,11 +1361,15 @@
 	private StructuralPropertyDescriptor location = null;
 
 	/** Internal convenience constant indicating that there is definite risk of cycles.
+	 * @see ChildPropertyDescriptor#cycleRisk()
+	 * @see ChildListPropertyDescriptor#cycleRisk()
 	 * @since 3.0
 	 */
 	static final boolean CYCLE_RISK = true;
 
 	/** Internal convenience constant indicating that there is no risk of cycles.
+	 * @see ChildPropertyDescriptor#cycleRisk()
+	 * @see ChildListPropertyDescriptor#cycleRisk()
 	 * @since 3.0
 	 */
 	static final boolean NO_CYCLE_RISK = false;
@@ -1296,7 +1447,7 @@
 			}
 
 			/**
-			 * Adjusts this cursor to accomodate an add/remove at the given
+			 * Adjusts this cursor to accommodate an add/remove at the given
 			 * index.
 			 *
 			 * @param index the position at which the element was added
@@ -1480,7 +1631,7 @@
 		}
 
 		/**
-		 * Adjusts all cursors to accomodate an add/remove at the given
+		 * Adjusts all cursors to accommodate an add/remove at the given
 		 * index.
 		 * <p>
 		 * This method is only used when the list is being modified.
@@ -1729,7 +1880,7 @@
 	 * Sets the value of the given int-valued property for this node.
 	 * The default implementation of this method throws an exception explaining
 	 * that this node does not have such a property. This method should be
-	 * extended in subclasses that have at leasy one simple property whose value
+	 * extended in subclasses that have at least one simple property whose value
 	 * type is int.
 	 *
 	 * @param property the property
@@ -1750,7 +1901,7 @@
 	 * Sets the value of the given boolean-valued property for this node.
 	 * The default implementation of this method throws an exception explaining
 	 * that this node does not have such a property. This method should be
-	 * extended in subclasses that have at leasy one simple property whose value
+	 * extended in subclasses that have at least one simple property whose value
 	 * type is boolean.
 	 *
 	 * @param property the property
@@ -1771,7 +1922,7 @@
 	 * Sets the value of the given property for this node.
 	 * The default implementation of this method throws an exception explaining
 	 * that this node does not have such a property. This method should be
-	 * extended in subclasses that have at leasy one simple property whose value
+	 * extended in subclasses that have at least one simple property whose value
 	 * type is a reference type.
 	 *
 	 * @param property the property
@@ -1793,7 +1944,7 @@
 	 * Sets the child value of the given property for this node.
 	 * The default implementation of this method throws an exception explaining
 	 * that this node does not have such a property. This method should be
-	 * extended in subclasses that have at leasy one child property.
+	 * extended in subclasses that have at least one child property.
 	 *
 	 * @param property the property
 	 * @param get <code>true</code> for a get operation, and
@@ -1813,8 +1964,8 @@
 	/**
 	 * Returns the list value of the given property for this node.
 	 * The default implementation of this method throws an exception explaining
-	 * that this noed does not have such a property. This method should be
-	 * extended in subclasses that have at leasy one child list property.
+	 * that this node does not have such a property. This method should be
+	 * extended in subclasses that have at least one child list property.
 	 *
 	 * @param property the property
 	 * @return the list (element type: {@link ASTNode})
@@ -1864,8 +2015,8 @@
 	 * Internal helper method that starts the building a list of
 	 * property descriptors for the given node type.
 	 *
-	 * @param nodeClass the class for a concrete node type
-	 * @param propertyList empty list
+	 * @param nodeClass the class for a concrete node type with n properties
+	 * @param propertyList empty list, with capacity for n+1 elements
 	 */
 	static void createPropertyList(Class nodeClass, List propertyList) {
 		// stuff nodeClass at head of list for future ref
@@ -1912,7 +2063,7 @@
      * Use this method to prevent access to new properties that have been added in JLS3.
      * </p>
      * 
-     * @exception UnsupportedOperationException
+	 * @exception UnsupportedOperationException if this operation is used in a JLS2 AST
 	 * @since 3.0
      */
 	final void unsupportedIn2() {
@@ -1928,12 +2079,28 @@
      * Use this method to prevent access to new properties that have been added in JLS4.
      * </p>
      * 
-	 * @exception UnsupportedOperationException
+	 * @exception UnsupportedOperationException if this operation is used in a JLS2 or JLS3 AST
 	 * @since 3.7
 	 */
 	final void unsupportedIn2_3() {
 		if (this.ast.apiLevel <= AST.JLS3_INTERNAL) {
-			throw new UnsupportedOperationException("Operation only supported in JLS4 AST"); //$NON-NLS-1$
+			throw new UnsupportedOperationException("Operation only supported in JLS4 and later AST"); //$NON-NLS-1$
+		}
+	}
+	
+	/**
+     * Checks that this AST operation is not used when
+     * building JLS2 or JLS3 or JLS4 level ASTs.
+     * <p>
+     * Use this method to prevent access to new properties that have been added in JLS8.
+     * </p>
+     * 
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	final void unsupportedIn2_3_4() {
+		if (this.ast.apiLevel < AST.JLS8) {
+			throw new UnsupportedOperationException("Operation only supported in JLS8 and later AST"); //$NON-NLS-1$
 		}
 	}
 	
@@ -1944,9 +2111,10 @@
      * Use this method to prevent access to deprecated properties (deprecated in JLS3).
      * </p>
      * 
-     * @exception UnsupportedOperationException
+	 * @exception UnsupportedOperationException if this operation is used in an AST later than JLS2
 	 * @since 3.0
      */
+	// In API Javadocs, add: * @deprecated In the JLS3 API, this method is replaced by {@link #replacement()}.
 	final void supportedOnlyIn2() {
 	  if (this.ast.apiLevel != AST.JLS2_INTERNAL) {
 	  	throw new UnsupportedOperationException("Operation only supported in JLS2 AST"); //$NON-NLS-1$
@@ -1954,6 +2122,23 @@
 	}
 
 	/**
+     * Checks that this AST operation is only used when
+     * building JLS2, JLS3 or JLS4 level ASTs.
+     * <p>
+     * Use this method to prevent access to deprecated properties (deprecated in JLS8).
+     * </p>
+     * 
+	 * @exception UnsupportedOperationException if this operation is used in an AST later than JLS4
+     * @since 3.9 BETA_JAVA8
+     */
+	// In API Javadocs, add: * @deprecated In the JLS8 API, this method is replaced by {@link #replacement()}.
+	final void supportedOnlyIn2_3_4() {
+	  if (this.ast.apiLevel >= AST.JLS8) {
+	  	throw new UnsupportedOperationException("Operation only supported in JLS2, JLS3 and JLS4 ASTs"); //$NON-NLS-1$
+	  }
+	}
+	
+	/**
 	 * Sets or clears this node's parent node and location.
 	 * <p>
 	 * Note that this method is package-private. The pointer from a node
@@ -2175,7 +2360,7 @@
 	 */
 	final void preValueChange(SimplePropertyDescriptor property) {
 		if ((this.typeAndFlags & PROTECT) != 0) {
-			// this node is protected => cannot change valure of properties
+			// this node is protected => cannot change value of properties
 			throw new IllegalArgumentException("AST node cannot be modified"); //$NON-NLS-1$
 		}
 		this.ast.preValueChangeEvent(this, property);
@@ -2620,6 +2805,21 @@
 	 * This method must be implemented in subclasses.
 	 * </p>
 	 * <p>
+	 * General template for implementation on each concrete ASTNode class:
+	 * <pre>
+	 * <code>
+	 * ConcreteNodeType result = new ConcreteNodeType(target);
+	 * result.setSourceRange(getStartPosition(), getLength());
+	 * result.setChildProperty(
+	 *         (ChildPropertyType) ASTNode.copySubtree(target, getChildProperty()));
+	 * result.setSimpleProperty(isSimpleProperty());
+	 * result.childrenProperty().addAll(
+	 *         ASTNode.copySubtrees(target, childrenProperty()));
+	 * return result;
+	 * </code>
+	 * </pre>
+	 * </p>
+	 * <p>
 	 * This method does not report pre- and post-clone events.
 	 * All callers should instead call <code>clone(AST)</code>
 	 * to ensure that pre- and post-clone events are reported.
@@ -2647,8 +2847,8 @@
 		}
 		// begin with the generic pre-visit
 		if (visitor.preVisit2(this)) {
-		// dynamic dispatch to internal method for type-specific visit/endVisit
-		accept0(visitor);
+			// dynamic dispatch to internal method for type-specific visit/endVisit
+			accept0(visitor);
 		}
 		// end with the generic post-visit
 		visitor.postVisit(this);
@@ -2665,7 +2865,7 @@
 	 * if (visitChildren) {
 	 *    // visit children in normal left to right reading order
 	 *    acceptChild(visitor, getProperty1());
-	 *    acceptChildren(visitor, rawListProperty);
+	 *    acceptChildren(visitor, this.rawListProperty);
 	 *    acceptChild(visitor, getProperty2());
 	 * }
 	 * visitor.endVisit(this);
@@ -2715,16 +2915,14 @@
 	final void acceptChildren(ASTVisitor visitor, ASTNode.NodeList children) {
 		// use a cursor to keep track of where we are up to
 		// (the list may be changing under foot)
-		if(children != null) {
-			NodeList.Cursor cursor = children.newCursor();
-			try {
-				while (cursor.hasNext()) {
-					ASTNode child = (ASTNode) cursor.next();
-					child.accept(visitor);
-				}
-			} finally {
-				children.releaseCursor(cursor);
+		NodeList.Cursor cursor = children.newCursor();
+		try {
+			while (cursor.hasNext()) {
+				ASTNode child = (ASTNode) cursor.next();
+				child.accept(visitor);
 			}
+		} finally {
+			children.releaseCursor(cursor);
 		}
 	}
 
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
index 8da201d..c0a7afc 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -224,7 +228,8 @@
 		switch(level) {
 			case AST.JLS2_INTERNAL:
 			case AST.JLS3_INTERNAL:
-			case AST.JLS4:
+			case AST.JLS4_INTERNAL:
+			case AST.JLS8:
 				break;
 			default:
 				throw new IllegalArgumentException();
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
index 77aa9a2..53c34f7 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTVisitor.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -201,7 +205,6 @@
 		return true;
 	}
 
-
 	/**
 	 * Visits the given type-specific AST node.
 	 * <p>
@@ -534,6 +537,40 @@
 	 * Visits the given type-specific AST node.
 	 * <p>
 	 * The default implementation does nothing and return true.
+	 * Subclasses may re-implement.
+	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(CreationReference node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
+	 * Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(Dimension node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
 	 * Subclasses may reimplement.
 	 * </p>
 	 *
@@ -617,6 +654,23 @@
 	 * Visits the given type-specific AST node.
 	 * <p>
 	 * The default implementation does nothing and return true.
+	 * Subclasses may re-implement.
+	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(ExpressionMethodReference node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
 	 * Subclasses may reimplement.
 	 * </p>
 	 *
@@ -737,7 +791,7 @@
 	 * visited, and <code>false</code> if the children of this node should
 	 * be skipped
 	 */
-	public boolean visit(InstanceofExpression node) {
+	public boolean visit(Initializer node) {
 		return true;
 	}
 
@@ -753,7 +807,24 @@
 	 * visited, and <code>false</code> if the children of this node should
 	 * be skipped
 	 */
-	public boolean visit(Initializer node) {
+	public boolean visit(InstanceofExpression node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
+	 * Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(IntersectionType node) {
 		return true;
 	}
 
@@ -802,6 +873,23 @@
 	 * The default implementation does nothing and return true.
 	 * Subclasses may reimplement.
 	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(LambdaExpression node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
+	 * Subclasses may reimplement.
+	 * </p>
 	 * <p>Note: {@link LineComment} and {@link BlockComment} nodes are
 	 * not considered part of main structure of the AST. This method will
 	 * only be called if a client goes out of their way to visit this
@@ -1037,6 +1125,23 @@
 	 * @return <code>true</code> if the children of this node should be
 	 * visited, and <code>false</code> if the children of this node should
 	 * be skipped
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(PackageQualifiedType node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
+	 * Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
 	 * @since 3.1
 	 */
 	public boolean visit(ParameterizedType node) {
@@ -1298,6 +1403,23 @@
 	 * @return <code>true</code> if the children of this node should be
 	 * visited, and <code>false</code> if the children of this node should
 	 * be skipped
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(SuperMethodReference node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
+	 * Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
 	 */
 	public boolean visit(SwitchCase node) {
 		return true;
@@ -1478,6 +1600,24 @@
 	 * @return <code>true</code> if the children of this node should be
 	 * visited, and <code>false</code> if the children of this node should
 	 * be skipped
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(TypeMethodReference node) {
+		return true;
+	}
+
+	/**
+	 * Visits the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing and return true.
+	 * Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @return <code>true</code> if the children of this node should be
+	 * visited, and <code>false</code> if the children of this node should
+	 * be skipped
 	 * @since 3.1
 	 */
 	public boolean visit(TypeParameter node) {
@@ -2111,6 +2251,19 @@
 	 * </p>
 	 *
 	 * @param node the node to visit
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(CreationReference node) {
+		// default implementation: do nothing
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
 	 */
 	public void endVisit(DoStatement node) {
 		// default implementation: do nothing
@@ -2174,6 +2327,19 @@
 	 * </p>
 	 *
 	 * @param node the node to visit
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(ExpressionMethodReference node) {
+		// default implementation: do nothing
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
 	 */
 	public void endVisit(ExpressionStatement node) {
 		// default implementation: do nothing
@@ -2186,6 +2352,19 @@
 	 * </p>
 	 *
 	 * @param node the node to visit
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(Dimension node) {
+		// do nothing by default
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
 	 */
 	public void endVisit(FieldAccess node) {
 		// default implementation: do nothing
@@ -2304,6 +2483,19 @@
 	 * <p>
 	 * The default implementation does nothing. Subclasses may reimplement.
 	 * </p>
+	 *
+	 * @param node the node to visit
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(LambdaExpression node) {
+		// default implementation: do nothing
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
 	 * <p>Note: {@link LineComment} and {@link BlockComment} nodes are
 	 * not considered part of main structure of the AST. This method will
 	 * only be called if a client goes out of their way to visit this
@@ -2475,6 +2667,19 @@
 	 * </p>
 	 *
 	 * @param node the node to visit
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(PackageQualifiedType node) {
+		// default implementation: do nothing
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
 	 * @since 3.1
 	 */
 	public void endVisit(ParameterizedType node) {
@@ -2670,6 +2875,19 @@
 	 * </p>
 	 *
 	 * @param node the node to visit
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(SuperMethodReference node) {
+		// default implementation: do nothing
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
 	 */
 	public void endVisit(SwitchCase node) {
 		// default implementation: do nothing
@@ -2803,6 +3021,20 @@
 	 * </p>
 	 *
 	 * @param node the node to visit
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(TypeMethodReference node) {
+		// default implementation: do nothing
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
 	 * @since 3.1
 	 */
 	public void endVisit(TypeParameter node) {
@@ -2829,6 +3061,19 @@
 	 * </p>
 	 *
 	 * @param node the node to visit
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void endVisit(IntersectionType node) {
+		// default implementation: do nothing
+	}
+
+	/**
+	 * End of visit the given type-specific AST node.
+	 * <p>
+	 * The default implementation does nothing. Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param node the node to visit
 	 */
 	public void endVisit(VariableDeclarationExpression node) {
 		// default implementation: do nothing
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java
new file mode 100644
index 0000000..8b2c16d
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/AnnotatableType.java
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.List;
+
+/**
+ * Abstract base class of AST nodes that represent an annotatable type (added in JLS8 API).
+ * <p>
+ * Introduced in JLS8, type references that can be annotated are represented by 
+ * AnnotatableType. For the list of types extending AnnotatableType, see {@link Type}.</p>
+ *
+ * @since 3.9 BETA_JAVA8
+ */
+public abstract class AnnotatableType extends Type {
+	
+	/**
+	 * The annotations (element type: {@link Annotation}).
+	 * Null in JLS < 8. Added in JLS8; defaults to an empty list
+	 * (see constructor).
+	 */
+	ASTNode.NodeList annotations = null;
+
+	/**
+	 * Creates and returns a structural property descriptor for the
+	 * "annotations" property declared on the given concrete node type (element type: {@link Annotation}) (added in JLS8 API).
+	 *
+	 * @return the property descriptor
+	 */
+	static final ChildListPropertyDescriptor internalAnnotationsPropertyFactory(Class nodeClass) {
+		return 	new ChildListPropertyDescriptor(nodeClass, "annotations", Annotation.class, CYCLE_RISK); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns the structural property descriptor for the "annotations" property
+	 * of this node (element type: {@link Annotation}) (added in JLS8 API).
+	 *
+	 * @return the property descriptor
+	 */
+	abstract ChildListPropertyDescriptor internalAnnotationsProperty();
+
+	/**
+	 * Returns the structural property descriptor for the "annotations" property
+	 * of this node (element type: {@link Annotation}) (added in JLS8 API).
+	 *
+	 * @return the property descriptor
+	 */
+	public final ChildListPropertyDescriptor getAnnotationsProperty() {
+		return internalAnnotationsProperty();
+	}
+
+	/**
+	 * Creates a new unparented node for an annotatable type owned by the given AST.
+	 * <p>
+	 * N.B. This constructor is package-private.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	AnnotatableType(AST ast) {
+		super(ast);
+		if (ast.apiLevel >= AST.JLS8) {
+			this.annotations = new ASTNode.NodeList(getAnnotationsProperty());
+		}
+	}
+
+	/**
+	 * Returns the live ordered list of annotations for this Type node (added in JLS8 API).
+	 *
+	 * @return the live list of annotations (element type: {@link Annotation})
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 */
+	public List annotations() {
+		// more efficient than just calling unsupportedIn2_3_4() to check
+		if (this.annotations == null) {
+			unsupportedIn2_3_4();
+		}
+		return this.annotations;
+	}
+}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java
index f9577a5..76127e4 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayCreation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -15,13 +15,14 @@
 
 /**
  * Array creation expression AST node type.
- * For JLS2:
  * <pre>
  * ArrayCreation:
  *    <b>new</b> PrimitiveType <b>[</b> Expression <b>]</b> { <b>[</b> Expression <b>]</b> } { <b>[</b> <b>]</b> }
- *    <b>new</b> TypeName <b>[</b> Expression <b>]</b> { <b>[</b> Expression <b>]</b> } { <b>[</b> <b>]</b> }
+ *    <b>new</b> TypeName [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
+ *        <b>[</b> Expression <b>]</b> { <b>[</b> Expression <b>]</b> } { <b>[</b> <b>]</b> }
  *    <b>new</b> PrimitiveType <b>[</b> <b>]</b> { <b>[</b> <b>]</b> } ArrayInitializer
- *    <b>new</b> TypeName <b>[</b> <b>]</b> { <b>[</b> <b>]</b> } ArrayInitializer
+ *    <b>new</b> TypeName [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
+ *        <b>[</b> <b>]</b> { <b>[</b> <b>]</b> } ArrayInitializer
  * </pre>
  * <p>
  * The mapping from Java language syntax to AST nodes is as follows:
@@ -32,16 +33,6 @@
  *   list.</li>
  * </ul>
  * </p>
- * For JLS3, type arguments are added:
- * <pre>
- * ArrayCreation:
- *    <b>new</b> PrimitiveType <b>[</b> Expression <b>]</b> { <b>[</b> Expression <b>]</b> } { <b>[</b> <b>]</b> }
- *    <b>new</b> TypeName [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
- *        <b>[</b> Expression <b>]</b> { <b>[</b> Expression <b>]</b> } { <b>[</b> <b>]</b> }
- *    <b>new</b> PrimitiveType <b>[</b> <b>]</b> { <b>[</b> <b>]</b> } ArrayInitializer
- *    <b>new</b> TypeName [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
- *        <b>[</b> <b>]</b> { <b>[</b> <b>]</b> } ArrayInitializer
- * </pre>
  *
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java
index 0c7defb..58ddecc 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ArrayType.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -17,13 +21,29 @@
 /**
  * Type node for an array type.
  * <p>
- * Array types are expressed in a recursive manner, one dimension at a time.
+ * In JLS8 and later, array types are represented by a base element type (which cannot
+ * be an array type) and a list of dimensions, each of which may have a list of annotations.
  * </p>
  * <pre>
- * ArrayType:
- *    Type <b>[</b> <b>]</b>
+ * ArrayType: 
+ *    Type Dimension <b>{</b> Dimension <b>}</b>
  * </pre>
+ * 
+ * In JLS4 and before, array types were expressed in a recursive manner, one dimension at a time:
+ * <pre>
+ * ArrayType:
+ *    Type <b>[</b> <b>]</b></pre>
  *
+ * This structure became untenable with the advent of type-use annotations,
+ * because in the language model, the base type binds with array dimensions from right to left,
+ * whereas a recursive structure binds from left to right (inside out).
+ * <p>
+ * Example:<br>
+ * <code><u>int @A[] @B[] @C[]</u></code>
+ * is an <u><code>@A</code></u>-array of<br>
+ * <code><u>int </u>&nbsp;&nbsp;&nbsp;&nbsp;<u> @B[] @C[]</u></code>,
+ * but such a component type is not representable by nested <code>ArrayType</code>s with contiguous source ranges.
+ * 
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
@@ -31,23 +51,51 @@
 
 	/**
 	 * The "componentType" structural property of this node type (child type: {@link Type}).
+	 * @deprecated In the JLS8 API, this property is replaced by {@link #ELEMENT_TYPE_PROPERTY} and {@link #DIMENSIONS_PROPERTY}.
 	 * @since 3.0
 	 */
 	public static final ChildPropertyDescriptor COMPONENT_TYPE_PROPERTY =
 		new ChildPropertyDescriptor(ArrayType.class, "componentType", Type.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
 
 	/**
+	 * The "elementType" structural property of this node type (child type: {@link Type}) (added in JLS8 API).
+	 * Cannot be an array type.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildPropertyDescriptor ELEMENT_TYPE_PROPERTY =
+			new ChildPropertyDescriptor(ArrayType.class, "elementType", Type.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$	
+	
+	/**
+	 * The "dimensions" structural property of this node type (element type: {@link Dimension}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor DIMENSIONS_PROPERTY =
+			new ChildListPropertyDescriptor(ArrayType.class, "dimensions", Dimension.class, CYCLE_RISK); //$NON-NLS-1$	
+	/**
 	 * A list of property descriptors (element type:
 	 * {@link StructuralPropertyDescriptor}),
 	 * or null if uninitialized.
 	 */
 	private static final List PROPERTY_DESCRIPTORS;
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
 
 	static {
-		List properyList = new ArrayList(2);
-		createPropertyList(ArrayType.class, properyList);
-		addProperty(COMPONENT_TYPE_PROPERTY, properyList);
-		PROPERTY_DESCRIPTORS = reapPropertyList(properyList);
+		List propertyList = new ArrayList(2);
+		createPropertyList(ArrayType.class, propertyList);
+		addProperty(COMPONENT_TYPE_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+
+		propertyList = new ArrayList(3);
+		createPropertyList(ArrayType.class, propertyList);
+		addProperty(ELEMENT_TYPE_PROPERTY, propertyList);
+		addProperty(DIMENSIONS_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 	/**
@@ -62,14 +110,31 @@
 	 * @since 3.0
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		return PROPERTY_DESCRIPTORS;
+		switch (apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				return PROPERTY_DESCRIPTORS;
+			default :
+				return PROPERTY_DESCRIPTORS_8_0;
+		}
 	}
 
 	/**
-	 * The component type; lazily initialized; defaults to a simple type with
-	 * an unspecfied, but legal, name.
+	 * The element type (before JLS8: component type); lazily initialized; defaults to a simple type with
+	 * an unspecified, but legal, name.
 	 */
-	private Type componentType = null;
+	private Type type = null;
+
+	/**
+	 * List of dimensions this node has with optional annotations
+	 * (element type: {@link Dimension}).
+	 * Null before JLS8. Added in JLS8; defaults to a list with one element
+	 * (see constructor).
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private ASTNode.NodeList dimensions = null;
 
 	/**
 	 * Creates a new unparented node for an array type owned by the given AST.
@@ -82,6 +147,31 @@
 	 */
 	ArrayType(AST ast) {
 		super(ast);
+		if (ast.apiLevel >= AST.JLS8) {
+			this.dimensions = new ASTNode.NodeList(DIMENSIONS_PROPERTY);
+			// single dimension array is the default
+			this.dimensions().add(this.ast.newDimension());
+		}
+	}
+
+	/**
+	* Creates a new unparented node for an array type owned by the given AST.
+	* <p>
+	* N.B. This constructor is package-private.
+	* </p>
+	*
+	* @param ast the AST that is to own this node
+	* @param dimensions no of dimensions - can be zero
+	*
+	* @since 3.9 BETA_JAVA8
+	*/
+	ArrayType(AST ast, int dimensions) {
+		super(ast);
+		unsupportedIn2_3_4();
+		this.dimensions = new ASTNode.NodeList(DIMENSIONS_PROPERTY);
+		for (int i = 0; i < dimensions; ++i) {
+			this.dimensions().add(this.ast.newDimension());
+		}
 	}
 
 	/* (omit javadoc for this method)
@@ -94,6 +184,17 @@
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == DIMENSIONS_PROPERTY) {
+			return dimensions();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+	
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
 	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
 		if (property == COMPONENT_TYPE_PROPERTY) {
 			if (get) {
@@ -102,6 +203,13 @@
 				setComponentType((Type) child);
 				return null;
 			}
+		} else if (property == ELEMENT_TYPE_PROPERTY) {
+			if (get) {
+				return getElementType();
+			} else {
+				setElementType((Type) child);
+				return null;
+			}
 		}
 		// allow default implementation to flag the error
 		return super.internalGetSetChildProperty(property, get, child);
@@ -118,9 +226,17 @@
 	 * Method declared on ASTNode.
 	 */
 	ASTNode clone0(AST target) {
-		ArrayType result = new ArrayType(target);
+		ArrayType result;
+		if (this.ast.apiLevel < AST.JLS8) {
+			result = new ArrayType(target);
+			result.setComponentType((Type) getComponentType().clone(target));			
+		} else {
+			result = new ArrayType(target, 0);
+			result.setElementType((Type) getElementType().clone(target));
+			result.dimensions().addAll(
+					ASTNode.copySubtrees(target, dimensions()));
+		}
 		result.setSourceRange(getStartPosition(), getLength());
-		result.setComponentType((Type) getComponentType().clone(target));
 		return result;
 	}
 
@@ -138,7 +254,13 @@
 	void accept0(ASTVisitor visitor) {
 		boolean visitChildren = visitor.visit(this);
 		if (visitChildren) {
-			acceptChild(visitor, getComponentType());
+			// visit children in normal left to right reading order
+			if (this.ast.apiLevel < AST.JLS8) {
+				acceptChild(visitor, getComponentType());				
+			} else {
+				acceptChild(visitor, getElementType());
+				acceptChildren(visitor, this.dimensions);
+			}
 		}
 		visitor.endVisit(this);
 	}
@@ -148,19 +270,27 @@
 	 * may be another array type.
 	 *
 	 * @return the component type node
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * an AST later than JLS4
+	 * @deprecated In the JLS8 API, the recursive structure is not valid.
 	 */
 	public Type getComponentType() {
-		if (this.componentType == null) {
+		supportedOnlyIn2_3_4();
+		return internalGetType(COMPONENT_TYPE_PROPERTY);
+	}
+
+	private Type internalGetType(ChildPropertyDescriptor property) {
+		if (this.type == null) {
 			// lazy init must be thread-safe for readers
 			synchronized (this) {
-				if (this.componentType == null) {
+				if (this.type == null) {
 					preLazyInit();
-					this.componentType = new SimpleType(this.ast);
-					postLazyInit(this.componentType, COMPONENT_TYPE_PROPERTY);
+					this.type = new SimpleType(this.ast);
+					postLazyInit(this.type, property);
 				}
 			}
 		}
-		return this.componentType;
+		return this.type;
 	}
 
 	/**
@@ -174,59 +304,115 @@
 	 * <li>the node already has a parent</li>
 	 * <li>a cycle in would be created</li>
 	 * </ul>
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * an AST later than JLS4
+	 * @deprecated In the JLS8 API, the recursive structure is not valid.
 	 */
 	public void setComponentType(Type componentType) {
+		supportedOnlyIn2_3_4();
 		if (componentType == null) {
 			throw new IllegalArgumentException();
 		}
-		ASTNode oldChild = this.componentType;
-		preReplaceChild(oldChild, componentType, COMPONENT_TYPE_PROPERTY);
-		this.componentType = componentType;
-		postReplaceChild(oldChild, componentType, COMPONENT_TYPE_PROPERTY);
+		internalSetType(componentType, COMPONENT_TYPE_PROPERTY);
+	}
+
+	private void internalSetType(Type componentType, ChildPropertyDescriptor property) {
+		ASTNode oldChild = this.type;
+		preReplaceChild(oldChild, componentType, property);
+		this.type = componentType;
+		postReplaceChild(oldChild, componentType, property);
 	}
 
 	/**
 	 * Returns the element type of this array type. The element type is
 	 * never an array type.
 	 * <p>
-	 * This is a convenience method that descends a chain of nested array types
+	 * In JLS4 and earlier, this is a convenience method that descends a chain of nested array types
 	 * until it reaches a non-array type.
 	 * </p>
 	 *
-	 * @return the component type node
+	 * @return the element type node
 	 */
 	public Type getElementType() {
-		Type t = getComponentType();
-		while (t.isArrayType()) {
-			t = ((ArrayType) t).getComponentType();
+		if (this.ast.apiLevel() < AST.JLS8) {
+			Type t = getComponentType();
+			while (t.isArrayType()) {
+				t = ((ArrayType) t).getComponentType();
+			}
+			return t;
 		}
-		return t;
+		return internalGetType(ELEMENT_TYPE_PROPERTY);
+	}
+
+	/**
+	 * Sets the element type of the array.
+	 *
+	 * @param type the new type
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * <li>the node is an array type</li>
+	 * </ul>
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void setElementType(Type type) {
+		unsupportedIn2_3_4();
+		if (type == null || type instanceof ArrayType) {
+			throw new IllegalArgumentException();
+		}
+		internalSetType(type, ELEMENT_TYPE_PROPERTY);
 	}
 
 	/**
 	 * Returns the number of dimensions in this array type.
 	 * <p>
-	 * This is a convenience method that descends a chain of nested array types
+	 * In JLS8 and later, this is a convenience method that returns <code>dimensions().size()</code>.
+	 * </p>
+	 * <p>
+	 * In JLS4 and earlier, this is a convenience method that descends a chain of nested array types
 	 * until it reaches a non-array type.
 	 * </p>
 	 *
 	 * @return the number of dimensions (always positive)
 	 */
 	public int getDimensions() {
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			return dimensions().size();
+		}
 		Type t = getComponentType();
-		int dimensions = 1; // always include this array type
+		int dimension = 1; // always include this array type
 		while (t.isArrayType()) {
-			dimensions++;
+			dimension++;
 			t = ((ArrayType) t).getComponentType();
 		}
-		return dimensions;
+		return dimension;			
+	}
+
+	/**
+	 * Returns the live ordered list of dimensions with optional annotations (added in JLS8 API).
+	 * <p>
+	 * For the array type to be plausible, the list should contain at least one element.
+	 * </p>
+	 * 
+	 * @return the live list of dimensions with optional annotations (element type: {@link Dimension})
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public List dimensions() {
+		// more efficient than just calling unsupportedIn2_3_4() to check
+		if (this.dimensions == null) {
+			unsupportedIn2_3_4();
+		}
+		return this.dimensions;
 	}
 
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	int memSize() {
-		return BASE_NODE_SIZE + 1 * 4;
+		return BASE_NODE_SIZE + 2 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -235,7 +421,8 @@
 	int treeSize() {
 		return
 			memSize()
-			+ (this.componentType == null ? 0 : getComponentType().treeSize());
+			+ (this.type == null ? 0 : (this.ast.apiLevel() < AST.JLS8 ? getComponentType().treeSize() : getElementType().treeSize())
+			+ (this.dimensions == null ? 0 : this.dimensions.listSize()));
 	}
 }
 
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java
index ed3a8aa..0e2aa36 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingComparator.java
@@ -203,7 +203,7 @@
 		return true;
 	}
 	static boolean isEqual(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding, org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding2, HashSet visitedTypes) {
-		if (typeBinding == typeBinding2)
+		if (org.eclipse.jdt.internal.compiler.lookup.TypeBinding.equalsEquals(typeBinding, typeBinding2))
 			return true;
 		if (typeBinding == null || typeBinding2 == null)
 			return false;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java
index 4109818..085fe73 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BindingResolver.java
@@ -1,11 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: BindingResolver.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -585,6 +588,49 @@
 	}
 
 	/**
+	 * Resolves the given  method reference and returns the binding for it.
+	 * <p>
+	 * The implementation of <code>MethodReference.resolveMethodBinding</code>
+	 * forwards to this method. How the method resolves is often a function of
+	 * the context in which the method reference node is embedded as well as
+	 * the method reference subtree itself.
+	 * </p>
+	 * <p>
+	 * The default implementation of this method returns <code>null</code>.
+	 * Subclasses may reimplement.
+	 * </p>
+	 *
+	 * @param methodReference the  method reference of interest
+	 * @return the binding for the given  method reference, or
+	 *    <code>null</code> if no binding is available
+	 * @since 3.9 BETA_JAVA8
+	 */
+	IMethodBinding resolveMethod(MethodReference methodReference) {
+		return null;
+	}
+
+	/**
+	 * Resolves the given Lambda Expression and returns the binding for it.
+	 * <p>
+	 * The implementation of <code>LambdaExpression.resolveMethodBinding</code>
+	 * forwards to this method. How the method resolves is often a function of
+	 * the context in which the method declaration node is embedded as well as
+	 * the method declaration subtree itself.
+	 * </p>
+	 * <p>
+	 * The default implementation of this method returns <code>null</code>.
+	 * Subclasses may re-implement.
+	 * </p>
+	 *
+	 * @param lambda LambdaExpression of interest
+	 * @return the binding for the given lambda expression, or
+	 *    <code>null</code> if no binding is available
+	 */
+	IMethodBinding resolveMethod(LambdaExpression lambda) {
+		return null;
+	}
+
+	/**
 	 * Resolves the given method invocation and returns the binding for it.
 	 * <p>
 	 * The implementation of <code>MethodInvocation.resolveMethodBinding</code>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java
index 9949f8b..a1951e2 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/BodyDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -20,29 +20,17 @@
  * including anonymous class declarations, enumeration declarations, and
  * enumeration constant declarations.
  * <p>
- * For JLS2:
  * <pre>
  * BodyDeclaration:
- *		ClassDeclaration
- *		InterfaceDeclaration
- *		MethodDeclaration
- * 		ConstructorDeclaration
- * 		FieldDeclaration
- * 		Initializer
- * </pre>
- * For JLS3, a number of new node types were introduced:
- * <pre>
- * BodyDeclaration:
- *		ClassDeclaration
- *		InterfaceDeclaration
- *		EnumDeclaration
- *		MethodDeclaration
- * 		ConstructorDeclaration
- * 		FieldDeclaration
- * 		Initializer
- *		EnumConstantDeclaration
- *		AnnotationTypeDeclaration
- *		AnnotationTypeMemberDeclaration
+ * 		{@link AbstractTypeDeclaration}
+ * 			{@link AnnotationTypeDeclaration}
+ * 			{@link EnumDeclaration}
+ * 			{@link TypeDeclaration} (for classes and interfaces)
+ *		{@link AnnotationTypeMemberDeclaration}
+ *		{@link EnumConstantDeclaration}
+ * 		{@link FieldDeclaration}
+ * 		{@link Initializer}
+ *		{@link MethodDeclaration} (for methods and constructors)
  * </pre>
  * </p>
  * <p>
@@ -83,6 +71,7 @@
 	 * of this node as used in JLS2 (type: {@link Integer}).
 	 *
 	 * @return the property descriptor
+	 * @deprecated In the JLS3 API, this method is replaced by {@link #internalModifiers2Property()}.
 	 */
 	abstract SimplePropertyDescriptor internalModifiersProperty();
 
@@ -140,6 +129,7 @@
 	 * "modifiers" property declared on the given concrete node type (type: {@link Integer}).
 	 *
 	 * @return the property descriptor
+	 * @deprecated In the JLS3 API, this method is replaced by {@link #internalModifiers2PropertyFactory(Class)}.
 	 */
 	static final SimplePropertyDescriptor internalModifiersPropertyFactory(Class nodeClass) {
 		return new SimplePropertyDescriptor(nodeClass, "modifiers", int.class, MANDATORY); //$NON-NLS-1$
@@ -198,10 +188,10 @@
 	 * Returns the modifiers explicitly specified on this declaration.
 	 * <p>
 	 * In the JLS3 API, this method is a convenience method that
-	 * computes these flags from <code>modifiers()</code>.
+	 * computes these flags from {@link #modifiers()}.
 	 * </p>
 	 *
-	 * @return the bit-wise or of <code>Modifier</code> constants
+	 * @return the bit-wise "or" of <code>Modifier</code> constants
 	 * @see Modifier
 	 */
 	public int getModifiers() {
@@ -227,12 +217,12 @@
 	/**
 	 * Sets the modifiers explicitly specified on this declaration (JLS2 API only).
 	 *
-	 * @param modifiers the given modifiers (bit-wise or of <code>Modifier</code> constants)
+	 * @param modifiers the given modifiers (bit-wise "or" of {@link Modifier} constants)
 	 * @exception UnsupportedOperationException if this operation is used in
 	 * an AST later than JLS2
 	 * @see Modifier
 	 * @deprecated In the JLS3 API, this method is replaced by
-	 * {@link #modifiers()} which contains a list of a <code>Modifier</code> nodes.
+	 * {@link #modifiers()}, which contains a list of {@link Modifier} nodes.
 	 */
 	public void setModifiers(int modifiers) {
 		internalSetModifiers(modifiers);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java
index 54e8bb8..f6c6f9d 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ClassInstanceCreation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,16 +16,6 @@
 
 /**
  * Class instance creation expression AST node type.
- * For JLS2:
- * <pre>
- * ClassInstanceCreation:
- *        [ Expression <b>.</b> ] <b>new</b> Name
- *            <b>(</b> [ Expression { <b>,</b> Expression } ] <b>)</b>
- *            [ AnonymousClassDeclaration ]
- * </pre>
- * For JLS3, type arguments are added
- * and the type name is generalized to a type so that parameterized
- * types can be instantiated:
  * <pre>
  * ClassInstanceCreation:
  *        [ Expression <b>.</b> ]
@@ -79,6 +69,7 @@
 	/**
 	 * The "name" structural property of this node type (child type: {@link Name}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #TYPE_PROPERTY}.
 	 */
 	public static final ChildPropertyDescriptor NAME_PROPERTY =
 		new ChildPropertyDescriptor(ClassInstanceCreation.class, "name", Name.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
index cb604e6..3943fc0 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnit.java
@@ -32,15 +32,6 @@
  * The source range for this type of node is ordinarily the entire source file,
  * including leading and trailing whitespace and comments.
  * </p>
- * For JLS2:
- * <pre>
- * CompilationUnit:
- *    [ PackageDeclaration ]
- *        { ImportDeclaration }
- *        { TypeDeclaration | <b>;</b> }
- * </pre>
- * For JLS3, the kinds of type declarations
- * grew to include enum and annotation type declarations:
  * <pre>
  * CompilationUnit:
  *    [ PackageDeclaration ]
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
index 653ffd3..3868e31 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CompilationUnitResolver.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: CompilationUnitResolver.java 23404 2010-02-03 14:10:22Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -328,6 +332,9 @@
 			public boolean proceedOnErrors() {
 				return false; // stop if there are some errors
 			}
+			public boolean ignoreAllErrors() {
+				return false;
+			}
 		};
 	}
 
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java
index 91e6bf1..3263777 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ConstructorInvocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,16 +16,10 @@
 
 /**
  * Alternate constructor invocation statement AST node type.
- * For JLS2:
  * <pre>
  * ConstructorInvocation:
- *		<b>this</b> <b>(</b> [ Expression { <b>,</b> Expression } ] <b>)</b> <b>;</b>
- * </pre>
- * For JLS3, type arguments are added:
- * <pre>
- * ConstructorInvocation:
- *      [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
- *		      <b>this</b> <b>(</b> [ Expression { <b>,</b> Expression } ] <b>)</b> <b>;</b>
+ *    [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
+ *            <b>this</b> <b>(</b> [ Expression { <b>,</b> Expression } ] <b>)</b> <b>;</b>
  * </pre>
  *
  * @since 2.0
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java
new file mode 100644
index 0000000..13602f0
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/CreationReference.java
@@ -0,0 +1,241 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Creation reference expression AST node type (added in JLS8 API).
+ * 
+ * <pre>
+ * CreationReference:
+ *     Type <b>::</b> 
+ *         [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
+ *         <b>new</b>
+ * </pre>
+ *
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class CreationReference extends MethodReference {
+
+	/**
+	 * The "type" structural property of this node type (child type: {@link Type}).
+	 */
+	public static final ChildPropertyDescriptor TYPE_PROPERTY =
+		new ChildPropertyDescriptor(CreationReference.class, "type", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * The "typeArguments" structural property of this node type (element type: {@link Type}) 
+	 */
+	public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY =
+		internalTypeArgumentsFactory(CreationReference.class);
+
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
+	static {
+		List propertyList = new ArrayList(3);
+		createPropertyList(CreationReference.class, propertyList);
+		addProperty(TYPE_PROPERTY, propertyList);
+		addProperty(TYPE_ARGUMENTS_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
+	}
+
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the AST.JLS* constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS_8_0;
+	}
+
+	/**
+	 * The type; lazily initialized; defaults to an unspecified type.
+	 */
+	private Type type = null;
+
+	/**
+	 * Creates a new AST node for an CreationReference declaration owned
+	 * by the given AST.
+	 * <p>
+	 * N.B. This constructor is package-private; all subclasses must be
+	 * declared in the same package; clients are unable to declare
+	 * additional subclasses.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	CreationReference(AST ast) {
+		super(ast);
+		unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on MethodReference.
+	 */
+	final ChildListPropertyDescriptor internalTypeArgumentsProperty() {
+		return TYPE_ARGUMENTS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
+		if (property == TYPE_PROPERTY) {
+			if (get) {
+				return getType();
+			} else {
+				setType((Type) child);
+				return null;
+			}
+		}
+		// allow default implementation to flag the error
+		return super.internalGetSetChildProperty(property, get, child);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == TYPE_ARGUMENTS_PROPERTY) {
+			return typeArguments();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final int getNodeType0() {
+		return CREATION_REFERENCE;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	ASTNode clone0(AST target) {
+		CreationReference result = new CreationReference(target);
+		result.setSourceRange(getStartPosition(), getLength());
+		result.setType((Type) ASTNode.copySubtree(target, getType()));
+		result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChild(visitor, getType());
+			acceptChildren(visitor, this.typeArguments);
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns the type of this creation reference expression.
+	 *
+	 * @return the type node
+	 */
+	public Type getType() {
+		if (this.type == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.type == null) {
+					preLazyInit();
+					this.type = new SimpleType(this.ast);
+					postLazyInit(this.type, TYPE_PROPERTY);
+				}
+			}
+		}
+		return this.type;
+	}
+
+	/**
+	 * Sets the type of this creation reference expression.
+	 *
+	 * @param type the new type node
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setType(Type type) {
+		if (type == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.type;
+		preReplaceChild(oldChild, type, TYPE_PROPERTY);
+		this.type = type;
+		postReplaceChild(oldChild, type, TYPE_PROPERTY);
+	}
+
+	/**
+	 * Returns the live ordered list of type arguments of this creation reference expression.
+	 *
+	 * @return the live list of type arguments
+	 *    (element type: {@link Type})
+	 */
+	public List typeArguments() {
+		return this.typeArguments;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int memSize() {
+		// treat Code as free
+		return BASE_NODE_SIZE + 2 * 4;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int treeSize() {
+		return
+			memSize()
+			+ (this.type == null ? 0 : getType().treeSize())
+			+ (this.typeArguments == null ? 0 : this.typeArguments.listSize());
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java
index ed883d9..1594d42 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultASTVisitor.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -92,6 +92,13 @@
 	public void endVisit(ContinueStatement node) {
 		endVisitNode(node);
 	}
+	public void endVisit(CreationReference node) {
+		endVisitNode(node);
+	}
+	public void endVisit(Dimension node) {
+		endVisitNode(node);
+	}
+
 	public void endVisit(DoStatement node) {
 		endVisitNode(node);
 	}
@@ -107,6 +114,9 @@
 	public void endVisit(EnumDeclaration node) {
 		endVisitNode(node);
 	}
+	public void endVisit(ExpressionMethodReference node) {
+		endVisitNode(node);
+	}
 	public void endVisit(ExpressionStatement node) {
 		endVisitNode(node);
 	}
@@ -134,12 +144,18 @@
 	public void endVisit(InstanceofExpression node) {
 		endVisitNode(node);
 	}
+	public void endVisit(IntersectionType node) {
+		endVisitNode(node);
+	}
 	public void endVisit(Javadoc node) {
 		endVisitNode(node);
 	}
 	public void endVisit(LabeledStatement node) {
 		endVisitNode(node);
 	}
+	public void endVisit(LambdaExpression node) {
+		endVisitNode(node);
+	}
 	public void endVisit(LineComment node) {
 		endVisitNode(node);
 	}
@@ -179,6 +195,9 @@
 	public void endVisit(PackageDeclaration node) {
 		endVisitNode(node);
 	}
+	public void endVisit(PackageQualifiedType node) {
+		endVisitNode(node);
+	}
 	public void endVisit(ParameterizedType node) {
 		endVisitNode(node);
 	}
@@ -227,7 +246,9 @@
 	public void endVisit(SuperMethodInvocation node) {
 		endVisitNode(node);
 	}
-
+	public void endVisit(SuperMethodReference node) {
+		endVisitNode(node);
+	}
 	public void endVisit(SwitchCase node) {
 		endVisitNode(node);
 	}
@@ -262,6 +283,9 @@
 	public void endVisit(TypeLiteral node) {
 		endVisitNode(node);
 	}
+	public void endVisit(TypeMethodReference node) {
+		endVisitNode(node);
+	}
 	public void endVisit(TypeParameter node) {
 		endVisitNode(node);
 	}
@@ -351,6 +375,13 @@
 	public boolean visit(ContinueStatement node) {
 		return visitNode(node);
 	}
+	public boolean visit(CreationReference node) {
+		return visitNode(node);
+	}
+	public boolean visit(Dimension node) {
+		return visitNode(node);
+	}
+
 	public boolean visit(DoStatement node) {
 		return visitNode(node);
 	}
@@ -366,6 +397,9 @@
 	public boolean visit(EnumDeclaration node) {
 		return visitNode(node);
 	}
+	public boolean visit(ExpressionMethodReference node) {
+		return visitNode(node);
+	}
 	public boolean visit(ExpressionStatement node) {
 		return visitNode(node);
 	}
@@ -393,6 +427,9 @@
 	public boolean visit(InstanceofExpression node) {
 		return visitNode(node);
 	}
+	public boolean visit(IntersectionType node) {
+		return visitNode(node);
+	}
 	public boolean visit(Javadoc node) {
 		//	do not visit Javadoc tags by default. Use constructor with boolean to enable.
 		if (super.visit(node)) {
@@ -403,6 +440,9 @@
 	public boolean visit(LabeledStatement node) {
 		return visitNode(node);
 	}
+	public boolean visit(LambdaExpression node) {
+		return visitNode(node);
+	}
 	public boolean visit(LineComment node) {
 		return visitNode(node);
 	}
@@ -442,6 +482,9 @@
 	public boolean visit(PackageDeclaration node) {
 		return visitNode(node);
 	}
+	public boolean visit(PackageQualifiedType node) {
+		return visitNode(node);
+	}
 	public boolean visit(ParameterizedType node) {
 		return visitNode(node);
 	}
@@ -496,6 +539,10 @@
 		return visitNode(node);
 	}
 
+	public boolean visit(SuperMethodReference node) {
+		return visitNode(node);
+	}
+
 	public boolean visit(SwitchCase node) {
 		return visitNode(node);
 	}
@@ -540,6 +587,10 @@
 		return visitNode(node);
 	}
 
+	public boolean visit(TypeMethodReference node) {
+		return visitNode(node);
+	}
+
 	public boolean visit(TypeParameter node) {
 		return visitNode(node);
 	}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
index 7542cac..88abbed 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java
@@ -4,8 +4,11 @@
  * 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
- * $Id: DefaultBindingResolver.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for Bug 342671 - ClassCastException: org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.ArrayBinding
@@ -26,10 +29,10 @@
 import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall;
 import org.eclipse.jdt.internal.compiler.ast.FieldReference;
-import org.eclipse.jdt.internal.compiler.ast.JavadocImplicitTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.ImportReference;
 import org.eclipse.jdt.internal.compiler.ast.JavadocAllocationExpression;
 import org.eclipse.jdt.internal.compiler.ast.JavadocFieldReference;
+import org.eclipse.jdt.internal.compiler.ast.JavadocImplicitTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.JavadocMessageSend;
 import org.eclipse.jdt.internal.compiler.ast.JavadocQualifiedTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.JavadocSingleNameReference;
@@ -42,6 +45,7 @@
 import org.eclipse.jdt.internal.compiler.ast.QualifiedNameReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedSuperReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Receiver;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
 import org.eclipse.jdt.internal.compiler.ast.SingleTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.ThisReference;
@@ -152,12 +156,12 @@
 	 * Toggle controlling whether DOM bindings should be created when missing internal compiler bindings..
 	 */
 	boolean isRecoveringBindings;
-
+	
 	/**
 	 * Set to <code>true</code> if initialized from a java project
 	 */
 	boolean fromJavaProject;
-
+	
 	/**
 	 * Constructor for DefaultBindingResolver.
 	 */
@@ -320,11 +324,14 @@
 		this.bindingTables.compilerBindingsToASTBindings.put(packageBinding, binding);
 		return binding;
 	}
-	private int getTypeArguments(ParameterizedQualifiedTypeReference typeReference) {
+	private int getTypeCount(ParameterizedQualifiedTypeReference typeReference) {
 		TypeReference[][] typeArguments = typeReference.typeArguments;
 		int value = 0;
-		for (int i = 0, max = typeArguments.length; i < max; i++) {
-			if ((typeArguments[i] != null) || (value != 0)) {
+		org.eclipse.jdt.internal.compiler.ast.Annotation[][] typeAnnotations = typeReference.annotations;
+		int length = typeReference.tokens.length;	
+		for (int i = 0; i < length; ++i) {
+			if (value != 0 || (typeArguments != null && typeArguments[i] != null) ||
+				(typeAnnotations != null && typeAnnotations[i] != null )) {
 				value++;
 			}
 		}
@@ -735,6 +742,11 @@
 				case ASTNode.TYPE_LITERAL :
 				case ASTNode.INFIX_EXPRESSION :
 				case ASTNode.INSTANCEOF_EXPRESSION :
+				case ASTNode.LAMBDA_EXPRESSION:
+				case ASTNode.CREATION_REFERENCE:
+				case ASTNode.EXPRESSION_METHOD_REFERENCE:
+				case ASTNode.TYPE_METHOD_REFERENCE:
+				case ASTNode.SUPER_METHOD_REFERENCE :
 				case ASTNode.FIELD_ACCESS :
 				case ASTNode.SUPER_FIELD_ACCESS :
 				case ASTNode.ARRAY_ACCESS :
@@ -910,6 +922,26 @@
 	/*
 	 * Method declared on BindingResolver.
 	 */
+	synchronized IMethodBinding resolveMethod(LambdaExpression lambda) {
+		Object oldNode = this.newAstToOldAst.get(lambda);
+		if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.LambdaExpression) {
+			org.eclipse.jdt.internal.compiler.ast.LambdaExpression lambdaExpression = (org.eclipse.jdt.internal.compiler.ast.LambdaExpression) oldNode;
+			IMethodBinding methodBinding = getMethodBinding(lambdaExpression.getMethodBinding());
+			if (methodBinding == null) {
+				return null;
+			}
+			this.bindingsToAstNodes.put(methodBinding, lambda);
+			String key = methodBinding.getKey();
+			if (key != null) {
+				this.bindingTables.bindingKeysToBindings.put(key, methodBinding);
+			}
+			return methodBinding;
+		}
+		return null;
+	}
+	/*
+	 * Method declared on BindingResolver.
+	 */
 	synchronized IMethodBinding resolveMethod(MethodDeclaration method) {
 		Object oldNode = this.newAstToOldAst.get(method);
 		if (oldNode instanceof AbstractMethodDeclaration) {
@@ -927,7 +959,7 @@
 		}
 		return null;
 	}
-	/*
+/*
 	 * Method declared on BindingResolver.
 	 */
 	synchronized IMethodBinding resolveMethod(MethodInvocation method) {
@@ -941,6 +973,26 @@
 	/*
 	 * Method declared on BindingResolver.
 	 */
+	synchronized IMethodBinding resolveMethod(MethodReference methodReference) {
+		Object oldNode = this.newAstToOldAst.get(methodReference);
+		if (oldNode instanceof org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) {
+			org.eclipse.jdt.internal.compiler.ast.ReferenceExpression referenceExpression = (org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) oldNode;
+			IMethodBinding methodBinding = getMethodBinding(referenceExpression.getMethodBinding());
+			if (methodBinding == null) {
+				return null;
+			}
+			this.bindingsToAstNodes.put(methodBinding, methodReference);
+			String key = methodBinding.getKey();
+			if (key != null) {
+				this.bindingTables.bindingKeysToBindings.put(key, methodBinding);
+			}
+			return methodBinding;
+		}
+		return null;
+	}
+	/*
+	 * Method declared on BindingResolver.
+	 */
 	synchronized IMethodBinding resolveMethod(SuperMethodInvocation method) {
 		Object oldNode = this.newAstToOldAst.get(method);
 		if (oldNode instanceof MessageSend) {
@@ -1261,6 +1313,11 @@
 			IMethodBinding method = getMethodBinding(memberValuePair.binding);
 			if (method == null) return null;
 			return method.getReturnType();
+		} else if (node instanceof org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) {
+			org.eclipse.jdt.internal.compiler.ast.ReferenceExpression referenceExpression = (org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) node;
+			IMethodBinding method = getMethodBinding(referenceExpression.getMethodBinding());
+			if (method == null) return null;
+			return method.getReturnType();
 //{ObjectTeams: Resolve bindings for OT-specific elements
 		} else if (node instanceof MethodSpec) {
 			if (node instanceof FieldAccessSpec) {
@@ -1279,7 +1336,6 @@
 			return getTypeBinding(liftingTypeRef.resolvedType);
 // SH}
 		}
-		
 		return null;
 	}
 
@@ -1549,6 +1605,9 @@
 		} else if (node instanceof org.eclipse.jdt.internal.compiler.ast.MemberValuePair) {
 			org.eclipse.jdt.internal.compiler.ast.MemberValuePair memberValuePair = (org.eclipse.jdt.internal.compiler.ast.MemberValuePair) node;
 			return getMethodBinding(memberValuePair.binding);
+		} else if (node instanceof org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) {
+			org.eclipse.jdt.internal.compiler.ast.ReferenceExpression referenceExpression = (org.eclipse.jdt.internal.compiler.ast.ReferenceExpression) node;
+			return getMethodBinding(referenceExpression.getMethodBinding());
 		}
 //{ObjectTeams: Resolve bindings for OT-specific elements
 		else if (node instanceof MethodSpec)
@@ -1727,6 +1786,9 @@
 		org.eclipse.jdt.internal.compiler.ast.ASTNode node = (org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(type);
 		org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding = null;
 		if (node != null) {
+			if (node instanceof Receiver) {
+				node = ((Receiver) node).type;
+			}
 			if (node instanceof ParameterizedQualifiedTypeReference) {
  				ParameterizedQualifiedTypeReference typeReference = (ParameterizedQualifiedTypeReference) node;
 				org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding = typeReference.resolvedType;
@@ -1738,7 +1800,11 @@
 					}
 					ArrayType arrayType = (ArrayType) type;
 					ArrayBinding arrayBinding = (ArrayBinding) typeBinding;
-					return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, arrayType.getDimensions()));
+					int dimensions = arrayType.getDimensions();
+					boolean isVarargs = typeReference.isVarargs();
+					if (dimensions == arrayBinding.dimensions)
+						return getTypeBinding(arrayBinding); // reuse.
+					return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, dimensions, getTypeAnnotations(dimensions, arrayBinding, isVarargs)));
 				}
 				if (typeBinding.isArrayType()) {
 					// 'typeBinding' can still be an array type because 'node' may be "larger" than 'type' (see comment of newAstToOldAst).
@@ -1752,7 +1818,7 @@
 				} else {
 					index = 1;
 				}
-				final int numberOfTypeArgumentsNotNull = getTypeArguments(typeReference);
+				final int numberOfTypeArgumentsNotNull = getTypeCount(typeReference);
 				if (index != numberOfTypeArgumentsNotNull) {
 					int  i = numberOfTypeArgumentsNotNull;
 					while (i != index) {
@@ -1764,6 +1830,13 @@
 					binding = typeBinding;
 				}
 			} else if (node instanceof TypeReference) {
+				if (type instanceof SimpleType && node instanceof QualifiedTypeReference) {
+					return resolveTypeBindingForName(((SimpleType)type).getName());
+				} else if (type instanceof QualifiedType) {
+					return resolveTypeBindingForName(((QualifiedType)type).getName());
+				} else if (type instanceof PackageQualifiedType){
+					return resolveTypeBindingForName(((PackageQualifiedType)type).getName());
+				}
 				TypeReference typeReference = (TypeReference) node;
 				binding = typeReference.resolvedType;
 			} else if (node instanceof SingleNameReference && ((SingleNameReference)node).isTypeReference()) {
@@ -1780,7 +1853,11 @@
 						return null;
 					}
 					ArrayBinding arrayBinding = (ArrayBinding) binding;
-					return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, arrayType.getDimensions()));
+					int dimensions = arrayType.getDimensions();
+					boolean isVarargs = node instanceof TypeReference && ((TypeReference) node).isVarargs();
+					if (dimensions == arrayBinding.dimensions)
+						return getTypeBinding(arrayBinding); // reuse
+					return getTypeBinding(this.scope.createArrayType(arrayBinding.leafComponentType, dimensions, getTypeAnnotations(dimensions, arrayBinding, isVarargs)));
 				} else if (binding.isArrayType()) {
 					// 'binding' can still be an array type because 'node' may be "larger" than 'type' (see comment of newAstToOldAst).
 					ArrayBinding arrayBinding = (ArrayBinding) binding;
@@ -1799,6 +1876,27 @@
 		return null;
 	}
 
+	private org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] getTypeAnnotations(int dimensions, ArrayBinding arrayBinding, boolean isVarargs) {
+		org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding [] oldies = arrayBinding.getTypeAnnotations();
+		org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] newbies = Binding.NO_ANNOTATIONS;
+		// Skip past extended dimensions encoded ahead of base dimensions. Dimension for variable argument array comes after the base dimensions.
+		int extendedDimensions = arrayBinding.dimensions - dimensions - (isVarargs ? 1 : 0);
+		int i, length;
+		for (i = 0, length = oldies == null ? 0 : oldies.length; i < length && extendedDimensions > 0 ; i++) {
+			if (oldies[i] == null)
+				extendedDimensions--;
+		}
+		int cells = 0;
+		for (int j = i; j < length && dimensions > 0 ; j++) {
+			if (oldies[j] == null)
+				dimensions--;
+			cells ++;
+		}
+		if (cells > 0)
+			System.arraycopy(oldies, i, newbies = new org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[cells], 0, cells);
+		return newbies;
+	}
+
 	/*
 	 * Method declared on BindingResolver.
 	 */
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java
new file mode 100644
index 0000000..eb91189
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Dimension.java
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * AST node for an array dimension (added in JLS8 API).
+ * <p>
+ * A dimension, represented as <b>[]</b>, can have type annotations. The dimension node is used for:
+ * </p>
+ * <ul>
+ * <li>the dimensions of an {@link ArrayType}</li>
+ * <li>extra dimension in the following node types:
+ * {@link SingleVariableDeclaration}, {@link VariableDeclarationFragment}, {@link MethodDeclaration}</li>
+ * </ul>
+ * 
+ * <pre>
+ * Dimension:
+ * 	{ Annotation } <b>[]</b>
+ * </pre>
+ *
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class Dimension extends ASTNode {
+
+	/**
+	 * The "annotations" structural property of this node type (element type: {@link Annotation}).
+	 */
+	public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
+		new ChildListPropertyDescriptor(Dimension.class, "annotations", Annotation.class, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
+	static {
+		List propertyList = new ArrayList(2);
+		createPropertyList(Dimension.class, propertyList);
+		addProperty(ANNOTATIONS_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
+	}
+
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the
+	 * <code>AST.JLS*</code> constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS_8_0;
+	}
+
+	/**
+	 * The list of annotations for this dimension (element type: {@link Annotation}).
+	 * Defaults to an empty list.
+	 */
+	private ASTNode.NodeList annotations = new ASTNode.NodeList(ANNOTATIONS_PROPERTY);
+
+	/**
+	 * Creates a new dimension node (supported only in level JLS8 or above).
+	 * <p>
+	 * N.B. This constructor is package-private.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 * @exception UnsupportedOperationException if this operation is used
+	 *            in a JLS2, JLS3 or JLS4 AST
+	 */
+	Dimension(AST ast) {
+		super(ast);
+		unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == ANNOTATIONS_PROPERTY) {
+			return annotations();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final int getNodeType0() {
+		return DIMENSION;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	ASTNode clone0(AST target) {
+		Dimension result = new Dimension(target);
+		result.annotations().addAll(
+				ASTNode.copySubtrees(target, annotations()));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChildren(visitor, this.annotations);
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns the live ordered list of annotations for this dimension.
+	 *
+	 * @return the live list of annotations (element type: {@link Annotation})
+	 */
+	public List annotations() {
+		return this.annotations;
+	}
+
+	int memSize() {
+		return BASE_NODE_SIZE + 1 * 4;
+	}
+
+	int treeSize() {
+		return
+			memSize()
+			+ this.annotations.listSize();
+	}
+}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
index 5583fb6..1a31546 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DocCommentParser.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 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
@@ -118,22 +118,34 @@
 			Type argType = null;
 			if (node.getNodeType() == ASTNode.PRIMITIVE_TYPE) {
 				argType = (PrimitiveType) node;
-//				if (dim > 0) {
-//					argType = this.ast.newArrayType(argType, dim);
-//					argType.setSourceRange(argStart, ((int) dimPositions[dim-1])-argStart+1);
-//				}
 			} else {
 				Name argTypeName = (Name) node;
 				argType = this.ast.newSimpleType(argTypeName);
 				argType.setSourceRange(argStart, node.getLength());
 			}
 			if (dim > 0 && !isVarargs) {
-				for (int i=0; i<dim; i++) {
-					argType = this.ast.newArrayType(argType);
-					argType.setSourceRange(argStart, ((int) dimPositions[i])-argStart+1);
+				if (this.ast.apiLevel <= AST.JLS4_INTERNAL) {
+					for (int i=0; i<dim; i++) {
+						argType = this.ast.newArrayType(argType);
+						argType.setSourceRange(argStart, ((int) dimPositions[i])-argStart+1);
+					}
+				} else {
+					ArrayType argArrayType = this.ast.newArrayType(argType, 0);
+					argType = argArrayType;
+					argType.setSourceRange(argStart, ((int) dimPositions[dim-1])-argStart+1);
+					for (int i=0; i<dim; i++) {
+						Dimension dimension = this.ast.newDimension();
+						int dimStart = (int) (dimPositions[i] >>> 32);
+						int dimEnd = (int) dimPositions[i];
+						dimension.setSourceRange(dimStart, dimEnd-dimStart+1);
+						argArrayType.dimensions().add(dimension);
+					}
 				}
 			}
 			argument.setType(argType);
+			if (this.ast.apiLevel > AST.JLS8) {
+				argument.setVarargs(isVarargs);
+			}
 			argument.setSourceRange(argStart, argEnd - argStart + 1);
 			return argument;
 		}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java
index 2003d9a..a5b6dab 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Expression.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -27,10 +31,14 @@
  *    {@link CharacterLiteral},
  *    {@link ClassInstanceCreation},
  *    {@link ConditionalExpression},
+ *    {@link CreationReference},
+ *    {@link ExpressionMethodReference},
  *    {@link FieldAccess},
  *    {@link InfixExpression},
  *    {@link InstanceofExpression},
+ *    {@link LambdaExpression},
  *    {@link MethodInvocation},
+ *    {@link MethodReference},
  *    {@link Name},
  *    {@link NullLiteral},
  *    {@link NumberLiteral},
@@ -40,8 +48,10 @@
  *    {@link StringLiteral},
  *    {@link SuperFieldAccess},
  *    {@link SuperMethodInvocation},
+ *    {@link SuperMethodReference},
  *    {@link ThisExpression},
  *    {@link TypeLiteral},
+ *    {@link TypeMethodReference},
  *    {@link VariableDeclarationExpression}
  * </pre>
  * </p>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java
new file mode 100644
index 0000000..b98eba8
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ExpressionMethodReference.java
@@ -0,0 +1,307 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Expression method reference AST node type (added in JLS8 API).
+ * <pre>
+ * ExpressionMethodReference:
+ *     Expression <b>::</b> 
+ *         [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
+ *         Identifier
+ * </pre>
+ *
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class ExpressionMethodReference extends MethodReference {
+
+	/**
+	 * The "expression" structural property of this node type (child type: {@link Expression}).
+	 */
+	public static final ChildPropertyDescriptor EXPRESSION_PROPERTY =
+		new ChildPropertyDescriptor(ExpressionMethodReference.class, "expression", Expression.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * The "typeArguments" structural property of this node type (element type: {@link Type}) 
+	 */
+	public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY =
+		internalTypeArgumentsFactory(ExpressionMethodReference.class);
+
+	/**
+	 * The "name" structural property of this node type (child type: {@link SimpleName}. 
+	 */
+	public static final ChildPropertyDescriptor NAME_PROPERTY =
+		new ChildPropertyDescriptor(ExpressionMethodReference.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
+	static {
+		List propertyList = new ArrayList(4);
+		createPropertyList(ExpressionMethodReference.class, propertyList);
+		addProperty(EXPRESSION_PROPERTY, propertyList);
+		addProperty(TYPE_ARGUMENTS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
+	}
+
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the AST.JLS* constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS_8_0;
+	}
+
+	/**
+	 * The expression; lazily initialized; defaults to an unspecified,
+	 * legal expression.
+	 */
+	private Expression expression = null;
+
+	/**
+	 * The method name; lazily initialized; defaults to an unspecified,
+	 * legal Java method name.
+	 */
+	private SimpleName methodName = null;
+
+	/**
+	 * Creates a new AST node for an ExpressionMethodReference declaration owned
+	 * by the given AST.
+	 * <p>
+	 * N.B. This constructor is package-private; all subclasses must be
+	 * declared in the same package; clients are unable to declare
+	 * additional subclasses.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	ExpressionMethodReference(AST ast) {
+		super(ast);
+		unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on MethodReference.
+	 */
+	final ChildListPropertyDescriptor internalTypeArgumentsProperty() {
+		return TYPE_ARGUMENTS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
+		if (property == NAME_PROPERTY) {
+			if (get) {
+				return getName();
+			} else {
+				setName((SimpleName) child);
+				return null;
+			}
+		}
+		if (property == EXPRESSION_PROPERTY) {
+			if (get) {
+				return getExpression();
+			} else {
+				setExpression((Expression) child);
+				return null;
+			}
+		}
+		// allow default implementation to flag the error
+		return super.internalGetSetChildProperty(property, get, child);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == TYPE_ARGUMENTS_PROPERTY) {
+			return typeArguments();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final int getNodeType0() {
+		return EXPRESSION_METHOD_REFERENCE;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	ASTNode clone0(AST target) {
+		ExpressionMethodReference result = new ExpressionMethodReference(target);
+		result.setSourceRange(getStartPosition(), getLength());
+		result.setExpression(
+			(Expression) ASTNode.copySubtree(target, getExpression()));
+		result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));
+		result.setName((SimpleName) getName().clone(target));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChild(visitor, getExpression());
+			acceptChildren(visitor, this.typeArguments);
+			acceptChild(visitor, getName());
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns the expression of this expression method reference expression
+	 *
+	 * @return the expression node
+	 */
+	public Expression getExpression() {
+		if (this.expression == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.expression == null) {
+					preLazyInit();
+					this.expression = new SimpleName(this.ast);
+					postLazyInit(this.expression, EXPRESSION_PROPERTY);
+				}
+			}
+		}
+		return this.expression;
+	}
+
+	/**
+	 * Sets the expression of this expression method reference.
+	 *
+	 * @param expression the expression node
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * <li>a cycle in would be created</li>
+	 * </ul>
+	 */
+	public void setExpression(Expression expression) {
+		if (expression == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.expression;
+		preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);
+		this.expression = expression;
+		postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY);
+	}
+
+	/**
+	 * Returns the live ordered list of type arguments of this expression method reference
+	 *
+	 * @return the live list of type arguments
+	 *    (element type: {@link Type})
+	 */
+	public List typeArguments() {
+		return this.typeArguments;
+	}
+
+	/**
+	 * Returns the name of the method referenced in this expression.
+	 *
+	 * @return the method name node
+	 */
+	public SimpleName getName() {
+		if (this.methodName == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.methodName == null) {
+					preLazyInit();
+					this.methodName = new SimpleName(this.ast);
+					postLazyInit(this.methodName, NAME_PROPERTY);
+				}
+			}
+		}
+		return this.methodName;
+	}
+
+	/**
+	 * Sets the name of the method referenced in this expression to the
+	 * given name.
+	 *
+	 * @param name the new method name
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setName(SimpleName name) {
+		if (name == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.methodName;
+		preReplaceChild(oldChild, name, NAME_PROPERTY);
+		this.methodName = name;
+		postReplaceChild(oldChild, name, NAME_PROPERTY);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int memSize() {
+		// treat Code as free
+		return BASE_NODE_SIZE + 3 * 4;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int treeSize() {
+		return
+			memSize()
+			+ (this.expression == null ? 0 : getExpression().treeSize())
+			+ (this.typeArguments == null ? 0 : this.typeArguments.listSize())
+			+ (this.methodName == null ? 0 : getName().treeSize());
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldDeclaration.java
index 272bdbc..f36b0b4 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/FieldDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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 @@
 	/**
 	 * The "modifiers" structural property of this node type (type: {@link Integer}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #MODIFIERS2_PROPERTY}.
 	 */
 	public static final SimplePropertyDescriptor MODIFIERS_PROPERTY =
 		internalModifiersPropertyFactory(FieldDeclaration.class);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
index 7ca284a..b30bc25 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IBinding.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: IBinding.java 19895 2009-04-15 13:52:23Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -154,9 +157,13 @@
 	/**
 	 * Returns the modifiers for this binding.
 	 * <p>
-	 * Note that deprecated is not included among the modifiers.
+	 * Note that 'deprecated' is not included among the modifiers.
 	 * Use <code>isDeprecated</code> to find out whether a binding is deprecated.
 	 * </p>
+	 * <p>
+	 * Note that 'default' is not included among the modifiers.
+	 * Default methods are interface methods that are neither abstract nor static.
+	 * </p>
 	 *
 	 * @return the bit-wise or of <code>Modifier</code> constants
 	 * @see Modifier
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
index d69f361..d3be6af 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IMethodBinding.java
@@ -138,7 +138,7 @@
 	 * </p>
 	 * <p>
 	 * Note: The result does not include synthetic parameters introduced by
-	 * inner class emulation.
+	 * inner class emulation. Explicit receiver parameters are also not included.
 	 * </p>
 	 *
 	 * @return a (possibly empty) list of type bindings for the formal
@@ -147,6 +147,17 @@
 	public ITypeBinding[] getParameterTypes();
 
 	/**
+	 * Returns the type of this method's receiver or <code>null</code> 
+	 * if there is no receiver declared explicitly.
+	 * 
+	 * @return the type of this method's receiver or <code>null</code> 
+	 * if there is no receiver declared explicitly.
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public ITypeBinding getDeclaredReceiverType();
+	
+	/**
 	 * Returns the binding for the return type of this method. Returns the
 	 * special primitive <code>void</code> return type for constructors.
 	 *
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
index 47daea3..88bda36 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ITypeBinding.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -13,7 +17,6 @@
 
 package org.eclipse.jdt.core.dom;
 
-
 /**
  * <h4>OTDT changes:</h4>
  * <dl>
@@ -97,7 +100,7 @@
 	 * @since 3.1
 	 */
 	public ITypeBinding getBound();
-
+	
 	/**
 	 * Returns the generic type associated with this wildcard type, if it has one.
 	 * Returns <code>null</code> if this is not a wildcard type.
@@ -118,7 +121,7 @@
 	 * @since 3.5
 	 */
 	public int getRank();
-
+	
 	/**
 	 * Returns the binding representing the component type of this array type,
 	 * or <code>null</code> if this is not an array type binding. The component
@@ -275,6 +278,17 @@
 	public ITypeBinding getElementType();
 
 	/**
+	 * Returns the binding representing the enclosing type of this type,
+	 * or <code>null</code> if the receiver is an array type binding or a top level
+	 * type or a primitive type.
+	 *
+	 * @return the enclosing type binding, or <code>null</code> if this is
+	 *   an array type, or a primitive type or a top level type.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public ITypeBinding getEnclosingType();
+
+	/**
 	 * Returns the erasure of this type binding.
 	 * <ul>
 	 * <li>For parameterized types ({@link #isParameterizedType()})
@@ -747,6 +761,15 @@
 	public boolean isGenericType();
 
 	/**
+	 * Returns whether this type binding represents a functional interface type.
+	 *
+	 * @return <code>true</code> if this object represents a functional interface,
+	 *    and <code>false</code> otherwise
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean isFunctionalInterface();
+
+	/**
 	 * Returns whether this type binding represents an interface type.
 	 * <p>
 	 * Note that an interface can also be an annotation type.
@@ -1030,6 +1053,24 @@
 	 */
 	public boolean isWildcardType();
 
+	/**
+	 * Returns the annotations that this type reference is annotated with. Since JLS8, 
+	 * multiple instances of type bindings may be created if they are annotated with 
+	 * different type use annotations.
+	 * <p>
+	 * For example, the following two type references would produce two distinct type 
+	 * bindings for java.lang.String.
+	 * <ul>
+	 * <li>java.lang.@Marker1 String</li>
+	 * <li>java.lang.@Marker2 String</li>
+	 * </ul>
+	 * </p>
+	 * @return type annotations specified on this type reference, or an empty array if
+	 * no type use annotations are found.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public IAnnotationBinding[] getTypeAnnotations();
+	
 //{ObjectTeams:	new queries
 	/**
 	 * Returns whether this type binding represents a dependent type.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ImportDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ImportDeclaration.java
index 36f7f57..e22d294 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ImportDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ImportDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -18,12 +18,6 @@
 /**
  * Import declaration AST node type.
  *
- * For JLS2:
- * <pre>
- * ImportDeclaration:
- *    <b>import</b> Name [ <b>.</b> <b>*</b> ] <b>;</b>
- * </pre>
- * For JLS3, static was added:
  * <pre>
  * ImportDeclaration:
  *    <b>import</b> [ <b>static</b> ] Name [ <b>.</b> <b>*</b> ] <b>;</b>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Initializer.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Initializer.java
index 1616842..f1f8874 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Initializer.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Initializer.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -36,6 +36,7 @@
 	/**
 	 * The "modifiers" structural property of this node type (type: {@link Integer}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #MODIFIERS2_PROPERTY}.
 	 */
 	public static final SimplePropertyDescriptor MODIFIERS_PROPERTY =
 		internalModifiersPropertyFactory(Initializer.class);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java
new file mode 100644
index 0000000..df210fd
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/IntersectionType.java
@@ -0,0 +1,173 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Type node for an intersection type in a cast expression (added in JLS8 API).
+ * <pre>
+ * IntersectionType:
+ *    Type <b>&</b> Type { <b>&</b> Type }
+ * </pre>
+ * <p>
+ * This kind of node is used only inside a cast expression.
+ * </p>
+ *
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class IntersectionType extends Type {
+
+	/**
+	 * The "types" structural property of this node type (element type: {@link Type}).
+	 */
+	public static final ChildListPropertyDescriptor TYPES_PROPERTY =
+		new ChildListPropertyDescriptor(IntersectionType.class, "types", Type.class, CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
+	static {
+		List propertyList = new ArrayList(2);
+		createPropertyList(IntersectionType.class, propertyList);
+		addProperty(TYPES_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
+	}
+
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the
+	 * <code>AST.JLS*</code> constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS_8_0;
+	}
+
+	/**
+	 * The list of types (element type: {@link Type}).  Defaults to an empty list.
+	 */
+	private ASTNode.NodeList types = new ASTNode.NodeList(TYPES_PROPERTY);
+
+	/**
+	 * Creates a new unparented node for an intersection type owned by the given AST.
+	 * By default, it has no types.<p>
+	 * 
+	 * N.B. This constructor is package-private.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	IntersectionType(AST ast) {
+		super(ast);
+		unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == TYPES_PROPERTY) {
+			return types();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final int getNodeType0() {
+		return INTERSECTION_TYPE;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	ASTNode clone0(AST target) {
+		IntersectionType result = new IntersectionType(target);
+		result.setSourceRange(getStartPosition(), getLength());
+		result.types().addAll(
+				ASTNode.copySubtrees(target, types()));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChildren(visitor, this.types);
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns the live ordered list of types in this intersection type.
+	 * Adding and removing nodes from this list affects this node
+	 * dynamically. All nodes in this list must be
+	 * <code>Type</code>s; attempts to add any other
+	 * type of node will trigger an exception.
+	 *
+	 * @return the live list of types in this intersection type (element type: {@link Type})
+	 */
+	public List types() {
+		return this.types;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int memSize() {
+		return BASE_NODE_SIZE + 1 * 4;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int treeSize() {
+		return
+			memSize()
+			+ this.types.listSize();
+	}
+}
+
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java
new file mode 100644
index 0000000..df475cb
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/LambdaExpression.java
@@ -0,0 +1,338 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Lambda expression AST node type (added in JLS8 API).
+ * <pre>
+ * LambdaExpression:
+ *    Identifier <b>-></b> Body
+ *    <b>(</b> [ Identifier { <b>,</b> Identifier } ] <b>)</b> <b>-></b> Body
+ *    <b>(</b> [ FormalParameter { <b>,</b> FormalParameter } ] <b>)</b> <b>-></b> Body
+ * </pre>
+ * 
+ *<p> 
+ * The first two forms use {@link VariableDeclarationFragment} for the parameter or parameters,
+ * while the third form uses {@link SingleVariableDeclaration}.</p>
+ *<p>The Body can be either a {@link Block} or an {@link Expression}.</p>
+ *
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients 
+ */
+public class LambdaExpression extends Expression {
+
+	/**
+	 * The "parentheses" structural property of this node type (type: {@link Boolean}).
+	 * <p>
+	 * Note that parentheses are required unless {@link #parameters()} contains
+	 * just a single {@link VariableDeclarationFragment}.
+	 * ASTRewrite may ignore this property if necessary.
+	 * </p>
+	 */
+	public static final SimplePropertyDescriptor PARENTHESES_PROPERTY =
+		new SimplePropertyDescriptor(LambdaExpression.class, "parentheses", boolean.class, MANDATORY); //$NON-NLS-1$
+
+	/**
+	 * The "parameters" structural property of this node type (element type: {@link VariableDeclaration}).
+	 * <p>
+	 * Note that all elements must be of the same type, either all {@link SingleVariableDeclaration} or all {@link VariableDeclarationFragment}.
+	 * </p>
+	 */
+	public static final ChildListPropertyDescriptor PARAMETERS_PROPERTY =
+		new ChildListPropertyDescriptor(LambdaExpression.class, "parameters", VariableDeclaration.class, CYCLE_RISK); //$NON-NLS-1$
+	
+	/**
+	 * The "body" structural property of this node type (child type: {@link ASTNode},
+	 * must be either a {@link Block} or an {@link Expression}).
+	 */
+	public static final ChildPropertyDescriptor BODY_PROPERTY =
+		new ChildPropertyDescriptor(LambdaExpression.class, "body", ASTNode.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+	
+	static {
+		List propertyList = new ArrayList(4);
+		createPropertyList(LambdaExpression.class, propertyList);
+		addProperty(PARENTHESES_PROPERTY, propertyList);
+		addProperty(PARAMETERS_PROPERTY, propertyList);
+		addProperty(BODY_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
+	}
+	
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the AST.JLS* constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS_8_0;
+	}
+
+	/**
+	 * Indicates whether parentheses are present or not.
+	 * Defaults to <code>true</code>. 
+	 */
+	private boolean hasParentheses = true;
+
+	/**
+	 * The parameter declarations
+	 * (element type: {@link VariableDeclaration}).
+	 * Defaults to an empty list.
+	 */
+	private ASTNode.NodeList parameters =
+		new ASTNode.NodeList(PARAMETERS_PROPERTY);
+
+	/**
+	 * The method body.
+	 * The method body; lazily initialized, defaults to an empty Block.
+	 */
+	private ASTNode body = null;
+
+	/**
+	 * Creates a new AST node for a LambdaExpression declaration owned
+	 * by the given AST.
+	 * <p>
+	 * N.B. This constructor is package-private; all subclasses must be
+	 * declared in the same package; clients are unable to declare
+	 * additional subclasses.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	LambdaExpression(AST ast) {
+		super(ast);
+		unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean internalGetSetBooleanProperty(SimplePropertyDescriptor property, boolean get, boolean value) {
+		if (property == PARENTHESES_PROPERTY) {
+			if (get) {
+				return hasParentheses();
+			} else {
+				setParentheses(value);
+				return false;
+			}
+		}
+		// allow default implementation to flag the error
+		return super.internalGetSetBooleanProperty(property, get, value);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == PARAMETERS_PROPERTY) {
+			return parameters();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+	
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
+		if (property == BODY_PROPERTY) {
+			if (get) {
+				return getBody();
+			} else {
+				setBody( child);
+				return null;
+			}
+		}
+		// allow default implementation to flag the error
+		return super.internalGetSetChildProperty(property, get, child);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final int getNodeType0() {
+		return LAMBDA_EXPRESSION;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	ASTNode clone0(AST target) {
+		LambdaExpression result = new LambdaExpression(target);
+		result.setSourceRange(getStartPosition(), getLength());
+		result.setParentheses(hasParentheses());
+		result.parameters().addAll(ASTNode.copySubtrees(target, parameters()));
+		result.setBody(ASTNode.copySubtree(target, getBody()));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChildren(visitor, this.parameters);
+			acceptChild(visitor, getBody());
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns whether parentheses around the parameters are present or not.
+	 * <p>
+	 * Note that parentheses are required unless {@link #parameters()} contains
+	 * just a single {@link VariableDeclarationFragment}.
+	 * ASTRewrite may ignore this property if necessary.
+	 * </p>
+	 * 
+	 * @return <code>true</code> if this lambda expression has parentheses around
+	 * its parameters and <code>false</code> otherwise
+	 */
+	public boolean hasParentheses() {
+		return this.hasParentheses;
+	}
+
+	/**
+	 * Sets whether this lambda expression has parentheses around its parameters or not.
+	 * <p>
+	 * Note that parentheses are required unless {@link #parameters()} contains
+	 * just a single {@link VariableDeclarationFragment}.
+	 * ASTRewrite may ignore this property if necessary.
+	 * </p>
+	 *
+	 * @param hasParentheses <code>true</code> if this lambda expression has parentheses around its parameters
+	 *  and <code>false</code> otherwise
+	 */
+	public void setParentheses(boolean hasParentheses) {
+		preValueChange(PARENTHESES_PROPERTY);
+		this.hasParentheses = hasParentheses;
+		postValueChange(PARENTHESES_PROPERTY);
+	}
+
+	/**
+	 * Returns the live ordered list of formal parameters of this lambda expression.
+	 * Note that all elements must be of the same type, either
+	 * <ul>
+	 * <li>all {@link SingleVariableDeclaration} (explicit type), or</li>
+	 * <li>all {@link VariableDeclarationFragment} (inferred type).</li>
+	 * </ul>
+	 *
+	 * @return the live list of formal parameters of this lambda expression
+	 *    (element type: {@link VariableDeclaration})
+	 */
+	public List parameters() {
+		return this.parameters;
+	}
+
+	/**
+	 * Returns the body of this lambda expression.
+	 * 
+	 * @return the lambda expression body, which can be either a {@link Block} or an {@link Expression}
+	 */
+	public ASTNode getBody() {
+		if (this.body == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.body == null) {
+					preLazyInit();
+					this.body = new Block(this.ast);
+					postLazyInit(this.body, BODY_PROPERTY);
+				}
+			}
+		}
+		return this.body;
+	}
+
+	/**
+	 * Sets the body of this lambda expression.
+	 *
+	 * @param body a block node or an expression node
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * <li>a cycle in would be created</li>
+	 * <li>body is neither a {@link Block} nor an {@link Expression}</li>
+	 * </ul>
+	 */
+	public void setBody(ASTNode body) {
+		if (!(body instanceof Expression || body instanceof Block)) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.body;
+		preReplaceChild(oldChild, body, BODY_PROPERTY);
+		this.body = body;
+		postReplaceChild(oldChild, body, BODY_PROPERTY);
+	}
+
+	/**
+	 * Resolves and returns the binding for the lambda expression
+	 * <p>
+	 * Note that bindings are generally unavailable unless requested when the
+	 * AST is being built.
+	 * </p>
+	 *
+	 * @return the binding, or <code>null</code> if the binding cannot be
+	 *    resolved
+	 */
+	public IMethodBinding resolveMethodBinding() {
+		return this.ast.getBindingResolver().resolveMethod(this);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int memSize() {
+		return BASE_NODE_SIZE + 3 * 4;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int treeSize() {
+		return
+			memSize()
+			+ this.parameters.listSize()
+			+ (this.body == null ? 0 : getBody().treeSize());
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
index 8c946af..f5bb079 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodBinding.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: MethodBinding.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -39,7 +42,7 @@
 		Modifier.OT_CALLIN |
 // SH}
 		Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | Modifier.SYNCHRONIZED | Modifier.NATIVE |
-		Modifier.STRICTFP;
+		Modifier.STRICTFP | Modifier.DEFAULT;
 	private static final ITypeBinding[] NO_TYPE_BINDINGS = new ITypeBinding[0];
 	private org.eclipse.jdt.internal.compiler.lookup.MethodBinding binding;
 	private BindingResolver resolver;
@@ -218,6 +221,12 @@
 	}
 
 	/**
+	 * @see IMethodBinding#getDeclaredReceiverType()
+	 */
+	public ITypeBinding getDeclaredReceiverType() {
+		return this.resolver.getTypeBinding(this.binding.receiver);
+	}
+	/**
 	 * @see IMethodBinding#getReturnType()
 	 */
 	public ITypeBinding getReturnType() {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
index 1548d20..65c1718 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodDeclaration.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -19,38 +23,27 @@
  * Method declaration AST node type. A method declaration
  * is the union of a method declaration and a constructor declaration.
  *
- * For JLS2:
  * <pre>
  * MethodDeclaration:
- *    [ Javadoc ] { Modifier } ( Type | <b>void</b> ) Identifier <b>(</b>
- *        [ FormalParameter
- * 		     { <b>,</b> FormalParameter } ] <b>)</b> {<b>[</b> <b>]</b> }
- *        [ <b>throws</b> TypeName { <b>,</b> TypeName } ] ( Block | <b>;</b> )
- * ConstructorDeclaration:
- *    [ Javadoc ] { Modifier } Identifier <b>(</b>
- * 		  [ FormalParameter
- * 			 { <b>,</b> FormalParameter } ] <b>)</b>
- *        [<b>throws</b> TypeName { <b>,</b> TypeName } ] Block
- * </pre>
- * For JLS3, type parameters and reified modifiers
- * (and annotations) were added:
- * <pre>
- * MethodDeclaration:
- *    [ Javadoc ] { ExtendedModifier }
- *		  [ <b>&lt;</b> TypeParameter { <b>,</b> TypeParameter } <b>&gt;</b> ]
- *        ( Type | <b>void</b> ) Identifier <b>(</b>
- *        [ FormalParameter
- * 		     { <b>,</b> FormalParameter } ] <b>)</b> {<b>[</b> <b>]</b> }
- *        [ <b>throws</b> TypeName { <b>,</b> TypeName } ] ( Block | <b>;</b> )
- * ConstructorDeclaration:
- *    [ Javadoc ] { ExtendedModifier }
- *		  [ <b>&lt;</b> TypeParameter { <b>,</b> TypeParameter } <b>&gt;</b> ]
+ *    [ Javadoc ] { ExtendedModifier } [ <b>&lt;</b> TypeParameter { <b>,</b> TypeParameter } <b>&gt;</b> ] ( Type | <b>void</b> )
  *        Identifier <b>(</b>
- * 		  [ FormalParameter
- * 			 { <b>,</b> FormalParameter } ] <b>)</b>
- *        [<b>throws</b> TypeName { <b>,</b> TypeName } ] Block
+ *            [ ReceiverParameter <b>,</b> ] [ FormalParameter { <b>,</b> FormalParameter } ]
+ *        <b>)</b> { Dimension }
+ *        [ <b>throws</b> Type { <b>,</b> Type } ]
+ *        ( Block | <b>;</b> )
+ * ConstructorDeclaration:
+ *    [ Javadoc ] { ExtendedModifier } [ <b>&lt;</b> TypeParameter { <b>,</b> TypeParameter } <b>&gt;</b> ]
+ *        Identifier <b>(</b>
+ *            [ ReceiverParameter <b>,</b> ] [ FormalParameter { <b>,</b> FormalParameter } ]
+ *        <b>)</b> { Dimension }
+ *        [ <b>throws</b> Type { <b>,</b> Type } ]
+ *        ( Block | <b>;</b> )
  * </pre>
  * <p>
+ * The ReceiverParameter is represented as: <code>Type [ SimpleName <b>.</b> ] <b>this</b></code><br>
+ * The FormalParameter is represented by a {@link SingleVariableDeclaration}.
+ * </p>
+ * <p>
  * When a Javadoc comment is present, the source
  * range begins with the first character of the "/**" comment delimiter.
  * When there is no Javadoc comment, the source range begins with the first
@@ -61,7 +54,6 @@
  * no modifiers). The source range extends through the last character of the
  * ";" token (if no body), or the last character of the block (if body).
  * </p>
- * <p>The FormalParameter is represented by a {@link SingleVariableDeclaration}.</p>
  *
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
@@ -82,6 +74,7 @@
 	/**
 	 * The "modifiers" structural property of this node type (type: {@link Integer}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #MODIFIERS2_PROPERTY}.
 	 */
 	public static final SimplePropertyDescriptor MODIFIERS_PROPERTY =
 		internalModifiersPropertyFactory(MethodDeclaration.class);
@@ -110,6 +103,7 @@
 	/**
 	 * The "returnType" structural property of this node type (child type: {@link Type}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #RETURN_TYPE2_PROPERTY}.
 	 */
 	public static final ChildPropertyDescriptor RETURN_TYPE_PROPERTY =
 		new ChildPropertyDescriptor(MethodDeclaration.class, "returnType", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
@@ -122,11 +116,20 @@
 		new ChildPropertyDescriptor(MethodDeclaration.class, "returnType2", Type.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
 
 	/**
-	 * The "extraDimensions" structural property of this node type (type: {@link Integer}).
+	 * The "extraDimensions" structural property of this node type (type: {@link Integer}) (below JLS8 only).
+	 *
 	 * @since 3.0
+	 * @deprecated In JLS8 and later, use {@link MethodDeclaration#EXTRA_DIMENSIONS2_PROPERTY} instead.
 	 */
 	public static final SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY =
 		new SimplePropertyDescriptor(MethodDeclaration.class, "extraDimensions", int.class, MANDATORY); //$NON-NLS-1$
+	
+	/**
+	 * The "extraDimensions2" structural property of this node type (element type: {@link Dimension}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor EXTRA_DIMENSIONS2_PROPERTY =
+			new ChildListPropertyDescriptor(MethodDeclaration.class, "extraDimensions2", Dimension.class, NO_CYCLE_RISK); //$NON-NLS-1$
 
 	/**
 	 * The "typeParameters" structural property of this node type (element type: {@link TypeParameter}) (added in JLS3 API).
@@ -143,12 +146,34 @@
 		new ChildListPropertyDescriptor(MethodDeclaration.class, "parameters", SingleVariableDeclaration.class, CYCLE_RISK); //$NON-NLS-1$
 
 	/**
-	 * The "thrownExceptions" structural property of this node type (element type: {@link Name}).
+	 * The "receiverType" structural property of this node type (child type: {@link Type}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildPropertyDescriptor RECEIVER_TYPE_PROPERTY =
+			new ChildPropertyDescriptor(MethodDeclaration.class, "receiverType", Type.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
+	
+	/**
+	 * The "receiverQualifier" structural property of this node type (child type: {@link SimpleName}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildPropertyDescriptor RECEIVER_QUALIFIER_PROPERTY =
+			new ChildPropertyDescriptor(MethodDeclaration.class, "receiverQualifier", SimpleName.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * The "thrownExceptions" structural property of this node type (element type: {@link Name}) (before JLS8 only).
+	 * @deprecated In JLS8 and later, use {@link MethodDeclaration#THROWN_EXCEPTION_TYPES_PROPERTY} instead.
 	 * @since 3.0
 	 */
 	public static final ChildListPropertyDescriptor THROWN_EXCEPTIONS_PROPERTY =
 		new ChildListPropertyDescriptor(MethodDeclaration.class, "thrownExceptions", Name.class, NO_CYCLE_RISK); //$NON-NLS-1$
 
+	/**
+	 * The "thrownExceptionTypes" structural property of this node type (element type: {@link Type}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor THROWN_EXCEPTION_TYPES_PROPERTY =
+		new ChildListPropertyDescriptor(MethodDeclaration.class, "thrownExceptionTypes", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$
+
 //{ObjectTeams: new element:
     /**
      * The "guardPredicate" structural property of this node type.
@@ -181,6 +206,14 @@
 	 */
 	private static final List PROPERTY_DESCRIPTORS_3_0;
 
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
 	static {
 		List propertyList = new ArrayList(10);
 		createPropertyList(MethodDeclaration.class, propertyList);
@@ -198,7 +231,7 @@
 		addProperty(BODY_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS_2_0 = reapPropertyList(propertyList);
 
-		propertyList = new ArrayList(12);
+		propertyList = new ArrayList(11);
 		createPropertyList(MethodDeclaration.class, propertyList);
 		addProperty(JAVADOC_PROPERTY, propertyList);
 		addProperty(MODIFIERS2_PROPERTY, propertyList);
@@ -214,6 +247,25 @@
 // SH}
 		addProperty(BODY_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS_3_0 = reapPropertyList(propertyList);
+
+		propertyList = new ArrayList(13);
+		createPropertyList(MethodDeclaration.class, propertyList);
+		addProperty(JAVADOC_PROPERTY, propertyList);
+		addProperty(MODIFIERS2_PROPERTY, propertyList);
+		addProperty(CONSTRUCTOR_PROPERTY, propertyList);
+		addProperty(TYPE_PARAMETERS_PROPERTY, propertyList);
+		addProperty(RETURN_TYPE2_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		addProperty(RECEIVER_TYPE_PROPERTY, propertyList);
+		addProperty(RECEIVER_QUALIFIER_PROPERTY, propertyList);
+		addProperty(PARAMETERS_PROPERTY, propertyList);
+		addProperty(EXTRA_DIMENSIONS2_PROPERTY, propertyList);
+		addProperty(THROWN_EXCEPTION_TYPES_PROPERTY, propertyList);
+//{ObjectTeams:
+        addProperty(GUARD_PROPERTY, propertyList);
+// SH}
+		addProperty(BODY_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);	
 	}
 
 	/**
@@ -228,8 +280,10 @@
 	public static List propertyDescriptors(int apiLevel) {
 		if (apiLevel == AST.JLS2_INTERNAL) {
 			return PROPERTY_DESCRIPTORS_2_0;
-		} else {
+		} else if (apiLevel < AST.JLS8) {
 			return PROPERTY_DESCRIPTORS_3_0;
+		} else {
+			return PROPERTY_DESCRIPTORS_8_0;
 		}
 	}
 
@@ -246,6 +300,20 @@
 	private SimpleName methodName = null;
 
 	/**
+	 * The explicit receiver type, or <code>null</code> if none.
+	 * Defaults to none.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private Type optionalReceiverType = null;
+	
+	/**
+	 * Qualifying name of the explicit </code>this</code> parameter, or <code>null</code> if none.
+	 * Defaults to none.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private SimpleName optionalReceiverQualifier = null;
+
+	/**
 	 * The parameter declarations
 	 * (element type: {@link SingleVariableDeclaration}).
 	 * Defaults to an empty list.
@@ -255,8 +323,8 @@
 
 	/**
 	 * The return type.
-	 * JLS2 behevior: lazily initialized; defaults to void.
-	 * JLS3 behavior; lazily initialized; defaults to void; null allowed.
+	 * JLS2 behavior: lazily initialized; defaults to void.
+	 * JLS3 and later: lazily initialized; defaults to void; null allowed.
 	 * Note that this field is ignored for constructor declarations.
 	 */
 	private Type returnType = null;
@@ -277,18 +345,39 @@
 
 	/**
 	 * The number of array dimensions that appear after the parameters, rather
-	 * than after the return type itself; defaults to 0.
+	 * than after the return type itself; defaults to 0. Not used in JLS8 and later.
 	 *
 	 * @since 2.1
+	 * @deprecated In JLS8 and later, use {@link #extraDimensions} instead.
 	 */
 	private int extraArrayDimensions = 0;
 
 	/**
-	 * The list of thrown exception names (element type: {@link Name}).
-	 * Defaults to an empty list.
+	 * List of extra dimensions this node has with optional annotations
+	 * (element type: {@link Dimension}).
+	 * Null before JLS8. Added in JLS8; defaults to an empty list
+	 * (see constructor).
+	 * 
+	 * @since 3.9 BETA_JAVA8
 	 */
-	private ASTNode.NodeList thrownExceptions =
-		new ASTNode.NodeList(THROWN_EXCEPTIONS_PROPERTY);
+	private ASTNode.NodeList extraDimensions = null;
+
+	/**
+	 * The list of thrown exception names (element type: {@link Name}).
+	 * Before JLS8: defaults to an empty list (see constructor).
+	 * JLS8 and later: null.
+	 * @deprecated In JLS8 and later, use {@link #thrownExceptionTypes} instead.
+	 */
+	private ASTNode.NodeList thrownExceptions = null;
+
+	/**
+	 * The list of thrown exception Types (element type: {@link Type}).
+	 * Null before JLS8. Added in JLS8; defaults to an empty list
+	 * (see constructor).
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private ASTNode.NodeList thrownExceptionTypes = null;
 
 //{ObjectTeams: new element:
 	GuardPredicateDeclaration optionalGuardPredicate = null;
@@ -319,6 +408,12 @@
 		if (ast.apiLevel >= AST.JLS3_INTERNAL) {
 			this.typeParameters = new ASTNode.NodeList(TYPE_PARAMETERS_PROPERTY);
 		}
+		if (ast.apiLevel < AST.JLS8) {
+			this.thrownExceptions = new ASTNode.NodeList(THROWN_EXCEPTIONS_PROPERTY);
+		} else {
+			this.extraDimensions = new ASTNode.NodeList(EXTRA_DIMENSIONS2_PROPERTY);
+			this.thrownExceptionTypes = new ASTNode.NodeList(THROWN_EXCEPTION_TYPES_PROPERTY);
+		}
 	}
 
 	/* (omit javadoc for this method)
@@ -405,6 +500,22 @@
 				return null;
 			}
 		}
+		if (property == RECEIVER_TYPE_PROPERTY) {
+			if (get) {
+				return getReceiverType();
+			} else {
+				setReceiverType((Type) child);
+				return null;
+			}
+		}
+		if (property == RECEIVER_QUALIFIER_PROPERTY) {
+			if (get) {
+				return getReceiverQualifier();
+			} else {
+				setReceiverQualifier((SimpleName) child);
+				return null;
+			}
+		}
 //{ObjectTeams:
         if (property == GUARD_PROPERTY) {
             if (get) {
@@ -443,6 +554,12 @@
 		if (property == THROWN_EXCEPTIONS_PROPERTY) {
 			return thrownExceptions();
 		}
+		if (property == THROWN_EXCEPTION_TYPES_PROPERTY) {
+			return thrownExceptionTypes();
+		}		
+		if (property == EXTRA_DIMENSIONS2_PROPERTY) {
+			return extraDimensions();
+		}
 		// allow default implementation to flag the error
 		return super.internalGetChildListProperty(property);
 	}
@@ -496,12 +613,23 @@
 					(Type) ASTNode.copySubtree(target, getReturnType2()));
 		}
 		result.setConstructor(isConstructor());
-		result.setExtraDimensions(getExtraDimensions());
 		result.setName((SimpleName) getName().clone(target));
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.setReceiverType((Type) ASTNode.copySubtree(target, getReceiverType()));
+			result.setReceiverQualifier((SimpleName) ASTNode.copySubtree(target, getReceiverQualifier()));
+		}
 		result.parameters().addAll(
 			ASTNode.copySubtrees(target, parameters()));
-		result.thrownExceptions().addAll(
-			ASTNode.copySubtrees(target, thrownExceptions()));
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.extraDimensions().addAll(ASTNode.copySubtrees(target, extraDimensions()));
+		} else {
+			result.setExtraDimensions(getExtraDimensions());
+		}
+		if (this.ast.apiLevel() >= AST.JLS8) {
+			result.thrownExceptionTypes().addAll(ASTNode.copySubtrees(target, thrownExceptionTypes()));
+		} else {
+			result.thrownExceptions().addAll(ASTNode.copySubtrees(target, thrownExceptions()));			
+		}
 //{ObjectTeams:
         result.setGuardPredicate((GuardPredicateDeclaration)ASTNode.copySubtree(target, getGuardPredicate()));
 // SH}
@@ -538,8 +666,17 @@
 			}
 			// n.b. visit return type even for constructors
 			acceptChild(visitor, getName());
+			if (this.ast.apiLevel >= AST.JLS8) {
+				acceptChild(visitor, this.optionalReceiverType);
+				acceptChild(visitor, this.optionalReceiverQualifier);
+			}
 			acceptChildren(visitor, this.parameters);
-			acceptChildren(visitor, this.thrownExceptions);
+			if (this.ast.apiLevel() >= AST.JLS8) {
+				acceptChildren(visitor, this.extraDimensions);
+				acceptChildren(visitor, this.thrownExceptionTypes);				
+			} else {
+				acceptChildren(visitor, this.thrownExceptions);				
+			}
 			acceptChild(visitor, getBody());
 		}
 		visitor.endVisit(this);
@@ -629,6 +766,70 @@
 	}
 
 	/**
+	 * Returns the receiver type explicitly declared in the method or constructor 
+	 * declaration (added in JLS8 API).
+	 *
+	 * If the receiver is not explicitly declared in the method or constructor 
+	 * declaration, <code>null</code> is returned.
+	 *
+	 * @return the receiver type or <code>null</code> if receiver is not declared explicitly
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public Type getReceiverType() {
+		unsupportedIn2_3_4();
+		return this.optionalReceiverType;
+	}
+
+	/**
+	 * Sets or clears the given type as the type of explicit receiver parameter (added in JLS8 API).
+	 * <p>
+	 * A receiver type is only legal in Java code if it appears on an instance method or on a constructor of an inner class.
+	 * </p>
+	 * 
+	 * @param receiverType type of the explicit receiver parameter, or <code>null</code> if there is none
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void setReceiverType(Type receiverType) {
+		unsupportedIn2_3_4();
+		ASTNode oldChild = this.optionalReceiverType;
+		preReplaceChild(oldChild, receiverType, RECEIVER_TYPE_PROPERTY);
+		this.optionalReceiverType = receiverType;
+		postReplaceChild(oldChild, receiverType, RECEIVER_TYPE_PROPERTY);
+	}
+
+	/**
+	 * Returns the qualifying name, if any, for the explicit receiver or <code>null</code> if not used (added in JLS8 API).
+	 * <p>
+	 * A receiver qualifier is only legal in Java code if it appears on a constructor of an inner class.
+	 * </p>
+	 * 
+	 * @returns the qualifying name or <code>null</code> if a qualifier was not specified
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public SimpleName getReceiverQualifier() {
+		unsupportedIn2_3_4();
+		return this.optionalReceiverQualifier;
+	}
+	
+	/**
+	 * Sets the given simple name as the qualifier for the receiver (added in JLS8 API).
+	 * 
+	 * @param receiverQualifier explicit receiver parameter to be added to the method declaration
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public void setReceiverQualifier(SimpleName receiverQualifier) {
+		unsupportedIn2_3_4();
+		ASTNode oldChild = this.optionalReceiverQualifier;
+		preReplaceChild(oldChild, receiverQualifier, RECEIVER_QUALIFIER_PROPERTY);
+		this.optionalReceiverQualifier = receiverQualifier;
+		postReplaceChild(oldChild, receiverQualifier, RECEIVER_QUALIFIER_PROPERTY);
+	}
+	
+	/**
 	 * Returns the live ordered list of method parameter declarations for this
 	 * method declaration.
 	 *
@@ -666,16 +867,51 @@
 
 	/**
 	 * Returns the live ordered list of thrown exception names in this method
-	 * declaration.
+	 * declaration (below JLS8 API only).
 	 *
 	 * @return the live list of exception names
 	 *    (element type: {@link Name})
+	 * @exception UnsupportedOperationException if this operation is used in
+	 *    a JLS8 or later AST
+	 * @deprecated In the JLS8 API, this method is replaced by {@link #thrownExceptionTypes()}.
 	 */
 	public List thrownExceptions() {
+		return internalThrownExceptions();
+	}
+
+	/**
+	 * Internal synonym for deprecated method. Used to avoid
+	 * deprecation warnings.
+	 * @exception UnsupportedOperationException if this operation is used in
+	 *    a JLS8 or later AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	/*package*/	List internalThrownExceptions() {
+		// more efficient than just calling supportedOnlyIn2_3_4() to check
+		if (this.thrownExceptions == null) {
+			supportedOnlyIn2_3_4();
+		}
 		return this.thrownExceptions;
 	}
 
 	/**
+	 * Returns the live ordered list of thrown exception types in this method
+	 * declaration.
+	 *
+	 * @return the live list of exception types
+	 *    (element type: {@link Type})
+	 * @exception UnsupportedOperationException if this operation is used
+	 *            in a JLS2, JLS3 or JLS4 AST    
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public List thrownExceptionTypes()  {
+		if (this.thrownExceptionTypes == null) {
+			unsupportedIn2_3_4();
+		}
+		return this.thrownExceptionTypes;
+	}
+
+	/**
 	 * Returns the return type of the method declared in this method
 	 * declaration, exclusive of any extra array dimensions (JLS2 API only).
 	 * This is one of the few places where the void type is meaningful.
@@ -699,6 +935,8 @@
 	/**
 	 * Internal synonym for deprecated method. Used to avoid
 	 * deprecation warnings.
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * an AST later than JLS2
 	 * @since 3.1
 	 */
 	/*package*/ final Type internalGetReturnType() {
@@ -832,12 +1070,22 @@
 	 * ASTs, even though there are really syntactic variants of the same
 	 * method declaration.
 	 * </p>
+	 * <p>
+	 * In the JLS8 API, this method is a convenience method that
+	 * counts {@link #extraDimensions()}.
+	 * </p>
 	 *
 	 * @return the number of extra array dimensions
 	 * @since 2.1
 	 */
 	public int getExtraDimensions() {
-		return this.extraArrayDimensions;
+		// more efficient than checking getAST().API_LEVEL
+		if (this.extraDimensions == null) {
+			// JLS2,3,4 behavior - bona fide property
+			return this.extraArrayDimensions;
+		} else {
+			return this.extraDimensions.size();
+		}
 	}
 
 	/**
@@ -855,9 +1103,17 @@
 	 * @param dimensions the number of array dimensions
 	 * @exception IllegalArgumentException if the number of dimensions is
 	 *    negative
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * a JLS8 or later AST 
 	 * @since 2.1
+	 * @deprecated In the JLS8 API, this method is replaced by
+	 * {@link #extraDimensions()} which contains a list of {@link Dimension} nodes.
 	 */
 	public void setExtraDimensions(int dimensions) {
+		// more efficient than just calling supportedOnlyIn2_3_4() to check
+		if (this.extraDimensions != null) {
+			supportedOnlyIn2_3_4();
+		}
 		if (dimensions < 0) {
 			throw new IllegalArgumentException();
 		}
@@ -865,6 +1121,22 @@
 		this.extraArrayDimensions = dimensions;
 		postValueChange(EXTRA_DIMENSIONS_PROPERTY);
 	}
+
+	/**
+	 * Returns the live ordered list of extra dimensions with optional annotations (added in JLS8 API).
+	 * 
+	 * @return the live list of extra dimensions with optional annotations (element type: {@link Dimension})
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public List extraDimensions() {
+		// more efficient than just calling unsupportedIn2_3_4() to check
+		if (this.extraDimensions == null) {
+			unsupportedIn2_3_4();
+		}
+		return this.extraDimensions;
+	}
+
 //{ObjectTeams: accessors for new element
     public void setGuardPredicate(GuardPredicateDeclaration predicate) {
         ASTNode oldChild = this.optionalGuardPredicate;
@@ -937,7 +1209,7 @@
 	 * Method declared on ASTNode.
 	 */
 	int memSize() {
-		return super.memSize() + 9 * 4;
+		return super.memSize() + 13 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -950,9 +1222,13 @@
 			+ (this.modifiers == null ? 0 : this.modifiers.listSize())
 			+ (this.typeParameters == null ? 0 : this.typeParameters.listSize())
 			+ (this.methodName == null ? 0 : getName().treeSize())
+			+ (this.optionalReceiverType == null ? 0 : this.optionalReceiverType.treeSize())
+			+ (this.optionalReceiverQualifier == null ? 0 : this.optionalReceiverQualifier.treeSize())
 			+ (this.returnType == null ? 0 : this.returnType.treeSize())
 			+ this.parameters.listSize()
-			+ this.thrownExceptions.listSize()
+			+ (this.ast.apiLevel < AST.JLS8
+					? this.thrownExceptions.listSize()
+					: this.extraDimensions.listSize() + this.thrownExceptionTypes.listSize())
 			+ (this.optionalBody == null ? 0 : getBody().treeSize());
 	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodInvocation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodInvocation.java
index c7ca383..7e6336f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodInvocation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodInvocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -15,13 +15,6 @@
 
 /**
  * Method invocation expression AST node type.
- * For JLS2:
- * <pre>
- * MethodInvocation:
- *     [ Expression <b>.</b> ] Identifier
- *         <b>(</b> [ Expression { <b>,</b> Expression } ] <b>)</b>
- * </pre>
- * For JLS3, type arguments are added:
  * <pre>
  * MethodInvocation:
  *     [ Expression <b>.</b> ]
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodRefParameter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodRefParameter.java
index bbd334c..07e52ac 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodRefParameter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodRefParameter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 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
@@ -17,12 +17,6 @@
 /**
  * AST node for a parameter within a method reference ({@link MethodRef}).
  * These nodes only occur within doc comments ({@link Javadoc}).
- * For JLS2:
- * <pre>
- * MethodRefParameter:
- * 		Type [ Identifier ]
- * </pre>
- * For JLS3, the variable arity indicator was added:
  * <pre>
  * MethodRefParameter:
  * 		Type [ <b>...</b> ] [ Identifier ]
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java
new file mode 100644
index 0000000..b7cfe30
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/MethodReference.java
@@ -0,0 +1,116 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.List;
+
+/**
+ * Abstract base class of all AST node types that represent a method reference
+ * expression (added in JLS8 API).
+ * 
+ * <pre>
+ * MethodReference:
+ *    CreationReference
+ *    ExpressionMethodReference
+ *    SuperMethodReference
+ *    TypeMethodReference
+ * </pre>
+ * <p>
+ * A method reference that is represented by a simple or qualified name,
+ * followed by <code>::</code>, followed by a simple name can be represented
+ * as {@link ExpressionMethodReference} or as {@link TypeMethodReference}. 
+ * The ASTParser currently prefers the first form.
+ * </p>
+ *
+ * @see CreationReference
+ * @see ExpressionMethodReference
+ * @see SuperMethodReference
+ * @see TypeMethodReference
+ * @since 3.9 BETA_JAVA8
+ */
+public abstract class MethodReference extends Expression {
+
+	/**
+	 * The type arguments (element type: {@link Type}).
+	 * Defaults to an empty list (see constructor).
+	 */
+	ASTNode.NodeList typeArguments;
+
+	/**
+	 * Creates and returns a structural property descriptor for the "typeArguments" 
+	 * property declared on the given concrete node type (element type: {@link Type}).
+	 * 
+	 * @return the property descriptor
+	 */
+	static final ChildListPropertyDescriptor internalTypeArgumentsFactory(Class nodeClass) {
+		return new ChildListPropertyDescriptor(nodeClass, "typeArguments", Type.class, NO_CYCLE_RISK); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns the structural property descriptor for the "typeArguments" property
+	 * of this node (element type: {@link Type}).
+	 *
+	 * @return the property descriptor
+	 */
+	abstract ChildListPropertyDescriptor internalTypeArgumentsProperty();
+
+	/**
+	 * Returns the structural property descriptor for the "typeArguments" property
+	 * of this node (element type: {@link Type}).
+	 *
+	 * @return the property descriptor
+	 */
+	public final ChildListPropertyDescriptor getTypeArgumentsProperty() {
+		return internalTypeArgumentsProperty();
+	}
+
+	/**
+	 * Creates a new AST node for a method reference owned by the given AST.
+	 * <p>
+	 * N.B. This constructor is package-private.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	MethodReference(AST ast) {
+		super(ast);
+		this.typeArguments = new ASTNode.NodeList(getTypeArgumentsProperty());
+	}
+
+	/**
+	 * Returns the live ordered list of type arguments of this method reference.
+	 *
+	 * @return the live list of type arguments
+	 *    (element type: {@link Type})
+	 */
+	public List typeArguments() {
+		return this.typeArguments;
+	}
+
+	/**
+	 * Resolves and returns the binding for the method referenced by this
+	 * method reference expression.
+	 * <p>
+	 * Note that bindings are generally unavailable unless requested when the
+	 * AST is being built.
+	 * </p>
+	 *
+	 * @return the method binding, or <code>null</code> if the binding cannot
+	 * be resolved
+	 */
+	public IMethodBinding resolveMethodBinding() {
+		return this.ast.getBindingResolver().resolveMethod(this);
+	}
+}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Modifier.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Modifier.java
index faeffbe..04dfa64 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Modifier.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Modifier.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: Modifier.java 19895 2009-04-15 13:52:23Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -34,12 +38,14 @@
  *    <b>transient</b>
  *    <b>volatile</b>
  *    <b>strictfp</b>
+ *    <b>default</b>
  * </pre>
  * <p>
  * The numeric values of these flags match the ones for class
- * files as described in the Java Virtual Machine Specification.
- * Note that Java model class {@link org.eclipse.jdt.core.Flags} also
- * provides the same constants as this class.
+ * files as described in the Java Virtual Machine Specification
+ * (except for {@link #DEFAULT}). Note that the Java model class
+ * {@link org.eclipse.jdt.core.Flags} also provides the same
+ * constants as this class.
  * </p>
  *
  * @since 2.0
@@ -92,6 +98,16 @@
 		/** "volatile" modifier with flag value {@link Modifier#VOLATILE}. */
 		public static final ModifierKeyword VOLATILE_KEYWORD = new ModifierKeyword("volatile", VOLATILE);//$NON-NLS-1$
 
+		/**
+		 * "default" modifier with flag value {@link Modifier#DEFAULT} (added in JLS8 API).
+		 * <p>
+		 * Note that the value of this modifier is
+		 * internal and is not specified in the Java Virtual Machine Specification.
+		 * </p>
+		 * @since 3.9 BETA_JAVA8
+		 */
+		public static final ModifierKeyword DEFAULT_KEYWORD = new ModifierKeyword("default", DEFAULT);//$NON-NLS-1$
+
 //{ObjectTeams: OT-specific callin modifier keywords
 		public static final ModifierKeyword AFTER_KEYWORD = new ModifierKeyword("after", OT_AFTER_CALLIN);//$NON-NLS-1$
 
@@ -142,8 +158,9 @@
 					GET_KEYWORD,
 					SET_KEYWORD,
 					TEAM_KEYWORD,
-					CALLIN_KEYWORD
+					CALLIN_KEYWORD,
 //gbr}
+					DEFAULT_KEYWORD
 				};
 			for (int i = 0; i < ops.length; i++) {
 				KEYWORDS.put(ops[i].toString(), ops[i]);
@@ -335,6 +352,18 @@
 	public static final int VOLATILE = 0x0040;
 
 	/**
+	 * "default" modifier constant (bit mask) (added in JLS8 API).
+	 * Applicable only to methods in interfaces (but not for annotation methods with a default value).
+	 * <p>
+	 * Note that the value of this flag is internal and is not
+	 * specified in the Java Virtual Machine Specification.
+	 * </p>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final int DEFAULT = 0x10000;
+
+//{ObjectTeams: OT-specific modifier constants
+	/**
 	 * "callin" OT-specific modifier constant (bit mask).
 	 * Applicable to methods only ("callin" modifier).
 	 */
@@ -345,7 +374,7 @@
 	 * Applicable to types and methods.
 	 */
 	public static final int OT_TEAM = 0x8000;  // bit 16
-
+// SH}
 //{ObjectTeams: OT-specific callin modifier constants
 	// Note(SH): please note, that these modifiers differ from all others in this list,
 	//           since they cannot be applied a class, a method, nor a field.
@@ -370,19 +399,19 @@
      * OT-specific modifier constant.
      * Applicable only to CallinMappingDeclaration.
      */
-	public static final int OT_AFTER_CALLIN = 0x10000;  // bit 17
+	public static final int OT_AFTER_CALLIN = 0x20000;  // bit 18
 
     /**
      * OT-specific modifier constant.
      * Applicable only to callout to field (FieldAccessSpec).
      */
-    public static final int OT_GET_CALLOUT = 0x20000;  // bit 18
+    public static final int OT_GET_CALLOUT = 0x40000;  // bit 19
 
     /**
      * OT-specific modifier constant.
      * Applicable only to callout to field (FieldAccessSpec).
      */
-    public static final int OT_SET_CALLOUT = 0x40000;  // bit 19
+    public static final int OT_SET_CALLOUT = 0x80000;  // bit 20
 
 //gbr}
 
@@ -536,6 +565,19 @@
 		return (flags & VOLATILE) != 0;
 	}
 
+	/**
+	 * Returns whether the given flags includes the "default" modifier.
+	 * Applicable only to methods in interfaces.
+	 *
+	 * @param flags the modifier flags
+	 * @return <code>true</code> if the <code>DEFAULT</code> bit is set
+	 * and <code>false</code> otherwise
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static boolean isDefault(int flags) {
+		return (flags & DEFAULT) != 0;
+	}
+
 //{ObjectTeams: OT-specific check methods
 	/**
 	 * Returns whether the given flags contain the "replace" modifier.
@@ -848,6 +890,15 @@
 		return this.modifierKeyword == ModifierKeyword.VOLATILE_KEYWORD;
 	}
 
+	/**
+	 * Answer true if the receiver is the default modifier, false otherwise.
+	 * @return true if the receiver is the default modifier, false otherwise
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean isDefault() {
+		return this.modifierKeyword == ModifierKeyword.DEFAULT_KEYWORD;
+	}
+
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 * @since 3.0
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
index 9654d5f..00a41ea 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/NodeFinder.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -21,7 +21,7 @@
 import org.eclipse.jdt.core.compiler.InvalidInputException;
 
 /**
- * For a given range, finds the covered node and the covering node.
+ * For a given selection range, finds the covered node and the covering node.
  *
  * @since 3.5
  */
@@ -97,22 +97,21 @@
 		}
 	}
 	/**
-	 * Maps a selection to a given ASTNode, where the selection is defined using a start and a length.
+	 * Maps a selection to an ASTNode, where the selection is defined using a start and a length.
 	 * The result node is determined as follows:
 	 * <ul>
-	 *   <li>first the visitor tries to find a node with the exact <code>start</code> and <code>length</code></li>
-	 *   <li>if no such node exists then the node that encloses the range defined by
-	 *       <code>start</code> and <code>length</code> is returned.</li>
-	 *   <li>if the length is zero then also nodes are considered where the node's
-	 *       start or end position matches <code>start</code>.</li>
-	 *   <li>otherwise <code>null</code> is returned.</li>
+	 *   <li>First, tries to find a node whose range is the exactly the given selection.
+	 *       If multiple matching nodes are found, the innermost is returned.</li>
+	 *   <li>If no such node exists, then the last node in a preorder traversal of the AST is returned, where
+	 *       the node range fully contains the selection.
+	 *       If the length is zero, then ties between adjacent nodes are broken by choosing the right side.</li>
 	 * </ul>
 	 *
 	 * @param root the root node from which the search starts
-	 * @param start the given start
-	 * @param length the given length
+	 * @param start the start of the selection
+	 * @param length the length of the selection
 	 *
-	 * @return the found node
+	 * @return the innermost node that exactly matches the selection, or the first node that contains the selection
 	 */
 	public static ASTNode perform(ASTNode root, int start, int length) {
 		NodeFinder finder = new NodeFinder(root, start, length);
@@ -124,10 +123,12 @@
 	}
 
 	/**
-	 * Maps a selection to a given ASTNode, where the selection is defined using a source range.
-	 * It calls <code>perform(root, range.getOffset(), range.getLength())</code>.
-	 *
-	 * @return the result node
+	 * Maps a selection to an ASTNode, where the selection is defined using a source range.
+	 * Calls <code>perform(root, range.getOffset(), range.getLength())</code>.
+	 * 
+	 * @param root the root node from which the search starts
+	 * @param range the selection range
+	 * @return the innermost node that exactly matches the selection, or the first node that contains the selection
 	 * @see #perform(ASTNode, int, int)
 	 */
 	public static ASTNode perform(ASTNode root, ISourceRange range) {
@@ -135,23 +136,18 @@
 	}
 
 	/**
-	 * Maps a selection to a given ASTNode, where the selection is given by a start and a length.
+	 * Maps a selection to an ASTNode, where the selection is given by a start and a length.
 	 * The result node is determined as follows:
 	 * <ul>
-	 *   <li>first the visitor tries to find a node that is covered by <code>start</code> and
-	 *       <code>length</code> where either <code>start</code> and <code>length</code> exactly
-	 *       matches the node or where the text covered before and after the node only consists
-	 *       of white spaces or comments.</li>
-	 *   <li>if no such node exists then the node that encloses the range defined by
-	 *       <code>start</code> and <code>length</code> is returned.</li>
-	 *   <li>if the length is zero then also nodes are considered where the node's
-	 *       start or end position matches <code>start</code>.</li>
-	 *   <li>otherwise <code>null</code> is returned.</li>
+	 *   <li>If {@link #getCoveredNode()} doesn't find a node, returns <code>null</code>.</li>
+	 *   <li>Otherwise, iff the selection only contains the covered node and optionally some whitespace or comments
+	 *       on either side of the node, returns the node.</li>
+	 *   <li>Otherwise, returns the {@link #getCoveringNode() covering} node.</li>
 	 * </ul>
 	 *
 	 * @param root the root node from which the search starts
-	 * @param start the given start
-	 * @param length the given length
+	 * @param start the start of the selection
+	 * @param length the length of the selection
 	 * @param source the source of the compilation unit
 	 *
 	 * @return the result node
@@ -206,18 +202,27 @@
 		this.fCoveringNode = nodeFinderVisitor.getCoveringNode();
 	}
 	/**
-	 * Returns the covered node. If more than one nodes are covered by the selection, the
-	 * returned node is first covered node found in a top-down traversal of the AST.
+	 * If the AST contains nodes whose range is equal to the selection, returns the innermost of those nodes.
+	 * Otherwise, returns the first node in a preorder traversal of the AST, where the complete node range is covered by the selection.
+	 * <p>
+	 * Example: For a {@link SimpleType} whose name is a {@link SimpleName} and a selection that equals both nodes' range,
+	 * the covered node is the <code>SimpleName</code>.
+	 * But if the selection is expanded to include a whitespace before or after the <code>SimpleType</code>,
+	 * then the covered node is the <code>SimpleType</code>.
+	 * </p>
 	 *
-	 * @return the covered node
+	 * @return the covered node, or <code>null</code> if the selection is empty or too short to cover an entire node
 	 */
 	public ASTNode getCoveredNode() {
 		return this.fCoveredNode;
 	}
 
 	/**
-	 * Returns the covering node. If more than one nodes are covering the selection, the
-	 * returned node is last covering node found in a top-down traversal of the AST.
+	 * Returns the innermost node that fully contains the selection. A node also contains the zero-length selection on either end.
+	 * <p>
+	 * If more than one node covers the selection, the returned node is the last covering node found in a preorder traversal of the AST.
+	 * This implies that for a zero-length selection between two adjacent sibling nodes, the node on the right is returned.
+	 * </p>
 	 *
 	 * @return the covering node
 	 */
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java
index 1fe0534..81999a9 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,13 +16,6 @@
 
 /**
  * Package declaration AST node type.
- * For JLS2:
- * <pre>
- * PackageDeclaration:
- *    <b>package</b> Name <b>;</b>
- * </pre>
- * For JLS3, annotations and doc comment
- * were added:
  * <pre>
  * PackageDeclaration:
  *    [ Javadoc ] { Annotation } <b>package</b> Name <b>;</b>
@@ -38,7 +31,7 @@
 public class PackageDeclaration extends ASTNode {
 
 	/**
-	 * The "javadoc" structural property of this node type (child type: {@link Javadoc}).
+	 * The "javadoc" structural property of this node type (child type: {@link Javadoc}) (added in JLS3 API).
 	 * @since 3.0
 	 */
 	public static final ChildPropertyDescriptor JAVADOC_PROPERTY =
@@ -296,7 +289,7 @@
 	}
 
 	/**
-	 * Returns the doc comment node.
+	 * Returns the doc comment node (added in JLS3 API).
 	 *
 	 * @return the doc comment node, or <code>null</code> if none
 	 * @exception UnsupportedOperationException if this operation is used in
@@ -312,7 +305,7 @@
 	}
 
 	/**
-	 * Sets or clears the doc comment node.
+	 * Sets or clears the doc comment node (added in JLS3 API).
 	 *
 	 * @param docComment the doc comment node, or <code>null</code> if none
 	 * @exception IllegalArgumentException if the doc comment string is invalid
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageQualifiedType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageQualifiedType.java
new file mode 100644
index 0000000..b3154b4
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PackageQualifiedType.java
@@ -0,0 +1,294 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Node for a package qualified type (added in JLS8 API).
+ * 
+ * <pre>
+ * PackageQualifiedType:
+ *    Name <b>.</b> { Annotation } SimpleName
+ * </pre>
+ * 
+ * <p>
+ * Note that if no annotation is present, then a package-qualified type can
+ * also be represented by a SimpleType or a QualifiedType, see the discussion
+ * in {@link QualifiedType}.
+ * </p>
+ *
+ * @see SimpleType
+ * @see QualifiedType
+ * 
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class PackageQualifiedType extends AnnotatableType {
+
+	/**
+	 * The "qualifier" structural property of this node type (child type: {@link Name}).
+	 */
+	public static final ChildPropertyDescriptor QUALIFIER_PROPERTY =
+		new ChildPropertyDescriptor(PackageQualifiedType.class, "qualifier", Name.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * The "annotations" structural property of this node type (element type: {@link Annotation}).
+	 */
+	public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
+			internalAnnotationsPropertyFactory(PackageQualifiedType.class);
+	
+	/**
+	 * The "name" structural property of this node type (child type: {@link SimpleName}).
+	 */
+	public static final ChildPropertyDescriptor NAME_PROPERTY =
+		new ChildPropertyDescriptor(PackageQualifiedType.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+	
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS;
+
+	static {
+		List propertyList = new ArrayList(4);
+		createPropertyList(PackageQualifiedType.class, propertyList);
+		addProperty(QUALIFIER_PROPERTY, propertyList);
+		addProperty(ANNOTATIONS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+	}
+
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the
+	 * <code>AST.JLS*</code> constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS;
+	}
+
+	/**
+	 * The qualifier node; lazily initialized; defaults to 
+	 * an unspecified, but legal, simple name.
+	 */
+	private Name qualifier = null;
+
+	/**
+	 * The name being qualified; lazily initialized; defaults to a unspecified,
+	 * legal Java identifier.
+	 */
+	private SimpleName name = null;
+
+	/**
+	 * Creates a new unparented node for a package qualified type owned by the
+	 * given AST. By default, an unspecified, but legal, qualifier and name.
+	 * <p>
+	 * N.B. This constructor is package-private.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	PackageQualifiedType(AST ast) {
+		super(ast);
+	    unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on AnnotatableType.
+	 */
+	ChildListPropertyDescriptor internalAnnotationsProperty() {
+		return ANNOTATIONS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == ANNOTATIONS_PROPERTY) {
+			return annotations();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+	
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
+		if (property == QUALIFIER_PROPERTY) {
+			if (get) {
+				return getQualifier();
+			} else {
+				setQualifier((Name) child);
+				return null;
+			}
+		}
+		if (property == NAME_PROPERTY) {
+			if (get) {
+				return getName();
+			} else {
+				setName((SimpleName) child);
+				return null;
+			}
+		}
+		// allow default implementation to flag the error
+		return super.internalGetSetChildProperty(property, get, child);
+	}
+
+	final int getNodeType0() {
+		return PACKAGE_QUALIFIED_TYPE;
+	}
+
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	ASTNode clone0(AST target) {
+		PackageQualifiedType result = new PackageQualifiedType(target);
+		result.setSourceRange(getStartPosition(), getLength());
+		result.setQualifier((Name) ((ASTNode) getQualifier()).clone(target));
+		result.annotations().addAll(ASTNode.copySubtrees(target, annotations()));
+		result.setName((SimpleName) ((ASTNode) getName()).clone(target));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChild(visitor, getQualifier());
+			acceptChildren(visitor, this.annotations);
+			acceptChild(visitor, getName());
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns the qualifier of this package qualified type.
+	 *
+	 * @return the qualifier of this package qualified type
+	 */
+	public Name getQualifier() {
+		if (this.qualifier == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.qualifier == null) {
+					preLazyInit();
+					this.qualifier = new SimpleName(this.ast);
+					postLazyInit(this.qualifier, QUALIFIER_PROPERTY);
+				}
+			}
+		}
+		return this.qualifier;
+	}
+
+	/**
+	 * Sets the qualifier of this package qualified type to the given name.
+	 *
+	 * @param name the new qualifier of this package qualified type
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setQualifier(Name name) {
+		if (name == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.qualifier;
+		preReplaceChild(oldChild, name, QUALIFIER_PROPERTY);
+		this.qualifier = name;
+		postReplaceChild(oldChild, name, QUALIFIER_PROPERTY);
+	}
+
+	/**
+	 * Returns the name part of this package qualified type.
+	 *
+	 * @return the name being qualified
+	 */
+	public SimpleName getName() {
+		if (this.name == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.name == null) {
+					preLazyInit();
+					this.name = new SimpleName(this.ast);
+					postLazyInit(this.name, NAME_PROPERTY);
+				}
+			}
+		}
+		return this.name;
+	}
+
+	/**
+	 * Sets the name part of this package qualified type to the given simple name.
+	 *
+	 * @param name the identifier of this qualified name
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setName(SimpleName name) {
+		if (name == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.name;
+		preReplaceChild(oldChild, name, NAME_PROPERTY);
+		this.name = name;
+		postReplaceChild(oldChild, name, NAME_PROPERTY);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int memSize() {
+		// treat Code as free
+		return BASE_NODE_SIZE + 2 * 4;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int treeSize() {
+		return
+			memSize()
+			+ (this.qualifier == null ? 0 : getQualifier().treeSize())
+			+ (this.annotations == null ? 0 : this.annotations.listSize())
+			+ (this.name == null ? 0 : getName().treeSize());
+	}
+
+}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ParameterizedType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ParameterizedType.java
index 3576a0d..7bd2fb8 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ParameterizedType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ParameterizedType.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 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 @@
 	}
 
 	/**
-	 * The type node; lazily initialized; defaults to an unspecfied, but legal,
+	 * The type node; lazily initialized; defaults to an unspecified, but legal,
 	 * type.
 	 */
 	private Type type = null;
@@ -222,7 +222,7 @@
 	 * type. For the parameterized type to be plausible, the list should contain
 	 * at least one element and not contain primitive or union types.
 	 * <p>
-	 * Since {@link AST#JLS4}, the list can also be empty if this is the type of a
+	 * Since JLS4, the list can also be empty if this is the type of a
 	 * {@link ClassInstanceCreation} (a so-called "diamond").
 	 * </p>
 	 *
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java
index 9ab7c3d..948c32c 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/PrimitiveType.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -20,15 +24,15 @@
  * Primitive type nodes.
  * <pre>
  * PrimitiveType:
- *    <b>byte</b>
- *    <b>short</b>
- *    <b>char</b>
- *    <b>int</b>
- *    <b>long</b>
- *    <b>float</b>
- *    <b>double</b>
- *    <b>boolean</b>
- *    <b>void</b>
+ *    { Annotation } <b>byte</b>
+ *    { Annotation } <b>short</b>
+ *    { Annotation } <b>char</b>
+ *    { Annotation } <b>int</b>
+ *    { Annotation } <b>long</b>
+ *    { Annotation } <b>float</b>
+ *    { Annotation } <b>double</b>
+ *    { Annotation } <b>boolean</b>
+ *    { Annotation } <b>void</b>
  * </pre>
  * <p>
  * Note that due to the fact that AST nodes belong to a specific AST and
@@ -39,7 +43,7 @@
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
-public class PrimitiveType extends Type {
+public class PrimitiveType extends AnnotatableType {
 
 	/**
  	 * Primitive type codes (typesafe enumeration).
@@ -155,6 +159,13 @@
 	}
 
 	/**
+	 * The "annotations" structural property of this node type (element type: {@link Annotation}).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
+			internalAnnotationsPropertyFactory(PrimitiveType.class);
+	
+	/**
 	 * The "primitiveTypeCode" structural property of this node type (type: {@link PrimitiveType.Code}).
 	 * @since 3.0
 	 */
@@ -167,12 +178,24 @@
 	 * or null if uninitialized.
 	 */
 	private static final List PROPERTY_DESCRIPTORS;
-
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
 	static {
 		List propertyList = new ArrayList(2);
 		createPropertyList(PrimitiveType.class, propertyList);
 		addProperty(PRIMITIVE_TYPE_CODE_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+		
+		propertyList = new ArrayList(3);
+		createPropertyList(PrimitiveType.class, propertyList);
+		addProperty(ANNOTATIONS_PROPERTY, propertyList);
+		addProperty(PRIMITIVE_TYPE_CODE_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 	/**
@@ -187,7 +210,14 @@
 	 * @since 3.0
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		return PROPERTY_DESCRIPTORS;
+		switch (apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				return PROPERTY_DESCRIPTORS;
+			default :
+				return PROPERTY_DESCRIPTORS_8_0;
+		}
 	}
 
 	/**
@@ -204,6 +234,14 @@
 	}
 
 	/* (omit javadoc for this method)
+	 * Method declared on AnnotatableType.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	final ChildListPropertyDescriptor internalAnnotationsProperty() {
+		return ANNOTATIONS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	final List internalStructuralPropertiesForType(int apiLevel) {
@@ -213,6 +251,17 @@
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == ANNOTATIONS_PROPERTY) {
+			return annotations();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
 	final Object internalGetSetObjectProperty(SimplePropertyDescriptor property, boolean get, Object value) {
 		if (property == PRIMITIVE_TYPE_CODE_PROPERTY) {
 			if (get) {
@@ -239,6 +288,10 @@
 	ASTNode clone0(AST target) {
 		PrimitiveType result = new PrimitiveType(target);
 		result.setSourceRange(getStartPosition(), getLength());
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.annotations().addAll(
+					ASTNode.copySubtrees(target, annotations()));
+		}
 		result.setPrimitiveTypeCode(getPrimitiveTypeCode());
 		return result;
 	}
@@ -255,7 +308,13 @@
 	 * Method declared on ASTNode.
 	 */
 	void accept0(ASTVisitor visitor) {
-		visitor.visit(this);
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			if (this.ast.apiLevel >= AST.JLS8) {
+				acceptChildren(visitor, this.annotations);
+			}
+		}
 		visitor.endVisit(this);
 	}
 
@@ -290,13 +349,14 @@
 	 */
 	int memSize() {
 		// treat Code as free
-		return BASE_NODE_SIZE + 1 * 4;
+		return BASE_NODE_SIZE + 2 * 4;
 	}
 
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	int treeSize() {
-		return memSize();
+		return memSize()
+				+ (this.annotations == null ? 0 : this.annotations.listSize());
 	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java
index d7d439a..b3b549f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/QualifiedType.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -16,9 +20,10 @@
 
 /**
  * Type node for a qualified type (added in JLS3 API).
+ * 
  * <pre>
  * QualifiedType:
- *    Type <b>.</b> SimpleName
+ *    Type <b>.</b> { Annotation } SimpleName
  * </pre>
  * <p>
  * Not all node arrangements will represent legal Java constructs. In particular,
@@ -38,13 +43,28 @@
  * The first form is preferred when "A" is known to be a type. However, a
  * parser cannot always determine this. Clients should be prepared to handle
  * either rather than make assumptions. (Note also that the first form
- * became possible as of JLS3; only the second form existed in JLS2 API.)
+ * became possible as of JLS3; only the second form existed in JLS2 API;
+ * the ASTParser currently prefers the second form).
  * </p>
- *
+ * <p>
+ * Since JLS8, it's also possible to annotate qualified type names.
+ * A type like "a.@X B" cannot be represented in either of
+ * the old ways, because "a" is not a type, but a package.
+ * Such types are represented as:
+ * </p>
+ * <ol start="3">
+ * <li>
+ * <code>PackageQualifiedType(SimpleName("a"),MarkerAnnotation("X"),SimpleName("B"))</code>
+ * </li>
+ * </ol>
+ * 
+ * @see SimpleType
+ * @see PackageQualifiedType
+ * 
  * @since 3.1
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
-public class QualifiedType extends Type {
+public class QualifiedType extends AnnotatableType {
     /**
      * This index represents the position inside a parameterized qualified type.
      */
@@ -57,17 +77,31 @@
 		new ChildPropertyDescriptor(QualifiedType.class, "qualifier", Type.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
 
 	/**
+	 * The "annotations" structural property of this node type (element type: {@link Annotation}).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
+			internalAnnotationsPropertyFactory(QualifiedType.class);
+	
+	/**
 	 * The "name" structural property of this node type (child type: {@link SimpleName}).
 	 */
 	public static final ChildPropertyDescriptor NAME_PROPERTY =
 		new ChildPropertyDescriptor(QualifiedType.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
-
+	
 	/**
 	 * A list of property descriptors (element type:
 	 * {@link StructuralPropertyDescriptor}),
 	 * or null if uninitialized.
 	 */
 	private static final List PROPERTY_DESCRIPTORS;
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
 
 	static {
 		List propertyList = new ArrayList(3);
@@ -75,6 +109,13 @@
 		addProperty(QUALIFIER_PROPERTY, propertyList);
 		addProperty(NAME_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+		
+		propertyList = new ArrayList(4);
+		createPropertyList(QualifiedType.class, propertyList);
+		addProperty(QUALIFIER_PROPERTY, propertyList);
+		addProperty(ANNOTATIONS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 	/**
@@ -87,12 +128,19 @@
 	 * {@link StructuralPropertyDescriptor})
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		return PROPERTY_DESCRIPTORS;
+		switch (apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				return PROPERTY_DESCRIPTORS;
+			default :
+				return PROPERTY_DESCRIPTORS_8_0;
+		}
 	}
 
 	/**
 	 * The type node; lazily initialized; defaults to a type with
-	 * an unspecfied, but legal, simple name.
+	 * an unspecified, but legal, simple name.
 	 */
 	private Type qualifier = null;
 
@@ -117,6 +165,14 @@
 	}
 
 	/* (omit javadoc for this method)
+	 * Method declared on AnnotatableType.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	final ChildListPropertyDescriptor internalAnnotationsProperty() {
+		return ANNOTATIONS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	final List internalStructuralPropertiesForType(int apiLevel) {
@@ -126,6 +182,17 @@
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == ANNOTATIONS_PROPERTY) {
+			return annotations();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+	
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
 	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
 		if (property == QUALIFIER_PROPERTY) {
 			if (get) {
@@ -161,6 +228,10 @@
 		QualifiedType result = new QualifiedType(target);
 		result.setSourceRange(getStartPosition(), getLength());
 		result.setQualifier((Type) ((ASTNode) getQualifier()).clone(target));
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.annotations().addAll(
+					ASTNode.copySubtrees(target, annotations()));
+		}
 		result.setName((SimpleName) ((ASTNode) getName()).clone(target));
 		return result;
 	}
@@ -181,6 +252,9 @@
 		if (visitChildren) {
 			// visit children in normal left to right reading order
 			acceptChild(visitor, getQualifier());
+			if (this.ast.apiLevel >= AST.JLS8) {
+				acceptChildren(visitor, this.annotations);
+			}
 			acceptChild(visitor, getName());
 		}
 		visitor.endVisit(this);
@@ -269,7 +343,7 @@
 	 */
 	int memSize() {
 		// treat Code as free
-		return BASE_NODE_SIZE + 3 * 4;
+		return BASE_NODE_SIZE + 4 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -279,6 +353,7 @@
 		return
 			memSize()
 			+ (this.qualifier == null ? 0 : getQualifier().treeSize())
+			+ (this.annotations == null ? 0 : this.annotations.listSize())
 			+ (this.name == null ? 0 : getName().treeSize());
 	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java
index e8bcd2f..bff3984 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/RecoveredTypeBinding.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
+ * Copyright (c) 2007, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -193,6 +197,14 @@
 		}
 		return null;
 	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getEnclosingType()
+	 */
+	
+	public ITypeBinding getEnclosingType() {
+		return null;
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getErasure()
@@ -451,6 +463,13 @@
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isFunctionalInterface()
+	 */
+	public boolean isFunctionalInterface() {
+		return false;
+	}
+
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ITypeBinding#isInterface()
 	 */
 	public boolean isInterface() {
@@ -712,6 +731,9 @@
 			case ASTNode.QUALIFIED_TYPE :
 				QualifiedType qualifiedType = (QualifiedType) type;
 				return qualifiedType.getName().getIdentifier();
+			case ASTNode.PACKAGE_QUALIFIED_TYPE :
+				PackageQualifiedType packageQualifiedType = (PackageQualifiedType) type;
+				return packageQualifiedType.getName().getIdentifier();
 			case ASTNode.SIMPLE_TYPE :
 				SimpleType simpleType = (SimpleType) type;
 				Name name = simpleType.getName();
@@ -750,6 +772,10 @@
 		}
 		return null; // should not happen
 	}
+
+	public IAnnotationBinding[] getTypeAnnotations() {
+		return AnnotationBinding.NoAnnotations;
+	}
 //{ObjectTeams: new lookup-functions
 	public org.eclipse.jdt.internal.compiler.lookup.TypeBinding getResolvedBinding() {
 		return this.binding;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleName.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleName.java
index 50fe08a..3cff3de 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleName.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleName.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -201,14 +201,16 @@
 				}
 //SH}
 				if (tokenType != TerminalTokens.TokenNameIdentifier) {
-					throw new IllegalArgumentException();
+					throw new IllegalArgumentException("Invalid identifier : >" + identifier + "<");  //$NON-NLS-1$//$NON-NLS-2$
 				}
 				if (scanner.currentPosition != length) {
 					// this is the case when there is only one identifier see 87849
-					throw new IllegalArgumentException();
+					throw new IllegalArgumentException("Invalid identifier : >" + identifier + "<");  //$NON-NLS-1$//$NON-NLS-2$
 				}
 			} catch(InvalidInputException e) {
-				throw new IllegalArgumentException();
+				IllegalArgumentException iae = new IllegalArgumentException("Invalid identifier : >" + identifier + "<"); //$NON-NLS-1$//$NON-NLS-2$
+				iae.initCause(e);
+				throw iae; 
 			}
 		} finally {
 			this.ast.scanner.sourceLevel = sourceLevel;
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java
index 9e256c6..91818f4 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SimpleType.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -16,17 +20,35 @@
 
 /**
  * Type node for a named class type, a named interface type, or a type variable.
+ * <pre>
+ * SimpleType:
+ *    { Annotation } TypeName
+ * </pre>
  * <p>
- * This kind of node is used to convert a name (<code>Name</code>) into a type
- * (<code>Type</code>) by wrapping it.
+ * This kind of node is used to convert a name ({@link Name}) into a type
+ * ({@link Type}) by wrapping it.
  * </p>
  *
+ * In JLS8 and later, the SimpleType may have optional annotations.
+ * If annotations are present, then the name must be a {@link SimpleName}.
+ * Annotated qualified names are represented as {@link QualifiedType} or {@link PackageQualifiedType}.
+ * 
+ * @see QualifiedType
+ * @see PackageQualifiedType
+ * 
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
-public class SimpleType extends Type {
+public class SimpleType extends AnnotatableType {
 
 	/**
+	 * The "annotations" structural property of this node type (element type: {@link Annotation}).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
+			internalAnnotationsPropertyFactory(SimpleType.class);
+	
+	/**
 	 * The "name" structural property of this node type (child type: {@link Name}).
 	 * @since 3.0
 	 */
@@ -39,12 +61,25 @@
 	 * or null if uninitialized.
 	 */
 	private static final List PROPERTY_DESCRIPTORS;
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
 
 	static {
 		List propertyList = new ArrayList(2);
 		createPropertyList(SimpleType.class, propertyList);
 		addProperty(NAME_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+		
+		propertyList = new ArrayList(3);
+		createPropertyList(SimpleType.class, propertyList);
+		addProperty(ANNOTATIONS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 	/**
@@ -58,12 +93,19 @@
 	 * @since 3.0
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		return PROPERTY_DESCRIPTORS;
+		switch (apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				return PROPERTY_DESCRIPTORS;
+			default :
+				return PROPERTY_DESCRIPTORS_8_0;
+		}
 	}
 
 	/**
 	 * The type name node; lazily initialized; defaults to a type with
-	 * an unspecfied, but legal, name.
+	 * an unspecified, but legal, name.
 	 */
 	private Name typeName = null;
 
@@ -81,6 +123,14 @@
 	}
 
 	/* (omit javadoc for this method)
+	 * Method declared on AnnotatableType.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	final ChildListPropertyDescriptor internalAnnotationsProperty() {
+		return ANNOTATIONS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	final List internalStructuralPropertiesForType(int apiLevel) {
@@ -90,6 +140,17 @@
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == ANNOTATIONS_PROPERTY) {
+			return annotations();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+	
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
 	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
 		if (property == NAME_PROPERTY) {
 			if (get) {
@@ -116,6 +177,10 @@
 	ASTNode clone0(AST target) {
 		SimpleType result = new SimpleType(target);
 		result.setSourceRange(getStartPosition(), getLength());
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.annotations().addAll(
+					ASTNode.copySubtrees(target, annotations()));
+		}
 		result.setName((Name) (getName()).clone(target));
 		return result;
 	}
@@ -134,6 +199,10 @@
 	void accept0(ASTVisitor visitor) {
 		boolean visitChildren = visitor.visit(this);
 		if (visitChildren) {
+			// visit children in normal left to right reading order
+			if (this.ast.apiLevel >= AST.JLS8) {
+				acceptChildren(visitor, this.annotations);
+			}
 			acceptChild(visitor, getName());
 		}
 		visitor.endVisit(this);
@@ -183,7 +252,7 @@
 	 */
 	int memSize() {
 		// treat Code as free
-		return BASE_NODE_SIZE + 1 * 4;
+		return BASE_NODE_SIZE + 2 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -192,6 +261,7 @@
 	int treeSize() {
 		return
 			memSize()
+			+ (this.annotations == null ? 0 : this.annotations.listSize())
 			+ (this.typeName == null ? 0 : getName().treeSize());
 	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
index 2f1e493..c06a680 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SingleVariableDeclaration.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -20,18 +24,13 @@
  * declaration nodes are used in a limited number of places, including formal
  * parameter lists and catch clauses. They are not used for field declarations
  * and regular variable declaration statements.
- * For JLS2:
  * <pre>
  * SingleVariableDeclaration:
- *    { Modifier } Type Identifier { <b>[</b><b>]</b> } [ <b>=</b> Expression ]
+ *    { ExtendedModifier } Type {Annotation} [ <b>...</b> ] Identifier { Dimension } [ <b>=</b> Expression ]
  * </pre>
- * For JLS3, the modifier flags were replaced by
- * a list of modifier nodes (intermixed with annotations), and the variable arity
- * indicator was added:
- * <pre>
- * SingleVariableDeclaration:
- *    { ExtendedModifier } Type [ <b>...</b> ] Identifier { <b>[</b><b>]</b> } [ <b>=</b> Expression ]
- * </pre>
+ * <p>
+ * Note: There's currently no construct in the Java language that allows an initializer on a SingleVariableDeclaration.
+ * </p>
  *
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
@@ -40,6 +39,7 @@
 
 	/**
 	 * The "modifiers" structural property of this node type (type: {@link Integer}) (JLS2 API only).
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #MODIFIERS2_PROPERTY}.
 	 * @since 3.0
 	 */
 	public static final SimplePropertyDescriptor MODIFIERS_PROPERTY =
@@ -53,18 +53,19 @@
 		new ChildListPropertyDescriptor(SingleVariableDeclaration.class, "modifiers", IExtendedModifier.class, CYCLE_RISK); //$NON-NLS-1$
 
 	/**
-	 * The "name" structural property of this node type (child type: {@link SimpleName}).
-	 * @since 3.0
-	 */
-	public static final ChildPropertyDescriptor NAME_PROPERTY =
-		new ChildPropertyDescriptor(SingleVariableDeclaration.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
-
-	/**
 	 * The "type" structural property of this node type (child type: {@link Type}).
 	 * @since 3.0
 	 */
 	public static final ChildPropertyDescriptor TYPE_PROPERTY =
-		new ChildPropertyDescriptor(SingleVariableDeclaration.class, "type", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+			new ChildPropertyDescriptor(SingleVariableDeclaration.class, "type", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * The "varargsAnnotations" structural property of variable arguments of this node type (element type: {@link Annotation})
+	 * (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor VARARGS_ANNOTATIONS_PROPERTY =
+			new ChildListPropertyDescriptor(SingleVariableDeclaration.class, "varargsAnnotations", Annotation.class, CYCLE_RISK); //$NON-NLS-1$
 
 	/**
 	 * The "varargs" structural property of this node type (type: {@link Boolean}) (added in JLS3 API).
@@ -74,18 +75,35 @@
 		new SimplePropertyDescriptor(SingleVariableDeclaration.class, "varargs", boolean.class, MANDATORY); //$NON-NLS-1$
 
 	/**
-	 * The "extraDimensions" structural property of this node type (type: {@link Integer}).
+	 * The "name" structural property of this node type (child type: {@link SimpleName}).
 	 * @since 3.0
 	 */
+	public static final ChildPropertyDescriptor NAME_PROPERTY =
+			internalNamePropertyFactory(SingleVariableDeclaration.class);
+
+	/**
+	 * The "extraDimensions" structural property of this node type (type: {@link Integer})
+	 * (before JLS8 only).
+	 *
+	 * @since 3.0
+	 * @deprecated In JLS8 and later, use {@link SingleVariableDeclaration#EXTRA_DIMENSIONS2_PROPERTY} instead.
+	 */
 	public static final SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY =
-		new SimplePropertyDescriptor(SingleVariableDeclaration.class, "extraDimensions", int.class, MANDATORY); //$NON-NLS-1$
+			internalExtraDimensionsPropertyFactory(SingleVariableDeclaration.class);
+
+	/**
+	 * The "extraDimensions2" structural property of this node type (element type: {@link Dimension}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor EXTRA_DIMENSIONS2_PROPERTY =
+			internalExtraDimensions2PropertyFactory(SingleVariableDeclaration.class);
 
 	/**
 	 * The "initializer" structural property of this node type (child type: {@link Expression}).
 	 * @since 3.0
 	 */
 	public static final ChildPropertyDescriptor INITIALIZER_PROPERTY =
-		new ChildPropertyDescriptor(SingleVariableDeclaration.class, "initializer", Expression.class, OPTIONAL, CYCLE_RISK); //$NON-NLS-1$
+			internalInitializerPropertyFactory(SingleVariableDeclaration.class);
 
 	/**
 	 * A list of property descriptors (element type:
@@ -103,6 +121,14 @@
 	 */
 	private static final List PROPERTY_DESCRIPTORS_3_0;
 
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
 	static {
 		List propertyList = new ArrayList(6);
 		createPropertyList(SingleVariableDeclaration.class, propertyList);
@@ -122,6 +148,17 @@
 		addProperty(EXTRA_DIMENSIONS_PROPERTY, propertyList);
 		addProperty(INITIALIZER_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS_3_0 = reapPropertyList(propertyList);
+
+		propertyList = new ArrayList(8);
+		createPropertyList(SingleVariableDeclaration.class, propertyList);
+		addProperty(MODIFIERS2_PROPERTY, propertyList);
+		addProperty(TYPE_PROPERTY, propertyList);
+		addProperty(VARARGS_ANNOTATIONS_PROPERTY, propertyList);
+		addProperty(VARARGS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		addProperty(EXTRA_DIMENSIONS2_PROPERTY, propertyList);
+		addProperty(INITIALIZER_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 	/**
@@ -137,8 +174,10 @@
 	public static List propertyDescriptors(int apiLevel) {
 		if (apiLevel == AST.JLS2_INTERNAL) {
 			return PROPERTY_DESCRIPTORS_2_0;
-		} else {
+		} else if (apiLevel < AST.JLS8) {
 			return PROPERTY_DESCRIPTORS_3_0;
+		} else {
+			return PROPERTY_DESCRIPTORS_8_0;
 		}
 	}
 
@@ -158,18 +197,21 @@
 	private int modifierFlags = Modifier.NONE;
 
 	/**
-	 * The variable name; lazily initialized; defaults to a unspecified,
-	 * legal Java identifier.
-	 */
-	private SimpleName variableName = null;
-
-	/**
-	 * The type; lazily initialized; defaults to a unspecified,
+	 * The type; lazily initialized; defaults to an unspecified,
 	 * legal type.
 	 */
 	private Type type = null;
 
 	/**
+	 * The type annotations on the varargs token (element type: {@link Annotation}).
+	 * Null before JLS8. Added in JLS8; defaults to an empty list
+	 * (see constructor).
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private ASTNode.NodeList varargsAnnotations = null;
+
+	/**
 	 * Indicates the last parameter of a variable arity method;
 	 * defaults to false.
 	 *
@@ -177,20 +219,6 @@
 	 */
 	private boolean variableArity = false;
 
-	/**
-	 * The number of extra array dimensions that appear after the variable;
-	 * defaults to 0.
-	 *
-	 * @since 2.1
-	 */
-	private int extraArrayDimensions = 0;
-
-	/**
-	 * The initializer expression, or <code>null</code> if none;
-	 * defaults to none.
-	 */
-	private Expression optionalInitializer = null;
-
 //{ObjectTeams: emulation for declared lifting:
 	private SingleVariableDeclaration fakedRoleVariable;
 	public static final ChildPropertyDescriptor FAKED_ROLE_VARIABLE = 
@@ -240,6 +268,9 @@
 		super(ast);
 		if (ast.apiLevel >= AST.JLS3_INTERNAL) {
 			this.modifiers = new ASTNode.NodeList(MODIFIERS2_PROPERTY);
+			if (ast.apiLevel >= AST.JLS8) {
+				this.varargsAnnotations = new ASTNode.NodeList(VARARGS_ANNOTATIONS_PROPERTY);
+			}
 		}
 	}
 
@@ -247,24 +278,32 @@
 	 * Method declared on VariableDeclaration.
 	 * @since 3.1
 	 */
+	final ChildPropertyDescriptor internalNameProperty() {
+		return NAME_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on VariableDeclaration.
+	 * @since 3.1
+	 */
 	final SimplePropertyDescriptor internalExtraDimensionsProperty() {
 		return EXTRA_DIMENSIONS_PROPERTY;
 	}
 
 	/* (omit javadoc for this method)
 	 * Method declared on VariableDeclaration.
-	 * @since 3.1
+	 * @since 3.9 BETA_JAVA8
 	 */
-	final ChildPropertyDescriptor internalInitializerProperty() {
-		return INITIALIZER_PROPERTY;
+	final ChildListPropertyDescriptor internalExtraDimensions2Property() {
+		return EXTRA_DIMENSIONS2_PROPERTY;
 	}
-
+	
 	/* (omit javadoc for this method)
 	 * Method declared on VariableDeclaration.
 	 * @since 3.1
 	 */
-	final ChildPropertyDescriptor internalNameProperty() {
-		return NAME_PROPERTY;
+	final ChildPropertyDescriptor internalInitializerProperty() {
+		return INITIALIZER_PROPERTY;
 	}
 
 	/* (omit javadoc for this method)
@@ -290,7 +329,7 @@
 			if (get) {
 				return getExtraDimensions();
 			} else {
-				setExtraDimensions(value);
+				internalSetExtraDimensions(value);
 				return 0;
 			}
 		}
@@ -318,14 +357,6 @@
 	 * Method declared on ASTNode.
 	 */
 	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
-		if (property == NAME_PROPERTY) {
-			if (get) {
-				return getName();
-			} else {
-				setName((SimpleName) child);
-				return null;
-			}
-		}
 		if (property == TYPE_PROPERTY) {
 			if (get) {
 				return getType();
@@ -334,6 +365,14 @@
 				return null;
 			}
 		}
+		if (property == NAME_PROPERTY) {
+			if (get) {
+				return getName();
+			} else {
+				setName((SimpleName) child);
+				return null;
+			}
+		}
 		if (property == INITIALIZER_PROPERTY) {
 			if (get) {
 				return getInitializer();
@@ -353,6 +392,12 @@
 		if (property == MODIFIERS2_PROPERTY) {
 			return modifiers();
 		}
+		if (property == VARARGS_ANNOTATIONS_PROPERTY) {
+			return varargsAnnotations();
+		}
+		if (property == EXTRA_DIMENSIONS2_PROPERTY) {
+			return extraDimensions();
+		}
 		// allow default implementation to flag the error
 		return super.internalGetChildListProperty(property);
 	}
@@ -377,10 +422,19 @@
 			result.setVarargs(isVarargs());
 		}
 		result.setType((Type) getType().clone(target));
-		result.setExtraDimensions(getExtraDimensions());
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.varargsAnnotations().addAll(
+					ASTNode.copySubtrees(target, varargsAnnotations()));
+		}
 		result.setName((SimpleName) getName().clone(target));
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.extraDimensions().addAll(
+					ASTNode.copySubtrees(target, this.extraDimensions()));
+		} else {
+			result.internalSetExtraDimensions(getExtraDimensions());
+		}
 		result.setInitializer(
-			(Expression) ASTNode.copySubtree(target, getInitializer()));
+				(Expression) ASTNode.copySubtree(target, getInitializer()));
 		return result;
 	}
 
@@ -403,7 +457,13 @@
 				acceptChildren(visitor, this.modifiers);
 			}
 			acceptChild(visitor, getType());
+			if (this.ast.apiLevel >= AST.JLS8 && isVarargs()) {
+				acceptChildren(visitor, this.varargsAnnotations);
+			}
 			acceptChild(visitor, getName());
+			if (this.ast.apiLevel >= AST.JLS8){
+				acceptChildren(visitor, this.extraDimensions);
+			}
 			acceptChild(visitor, getInitializer());
 		}
 		visitor.endVisit(this);
@@ -492,36 +552,6 @@
 		postValueChange(MODIFIERS_PROPERTY);
 	}
 
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public SimpleName getName() {
-		if (this.variableName == null) {
-			// lazy init must be thread-safe for readers
-			synchronized (this) {
-				if (this.variableName == null) {
-					preLazyInit();
-					this.variableName = new SimpleName(this.ast);
-					postLazyInit(this.variableName, NAME_PROPERTY);
-				}
-			}
-		}
-		return this.variableName;
-	}
-
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public void setName(SimpleName variableName) {
-		if (variableName == null) {
-			throw new IllegalArgumentException();
-		}
-		ASTNode oldChild = this.variableName;
-		preReplaceChild(oldChild, variableName, NAME_PROPERTY);
-		this.variableName = variableName;
-		postReplaceChild(oldChild, variableName, NAME_PROPERTY);
-	}
-
 	/**
 	 * Returns the type of the variable declared in this variable declaration,
 	 * exclusive of any extra array dimensions.
@@ -608,52 +638,27 @@
 		postValueChange(VARARGS_PROPERTY);
 	}
 
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 * @since 2.1
+	/**
+	 * Returns the ordered list of annotations on the varargs token (added in JLS8 API).
+	 *
+	 * @return the list of annotations on the varargs token (element type: {@link Annotation})
+	 * @exception UnsupportedOperationException if this operation is used
+	 *            in a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
 	 */
-	public int getExtraDimensions() {
-		return this.extraArrayDimensions;
-	}
-
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 * @since 2.1
-	 */
-	public void setExtraDimensions(int dimensions) {
-		if (dimensions < 0) {
-			throw new IllegalArgumentException();
+	public List varargsAnnotations() {
+		if (this.varargsAnnotations == null) {
+			unsupportedIn2_3_4(); 
 		}
-		preValueChange(EXTRA_DIMENSIONS_PROPERTY);
-		this.extraArrayDimensions = dimensions;
-		postValueChange(EXTRA_DIMENSIONS_PROPERTY);
+		return this.varargsAnnotations;
 	}
-
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public Expression getInitializer() {
-		return this.optionalInitializer;
-	}
-
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public void setInitializer(Expression initializer) {
-		// a SingleVariableDeclaration may occur inside an Expression
-		// must check cycles
-		ASTNode oldChild = this.optionalInitializer;
-		preReplaceChild(oldChild, initializer,INITIALIZER_PROPERTY);
-		this.optionalInitializer = initializer;
-		postReplaceChild(oldChild, initializer,INITIALIZER_PROPERTY);
-	}
-
+	
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	int memSize() {
 		// treat Operator as free
-		return BASE_NODE_SIZE + 7 * 4;
+		return BASE_NODE_SIZE + 9 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -664,7 +669,9 @@
 			memSize()
 			+ (this.modifiers == null ? 0 : this.modifiers.listSize())
 			+ (this.type == null ? 0 : getType().treeSize())
+			+ (this.varargsAnnotations == null ? 0 : this.varargsAnnotations.listSize())
 			+ (this.variableName == null ? 0 : getName().treeSize())
+			+ (this.extraDimensions == null ? 0 : this.extraDimensions.listSize())
 			+ (this.optionalInitializer == null ? 0 : getInitializer().treeSize());
 	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java
index 6a3ac54..dffc912 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Statement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -20,7 +20,6 @@
  * There are many kinds of statements.
  * <p>
  * The grammar combines both Statement and BlockStatement.</p>
- * <p>For JLS2:</p>
  * <pre>
  * Statement:
  *    {@link AssertStatement},
@@ -30,6 +29,7 @@
  *    {@link ContinueStatement},
  *    {@link DoStatement},
  *    {@link EmptyStatement},
+ *    {@link EnhancedForStatement}
  *    {@link ExpressionStatement},
  *    {@link ForStatement},
  *    {@link IfStatement},
@@ -45,12 +45,6 @@
  *    {@link VariableDeclarationStatement},
  *    {@link WhileStatement}
  * </pre>
- * <p>For JLS3, an enhanced for node type was added:</p>
- * <pre>
- * Statement:
- *    <i>&lt;JLS2 statements&gt;...</i>,
- *    {@link EnhancedForStatement}
- * </pre>
  *
  * @since 2.0
  */
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java
index 5304d5b..bc9ed9b 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperConstructorInvocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,12 +16,6 @@
 
 /**
  * Super constructor invocation statement AST node type.
- * For JLS2: * <pre>
- * SuperConstructorInvocation:
- *     [ Expression <b>.</b> ] <b>super</b>
- *         <b>(</b> [ Expression { <b>,</b> Expression } ] <b>)</b> <b>;</b>
- * </pre>
- * For JLS3, type arguments are added:
  * <pre>
  * SuperConstructorInvocation:
  *     [ Expression <b>.</b> ]
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java
index 4dfa661..919eebe 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodInvocation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,13 +16,6 @@
 
 /**
  * Simple or qualified "super" method invocation expression AST node type.
- * For JLS2:
- * <pre>
- * SuperMethodInvocation:
- *     [ ClassName <b>.</b> ] <b>super</b> <b>.</b> Identifier
- *         <b>(</b> [ Expression { <b>,</b> Expression } ] <b>)</b>
- * </pre>
- * For JLS3, type arguments are added:
  * <pre>
  * SuperMethodInvocation:
  *     [ ClassName <b>.</b> ] <b>super</b> <b>.</b>
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java
new file mode 100644
index 0000000..0dfbc2e
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/SuperMethodReference.java
@@ -0,0 +1,294 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Super method reference AST node type (added in JLS8 API).
+ * 
+ * <pre>
+ * SuperMethodReference:
+ *     [ ClassName <b>.</b> ] <b>super</b> <b>::</b>
+ *         [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
+ *         Identifier
+ * </pre>
+ * 
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients
+ */
+public class SuperMethodReference extends MethodReference {
+
+	/**
+	 * The "qualifier" structural property of this node type (child type: {@link Name}).
+	 */
+	public static final ChildPropertyDescriptor QUALIFIER_PROPERTY =
+		new ChildPropertyDescriptor(SuperMethodReference.class, "qualifier", Name.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * The "typeArguments" structural property of this node type (element type: {@link Type}) 
+	 */
+	public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY =
+		internalTypeArgumentsFactory(SuperMethodReference.class);
+
+	/**
+	 * The "name" structural property of this node type (child type: {@link SimpleName}).
+	 */
+	public static final ChildPropertyDescriptor NAME_PROPERTY =
+		new ChildPropertyDescriptor(SuperMethodReference.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
+	static {
+		List propertyList = new ArrayList(4);
+		createPropertyList(SuperMethodReference.class, propertyList);
+		addProperty(QUALIFIER_PROPERTY, propertyList);
+		addProperty(TYPE_ARGUMENTS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
+	}
+
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the
+	 * <code>AST.JLS*</code> constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS_8_0;
+	}
+
+	/**
+	 * The optional qualifier; <code>null</code> for none; defaults to none.
+	 */
+	private Name optionalQualifier = null;
+
+	/**
+	 * The method name; lazily initialized; defaults to a unspecified,
+	 * legal Java method name.
+	 */
+	private SimpleName methodName = null;
+	/**
+	 * Creates a new AST  node for a super method reference owned
+	 * by the given AST. By default, there is no qualifier.
+	 * <p>
+	 * N.B. This constructor is package-private; all subclasses must be
+	 * declared in the same package; clients are unable to declare
+	 * additional subclasses.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	SuperMethodReference(AST ast) {
+		super(ast);
+		unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on MethodReference.
+	 */
+	final ChildListPropertyDescriptor internalTypeArgumentsProperty() {
+		return TYPE_ARGUMENTS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
+		if (property == QUALIFIER_PROPERTY) {
+			if (get) {
+				return getQualifier();
+			} else {
+				setQualifier((Name) child);
+				return null;
+			}
+		}
+		if (property == NAME_PROPERTY) {
+			if (get) {
+				return getName();
+			} else {
+				setName((SimpleName) child);
+				return null;
+			}
+		}
+		// allow default implementation to flag the error
+		return super.internalGetSetChildProperty(property, get, child);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == TYPE_ARGUMENTS_PROPERTY) {
+			return typeArguments();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final int getNodeType0() {
+		return SUPER_METHOD_REFERENCE;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	ASTNode clone0(AST target) {
+		SuperMethodReference result = new SuperMethodReference(target);
+		result.setSourceRange(getStartPosition(), getLength());
+		result.setName((SimpleName) getName().clone(target));
+		result.setQualifier((Name) ASTNode.copySubtree(target, getQualifier()));
+		result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChild(visitor, getQualifier());
+			acceptChildren(visitor, this.typeArguments);
+			acceptChild(visitor, getName());
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns the qualifier of this "super" method reference, or
+	 * <code>null</code> if there is none.
+	 *
+	 * @return the qualifier name node, or <code>null</code> if there is none
+	 */
+	public Name getQualifier() {
+		return this.optionalQualifier;
+	}
+
+	/**
+	 * Sets the qualifier of this "super" method reference expression.
+	 *
+	 * @param name the qualifier name node, or <code>null</code> if
+	 *    there is none
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setQualifier(Name name) {
+		ASTNode oldChild = this.optionalQualifier;
+		preReplaceChild(oldChild, name, QUALIFIER_PROPERTY);
+		this.optionalQualifier = name;
+		postReplaceChild(oldChild, name, QUALIFIER_PROPERTY);
+	}
+
+	/**
+	 * Returns the live ordered list of type arguments of this super method reference.
+	 *
+	 * @return the live list of type arguments
+	 *    (element type: {@link Type})
+	 */
+	public List typeArguments() {
+		return this.typeArguments;
+	}
+
+	/**
+	 * Returns the name of the method referenced in this expression.
+	 *
+	 * @return the method name node
+	 */
+	public SimpleName getName() {
+		if (this.methodName == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.methodName == null) {
+					preLazyInit();
+					this.methodName = new SimpleName(this.ast);
+					postLazyInit(this.methodName, NAME_PROPERTY);
+				}
+			}
+		}
+		return this.methodName;
+	}
+
+	/**
+	 * Sets the name of the method referenced in this expression to the
+	 * given name.
+	 *
+	 * @param name the new method name
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setName(SimpleName name) {
+		if (name == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.methodName;
+		preReplaceChild(oldChild, name, NAME_PROPERTY);
+		this.methodName = name;
+		postReplaceChild(oldChild, name, NAME_PROPERTY);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int memSize() {
+		// treat Code as free
+		return BASE_NODE_SIZE + 3 * 4;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int treeSize() {
+		return
+			memSize()
+			+ (this.optionalQualifier == null ? 0 : getQualifier().treeSize())
+			+ (this.typeArguments == null ? 0 : this.typeArguments.listSize())
+			+ (this.methodName == null ? 0 : getName().treeSize());
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java
index 3888333..4d84544 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TryStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,14 +16,6 @@
 
 /**
  * Try statement AST node type.
- * For JLS2 and JLS3:
- * <pre>
- * TryStatement:
- *     <b>try</b> Block
- *         [ { CatchClause } ]
- *         [ <b>finally</b> Block ]
- * </pre>
- * For JLS4, resources were added:
  * <pre>
  * TryStatement:
  *     <b>try</b> [ <b>(</b> Resources <b>)</b> ]
@@ -160,7 +152,7 @@
 	 */
 	TryStatement(AST ast) {
 		super(ast);
-		if (ast.apiLevel >= AST.JLS4) {
+		if (ast.apiLevel >= AST.JLS4_INTERNAL) {
 			this.resources = new ASTNode.NodeList(RESOURCES_PROPERTY);
 		}
 	}
@@ -224,7 +216,7 @@
 		TryStatement result = new TryStatement(target);
 		result.setSourceRange(getStartPosition(), getLength());
 		result.copyLeadingComment(this);
-		if (this.ast.apiLevel >= AST.JLS4) {
+		if (this.ast.apiLevel >= AST.JLS4_INTERNAL) {
 			result.resources().addAll(
 					ASTNode.copySubtrees(target, resources()));
 		}
@@ -251,7 +243,7 @@
 		boolean visitChildren = visitor.visit(this);
 		if (visitChildren) {
 			// visit children in normal left to right reading order
-			if (this.ast.apiLevel >= AST.JLS4) {
+			if (this.ast.apiLevel >= AST.JLS4_INTERNAL) {
 				acceptChildren(visitor, this.resources);
 			}
 			acceptChild(visitor, getBody());
@@ -342,7 +334,7 @@
 	}
 
 	/**
-	 * Returns the live ordered list of resources for this try statement.
+	 * Returns the live ordered list of resources for this try statement (added in JLS4 API).
 	 *
 	 * @return the live list of resources
 	 *    (element type: {@link VariableDeclarationExpression})
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java
index ced54ee..8d2685b 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/Type.java
@@ -1,59 +1,77 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
 
 package org.eclipse.jdt.core.dom;
 
+
 /**
  * Abstract base class of all type AST node types. A type node represents a
  * reference to a primitive type (including void), to an array type, or to a
  * simple named type (or type variable), to a qualified type, to a
- * parameterized type, or to a wildcard type. Note that not all of these
+ * parameterized type, to a union type, to an intersection type, or to a wildcard type. Note that not all of these
  * are meaningful in all contexts; for example, a wildcard type is only
  * meaningful in the type argument position of a parameterized type.
+ * UnionType got introduced in JLS4 to support common catch blocks for disjunctive types.
+ * For JLS8, optional annotations indicated by {Annotation} got added.
  * <p>
  * <pre>
  * Type:
- *    PrimitiveType
+ *    AnnotatableType:
+ *       PrimitiveType
+ *       SimpleType
+ *       QualifiedType
+ *       PackageQualifiedType
+ *       WildcardType
  *    ArrayType
- *    SimpleType
- *    QualifiedType
  *    ParameterizedType
- *    WildcardType
- * PrimitiveType:
- *    <b>byte</b>
- *    <b>short</b>
- *    <b>char</b>
- *    <b>int</b>
- *    <b>long</b>
- *    <b>float</b>
- *    <b>double</b>
- *    <b>boolean</b>
- *    <b>void</b>
- * ArrayType:
- *    Type <b>[</b> <b>]</b>
- * SimpleType:
- *    TypeName
- * ParameterizedType:
+ *    UnionType
+ *    IntersectionType
+ *    
+ * {@link PrimitiveType}:
+ *    { Annotation } <b>byte</b>
+ *    { Annotation } <b>short</b>
+ *    { Annotation } <b>char</b>
+ *    { Annotation } <b>int</b>
+ *    { Annotation } <b>long</b>
+ *    { Annotation } <b>float</b>
+ *    { Annotation } <b>double</b>
+ *    { Annotation } <b>boolean</b>
+ *    { Annotation } <b>void</b>
+ * {@link ArrayType}:
+ *    Type Dimension <b>{</b> Dimension <b>}</b>
+ * {@link SimpleType}:
+ *    { Annotation } TypeName
+ * {@link QualifiedType}:
+ *    Type <b>.</b> {Annotation} SimpleName
+ * {@link PackageQualifiedType}:
+ *    Name <b>.</b> { Annotation } SimpleName
+ * {@link WildcardType}:
+ *    { Annotation } <b>?</b> [ ( <b>extends</b> | <b>super</b>) Type ]
+ * {@link ParameterizedType}:
  *    Type <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b>
- * QualifiedType:
- *    Type <b>.</b> SimpleName
- * WildcardType:
- *    <b>?</b> [ ( <b>extends</b> | <b>super</b>) Type ]
+ * {@link UnionType}:
+ *    Type <b>|</b> Type { <b>|</b> Type }
+ * {@link IntersectionType}:
+ *    Type <b>&</b> Type { <b>&</b> Type }
  * </pre>
  * </p>
  *
  * @since 2.0
  */
 public abstract class Type extends ASTNode {
-
+	
 	/**
 	 * Creates a new AST node for a type owned by the given AST.
 	 * <p>
@@ -100,6 +118,18 @@
 	}
 
 	/**
+	 * Returns whether this type is a package qualified type
+	 * ({@link PackageQualifiedType}).
+	 *
+	 * @return <code>true</code> if this is a package qualified type, and
+	 *    <code>false</code> otherwise
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public final boolean isPackageQualifiedType() {
+		return (this instanceof PackageQualifiedType);
+	}
+
+	/**
 	 * Returns whether this type is a parameterized type
 	 * ({@link ParameterizedType}).
 	 *
@@ -152,6 +182,18 @@
 	}
 
 	/**
+	 * Returns whether this type is an intersection type
+	 * ({@link IntersectionType}).
+	 *
+	 * @return <code>true</code> if this is an intersection type, and
+	 * 		<code>false</code> otherwise
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public final boolean isIntersectionType() {
+		return (this instanceof IntersectionType);
+	}
+
+	/**
 	 * Returns whether this type is a wildcard type
 	 * ({@link WildcardType}).
 	 * <p>
@@ -166,6 +208,19 @@
 	public final boolean isWildcardType() {
 		return (this instanceof WildcardType);
 	}
+	
+	/**
+	 * Returns whether this type can be annotated. All sub-classes of
+	 * {@link AnnotatableType} can be annotated.
+	 *
+	 * @return <code>true</code> if this type is an instance of {@link AnnotatableType}, and
+	 * <code>false</code> otherwise
+	 * 			
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean isAnnotatable() {
+		return (this instanceof AnnotatableType);
+	}
 
 	/**
 	 * Resolves and returns the binding for this type.
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
index 720bf08..ac75589 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeBinding.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -74,10 +78,12 @@
 		Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | Modifier.STRICTFP;
 
 	org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding;
+	private TypeBinding prototype = null;
 	private String key;
 	private BindingResolver resolver;
 	private IVariableBinding[] fields;
 	private IAnnotationBinding[] annotations;
+	private IAnnotationBinding[] typeAnnotations;
 	private IMethodBinding[] methods;
 	private ITypeBinding[] members;
 	private ITypeBinding[] interfaces;
@@ -88,6 +94,8 @@
 	public TypeBinding(BindingResolver resolver, org.eclipse.jdt.internal.compiler.lookup.TypeBinding binding) {
 		this.binding = binding;
 		this.resolver = resolver;
+		org.eclipse.jdt.internal.compiler.lookup.TypeBinding compilerPrototype = binding.prototype();
+		this.prototype = (TypeBinding) (compilerPrototype == null || compilerPrototype == binding ? null : resolver.getTypeBinding(compilerPrototype)); //$IDENTITY-COMPARISON$
 	}
 
 	public ITypeBinding createArrayType(int dimension) {
@@ -100,6 +108,9 @@
 	}
 
 	public IAnnotationBinding[] getAnnotations() {
+		if (this.prototype != null) {
+			return this.prototype.getAnnotations();
+		}
 		if (this.annotations != null) {
 			return this.annotations;
 		}
@@ -122,29 +133,36 @@
 				Dependencies.release(this);
 			}
 // SH}
-			int length = internalAnnotations == null ? 0 : internalAnnotations.length;
-			if (length != 0) {
-				IAnnotationBinding[] tempAnnotations = new IAnnotationBinding[length];
-				int convertedAnnotationCount = 0;
-				for (int i = 0; i < length; i++) {
-					org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding internalAnnotation = internalAnnotations[i];
-					IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotation);
-					if (annotationInstance == null) {
-						continue;
-					}
-					tempAnnotations[convertedAnnotationCount++] = annotationInstance;
-				}
-				if (convertedAnnotationCount != length) {
-					if (convertedAnnotationCount == 0) {
-						return this.annotations = AnnotationBinding.NoAnnotations;
-					}
-					System.arraycopy(tempAnnotations, 0, (tempAnnotations = new IAnnotationBinding[convertedAnnotationCount]), 0, convertedAnnotationCount);
-				}
-				return this.annotations = tempAnnotations;
-			}
+			return this.annotations = resolveAnnotationBindings(refType.getAnnotations(), false);
 		}
 		return this.annotations = AnnotationBinding.NoAnnotations;
 	}
+	private IAnnotationBinding[] resolveAnnotationBindings(org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding[] internalAnnotations, boolean isTypeUse) {
+		int length = internalAnnotations == null ? 0 : internalAnnotations.length;
+		if (length != 0) {
+			IAnnotationBinding[] tempAnnotations = new IAnnotationBinding[length];
+			int convertedAnnotationCount = 0;
+			for (int i = 0; i < length; i++) {
+				org.eclipse.jdt.internal.compiler.lookup.AnnotationBinding internalAnnotation = internalAnnotations[i];
+				if (isTypeUse && internalAnnotation == null) {
+					break;
+				}
+				IAnnotationBinding annotationInstance = this.resolver.getAnnotationInstance(internalAnnotation);
+				if (annotationInstance == null) {
+					continue;
+				}
+				tempAnnotations[convertedAnnotationCount++] = annotationInstance;
+			}
+			if (convertedAnnotationCount != length) {
+				if (convertedAnnotationCount == 0) {
+					return this.annotations = AnnotationBinding.NoAnnotations;
+				}
+				System.arraycopy(tempAnnotations, 0, (tempAnnotations = new IAnnotationBinding[convertedAnnotationCount]), 0, convertedAnnotationCount);
+			}
+			return tempAnnotations;
+		}
+		return AnnotationBinding.NoAnnotations;
+	}
 
 	/*
 	 * @see ITypeBinding#getBinaryName()
@@ -246,6 +264,9 @@
 	 * @see ITypeBinding#getDeclaredFields()
 	 */
 	public synchronized IVariableBinding[] getDeclaredFields() {
+		if (this.prototype != null) {
+			return this.prototype.getDeclaredFields();
+		}
 		if (this.fields != null) {
 			return this.fields;
 		}
@@ -306,6 +327,9 @@
 	 * @see ITypeBinding#getDeclaredMethods()
 	 */
 	public synchronized IMethodBinding[] getDeclaredMethods() {
+		if (this.prototype != null) {
+			return this.prototype.getDeclaredMethods();
+		}
 		if (this.methods != null) {
 			return this.methods;
 		}
@@ -375,7 +399,7 @@
 	/*
 	 * @see ITypeBinding#getDeclaredTypes()
 	 */
-	public synchronized ITypeBinding[] getDeclaredTypes() {
+	public synchronized ITypeBinding[] getDeclaredTypes() { // should not deflect to prototype.
 		if (this.members != null) {
 			return this.members;
 		}
@@ -514,6 +538,13 @@
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getEnclosingType()
+	 */
+	public ITypeBinding getEnclosingType() {
+		return this.resolver.getTypeBinding(this.binding.enclosingType());
+	}
+	
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getErasure()
 	 */
 	public ITypeBinding getErasure() {
@@ -521,6 +552,9 @@
 	}
 
 	public synchronized ITypeBinding[] getInterfaces() {
+		if (this.prototype != null) {
+			return this.prototype.getInterfaces();
+		}
 		if (this.interfaces != null) {
 			return this.interfaces;
 		}
@@ -779,6 +813,7 @@
 			case Binding.TYPE_PARAMETER : // includes capture scenario
 			case Binding.WILDCARD_TYPE :
 			case Binding.INTERSECTION_TYPE:
+			case Binding.INTERSECTION_CAST_TYPE:
 				return null;
 		}
 		ReferenceBinding referenceBinding = (ReferenceBinding) this.binding;
@@ -875,7 +910,7 @@
 				}
 				return String.valueOf(buffer);
 			default :
-				if (isAnonymous() || this.binding.isLocalType()) {
+				if (isAnonymous() || this.binding.isLocalType() || this.binding.isIntersectionCastType()) {
 					return NO_NAME;
 				}
 				if (isPrimitive() || isNullType()) {
@@ -982,6 +1017,9 @@
 	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeArguments()
 	 */
 	public ITypeBinding[] getTypeArguments() {
+		if (this.prototype != null) {
+			return this.prototype.getTypeArguments();
+		}
 		if (this.typeArguments != null) {
 			return this.typeArguments;
 		}
@@ -1006,6 +1044,9 @@
 	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeBounds()
 	 */
 	public ITypeBinding[] getTypeBounds() {
+		if (this.prototype != null) {
+			return this.prototype.getTypeBounds();
+		}
 		if (this.bounds != null) {
 			return this.bounds;
 		}
@@ -1015,7 +1056,7 @@
 			org.eclipse.jdt.internal.compiler.lookup.TypeBinding firstClassOrArrayBound = typeVariableBinding.firstBound;
 			int boundsLength = 0;
 			if (firstClassOrArrayBound != null) {
-				if (firstClassOrArrayBound == varSuperclass) {
+				if (org.eclipse.jdt.internal.compiler.lookup.TypeBinding.equalsEquals(firstClassOrArrayBound, varSuperclass)) {
 					boundsLength++;
 				} else if (firstClassOrArrayBound.isArrayType()) { // capture of ? extends/super arrayType
 					boundsLength++;
@@ -1058,6 +1099,9 @@
 	 * @see org.eclipse.jdt.core.dom.ITypeBinding#getTypeParameters()
 	 */
 	public ITypeBinding[] getTypeParameters() {
+		if (this.prototype != null) {
+			return this.prototype.getTypeParameters();
+		}
 		if (this.typeParameters != null) {
 			return this.typeParameters;
 		}
@@ -1233,6 +1277,9 @@
 			return false;
 		}
 		org.eclipse.jdt.internal.compiler.lookup.TypeBinding otherBinding = ((TypeBinding) other).binding;
+		if (org.eclipse.jdt.internal.compiler.lookup.TypeBinding.equalsEquals(otherBinding.unannotated(), this.binding.unannotated())) {
+			return true;
+		}
 		// check return type
 		return BindingComparator.isEqual(this.binding, otherBinding);
 	}
@@ -1281,6 +1328,20 @@
 		return false;
 	}
 
+
+	/*
+	 * @see ITypeBinding#isFunctionalInterface()
+	 */
+	public boolean isFunctionalInterface() {
+		if (isInterface()) {
+			ReferenceBinding referenceBinding = (ReferenceBinding)this.binding;
+			if (referenceBinding != null) {
+				return referenceBinding.isFunctionalInterface(this.resolver.scope());
+			}
+		}
+		return false;
+	}
+
 	/*
 	 * @see ITypeBinding#isInterface()
 	 */
@@ -1558,4 +1619,15 @@
 	public String toString() {
 		return this.binding.toString();
 	}
+
+	/*
+	 * @see ITypeBinding#getTypeUseAnnotations()
+	 */
+	public IAnnotationBinding[] getTypeAnnotations() {
+		if (this.typeAnnotations != null) {
+			return this.typeAnnotations;
+		}
+		this.typeAnnotations = resolveAnnotationBindings(this.binding.getTypeAnnotations(), true);
+		return this.typeAnnotations;
+	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
index 0d60df9..5fff500 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -21,25 +21,7 @@
 /**
  * Type declaration AST node type. A type declaration
  * is the union of a class declaration and an interface declaration.
- * For JLS2:
- * <pre>
- * TypeDeclaration:
- * 		ClassDeclaration
- * 		InterfaceDeclaration
- * ClassDeclaration:
- *      [ Javadoc ] { Modifier } <b>class</b> Identifier
- *			[ <b>extends</b> Type]
- *			[ <b>implements</b> Type { <b>,</b> Type } ]
- *			<b>{</b> { ClassBodyDeclaration | <b>;</b> } <b>}</b>
- * InterfaceDeclaration:
- *      [ Javadoc ] { Modifier } <b>interface</b> Identifier
- *			[ <b>extends</b> Type { <b>,</b> Type } ]
- * 			<b>{</b> { InterfaceBodyDeclaration | <b>;</b> } <b>}</b>
- * </pre>
- * For JLS3, type parameters and reified modifiers
- * (and annotations) were added, and the superclass type name and superinterface
- * types names are generalized to type so that parameterized types can be
- * referenced:
+ * 
  * <pre>
  * TypeDeclaration:
  * 		ClassDeclaration
@@ -80,6 +62,7 @@
 
 	/**
 	 * The "modifiers" structural property of this node type (type: {@link Integer}) (JLS2 API only).
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #MODIFIERS2_PROPERTY}.
 	 * @since 3.0
 	 */
 	public static final SimplePropertyDescriptor MODIFIERS_PROPERTY =
@@ -136,6 +119,7 @@
 	/**
 	 * The "superclass" structural property of this node type (child type: {@link Name}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #SUPERCLASS_TYPE_PROPERTY}.
 	 */
 	public static final ChildPropertyDescriptor SUPERCLASS_PROPERTY =
 		new ChildPropertyDescriptor(TypeDeclaration.class, "superclass", Name.class, OPTIONAL, NO_CYCLE_RISK); //$NON-NLS-1$
@@ -143,6 +127,7 @@
 	/**
 	 * The "superInterfaces" structural property of this node type (element type: {@link Name}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #SUPER_INTERFACE_TYPES_PROPERTY}.
 	 */
 	public static final ChildListPropertyDescriptor SUPER_INTERFACES_PROPERTY =
 		new ChildListPropertyDescriptor(TypeDeclaration.class, "superInterfaces", Name.class, NO_CYCLE_RISK); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java
index 515042b..515b5a7 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeDeclarationStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -20,12 +20,6 @@
  * This kind of node is used to convert a type declaration
  * node into a statement node by wrapping it.
  * </p>
- * For JLS2:
- * <pre>
- * TypeDeclarationStatement:
- *    TypeDeclaration
- * </pre>
- * For JLS3, the kinds of type declarations grew to include enum declarations:
  * <pre>
  * TypeDeclarationStatement:
  *    TypeDeclaration
@@ -43,6 +37,7 @@
 	/**
 	 * The "typeDeclaration" structural property of this node type (child type: {@link TypeDeclaration}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #DECLARATION_PROPERTY}.
 	 */
 	public static final ChildPropertyDescriptor TYPE_DECLARATION_PROPERTY =
 		new ChildPropertyDescriptor(TypeDeclarationStatement.class, "typeDeclaration", TypeDeclaration.class, MANDATORY, CYCLE_RISK); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java
new file mode 100644
index 0000000..1cebbe4
--- /dev/null
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeMethodReference.java
@@ -0,0 +1,304 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.dom;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Type method reference expression AST node type (added in JLS8 API).
+ * <pre>
+ * TypeMethodReference:
+ *     Type <b>::</b> 
+ *         [ <b>&lt;</b> Type { <b>,</b> Type } <b>&gt;</b> ]
+ *         Identifier
+ * </pre>
+ *
+ * @since 3.9 BETA_JAVA8
+ * @noinstantiate This class is not intended to be instantiated by clients.
+ */
+public class TypeMethodReference extends MethodReference {
+
+	/**
+	 * The "type" structural property of this node type (child type: {@link Type}).
+	 */
+	public static final ChildPropertyDescriptor TYPE_PROPERTY =
+		new ChildPropertyDescriptor(TypeMethodReference.class, "type", Type.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * The "typeArguments" structural property of this node type (element type: {@link Type}) 
+	 */
+	public static final ChildListPropertyDescriptor TYPE_ARGUMENTS_PROPERTY =
+		internalTypeArgumentsFactory(TypeMethodReference.class);
+
+	/**
+	 * The "name" structural property of this node type (child type: {@link SimpleName}. 
+	 */
+	public static final ChildPropertyDescriptor NAME_PROPERTY =
+		new ChildPropertyDescriptor(TypeMethodReference.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+	
+	static {
+		List propertyList = new ArrayList(4);
+		createPropertyList(TypeMethodReference.class, propertyList);
+		addProperty(TYPE_PROPERTY, propertyList);
+		addProperty(TYPE_ARGUMENTS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
+	}
+
+	/**
+	 * Returns a list of structural property descriptors for this node type.
+	 * Clients must not modify the result.
+	 *
+	 * @param apiLevel the API level; one of the AST.JLS* constants
+	 * @return a list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor})
+	 */
+	public static List propertyDescriptors(int apiLevel) {
+		return PROPERTY_DESCRIPTORS_8_0;
+	}
+
+	/**
+	 * The type; lazily initialized; defaults to an unspecified type.
+	 */
+	private Type type = null;
+
+	/**
+	 * The method name; lazily initialized; defaults to an unspecified,
+	 * legal Java method name.
+	 */
+	private SimpleName methodName = null;
+
+	/**
+	 * Creates a new AST node for an TypeMethodReference declaration owned
+	 * by the given AST.
+	 * <p>
+	 * N.B. This constructor is package-private; all subclasses must be
+	 * declared in the same package; clients are unable to declare
+	 * additional subclasses.
+	 * </p>
+	 *
+	 * @param ast the AST that is to own this node
+	 */
+	TypeMethodReference(AST ast) {
+		super(ast);
+		unsupportedIn2_3_4();
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on MethodReference.
+	 */
+	final ChildListPropertyDescriptor internalTypeArgumentsProperty() {
+		return TYPE_ARGUMENTS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalStructuralPropertiesForType(int apiLevel) {
+		return propertyDescriptors(apiLevel);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
+		if (property == NAME_PROPERTY) {
+			if (get) {
+				return getName();
+			} else {
+				setName((SimpleName) child);
+				return null;
+			}
+		}
+		if (property == TYPE_PROPERTY) {
+			if (get) {
+				return getType();
+			} else {
+				setType((Type) child);
+				return null;
+			}
+		}
+		// allow default implementation to flag the error
+		return super.internalGetSetChildProperty(property, get, child);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == TYPE_ARGUMENTS_PROPERTY) {
+			return typeArguments();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final int getNodeType0() {
+		return TYPE_METHOD_REFERENCE;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	ASTNode clone0(AST target) {
+		TypeMethodReference result = new TypeMethodReference(target);
+		result.setSourceRange(getStartPosition(), getLength());
+		result.setType((Type) ASTNode.copySubtree(target, getType()));
+		result.typeArguments().addAll(ASTNode.copySubtrees(target, typeArguments()));
+		result.setName((SimpleName) getName().clone(target));
+		return result;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	final boolean subtreeMatch0(ASTMatcher matcher, Object other) {
+		// dispatch to correct overloaded match method
+		return matcher.match(this, other);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	void accept0(ASTVisitor visitor) {
+		boolean visitChildren = visitor.visit(this);
+		if (visitChildren) {
+			// visit children in normal left to right reading order
+			acceptChild(visitor, getType());
+			acceptChildren(visitor, this.typeArguments);
+			acceptChild(visitor, getName());
+		}
+		visitor.endVisit(this);
+	}
+
+	/**
+	 * Returns the type of this type method reference expression.
+	 *
+	 * @return the type node
+	 */
+	public Type getType() {
+		if (this.type == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.type == null) {
+					preLazyInit();
+					this.type = new SimpleType(this.ast);
+					postLazyInit(this.type, TYPE_PROPERTY);
+				}
+			}
+		}
+		return this.type;
+	}
+
+	/**
+	 * Sets the type of this type method reference expression.
+	 *
+	 * @param type the new type node
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setType(Type type) {
+		if (type == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.type;
+		preReplaceChild(oldChild, type, TYPE_PROPERTY);
+		this.type = type;
+		postReplaceChild(oldChild, type, TYPE_PROPERTY);
+	}
+
+	/**
+	 * Returns the live ordered list of type arguments of this type method reference expression.
+	 *
+	 * @return the live list of type arguments
+	 *    (element type: {@link Type})
+	 */
+	public List typeArguments() {
+		return this.typeArguments;
+	}
+
+	/**
+	 * Returns the name of the method referenced in this expression.
+	 *
+	 * @return the method name node
+	 */
+	public SimpleName getName() {
+		if (this.methodName == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.methodName == null) {
+					preLazyInit();
+					this.methodName = new SimpleName(this.ast);
+					postLazyInit(this.methodName, NAME_PROPERTY);
+				}
+			}
+		}
+		return this.methodName;
+	}
+
+	/**
+	 * Sets the name of the method referenced in this expression to the
+	 * given name.
+	 *
+	 * @param name the new method name
+	 * @exception IllegalArgumentException if:
+	 * <ul>
+	 * <li>the node belongs to a different AST</li>
+	 * <li>the node already has a parent</li>
+	 * </ul>
+	 */
+	public void setName(SimpleName name) {
+		if (name == null) {
+			throw new IllegalArgumentException();
+		}
+		ASTNode oldChild = this.methodName;
+		preReplaceChild(oldChild, name, NAME_PROPERTY);
+		this.methodName = name;
+		postReplaceChild(oldChild, name, NAME_PROPERTY);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int memSize() {
+		// treat Code as free
+		return BASE_NODE_SIZE + 3 * 4;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
+	int treeSize() {
+		return
+			memSize()
+			+ (this.type == null ? 0 : getType().treeSize())
+			+ (this.typeArguments == null ? 0 : this.typeArguments.listSize())
+			+ (this.methodName == null ? 0 : getName().treeSize());
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java
index 9246581..82c0481 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/TypeParameter.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -17,9 +21,10 @@
 
 /**
  * Type parameter node (added in JLS3 API).
+ * 
  * <pre>
  * TypeParameter:
- *    TypeVariable [ <b>extends</b> Type { <b>&</b> Type } ]
+ *    { Annotation } TypeVariable [ <b>extends</b> Type { <b>&</b> Type } ]
  * </pre>
  *
  * @since 3.1
@@ -28,6 +33,13 @@
 public class TypeParameter extends ASTNode {
 
 	/**
+	 * The "annotations" structural property of this node type (element type: {@link Annotation}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
+			new ChildListPropertyDescriptor(TypeParameter.class, "annotations", Annotation.class, CYCLE_RISK); //$NON-NLS-1$
+	
+	/**
 	 * The "name" structural property of this node type (child type: {@link SimpleName}).
 	 */
 	public static final ChildPropertyDescriptor NAME_PROPERTY =
@@ -52,6 +64,13 @@
 	 * or null if uninitialized.
 	 */
 	private static final List PROPERTY_DESCRIPTORS;
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
 
 	static {
 		List propertyList = new ArrayList(3);
@@ -62,6 +81,16 @@
 		addProperty(VALUE_PARAMETER_PROPERTY, propertyList);
 // SH}
 		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+		
+		propertyList = new ArrayList(4);
+		createPropertyList(TypeParameter.class, propertyList);
+		addProperty(ANNOTATIONS_PROPERTY, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		addProperty(TYPE_BOUNDS_PROPERTY, propertyList);
+//{ObjectTeams: value parameter:
+		addProperty(VALUE_PARAMETER_PROPERTY, propertyList);
+// SH}
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 //{ObjectTeams: value parameter, <B base R>:
@@ -80,11 +109,18 @@
 	 * {@link StructuralPropertyDescriptor})
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		return PROPERTY_DESCRIPTORS;
+		switch (apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				return PROPERTY_DESCRIPTORS;
+			default :
+				return PROPERTY_DESCRIPTORS_8_0;
+		}
 	}
 
 	/**
-	 * The type variable node; lazily initialized; defaults to an unspecfied,
+	 * The type variable node; lazily initialized; defaults to an unspecified,
 	 * but legal, name.
 	 */
 	private SimpleName typeVariableName = null;
@@ -97,6 +133,13 @@
 		new ASTNode.NodeList(TYPE_BOUNDS_PROPERTY);
 
 	/**
+	 * The type annotations (element type: {@link Annotation}).
+	 * Null in JLS < 8. Added in JLS8; defaults to an empty list
+	 * (see constructor).
+	 */
+	private ASTNode.NodeList annotations = null;
+	
+	/**
 	 * Creates a new unparented node for a parameterized type owned by the
 	 * given AST. By default, an unspecified, but legal, type variable name,
 	 * and no type bounds.
@@ -109,6 +152,9 @@
 	TypeParameter(AST ast) {
 		super(ast);
 	    unsupportedIn2();
+	    if (ast.apiLevel >= AST.JLS8) {
+			this.annotations = new ASTNode.NodeList(ANNOTATIONS_PROPERTY);
+		}
 	}
 
 	/* (omit javadoc for this method)
@@ -152,6 +198,9 @@
 	 * Method declared on ASTNode.
 	 */
 	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == ANNOTATIONS_PROPERTY) {
+			return annotations();
+		}
 		if (property == TYPE_BOUNDS_PROPERTY) {
 			return typeBounds();
 		}
@@ -172,6 +221,10 @@
 	ASTNode clone0(AST target) {
 		TypeParameter result = new TypeParameter(target);
 		result.setSourceRange(getStartPosition(), getLength());
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.annotations().addAll(
+					ASTNode.copySubtrees(target, annotations()));
+		}
 		result.setName((SimpleName) ((ASTNode) getName()).clone(target));
 //{ObjectTeams: value parameter?
 		result.setIsValueParameter(this.isValueParameter());
@@ -196,6 +249,9 @@
 		boolean visitChildren = visitor.visit(this);
 		if (visitChildren) {
 			// visit children in normal left to right reading order
+			if (this.ast.apiLevel >= AST.JLS8) {
+				acceptChildren(visitor, this.annotations);
+			}
 			acceptChild(visitor, getName());
 			acceptChildren(visitor, this.typeBounds);
 		}
@@ -269,6 +325,22 @@
 	public List typeBounds() {
 		return this.typeBounds;
 	}
+	
+	/**
+	 * Returns the live ordered list of annotations for this TypeParameter node (added in JLS8 API).
+	 *
+	 * @return the live list of annotations (element type: {@link Annotation})
+	 * @exception UnsupportedOperationException if this operation is used
+	 *            in a JLS2, JLS3 or JLS4 AST
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public List annotations() {
+		// more efficient than just calling unsupportedIn2_3_4() to check
+		if (this.annotations == null) {
+			unsupportedIn2_3_4();
+		}
+		return this.annotations;
+	}
 
 //{ObjectTeams: value parameters & <B base R>:
 	/**
@@ -309,7 +381,7 @@
 	 */
 	int memSize() {
 		// treat Code as free
-		return BASE_NODE_SIZE + 2 * 4;
+		return BASE_NODE_SIZE + 3 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -318,6 +390,7 @@
 	int treeSize() {
 		return
 			memSize()
+			+ (this.annotations == null ? 0 : this.annotations.listSize())
 			+ (this.typeVariableName == null ? 0 : getName().treeSize())
 			+ this.typeBounds.listSize();
 	}
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
index fc388e8..e06343f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclaration.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -11,8 +11,10 @@
 
 package org.eclipse.jdt.core.dom;
 
+import java.util.List;
+
 /**
- * Abstract base class of all AST node types that declare a single local
+ * Abstract base class of all AST node types that declare a single
  * variable.
  * <p>
  * <pre>
@@ -29,26 +31,141 @@
 public abstract class VariableDeclaration extends ASTNode {
 
 	/**
-	 * Returns structural property descriptor for the "extraDimensions" property
-	 * of this node (type: {@link Integer}).
+	 * The variable name; lazily initialized; defaults to an unspecified,
+	 * legal Java identifier.
+	 */
+	SimpleName variableName = null;
+
+	/**
+	 * The number of extra array dimensions that appear after the variable;
+	 * defaults to 0. Not used in JLS8 and later.
+	 *
+	 * @since 2.1
+	 * @deprecated In JLS8 and later, use {@link #extraDimensions} instead.
+	 */
+	int extraArrayDimensions = 0;
+
+	/**
+	 * List of extra dimensions this node has with optional annotations
+	 * (element type: {@link Dimension}).
+	 * Null before JLS8. Added in JLS8; defaults to an empty list
+	 * (see constructor).
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	ASTNode.NodeList extraDimensions = null;
+
+	/**
+	 * The initializer expression, or <code>null</code> if none;
+	 * defaults to none.
+	 */
+	Expression optionalInitializer = null;
+
+	/**
+	 * Creates and returns a structural property descriptor for the
+	 * "name" property declared on the given concrete node type (child type: {@link SimpleName}).
+	 *
+	 * @return the property descriptor
+	 */
+	static final ChildPropertyDescriptor internalNamePropertyFactory(Class nodeClass) {
+		return new ChildPropertyDescriptor(nodeClass, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+	}
+
+	/**
+	 * Creates and returns a structural property descriptor for the
+	 * "extraDimensions" property declared on the given concrete node type (type: {@link Integer}).
+	 *
+	 * @return the property descriptor
+	 * @deprecated In JLS8 and later, use {@link #internalExtraDimensions2PropertyFactory(Class)} instead.
+	 */
+	static final SimplePropertyDescriptor internalExtraDimensionsPropertyFactory(Class nodeClass) {
+		return 	new SimplePropertyDescriptor(nodeClass, "extraDimensions", int.class, MANDATORY); //$NON-NLS-1$
+	}
+	
+	/**
+	 * Creates and returns a structural property descriptor for the
+	 * "extraDimensions2" property declared on the given concrete node type (element type: {@link Dimension}).
+	 *
+	 * @return the property descriptor
+	 */
+	static final ChildListPropertyDescriptor internalExtraDimensions2PropertyFactory(Class nodeClass) {
+		return 	new ChildListPropertyDescriptor(nodeClass, "extraDimensions2", Dimension.class, CYCLE_RISK); //$NON-NLS-1$
+	}
+	
+	/**
+	 * Creates and returns a structural property descriptor for the
+	 * "initializer" property declared on the given concrete node type (child type: {@link Expression}).
+	 *
+	 * @return the property descriptor
+	 */
+	static final ChildPropertyDescriptor internalInitializerPropertyFactory(Class nodeClass) {
+		return 	new ChildPropertyDescriptor(nodeClass, "initializer", Expression.class, OPTIONAL, CYCLE_RISK); //$NON-NLS-1$
+	}
+
+	/**
+	 * Returns structural property descriptor for the "name" property
+	 * of this node (child type: {@link SimpleName}).
 	 *
 	 * @return the property descriptor
 	 * @since 3.1
 	 */
-	abstract SimplePropertyDescriptor internalExtraDimensionsProperty();
+	abstract ChildPropertyDescriptor internalNameProperty();
 
 	/**
-	 * Returns structural property descriptor for the "extraDimensions" property
-	 * of this node (type: {@link Integer}).
+	 * Returns the structural property descriptor for the "name" property
+	 * of this node (child type: {@link SimpleName}).
 	 *
 	 * @return the property descriptor
 	 * @since 3.1
 	 */
+	public final ChildPropertyDescriptor getNameProperty() {
+		return internalNameProperty();
+	}
+
+	
+	/**
+	 * Returns the structural property descriptor for the "extraDimensions" property
+	 * of this node (type: {@link Integer}) (below JLS8 only).
+	 *
+	 * @return the property descriptor
+	 * @since 3.1
+	 * @deprecated In JLS8 and later, use {@link #internalExtraDimensions2Property()} instead.
+	 */
+	abstract SimplePropertyDescriptor internalExtraDimensionsProperty();
+
+	/**
+	 * Returns the structural property descriptor for the "extraDimensions" property
+	 * of this node (type: {@link Integer}) (below JLS8 only).
+	 *
+	 * @return the property descriptor
+	 * @since 3.1
+	 * @deprecated In JLS8 and later, use {@link #getExtraDimensions2Property()} instead.
+	 */
 	public final SimplePropertyDescriptor getExtraDimensionsProperty() {
 		return internalExtraDimensionsProperty();
 	}
 
 	/**
+	 * Returns the structural property descriptor for the "extraDimensions" property
+	 * of this node (element type: {@link Dimension}) (added in JLS8 API).
+	 *
+	 * @return the property descriptor
+	 * @since 3.9 BETA_JAVA8
+	 */
+	abstract ChildListPropertyDescriptor internalExtraDimensions2Property();
+	
+	/**
+	 * Returns the structural property descriptor for the "extraDimensions" property
+	 * of this node (element type: {@link Dimension}) (added in JLS8 API).
+	 *
+	 * @return the property descriptor
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public final ChildListPropertyDescriptor getExtraDimensions2Property() {
+		return internalExtraDimensions2Property();
+	}
+	
+	/**
 	 * Returns structural property descriptor for the "initializer" property
 	 * of this node (child type: {@link Expression}).
 	 *
@@ -69,26 +186,6 @@
 	}
 
 	/**
-	 * Returns structural property descriptor for the "name" property
-	 * of this node (child type: {@link SimpleName}).
-	 *
-	 * @return the property descriptor
-	 * @since 3.1
-	 */
-	abstract ChildPropertyDescriptor internalNameProperty();
-
-	/**
-	 * Returns structural property descriptor for the "name" property
-	 * of this node (child type: {@link SimpleName}).
-	 *
-	 * @return the property descriptor
-	 * @since 3.1
-	 */
-	public final ChildPropertyDescriptor getNameProperty() {
-		return internalNameProperty();
-	}
-
-	/**
 	 * Creates a new AST node for a variable declaration owned by the given AST.
 	 * <p>
 	 * N.B. This constructor is package-private.
@@ -98,6 +195,9 @@
 	 */
 	VariableDeclaration(AST ast) {
 		super(ast);
+		if (ast.apiLevel >= AST.JLS8) {
+			this.extraDimensions = new ASTNode.NodeList(getExtraDimensions2Property());
+		}
 	}
 
 	/**
@@ -105,7 +205,19 @@
 	 *
 	 * @return the variable name node
 	 */
-	public abstract SimpleName getName();
+	public SimpleName getName() {
+		if (this.variableName == null) {
+			// lazy init must be thread-safe for readers
+			synchronized (this) {
+				if (this.variableName == null) {
+					preLazyInit();
+					this.variableName = new SimpleName(this.ast);
+					postLazyInit(this.variableName, internalNameProperty());
+				}
+			}
+		}
+		return this.variableName;
+	}
 
 	/**
 	 * Sets the name of the variable declared in this variable declaration
@@ -118,7 +230,16 @@
 	 * <li>the node already has a parent</li>
 	 * </ul>
 	 */
-	public abstract void setName(SimpleName variableName);
+	public void setName(SimpleName variableName) {
+		if (variableName == null) {
+			throw new IllegalArgumentException();
+		}
+		ChildPropertyDescriptor p = internalNameProperty();
+		ASTNode oldChild = this.variableName;
+		preReplaceChild(oldChild, variableName, p);
+		this.variableName = variableName;
+		postReplaceChild(oldChild, variableName, p);
+	}
 
 	/**
 	 * Returns the number of extra array dimensions over and above the
@@ -131,11 +252,23 @@
 	 * ASTs, even though there are really syntactic variants of the same
 	 * variable declaration.
 	 * </p>
+	 * <p>
+	 * In the JLS8 API, this method is a convenience method that
+	 * counts {@link #extraDimensions()}.
+	 * </p>
 	 *
 	 * @return the number of extra array dimensions
 	 * @since 2.1
 	 */
-	public abstract int getExtraDimensions();
+	public int getExtraDimensions() {
+		// more efficient than checking getAST().API_LEVEL
+		if (this.extraDimensions == null) {
+			// JLS2,3,4 behavior - bona fide property
+			return this.extraArrayDimensions;
+		} else {
+			return this.extraDimensions.size();
+		}
+	}
 
 	/**
 	 * Sets the number of extra array dimensions over and above the
@@ -152,9 +285,49 @@
 	 * @param dimensions the number of array dimensions
 	 * @exception IllegalArgumentException if the number of dimensions is
 	 *    negative
+	 * @exception UnsupportedOperationException if this operation is used in
+	 * a JLS8 or later AST 
+	 * @deprecated In the JLS8 API, this method is replaced by
+	 * {@link #extraDimensions()} which contains a list of {@link Dimension} nodes.
 	 * @since 2.1
 	 */
-	public abstract void setExtraDimensions(int dimensions);
+	public void setExtraDimensions(int dimensions) {
+		internalSetExtraDimensions(dimensions);
+	}
+
+	/**
+	 * Internal synonym for deprecated method. Used to avoid
+	 * deprecation warnings.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	final void internalSetExtraDimensions(int dimensions) {
+		// more efficient than just calling supportedOnlyIn2_3_4() to check
+		if (this.extraDimensions != null) {
+			supportedOnlyIn2_3_4();
+		}
+		if (dimensions < 0) {
+			throw new IllegalArgumentException();
+		}
+		SimplePropertyDescriptor p = internalExtraDimensionsProperty();
+		preValueChange(p);
+		this.extraArrayDimensions = dimensions;
+		postValueChange(p);
+	}
+
+	/**
+	 * Returns the live ordered list of extra dimensions with optional annotations (added in JLS8 API).
+	 *
+	 * @return the live list of extra dimensions with optional annotations (element type: {@link Dimension})
+	 * @exception UnsupportedOperationException if this operation is used below JLS8
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public List extraDimensions() {
+		// more efficient than just calling unsupportedIn2_3_4() to check
+		if (this.extraDimensions == null) {
+			unsupportedIn2_3_4();
+		}
+		return this.extraDimensions;
+	}
 
 	/**
 	 * Returns the initializer of this variable declaration, or
@@ -163,7 +336,9 @@
 	 * @return the initializer expression node, or <code>null</code> if
 	 *    there is none
 	 */
-	public abstract Expression getInitializer();
+	public Expression getInitializer() {
+		return this.optionalInitializer;
+	}
 
 	/**
 	 * Sets or clears the initializer of this variable declaration.
@@ -177,7 +352,13 @@
 	 * <li>a cycle in would be created</li>
 	 * </ul>
 	 */
-	public abstract void setInitializer(Expression initializer);
+	public void setInitializer(Expression initializer) {
+		ChildPropertyDescriptor p = internalInitializerProperty();
+		ASTNode oldChild = this.optionalInitializer;
+		preReplaceChild(oldChild, initializer, p);
+		this.optionalInitializer = initializer;
+		postReplaceChild(oldChild, initializer, p);
+	}
 
 	/**
 	 * Resolves and returns the binding for the variable declared in this
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java
index 9d6801c..7568b78 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationExpression.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,14 +25,6 @@
  * <code>ForStatement</code>, or wrapped in an <code>ExpressionStatement</code>
  * to form the equivalent of a <code>VariableDeclarationStatement</code>.
  * </p>
- * For JLS2:
- * <pre>
- * VariableDeclarationExpression:
- *    { Modifier } Type VariableDeclarationFragment
- *         { <b>,</b> VariableDeclarationFragment }
- * </pre>
- * For JLS3, the modifier flags were replaced by
- * a list of modifier nodes (intermixed with annotations):
  * <pre>
  * VariableDeclarationExpression:
  *    { ExtendedModifier } Type VariableDeclarationFragment
@@ -46,6 +38,7 @@
 
 	/**
 	 * The "modifiers" structural property of this node type (type: {@link Integer}) (JLS2 API only).
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #MODIFIERS2_PROPERTY}.
 	 * @since 3.0
 	 */
 	public static final SimplePropertyDescriptor MODIFIERS_PROPERTY =
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
index e9de7c8..8639d00 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationFragment.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,16 +16,16 @@
 
 /**
  * Variable declaration fragment AST node type, used in field declarations,
- * local variable declarations, and <code>ForStatement</code> initializers.
- * It contrast to <code>SingleVariableDeclaration</code>, fragments are
- * missing the modifiers and the type; these are located in the fragment's
- * parent node.
+ * local variable declarations, <code>ForStatement</code> initializers,
+ * and <code>LambdaExpression</code> parameters.
+ * In contrast to <code>SingleVariableDeclaration</code>, fragments are
+ * missing the modifiers and the type; these are either located in the fragment's
+ * parent node, or inferred (for lambda parameters).
  *
  * <pre>
  * VariableDeclarationFragment:
- *    Identifier { <b>[</b><b>]</b> } [ <b>=</b> Expression ]
+ *    Identifier { Dimension } [ <b>=</b> Expression ]
  * </pre>
- *
  * @since 2.0
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
@@ -36,21 +36,30 @@
 	 * @since 3.0
 	 */
 	public static final ChildPropertyDescriptor NAME_PROPERTY =
-		new ChildPropertyDescriptor(VariableDeclarationFragment.class, "name", SimpleName.class, MANDATORY, NO_CYCLE_RISK); //$NON-NLS-1$
+			internalNamePropertyFactory(VariableDeclarationFragment.class);
 
 	/**
-	 * The "extraDimensions" structural property of this node type (type: {@link Integer}).
+	 * The "extraDimensions" structural property of this node type (type: {@link Integer}) (below JLS8 only).
+	 *
 	 * @since 3.0
+	 * @deprecated in JLS8 and later, use {@link VariableDeclarationFragment#EXTRA_DIMENSIONS2_PROPERTY} instead.
 	 */
 	public static final SimplePropertyDescriptor EXTRA_DIMENSIONS_PROPERTY =
-		new SimplePropertyDescriptor(VariableDeclarationFragment.class, "extraDimensions", int.class, MANDATORY); //$NON-NLS-1$
+			internalExtraDimensionsPropertyFactory(VariableDeclarationFragment.class);
+
+	/**
+	 * The "extraDimensions2" structural property of this node type (element type: {@link Dimension}) (added in JLS8 API).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor EXTRA_DIMENSIONS2_PROPERTY =
+			internalExtraDimensions2PropertyFactory(VariableDeclarationFragment.class);
 
 	/**
 	 * The "initializer" structural property of this node type (child type: {@link Expression}).
 	 * @since 3.0
 	 */
 	public static final ChildPropertyDescriptor INITIALIZER_PROPERTY =
-		new ChildPropertyDescriptor(VariableDeclarationFragment.class, "initializer", Expression.class, OPTIONAL, CYCLE_RISK); //$NON-NLS-1$
+			internalInitializerPropertyFactory(VariableDeclarationFragment.class);
 
 	/**
 	 * A list of property descriptors (element type:
@@ -60,6 +69,14 @@
 	 */
 	private static final List PROPERTY_DESCRIPTORS;
 
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
+
 	static {
 		List propertyList = new ArrayList(4);
 		createPropertyList(VariableDeclarationFragment.class, propertyList);
@@ -67,6 +84,13 @@
 		addProperty(EXTRA_DIMENSIONS_PROPERTY, propertyList);
 		addProperty(INITIALIZER_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+
+		propertyList = new ArrayList(4);
+		createPropertyList(VariableDeclarationFragment.class, propertyList);
+		addProperty(NAME_PROPERTY, propertyList);
+		addProperty(EXTRA_DIMENSIONS2_PROPERTY, propertyList);
+		addProperty(INITIALIZER_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 	/**
@@ -80,28 +104,14 @@
 	 * @since 3.0
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		return PROPERTY_DESCRIPTORS;
+		if (apiLevel >= AST.JLS8) {
+			return PROPERTY_DESCRIPTORS_8_0;
+		} else {
+			return PROPERTY_DESCRIPTORS;
+		}
 	}
 
 	/**
-	 * The variable name; lazily initialized; defaults to an unspecified,
-	 * legal Java identifier.
-	 */
-	private SimpleName variableName = null;
-
-	/**
-	 * The number of extra array dimensions that this variable has;
-	 * defaults to 0.
-	 */
-	private int extraArrayDimensions = 0;
-
-	/**
-	 * The initializer expression, or <code>null</code> if none;
-	 * defaults to none.
-	 */
-	private Expression optionalInitializer = null;
-
-	/**
 	 * Creates a new AST node for a variable declaration fragment owned by the
 	 * given AST. By default, the variable declaration has: an unspecified
 	 * (but legal) variable name, no initializer, and no extra array dimensions.
@@ -119,24 +129,32 @@
 	 * Method declared on VariableDeclaration.
 	 * @since 3.1
 	 */
+	final ChildPropertyDescriptor internalNameProperty() {
+		return NAME_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on VariableDeclaration.
+	 * @since 3.1
+	 */
 	final SimplePropertyDescriptor internalExtraDimensionsProperty() {
 		return EXTRA_DIMENSIONS_PROPERTY;
 	}
 
 	/* (omit javadoc for this method)
 	 * Method declared on VariableDeclaration.
-	 * @since 3.1
+	 * @since 3.9 BETA_JAVA8
 	 */
-	final ChildPropertyDescriptor internalInitializerProperty() {
-		return INITIALIZER_PROPERTY;
+	final ChildListPropertyDescriptor internalExtraDimensions2Property() {
+		return EXTRA_DIMENSIONS2_PROPERTY;
 	}
-
+	
 	/* (omit javadoc for this method)
 	 * Method declared on VariableDeclaration.
 	 * @since 3.1
 	 */
-	final ChildPropertyDescriptor internalNameProperty() {
-		return NAME_PROPERTY;
+	final ChildPropertyDescriptor internalInitializerProperty() {
+		return INITIALIZER_PROPERTY;
 	}
 
 	/* (omit javadoc for this method)
@@ -154,7 +172,7 @@
 			if (get) {
 				return getExtraDimensions();
 			} else {
-				setExtraDimensions(value);
+				internalSetExtraDimensions(value);
 				return 0;
 			}
 		}
@@ -189,6 +207,17 @@
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == EXTRA_DIMENSIONS2_PROPERTY) {
+			return extraDimensions();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
 	final int getNodeType0() {
 		return VARIABLE_DECLARATION_FRAGMENT;
 	}
@@ -200,7 +229,12 @@
 		VariableDeclarationFragment result = new VariableDeclarationFragment(target);
 		result.setSourceRange(getStartPosition(), getLength());
 		result.setName((SimpleName) getName().clone(target));
-		result.setExtraDimensions(getExtraDimensions());
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.extraDimensions().addAll(
+					ASTNode.copySubtrees(target, extraDimensions()));
+		} else {
+			result.internalSetExtraDimensions(getExtraDimensions());
+		}
 		result.setInitializer(
 			(Expression) ASTNode.copySubtree(target, getInitializer()));
 		return result;
@@ -222,104 +256,20 @@
 		if (visitChildren) {
 			// visit children in normal left to right reading order
 			acceptChild(visitor, getName());
+			if (this.ast.apiLevel >= AST.JLS8) {
+				acceptChildren(visitor, this.extraDimensions);
+			}
 			acceptChild(visitor, getInitializer());
 		}
 		visitor.endVisit(this);
 	}
 
 	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public SimpleName getName() {
-		if (this.variableName == null) {
-			// lazy init must be thread-safe for readers
-			synchronized (this) {
-				if (this.variableName == null) {
-					preLazyInit();
-					this.variableName = new SimpleName(this.ast);
-					postLazyInit(this.variableName, NAME_PROPERTY);
-				}
-			}
-		}
-		return this.variableName;
-	}
-
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public void setName(SimpleName variableName) {
-		if (variableName == null) {
-			throw new IllegalArgumentException();
-		}
-		ASTNode oldChild = this.variableName;
-		preReplaceChild(oldChild, variableName, NAME_PROPERTY);
-		this.variableName = variableName;
-		postReplaceChild(oldChild, variableName, NAME_PROPERTY);
-	}
-
-	/**
-	 * Returns the number of extra array dimensions this variable has over
-	 * and above the type specified in the enclosing declaration.
-	 * <p>
-	 * For example, in the AST for <code>int[] i, j[], k[][]</code> the
-	 * variable declaration fragments for the variables <code>i</code>,
-	 * <code>j</code>, and <code>k</code>, have 0, 1, and 2 extra array
-	 * dimensions, respectively.
-	 * </p>
-	 *
-	 * @return the number of extra array dimensions this variable has over
-	 *         and above the type specified in the enclosing declaration
-	 * @since 2.0
-	 */
-	public int getExtraDimensions() {
-		return this.extraArrayDimensions;
-	}
-
-	/**
-	 * Sets the number of extra array dimensions this variable has over
-	 * and above the type specified in the enclosing declaration.
-	 * <p>
-	 * For example, in the AST for <code>int[] i, j[], k[][]</code> the
-	 * variable declaration fragments for the variables <code>i</code>,
-	 * <code>j</code>, and <code>k</code>, have 0, 1, and 2 extra array
-	 * dimensions, respectively.
-	 * </p>
-	 *
-	 * @param dimensions the given dimensions
-	 * @since 2.0
-	 */
-	public void setExtraDimensions(int dimensions) {
-		if (dimensions < 0) {
-			throw new IllegalArgumentException();
-		}
-		preValueChange(EXTRA_DIMENSIONS_PROPERTY);
-		this.extraArrayDimensions = dimensions;
-		postValueChange(EXTRA_DIMENSIONS_PROPERTY);
-	}
-
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public Expression getInitializer() {
-		return this.optionalInitializer;
-	}
-
-	/* (omit javadoc for this method)
-	 * Method declared on VariableDeclaration.
-	 */
-	public void setInitializer(Expression initializer) {
-		ASTNode oldChild = this.optionalInitializer;
-		preReplaceChild(oldChild, initializer, INITIALIZER_PROPERTY);
-		this.optionalInitializer = initializer;
-		postReplaceChild(oldChild, initializer, INITIALIZER_PROPERTY);
-	}
-
-	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	int memSize() {
 		// treat Operator as free
-		return BASE_NODE_SIZE + 3 * 4;
+		return BASE_NODE_SIZE + 4 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -329,6 +279,7 @@
 		return
 			memSize()
 			+ (this.variableName == null ? 0 : getName().treeSize())
+			+ (this.extraDimensions == null ? 0 : this.extraDimensions.listSize())
 			+ (this.optionalInitializer == null ? 0 : getInitializer().treeSize());
 	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java
index d54c9a9..3756136 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/VariableDeclarationStatement.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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,14 +22,6 @@
  * (<code>VariableDeclarationFragment</code>) into a statement
  * (<code>Statement</code>), all sharing the same modifiers and base type.
  * </p>
- * For JLS2:
- * <pre>
- * VariableDeclarationStatement:
- *    { Modifier } Type VariableDeclarationFragment
- *        { <b>,</b> VariableDeclarationFragment } <b>;</b>
- * </pre>
- * For JLS3, the modifier flags were replaced by
- * a list of modifier nodes (intermixed with annotations):
  * <pre>
  * VariableDeclarationStatement:
  *    { ExtendedModifier } Type VariableDeclarationFragment
@@ -50,6 +42,7 @@
 	/**
 	 * The "modifiers" structural property of this node type (type: {@link Integer}) (JLS2 API only).
 	 * @since 3.0
+	 * @deprecated In the JLS3 API, this property is replaced by {@link #MODIFIERS2_PROPERTY}.
 	 */
 	public static final SimplePropertyDescriptor MODIFIERS_PROPERTY =
 		new SimplePropertyDescriptor(VariableDeclarationStatement.class, "modifiers", int.class, MANDATORY); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java
index 89abb28..93fd054 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/WildcardType.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2010 IBM Corporation and others.
+ * Copyright (c) 2003, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -18,7 +22,7 @@
  * Type node for a wildcard type (added in JLS3 API).
  * <pre>
  * WildcardType:
- *    <b>?</b> [ ( <b>extends</b> | <b>super</b>) Type ]
+ *    { Annotation } <b>?</b> [ ( <b>extends</b> | <b>super</b>) Type ]
  * </pre>
  * <p>
  * Not all node arrangements will represent legal Java constructs. In particular,
@@ -29,9 +33,16 @@
  * @since 3.1
  * @noinstantiate This class is not intended to be instantiated by clients.
  */
-public class WildcardType extends Type {
+public class WildcardType extends AnnotatableType {
 
 	/**
+	 * The "annotations" structural property of this node type (element type: {@link Annotation}).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final ChildListPropertyDescriptor ANNOTATIONS_PROPERTY =
+			internalAnnotationsPropertyFactory(WildcardType.class);
+	
+	/**
 	 * The "bound" structural property of this node type (child type: {@link Type}).
 	 */
 	public static final ChildPropertyDescriptor BOUND_PROPERTY =
@@ -49,6 +60,13 @@
 	 * or null if uninitialized.
 	 */
 	private static final List PROPERTY_DESCRIPTORS;
+	/**
+	 * A list of property descriptors (element type:
+	 * {@link StructuralPropertyDescriptor}),
+	 * or null if uninitialized.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final List PROPERTY_DESCRIPTORS_8_0;
 
 	static {
 		List propertyList = new ArrayList(3);
@@ -56,6 +74,13 @@
 		addProperty(BOUND_PROPERTY, propertyList);
 		addProperty(UPPER_BOUND_PROPERTY, propertyList);
 		PROPERTY_DESCRIPTORS = reapPropertyList(propertyList);
+		
+		propertyList = new ArrayList(4);
+		createPropertyList(WildcardType.class, propertyList);
+		addProperty(ANNOTATIONS_PROPERTY, propertyList);
+		addProperty(BOUND_PROPERTY, propertyList);
+		addProperty(UPPER_BOUND_PROPERTY, propertyList);
+		PROPERTY_DESCRIPTORS_8_0 = reapPropertyList(propertyList);
 	}
 
 	/**
@@ -69,7 +94,14 @@
 	 * {@link StructuralPropertyDescriptor})
 	 */
 	public static List propertyDescriptors(int apiLevel) {
-		return PROPERTY_DESCRIPTORS;
+		switch (apiLevel) {
+			case AST.JLS2_INTERNAL :
+			case AST.JLS3_INTERNAL :
+			case AST.JLS4_INTERNAL:
+				return PROPERTY_DESCRIPTORS;
+			default :
+				return PROPERTY_DESCRIPTORS_8_0;
+		}
 	}
 
 	/**
@@ -100,6 +132,14 @@
 	}
 
 	/* (omit javadoc for this method)
+	 * Method declared on AnnotatableType.
+	 * @since 3.9 BETA_JAVA8
+	 */
+	final ChildListPropertyDescriptor internalAnnotationsProperty() {
+		return ANNOTATIONS_PROPERTY;
+	}
+
+	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
 	final List internalStructuralPropertiesForType(int apiLevel) {
@@ -125,6 +165,17 @@
 	/* (omit javadoc for this method)
 	 * Method declared on ASTNode.
 	 */
+	final List internalGetChildListProperty(ChildListPropertyDescriptor property) {
+		if (property == ANNOTATIONS_PROPERTY) {
+			return annotations();
+		}
+		// allow default implementation to flag the error
+		return super.internalGetChildListProperty(property);
+	}
+	
+	/* (omit javadoc for this method)
+	 * Method declared on ASTNode.
+	 */
 	final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) {
 		if (property == BOUND_PROPERTY) {
 			if (get) {
@@ -151,6 +202,10 @@
 	ASTNode clone0(AST target) {
 		WildcardType result = new WildcardType(target);
 		result.setSourceRange(getStartPosition(), getLength());
+		if (this.ast.apiLevel >= AST.JLS8) {
+			result.annotations().addAll(
+					ASTNode.copySubtrees(target, annotations()));
+		}
 		result.setBound((Type) ASTNode.copySubtree(target, getBound()), isUpperBound());
 		return result;
 	}
@@ -170,6 +225,9 @@
 		boolean visitChildren = visitor.visit(this);
 		if (visitChildren) {
 			// visit children in normal left to right reading order
+			if (this.ast.apiLevel >= AST.JLS8) {
+				acceptChildren(visitor, this.annotations);
+			}
 			acceptChild(visitor, getBound());
 		}
 		visitor.endVisit(this);
@@ -264,7 +322,7 @@
 	 * Method declared on ASTNode.
 	 */
 	int memSize() {
-		return BASE_NODE_SIZE + 2 * 4;
+		return BASE_NODE_SIZE + 3 * 4;
 	}
 
 	/* (omit javadoc for this method)
@@ -273,6 +331,7 @@
 	int treeSize() {
 		return
 		memSize()
+		+ (this.annotations == null ? 0 : this.annotations.listSize())
 		+ (this.optionalBound == null ? 0 : getBound().treeSize());
 	}
 }
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
index 4b6d37f..d63aec7 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/rewrite/ImportRewrite.java
@@ -1108,7 +1108,7 @@
 
 			CompilationUnit usedAstRoot= this.astRoot;
 			if (usedAstRoot == null) {
-				ASTParser parser= ASTParser.newParser(AST.JLS4);
+				ASTParser parser= ASTParser.newParser(AST.JLS8);
 				parser.setSource(this.compilationUnit);
 				parser.setFocalPosition(0); // reduced AST
 				parser.setResolveBindings(false);
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java
index b275d8e..971678f 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/NaiveASTFlattener.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -57,6 +61,14 @@
 	private static final int JLS3 = AST.JLS3;
 
 	/**
+	 * Internal synonym for {@link AST#JLS4}. Use to alleviate
+	 * deprecation warnings.
+	 * @deprecated
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static final int JLS4 = AST.JLS4;
+
+	/**
 	 * The string buffer into which the serialized representation of the AST is
 	 * written.
 	 */
@@ -96,7 +108,7 @@
 	 * @deprecated
 	 * @since 3.4
 	 */
-	private Type getReturnType(MethodDeclaration node) {
+	private static Type getReturnType(MethodDeclaration node) {
 		return node.getReturnType();
 	}
 
@@ -106,7 +118,7 @@
 	 * @deprecated
 	 * @since 3.4
 	 */
-	private Name getSuperclass(TypeDeclaration node) {
+	private static Name getSuperclass(TypeDeclaration node) {
 		return node.getSuperclass();
 	}
 
@@ -116,10 +128,20 @@
 	 * @deprecated
 	 * @since 3.4
 	 */
-	private TypeDeclaration getTypeDeclaration(TypeDeclarationStatement node) {
+	private static TypeDeclaration getTypeDeclaration(TypeDeclarationStatement node) {
 		return node.getTypeDeclaration();
 	}
 
+	/**
+	 * Internal synonym for {@link MethodDeclaration#thrownExceptions()}. Use to alleviate
+	 * deprecation warnings.
+	 * @deprecated
+	 * @since 3.9 BETA_JAVA8
+	 */
+	private static List thrownExceptions(MethodDeclaration node) {
+		return node.thrownExceptions();
+	}
+
 	void printIndent() {
 		for (int i = 0; i < this.indent; i++)
 			this.buffer.append("  "); //$NON-NLS-1$
@@ -183,6 +205,41 @@
 	}
 
 	/**
+	 * reference node helper function that is common to all
+	 * the difference reference nodes.
+	 * 
+	 * @param typeArguments list of type arguments 
+	 */
+	private void visitReferenceTypeArguments(List typeArguments) {
+		this.buffer.append("::");//$NON-NLS-1$
+		if (!typeArguments.isEmpty()) {
+			this.buffer.append('<');
+			for (Iterator it = typeArguments.iterator(); it.hasNext(); ) {
+				Type t = (Type) it.next();
+				t.accept(this);
+				if (it.hasNext()) {
+					this.buffer.append(',');
+				}
+			}
+			this.buffer.append('>');
+		}
+	}
+	
+	private void visitTypeAnnotations(AnnotatableType node) {
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitAnnotationsList(node.annotations());
+		}
+	}
+
+	private void visitAnnotationsList(List annotations) {
+		for (Iterator it = annotations.iterator(); it.hasNext(); ) {
+			Annotation annotation = (Annotation) it.next();
+			annotation.accept(this);
+			this.buffer.append(' ');
+		}
+	}
+	
+	/**
 	 * Resets this printer so that it can be used again.
 	 */
 	public void reset() {
@@ -315,8 +372,18 @@
 	 * @see ASTVisitor#visit(ArrayType)
 	 */
 	public boolean visit(ArrayType node) {
-		node.getComponentType().accept(this);
-		this.buffer.append("[]");//$NON-NLS-1$
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			visitComponentType(node);
+			this.buffer.append("[]");//$NON-NLS-1$
+		} else {
+			node.getElementType().accept(this);
+			List dimensions = node.dimensions();
+			int size = dimensions.size();
+			for (int i = 0; i < size; i++) {
+				Dimension aDimension = (Dimension) dimensions.get(i);
+				aDimension.accept(this);
+			}
+		}
 		return false;
 	}
 
@@ -543,6 +610,25 @@
 	}
 	
 	/*
+	 * @see ASTVisitor#visit(CreationReference)
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(CreationReference node) {
+		node.getType().accept(this);
+		visitReferenceTypeArguments(node.typeArguments());
+		this.buffer.append("new");//$NON-NLS-1$
+		return false;
+	}
+
+	public boolean visit(Dimension node) {
+		this.buffer.append(" ");//$NON-NLS-1$
+		visitAnnotationsList(node.annotations());
+		this.buffer.append("[]"); //$NON-NLS-1$
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(DoStatement)
 	 */
 	public boolean visit(DoStatement node) {
@@ -654,6 +740,18 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(ExpressionMethodReference)
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(ExpressionMethodReference node) {
+		node.getExpression().accept(this);
+		visitReferenceTypeArguments(node.typeArguments());
+		node.getName().accept(this);
+		return false;
+	}	
+
+	/*
 	 * @see ASTVisitor#visit(ExpressionStatement)
 	 */
 	public boolean visit(ExpressionStatement node) {
@@ -817,6 +915,21 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(IntersectionType)
+	 * @since 3.7
+	 */
+	public boolean visit(IntersectionType node) {
+		for (Iterator it = node.types().iterator(); it.hasNext(); ) {
+			Type t = (Type) it.next();
+			t.accept(this);
+			if (it.hasNext()) {
+				this.buffer.append(" & "); //$NON-NLS-1$
+			}
+		}
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(Javadoc)
 	 */
 	public boolean visit(Javadoc node) {
@@ -842,6 +955,27 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(LambdaExpression)
+	 */
+	public boolean visit(LambdaExpression node) {
+		boolean hasParentheses = node.hasParentheses();
+		if (hasParentheses)
+			this.buffer.append('(');
+		for (Iterator it = node.parameters().iterator(); it.hasNext(); ) {
+			VariableDeclaration v = (VariableDeclaration) it.next();
+			v.accept(this);
+			if (it.hasNext()) {
+				this.buffer.append(",");//$NON-NLS-1$
+			}
+		}
+		if (hasParentheses)
+			this.buffer.append(')');
+		this.buffer.append(" -> "); //$NON-NLS-1$
+		node.getBody().accept(this);
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(LineComment)
 	 * @since 3.0
 	 */
@@ -924,6 +1058,22 @@
 		}
 		node.getName().accept(this);
 		this.buffer.append("(");//$NON-NLS-1$
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			Type receiverType = node.getReceiverType();
+			if (receiverType != null) {
+				receiverType.accept(this);
+				this.buffer.append(' ');
+				SimpleName qualifier = node.getReceiverQualifier();
+				if (qualifier != null) {
+					qualifier.accept(this);
+					this.buffer.append('.');
+				}
+				this.buffer.append("this"); //$NON-NLS-1$
+				if (node.parameters().size() > 0) {
+					this.buffer.append(',');
+				}
+			}
+		}
 		for (Iterator it = node.parameters().iterator(); it.hasNext(); ) {
 			SingleVariableDeclaration v = (SingleVariableDeclaration) it.next();
 			v.accept(this);
@@ -932,19 +1082,41 @@
 			}
 		}
 		this.buffer.append(")");//$NON-NLS-1$
-		for (int i = 0; i < node.getExtraDimensions(); i++) {
-			this.buffer.append("[]"); //$NON-NLS-1$
-		}
-		if (!node.thrownExceptions().isEmpty()) {
-			this.buffer.append(" throws ");//$NON-NLS-1$
-			for (Iterator it = node.thrownExceptions().iterator(); it.hasNext(); ) {
-				Name n = (Name) it.next();
-				n.accept(this);
-				if (it.hasNext()) {
-					this.buffer.append(", ");//$NON-NLS-1$
-				}
+		int size = node.getExtraDimensions();
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			List dimensions = node.extraDimensions();
+			for (int i = 0; i < size; i++) {
+				visit((Dimension) dimensions.get(i));
 			}
-			this.buffer.append(" ");//$NON-NLS-1$
+		} else {
+			for (int i = 0; i < size; i++) {
+				this.buffer.append("[]"); //$NON-NLS-1$
+			}
+		}
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			if (!thrownExceptions(node).isEmpty()) {
+				this.buffer.append(" throws ");//$NON-NLS-1$
+				for (Iterator it = thrownExceptions(node).iterator(); it.hasNext(); ) {
+					Name n = (Name) it.next();
+					n.accept(this);
+					if (it.hasNext()) {
+						this.buffer.append(", ");//$NON-NLS-1$
+					}
+				}				
+				this.buffer.append(" ");//$NON-NLS-1$
+			} 
+		} else {
+			if (!node.thrownExceptionTypes().isEmpty()) {				
+				this.buffer.append(" throws ");//$NON-NLS-1$
+				for (Iterator it = node.thrownExceptionTypes().iterator(); it.hasNext(); ) {
+					Type n = (Type) it.next();
+					n.accept(this);
+					if (it.hasNext()) {
+						this.buffer.append(", ");//$NON-NLS-1$
+					}
+				}	
+				this.buffer.append(" ");//$NON-NLS-1$				
+			}
 		}
 		if (node.getBody() == null) {
 			this.buffer.append(";\n");//$NON-NLS-1$
@@ -1099,6 +1271,18 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(PackageQualifiedType)
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(PackageQualifiedType node) {
+		node.getQualifier().accept(this);
+		this.buffer.append('.');
+		visitTypeAnnotations(node);
+		node.getName().accept(this);
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(ParameterizedType)
 	 * @since 3.1
 	 */
@@ -1148,6 +1332,7 @@
 	 * @see ASTVisitor#visit(PrimitiveType)
 	 */
 	public boolean visit(PrimitiveType node) {
+		visitTypeAnnotations(node);
 		this.buffer.append(node.getPrimitiveTypeCode().toString());
 		return false;
 	}
@@ -1169,6 +1354,7 @@
 	public boolean visit(QualifiedType node) {
 		node.getQualifier().accept(this);
 		this.buffer.append(".");//$NON-NLS-1$
+		visitTypeAnnotations(node);
 		node.getName().accept(this);
 		return false;
 	}
@@ -1199,7 +1385,9 @@
 	 * @see ASTVisitor#visit(SimpleType)
 	 */
 	public boolean visit(SimpleType node) {
-		return true;
+		visitTypeAnnotations(node);
+		node.getName().accept(this);
+		return false;
 	}
 
 	/*
@@ -1229,13 +1417,28 @@
 		node.getType().accept(this);
 		if (node.getAST().apiLevel() >= JLS3) {
 			if (node.isVarargs()) {
+				if (node.getAST().apiLevel() >= AST.JLS8) {
+					List annotations = node.varargsAnnotations();
+					if (annotations.size() > 0) {
+						this.buffer.append(' ');
+					}
+					visitAnnotationsList(annotations);
+				}
 				this.buffer.append("...");//$NON-NLS-1$
 			}
 		}
 		this.buffer.append(" ");//$NON-NLS-1$
 		node.getName().accept(this);
-		for (int i = 0; i < node.getExtraDimensions(); i++) {
-			this.buffer.append("[]"); //$NON-NLS-1$
+		int size = node.getExtraDimensions();
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			List dimensions = node.extraDimensions();
+			for (int i = 0; i < size; i++) {
+				visit((Dimension) dimensions.get(i));
+			}
+		} else {
+			for (int i = 0; i < size; i++) {
+				this.buffer.append("[]"); //$NON-NLS-1$
+			}
 		}
 		if (node.getInitializer() != null) {
 			this.buffer.append("=");//$NON-NLS-1$
@@ -1335,6 +1538,22 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(SuperMethodReference)
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(SuperMethodReference node) {
+		if (node.getQualifier() != null) {
+			node.getQualifier().accept(this);
+			this.buffer.append('.');
+		}
+		this.buffer.append("super");//$NON-NLS-1$
+		visitReferenceTypeArguments(node.typeArguments());
+		node.getName().accept(this);
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(SwitchCase)
 	 */
 	public boolean visit(SwitchCase node) {
@@ -1464,7 +1683,7 @@
 	public boolean visit(TryStatement node) {
 		printIndent();
 		this.buffer.append("try ");//$NON-NLS-1$
-		if (node.getAST().apiLevel() >= AST.JLS4) {
+		if (node.getAST().apiLevel() >= JLS4) {
 			List resources = node.resources();
 			if (!resources.isEmpty()) {
 				this.buffer.append('(');
@@ -1591,10 +1810,25 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(TypeMethodReference)
+	 * 
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(TypeMethodReference node) {
+		node.getType().accept(this);
+		visitReferenceTypeArguments(node.typeArguments());
+		node.getName().accept(this);
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(TypeParameter)
 	 * @since 3.1
 	 */
 	public boolean visit(TypeParameter node) {
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitAnnotationsList(node.annotations());
+		}
 		node.getName().accept(this);
 		if (!node.typeBounds().isEmpty()) {
 //{ObjectTeams: "base" bound?
@@ -1656,8 +1890,16 @@
 	 */
 	public boolean visit(VariableDeclarationFragment node) {
 		node.getName().accept(this);
-		for (int i = 0; i < node.getExtraDimensions(); i++) {
-			this.buffer.append("[]");//$NON-NLS-1$
+		int size = node.getExtraDimensions();
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			List dimensions = node.extraDimensions();
+			for (int i = 0; i < size; i++) {
+				visit((Dimension) dimensions.get(i));
+			}
+		} else {
+			for (int i = 0; i < size; i++) {
+				this.buffer.append("[]");//$NON-NLS-1$
+			}
 		}
 		if (node.getInitializer() != null) {
 			this.buffer.append("=");//$NON-NLS-1$
@@ -1707,6 +1949,7 @@
 	 * @since 3.1
 	 */
 	public boolean visit(WildcardType node) {
+		visitTypeAnnotations(node);
 		this.buffer.append("?");//$NON-NLS-1$
 		Type bound = node.getBound();
 		if (bound != null) {
@@ -1720,6 +1963,13 @@
 		return false;
 	}
 
+	/**
+	 * @deprecated
+	 */
+	private void visitComponentType(ArrayType node) {
+		node.getComponentType().accept(this);
+	}
+
 //{ObjectTeams: visit methods for OT-specific types
 	/*
 	 * @see ASTVisitor#visit(MethodSpec)
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java
index 636081c..d261a12 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/SourceRangeVerifier.java
@@ -1,113 +1,113 @@
-/*******************************************************************************
- * Copyright (c) 2013 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.internal.core.dom;
-
-import java.util.List;
-
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.ASTParser;
-import org.eclipse.jdt.core.dom.ASTVisitor;
-import org.eclipse.jdt.core.dom.ArrayCreation;
-import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;
-
-public class SourceRangeVerifier extends ASTVisitor {
-
-	public static boolean DEBUG = false;
-	public static boolean DEBUG_THROW = false;
-	
-	private StringBuffer bugs; 
-	
-	/**
-	 * Verifies proper node nesting as specified in {@link ASTParser#setKind(int)}:
-	 * <p>
-	 * Source ranges nest properly: the source range for a child is always
-	 * within the source range of its parent, and the source ranges of sibling
-	 * nodes never overlap.
-	 * </p>
-	 * 
-	 * @param node
-	 * @return <code>null</code> if everything is OK; a list of errors otherwise
-	 */
-	public String process(ASTNode node) {
-		StringBuffer buffer = new StringBuffer();
-		this.bugs = buffer;
-		node.accept(this);
-		this.bugs = null;
-		if (buffer.length() == 0)
-			return null;
-		return buffer.toString();
-	}
-	
-	public boolean preVisit2(ASTNode node) {
-		ASTNode previous = null;
-		
-		List properties = node.structuralPropertiesForType();
-		for (int i = 0; i < properties.size(); i++) {
-			StructuralPropertyDescriptor property = (StructuralPropertyDescriptor) properties.get(i);
-			if (property.isChildProperty()) {
-				ASTNode child = (ASTNode) node.getStructuralProperty(property);
-				if (child != null) {
-					boolean ok = checkChild(node, previous, child);
-					if (ok) {
-						previous = child;
-					} else {
-						return false;
-					}
-				}
-			} else if (property.isChildListProperty()) {
-				List children = (List) node.getStructuralProperty(property);
-				for (int j= 0; j < children.size(); j++) {
-					ASTNode child = (ASTNode) children.get(j);
-					boolean ok = checkChild(node, previous, child);
-					if (ok) {
-						previous = child;
-					} else {
-						return false;
-					}
-				}
-			}
-		}
-		return true;
-	}
-
-	private boolean checkChild(ASTNode parent, ASTNode previous, ASTNode child) {
-		if ((parent.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0
-				|| (child.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0)
-			return false; 
-		
-		int parentStart = parent.getStartPosition();
-		int parentEnd = parentStart + parent.getLength();
-		
-		int childStart = child.getStartPosition();
-		int childEnd = childStart + child.getLength();
-		
-		if (previous != null) {
-			// Turn a blind eye on a known problem ... see https://bugs.eclipse.org/391894#c4
-			if (child.getLocationInParent() == ArrayCreation.DIMENSIONS_PROPERTY)
-				return false;
-			
-			int previousStart = previous.getStartPosition();
-			int previousEnd = previousStart + previous.getLength();
-			if (childStart < previousEnd) {
-				String bug = "- parent [" + parentStart + ", " + parentEnd + "] " + parent.getClass().getName() + '\n' //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-						+ "   previous [" + previousStart + ", " + previousEnd + "] "  + previous.getClass().getName() + '\n'//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-						+ "   " + child.getLocationInParent().getId() + " [" + childStart + ", " + childEnd + "] " + child.getClass().getName() + '\n'; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-				this.bugs.append(bug);
-			}
-		}
-		if (!(parentStart <= childStart && childEnd <= parentEnd)) {
-			String bug = "- parent [" + parentStart + ", " + parentEnd + "] " + parent.getClass().getName() + '\n' //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-					   + "   " + child.getLocationInParent().getId() + " [" + childStart + ", " + childEnd + "] " + child.getClass().getName() + '\n'; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-			this.bugs.append(bug);
-		}
-		return true;
-	}
-}
+/*******************************************************************************

+ * Copyright (c) 2013 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.internal.core.dom;

+

+import java.util.List;

+

+import org.eclipse.jdt.core.dom.ASTNode;

+import org.eclipse.jdt.core.dom.ASTParser;

+import org.eclipse.jdt.core.dom.ASTVisitor;

+import org.eclipse.jdt.core.dom.ArrayCreation;

+import org.eclipse.jdt.core.dom.StructuralPropertyDescriptor;

+

+public class SourceRangeVerifier extends ASTVisitor {

+

+	public static boolean DEBUG = false;

+	public static boolean DEBUG_THROW = false;

+	

+	private StringBuffer bugs; 

+	

+	/**

+	 * Verifies proper node nesting as specified in {@link ASTParser#setKind(int)}:

+	 * <p>

+	 * Source ranges nest properly: the source range for a child is always

+	 * within the source range of its parent, and the source ranges of sibling

+	 * nodes never overlap.

+	 * </p>

+	 * 

+	 * @param node

+	 * @return <code>null</code> if everything is OK; a list of errors otherwise

+	 */

+	public String process(ASTNode node) {

+		StringBuffer buffer = new StringBuffer();

+		this.bugs = buffer;

+		node.accept(this);

+		this.bugs = null;

+		if (buffer.length() == 0)

+			return null;

+		return buffer.toString();

+	}

+	

+	public boolean preVisit2(ASTNode node) {

+		ASTNode previous = null;

+		

+		List properties = node.structuralPropertiesForType();

+		for (int i = 0; i < properties.size(); i++) {

+			StructuralPropertyDescriptor property = (StructuralPropertyDescriptor) properties.get(i);

+			if (property.isChildProperty()) {

+				ASTNode child = (ASTNode) node.getStructuralProperty(property);

+				if (child != null) {

+					boolean ok = checkChild(node, previous, child);

+					if (ok) {

+						previous = child;

+					} else {

+						return false;

+					}

+				}

+			} else if (property.isChildListProperty()) {

+				List children = (List) node.getStructuralProperty(property);

+				for (int j= 0; j < children.size(); j++) {

+					ASTNode child = (ASTNode) children.get(j);

+					boolean ok = checkChild(node, previous, child);

+					if (ok) {

+						previous = child;

+					} else {

+						return false;

+					}

+				}

+			}

+		}

+		return true;

+	}

+

+	private boolean checkChild(ASTNode parent, ASTNode previous, ASTNode child) {

+		if ((parent.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0

+				|| (child.getFlags() & (ASTNode.RECOVERED | ASTNode.MALFORMED)) != 0)

+			return false; 

+		

+		int parentStart = parent.getStartPosition();

+		int parentEnd = parentStart + parent.getLength();

+		

+		int childStart = child.getStartPosition();

+		int childEnd = childStart + child.getLength();

+		

+		if (previous != null) {

+			// Turn a blind eye on a known problem ... see https://bugs.eclipse.org/391894#c4

+			if (child.getLocationInParent() == ArrayCreation.DIMENSIONS_PROPERTY)

+				return false;

+			

+			int previousStart = previous.getStartPosition();

+			int previousEnd = previousStart + previous.getLength();

+			if (childStart < previousEnd) {

+				String bug = "- parent [" + parentStart + ", " + parentEnd + "] " + parent.getClass().getName() + '\n' //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

+						+ "   previous [" + previousStart + ", " + previousEnd + "] "  + previous.getClass().getName() + '\n'//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

+						+ "   " + child.getLocationInParent().getId() + " [" + childStart + ", " + childEnd + "] " + child.getClass().getName() + '\n'; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$

+				this.bugs.append(bug);

+			}

+		}

+		if (!(parentStart <= childStart && childEnd <= parentEnd)) {

+			String bug = "- parent [" + parentStart + ", " + parentEnd + "] " + parent.getClass().getName() + '\n' //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

+					   + "   " + child.getLocationInParent().getId() + " [" + childStart + ", " + childEnd + "] " + child.getClass().getName() + '\n'; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$

+			this.bugs.append(bug);

+		}

+		return true;

+	}

+}

diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
index 3838fa2..4930496 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteAnalyzer.java
@@ -4,6 +4,10 @@
  * 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -63,19 +67,66 @@
  */
 public final class ASTRewriteAnalyzer extends ASTVisitor {
 
-	/**
-	 * Internal synonym for deprecated constant AST.JLS2
-	 * to alleviate deprecated warnings.
-	 * @deprecated
-	 */
-	/*package*/ static final int JLS2_INTERNAL = AST.JLS2;
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY = ArrayType.COMPONENT_TYPE_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_FIELD_MODIFIERS_PROPERTY = FieldDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_INITIALIZER_MODIFIERS_PROPERTY3 = Initializer.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_METHOD_MODIFIERS_PROPERTY2 = MethodDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_METHOD_RETURN_TYPE_PROPERTY = MethodDeclaration.RETURN_TYPE_PROPERTY;
 	
-	/**
-	 * Internal synonym for deprecated constant AST.JLS3
-	 * to alleviate deprecated warnings.
-	 * @deprecated
-	 */
-	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY = MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildListPropertyDescriptor INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY = MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_TYPE_MODIFIERS_PROPERTY = TypeDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_TYPE_SUPERCLASS_PROPERTY = TypeDeclaration.SUPERCLASS_PROPERTY;
+	
+	/** @deprecated using deprecated code */
+	private static final ChildListPropertyDescriptor INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY = TypeDeclaration.SUPER_INTERFACES_PROPERTY;
+	
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_CIC_NAME_PROPERTY = ClassInstanceCreation.NAME_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY = VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_TDS_TYPE_DECLARATION_PROPERTY = TypeDeclarationStatement.TYPE_DECLARATION_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VARIABLE_MODIFIERS_PROPERTY = SingleVariableDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VARIABLE_EXTRA_DIMENSIONS_PROPERTY = SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VDE_MODIFIERS_PROPERTY = VariableDeclarationExpression.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VDS_MODIFIERS_PROPERTY = VariableDeclarationStatement.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final int JLS2_INTERNAL = AST.JLS2;
+	
+	/** @deprecated using deprecated code */
+	private static final int JLS3_INTERNAL = AST.JLS3;
+	
+	/** @deprecated using deprecated code */
+	private static final int JLS4_INTERNAL = AST.JLS4;
+
 
 	TextEdit currentEdit;
 	final RewriteEventStore eventStore; // used from inner classes
@@ -91,17 +142,17 @@
 	private final NodeInfoStore nodeInfos;
 	private final TargetSourceRangeComputer extendedSourceRangeComputer;
 	private final LineCommentEndOffsets lineCommentEndOffsets;
-
+	
 	private int beforeRequiredSpaceIndex = -1;
-
+	
 	Map options;
-
+	
 	private RecoveryScannerData recoveryScannerData;
 
 	/**
 	 * Constructor for ASTRewriteAnalyzer.
 	 * <p>The given options cannot be null.</p>
-	 *
+	 * 
 	 * @param content the content of the compilation unit to rewrite.
 	 * @param lineInfo line information for the content of the compilation unit to rewrite.
 	 * @param rootEdit the edit to add all generated edits to
@@ -136,9 +187,9 @@
 
 		this.extendedSourceRangeComputer = extendedSourceRangeComputer;
 		this.lineCommentEndOffsets= new LineCommentEndOffsets(comments);
-
+		
 		this.options = options;
-
+		
 		this.recoveryScannerData = recoveryScannerData;
 	}
 
@@ -147,7 +198,7 @@
 			CompilerOptions compilerOptions = new CompilerOptions(this.options);
 			Scanner scanner;
 			if (this.recoveryScannerData == null) {
-				scanner =
+				scanner = 
 					new Scanner(
 							true,/*tokenizeComments*/
 							false,/*tokenizeWhiteSpace*/
@@ -582,7 +633,7 @@
 						if (separatorState == EXISTING) {
 							updateIndent(prevMark, currPos, i, editGroup);
 						}
-
+						
 						doTextInsert(currPos, node, getNodeIndent(i), true, editGroup); // insert node
 
 						separatorState= NEW;
@@ -642,7 +693,7 @@
 						if (i < lastNonDelete) {
 							updateIndent(prevMark, currPos, i, editGroup);
 						}
-
+						
 						// remove element and next separator
 						int end= getStartOfNextNode(nextIndex, currEnd); // start of next
 						// https://bugs.eclipse.org/bugs/show_bug.cgi?id=306524
@@ -679,7 +730,7 @@
 
 						TextEditGroup editGroup= getEditGroup(currEvent);
 						ASTNode changed= (ASTNode) currEvent.getNewValue();
-
+						
 						updateIndent(prevMark, currPos, i, editGroup);
 						// make sure that comments between last modified source position and extended starting position of
 						// node to be replaced are not touched
@@ -730,7 +781,7 @@
 						separatorState= EXISTING;
 					}
 				}
-
+				
 				prevMark = currMark;
 			}
 			return currPos;
@@ -738,7 +789,7 @@
 		public final int rewriteList(ASTNode parent, StructuralPropertyDescriptor property, int offset, String keyword) {
 			return rewriteList(parent, property, keyword, null, offset);
 		}
-
+		
 		protected void updateIndent(int prevMark, int originalOffset, int nodeIndex, TextEditGroup editGroup) {
 			// Do nothing.
 		}
@@ -785,7 +836,7 @@
 				case RewriteEvent.REMOVED: {
 					ASTNode node= (ASTNode) event.getOriginalValue();
 					TextEditGroup editGroup= getEditGroup(event);
-
+					
 					// if there is a prefix, remove the prefix as well
 					int nodeEnd;
 					int len;
@@ -987,7 +1038,7 @@
 		protected String getSeparatorString(int nodeIndex) {
 			return getSeparatorString(nodeIndex, nodeIndex + 1);
 		}
-
+		
 		protected String getSeparatorString(int nodeIndex, int nextNodeIndex) {
 			int newLines= this.separatorLines == -1 ? getNewLines(nodeIndex) : this.separatorLines;
 
@@ -1061,17 +1112,17 @@
 			}
 			return 0;
 		}
-
+		
 		protected boolean mustRemoveSeparator(int originalOffset, int nodeIndex) {
 			// Do not remove separator if the previous non removed node is on the same line and the next node is on another line
 			int previousNonRemovedNodeIndex = nodeIndex - 1;
 			while (previousNonRemovedNodeIndex >= 0 && this.list[previousNonRemovedNodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
 				previousNonRemovedNodeIndex--;
 			}
-
+			
 			if (previousNonRemovedNodeIndex > -1) {
 				LineInformation lineInformation = getLineInformation();
-
+				
 				RewriteEvent prevEvent = this.list[previousNonRemovedNodeIndex];
 				int prevKind = prevEvent.getChangeKind();
 				if (prevKind == RewriteEvent.UNCHANGED || prevKind == RewriteEvent.REPLACED) {
@@ -1079,23 +1130,23 @@
 					int prevEndPosition = prevNode.getStartPosition() + prevNode.getLength();
 					int prevLine = lineInformation.getLineOfOffset(prevEndPosition);
 					int line = lineInformation.getLineOfOffset(originalOffset);
-
+					
 					if (prevLine == line && nodeIndex + 1 < this.list.length) {
 						RewriteEvent nextEvent = this.list[nodeIndex + 1];
 						int nextKind = nextEvent.getChangeKind();
-
+						
 						if (nextKind == RewriteEvent.UNCHANGED || prevKind == RewriteEvent.REPLACED) {
 							ASTNode nextNode = (ASTNode) nextEvent.getOriginalValue();
 							int nextStartPosition = nextNode.getStartPosition();
 							int nextLine = lineInformation.getLineOfOffset(nextStartPosition);
-
+							
 							return nextLine == line;
 						}
 						return false;
 					}
 				}
 			}
-
+			
 			return true;
 		}
 	}
@@ -1223,6 +1274,10 @@
 		voidVisit(parent, MethodDeclaration.BODY_PROPERTY);
 	}
 
+	protected int rewriteExtraDimensionsInfo(ASTNode node, int pos, ChildListPropertyDescriptor property) {
+		return rewriteNodeList(node, property, pos, " ", " "); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+
 	private int rewriteExtraDimensions(ASTNode parent, StructuralPropertyDescriptor property, int pos) {
 		RewriteEvent event= getEvent(parent, property);
 		if (event == null || event.getChangeKind() == RewriteEvent.UNCHANGED) {
@@ -1471,7 +1526,12 @@
 		RewriteEvent[] children= event.getChildren();
 		boolean isAllInsert= isAllOfKind(children, RewriteEvent.INSERTED);
 		boolean isAllRemove= isAllOfKind(children, RewriteEvent.REMOVED);
-		if (isAllInsert || isAllRemove) {
+		String keyword= Util.EMPTY_STRING;
+		boolean isAnnotationsProperty = property == SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY 
+				|| node instanceof AnnotatableType && property == ((AnnotatableType) node).getAnnotationsProperty();
+		if (isAnnotationsProperty) {
+			keyword= " "; //$NON-NLS-1$
+		} else if (isAllInsert || isAllRemove) {
 			// update pos
 			try {
 				pos= getScanner().getNextStartOffset(pos, false);
@@ -1481,23 +1541,23 @@
 		}
 
 		Prefix formatterPrefix;
-		if (property == SingleVariableDeclaration.MODIFIERS2_PROPERTY)
+		if (property == SingleVariableDeclaration.MODIFIERS2_PROPERTY || isAnnotationsProperty)
 			formatterPrefix= this.formatter.PARAM_ANNOTATION_SEPARATION;
 		else
 			formatterPrefix= this.formatter.ANNOTATION_SEPARATION;
 
-		int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, Util.EMPTY_STRING, " "); //$NON-NLS-1$ 
+		int endPos= new ModifierRewriter(formatterPrefix).rewriteList(node, property, pos, keyword, " "); //$NON-NLS-1$ 
 
 		try {
 			int nextPos= getScanner().getNextStartOffset(endPos, false);
-
-			boolean lastUnchanged= children[children.length - 1].getChangeKind() != RewriteEvent.UNCHANGED;
+			RewriteEvent lastChild = children[children.length - 1];
+			boolean lastUnchanged= lastChild.getChangeKind() != RewriteEvent.UNCHANGED;
 
 			if (isAllRemove) {
-				doTextRemove(endPos, nextPos - endPos, getEditGroup(children[children.length - 1]));
+				doTextRemove(endPos, nextPos - endPos, getEditGroup(lastChild));
 				return nextPos;
-			} else if (isAllInsert || (nextPos == endPos && lastUnchanged)) { // see bug 165654
-				RewriteEvent lastChild= children[children.length - 1];
+			} else if ((isAllInsert || (nextPos == endPos && lastUnchanged)) // see bug 165654
+					&& !isAnnotationsProperty) {
 				String separator;
 				if (lastChild.getNewValue() instanceof Annotation) {
 					separator= formatterPrefix.getPrefix(getIndent(pos));
@@ -1511,7 +1571,14 @@
 		}
 		return endPos;
 	}
+	
+	private int rewriteTypeAnnotations(ASTNode node, ChildListPropertyDescriptor property, int pos) {
+		return rewriteModifiers2(node, property, pos);
+	}
 
+	private int rewriteVarargsAnnotations(ASTNode node, ChildListPropertyDescriptor property, int pos) {
+		return rewriteModifiers2(node, property, pos);
+	}
 
 	private void replaceOperation(int posBeforeOperation, String newOperation, TextEditGroup editGroup) {
 		try {
@@ -1567,7 +1634,7 @@
 			addEdit(edit);
 			this.currentEdit= edit;
 		}
-
+		
 		ensureSpaceBeforeReplace(node);
 	}
 
@@ -1623,7 +1690,7 @@
 
 		boolean isJLS2 = apiLevel == JLS2_INTERNAL;
 		if (isJLS2) {
-			rewriteModifiers(node, TypeDeclaration.MODIFIERS_PROPERTY, pos);
+			rewriteModifiers(node, INTERNAL_TYPE_MODIFIERS_PROPERTY, pos);
 		} else {
 			rewriteModifiers2(node, TypeDeclaration.MODIFIERS2_PROPERTY, pos);
 		}
@@ -1664,7 +1731,7 @@
 
 		// superclass
 		if (!isInterface || invertType) {
-			ChildPropertyDescriptor superClassProperty= isJLS2 ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY;
+			ChildPropertyDescriptor superClassProperty= isJLS2 ? INTERNAL_TYPE_SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY;
 
 			RewriteEvent superClassEvent= getEvent(node, superClassProperty);
 
@@ -1698,7 +1765,7 @@
 			}
 		}
 		// extended interfaces
-		ChildListPropertyDescriptor superInterfaceProperty= isJLS2 ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY;
+		ChildListPropertyDescriptor superInterfaceProperty= isJLS2 ? INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY;
 
 		RewriteEvent interfaceEvent= getEvent(node, superInterfaceProperty);
 		if (interfaceEvent == null || interfaceEvent.getChangeKind() == RewriteEvent.UNCHANGED) {
@@ -1757,7 +1824,7 @@
 	}
 
 	private void rewriteReturnType(MethodDeclaration node, boolean isConstructor, boolean isConstructorChange) {
-		ChildPropertyDescriptor property= (node.getAST().apiLevel() == JLS2_INTERNAL) ? MethodDeclaration.RETURN_TYPE_PROPERTY : MethodDeclaration.RETURN_TYPE2_PROPERTY;
+		ChildPropertyDescriptor property= (node.getAST().apiLevel() == JLS2_INTERNAL) ? INTERNAL_METHOD_RETURN_TYPE_PROPERTY : MethodDeclaration.RETURN_TYPE2_PROPERTY;
 
 		// weakness in the AST: return type can exist, even if missing in source
 		ASTNode originalReturnType= (ASTNode) getOriginalValue(node, property);
@@ -1783,7 +1850,104 @@
 			}
 		}
 	}
+	
+	private int rewriteMethodReceiver(MethodDeclaration method, int offset) throws CoreException {
+		offset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, offset);
+		if (method.getAST().apiLevel() < AST.JLS8) {
+			return offset;
+		}
 
+		int newParamCount = ((List) getNewValue(method, MethodDeclaration.PARAMETERS_PROPERTY)).size();
+		int oldParamCount = method.parameters().size();
+		RewriteEvent event = getEvent(method, MethodDeclaration.RECEIVER_TYPE_PROPERTY);
+		RewriteEvent qualEvent = getEvent(method, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY);
+
+		boolean rewriteQualifier = false;
+		ASTNode newQual = null;
+		ASTNode oldQual = null;
+		if (qualEvent != null) {
+			newQual = (ASTNode) qualEvent.getNewValue();
+			oldQual = (ASTNode) qualEvent.getOriginalValue();
+		}
+
+		TextEditGroup editGroup= getEditGroup(event);
+		if (event != null && event.getChangeKind() != RewriteEvent.UNCHANGED) {
+			int changeKind= event.getChangeKind();
+			if (changeKind == RewriteEvent.INSERTED) {
+				 doTextInsert(offset, (ASTNode) event.getNewValue(), 0, false, editGroup);
+				doTextInsert(offset, " ", editGroup); //$NON-NLS-1$
+				if (newQual != null ) {
+					doTextInsert(offset, newQual, 0, false, getEditGroup(qualEvent));
+					doTextInsert(offset, ".", editGroup); //$NON-NLS-1$
+				}
+				doTextInsert(offset, "this", editGroup); //$NON-NLS-1$
+				if (newParamCount > 0) {
+					doTextInsert(offset, ", ", editGroup); //$NON-NLS-1$
+				}
+			} else {
+				ASTNode elem= (ASTNode) event.getOriginalValue();
+				SourceRange range= getExtendedRange(elem);
+				int elemOffset= range.getStartPosition();
+				int elemLength= range.getLength();
+				int elemEnd= elemOffset + elemLength;
+				if (changeKind == RewriteEvent.REMOVED) {
+					editGroup= getEditGroup(event);
+					int endPos;
+					if (oldParamCount == 0) {
+						endPos= getScanner().getTokenStartOffset(TerminalTokens.TokenNameRPAREN, elemEnd);
+					} else {
+						endPos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameCOMMA, elemEnd);
+					}
+					doTextRemoveAndVisit(offset, endPos - offset, elem, editGroup);
+					return endPos;
+				} else if (changeKind == RewriteEvent.REPLACED) {
+					editGroup= getEditGroup(event);
+					doTextRemoveAndVisit(elemOffset, elemLength, elem, editGroup);
+					doTextInsert(elemOffset, (ASTNode) event.getNewValue(), 0, false, editGroup);
+					rewriteQualifier = true;
+				}
+			}
+		} else {
+			rewriteRequiredNode(method, MethodDeclaration.RECEIVER_TYPE_PROPERTY);
+			if (method.getReceiverType() != null) {
+				rewriteQualifier = true;
+			}
+		}
+		if (rewriteQualifier) {
+			if (qualEvent != null) {
+				int qualChangeKind = qualEvent.getChangeKind();
+				TextEditGroup qualGroup = getEditGroup(qualEvent);
+				if (qualChangeKind == RewriteEvent.INSERTED) {
+					int pos= getScanner().getTokenStartOffset(TerminalTokens.TokenNamethis, offset);
+					doTextInsert(pos, (ASTNode) qualEvent.getNewValue(), 0, false, qualGroup);
+					doTextInsert(pos, ".", qualGroup); //$NON-NLS-1$
+				} else if (qualChangeKind == RewriteEvent.REMOVED) {
+					int qualOffset = oldQual.getStartPosition();
+					int endPos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameDOT, qualOffset);
+					doTextRemove(qualOffset, endPos - qualOffset, qualGroup);
+				} else if (qualChangeKind == RewriteEvent.REPLACED) {
+					SourceRange range= getExtendedRange(oldQual);
+					int elemOffset= range.getStartPosition();
+					int elemLength= range.getLength();
+					doTextRemoveAndVisit(elemOffset, elemLength, oldQual, qualGroup);
+					doTextInsert(elemOffset, newQual, 0, false, qualGroup);
+				}
+			}
+			offset=  getScanner().getTokenEndOffset(TerminalTokens.TokenNamethis, offset);
+			if (newParamCount > 0 && oldParamCount == 0) {
+				doTextInsert(offset, ", ", editGroup); //$NON-NLS-1$
+			}
+		}
+		return offset;
+	}
+
+	public boolean visit(Dimension node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		rewriteNodeList(node, Dimension.ANNOTATIONS_PROPERTY, node.getStartPosition(), Util.EMPTY_STRING, " "); //$NON-NLS-1$
+		return false;
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(MethodDeclaration)
@@ -1793,8 +1957,9 @@
 			return doVisitUnchangedChildren(node);
 		}
 		int pos= rewriteJavadoc(node, MethodDeclaration.JAVADOC_PROPERTY);
-		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			rewriteModifiers(node, MethodDeclaration.MODIFIERS_PROPERTY, pos);
+		int apiLevel= node.getAST().apiLevel();
+		if (apiLevel == JLS2_INTERNAL) {
+			rewriteModifiers(node, INTERNAL_METHOD_MODIFIERS_PROPERTY2, pos);
 		} else {
 			pos= rewriteModifiers2(node, MethodDeclaration.MODIFIERS2_PROPERTY, pos);
 			pos= rewriteOptionalTypeParameters(node, MethodDeclaration.TYPE_PARAMETERS_PROPERTY, pos, " ", true, pos != node.getStartPosition()); //$NON-NLS-1$
@@ -1810,30 +1975,32 @@
 
 		// parameters
 		try {
-			if (isChanged(node, MethodDeclaration.PARAMETERS_PROPERTY)) {
-				pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
-				pos= rewriteNodeList(node, MethodDeclaration.PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$ 
-			} else {
-				pos= doVisit(node, MethodDeclaration.PARAMETERS_PROPERTY, pos);
-			}
+			pos= rewriteMethodReceiver(node, pos);
+			pos= rewriteNodeList(node, MethodDeclaration.PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$ 
 
 			pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameRPAREN, pos);
+			ChildListPropertyDescriptor exceptionsProperty = apiLevel < AST.JLS8 ? INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY : MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY;
 
-			int extraDims= rewriteExtraDimensions(node, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY, pos);
+			if (apiLevel < AST.JLS8) {
+				int extraDims= rewriteExtraDimensions(node, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, pos);
 
-			boolean hasExceptionChanges= isChanged(node, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY);
+				boolean hasExceptionChanges= isChanged(node, exceptionsProperty);
 
-			int bodyChangeKind= getChangeKind(node, MethodDeclaration.BODY_PROPERTY);
+				int bodyChangeKind= getChangeKind(node, MethodDeclaration.BODY_PROPERTY);
 
-			if ((extraDims > 0) && (hasExceptionChanges || bodyChangeKind == RewriteEvent.INSERTED || bodyChangeKind == RewriteEvent.REMOVED)) {
-				int dim= ((Integer) getOriginalValue(node, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY)).intValue();
-				while (dim > 0) {
-					pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameRBRACKET, pos);
-					dim--;
+				if ((extraDims > 0) && (hasExceptionChanges || bodyChangeKind == RewriteEvent.INSERTED || bodyChangeKind == RewriteEvent.REMOVED)) {
+					int dim= ((Integer) getOriginalValue(node, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY)).intValue();
+					while (dim > 0) {
+						pos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameRBRACKET, pos);
+						dim--;
+					}
 				}
+			} else {
+				pos= rewriteExtraDimensionsInfo(node, pos, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
 			}
 
-			pos= rewriteNodeList(node, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY, pos, " throws ", ", "); //$NON-NLS-1$ //$NON-NLS-2$
+			pos= rewriteNodeList(node, exceptionsProperty, pos, " throws ", ", "); //$NON-NLS-1$ //$NON-NLS-2$
+			
 			rewriteMethodBody(node, pos);
 		} catch (CoreException e) {
 			// ignore
@@ -1866,13 +2033,13 @@
 	public boolean visit(ReturnStatement node) {
 		try {
 			this.beforeRequiredSpaceIndex = getScanner().getTokenEndOffset(TerminalTokens.TokenNamereturn, node.getStartPosition());
-
+			
 			if (!hasChildrenChanges(node)) {
 				return doVisitUnchangedChildren(node);
 			}
-
+			
 			ensureSpaceBeforeReplace(node);
-
+			
 			rewriteNode(node, ReturnStatement.EXPRESSION_PROPERTY, this.beforeRequiredSpaceIndex, ASTRewriteFormatter.SPACE);
 		} catch (CoreException e) {
 			handleException(e);
@@ -1917,13 +2084,13 @@
 		}
 
 		ArrayType arrayType= (ArrayType) getOriginalValue(node, ArrayCreation.TYPE_PROPERTY);
+		ArrayType replacingType= arrayType;
 		int nOldBrackets= getDimensions(arrayType); // number of total brackets
-		int nNewBrackets= nOldBrackets;
 
 		TextEditGroup editGroup= null;
 		RewriteEvent typeEvent= getEvent(node, ArrayCreation.TYPE_PROPERTY);
 		if (typeEvent != null && typeEvent.getChangeKind() == RewriteEvent.REPLACED) { // changed arraytype can have different dimension or type name
-			ArrayType replacingType= (ArrayType) typeEvent.getNewValue();
+			replacingType= (ArrayType) typeEvent.getNewValue();
 			editGroup= getEditGroup(typeEvent);
 			Type newType= replacingType.getElementType();
 			Type oldType= getElementType(arrayType);
@@ -1934,59 +2101,73 @@
 				doTextRemove(offset, length, editGroup);
 				doTextInsert(offset, newType, 0, false, editGroup);
 			}
-			nNewBrackets= replacingType.getDimensions(); // is replaced type
 		}
-		voidVisit(arrayType);
-
 
 		try {
-			int offset= getScanner().getTokenStartOffset(TerminalTokens.TokenNameLBRACKET, arrayType.getStartPosition());
-			// dimension node with expressions
+			// dimension node with expressions and/or annotations
 			RewriteEvent dimEvent= getEvent(node, ArrayCreation.DIMENSIONS_PROPERTY);
 			boolean hasDimensionChanges= (dimEvent != null && dimEvent.getChangeKind() != RewriteEvent.UNCHANGED);
-			if (hasDimensionChanges) {
-				RewriteEvent[] events= dimEvent.getChildren();
-				// offset on first opening brace
-				for (int i= 0; i < events.length; i++) {
-					RewriteEvent event= events[i];
-					int changeKind= event.getChangeKind();
-					if (changeKind == RewriteEvent.INSERTED) { // insert new dimension
-						editGroup= getEditGroup(event);
-						doTextInsert(offset, "[", editGroup); //$NON-NLS-1$
-						doTextInsert(offset, (ASTNode) event.getNewValue(), 0, false, editGroup);
-						doTextInsert(offset, "]", editGroup); //$NON-NLS-1$
-						nNewBrackets--;
-					} else {
-						ASTNode elem= (ASTNode) event.getOriginalValue();
-						int elemEnd= elem.getStartPosition() + elem.getLength();
-						int endPos= getScanner().getTokenEndOffset(TerminalTokens.TokenNameRBRACKET, elemEnd);
-						if (changeKind == RewriteEvent.REMOVED) {
+			RewriteEvent[] events= hasDimensionChanges ? dimEvent.getChildren() : null;
+			boolean astLevelGTE8 = node.getAST().apiLevel() >= AST.JLS8;
+			ArrayType currentLevel = astLevelGTE8 ? null : (ArrayType) replacingType.getElementType().getParent();
+			int replacingTypeDimensions = replacingType.getDimensions();
+			int i=0, dimSize= (events == null) ? 0 : events.length;
+			Type elementType= arrayType.getElementType();
+			int offset= elementType.getStartPosition() + elementType.getLength();
+			while(currentLevel != null || astLevelGTE8) {
+				if (i < dimSize) {
+					if (astLevelGTE8) rewriteAnnotationsOnDimension(replacingType, i, offset);
+					 offset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameLBRACKET, offset);
+					if (hasDimensionChanges) {
+						RewriteEvent event= events[i];
+						int changeKind= event.getChangeKind();
+						if (changeKind == RewriteEvent.INSERTED) { // insert new dimension
 							editGroup= getEditGroup(event);
-							doTextRemoveAndVisit(offset, endPos - offset, elem, editGroup);
-						} else if (changeKind == RewriteEvent.REPLACED) {
-							editGroup= getEditGroup(event);
-							SourceRange range= getExtendedRange(elem);
-							int elemOffset= range.getStartPosition();
-							int elemLength= range.getLength();
-							doTextRemoveAndVisit(elemOffset, elemLength, elem, editGroup);
-							doTextInsert(elemOffset, (ASTNode) event.getNewValue(), 0, false, editGroup);
-							nNewBrackets--;
+							int endPos= getScanner().getTokenStartOffset(TerminalTokens.TokenNameRBRACKET, offset);
+							doTextRemove(offset, endPos - offset, editGroup);
+							doTextInsert(offset, (ASTNode) event.getNewValue(), 0, false, editGroup);
 						} else {
-							voidVisit(elem);
-							nNewBrackets--;
+							ASTNode elem= (ASTNode) event.getOriginalValue();
+							int elemEnd= elem.getStartPosition() + elem.getLength();
+							int endPos= getScanner().getTokenStartOffset(TerminalTokens.TokenNameRBRACKET, elemEnd);
+							if (changeKind == RewriteEvent.REMOVED) {
+								editGroup= getEditGroup(event);
+								doTextRemoveAndVisit(offset, endPos - offset, elem, editGroup);
+							} else if (changeKind == RewriteEvent.REPLACED) {
+								editGroup= getEditGroup(event);
+								SourceRange range= getExtendedRange(elem);
+								int elemOffset= range.getStartPosition();
+								int elemLength= range.getLength();
+								doTextRemoveAndVisit(elemOffset, elemLength, elem, editGroup);
+								doTextInsert(elemOffset, (ASTNode) event.getNewValue(), 0, false, editGroup);
+							} else {
+								voidVisit(elem);
+							}
 						}
-						offset= endPos;
-						nOldBrackets--;
+						offset= retrieveRightBracketEndPosition(offset, 1, true);
+					} else {
+						ASTNode elem= (ASTNode) node.dimensions().get(i);
+						voidVisit(elem);
+						offset= retrieveRightBracketEndPosition(offset, 1, true);
 					}
+				} else if (i < nOldBrackets) {
+					if (astLevelGTE8) rewriteAnnotationsOnDimension(replacingType, i, offset);
+					offset= retrieveRightBracketEndPosition(offset, 1, false);
+				} else {
+					insertAnnotationsOnDimension(replacingType, i, offset, editGroup, astLevelGTE8);
+					doTextInsert(offset, "[]", editGroup); //$NON-NLS-1$
 				}
-			} else {
-				offset= doVisit(node, ArrayCreation.DIMENSIONS_PROPERTY, offset);
+				i++;
+				if (astLevelGTE8) {
+					if (i == replacingTypeDimensions) break;
+				} else {
+					if (currentLevel == replacingType) break;
+					currentLevel= (ArrayType) currentLevel.getParent();
+				}
 			}
-			if (nOldBrackets != nNewBrackets) {
-				if (!hasDimensionChanges) {
-					offset= getScanner().getTokenEndOffset(TerminalTokens.TokenNameRBRACKET, offset);
-				}
-				rewriteExtraDimensions(nOldBrackets, nNewBrackets, offset, editGroup);
+			if (i < nOldBrackets) {
+				int endPos= retrieveRightBracketEndPosition(offset, nOldBrackets - i, false);
+				doTextRemove(offset, endPos - offset, editGroup);
 			}
 
 			int kind= getChangeKind(node, ArrayCreation.INITIALIZER_PROPERTY);
@@ -2002,20 +2183,75 @@
 		return false;
 	}
 
+	private void insertAnnotationsOnDimension(ArrayType replacingType, int index, int pos, TextEditGroup editGroup,
+			boolean astLevelGTE8) {
+		if (astLevelGTE8) {
+			Dimension dim = (Dimension) replacingType.dimensions().get(index);
+			List annotations = dim.annotations();
+			if (annotations != null) {
+				int size = annotations.size();
+				for (int j = 0; j < size; j++) {
+					Annotation annotation = (Annotation) annotations.get(j);
+					doTextInsert(pos, annotation.toString() + " ", editGroup); //$NON-NLS-1$
+				}
+				
+			}
+		}
+	}
+
+	private void rewriteAnnotationsOnDimension(ArrayType replacingType, int index, int pos) {
+		Dimension dim = (Dimension) replacingType.dimensions().get(index);
+		rewriteTypeAnnotations(dim, Dimension.ANNOTATIONS_PROPERTY, pos);
+	}
+
+	/**
+	 * This method is used to retrieve the position of the right bracket.
+	 * @return int the dimension found, -1 if none
+	 */
+	protected int retrieveRightBracketEndPosition(int offset, int count, boolean isLeftRead) throws CoreException {
+		TokenScanner scanner= getScanner();
+		int token;
+		int balance= 0;
+		if (isLeftRead) balance++;
+		scanner.setOffset(offset);
+		while ((token= scanner.readNext(true)) != TerminalTokens.TokenNameEOF) {
+			switch(token) {
+				case TerminalTokens.TokenNameLBRACKET :
+					balance++;
+					break;
+				case TerminalTokens.TokenNameRBRACKET :
+					balance--;
+					if (balance == 0) {
+						if (--count == 0) {
+							return scanner.getCurrentEndOffset();
+						}
+					}
+					break;
+			}
+		}
+		return -1;
+	}
+
 	private Type getElementType(ArrayType parent) {
-		Type t = (Type) getOriginalValue(parent, ArrayType.COMPONENT_TYPE_PROPERTY);
+		if (parent.getAST().apiLevel() >= AST.JLS8) {
+			return (Type) getOriginalValue(parent, ArrayType.ELEMENT_TYPE_PROPERTY);
+		}
+		Type t = (Type) getOriginalValue(parent, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY);
 		while (t.isArrayType()) {
-			t = (Type) getOriginalValue(t, ArrayType.COMPONENT_TYPE_PROPERTY);
+			t = (Type) getOriginalValue(t, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY);
 		}
 		return t;
 	}
 
 	private int getDimensions(ArrayType parent) {
-		Type t = (Type) getOriginalValue(parent, ArrayType.COMPONENT_TYPE_PROPERTY);
+		if (parent.getAST().apiLevel() >= AST.JLS8) {
+			return ((List) getOriginalValue(parent, ArrayType.DIMENSIONS_PROPERTY)).size();
+		}
+		Type t = (Type) getOriginalValue(parent, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY);
 		int dimensions = 1; // always include this array type
 		while (t.isArrayType()) {
 			dimensions++;
-			t = (Type) getOriginalValue(t, ArrayType.COMPONENT_TYPE_PROPERTY);
+			t = (Type) getOriginalValue(t, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY);
 		}
 		return dimensions;
 	}
@@ -2042,8 +2278,12 @@
 		if (!hasChildrenChanges(node)) {
 			return doVisitUnchangedChildren(node);
 		}
-
-		rewriteRequiredNode(node, ArrayType.COMPONENT_TYPE_PROPERTY);
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			rewriteRequiredNode(node, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY);
+		} else {
+			int pos = rewriteRequiredNode(node, ArrayType.ELEMENT_TYPE_PROPERTY);
+			rewriteNodeList(node, ArrayType.DIMENSIONS_PROPERTY, pos, Util.EMPTY_STRING, " "); //$NON-NLS-1$
+		}
 		return false;
 	}
 
@@ -2053,13 +2293,13 @@
 	public boolean visit(AssertStatement node) {
 		try {
 			this.beforeRequiredSpaceIndex = getScanner().getNextEndOffset(node.getStartPosition(), true);
-
+			
 			if (!hasChildrenChanges(node)) {
 				return doVisitUnchangedChildren(node);
 			}
-
+			
 			ensureSpaceBeforeReplace(node);
-
+			
 			int offset= rewriteRequiredNode(node, AssertStatement.EXPRESSION_PROPERTY);
 			rewriteNode(node, AssertStatement.MESSAGE_PROPERTY, offset, ASTRewriteFormatter.ASSERT_COMMENT);
 		} catch (CoreException e) {
@@ -2163,7 +2403,7 @@
 
 		int pos= rewriteOptionalQualifier(node, ClassInstanceCreation.EXPRESSION_PROPERTY, node.getStartPosition());
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			pos= rewriteRequiredNode(node, ClassInstanceCreation.NAME_PROPERTY);
+			pos= rewriteRequiredNode(node, INTERNAL_CIC_NAME_PROPERTY);
 		} else {
 			if (isChanged(node, ClassInstanceCreation.TYPE_ARGUMENTS_PROPERTY)) {
 				try {
@@ -2254,6 +2494,29 @@
 		return false;
 	}
 
+	private void visitReferenceTypeArguments(ASTNode node, StructuralPropertyDescriptor childProperty, int pos) {
+		if (isChanged(node, childProperty)) {
+			try {
+				pos = getScanner().getTokenEndOffset(TerminalTokens.TokenNameCOLON_COLON, pos);
+				rewriteOptionalTypeParameters(node, childProperty, pos, Util.EMPTY_STRING, false, false);
+			} catch (CoreException e) {
+				handleException(e);
+			}
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(CreationReference)
+	 */
+	public boolean visit(CreationReference node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		int pos= rewriteRequiredNode(node, CreationReference.TYPE_PROPERTY);
+		visitReferenceTypeArguments(node, CreationReference.TYPE_ARGUMENTS_PROPERTY, pos);
+		return false;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(DoStatement)
 	 */
@@ -2329,7 +2592,7 @@
 		int pos= rewriteJavadoc(node, FieldDeclaration.JAVADOC_PROPERTY);
 
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			rewriteModifiers(node, FieldDeclaration.MODIFIERS_PROPERTY, pos);
+			rewriteModifiers(node, INTERNAL_FIELD_MODIFIERS_PROPERTY, pos);
 		} else {
 			rewriteModifiers2(node, FieldDeclaration.MODIFIERS2_PROPERTY, pos);
 		}
@@ -2404,7 +2667,7 @@
 			try {
 				int tok= getScanner().readNext(pos, true); // after the closing parent
 				pos= (tok == TerminalTokens.TokenNameRPAREN) ? getScanner().getCurrentEndOffset() : getScanner().getCurrentStartOffset();
-
+				
 				int indent= getIndent(node.getStartPosition());
 
 				int endPos= -1;
@@ -2590,7 +2853,7 @@
 		}
 		int pos= rewriteJavadoc(node, Initializer.JAVADOC_PROPERTY);
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			rewriteModifiers(node, Initializer.MODIFIERS_PROPERTY, pos);
+			rewriteModifiers(node, INTERNAL_INITIALIZER_MODIFIERS_PROPERTY3, pos);
 		} else {
 			rewriteModifiers2(node, Initializer.MODIFIERS2_PROPERTY, pos);
 		}
@@ -2612,7 +2875,7 @@
 		return false;
 	}
 
-	public void ensureSpaceAfterReplace(ASTNode node, ChildPropertyDescriptor desc) {
+	private void ensureSpaceAfterReplace(ASTNode node, ChildPropertyDescriptor desc) {
 		if (getChangeKind(node, desc) == RewriteEvent.REPLACED) {
 			int leftOperandEnd= getExtendedEnd((ASTNode) getOriginalValue(node, desc));
 			try {
@@ -2626,12 +2889,12 @@
 			}
 		}
 	}
-
-	public void ensureSpaceBeforeReplace(ASTNode node) {
+	
+	private void ensureSpaceBeforeReplace(ASTNode node) {
 		if (this.beforeRequiredSpaceIndex  == -1) return;
-
+		
 		List events = this.eventStore.getChangedPropertieEvents(node);
-
+		
 		for (Iterator iterator = events.iterator(); iterator.hasNext();) {
 			RewriteEvent event = (RewriteEvent) iterator.next();
 			if (event.getChangeKind() == RewriteEvent.REPLACED && event.getOriginalValue() instanceof ASTNode) {
@@ -2642,13 +2905,24 @@
 				}
 			}
 		}
-
+		
 		if (this.beforeRequiredSpaceIndex  < getExtendedOffset(node)) {
 			this.beforeRequiredSpaceIndex  = -1;
 		}
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(IntersectionType)
+	 */
+	public boolean visit(IntersectionType node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		rewriteNodeList(node, IntersectionType.TYPES_PROPERTY, node.getStartPosition(), Util.EMPTY_STRING, " & "); //$NON-NLS-1$
+		return false;
+	}
+	
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(Javadoc)
 	 */
 	public boolean visit(Javadoc node) {
@@ -2676,6 +2950,80 @@
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(LambdaExpression)
+	 */
+	public boolean visit(LambdaExpression node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		Boolean newValue = (Boolean) getNewValue(node, LambdaExpression.PARENTHESES_PROPERTY);
+		boolean hasParentheses = newValue.equals(Boolean.TRUE);
+		if (!hasParentheses) {// Parentheses can be absent if and only if there is one and only one type elided parameter.
+			List parameters = (List) getNewValue(node, LambdaExpression.PARAMETERS_PROPERTY);
+			hasParentheses = !(parameters.size() == 1 && parameters.get(0) instanceof VariableDeclarationFragment);
+		}
+
+		boolean deleteParentheses = false;
+		boolean insertParentheses = false;
+		TextEditGroup editGroup = null;
+
+		boolean oldHasParentheses = getOriginalValue(node, LambdaExpression.PARENTHESES_PROPERTY).equals(Boolean.TRUE);
+		RewriteEvent event = getEvent(node, LambdaExpression.PARENTHESES_PROPERTY);
+		if (event != null) {
+			editGroup = getEditGroup(event);
+			if (event.getChangeKind() == RewriteEvent.REPLACED) {
+				if (newValue != Boolean.FALSE) {
+					insertParentheses = true;
+				} else {// apply the stricter check for parentheses deletion
+					deleteParentheses = !hasParentheses;
+				}
+			}
+		} else if (!oldHasParentheses && hasParentheses) {// parameter property changed to effect parentheses insertion
+			if ((event = getEvent(node, LambdaExpression.PARAMETERS_PROPERTY)) != null) {// a null check though event cannot be null here
+				editGroup = getEditGroup(event);
+				insertParentheses = true;
+			}
+		}
+		
+		int pos = node.getStartPosition();
+		if (insertParentheses) {
+			doTextInsert(pos, "(", editGroup); //$NON-NLS-1$
+		} else if (deleteParentheses) {
+			try {
+				int lparensEnd = getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos);
+				doTextRemove(pos, lparensEnd - pos, editGroup);
+				pos = lparensEnd;
+			} catch (CoreException e) {
+				handleException(e);
+			}
+		}
+
+		if (isChanged(node, LambdaExpression.PARAMETERS_PROPERTY)) {
+			try {
+				pos = oldHasParentheses ? getScanner().getTokenEndOffset(TerminalTokens.TokenNameLPAREN, pos) : pos;
+				pos = rewriteNodeList(node, LambdaExpression.PARAMETERS_PROPERTY, pos, Util.EMPTY_STRING, ", "); //$NON-NLS-1$
+			} catch (CoreException e) {
+				handleException(e);
+			}
+		} else {
+			pos = doVisit(node, LambdaExpression.PARAMETERS_PROPERTY, pos);
+		}
+
+		if (insertParentheses) {
+			doTextInsert(pos, ")", editGroup); //$NON-NLS-1$
+		} else if (deleteParentheses) {
+			try {
+				doTextRemove(pos, getScanner().getTokenEndOffset(TerminalTokens.TokenNameRPAREN, pos) - pos, editGroup);
+			} catch (CoreException e) {
+				handleException(e);
+			}
+		}
+		rewriteRequiredNode(node, LambdaExpression.BODY_PROPERTY);
+
+		return false;
+	}
+
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(MethodInvocation)
 	 */
 	public boolean visit(MethodInvocation node) {
@@ -2795,6 +3143,9 @@
 		if (!hasChildrenChanges(node)) {
 			return doVisitUnchangedChildren(node);
 		}
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			rewriteTypeAnnotations(node, PrimitiveType.ANNOTATIONS_PROPERTY, node.getStartPosition());
+		}
 		PrimitiveType.Code newCode= (PrimitiveType.Code) getNewValue(node, PrimitiveType.PRIMITIVE_TYPE_CODE_PROPERTY);
 		TextEditGroup group = getEditGroup(node, PrimitiveType.PRIMITIVE_TYPE_CODE_PROPERTY);
 		doTextReplace(node.getStartPosition(), node.getLength(), newCode.toString(), group);
@@ -2834,7 +3185,9 @@
 		if (!hasChildrenChanges(node)) {
 			return doVisitUnchangedChildren(node);
 		}
-
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			rewriteTypeAnnotations(node, SimpleType.ANNOTATIONS_PROPERTY, node.getStartPosition());
+		}
 		rewriteRequiredNode(node, SimpleType.NAME_PROPERTY);
 		return false;
 	}
@@ -2847,24 +3200,44 @@
 			return doVisitUnchangedChildren(node);
 		}
 		int pos= node.getStartPosition();
-		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			rewriteModifiers(node, SingleVariableDeclaration.MODIFIERS_PROPERTY, pos);
+		int apiLevel= node.getAST().apiLevel();
+		if (apiLevel == JLS2_INTERNAL) {
+			rewriteModifiers(node, INTERNAL_VARIABLE_MODIFIERS_PROPERTY, pos);
 		} else {
 			rewriteModifiers2(node, SingleVariableDeclaration.MODIFIERS2_PROPERTY, pos);
 		}
 		pos= rewriteRequiredNode(node, SingleVariableDeclaration.TYPE_PROPERTY);
-		if (node.getAST().apiLevel() >= JLS3_INTERNAL) {
+		if (apiLevel >= JLS3_INTERNAL) {
 			if (isChanged(node, SingleVariableDeclaration.VARARGS_PROPERTY)) {
+				TextEditGroup editGroup = getEditGroup(node, SingleVariableDeclaration.VARARGS_PROPERTY);
 				if (getNewValue(node, SingleVariableDeclaration.VARARGS_PROPERTY).equals(Boolean.TRUE)) {
-					doTextInsert(pos, "...", getEditGroup(node, SingleVariableDeclaration.VARARGS_PROPERTY)); //$NON-NLS-1$
+					if (apiLevel >= AST.JLS8) {
+						pos= rewriteVarargsAnnotations(node, SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY, pos);
+					}
+					int indent= getIndent(node.getStartPosition());
+					String prefix= this.formatter.VARARGS.getPrefix(indent);
+					doTextInsert(pos, prefix, editGroup);
+					doTextInsert(pos, "...", editGroup); //$NON-NLS-1$
 				} else {
 					try {
-						int ellipsisEnd= getScanner().getNextEndOffset(pos, true);
-						doTextRemove(pos, ellipsisEnd - pos, getEditGroup(node, SingleVariableDeclaration.VARARGS_PROPERTY));
+						int ellipsisEnd;
+						int noOfAnnotations = apiLevel >= AST.JLS8 ? node.varargsAnnotations().size() : 0;
+						if (noOfAnnotations > 0) {
+							Annotation annotation= (Annotation) node.varargsAnnotations().get(noOfAnnotations - 1);
+							int annotationEndPosition= annotation.getStartPosition() + annotation.getLength();
+							ellipsisEnd= getScanner().getNextEndOffset(annotationEndPosition, true);
+						} else {
+							ellipsisEnd= getScanner().getNextEndOffset(pos, true);
+						}
+						doTextRemove(pos, ellipsisEnd - pos, editGroup);
 					} catch (CoreException e) {
 						handleException(e);
 					}
 				}
+			} else {
+				if (apiLevel >= AST.JLS8 && node.isVarargs()) {
+					pos = rewriteVarargsAnnotations(node, SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY, pos);
+				}
 			}
 			if (!node.isVarargs()) {
 				ensureSpaceAfterReplace(node, SingleVariableDeclaration.TYPE_PROPERTY);
@@ -2874,19 +3247,23 @@
 		}
 
 		pos= rewriteRequiredNode(node, SingleVariableDeclaration.NAME_PROPERTY);
-		int extraDims= rewriteExtraDimensions(node, SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY, pos);
+		if (apiLevel < AST.JLS8) {
+			int extraDims= rewriteExtraDimensions(node, INTERNAL_VARIABLE_EXTRA_DIMENSIONS_PROPERTY, pos);
 
-		if (extraDims > 0) {
-			int kind= getChangeKind(node, SingleVariableDeclaration.INITIALIZER_PROPERTY);
-			if (kind == RewriteEvent.REMOVED) {
-				try {
-					pos= getScanner().getPreviousTokenEndOffset(TerminalTokens.TokenNameEQUAL, pos);
-				} catch (CoreException e) {
-					handleException(e);
+			if (extraDims > 0) {
+				int kind= getChangeKind(node, SingleVariableDeclaration.INITIALIZER_PROPERTY);
+				if (kind == RewriteEvent.REMOVED) {
+					try {
+						pos= getScanner().getPreviousTokenEndOffset(TerminalTokens.TokenNameEQUAL, pos);
+					} catch (CoreException e) {
+						handleException(e);
+					}
+				} else {
+					pos= node.getStartPosition() + node.getLength(); // insert pos
 				}
-			} else {
-				pos= node.getStartPosition() + node.getLength(); // insert pos
 			}
+		} else {
+			pos = rewriteExtraDimensionsInfo(node, pos, SingleVariableDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
 		}
 
 		rewriteNode(node, SingleVariableDeclaration.INITIALIZER_PROPERTY, pos, this.formatter.VAR_INITIALIZER);
@@ -2999,39 +3376,39 @@
 	}
 
 	class SwitchListRewriter extends ParagraphListRewriter {
-
+		
 		private boolean indentSwitchStatementsCompareToCases;
 
 		public SwitchListRewriter(int initialIndent) {
 			super(initialIndent, 0);
-			this.indentSwitchStatementsCompareToCases =
+			this.indentSwitchStatementsCompareToCases = 
 				DefaultCodeFormatterConstants.TRUE.equals(ASTRewriteAnalyzer.this.options.get(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_CASES));
 		}
 
 		protected int getNodeIndent(int nodeIndex) {
 			int indent= getInitialIndent();
-
+			
 			if (this.indentSwitchStatementsCompareToCases) {
 				RewriteEvent event = this.list[nodeIndex];
 				int changeKind = event.getChangeKind();
-
+				
 				ASTNode node;
 				if (changeKind == RewriteEvent.INSERTED || changeKind == RewriteEvent.REPLACED) {
 					node= (ASTNode)event.getNewValue();
 				} else {
 					node= (ASTNode)event.getOriginalValue();
 				}
-
+				
 				if (node.getNodeType() != ASTNode.SWITCH_CASE) {
 					indent++;
 				}
 			}
 			return indent;
 		}
-
+		
 		protected String getSeparatorString(int nodeIndex) {
 			int total = this.list.length;
-
+			
 			int nextNodeIndex = nodeIndex + 1;
 			while (nextNodeIndex < total && this.list[nextNodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
 				nextNodeIndex++;
@@ -3041,19 +3418,19 @@
 			}
 			return getSeparatorString(nodeIndex, nextNodeIndex);
 		}
-
+		
 		protected void updateIndent(int prevMark, int originalOffset, int nodeIndex, TextEditGroup editGroup) {
 			if (prevMark != RewriteEvent.UNCHANGED && prevMark != RewriteEvent.REPLACED) return;
-
+			
 			// Do not change indent if the previous non removed node is on the same line
 			int previousNonRemovedNodeIndex = nodeIndex - 1;
 			while (previousNonRemovedNodeIndex >= 0 && this.list[previousNonRemovedNodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
 				previousNonRemovedNodeIndex--;
 			}
-
+			
 			if (previousNonRemovedNodeIndex > -1) {
 				LineInformation lineInformation = getLineInformation();
-
+				
 				RewriteEvent prevEvent = this.list[previousNonRemovedNodeIndex];
 				int prevKind = prevEvent.getChangeKind();
 				if (prevKind == RewriteEvent.UNCHANGED || prevKind == RewriteEvent.REPLACED) {
@@ -3061,27 +3438,27 @@
 					int prevEndPosition = prevNode.getStartPosition() + prevNode.getLength();
 					int prevLine = lineInformation.getLineOfOffset(prevEndPosition);
 					int line = lineInformation.getLineOfOffset(originalOffset);
-
+					
 					if (prevLine == line) {
 						return;
 					}
 				}
 			}
-
+			
 			int total = this.list.length;
 			while (nodeIndex < total && this.list[nodeIndex].getChangeKind() == RewriteEvent.REMOVED) {
 				nodeIndex++;
 			}
-
+			
 			int originalIndent = getIndent(originalOffset);
 			int newIndent = getNodeIndent(nodeIndex);
-
+			
 			if (originalIndent != newIndent) {
-
+				
 				int line= getLineInformation().getLineOfOffset(originalOffset);
 				if (line >= 0) {
 					int lineStart= getLineInformation().getLineOffset(line);
-
+					
 					doTextRemove(lineStart, originalOffset - lineStart, editGroup); // remove previous indentation
 					doTextInsert(lineStart, createIndentString(newIndent), editGroup); // add new indentation
 				}
@@ -3107,7 +3484,7 @@
 				if (DefaultCodeFormatterConstants.TRUE.equals(this.options.get(DefaultCodeFormatterConstants.FORMATTER_INDENT_SWITCHSTATEMENTS_COMPARE_TO_SWITCH))) {
 					insertIndent++;
 				}
-
+				
 				ParagraphListRewriter listRewriter= new SwitchListRewriter(insertIndent);
 				StringBuffer leadString= new StringBuffer();
 				leadString.append(getLineDelimiter());
@@ -3153,11 +3530,11 @@
 	public boolean visit(ThrowStatement node) {
 		try {
 			this.beforeRequiredSpaceIndex = getScanner().getTokenEndOffset(TerminalTokens.TokenNamethrow, node.getStartPosition());
-
+			
 			if (!hasChildrenChanges(node)) {
 				return doVisitUnchangedChildren(node);
 			}
-
+			
 			ensureSpaceBeforeReplace(node);
 
 			rewriteRequiredNode(node, ThrowStatement.EXPRESSION_PROPERTY);
@@ -3175,7 +3552,7 @@
 			return doVisitUnchangedChildren(node);
 		}
 		int pos= node.getStartPosition();
-		if (node.getAST().apiLevel() >= AST.JLS4) {
+		if (node.getAST().apiLevel() >= JLS4_INTERNAL) {
 			if (isChanged(node, TryStatement.RESOURCES_PROPERTY)) {
 				int indent= getIndent(node.getStartPosition());
 				String prefix= this.formatter.TRY_RESOURCES.getPrefix(indent);
@@ -3209,7 +3586,7 @@
 			return doVisitUnchangedChildren(node);
 		}
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			rewriteRequiredNode(node, TypeDeclarationStatement.TYPE_DECLARATION_PROPERTY);
+			rewriteRequiredNode(node, INTERNAL_TDS_TYPE_DECLARATION_PROPERTY);
 		} else {
 			rewriteRequiredNode(node, TypeDeclarationStatement.DECLARATION_PROPERTY);
 		}
@@ -3235,12 +3612,7 @@
 		if (!hasChildrenChanges(node)) {
 			return doVisitUnchangedChildren(node);
 		}
-		int pos= node.getStartPosition();
-		if (isChanged(node, UnionType.TYPES_PROPERTY)) {
-			pos= rewriteNodeList(node, UnionType.TYPES_PROPERTY, pos, Util.EMPTY_STRING, " | "); //$NON-NLS-1$
-		} else {
-			pos= doVisit(node, UnionType.TYPES_PROPERTY, pos);
-		}
+		rewriteNodeList(node, UnionType.TYPES_PROPERTY, node.getStartPosition(), Util.EMPTY_STRING, " | "); //$NON-NLS-1$
 		return false;
 	}
 	
@@ -3255,7 +3627,7 @@
 		// same code as FieldDeclaration
 		int pos= node.getStartPosition();
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			rewriteModifiers(node, VariableDeclarationExpression.MODIFIERS_PROPERTY, pos);
+			rewriteModifiers(node, INTERNAL_VDE_MODIFIERS_PROPERTY, pos);
 		} else {
 			rewriteModifiers2(node, VariableDeclarationExpression.MODIFIERS2_PROPERTY, pos);
 		}
@@ -3274,19 +3646,22 @@
 
 		int pos= rewriteRequiredNode(node, VariableDeclarationFragment.NAME_PROPERTY);
 
-		int extraDims= rewriteExtraDimensions(node, VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY, pos);
-
-		if (extraDims > 0) {
-			int kind= getChangeKind(node, VariableDeclarationFragment.INITIALIZER_PROPERTY);
-			if (kind == RewriteEvent.REMOVED) {
-				try {
-					pos= getScanner().getPreviousTokenEndOffset(TerminalTokens.TokenNameEQUAL, pos);
-				} catch (CoreException e) {
-					handleException(e);
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			int extraDims= rewriteExtraDimensions(node, INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY, pos);
+			if (extraDims > 0) {
+				int kind= getChangeKind(node, VariableDeclarationFragment.INITIALIZER_PROPERTY);
+				if (kind == RewriteEvent.REMOVED) {
+					try {
+						pos= getScanner().getPreviousTokenEndOffset(TerminalTokens.TokenNameEQUAL, pos);
+					} catch (CoreException e) {
+						handleException(e);
+					}
+				} else {
+					pos= node.getStartPosition() + node.getLength(); // insert pos
 				}
-			} else {
-				pos= node.getStartPosition() + node.getLength(); // insert pos
 			}
+		} else {
+			pos = rewriteExtraDimensionsInfo(node, pos, VariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTY);
 		}
 		rewriteNode(node, VariableDeclarationFragment.INITIALIZER_PROPERTY, pos, this.formatter.VAR_INITIALIZER);
 		return false;
@@ -3303,7 +3678,7 @@
 		// same code as FieldDeclaration
 		int pos= node.getStartPosition();
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			rewriteModifiers(node, VariableDeclarationStatement.MODIFIERS_PROPERTY, pos);
+			rewriteModifiers(node, INTERNAL_VDS_MODIFIERS_PROPERTY, pos);
 		} else {
 			rewriteModifiers2(node, VariableDeclarationStatement.MODIFIERS2_PROPERTY, pos);
 		}
@@ -3659,6 +4034,20 @@
 		rewriteParagraphList(node, EnumDeclaration.BODY_DECLARATIONS_PROPERTY, pos, indent, -1, 2);
 		return false;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(ExpressionMethodReference)
+	 */
+	public boolean visit(ExpressionMethodReference node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		int pos= rewriteRequiredNode(node, ExpressionMethodReference.EXPRESSION_PROPERTY);
+		visitReferenceTypeArguments(node, ExpressionMethodReference.TYPE_ARGUMENTS_PROPERTY, pos);
+		rewriteRequiredNode(node, ExpressionMethodReference.NAME_PROPERTY);
+		return false;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.MarkerAnnotation)
 	 */
@@ -3715,6 +4104,23 @@
 		return false;
 	}
 	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.PackageQualifiedType)
+	 */
+	public boolean visit(PackageQualifiedType node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		int pos = rewriteRequiredNode(node, PackageQualifiedType.QUALIFIER_PROPERTY);
+		try {
+			pos = getScanner().getTokenEndOffset(TerminalTokens.TokenNameDOT, pos);
+			rewriteTypeAnnotations(node, PackageQualifiedType.ANNOTATIONS_PROPERTY, pos);
+		} catch (CoreException e) {
+			handleException(e);
+		}
+		rewriteRequiredNode(node, PackageQualifiedType.NAME_PROPERTY);
+		return false;
+	}
+	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.ParameterizedType)
 	 */
 	public boolean visit(ParameterizedType node) {
@@ -3742,7 +4148,15 @@
 		if (!hasChildrenChanges(node)) {
 			return doVisitUnchangedChildren(node);
 		}
-		rewriteRequiredNode(node, QualifiedType.QUALIFIER_PROPERTY);
+		int pos = rewriteRequiredNode(node, QualifiedType.QUALIFIER_PROPERTY);
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			try {
+				pos = getScanner().getTokenEndOffset(TerminalTokens.TokenNameDOT, pos);
+				rewriteTypeAnnotations(node, QualifiedType.ANNOTATIONS_PROPERTY, pos);
+			} catch (CoreException e) {
+				handleException(e);
+			}
+		}
 		rewriteRequiredNode(node, QualifiedType.NAME_PROPERTY);
 		return false;
 	}
@@ -3757,6 +4171,33 @@
 		rewriteRequiredNode(node, SingleMemberAnnotation.VALUE_PROPERTY);
 		return false;
 	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(SuperMethodReference)
+	 */
+	public boolean visit(SuperMethodReference node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		int pos = rewriteOptionalQualifier(node, SuperMethodReference.QUALIFIER_PROPERTY, node.getStartPosition());
+		visitReferenceTypeArguments(node, SuperMethodReference.TYPE_ARGUMENTS_PROPERTY, pos);
+		rewriteRequiredNode(node, SuperMethodReference.NAME_PROPERTY);
+		return false;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(TypeMethodReference)
+	 */
+	public boolean visit(TypeMethodReference node) {
+		if (!hasChildrenChanges(node)) {
+			return doVisitUnchangedChildren(node);
+		}
+		int pos= rewriteRequiredNode(node, TypeMethodReference.TYPE_PROPERTY);
+		visitReferenceTypeArguments(node, TypeMethodReference.TYPE_ARGUMENTS_PROPERTY, pos);
+		rewriteRequiredNode(node, TypeMethodReference.NAME_PROPERTY);
+		return false;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TypeParameter)
 	 */
@@ -3764,17 +4205,17 @@
 		if (!hasChildrenChanges(node)) {
 			return doVisitUnchangedChildren(node);
 		}
-		int pos= rewriteRequiredNode(node, TypeParameter.NAME_PROPERTY);
-		if (isChanged(node, TypeParameter.TYPE_BOUNDS_PROPERTY)) {
-//{ObjectTeams: <B base R>:
-		  if (node.hasBaseBound())
-			rewriteNodeList(node, TypeParameter.TYPE_BOUNDS_PROPERTY, pos, " base ", " & "); //$NON-NLS-1$ //$NON-NLS-2$
-		  else
-// SH}
-			rewriteNodeList(node, TypeParameter.TYPE_BOUNDS_PROPERTY, pos, " extends ", " & "); //$NON-NLS-1$ //$NON-NLS-2$
-		} else {
-			voidVisit(node, TypeParameter.TYPE_BOUNDS_PROPERTY);
+		int pos;
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			pos = rewriteTypeAnnotations(node, TypeParameter.ANNOTATIONS_PROPERTY, node.getStartPosition());
 		}
+		pos= rewriteRequiredNode(node, TypeParameter.NAME_PROPERTY);
+//{ObjectTeams: <B base R>:
+	  if (node.hasBaseBound())
+		rewriteNodeList(node, TypeParameter.TYPE_BOUNDS_PROPERTY, pos, " base ", " & "); //$NON-NLS-1$ //$NON-NLS-2$
+	  else
+// SH}
+		rewriteNodeList(node, TypeParameter.TYPE_BOUNDS_PROPERTY, pos, " extends ", " & "); //$NON-NLS-1$ //$NON-NLS-2$
 		return false;
 	}
 	/* (non-Javadoc)
@@ -3784,6 +4225,9 @@
 		if (!hasChildrenChanges(node)) {
 			return doVisitUnchangedChildren(node);
 		}
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			rewriteTypeAnnotations(node, WildcardType.ANNOTATIONS_PROPERTY, node.getStartPosition());
+		}
 		try {
 			int pos= getScanner().getNextEndOffset(node.getStartPosition(), true); // pos after question mark
 
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
index 768919b..65b96f6 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFlattener.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -19,19 +23,66 @@
 
 public class ASTRewriteFlattener extends ASTVisitor {
 
-	/**
-	 * Internal synonynm for deprecated constant AST.JSL2
-	 * to alleviate deprecation warnings.
-	 * @deprecated
-	 */
-	/*package*/ static final int JLS2_INTERNAL = AST.JLS2;
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY = ArrayType.COMPONENT_TYPE_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_FIELD_MODIFIERS_PROPERTY = FieldDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_INITIALIZER_MODIFIERS_PROPERTY = Initializer.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_METHOD_MODIFIERS_PROPERTY = MethodDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_METHOD_RETURN_TYPE_PROPERTY = MethodDeclaration.RETURN_TYPE_PROPERTY;
 	
-	/**
-	 * Internal synonynm for deprecated constant AST.JSL3
-	 * to alleviate deprecation warnings.
-	 * @deprecated
-	 */
-	/*package*/ static final int JLS3_INTERNAL = AST.JLS3;
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY = MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildListPropertyDescriptor INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY = MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_TYPE_MODIFIERS_PROPERTY = TypeDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_TYPE_SUPERCLASS_PROPERTY = TypeDeclaration.SUPERCLASS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildListPropertyDescriptor INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY = TypeDeclaration.SUPER_INTERFACES_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_CIC_NAME_PROPERTY = ClassInstanceCreation.NAME_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY = VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final ChildPropertyDescriptor INTERNAL_TDS_TYPE_DECLARATION_PROPERTY = TypeDeclarationStatement.TYPE_DECLARATION_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VARIABLE_MODIFIERS_PROPERTY = SingleVariableDeclaration.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VARIABLE_EXTRA_DIMENSIONS_PROPERTY = SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VDE_MODIFIERS_PROPERTY = VariableDeclarationExpression.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final SimplePropertyDescriptor INTERNAL_VDS_MODIFIERS_PROPERTY = VariableDeclarationStatement.MODIFIERS_PROPERTY;
+
+	/** @deprecated using deprecated code */
+	private static final int JLS2_INTERNAL = AST.JLS2;
+
+	/** @deprecated using deprecated code */
+	private static final int JLS3_INTERNAL = AST.JLS3;
+
+	/** @deprecated using deprecated code */
+	private static final int JLS4_INTERNAL = AST.JLS4;
+
 
 	public static String asString(ASTNode node, RewriteEventStore store) {
 		ASTRewriteFlattener flattener= new ASTRewriteFlattener(store);
@@ -182,6 +233,16 @@
 		}
 	}
 
+	private void visitExtraDimensions(ASTNode node, SimplePropertyDescriptor dimensions, ChildListPropertyDescriptor dimensionsInfo) {
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			int extraDimensions= getIntAttribute(node, dimensions);
+			for (int i = 0; i < extraDimensions; i++) {
+				this.result.append("[]"); //$NON-NLS-1$
+			}
+		} else {
+			visitList(node, dimensionsInfo, String.valueOf(' '), String.valueOf(' '), Util.EMPTY_STRING);
+		}
+	}
 
 	/*
 	 * @see ASTVisitor#visit(AnonymousClassDeclaration)
@@ -212,27 +273,39 @@
 		ArrayType arrayType= (ArrayType) getChildNode(node, ArrayCreation.TYPE_PROPERTY);
 
 		// get the element type and count dimensions
-		Type elementType= (Type) getChildNode(arrayType, ArrayType.COMPONENT_TYPE_PROPERTY);
-		int dimensions= 1; // always include this array type
-		while (elementType.isArrayType()) {
-			dimensions++;
-			elementType = (Type) getChildNode(elementType, ArrayType.COMPONENT_TYPE_PROPERTY);
+		Type elementType;
+		int dimensions;
+		boolean astLevelGTE8 = node.getAST().apiLevel() >= AST.JLS8;
+		if (astLevelGTE8) {
+			elementType = (Type) getChildNode(arrayType, ArrayType.ELEMENT_TYPE_PROPERTY);
+			dimensions = getChildList(arrayType, ArrayType.DIMENSIONS_PROPERTY).size();
+		} else {
+			elementType = (Type) getChildNode(arrayType, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY);
+			dimensions = 1; // always include this array type
+			while (elementType.isArrayType()) {
+				dimensions++;
+				elementType = (Type) getChildNode(elementType, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY);
+			}
 		}
 
 		elementType.accept(this);
 
+		// add "<annotations> [ <dimension> ]" for each dimension expression
 		List list= getChildList(node, ArrayCreation.DIMENSIONS_PROPERTY);
-		for (int i= 0; i < list.size(); i++) {
+		int size = list.size();
+		for (int i= 0; i < size; i++) {
+			internalVisitDimensionAnnotations(arrayType, i, astLevelGTE8);
 			this.result.append('[');
 			((ASTNode) list.get(i)).accept(this);
 			this.result.append(']');
-			dimensions--;
 		}
 
-		// add empty "[]" for each extra array dimension
-		for (int i= 0; i < dimensions; i++) {
+		// add "<annotations> []" for each extra array dimension
+		for (int i= list.size(); i < dimensions; i++) {
+			internalVisitDimensionAnnotations(arrayType, i, astLevelGTE8);
 			this.result.append("[]"); //$NON-NLS-1$
 		}
+
 		ASTNode initializer= getChildNode(node, ArrayCreation.INITIALIZER_PROPERTY);
 		if (initializer != null) {
 			getChildNode(node, ArrayCreation.INITIALIZER_PROPERTY).accept(this);
@@ -240,6 +313,13 @@
 		return false;
 	}
 
+	private void internalVisitDimensionAnnotations(ArrayType arrayType, int index, boolean astLevelGTE8) {
+		if (astLevelGTE8) {
+			Dimension dimension = (Dimension) arrayType.dimensions().get(index);
+			visitList(dimension, Dimension.ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
+	}
+
 	/*
 	 * @see ASTVisitor#visit(ArrayInitializer)
 	 */
@@ -254,8 +334,13 @@
 	 * @see ASTVisitor#visit(ArrayType)
 	 */
 	public boolean visit(ArrayType node) {
-		getChildNode(node, ArrayType.COMPONENT_TYPE_PROPERTY).accept(this);
-		this.result.append("[]"); //$NON-NLS-1$
+		if (node.getAST().apiLevel() < AST.JLS8) {
+			getChildNode(node, INTERNAL_ARRAY_COMPONENT_TYPE_PROPERTY).accept(this);
+			this.result.append("[]"); //$NON-NLS-1$
+		} else {
+			getChildNode(node, ArrayType.ELEMENT_TYPE_PROPERTY).accept(this);
+			visitList(node, ArrayType.DIMENSIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
 		return false;
 	}
 
@@ -364,7 +449,7 @@
 		}
 		this.result.append("new ");//$NON-NLS-1$
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			getChildNode(node, ClassInstanceCreation.NAME_PROPERTY).accept(this);
+			getChildNode(node, INTERNAL_CIC_NAME_PROPERTY).accept(this);
 		} else {
 			visitList(node, ClassInstanceCreation.TYPE_ARGUMENTS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>'));
 			getChildNode(node, ClassInstanceCreation.TYPE_PROPERTY).accept(this);
@@ -433,6 +518,23 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(CreationReference)
+	 */
+	public boolean visit(CreationReference node) {
+		getChildNode(node, CreationReference.TYPE_PROPERTY).accept(this);
+		this.result.append("::"); //$NON-NLS-1$
+		visitList(node, CreationReference.TYPE_ARGUMENTS_PROPERTY, Util.EMPTY_STRING, String.valueOf('<'), String.valueOf('>'));
+		this.result.append("new"); //$NON-NLS-1$
+		return false;
+	}
+
+	public boolean visit(Dimension node) {
+		visitList(node, Dimension.ANNOTATIONS_PROPERTY, String.valueOf(' '), String.valueOf(' '), String.valueOf(' '));
+		this.result.append("[]"); //$NON-NLS-1$
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(DoStatement)
 	 */
 	public boolean visit(DoStatement node) {
@@ -480,7 +582,7 @@
 			javadoc.accept(this);
 		}
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			printModifiers(getIntAttribute(node, FieldDeclaration.MODIFIERS_PROPERTY), this.result);
+			printModifiers(getIntAttribute(node, INTERNAL_FIELD_MODIFIERS_PROPERTY), this.result);
 		} else {
 			visitList(node, FieldDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
 		}
@@ -568,6 +670,23 @@
 	}
 
 	/*
+	 * @see ASTVisitor#visit(Initializer)
+	 */
+	public boolean visit(Initializer node) {
+		ASTNode javadoc= getChildNode(node, Initializer.JAVADOC_PROPERTY);
+		if (javadoc != null) {
+			javadoc.accept(this);
+		}
+		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
+			printModifiers(getIntAttribute(node, INTERNAL_INITIALIZER_MODIFIERS_PROPERTY), this.result);
+		} else {
+			visitList(node, Initializer.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
+		getChildNode(node, Initializer.BODY_PROPERTY).accept(this);
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(InstanceofExpression)
 	 */
 	public boolean visit(InstanceofExpression node) {
@@ -578,19 +697,10 @@
 	}
 
 	/*
-	 * @see ASTVisitor#visit(Initializer)
+	 * @see ASTVisitor#visit(IntersectionType)
 	 */
-	public boolean visit(Initializer node) {
-		ASTNode javadoc= getChildNode(node, Initializer.JAVADOC_PROPERTY);
-		if (javadoc != null) {
-			javadoc.accept(this);
-		}
-		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			printModifiers(getIntAttribute(node, Initializer.MODIFIERS_PROPERTY), this.result);
-		} else {
-			visitList(node, Initializer.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
-		}
-		getChildNode(node, Initializer.BODY_PROPERTY).accept(this);
+	public boolean visit(IntersectionType node) {
+		visitList(node, IntersectionType.TYPES_PROPERTY, " & ", Util.EMPTY_STRING, Util.EMPTY_STRING); //$NON-NLS-1$
 		return false;
 	}
 
@@ -617,6 +727,25 @@
 		getChildNode(node, LabeledStatement.BODY_PROPERTY).accept(this);
 		return false;
 	}
+	/*
+	 * @see ASTVisitor#visit(LambdaExpression)
+	 */
+	public boolean visit(LambdaExpression node) {
+		boolean hasParentheses = getBooleanAttribute(node, LambdaExpression.PARENTHESES_PROPERTY);
+		if (!hasParentheses) {
+			List parameters = getChildList(node, LambdaExpression.PARAMETERS_PROPERTY);
+			hasParentheses = !(parameters.size() == 1 && parameters.get(0) instanceof VariableDeclarationFragment);
+		}
+
+		if (hasParentheses)
+			this.result.append('(');
+		visitList(node, LambdaExpression.PARAMETERS_PROPERTY, String.valueOf(','));
+		if (hasParentheses)
+			this.result.append(')');
+		this.result.append("->"); //$NON-NLS-1$
+		getChildNode(node, LambdaExpression.BODY_PROPERTY).accept(this);
+		return false;
+	}
 
 	/*
 	 * @see ASTVisitor#visit(MethodDeclaration)
@@ -627,7 +756,7 @@
 			javadoc.accept(this);
 		}
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			printModifiers(getIntAttribute(node, MethodDeclaration.MODIFIERS_PROPERTY), this.result);
+			printModifiers(getIntAttribute(node, INTERNAL_METHOD_MODIFIERS_PROPERTY), this.result);
 		} else {
 			visitList(node, MethodDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
 			visitList(node, MethodDeclaration.TYPE_PARAMETERS_PROPERTY, String.valueOf(','), String.valueOf('<'), String.valueOf('>'));
@@ -635,7 +764,7 @@
 
 		if (!getBooleanAttribute(node, MethodDeclaration.CONSTRUCTOR_PROPERTY)) {
 			if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-				getChildNode(node, MethodDeclaration.RETURN_TYPE_PROPERTY).accept(this);
+				getChildNode(node, INTERNAL_METHOD_RETURN_TYPE_PROPERTY).accept(this);
 			} else {
 				ASTNode returnType = getChildNode(node, MethodDeclaration.RETURN_TYPE2_PROPERTY);
 				if (returnType != null) {
@@ -649,13 +778,31 @@
 		}
 		getChildNode(node, MethodDeclaration.NAME_PROPERTY).accept(this);
 		this.result.append('(');
+		// receiver parameter
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			ASTNode receiverType = getChildNode(node, MethodDeclaration.RECEIVER_TYPE_PROPERTY);
+			if (receiverType != null) {
+				receiverType.accept(this);
+				this.result.append(' ');
+				ASTNode qualifier = getChildNode(node, MethodDeclaration.RECEIVER_QUALIFIER_PROPERTY);
+				if (qualifier != null) {
+					qualifier.accept(this);
+					this.result.append('.');
+				}
+				this.result.append("this"); //$NON-NLS-1$
+				if (getChildList(node, MethodDeclaration.PARAMETERS_PROPERTY).size() > 0) {
+					this.result.append(',');
+				}
+			}
+		}
+	
 		visitList(node, MethodDeclaration.PARAMETERS_PROPERTY, String.valueOf(','));
 		this.result.append(')');
-		int extraDims= getIntAttribute(node, MethodDeclaration.EXTRA_DIMENSIONS_PROPERTY);
-		for (int i = 0; i < extraDims; i++) {
-			this.result.append("[]"); //$NON-NLS-1$
-		}
-		visitList(node, MethodDeclaration.THROWN_EXCEPTIONS_PROPERTY, String.valueOf(','), " throws ", Util.EMPTY_STRING); //$NON-NLS-1$
+		visitExtraDimensions(node, INTERNAL_METHOD_EXTRA_DIMENSIONS_PROPERTY, MethodDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
+
+		ChildListPropertyDescriptor exceptionsProperty = node.getAST().apiLevel() <	AST.JLS8 ? 
+				INTERNAL_METHOD_THROWN_EXCEPTIONS_PROPERTY : MethodDeclaration.THROWN_EXCEPTION_TYPES_PROPERTY;
+		visitList(node, exceptionsProperty, String.valueOf(','), " throws ", Util.EMPTY_STRING); //$NON-NLS-1$			
 //{ObjectTeams: predicate
 		ASTNode guardPredicate = getChildNode(node, MethodDeclaration.GUARD_PROPERTY);
 		if (guardPredicate != null) {
@@ -760,6 +907,9 @@
 	 * @see ASTVisitor#visit(PrimitiveType)
 	 */
 	public boolean visit(PrimitiveType node) {
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitList(node, PrimitiveType.ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
 		this.result.append(getAttribute(node, PrimitiveType.PRIMITIVE_TYPE_CODE_PROPERTY).toString());
 		return false;
 	}
@@ -800,7 +950,11 @@
 	 * @see ASTVisitor#visit(SimpleType)
 	 */
 	public boolean visit(SimpleType node) {
-		return true;
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitList(node, SimpleType.ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
+		node.getName().accept(this);
+		return false;
 	}
 
 	/*
@@ -808,11 +962,14 @@
 	 */
 	public boolean visit(SingleVariableDeclaration node) {
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			printModifiers(getIntAttribute(node, SingleVariableDeclaration.MODIFIERS_PROPERTY), this.result);
+			printModifiers(getIntAttribute(node, INTERNAL_VARIABLE_MODIFIERS_PROPERTY), this.result);
 		} else {
 			visitList(node, SingleVariableDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
 		}
 		getChildNode(node, SingleVariableDeclaration.TYPE_PROPERTY).accept(this);
+		if (node.getAST().apiLevel() >= AST.JLS8  && node.isVarargs()) {
+			visitList(node, SingleVariableDeclaration.VARARGS_ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
 		if (node.getAST().apiLevel() >= JLS3_INTERNAL) {
 			if (getBooleanAttribute(node, SingleVariableDeclaration.VARARGS_PROPERTY)) {
 				this.result.append("...");//$NON-NLS-1$
@@ -820,10 +977,7 @@
 		}
 		this.result.append(' ');
 		getChildNode(node, SingleVariableDeclaration.NAME_PROPERTY).accept(this);
-		int extraDimensions= getIntAttribute(node, SingleVariableDeclaration.EXTRA_DIMENSIONS_PROPERTY);
-		for (int i = 0; i < extraDimensions; i++) {
-			this.result.append("[]"); //$NON-NLS-1$
-		}
+		visitExtraDimensions(node, INTERNAL_VARIABLE_EXTRA_DIMENSIONS_PROPERTY, SingleVariableDeclaration.EXTRA_DIMENSIONS2_PROPERTY);
 		ASTNode initializer= getChildNode(node, SingleVariableDeclaration.INITIALIZER_PROPERTY);
 		if (initializer != null) {
 			this.result.append('=');
@@ -959,7 +1113,7 @@
 	 */
 	public boolean visit(TryStatement node) {
 		this.result.append("try "); //$NON-NLS-1$
-		if (node.getAST().apiLevel() >= AST.JLS4) {
+		if (node.getAST().apiLevel() >= JLS4_INTERNAL) {
 			visitList(node, TryStatement.RESOURCES_PROPERTY, String.valueOf(';'), String.valueOf('('), String.valueOf(')'));
 		}
 		getChildNode(node, TryStatement.BODY_PROPERTY).accept(this);
@@ -985,7 +1139,7 @@
 		}
 
 		if (apiLevel == JLS2_INTERNAL) {
-			printModifiers(getIntAttribute(node, TypeDeclaration.MODIFIERS_PROPERTY), this.result);
+			printModifiers(getIntAttribute(node, INTERNAL_TYPE_MODIFIERS_PROPERTY), this.result);
 		} else {
 			visitList(node, TypeDeclaration.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
 		}
@@ -999,7 +1153,7 @@
 
 		this.result.append(' ');
 
-		ChildPropertyDescriptor superClassProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY;
+		ChildPropertyDescriptor superClassProperty= (apiLevel == JLS2_INTERNAL) ? INTERNAL_TYPE_SUPERCLASS_PROPERTY : TypeDeclaration.SUPERCLASS_TYPE_PROPERTY;
 		ASTNode superclass= getChildNode(node, superClassProperty);
 		if (superclass != null) {
 			this.result.append("extends "); //$NON-NLS-1$
@@ -1007,7 +1161,7 @@
 			this.result.append(' ');
 		}
 
-		ChildListPropertyDescriptor superInterfaceProperty= (apiLevel == JLS2_INTERNAL) ? TypeDeclaration.SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY;
+		ChildListPropertyDescriptor superInterfaceProperty= (apiLevel == JLS2_INTERNAL) ? INTERNAL_TYPE_SUPER_INTERFACES_PROPERTY : TypeDeclaration.SUPER_INTERFACE_TYPES_PROPERTY;
 		String lead= isInterface ? "extends " : "implements ";  //$NON-NLS-1$//$NON-NLS-2$
 		visitList(node, superInterfaceProperty, String.valueOf(','), lead, Util.EMPTY_STRING);
 //{ObjectTeams: predicate
@@ -1031,7 +1185,7 @@
 	 */
 	public boolean visit(TypeDeclarationStatement node) {
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			getChildNode(node, TypeDeclarationStatement.TYPE_DECLARATION_PROPERTY).accept(this);
+			getChildNode(node, INTERNAL_TDS_TYPE_DECLARATION_PROPERTY).accept(this);
 		} else {
 			getChildNode(node, TypeDeclarationStatement.DECLARATION_PROPERTY).accept(this);
 		}
@@ -1060,7 +1214,7 @@
 	 */
 	public boolean visit(VariableDeclarationExpression node) {
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			printModifiers(getIntAttribute(node, VariableDeclarationExpression.MODIFIERS_PROPERTY), this.result);
+			printModifiers(getIntAttribute(node, INTERNAL_VDE_MODIFIERS_PROPERTY), this.result);
 		} else {
 			visitList(node, VariableDeclarationExpression.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
 		}
@@ -1075,10 +1229,7 @@
 	 */
 	public boolean visit(VariableDeclarationFragment node) {
 		getChildNode(node, VariableDeclarationFragment.NAME_PROPERTY).accept(this);
-		int extraDimensions= getIntAttribute(node, VariableDeclarationFragment.EXTRA_DIMENSIONS_PROPERTY);
-		for (int i = 0; i < extraDimensions; i++) {
-			this.result.append("[]"); //$NON-NLS-1$
-		}
+		visitExtraDimensions(node, INTERNAL_FRAGMENT_EXTRA_DIMENSIONS_PROPERTY, VariableDeclarationFragment.EXTRA_DIMENSIONS2_PROPERTY);
 		ASTNode initializer= getChildNode(node, VariableDeclarationFragment.INITIALIZER_PROPERTY);
 		if (initializer != null) {
 			this.result.append('=');
@@ -1092,7 +1243,7 @@
 	 */
 	public boolean visit(VariableDeclarationStatement node) {
 		if (node.getAST().apiLevel() == JLS2_INTERNAL) {
-			printModifiers(getIntAttribute(node, VariableDeclarationStatement.MODIFIERS_PROPERTY), this.result);
+			printModifiers(getIntAttribute(node, INTERNAL_VDS_MODIFIERS_PROPERTY), this.result);
 		} else {
 			visitList(node, VariableDeclarationStatement.MODIFIERS2_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
 		}
@@ -1298,6 +1449,17 @@
 		return false;
 	}
 	/*
+	 * @see ASTVisitor#visit(ExpressionMethodReference)
+	 */
+	public boolean visit(ExpressionMethodReference node) {
+		getChildNode(node, ExpressionMethodReference.EXPRESSION_PROPERTY).accept(this);
+		this.result.append("::"); //$NON-NLS-1$
+		visitList(node, ExpressionMethodReference.TYPE_ARGUMENTS_PROPERTY, Util.EMPTY_STRING, String.valueOf('<'), String.valueOf('>'));
+		node.getName().accept(this);
+		return false;
+	}
+
+	/*
 	 * @see ASTVisitor#visit(MarkerAnnotation)
 	 * @since 3.0
 	 */
@@ -1338,6 +1500,21 @@
 		this.result.append(')');
 		return false;
 	}
+
+	/*
+	 * @see ASTVisitor#visit(PackageQualifiedType)
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public boolean visit(PackageQualifiedType node) {
+		getChildNode(node, PackageQualifiedType.QUALIFIER_PROPERTY).accept(this);
+		this.result.append('.');
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitList(node, PackageQualifiedType.ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
+		getChildNode(node, PackageQualifiedType.NAME_PROPERTY).accept(this);
+		return false;
+	}
+
 	/*
 	 * @see ASTVisitor#visit(ParameterizedType)
 	 * @since 3.0
@@ -1357,6 +1534,9 @@
 	public boolean visit(QualifiedType node) {
 		getChildNode(node, QualifiedType.QUALIFIER_PROPERTY).accept(this);
 		this.result.append('.');
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitList(node, QualifiedType.ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
 		getChildNode(node, QualifiedType.NAME_PROPERTY).accept(this);
 		return false;
 	}
@@ -1373,10 +1553,39 @@
 		return false;
 	}
 
+	/*
+	 * @see ASTVisitor#visit(SuperMethodReference)
+	 */
+	public boolean visit(SuperMethodReference node) {
+		ASTNode qualifier = getChildNode(node, SuperMethodReference.QUALIFIER_PROPERTY);
+		if (qualifier != null) {
+			qualifier.accept(this);
+			this.result.append('.');
+		}
+		this.result.append("super ::"); //$NON-NLS-1$
+		visitList(node, SuperMethodReference.TYPE_ARGUMENTS_PROPERTY, Util.EMPTY_STRING, String.valueOf('<'), String.valueOf('>'));
+		node.getName().accept(this);
+		return false;
+	}
+
+	/*
+	 * @see ASTVisitor#visit(TypeMethodReference)
+	 */
+	public boolean visit(TypeMethodReference node) {
+		getChildNode(node, TypeMethodReference.TYPE_PROPERTY).accept(this);
+		this.result.append("::"); //$NON-NLS-1$
+		visitList(node, TypeMethodReference.TYPE_ARGUMENTS_PROPERTY, Util.EMPTY_STRING, String.valueOf('<'), String.valueOf('>'));
+		node.getName().accept(this);
+		return false;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TypeParameter)
 	 */
 	public boolean visit(TypeParameter node) {
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitList(node, TypeParameter.ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
 		getChildNode(node, TypeParameter.NAME_PROPERTY).accept(this);
 //{ObjectTeams: <B base R>:
 	  if (node.hasBaseBound())
@@ -1391,6 +1600,9 @@
 	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.WildcardType)
 	 */
 	public boolean visit(WildcardType node) {
+		if (node.getAST().apiLevel() >= AST.JLS8) {
+			visitList(node, WildcardType.ANNOTATIONS_PROPERTY, String.valueOf(' '), Util.EMPTY_STRING, String.valueOf(' '));
+		}
 		this.result.append('?');
 		ASTNode bound = getChildNode(node, WildcardType.BOUND_PROPERTY);
 		if (bound != null) {
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
index 1086380..b9a0a33 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/ASTRewriteFormatter.java
@@ -1,11 +1,15 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: ASTRewriteFormatter.java 22741 2009-10-13 22:23:05Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -45,7 +49,7 @@
 import org.eclipse.text.edits.ReplaceEdit;
 import org.eclipse.text.edits.TextEdit;
 
-/* package */ final class ASTRewriteFormatter {
+public final class ASTRewriteFormatter {
 
 	public static class NodeMarker extends Position {
 		public Object data;
@@ -588,7 +592,8 @@
 
 	public final Prefix FIRST_ENUM_CONST= new FormattingPrefix("enum E { X;}", "{ X" , CodeFormatter.K_COMPILATION_UNIT); //$NON-NLS-1$ //$NON-NLS-2$
 	public final Prefix ANNOTATION_SEPARATION= new FormattingPrefix("@A @B class C {}", "A @" , CodeFormatter.K_COMPILATION_UNIT); //$NON-NLS-1$ //$NON-NLS-2$
-	public final Prefix PARAM_ANNOTATION_SEPARATION= new FormattingPrefix("void foo(@A @B p) { }", "A @" , CodeFormatter.K_CLASS_BODY_DECLARATIONS); //$NON-NLS-1$ //$NON-NLS-2$
+	public final Prefix PARAM_ANNOTATION_SEPARATION= new FormattingPrefix("void foo(@A @B C p) { }", "A @" , CodeFormatter.K_CLASS_BODY_DECLARATIONS); //$NON-NLS-1$ //$NON-NLS-2$
+	public final Prefix VARARGS= new FormattingPrefix("void foo(A ... a) { }", "A ." , CodeFormatter.K_CLASS_BODY_DECLARATIONS); //$NON-NLS-1$ //$NON-NLS-2$
 	public final Prefix TRY_RESOURCES = new FormattingPrefix("try (A a = new A(); B b = new B()) {}", "; B" , CodeFormatter.K_STATEMENTS); //$NON-NLS-1$ //$NON-NLS-2$
 	public final Prefix TRY_RESOURCES_PAREN = new FormattingPrefix("try (A a = new A(); B b = new B()) {}", "y (" , CodeFormatter.K_STATEMENTS); //$NON-NLS-1$ //$NON-NLS-2$
 	
diff --git a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEvent.java b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEvent.java
index 20dc32a..397c838 100644
--- a/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEvent.java
+++ b/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/RewriteEvent.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -55,15 +55,15 @@
 	public abstract boolean isListRewrite();
 
 	/**
-	 * @return Returns the original value. For lists this is a <code>List<code> of ASTNode's, for non-list
+	 * @return Returns the original value. For lists this is a List of ASTNodes, for non-list
 	 * events this can be an ASTNode (for node properties), Integer (for an integer property),
 	 * Boolean (for boolean node properties) or properties like Operator.
-	 * <code>null</code> is returned if the event is a insert event.
+	 * <code>null</code> is returned if the event is an insert event.
 	 */
 	public abstract Object getOriginalValue();
 
 	/**
-	 * @return Returns the new value. For lists this is a <code>List<code> of ASTNode's, for non-list
+	 * @return Returns the new value. For lists this is a List of ASTNodes, for non-list
 	 * events this can be an ASTNode (for node properties), Integer (for an integer property),
 	 * Boolean (for boolean node properties) or properties like Operator.
 	 * <code>null</code> is returned if the event is a remove event.
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
index 0a21c65..f5297c7 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetAllocationExpression.java
@@ -1,12 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
  *******************************************************************************/
 package org.eclipse.jdt.internal.eval;
 
@@ -48,7 +56,7 @@
 	ReferenceBinding allocatedType = codegenBinding.declaringClass;
 
 	if (codegenBinding.canBeSeenBy(allocatedType, this, currentScope)) {
-		codeStream.new_(allocatedType);
+		codeStream.new_(this.type, allocatedType);
 		if (valueRequired) {
 			codeStream.dup();
 		}
@@ -77,7 +85,7 @@
 				this);
 		}
 		// invoke constructor
-		codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */);
+		codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, null /* default declaringClass */, this.typeArguments);
 	} else {
 		// private emulation using reflect
 		codeStream.generateEmulationForConstructor(currentScope, codegenBinding);
@@ -101,7 +109,7 @@
 			}
 		} else {
 			codeStream.generateInlinedValue(0);
-			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));			
+			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
 		}
 		codeStream.invokeJavaLangReflectConstructorNewInstance();
 		codeStream.checkcast(allocatedType);
@@ -175,19 +183,24 @@
 	// buffering the arguments' types
 	boolean argsContainCast = false;
 	TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
+	boolean polyExpressionSeen = false;
 	if (this.arguments != null) {
 		boolean argHasError = false;
 		int length = this.arguments.length;
 		argumentTypes = new TypeBinding[length];
+		TypeBinding argumentType;
 		for (int i = 0; i < length; i++) {
 			Expression argument = this.arguments[i];
 			if (argument instanceof CastExpression) {
 				argument.bits |= DisableUnnecessaryCastCheck; // will check later on
 				argsContainCast = true;
 			}
-			if ((argumentTypes[i] = argument.resolveType(scope)) == null) {
+			argument.setExpressionContext(INVOCATION_CONTEXT);
+			if ((argumentType = argumentTypes[i] = argument.resolveType(scope)) == null) {
 				argHasError = true;
 			}
+			if (argumentType != null && argumentType.kind() == Binding.POLY_TYPE)
+				polyExpressionSeen = true;
 		}
 		if (argHasError) {
 			return this.resolvedType;
@@ -208,8 +221,13 @@
 		}
 		this.resolvedType = this.type.resolvedType = scope.environment().createParameterizedType(((ParameterizedTypeBinding) this.resolvedType).genericType(), inferredTypes, ((ParameterizedTypeBinding) this.resolvedType).enclosingType());
  	}
+	
 	ReferenceBinding allocatedType = (ReferenceBinding) this.resolvedType;
-	if (!(this.binding = scope.getConstructor(allocatedType, argumentTypes, this)).isValidBinding()) {
+	this.binding = scope.getConstructor(allocatedType, argumentTypes, this);
+	if (polyExpressionSeen && polyExpressionsHaveErrors(scope, this.binding, this.arguments, argumentTypes))
+		return null;
+
+	if (!this.binding.isValidBinding()) {	
 		if (this.binding instanceof ProblemMethodBinding
 			&& ((ProblemMethodBinding) this.binding).problemId() == NotVisible) {
 			if (this.evaluationContext.declaringTypeName != null) {
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
index aec9a17..ed125c2 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetClassFile.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.eval;
 
@@ -19,6 +25,7 @@
 import org.eclipse.jdt.internal.compiler.codegen.CodeStream;
 import org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
 import org.eclipse.jdt.internal.compiler.codegen.StackMapFrameCodeStream;
+import org.eclipse.jdt.internal.compiler.codegen.TypeAnnotationCodeStream;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
 import org.eclipse.jdt.internal.compiler.lookup.FieldBinding;
 import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
@@ -56,6 +63,7 @@
 	this.header[this.headerOffset++] = (byte) (0xCAFEBABEL >> 0);
 
 	long targetVersion = this.targetJDK = this.referenceBinding.scope.compilerOptions().targetJDK;
+	//TODO: Might have to update even for CLDC_1_1
 	this.header[this.headerOffset++] = (byte) (targetVersion >> 8); // minor high
 	this.header[this.headerOffset++] = (byte) (targetVersion >> 0); // minor low
 	this.header[this.headerOffset++] = (byte) (targetVersion >> 24); // major high
@@ -115,8 +123,13 @@
 	this.produceAttributes = this.referenceBinding.scope.compilerOptions().produceDebugAttributes;
 	this.creatingProblemType = creatingProblemType;
 	if (this.targetJDK >= ClassFileConstants.JDK1_6) {
-		this.codeStream = new StackMapFrameCodeStream(this);
 		this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP_TABLE;
+		if (this.targetJDK >= ClassFileConstants.JDK1_8) {
+			this.produceAttributes |= ClassFileConstants.ATTR_TYPE_ANNOTATION;
+			this.codeStream = new TypeAnnotationCodeStream(this);
+		} else {
+			this.codeStream = new StackMapFrameCodeStream(this);
+		}
 	} else if (this.targetJDK == ClassFileConstants.CLDC_1_1) {
 		this.targetJDK = ClassFileConstants.JDK1_1; // put back 45.3
 		this.produceAttributes |= ClassFileConstants.ATTR_STACK_MAP;
@@ -180,30 +193,28 @@
 	CategorizedProblem[] problemsCopy = new CategorizedProblem[problemsLength = problems.length];
 	System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);
 	AbstractMethodDeclaration[] methodDecls = typeDeclaration.methods;
+	boolean abstractMethodsOnly = false;
 	if (methodDecls != null) {
 		if (typeBinding.isInterface()) {
-			// we cannot create problem methods for an interface. So we have to generate a clinit
-			// which should contain all the problem
+			if (typeBinding.scope.compilerOptions().sourceLevel < ClassFileConstants.JDK1_8)
+				abstractMethodsOnly = true;
+			// We generate a clinit which contains all the problems, since we may not be able to generate problem methods (< 1.8) and problem constructors (all levels).
 			classFile.addProblemClinit(problemsCopy);
-			for (int i = 0, length = methodDecls.length; i < length; i++) {
-				AbstractMethodDeclaration methodDecl = methodDecls[i];
-				MethodBinding method = methodDecl.binding;
-				if (method == null || method.isConstructor()) continue;
+		}
+		for (int i = 0, length = methodDecls.length; i < length; i++) {
+			AbstractMethodDeclaration methodDecl = methodDecls[i];
+			MethodBinding method = methodDecl.binding;
+			if (method == null) continue;
+			if (abstractMethodsOnly) {
 				method.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract;
-				classFile.addAbstractMethod(methodDecl, method);
 			}		
-		} else {
-			for (int i = 0, length = methodDecls.length; i < length; i++) {
-				AbstractMethodDeclaration methodDecl = methodDecls[i];
-				MethodBinding method = methodDecl.binding;
-				if (method == null) continue;
-				if (method.isConstructor()) {
-					classFile.addProblemConstructor(methodDecl, method, problemsCopy);
-				} else if (method.isAbstract()) {
-					classFile.addAbstractMethod(methodDecl, method);
-				} else {
-					classFile.addProblemMethod(methodDecl, method, problemsCopy);
-				}
+			if (method.isConstructor()) {
+				if (typeBinding.isInterface()) continue;
+				classFile.addProblemConstructor(methodDecl, method, problemsCopy);
+			} else if (method.isAbstract()) {
+				classFile.addAbstractMethod(methodDecl, method);
+			} else {
+				classFile.addProblemMethod(methodDecl, method, problemsCopy);
 			}
 		}
 		// add abstract methods
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java
index 4cd8083..dc42749 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetFieldReference.java
@@ -199,7 +199,7 @@
 		// current stack is:
 		// field receiver value
 		if (valueRequired) {
-			if ((codegenBinding.type == TypeBinding.LONG) || (codegenBinding.type == TypeBinding.DOUBLE)) {
+			if ((TypeBinding.equalsEquals(codegenBinding.type, TypeBinding.LONG)) || (TypeBinding.equalsEquals(codegenBinding.type, TypeBinding.DOUBLE))) {
 				codeStream.dup2_x2();
 			} else {
 				codeStream.dup_x2();
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java
index 439f8ed..8437289 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetMessageSend.java
@@ -1,15 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: CodeSnippetMessageSend.java 23405 2010-02-03 17:02:18Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 409245 - [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
  *******************************************************************************/
 package org.eclipse.jdt.internal.eval;
 
@@ -75,21 +82,21 @@
 			if ((this.bits & NeedReceiverGenericCast) != 0) {
 				codeStream.checkcast(this.actualReceiverType);
 			}			
-			codeStream.recordPositionsFrom(pc, this.sourceStart);			
+			codeStream.recordPositionsFrom(pc, this.sourceStart);
 		}
 		// generate arguments
 		generateArguments(this.binding, this.arguments, currentScope, codeStream);
 		// actual message invocation
 		TypeBinding constantPoolDeclaringClass = CodeStream.getConstantPoolDeclaringClass(currentScope, codegenBinding, this.actualReceiverType, this.receiver.isImplicitThis());
 		if (isStatic) {
-			codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass);
+			codeStream.invoke(Opcodes.OPC_invokestatic, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
 		} else if( (this.receiver.isSuper()) || codegenBinding.isPrivate()){
-			codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass);
-			} else {
+			codeStream.invoke(Opcodes.OPC_invokespecial, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+		} else {
 			if (constantPoolDeclaringClass.isInterface()) { // interface or annotation type
-				codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass);
-				} else {
-				codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass);
+				codeStream.invoke(Opcodes.OPC_invokeinterface, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
+			} else {
+				codeStream.invoke(Opcodes.OPC_invokevirtual, codegenBinding, constantPoolDeclaringClass, this.typeArguments);
 			}
 		}
 	} else {
@@ -105,7 +112,7 @@
 			if ((this.bits & NeedReceiverGenericCast) != 0) {
 				codeStream.checkcast(this.actualReceiverType);
 			}			
-			codeStream.recordPositionsFrom(pc, this.sourceStart);			
+			codeStream.recordPositionsFrom(pc, this.sourceStart);
 		}
 		if (isStatic) {
 			// we need an object on the stack which is ignored for the method invocation
@@ -127,11 +134,11 @@
 				codeStream.aastore();
 				if (i < argsLength - 1) {
 					codeStream.dup();
-				}	
+				}
 			}
 		} else {
 			codeStream.generateInlinedValue(0);
-			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));			
+			codeStream.newArray(currentScope.createArrayType(currentScope.getType(TypeConstants.JAVA_LANG_OBJECT, 3), 1));
 		}
 		codeStream.invokeJavaLangReflectMethodInvoke();
 
@@ -167,7 +174,7 @@
 			default :
 				codeStream.pop();
 		}
-	}	
+	}
 	codeStream.recordPositionsFrom(pc, (int)(this.nameSourcePosition >>> 32)); // highlight selector
 }
 public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
@@ -176,14 +183,14 @@
 		// if method from parameterized type got found, use the original method at codegen time
 		MethodBinding codegenBinding = this.binding.original();
 		if (codegenBinding != this.binding) {
-	    // extra cast needed if method return type was type variable
+		    // extra cast needed if method return type was type variable
 		    if (codegenBinding.returnType.isTypeVariable()) {
 		        TypeVariableBinding variableReturnType = (TypeVariableBinding) codegenBinding.returnType;
-	        if (variableReturnType.firstBound != this.binding.returnType) { // no need for extra cast if same as first bound anyway
-			    this.valueCast = this.binding.returnType;
-	        }
-	    }
-	} 
+		        if (TypeBinding.notEquals(variableReturnType.firstBound, this.binding.returnType)) { // no need for extra cast if same as first bound anyway
+				    this.valueCast = this.binding.returnType;
+		        }
+		    }
+		}
 	}
 }
 public TypeBinding resolveType(BlockScope scope) {
@@ -191,7 +198,7 @@
 	// Base type promotion
 
 	this.constant = Constant.NotAConstant;
-	boolean receiverCast = false, argsContainCast = false; 
+	boolean receiverCast = false, argsContainCast = false;
 	if (this.receiver instanceof CastExpression) {
 		this.receiver.bits |= DisableUnnecessaryCastCheck; // will check later on
 		receiverCast = true;
@@ -199,8 +206,8 @@
 	this.actualReceiverType = this.receiver.resolveType(scope);
 	if (receiverCast && this.actualReceiverType != null) {
 		 // due to change of declaring class with receiver type, only identity cast should be notified
-		if (((CastExpression)this.receiver).expression.resolvedType == this.actualReceiverType) { 
-			scope.problemReporter().unnecessaryCast((CastExpression)this.receiver);		
+		if (TypeBinding.equalsEquals(((CastExpression)this.receiver).expression.resolvedType, this.actualReceiverType)) {
+			scope.problemReporter().unnecessaryCast((CastExpression)this.receiver);
 		}
 	}
 	// resolve type arguments (for generic constructor call)
@@ -219,24 +226,29 @@
 	}
 	// will check for null after args are resolved
 	TypeBinding[] argumentTypes = Binding.NO_PARAMETERS;
+	boolean polyExpressionSeen = false;
 	if (this.arguments != null) {
-		boolean argHasError = false; // typeChecks all arguments 
+		boolean argHasError = false; // typeChecks all arguments
 		int length = this.arguments.length;
 		argumentTypes = new TypeBinding[length];
+		TypeBinding argumentType;
 		for (int i = 0; i < length; i++) {
 			Expression argument = this.arguments[i];
 			if (argument instanceof CastExpression) {
 				argument.bits |= DisableUnnecessaryCastCheck; // will check later on
 				argsContainCast = true;
 			}
-			if ((argumentTypes[i] = this.arguments[i].resolveType(scope)) == null)
+			argument.setExpressionContext(INVOCATION_CONTEXT);
+			if ((argumentType = argumentTypes[i] = this.arguments[i].resolveType(scope)) == null)
 				argHasError = true;
+			if (argumentType != null && argumentType.kind() == Binding.POLY_TYPE)
+				polyExpressionSeen = true;
 		}
 		if (argHasError) {
 			if(this.actualReceiverType instanceof ReferenceBinding) {
 				// record any selector match, for clients who may still need hint about possible method match
 				this.binding = scope.findMethod((ReferenceBinding)this.actualReceiverType, this.selector, new TypeBinding[]{}, this);
-			}			
+			}
 			return null;
 		}
 	}
@@ -251,22 +263,24 @@
 
 //{ObjectTeams:
     AnchorMapping anchorMapping = null;
-  try {
+  try  {
 	anchorMapping = beforeMethodLookup(argumentTypes, scope);
 //jwl}
-
-	this.binding = 
+	this.binding =
 		this.receiver.isImplicitThis()
 			? scope.getImplicitMethod(this.selector, argumentTypes, this)
-			: scope.getMethod(this.actualReceiverType, this.selector, argumentTypes, this); 
+			: scope.getMethod(this.actualReceiverType, this.selector, argumentTypes, this);
 //{ObjectTeams:
   } finally {
 	afterMethodLookup(scope, anchorMapping, argumentTypes, this.binding.returnType);  
 	if (anchorMapping != null)
 	   	AnchorMapping.removeCurrentMapping(anchorMapping);
   }
-//jwl} 
-
+//jwl}
+	
+	if (polyExpressionSeen && polyExpressionsHaveErrors(scope, this.binding, this.arguments, argumentTypes))
+		return null;
+	
 	if (!this.binding.isValidBinding()) {
 		if (this.binding instanceof ProblemMethodBinding
 			&& ((ProblemMethodBinding) this.binding).problemId() == ProblemReasons.NotVisible) {
@@ -282,23 +296,22 @@
 				scope.problemReporter().invalidMethod(this, this.binding);
 				return null;
 			}
-			CodeSnippetScope localScope = new CodeSnippetScope(scope);			
+			CodeSnippetScope localScope = new CodeSnippetScope(scope);
 //{ObjectTeams:
 			AnchorMapping privateAnchorMapping = null;
 			MethodBinding privateBinding = null;
 		  try  {
 			privateAnchorMapping = beforeMethodLookup(argumentTypes, localScope);
-// jwl}
-			privateBinding = 
+//jwl}
+			privateBinding =
 				this.receiver instanceof CodeSnippetThisReference && ((CodeSnippetThisReference) this.receiver).isImplicit
 					? localScope.getImplicitMethod((ReferenceBinding)this.delegateThis.type, this.selector, argumentTypes, this)
-					: localScope.getMethod(this.delegateThis.type, this.selector, argumentTypes, this); 
+					: localScope.getMethod(this.delegateThis.type, this.selector, argumentTypes, this);
 //{ObjectTeams:
-		  } finally {
+	      } finally {
 			afterMethodLookup(localScope, privateAnchorMapping, argumentTypes, this.binding.returnType);
-		  }
-// jwl} 
-
+	      }
+//jwl}
 			if (!privateBinding.isValidBinding()) {
 				if (this.binding.declaringClass == null) {
 					if (this.actualReceiverType instanceof ReferenceBinding) {
@@ -337,11 +350,11 @@
 			TypeBinding oldReceiverType = this.actualReceiverType;
 			this.actualReceiverType = this.actualReceiverType.getErasureCompatibleType(this.binding.declaringClass);
 			this.receiver.computeConversion(scope, this.actualReceiverType, this.actualReceiverType);
-			if (this.actualReceiverType != oldReceiverType && this.receiver.postConversionType(scope) != this.actualReceiverType) { // record need for explicit cast at codegen since receiver could not handle it
+			if (TypeBinding.notEquals(this.actualReceiverType, oldReceiverType) && TypeBinding.notEquals(this.receiver.postConversionType(scope), this.actualReceiverType)) { // record need for explicit cast at codegen since receiver could not handle it
 				this.bits |= NeedReceiverGenericCast;
-				}
-			}
+			}			
 		}
+	}
 	if (checkInvocationArguments(scope, this.receiver, this.actualReceiverType, this.binding, this.arguments, argumentTypes, argsContainCast, this)) {
 		this.bits |= ASTNode.Unchecked;
 	}
@@ -358,8 +371,8 @@
 
 	// from 1.5 compliance on, array#clone() returns the array type (but binding still shows Object)
 	if (this.actualReceiverType.isArrayType()
-			&& this.binding.parameters == Binding.NO_PARAMETERS 
-			&& scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5 
+			&& this.binding.parameters == Binding.NO_PARAMETERS
+			&& scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_5
 			&& CharOperation.equals(this.binding.selector, CLONE)) {
 		this.resolvedType = this.actualReceiverType;
 	} else {
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
index e2ae9e6..c067b92 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetParser.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -64,13 +68,15 @@
 		if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
 			this.expressionPtr -= length;
 			System.arraycopy(
-				this.expressionStack, 
-				this.expressionPtr + 1, 
-				alloc.arguments = new Expression[length], 
-				0, 
-				length); 
+				this.expressionStack,
+				this.expressionPtr + 1,
+				alloc.arguments = new Expression[length],
+				0,
+				length);
 		}
 		alloc.type = getTypeReference(0);
+		checkForDiamond(alloc.type);
+		
 		//the default constructor with the correct number of argument
 		//will be created and added by the TC (see createsInternalConstructorWithBinding)
 		alloc.sourceStart = this.intStack[this.intPtr--];
@@ -81,7 +87,7 @@
 		anonymousTypeDeclaration.declarationSourceEnd = this.endStatementPosition;
 		if (anonymousTypeDeclaration.allocation != null) {
 			anonymousTypeDeclaration.allocation.sourceEnd = this.endStatementPosition;
-		}		
+		}
 		this.astPtr--;
 		this.astLengthPtr--;
 	}
@@ -107,8 +113,12 @@
 				length);
 		}
 		alloc.type = getTypeReference(0);
-		checkForDiamond(alloc.type);
-		
+
+		length = this.genericsLengthStack[this.genericsLengthPtr--];
+		this.genericsPtr -= length;
+		System.arraycopy(this.genericsStack, this.genericsPtr + 1, alloc.typeArguments = new TypeReference[length], 0, length);
+		this.intPtr--;
+
 		//the default constructor with the correct number of argument
 		//will be created and added by the TC (see createsInternalConstructorWithBinding)
 		alloc.sourceStart = this.intStack[this.intPtr--];
@@ -166,7 +176,7 @@
 	this.identifierLengthPtr--;
 
 	//compute the declaration source too
-	typeDecl.declarationSourceStart = this.intStack[this.intPtr--]; 
+	typeDecl.declarationSourceStart = this.intStack[this.intPtr--];
 	this.intPtr--;
 	// 'class' and 'interface' push an int position
 	typeDecl.modifiersSourceStart = this.intStack[this.intPtr--];
@@ -179,7 +189,7 @@
 
 	this.listLength = 0; // will be updated when reading super-interfaces
 	// recovery
-	if (this.currentElement != null){ 
+	if (this.currentElement != null){
 		this.lastCheckPoint = typeDecl.bodyStart;
 		this.currentElement = this.currentElement.add(typeDecl, 0);
 		this.lastIgnoredToken = -1;
@@ -196,7 +206,7 @@
 protected void consumeEnhancedForStatement() {
 	super.consumeEnhancedForStatement();
 	/* recovery */
-	recordLastStatementIfNeeded();	
+	recordLastStatementIfNeeded();
 }
 protected void consumeExpressionStatement() {
 	super.consumeExpressionStatement();
@@ -214,7 +224,7 @@
 			this.evaluationContext);
 	this.identifierLengthPtr--;
 	if (isSuperAccess) {
-		//considerates the fieldReference beginning at the 'super' ....	
+		//considerates the fieldReference beginning at the 'super' ....
 		fr.sourceStart = this.intStack[this.intPtr--];
 		problemReporter().codeSnippetMissingClass(null,0, 0);
 		fr.receiver = new CodeSnippetSuperReference(fr.sourceStart, this.endPosition);
@@ -253,17 +263,17 @@
 }
 
 /**
- * In case emulating local variables, wrap the (recovered) statements inside a 
+ * In case emulating local variables, wrap the (recovered) statements inside a
  * try statement so as to achieve local state commiting (copy local vars back to fields).
  * The CSToCuMapper could not be used, since it could have interfered with
  * the syntax recovery specific to code snippets.
  */
-protected void consumeMethodDeclaration(boolean isNotAbstract) {
+protected void consumeMethodDeclaration(boolean isNotAbstract, boolean isDefaultMethod) {
 	// MethodDeclaration ::= MethodHeader MethodBody
 	// AbstractMethodDeclaration ::= MethodHeader ';'
 
-	super.consumeMethodDeclaration(isNotAbstract);
-	
+	super.consumeMethodDeclaration(isNotAbstract, isDefaultMethod);
+
 	// now we know that we have a method declaration at the top of the ast stack
 	MethodDeclaration methodDecl = (MethodDeclaration) this.astStack[this.astPtr];
 
@@ -274,12 +284,12 @@
 		if (last >= 0 && methodDecl.statements[last] instanceof Expression){
 			Expression lastExpression = (Expression) methodDecl.statements[last];
 			methodDecl.statements[last] = new CodeSnippetReturnStatement(
-											lastExpression, 
-											lastExpression.sourceStart, 
+											lastExpression,
+											lastExpression.sourceStart,
 											lastExpression.sourceEnd);
 		}
 	}
-	
+
 	int start = methodDecl.bodyStart-1, end = start;
 	long position = ((long)start << 32) + end;
 	long[] positions = new long[]{position};
@@ -309,7 +319,7 @@
 			}
 			int dimCount = CharOperation.occurencesOf('[', this.evaluationContext.localVariableTypeNames[i]);
 			if (dimCount > 0) {
-				typeReference = copyDims(typeReference, dimCount);
+				typeReference = augmentTypeWithAdditionalDimensions(typeReference, dimCount, null, false);
 			}
 			NameReference init = new SingleNameReference(
 									CharOperation.concat(LOCAL_VAR_PREFIX, this.evaluationContext.localVariableNames[i]), position);
@@ -357,21 +367,32 @@
 	if (this.scanner.startPosition >= this.codeSnippetStart
 		&& this.scanner.startPosition <= this.codeSnippetEnd + 1 + this.lineSeparatorLength // 14838
 		&& isTopLevelType()) {
-			
+
 		// when the name is only an identifier...we have a message send to "this" (implicit)
 
 		MessageSend m = newMessageSend();
 		m.sourceEnd = this.rParenPos;
-		m.sourceStart = 
-			(int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32); 
+		m.sourceStart =
+			(int) ((m.nameSourcePosition = this.identifierPositionStack[this.identifierPtr]) >>> 32);
 		m.selector = this.identifierStack[this.identifierPtr--];
 		if (this.identifierLengthStack[this.identifierLengthPtr] == 1) {
 			m.receiver = new CodeSnippetThisReference(0,0,this.evaluationContext, true);
 			this.identifierLengthPtr--;
 		} else {
 			this.identifierLengthStack[this.identifierLengthPtr]--;
+			int length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--];
+			Annotation [] typeAnnotations;
+			if (length != 0) {
+				System.arraycopy(
+						this.typeAnnotationStack,
+						(this.typeAnnotationPtr -= length) + 1,
+						typeAnnotations = new Annotation[length],
+						0,
+						length);
+				problemReporter().misplacedTypeAnnotations(typeAnnotations[0], typeAnnotations[typeAnnotations.length - 1]);
+			}
 			m.receiver = getUnspecifiedReference();
-			m.sourceStart = m.receiver.sourceStart;		
+			m.sourceStart = m.receiver.sourceStart;
 		}
 		pushOnExpressionStack(m);
 	} else {
@@ -503,7 +524,7 @@
 protected void consumeStatementReturn() {
 	// ReturnStatement ::= 'return' Expressionopt ';'
 
-	// returned value intercepted by code snippet 
+	// returned value intercepted by code snippet
 	// support have to be defined at toplevel only
 	if ((this.hasRecoveredOnExpression
 			|| (this.scanner.startPosition >= this.codeSnippetStart && this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /* 14838*/))
@@ -513,8 +534,8 @@
 		Expression expression = this.expressionStack[this.expressionPtr--];
 		pushOnAstStack(
 			new CodeSnippetReturnStatement(
-				expression, 
-				expression.sourceStart, 
+				expression,
+				expression.sourceStart,
 				expression.sourceEnd));
 	} else {
 		super.consumeStatementReturn();
@@ -565,18 +586,18 @@
 
 			// consume expresion as a return statement
 			consumeStatementReturn();
-			int fieldsCount = 
+			int fieldsCount =
 				(this.evaluationContext.localVariableNames == null ? 0 : this.evaluationContext.localVariableNames.length)
 				+ (this.evaluationContext.declaringTypeName == null ? 0 : 1);
-			if (this.astPtr > (this.diet ? 0 : 2 + fieldsCount)) { 
+			if (this.astPtr > (this.diet ? 0 : 2 + fieldsCount)) {
 					// in diet mode, the ast stack was empty when we went for method body
-					// otherwise it contained the type, the generated fields for local variables, 
+					// otherwise it contained the type, the generated fields for local variables,
 					// the generated field for 'this' and the method
 				consumeBlockStatements();
 			}
 			consumeMethodBody();
 			if (!this.diet) {
-				consumeMethodDeclaration(true);
+				consumeMethodDeclaration(true, false);
 				if (fieldsCount > 0) {
 					consumeClassBodyDeclarations();
 				}
@@ -595,7 +616,7 @@
 			for (int i = 0; i < this.problemCountBeforeRecovery; i++) {
 				// skip unmatched bracket problems
 				if (unitResult.problems[i].getID() == IProblem.UnmatchedBracket) continue;
-				
+
 				int start = unitResult.problems[i].getSourceStart();
 				if (start > maxRegularPos && start <= this.codeSnippetEnd) {
 					maxRegularPos = start;
@@ -605,7 +626,7 @@
 			for (int i = this.problemCountBeforeRecovery; i < problemCount; i++) {
 				// skip unmatched bracket problems
 				if (unitResult.problems[i].getID() == IProblem.UnmatchedBracket) continue;
-				
+
 				int start = unitResult.problems[i].getSourceStart();
 				if (start > maxRecoveryPos && start <= this.codeSnippetEnd) {
 					maxRecoveryPos = start;
@@ -613,7 +634,7 @@
 			}
 			if (maxRecoveryPos > maxRegularPos) {
 				System.arraycopy(unitResult.problems, this.problemCountBeforeRecovery, unitResult.problems, 0, problemCount - this.problemCountBeforeRecovery);
-				unitResult.problemCount -= this.problemCountBeforeRecovery;				
+				unitResult.problemCount -= this.problemCountBeforeRecovery;
 			} else {
 				unitResult.problemCount -= (problemCount - this.problemCountBeforeRecovery);
 			}
@@ -625,20 +646,23 @@
 	}
 	return super.endParse(act);
 }
-protected NameReference getUnspecifiedReference() {
+protected NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
 	/* build a (unspecified) NameReference which may be qualified*/
+	if (rejectTypeAnnotations) {
+		consumeNonTypeUseName();
+	}
 
-	if (this.scanner.startPosition >= this.codeSnippetStart 
+	if (this.scanner.startPosition >= this.codeSnippetStart
 		&& this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /*14838*/){
 		int length;
 		NameReference ref;
 		if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1) {
 			// single variable reference
-			ref = 
+			ref =
 				new CodeSnippetSingleNameReference(
-					this.identifierStack[this.identifierPtr], 
+					this.identifierStack[this.identifierPtr],
 					this.identifierPositionStack[this.identifierPtr--],
-					this.evaluationContext); 
+					this.evaluationContext);
 		} else {
 			//Qualified variable reference
 			char[][] tokens = new char[length][];
@@ -646,16 +670,16 @@
 			System.arraycopy(this.identifierStack, this.identifierPtr + 1, tokens, 0, length);
 			long[] positions = new long[length];
 			System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
-			ref = 
+			ref =
 				new CodeSnippetQualifiedNameReference(tokens,
-					positions, 
+					positions,
 					(int) (this.identifierPositionStack[this.identifierPtr + 1] >> 32), // sourceStart
 					(int) this.identifierPositionStack[this.identifierPtr + length],
 					this.evaluationContext); // sourceEnd
 		}
 		return ref;
 	} else {
-		return super.getUnspecifiedReference();
+		return super.getUnspecifiedReference(rejectTypeAnnotations);
 	}
 }
 protected NameReference getUnspecifiedReferenceOptimized() {
@@ -665,18 +689,19 @@
 	a field access. This optimization is IMPORTANT while it results
 	that when a NameReference is build, the type checker should always
 	look for that it is not a type reference */
+	consumeNonTypeUseName();
 
-	if (this.scanner.startPosition >= this.codeSnippetStart 
+	if (this.scanner.startPosition >= this.codeSnippetStart
 		&& this.scanner.startPosition <= this.codeSnippetEnd+1+this.lineSeparatorLength /*14838*/){
 		int length;
 		NameReference ref;
 		if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1) {
 			// single variable reference
-			ref = 
+			ref =
 				new CodeSnippetSingleNameReference(
-					this.identifierStack[this.identifierPtr], 
+					this.identifierStack[this.identifierPtr],
 					this.identifierPositionStack[this.identifierPtr--],
-					this.evaluationContext); 
+					this.evaluationContext);
 			ref.bits &= ~ASTNode.RestrictiveFlagMASK;
 			ref.bits |= Binding.LOCAL | Binding.FIELD;
 			return ref;
@@ -695,7 +720,7 @@
 		System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, length);
 		ref = new CodeSnippetQualifiedNameReference(
 				tokens,
-				positions, 
+				positions,
 				(int) (this.identifierPositionStack[this.identifierPtr + 1] >> 32), // sourceStart
 				(int) this.identifierPositionStack[this.identifierPtr + length],
 				this.evaluationContext); // sourceEnd
@@ -726,11 +751,11 @@
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
 		this.expressionPtr -= length;
 		System.arraycopy(
-			this.expressionStack, 
-			this.expressionPtr + 1, 
-			m.arguments = new Expression[length], 
-			0, 
-			length); 
+			this.expressionStack,
+			this.expressionPtr + 1,
+			m.arguments = new Expression[length],
+			0,
+			length);
 	}
 	return m;
 }
@@ -762,7 +787,7 @@
 protected void reportSyntaxErrors(boolean isDietParse, int oldFirstToken) {
 	if (!isDietParse) {
 		this.scanner.initialPosition = this.lastStatement;
-		this.scanner.eofPosition = this.codeSnippetEnd + 1; // stop after expression 
+		this.scanner.eofPosition = this.codeSnippetEnd + 1; // stop after expression
 		oldFirstToken = TokenNameTWIDDLE;//TokenNameREMAINDER; // first token of th expression parse
 	}
 	super.reportSyntaxErrors(isDietParse, oldFirstToken);
@@ -775,7 +800,7 @@
 	if (this.diet || this.hasRecoveredOnExpression) { // no reentering inside expression recovery
 		return false;
 	}
-	
+
 	// record previous error, in case more accurate than potential one in expression recovery
 	// e.g. "return foo(a a); 1+3"
 	this.problemCountBeforeRecovery = this.compilationUnit.compilationResult.problemCount;
@@ -787,16 +812,18 @@
 	this.scanner.initialPosition = this.lastStatement;
 	this.scanner.startPosition = this.lastStatement;
 	this.scanner.currentPosition = this.lastStatement;
-	this.scanner.eofPosition = this.codeSnippetEnd < Integer.MAX_VALUE ? this.codeSnippetEnd + 1 : this.codeSnippetEnd; // stop after expression 
+	this.scanner.eofPosition = this.codeSnippetEnd < Integer.MAX_VALUE ? this.codeSnippetEnd + 1 : this.codeSnippetEnd; // stop after expression
 	this.scanner.commentPtr = -1;
 
 	// reset stacks in consistent state
 	this.expressionPtr = -1;
+	this.typeAnnotationLengthPtr = -1;
+	this.typeAnnotationPtr = -1;
 	this.identifierPtr = -1;
 	this.identifierLengthPtr = -1;
 
 	// go for the expression
-	goForExpression();
+	goForExpression(true /* record line separators */);
 	this.hasRecoveredOnExpression = true;
 	this.hasReportedError = false;
 	this.hasError = false;
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
index e97eb2d..9a97adb 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetQualifiedNameReference.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for bug 185682 - Increment/decrement operators mark local variables as read
@@ -48,7 +52,7 @@
  */
 public CodeSnippetQualifiedNameReference(char[][] sources, long[] positions, int sourceStart, int sourceEnd, EvaluationContext evaluationContext) {
 	super(sources, positions, sourceStart, sourceEnd);
-	this.evaluationContext = evaluationContext;	
+	this.evaluationContext = evaluationContext;
 }
 
 /**
@@ -60,7 +64,7 @@
 	TypeBinding declaringClass = fieldBinding.original().declaringClass;
 	// check for forward references
 	if ((this.indexOfFirstFieldBinding == 1 || declaringClass.isEnum())
-			&& methodScope.enclosingSourceType() == declaringClass
+			&& TypeBinding.equalsEquals(methodScope.enclosingSourceType(), declaringClass)
 			&& methodScope.lastVisibleFieldID >= 0
 			&& fieldBinding.id >= methodScope.lastVisibleFieldID
 			&& (!fieldBinding.isStatic() || methodScope.isStatic)) {
@@ -76,7 +80,7 @@
 	if ((this.bits & Binding.VARIABLE) == 0) { // nothing to do if type ref
 		codeStream.recordPositionsFrom(pc, this.sourceStart);
 		return;
-		}
+	}
 	FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1];
 	if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
 		super.generateCode(currentScope, codeStream, valueRequired);
@@ -85,18 +89,18 @@
 	lastFieldBinding = generateReadSequence(currentScope, codeStream);
 	if (lastFieldBinding != null) {
 		boolean isStatic = lastFieldBinding.isStatic();
-				Constant fieldConstant = lastFieldBinding.constant();
-				if (fieldConstant != Constant.NotAConstant) {
+		Constant fieldConstant = lastFieldBinding.constant();
+		if (fieldConstant != Constant.NotAConstant) {
 			if (!isStatic){
-						codeStream.invokeObjectGetClass();
-						codeStream.pop();
-					}
-			if (valueRequired) { // inline the last field constant
-					codeStream.generateConstant(fieldConstant, this.implicitConversion);
+				codeStream.invokeObjectGetClass();
+				codeStream.pop();
 			}
-				} else {	
+			if (valueRequired) { // inline the last field constant
+				codeStream.generateConstant(fieldConstant, this.implicitConversion);
+			}
+		} else {
 			boolean isFirst = lastFieldBinding == this.binding
-											&& (this.indexOfFirstFieldBinding == 1 || lastFieldBinding.declaringClass == currentScope.enclosingReceiverType())
+											&& (this.indexOfFirstFieldBinding == 1 || TypeBinding.equalsEquals(lastFieldBinding.declaringClass, currentScope.enclosingReceiverType()))
 											&& this.otherBindings == null; // could be dup: next.next.next
 			TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length);
 			if (valueRequired
@@ -108,15 +112,15 @@
 					codeStream.arraylength();
 					if (valueRequired) {
 						codeStream.generateImplicitConversion(this.implicitConversion);
-						} else {
+					} else {
 						// could occur if !valueRequired but compliance >= 1.4
 						codeStream.pop();
-						}
-					} else {
-						codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
+					}
+				} else {
+					codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
 					if (requiredGenericCast != null) codeStream.checkcast(requiredGenericCast);
 					if (valueRequired) {
-					codeStream.generateImplicitConversion(this.implicitConversion);
+						codeStream.generateImplicitConversion(this.implicitConversion);
 					} else {
 						boolean isUnboxing = (this.implicitConversion & TypeIds.UNBOXING) != 0;
 						// conversion only generated if unboxing
@@ -129,18 +133,18 @@
 							default :
 								codeStream.pop();
 						}
+					}
 				}
-			}
 
 				int fieldPosition = (int) (this.sourcePositions[this.sourcePositions.length - 1] >>> 32);
 				codeStream.recordPositionsFrom(lastFieldPc, fieldPosition);
-		} else {
+			} else {
 				if (!isStatic){
-				codeStream.invokeObjectGetClass(); // perform null check
-				codeStream.pop();
+					codeStream.invokeObjectGetClass(); // perform null check
+					codeStream.pop();
+				}
 			}
-		}		
-	}
+		}
 	}
 	codeStream.recordPositionsFrom(pc, this.sourceStart);
 }
@@ -152,7 +156,7 @@
 	if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
 		super.generateAssignment(currentScope, codeStream, assignment, valueRequired);
 		return;
-		}
+	}
 	lastFieldBinding = generateReadSequence(currentScope, codeStream);
 	codeStream.generateEmulationForField(lastFieldBinding);
 	codeStream.swap();
@@ -166,8 +170,8 @@
 			default :
 				codeStream.dup_x2();
 			break;	
-				}
-		}
+		}		
+	}
 	codeStream.generateEmulatedWriteAccessForField(lastFieldBinding);
 	if (valueRequired) {
 		codeStream.generateImplicitConversion(assignment.implicitConversion);
@@ -181,43 +185,43 @@
 		return;
 	}
 	lastFieldBinding = generateReadSequence(currentScope, codeStream);
-		if (lastFieldBinding.isStatic()){
-			codeStream.generateEmulationForField(lastFieldBinding);
-			codeStream.swap();
-			codeStream.aconst_null();
-			codeStream.swap();
-			codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
-		} else {
-			codeStream.generateEmulationForField(lastFieldBinding);
-			codeStream.swap();
-			codeStream.dup();
+	if (lastFieldBinding.isStatic()){
+		codeStream.generateEmulationForField(lastFieldBinding);
+		codeStream.swap();
+		codeStream.aconst_null();
+		codeStream.swap();
+		codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
+	} else {
+		codeStream.generateEmulationForField(lastFieldBinding);
+		codeStream.swap();
+		codeStream.dup();
 
-			codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
-		}
-		// the last field access is a write access
-		// perform the actual compound operation
-		int operationTypeID;
-		if ((operationTypeID = (this.implicitConversion & IMPLICIT_CONVERSION_MASK) >> 4) == T_JavaLangString) {
-			codeStream.generateStringConcatenationAppend(currentScope, null, expression);
+		codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
+	}
+	// the last field access is a write access
+	// perform the actual compound operation
+	int operationTypeID;
+	if ((operationTypeID = (this.implicitConversion & IMPLICIT_CONVERSION_MASK) >> 4) == T_JavaLangString) {
+		codeStream.generateStringConcatenationAppend(currentScope, null, expression);
+	} else {
+		// promote the array reference to the suitable operation type
+		codeStream.generateImplicitConversion(this.implicitConversion);
+		// generate the increment value (will by itself  be promoted to the operation value)
+		if (expression == IntLiteral.One){ // prefix operation
+			codeStream.generateConstant(expression.constant, this.implicitConversion);
 		} else {
-			// promote the array reference to the suitable operation type
-			codeStream.generateImplicitConversion(this.implicitConversion);
-			// generate the increment value (will by itself  be promoted to the operation value)
-			if (expression == IntLiteral.One){ // prefix operation
-				codeStream.generateConstant(expression.constant, this.implicitConversion);			
-			} else {
-				expression.generateCode(currentScope, codeStream, true);
-			}
-			// perform the operation
-			codeStream.sendOperator(operator, operationTypeID);
-			// cast the value back to the array reference type
-			codeStream.generateImplicitConversion(assignmentImplicitConversion);
+			expression.generateCode(currentScope, codeStream, true);
 		}
-		// actual assignment
+		// perform the operation
+		codeStream.sendOperator(operator, operationTypeID);
+		// cast the value back to the array reference type
+		codeStream.generateImplicitConversion(assignmentImplicitConversion);
+	}
+	// actual assignment
 
-		// current stack is:
-		// field receiver value
-		if (valueRequired) {
+	// current stack is:
+	// field receiver value
+	if (valueRequired) {
 		switch (lastFieldBinding.type.id) {
 			case TypeIds.T_long :
 			case TypeIds.T_double :
@@ -226,21 +230,21 @@
 			default :
 				codeStream.dup_x2();
 			break;	
-			}
 		}
-		// current stack is:
-		// value field receiver value				
-		codeStream.generateEmulatedWriteAccessForField(lastFieldBinding);
 	}
+	// current stack is:
+	// value field receiver value
+	codeStream.generateEmulatedWriteAccessForField(lastFieldBinding);
+}
 public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
     FieldBinding lastFieldBinding = this.otherBindings == null ? (FieldBinding) this.binding : this.otherBindings[this.otherBindings.length-1];
 	if (lastFieldBinding.canBeSeenBy(getFinalReceiverType(), this, currentScope)) {
 		super.generatePostIncrement(currentScope, codeStream, postIncrement, valueRequired);
 		return;
-			}
+	}
 	lastFieldBinding = generateReadSequence(currentScope, codeStream);
-		codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
-		if (valueRequired) {
+	codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
+	if (valueRequired) {
 		switch (lastFieldBinding.type.id) {
 			case TypeIds.T_long :
 			case TypeIds.T_double :
@@ -249,35 +253,35 @@
 			default :
 				codeStream.dup();
 			break;	
-			}
-		}
-		codeStream.generateEmulationForField(lastFieldBinding);
-		if ((lastFieldBinding.type == TypeBinding.LONG) || (lastFieldBinding.type == TypeBinding.DOUBLE)) {
-			codeStream.dup_x2();
-			codeStream.pop();
-			if (lastFieldBinding.isStatic()) {
-				codeStream.aconst_null();
-			} else {
-				generateReadSequence(currentScope, codeStream);
-			}
-			codeStream.dup_x2();
-			codeStream.pop();					
-		} else {
-			codeStream.dup_x1();
-			codeStream.pop();
-			if (lastFieldBinding.isStatic()) {
-				codeStream.aconst_null();
-			} else {
-				generateReadSequence(currentScope, codeStream);
-			}
-			codeStream.dup_x1();
-			codeStream.pop();					
-		}
-		codeStream.generateConstant(postIncrement.expression.constant, this.implicitConversion);
-		codeStream.sendOperator(postIncrement.operator, lastFieldBinding.type.id);
-		codeStream.generateImplicitConversion(postIncrement.preAssignImplicitConversion);
-		codeStream.generateEmulatedWriteAccessForField(lastFieldBinding);
+		}		
 	}
+	codeStream.generateEmulationForField(lastFieldBinding);
+	if ((TypeBinding.equalsEquals(lastFieldBinding.type, TypeBinding.LONG)) || (TypeBinding.equalsEquals(lastFieldBinding.type, TypeBinding.DOUBLE))) {
+		codeStream.dup_x2();
+		codeStream.pop();
+		if (lastFieldBinding.isStatic()) {
+			codeStream.aconst_null();
+		} else {
+			generateReadSequence(currentScope, codeStream);
+		}
+		codeStream.dup_x2();
+		codeStream.pop();
+	} else {
+		codeStream.dup_x1();
+		codeStream.pop();
+		if (lastFieldBinding.isStatic()) {
+			codeStream.aconst_null();
+		} else {
+			generateReadSequence(currentScope, codeStream);
+		}
+		codeStream.dup_x1();
+		codeStream.pop();
+	}
+	codeStream.generateConstant(postIncrement.expression.constant, this.implicitConversion);
+	codeStream.sendOperator(postIncrement.operator, lastFieldBinding.type.id);
+	codeStream.generateImplicitConversion(postIncrement.preAssignImplicitConversion);
+	codeStream.generateEmulatedWriteAccessForField(lastFieldBinding);
+}
 
 /*
  * Generate code for all bindings (local and fields) excluding the last one, which may then be generated code
@@ -324,7 +328,7 @@
 					} else {
 						codeStream.aconst_null();
 					}
-				}				
+				}
 			}
 			break;
 		case Binding.LOCAL : // reading the first local variable
@@ -340,7 +344,8 @@
 				// no implicit conversion
 			} else {
 				// outer local?
-				if ((this.bits & DepthMASK) != 0) {
+				if ((this.bits & IsCapturedOuterLocal) != 0) {
+					checkEffectiveFinality(localBinding, currentScope);
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
@@ -363,14 +368,14 @@
 			TypeBinding nextGenericCast = this.otherGenericCasts == null ? null : this.otherGenericCasts[i];
 			if (lastFieldBinding != null) {
 				needValue = !nextField.isStatic();
-						Constant fieldConstant = lastFieldBinding.constant();
-						if (fieldConstant != Constant.NotAConstant) {
+				Constant fieldConstant = lastFieldBinding.constant();
+				if (fieldConstant != Constant.NotAConstant) {
 					if (i > 0 && !lastFieldBinding.isStatic()) {
-								codeStream.invokeObjectGetClass(); // perform null check
-								codeStream.pop();
-							}
+						codeStream.invokeObjectGetClass(); // perform null check
+						codeStream.pop();
+					}
 					if (needValue) {
-							codeStream.generateConstant(fieldConstant, 0);
+						codeStream.generateConstant(fieldConstant, 0);
 					}
 				} else {
 					if (needValue || (i > 0 && complyTo14) || lastGenericCast != null) {
@@ -383,16 +388,16 @@
 								} else {
 									codeStream.fieldAccess(Opcodes.OPC_getfield, lastFieldBinding, constantPoolDeclaringClass);
 								}
-						} else {
+							} else {
 								codeStream.invoke(Opcodes.OPC_invokestatic, accessor, null /* default declaringClass */);
+							}
+						} else {
+							codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
 						}
-					} else {
-						codeStream.generateEmulatedReadAccessForField(lastFieldBinding);
-					}
 						if (lastGenericCast != null) {
 							codeStream.checkcast(lastGenericCast);
 							lastReceiverType = lastGenericCast;
-				} else {
+						} else {
 							lastReceiverType = lastFieldBinding.type;
 						}
 						if (!needValue) codeStream.pop();
@@ -400,7 +405,7 @@
 						if (lastFieldBinding == initialFieldBinding) {
 							if (lastFieldBinding.isStatic()){
 								// if no valueRequired, still need possible side-effects of <clinit> invocation, if field belongs to different class
-								if (initialFieldBinding.declaringClass != this.actualReceiverType.erasure()) {
+								if (TypeBinding.notEquals(initialFieldBinding.declaringClass, this.actualReceiverType.erasure())) {
 									if (lastFieldBinding.canBeSeenBy(lastReceiverType, this, currentScope)) {
 										MethodBinding accessor = this.syntheticReadAccessors == null ? null : this.syntheticReadAccessors[i];
 										if (accessor == null) {
@@ -416,9 +421,9 @@
 								}
 							}
 						} else if (!lastFieldBinding.isStatic()){
-						codeStream.invokeObjectGetClass(); // perform null check
-						codeStream.pop();
-					}						
+							codeStream.invokeObjectGetClass(); // perform null check
+							codeStream.pop();
+						}
 						lastReceiverType = lastFieldBinding.type;
 					}
 					if ((positionsLength - otherBindingsCount + i - 1) >= 0) {
@@ -433,10 +438,10 @@
 				if (lastFieldBinding.isStatic()) {
 					codeStream.aconst_null();
 				}
-			}
-		}			
+			}			
+		}
 	}
-	return lastFieldBinding;
+	return lastFieldBinding;	
 }
 
 
@@ -458,7 +463,7 @@
 					scope.problemReporter().staticFieldAccessToNonStaticVariable(this, (FieldBinding) this.binding);
 					return null;
 				}
-			} else { //accessing to a field using a type as "receiver" is allowed only with static field	
+			} else { //accessing to a field using a type as "receiver" is allowed only with static field
 				scope.problemReporter().staticFieldAccessToNonStaticVariable(this, (FieldBinding) this.binding);
 				return null;
 			}
@@ -479,11 +484,11 @@
 	// allocation of the fieldBindings array	and its respective constants
 	int otherBindingsLength = length - index;
 	this.otherBindings = new FieldBinding[otherBindingsLength];
-	
+
 	// fill the first constant (the one of the binding)
 	this.constant =((VariableBinding) this.binding).constant();
 
-	// iteration on each field	
+	// iteration on each field
 	while (index < length) {
 		char[] token = this.tokens[index];
 		if (type == null) return null; // could not resolve type prior to this point
@@ -529,12 +534,12 @@
 	return (this.otherBindings[otherBindingsLength - 1]).type;
 }
 
-	/**
-	 * index is <0 to denote write access emulation
-	 */		
+/**
+ * index is <0 to denote write access emulation
+ */
 public void manageSyntheticAccessIfNecessary(BlockScope currentScope, FieldBinding fieldBinding, int index, FlowInfo flowInfo) {
 	// do nothing
-	}
+}
 
 /**
  * Normal field binding did not work, try to bind to a field of the delegate receiver.
@@ -560,7 +565,7 @@
 				CodeSnippetScope localScope = new CodeSnippetScope(scope);
 				this.binding = localScope.getFieldForCodeSnippet(this.delegateThis.type, this.tokens[0], this);
 				if (this.binding.isValidBinding()) {
-					return checkFieldAccess(scope);						
+					return checkFieldAccess(scope);
 				} else {
 					return super.reportError(scope);
 				}
@@ -574,13 +579,13 @@
 
 	TypeBinding result;
 	if (this.binding instanceof ProblemFieldBinding && ((ProblemFieldBinding) this.binding).problemId() == NotVisible) {
-	// field and/or local are done before type lookups
-	// the only available value for the restrictiveFlag BEFORE
-	// the TC is Flag_Type Flag_LocalField and Flag_TypeLocalField 
-	CodeSnippetScope localScope = new CodeSnippetScope(scope);
+		// field and/or local are done before type lookups
+		// the only available value for the restrictiveFlag BEFORE
+		// the TC is Flag_Type Flag_LocalField and Flag_TypeLocalField
+		CodeSnippetScope localScope = new CodeSnippetScope(scope);
 		if ((this.binding = localScope.getBinding(this.tokens, this.bits & RestrictiveFlagMASK, this, (ReferenceBinding) this.delegateThis.type)).isValidBinding()) {
-		this.bits &= ~RestrictiveFlagMASK; // clear bits
-		this.bits |= Binding.FIELD;
+			this.bits &= ~RestrictiveFlagMASK; // clear bits
+			this.bits |= Binding.FIELD;
 			result = getOtherFieldBindings(scope);
 		} else {
 			return super.reportError(scope);
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
index 6fff6ba..b07ddf3 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
@@ -71,14 +71,14 @@
 	if (fieldBinding.isPublic()) return true;
 
 	ReferenceBinding invocationType = (ReferenceBinding) receiverType;
-	if (invocationType == fieldBinding.declaringClass) return true;
+	if (TypeBinding.equalsEquals(invocationType, fieldBinding.declaringClass)) return true;
 
 	if (fieldBinding.isProtected()) {
 		// answer true if the invocationType is the declaringClass or they are in the same package
 		// OR the invocationType is a subclass of the declaringClass
 		//    AND the receiverType is the invocationType or its subclass
 		//    OR the field is a static field accessed directly through a type
-		if (invocationType == fieldBinding.declaringClass) return true;
+		if (TypeBinding.equalsEquals(invocationType, fieldBinding.declaringClass)) return true;
 		if (invocationType.fPackage == fieldBinding.declaringClass.fPackage) return true;
 		if (fieldBinding.declaringClass.isSuperclassOf(invocationType)) {
 			if (invocationSite.isSuperAccess()) return true;
@@ -96,9 +96,9 @@
 	if (fieldBinding.isPrivate()) {
 		// answer true if the receiverType is the declaringClass
 		// AND the invocationType and the declaringClass have a common enclosingType
-		if (receiverType != fieldBinding.declaringClass) return false;
+		if (TypeBinding.notEquals(receiverType, fieldBinding.declaringClass)) return false;
 
-		if (invocationType != fieldBinding.declaringClass) {
+		if (TypeBinding.notEquals(invocationType, fieldBinding.declaringClass)) {
 			ReferenceBinding outerInvocationType = invocationType;
 			ReferenceBinding temp = outerInvocationType.enclosingType();
 			while (temp != null) {
@@ -112,7 +112,7 @@
 				outerDeclaringClass = temp;
 				temp = temp.enclosingType();
 			}
-			if (outerInvocationType != outerDeclaringClass) return false;
+			if (TypeBinding.notEquals(outerInvocationType, outerDeclaringClass)) return false;
 		}
 		return true;
 	}
@@ -128,9 +128,9 @@
 	TypeBinding originalDeclaringClass = fieldBinding.declaringClass .original();
 	do {
 		if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
-			if (originalDeclaringClass == type.erasure().original()) return true;	
+			if (TypeBinding.equalsEquals(originalDeclaringClass, type.erasure().original())) return true;	
 		} else {
-			if (originalDeclaringClass == type.original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, type.original())) return true;
 		}
 		if (declaringPackage != type.fPackage) return false;
 	} while ((type = type.superclass()) != null);
@@ -146,14 +146,14 @@
 	if (methodBinding.isPublic()) return true;
 
 	ReferenceBinding invocationType = (ReferenceBinding) receiverType;
-	if (invocationType == methodBinding.declaringClass) return true;
+	if (TypeBinding.equalsEquals(invocationType, methodBinding.declaringClass)) return true;
 
 	if (methodBinding.isProtected()) {
 		// answer true if the invocationType is the declaringClass or they are in the same package
 		// OR the invocationType is a subclass of the declaringClass
 		//    AND the receiverType is the invocationType or its subclass
 		//    OR the method is a static method accessed directly through a type
-		if (invocationType == methodBinding.declaringClass) return true;
+		if (TypeBinding.equalsEquals(invocationType, methodBinding.declaringClass)) return true;
 		if (invocationType.fPackage == methodBinding.declaringClass.fPackage) return true;
 		if (methodBinding.declaringClass.isSuperclassOf(invocationType)) {
 			if (invocationSite.isSuperAccess()) return true;
@@ -171,9 +171,9 @@
 	if (methodBinding.isPrivate()) {
 		// answer true if the receiverType is the declaringClass
 		// AND the invocationType and the declaringClass have a common enclosingType
-		if (receiverType != methodBinding.declaringClass) return false;
+		if (TypeBinding.notEquals(receiverType, methodBinding.declaringClass)) return false;
 
-		if (invocationType != methodBinding.declaringClass) {
+		if (TypeBinding.notEquals(invocationType, methodBinding.declaringClass)) {
 			ReferenceBinding outerInvocationType = invocationType;
 			ReferenceBinding temp = outerInvocationType.enclosingType();
 			while (temp != null) {
@@ -187,7 +187,7 @@
 				outerDeclaringClass = temp;
 				temp = temp.enclosingType();
 			}
-			if (outerInvocationType != outerDeclaringClass) return false;
+			if (TypeBinding.notEquals(outerInvocationType, outerDeclaringClass)) return false;
 		}
 		return true;
 	}
@@ -203,9 +203,9 @@
 	TypeBinding originalDeclaringClass = methodBinding.declaringClass .original();
 	do {
 		if (type.isCapture()) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=285002
-			if (originalDeclaringClass == type.erasure().original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, type.erasure().original())) return true;
 		} else {
-			if (originalDeclaringClass == type.original()) return true;
+			if (TypeBinding.equalsEquals(originalDeclaringClass, type.original())) return true;
 		}
 		if (declaringPackage != type.fPackage) return false;
 	} while ((type = type.superclass()) != null);
@@ -221,7 +221,7 @@
 public final boolean canBeSeenByForCodeSnippet(ReferenceBinding referenceBinding, ReferenceBinding receiverType) {
 	if (referenceBinding.isPublic()) return true;
 
-	if (receiverType == referenceBinding) return true;
+	if (TypeBinding.equalsEquals(receiverType, referenceBinding)) return true;
 
 	if (referenceBinding.isProtected()) {
 		// answer true if the receiver (or its enclosing type) is the superclass 
@@ -247,7 +247,7 @@
 			outerDeclaringClass = temp;
 			temp = temp.enclosingType();
 		}
-		return outerInvocationType == outerDeclaringClass;
+		return TypeBinding.equalsEquals(outerInvocationType, outerDeclaringClass);
 	}
 
 	// isDefault()
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
index ea2877b..112ec4f 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSingleNameReference.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -170,7 +174,7 @@
 				}
 				assignment.expression.generateCode(currentScope, codeStream, true);
 				if (valueRequired) {
-					if ((codegenField.type == TypeBinding.LONG) || (codegenField.type == TypeBinding.DOUBLE)) {
+					if ((TypeBinding.equalsEquals(codegenField.type, TypeBinding.LONG)) || (TypeBinding.equalsEquals(codegenField.type, TypeBinding.DOUBLE))) {
 						codeStream.dup2_x2();
 					} else {
 						codeStream.dup_x2();
@@ -199,7 +203,7 @@
 					if (valueRequired) {
 						codeStream.generateImplicitConversion(assignment.implicitConversion); // implicit conversion
 					} else {
-						if ((localBinding.type == TypeBinding.LONG) || (localBinding.type == TypeBinding.DOUBLE)) {
+						if ((TypeBinding.equalsEquals(localBinding.type, TypeBinding.LONG)) || (TypeBinding.equalsEquals(localBinding.type, TypeBinding.DOUBLE))) {
 							codeStream.pop2();
 						} else {
 							codeStream.pop();
@@ -283,7 +287,8 @@
 				if (!valueRequired)
 					break;
 				// outer local?
-				if ((this.bits & DepthMASK) != 0) {
+				if ((this.bits & IsCapturedOuterLocal) != 0) {
+					checkEffectiveFinality(localBinding, currentScope);
 					// outer local can be reached either through a synthetic arg or a synthetic field
 					VariableBinding[] path = currentScope.getEmulationPath(localBinding);
 					codeStream.generateOuterAccess(path, this, localBinding, currentScope);
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java
index 0f28355..fad1906 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetSkeleton.java
@@ -1,13 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Stephan Herrmann - Contribution for bug 186342 - [compiler][null] Using annotations for null checking
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *         Bug 407191 - [1.8] Binary access support for type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.eval;
 
@@ -20,6 +26,7 @@
 import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
 import org.eclipse.jdt.internal.compiler.env.IBinaryNestedType;
 import org.eclipse.jdt.internal.compiler.env.IBinaryType;
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
 import org.eclipse.jdt.internal.core.util.Util;
 
 /**
@@ -68,6 +75,9 @@
 		public int getAnnotatedParametersCount() {
 			return 0;
 		}
+		public IBinaryTypeAnnotation[] getTypeAnnotations() {
+			return null; 
+		}
 		public char[] getSelector() {
 			return this.selector;
 		}
@@ -112,6 +122,9 @@
 public IBinaryAnnotation[] getAnnotations() {
 	return null;
 }
+public IBinaryTypeAnnotation[] getTypeAnnotations() {
+	return null; 
+}
 public char[] getEnclosingMethod() {
 	return null;
 }
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java
index 5a41e10..850b8da 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetThisReference.java
@@ -4,6 +4,10 @@
  * 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -44,8 +48,9 @@
 		this.isImplicit = isImplicit;
 	}
 	
-	public boolean checkAccess(MethodScope methodScope) {
+	public boolean checkAccess(BlockScope scope, ReferenceBinding thisType) {
 		// this/super cannot be used in constructor call
+		MethodScope methodScope = scope.methodScope();
 		if (this.evaluationContext.isConstructorCall) {
 			methodScope.problemReporter().fieldsOrThisBeforeConstructorInvocation(this);
 			return false;
@@ -56,7 +61,7 @@
 			methodScope.problemReporter().errorThisSuperInStatic(this);
 			return false;
 		}
-		methodScope.resetEnclosingMethodStaticFlag();
+		scope.tagAsAccessingEnclosingInstanceStateOf(thisType, false /* type variable access */);
 		return true;
 	}
 	
@@ -98,12 +103,11 @@
 	public TypeBinding resolveType(BlockScope scope) {
 		// implicit this
 		this.constant = Constant.NotAConstant;
-		TypeBinding snippetType = null;
+		ReferenceBinding snippetType = scope.enclosingSourceType();
 		MethodScope methodScope = scope.methodScope();
-		if (!this.isImplicit && !checkAccess(methodScope)) {
+		if (!this.isImplicit && !checkAccess(scope, snippetType)) {
 			return null;
 		}
-		snippetType = scope.enclosingSourceType();
 		
 		this.delegateThis = scope.getField(snippetType, DELEGATE_THIS, this);
 		if (this.delegateThis == null || !this.delegateThis.isValidBinding()) {
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
index 64c9c8c..836c105 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
@@ -1,14 +1,19 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation  - initial API and implementation
  *     Brock Janiczak   - Contribution for bug 150741
  *     Ray V. (voidstar@gmail.com) - Contribution for bug 282988
+ *     Jesper S Moller - Contribution for bug 402173
  *******************************************************************************/
 package org.eclipse.jdt.core.formatter;
 
@@ -39,6 +44,7 @@
  	 * @see #FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION
  	 * @see #FORMATTER_BRACE_POSITION_FOR_SWITCH
 	 * @see #FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION
+	 * @see #FORMATTER_BRACE_POSITION_FOR_LAMBDA_BODY
 	 * @since 3.0
 	 */
 	public static final String END_OF_LINE = "end_of_line";	//$NON-NLS-1$
@@ -609,6 +615,21 @@
 
 	/**
 	 * <pre>
+	 * FORMATTER / Option to position the braces of a lambda block
+	 *     - option id:         "org.eclipse.jdt.core.formatter.brace_position_for_lambda_body"
+	 *     - possible values:   { END_OF_LINE, NEXT_LINE, NEXT_LINE_SHIFTED, NEXT_LINE_ON_WRAP }
+	 *     - default:           END_OF_LINE
+	 * </pre>
+	 * @see #END_OF_LINE
+	 * @see #NEXT_LINE
+	 * @see #NEXT_LINE_SHIFTED
+	 * @see #NEXT_LINE_ON_WRAP
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final String FORMATTER_BRACE_POSITION_FOR_LAMBDA_BODY = JavaCore.PLUGIN_ID + ".formatter.brace_position_for_lambda_body";	//$NON-NLS-1$
+
+	/**
+	 * <pre>
 	 * FORMATTER / Option to control whether blank lines are cleared inside comments
 	 *     - option id:         "org.eclipse.jdt.core.formatter.comment.clear_blank_lines"
 	 *     - possible values:   { TRUE, FALSE }
@@ -2002,6 +2023,18 @@
 	public static final String FORMATTER_INSERT_SPACE_AFTER_ELLIPSIS  = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_ellipsis";	//$NON-NLS-1$
 	/**
 	 * <pre>
+	 * FORMATTER / Option to insert a space after the -> in lambda expressions
+	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow"
+	 *     - possible values:   { INSERT, DO_NOT_INSERT }
+	 *     - default:           INSERT
+	 * </pre>
+	 * @see JavaCore#INSERT
+	 * @see JavaCore#DO_NOT_INSERT
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final String FORMATTER_INSERT_SPACE_AFTER_LAMBDA_ARROW  = JavaCore.PLUGIN_ID + ".formatter.insert_space_after_lambda_arrow";	//$NON-NLS-1$
+	/**
+	 * <pre>
 	 * FORMATTER / Option to insert a space after the opening angle bracket in parameterized type reference
 	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference"
 	 *     - possible values:   { INSERT, DO_NOT_INSERT }
@@ -2927,6 +2960,18 @@
 	public static final String FORMATTER_INSERT_SPACE_BEFORE_ELLIPSIS  = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_ellipsis";	//$NON-NLS-1$
 	/**
 	 * <pre>
+	 * FORMATTER / Option to insert a space before lambda ->
+	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow"
+	 *     - possible values:   { INSERT, DO_NOT_INSERT }
+	 *     - default:           INSERT
+	 * </pre>
+	 * @see JavaCore#INSERT
+	 * @see JavaCore#DO_NOT_INSERT
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final String FORMATTER_INSERT_SPACE_BEFORE_LAMBDA_ARROW = JavaCore.PLUGIN_ID + ".formatter.insert_space_before_lambda_arrow";	//$NON-NLS-1$
+	/**
+	 * <pre>
 	 * FORMATTER / Option to insert a space before the opening angle bracket in parameterized type reference
 	 *     - option id:         "org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference"
 	 *     - possible values:   { INSERT, DO_NOT_INSERT }
@@ -3838,6 +3883,7 @@
  	 * @see #FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION
  	 * @see #FORMATTER_BRACE_POSITION_FOR_SWITCH
 	 * @see #FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION
+	 * @see #FORMATTER_BRACE_POSITION_FOR_LAMBDA_BODY
 	 * @since 3.0
 	 */
 	public static final String NEXT_LINE = "next_line"; //$NON-NLS-1$
@@ -3853,6 +3899,7 @@
  	 * @see #FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION
  	 * @see #FORMATTER_BRACE_POSITION_FOR_SWITCH
 	 * @see #FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION
+	 * @see #FORMATTER_BRACE_POSITION_FOR_LAMBDA_BODY
 	 * @since 3.0
 	 */
     public static final String NEXT_LINE_ON_WRAP = "next_line_on_wrap"; //$NON-NLS-1$
@@ -3868,6 +3915,7 @@
  	 * @see #FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION
  	 * @see #FORMATTER_BRACE_POSITION_FOR_SWITCH
 	 * @see #FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION
+	 * @see #FORMATTER_BRACE_POSITION_FOR_LAMBDA_BODY
 	 * @since 3.0
 	 */
 	public static final String NEXT_LINE_SHIFTED = "next_line_shifted";	//$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
index 5388c14..47f03d9 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CodeFormatterVisitor.java
@@ -5,12 +5,21 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Brock Janiczak - Contribution for bug 150741
  *     Nanda Firdausi - Contribution for bug 298844
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Jesper S Moller - Contribution for bug 402173
+ *                       Contribution for bug 402174
+ *                       Contribution for bug 402819
+ *                       Contribution for bug 402892
+ *                       Contribution for bug 403881
  *******************************************************************************/
 package org.eclipse.jdt.internal.formatter;
 
@@ -29,6 +38,7 @@
 import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.AllocationExpression;
+import org.eclipse.jdt.internal.compiler.ast.Annotation;
 import org.eclipse.jdt.internal.compiler.ast.AnnotationMethodDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.Argument;
 import org.eclipse.jdt.internal.compiler.ast.ArrayAllocationExpression;
@@ -69,7 +79,9 @@
 import org.eclipse.jdt.internal.compiler.ast.Initializer;
 import org.eclipse.jdt.internal.compiler.ast.InstanceOfExpression;
 import org.eclipse.jdt.internal.compiler.ast.IntLiteral;
+import org.eclipse.jdt.internal.compiler.ast.IntersectionCastTypeReference;
 import org.eclipse.jdt.internal.compiler.ast.LabeledStatement;
+import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
 import org.eclipse.jdt.internal.compiler.ast.LocalDeclaration;
 import org.eclipse.jdt.internal.compiler.ast.LongLiteral;
 import org.eclipse.jdt.internal.compiler.ast.MarkerAnnotation;
@@ -90,6 +102,7 @@
 import org.eclipse.jdt.internal.compiler.ast.QualifiedSuperReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedThisReference;
 import org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference;
+import org.eclipse.jdt.internal.compiler.ast.Receiver;
 import org.eclipse.jdt.internal.compiler.ast.ReturnStatement;
 import org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation;
 import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
@@ -800,16 +813,7 @@
 
 		this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
 
-		/*
-		 * Check for extra dimensions
-		 */
-		int extraDimensions = getDimensions();
-		if (extraDimensions != 0) {
-			 for (int i = 0; i < extraDimensions; i++) {
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			 }
-		}
+		formatExtraDimensions(fieldDeclaration.type);
 
 		/*
 		 * Field initialization
@@ -852,6 +856,43 @@
 		}
 	}
 
+	private void formatExtraDimensions(TypeReference typeReference) {
+		/*
+		 * Check for extra dimensions
+		 */
+		int extraDimensions = getDimensions();
+		if (extraDimensions != 0) {
+			int anchor = typeReference != null ? (typeReference.dimensions() - extraDimensions) : 0;
+			formatDimensions(typeReference, anchor, extraDimensions, true);
+		}
+	}
+
+	private void formatLeadingDimensions(TypeReference typeReference, boolean spaceBeforeAnnotation) {
+		int leadingDimensions = Math.min(getDimensions(), typeReference != null ? typeReference.dimensions() : 0);
+		if (leadingDimensions != 0) formatDimensions(typeReference, 0, leadingDimensions, spaceBeforeAnnotation);
+	}
+
+	private void formatDimensions(TypeReference typeReference, int anchor, int count, boolean spaceBeforeAnnotation) {
+		if (count != 0) {
+			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
+				this.scribe.space();
+			}
+			Annotation[][] annotationsOnDimensions = typeReference != null ? typeReference.getAnnotationsOnDimensions(true) : null;
+			for (int i = 0; i < count; i++) {
+				int dimensionIndex = anchor + i;
+				if (annotationsOnDimensions != null && annotationsOnDimensions.length > dimensionIndex) {
+					boolean hadAnnotations = formatInlineAnnotations(annotationsOnDimensions[dimensionIndex], spaceBeforeAnnotation && i == 0);
+					if (hadAnnotations && this.preferences.insert_space_before_opening_bracket_in_array_type_reference) this.scribe.space();
+				}
+				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
+				if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
+					this.scribe.space();
+				}
+				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
+			}
+		}
+	}
+
 	private void format(ImportReference importRef, boolean isLast) {
 		this.scribe.printNextToken(TerminalTokens.TokenNameimport);
 		if (!isLast) this.scribe.blank_lines_between_import_groups = this.preferences.blank_lines_between_import_groups;
@@ -938,16 +979,7 @@
 						this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, false);
 					}
 
-					/*
-					 * Check for extra dimensions
-					 */
-					int extraDimensions = getDimensions();
-					if (extraDimensions != 0) {
-						 for (int index = 0; index < extraDimensions; index++) {
-						 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-						 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-						 }
-					}
+					formatExtraDimensions(fieldDeclaration.type);
 
 					/*
 					 * Field initialization
@@ -1899,16 +1931,7 @@
 		 	*/
 			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, false);
 		}
-		/*
-		 * Check for extra dimensions
-		 */
-		int extraDimensions = getDimensions();
-		if (extraDimensions != 0) {
-			 for (int index = 0; index < extraDimensions; index++) {
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			 }
-		}
+		formatExtraDimensions(localDeclaration.type);
 
 		final Expression initialization = localDeclaration.initialization;
 		if (initialization != null) {
@@ -2142,20 +2165,44 @@
 			boolean spaceBeforeComma,
 			boolean spaceAfterComma,
 			int methodDeclarationParametersAlignment) {
+		formatMethodArguments(
+				methodDeclaration.receiver,
+//{ObjectTeams: retrench?
+	/* orig:
+				methodDeclaration.arguments,
+	  :giro */
+				MethodSignatureEnhancer.getSourceArguments(methodDeclaration),
+// SH}
+				methodDeclaration.scope,
+				spaceBeforeOpenParen,
+				spaceBetweenEmptyParameters,
+				spaceBeforeClosingParen,
+				spaceBeforeFirstParameter,
+				spaceBeforeComma,
+				spaceAfterComma,
+				methodDeclarationParametersAlignment);
+	}
+	private void formatMethodArguments(
+			Receiver receiver,
+			final Argument[] arguments,
+			MethodScope scope,
+			boolean spaceBeforeOpenParen,
+			boolean spaceBetweenEmptyParameters,
+			boolean spaceBeforeClosingParen,
+			boolean spaceBeforeFirstParameter,
+			boolean spaceBeforeComma,
+			boolean spaceAfterComma,
+			int methodDeclarationParametersAlignment) {
 
 		this.scribe.printNextToken(TerminalTokens.TokenNameLPAREN, spaceBeforeOpenParen);
 
-//{ObjectTeams: retrench?
-/* orig:
-		final Argument[] arguments = methodDeclaration.arguments;
-  :giro */
-		final Argument[] arguments = MethodSignatureEnhancer.getSourceArguments(methodDeclaration);
-// SH}
-		if (arguments != null) {
+		if (arguments != null || receiver != null) {
 			if (spaceBeforeFirstParameter) {
 				this.scribe.space();
 			}
-			int argumentLength = arguments.length;
+			int receiverCount = receiver != null ? 1 : 0;
+			int realArgumentLength =  arguments != null ? arguments.length : 0;
+			int argumentLength = realArgumentLength + receiverCount;
 			Alignment argumentsAlignment = this.scribe.createAlignment(
 					Alignment.METHOD_ARGUMENTS,
 					methodDeclarationParametersAlignment,
@@ -2190,7 +2237,11 @@
 						} else if (spaceAfterComma) {
 							this.scribe.space();
 						}
-						arguments[i].traverse(this, methodDeclaration.scope);
+						if (i < receiverCount) {
+							receiver.traverse(this, scope);
+						} else {
+							arguments[i - receiverCount].traverse(this, scope);
+						}
 						argumentsAlignment.startingColumn = -1;
 					}
 					ok = true;
@@ -2280,6 +2331,9 @@
 			} else if (DefaultCodeFormatterConstants.NEXT_LINE_SHIFTED.equals(bracePosition)) {
 				this.scribe.printNewLine();
 				this.scribe.indent();
+			} else if (DefaultCodeFormatterConstants.NEXT_LINE_ON_WRAP.equals(bracePosition)
+					&& this.scribe.column >= this.preferences.page_width) {
+				this.scribe.printNewLine();
 			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameLBRACE, insertSpaceBeforeBrace, Scribe.PRESERVE_EMPTY_LINES_IN_FORMAT_OPENING_BRACE);
 			this.scribe.printComment(CodeFormatter.K_UNKNOWN, Scribe.UNMODIFIABLE_TRAILING_COMMENT);
@@ -2580,6 +2634,9 @@
 						dimensions++;
 						balance--;
 						break;
+					case TerminalTokens.TokenNameAT :
+						skipPastTypeAnnotations();
+						break;
 					case TerminalTokens.TokenNameCOMMENT_BLOCK :
 					case TerminalTokens.TokenNameCOMMENT_JAVADOC :
 					case TerminalTokens.TokenNameCOMMENT_LINE :
@@ -2600,6 +2657,40 @@
 		return 0;
 	}
 
+		private void skipPastTypeAnnotations() {  // we get here having seen @
+		int balance = 0;
+		int currentTokenStartPosition = this.localScanner.currentPosition;
+		try {
+			loop: while (true) {
+				currentTokenStartPosition = this.localScanner.currentPosition;
+				int token = this.localScanner.getNextToken();
+				switch(token) {
+					case TerminalTokens.TokenNameEOF:
+						break loop;
+					case TerminalTokens.TokenNameIdentifier :
+					case TerminalTokens.TokenNameDOT :
+					case TerminalTokens.TokenNameCOMMENT_BLOCK :
+					case TerminalTokens.TokenNameCOMMENT_JAVADOC :
+					case TerminalTokens.TokenNameCOMMENT_LINE :
+						break;
+					case TerminalTokens.TokenNameLPAREN:
+						balance++;
+						break;
+					case TerminalTokens.TokenNameRPAREN:
+						--balance; 
+						break;
+					default:
+						if (balance <= 0)
+							break loop;
+				}
+			}
+		} catch(InvalidInputException e) {
+			// ignore
+		} finally {
+			this.localScanner.resetTo(currentTokenStartPosition, this.scribe.scannerEndPosition - 1);
+		}
+	}
+
 	private boolean hasComments() {
 
 		this.localScanner.resetTo(this.scribe.scanner.startPosition, this.scribe.scannerEndPosition - 1);
@@ -2638,6 +2729,17 @@
 		return false;
 	}
 
+	private boolean isNextTokenPunctuation() {
+		this.localScanner.resetTo(this.scribe.scanner.currentPosition, this.scribe.scannerEndPosition - 1);
+		try {
+			int token = this.localScanner.getNextToken();
+			return !(Scanner.isLiteral(token) || Scanner.isKeyword(token) || Scanner.isIdentifier(token));
+		} catch(InvalidInputException e) {
+			// ignore
+		}
+		return false;
+	}
+
 	private boolean isClosingGenericToken() {
 		this.localScanner.resetTo(this.scribe.scanner.currentPosition, this.scribe.scannerEndPosition - 1);
 		try {
@@ -2856,8 +2958,14 @@
 		 */
 		int extraDimensions = annotationTypeMemberDeclaration.extendedDimensions;
 		if (extraDimensions != 0) {
+			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
+				this.scribe.space();
+			}
 			 for (int i = 0; i < extraDimensions; i++) {
 			 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
+			 	if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
+			 		this.scribe.space();
+			 	}
 			 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
 			 }
 		}
@@ -2887,8 +2995,9 @@
 		/*
 		 * Argument type
 		 */
-		if (argument.type != null) {
-			if (argument.type instanceof UnionTypeReference) {
+		TypeReference argumentType = argument.type;
+		if (argumentType != null) {
+			if (argumentType instanceof UnionTypeReference) {
 				formatMultiCatchArguments(
 						argument, 
 						this.preferences.insert_space_before_binary_operator, 
@@ -2896,35 +3005,41 @@
 						this.preferences.alignment_for_union_type_in_multicatch,
 						scope);
 			} else {
-				argument.type.traverse(this, scope);
+				argumentType.traverse(this, scope);
 			}
 		}
 
 		if (argument.isVarArgs()) {
+			Annotation [][] annotationsOnDimensions = argumentType.getAnnotationsOnDimensions(true);
+			if (annotationsOnDimensions != null) {
+				Annotation [] varargAnnotations = annotationsOnDimensions[annotationsOnDimensions.length - 1];
+				if (varargAnnotations != null) {
+					formatInlineAnnotations(varargAnnotations, true);
+				}
+			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameELLIPSIS, this.preferences.insert_space_before_ellipsis);
 			if (this.preferences.insert_space_after_ellipsis) {
 				this.scribe.space();
 			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, false);
 		} else {
-			/*
-			 * Print the argument name
-			 */
-			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
+			if (argument.isReceiver()) {
+				this.scribe.space();
+				NameReference qualifyingName = ((Receiver) argument).qualifyingName;
+				if (qualifyingName != null) {
+					qualifyingName.traverse(this, scope);
+					this.scribe.printNextToken(TerminalTokens.TokenNameDOT, false);
+				}
+				this.scribe.printNextToken(TerminalTokens.TokenNamethis, false);
+			} else {
+				/*
+				 * Print the argument name
+				 */
+				this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, argument.type != null);
+			}
 		}
 
-
-		/*
-		 * Check for extra dimensions
-		 */
-		int extraDimensions = getDimensions();
-		if (extraDimensions != 0) {
-			 for (int i = 0; i < extraDimensions; i++) {
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-			 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			 }
-		}
-
+		formatExtraDimensions(argumentType);
 		return false;
 	}
 
@@ -2946,6 +3061,9 @@
 			final Expression[] dimensions = arrayAllocationExpression.dimensions;
 			int dimensionsLength = dimensions.length;
 			for (int i = 0; i < dimensionsLength; i++) {
+				if (arrayAllocationExpression.annotationsOnDimensions != null) {
+					formatInlineAnnotations(arrayAllocationExpression.annotationsOnDimensions[i], i == 0);
+				}
 				if (this.preferences.insert_space_before_opening_bracket_in_array_allocation_expression) {
 					this.scribe.space();
 				}
@@ -3128,6 +3246,18 @@
 		return false;
 	}
 
+	private void formatArrayQualifiedTypeReference(ArrayQualifiedTypeReference arrayQualifiedTypeReference) {
+		final int numberOfParens = (arrayQualifiedTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+		if (numberOfParens > 0) {
+			manageOpeningParenthesizedExpression(arrayQualifiedTypeReference, numberOfParens);
+		}
+		formatQualifiedTypeReference(arrayQualifiedTypeReference);
+		formatLeadingDimensions(arrayQualifiedTypeReference, true);
+		if (numberOfParens > 0) {
+			manageClosingParenthesizedExpression(arrayQualifiedTypeReference, numberOfParens);
+		}
+	}
+
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
 	 */
@@ -3135,21 +3265,7 @@
 		ArrayQualifiedTypeReference arrayQualifiedTypeReference,
 		BlockScope scope) {
 
-			final int numberOfParens = (arrayQualifiedTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
-			if (numberOfParens > 0) {
-				manageOpeningParenthesizedExpression(arrayQualifiedTypeReference, numberOfParens);
-			}
-			this.scribe.printArrayQualifiedReference(arrayQualifiedTypeReference.tokens.length, arrayQualifiedTypeReference.sourceEnd);
-			int dimensions = getDimensions();
-			if (dimensions != 0) {
-				for (int i = 0; i < dimensions; i++) {
-					this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-					this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-				}
-			}
-			if (numberOfParens > 0) {
-				manageClosingParenthesizedExpression(arrayQualifiedTypeReference, numberOfParens);
-			}
+			formatArrayQualifiedTypeReference(arrayQualifiedTypeReference);
 			return false;
 	}
 
@@ -3160,21 +3276,7 @@
 		ArrayQualifiedTypeReference arrayQualifiedTypeReference,
 		ClassScope scope) {
 
-			final int numberOfParens = (arrayQualifiedTypeReference.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
-			if (numberOfParens > 0) {
-				manageOpeningParenthesizedExpression(arrayQualifiedTypeReference, numberOfParens);
-			}
-			this.scribe.printArrayQualifiedReference(arrayQualifiedTypeReference.tokens.length, arrayQualifiedTypeReference.sourceEnd);
-			int dimensions = getDimensions();
-			if (dimensions != 0) {
-				for (int i = 0; i < dimensions; i++) {
-					this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-					this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-				}
-			}
-			if (numberOfParens > 0) {
-				manageClosingParenthesizedExpression(arrayQualifiedTypeReference, numberOfParens);
-			}
+			formatArrayQualifiedTypeReference(arrayQualifiedTypeReference);
 			return false;
 	}
 
@@ -3213,20 +3315,14 @@
 		if (numberOfParens > 0) {
 			manageOpeningParenthesizedExpression(arrayTypeReference, numberOfParens);
 		}
+		if (arrayTypeReference.annotations != null) {
+			formatInlineAnnotations(arrayTypeReference.annotations[0], false);
+		}
 		this.scribe.printNextToken(SINGLETYPEREFERENCE_EXPECTEDTOKENS);
 
 		int dimensions = getDimensions();
 		if (dimensions != 0) {
-			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
-				this.scribe.space();
-			}
-			for (int i = 0; i < dimensions; i++) {
-				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-				if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
-					this.scribe.space();
-				}
-				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			}
+			formatDimensions(arrayTypeReference, 0, dimensions, true);
 		}
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(arrayTypeReference, numberOfParens);
@@ -3245,19 +3341,13 @@
 		if (numberOfParens > 0) {
 			manageOpeningParenthesizedExpression(arrayTypeReference, numberOfParens);
 		}
+		if (arrayTypeReference.annotations != null) {
+			formatInlineAnnotations(arrayTypeReference.annotations[0], false);
+		}
 		this.scribe.printNextToken(SINGLETYPEREFERENCE_EXPECTEDTOKENS);
 		int dimensions = getDimensions();
 		if (dimensions != 0) {
-			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
-				this.scribe.space();
-			}
-			for (int i = 0; i < dimensions; i++) {
-				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-				if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
-					this.scribe.space();
-				}
-				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			}
+			formatDimensions(arrayTypeReference, 0, dimensions, true);
 		}
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(arrayTypeReference, numberOfParens);
@@ -4423,6 +4513,24 @@
 	}
 
 	/**
+	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.IntersectionCastTypeReference, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
+	 */
+	public boolean visit(IntersectionCastTypeReference intersectionCastTypeReference, BlockScope scope) {
+		int length = intersectionCastTypeReference.typeReferences == null ? 0 : intersectionCastTypeReference.typeReferences.length;
+		for (int i = 0; i < length; i++) {
+			intersectionCastTypeReference.typeReferences[i].traverse(this, scope);
+			if (i != length - 1) {
+				// Borrowing the formatting option from binary operators
+				this.scribe.printNextToken(TerminalTokens.TokenNameAND, this.preferences.insert_space_before_binary_operator);
+				if (this.preferences.insert_space_after_binary_operator) {
+					this.scribe.space();
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
 	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.Initializer, org.eclipse.jdt.internal.compiler.lookup.MethodScope)
 	 */
 	public boolean visit(Initializer initializer, MethodScope scope) {
@@ -4499,6 +4607,47 @@
 	}
 
 	/**
+	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.LambdaExpression, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
+	 */
+	public boolean visit(LambdaExpression lambdaExpression, BlockScope scope) {
+		
+		final int numberOfParens = (lambdaExpression.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
+		if (numberOfParens > 0) {
+			manageOpeningParenthesizedExpression(lambdaExpression, numberOfParens);
+		}
+		if (isNextToken(TerminalTokens.TokenNameLPAREN)) {
+			// Format arguments
+			formatMethodArguments(
+				null,
+				lambdaExpression.arguments,
+				lambdaExpression.getScope(),
+				this.preferences.insert_space_before_opening_paren_in_method_declaration,
+				this.preferences.insert_space_between_empty_parens_in_method_declaration,
+				this.preferences.insert_space_before_closing_paren_in_method_declaration,
+				this.preferences.insert_space_after_opening_paren_in_method_declaration,
+				this.preferences.insert_space_before_comma_in_method_declaration_parameters,
+				this.preferences.insert_space_after_comma_in_method_declaration_parameters,
+				this.preferences.alignment_for_parameters_in_method_declaration);
+		} else {
+			// This MUST be a single, untyped parameter
+			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier);
+		}
+		if (this.preferences.insert_space_before_lambda_arrow) this.scribe.space();
+		this.scribe.printNextToken(TerminalTokens.TokenNameARROW);
+		if (this.preferences.insert_space_after_lambda_arrow) this.scribe.space();
+		if (lambdaExpression.body instanceof Block) {
+			formatBlock((Block) lambdaExpression.body, scope, this.preferences.brace_position_for_lambda_body, this.preferences.insert_space_before_opening_brace_in_block);
+		} else {
+			lambdaExpression.body.traverse(this, scope);
+		}
+
+		if (numberOfParens > 0) {
+			manageClosingParenthesizedExpression(lambdaExpression, numberOfParens);
+		}
+		return false;
+	}
+	
+	/**
 	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.LocalDeclaration, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
 	 */
 	public boolean visit(LocalDeclaration localDeclaration, BlockScope scope) {
@@ -4712,16 +4861,7 @@
 					this.preferences.insert_space_after_comma_in_method_declaration_parameters,
 					this.preferences.alignment_for_parameters_in_method_declaration);
 
-				/*
-				 * Check for extra dimensions
-				 */
-				int extraDimensions = getDimensions();
-				if (extraDimensions != 0) {
-					 for (int i = 0; i < extraDimensions; i++) {
-					 	this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-					 	this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-					 }
-				}
+				formatExtraDimensions(methodDeclaration.returnType);
 
 				// Format throws
 				formatThrowsClause(
@@ -4860,6 +5000,9 @@
 		TypeReference[][] typeArguments = parameterizedQualifiedTypeReference.typeArguments;
 		int length = typeArguments.length;
 		for (int i = 0; i < length; i++) {
+			if (parameterizedQualifiedTypeReference.annotations != null) {
+				formatInlineAnnotations(parameterizedQualifiedTypeReference.annotations[i], false);
+			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier);
 			TypeReference[] typeArgument = typeArguments[i];
 			if (typeArgument != null) {
@@ -4889,19 +5032,7 @@
 				this.scribe.printNextToken(TerminalTokens.TokenNameDOT);
 			}
 		}
-		int dimensions = getDimensions();
-		if (dimensions != 0 && dimensions <= parameterizedQualifiedTypeReference.dimensions()) {
-			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
-				this.scribe.space();
-			}
-			for (int i = 0; i < dimensions; i++) {
-				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-				if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
-					this.scribe.space();
-				}
-				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			}
-		}
+		formatLeadingDimensions(parameterizedQualifiedTypeReference, true);
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(parameterizedQualifiedTypeReference, numberOfParens);
 		}
@@ -4917,6 +5048,9 @@
 		TypeReference[][] typeArguments = parameterizedQualifiedTypeReference.typeArguments;
 		int length = typeArguments.length;
 		for (int i = 0; i < length; i++) {
+			if (parameterizedQualifiedTypeReference.annotations != null) {
+				formatInlineAnnotations(parameterizedQualifiedTypeReference.annotations[i], false);
+			}
 			this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier);
 			TypeReference[] typeArgument = typeArguments[i];
 			if (typeArgument != null) {
@@ -4946,19 +5080,7 @@
 				this.scribe.printNextToken(TerminalTokens.TokenNameDOT);
 			}
 		}
-		int dimensions = getDimensions();
-		if (dimensions != 0 && dimensions <= parameterizedQualifiedTypeReference.dimensions()) {
-			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
-				this.scribe.space();
-			}
-			for (int i = 0; i < dimensions; i++) {
-				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-				if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
-					this.scribe.space();
-				}
-				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			}
-		}
+		formatLeadingDimensions(parameterizedQualifiedTypeReference, true);
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(parameterizedQualifiedTypeReference, numberOfParens);
 		}
@@ -4971,6 +5093,9 @@
 		if (numberOfParens > 0) {
 			manageOpeningParenthesizedExpression(parameterizedSingleTypeReference, numberOfParens);
 		}
+		if (parameterizedSingleTypeReference.annotations != null) {
+			formatInlineAnnotations(parameterizedSingleTypeReference.annotations[0], false);
+		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier);
 
 		TypeReference[] typeArguments = parameterizedSingleTypeReference.typeArguments;
@@ -4995,20 +5120,7 @@
 			this.scribe.printNextToken(TerminalTokens.TokenNameLESS, this.preferences.insert_space_before_opening_angle_bracket_in_parameterized_type_reference);
 			this.scribe.printNextToken(CLOSING_GENERICS_EXPECTEDTOKENS);
 		}
-
-		int dimensions = getDimensions();
-		if (dimensions != 0 && dimensions <= parameterizedSingleTypeReference.dimensions()) {
-			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
-				this.scribe.space();
-			}
-			for (int i = 0; i < dimensions; i++) {
-				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-				if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
-					this.scribe.space();
-				}
-				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			}
-		}
+		formatLeadingDimensions(parameterizedSingleTypeReference, true);
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(parameterizedSingleTypeReference, numberOfParens);
 		}
@@ -5021,6 +5133,9 @@
 		if (numberOfParens > 0) {
 			manageOpeningParenthesizedExpression(parameterizedSingleTypeReference, numberOfParens);
 		}
+		if (parameterizedSingleTypeReference.annotations != null) {
+			formatInlineAnnotations(parameterizedSingleTypeReference.annotations[0], false);
+		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier);
 
 		TypeReference[] typeArguments = parameterizedSingleTypeReference.typeArguments;
@@ -5046,19 +5161,7 @@
 			this.scribe.printNextToken(CLOSING_GENERICS_EXPECTEDTOKENS);
 		}
 
-		int dimensions = getDimensions();
-		if (dimensions != 0 && dimensions <= parameterizedSingleTypeReference.dimensions()) {
-			if (this.preferences.insert_space_before_opening_bracket_in_array_type_reference) {
-				this.scribe.space();
-			}
-			for (int i = 0; i < dimensions; i++) {
-				this.scribe.printNextToken(TerminalTokens.TokenNameLBRACKET);
-				if (this.preferences.insert_space_between_brackets_in_array_type_reference) {
-					this.scribe.space();
-				}
-				this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET);
-			}
-		}
+		formatLeadingDimensions(parameterizedSingleTypeReference, true);
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(parameterizedSingleTypeReference, numberOfParens);
 		}
@@ -5311,14 +5414,25 @@
 		if (numberOfParens > 0) {
 			manageOpeningParenthesizedExpression(qualifiedTypeReference, numberOfParens);
 		}
-		this.scribe.printQualifiedReference(qualifiedTypeReference.sourceEnd, numberOfParens>=0/*expect parenthesis*/);
-
+		formatQualifiedTypeReference(qualifiedTypeReference);
 		if (numberOfParens > 0) {
 			manageClosingParenthesizedExpression(qualifiedTypeReference, numberOfParens);
 		}
 		return false;
 	}
 
+	private void formatQualifiedTypeReference(QualifiedTypeReference qualifiedTypeReference) {
+		for (int i = 0, length = qualifiedTypeReference.tokens.length; i < length; ++i) {
+			if (i != 0) this.scribe.printNextToken(TerminalTokens.TokenNameDOT, false);
+			if (qualifiedTypeReference.annotations != null) {
+				formatInlineAnnotations(qualifiedTypeReference.annotations[i], false);
+				this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, true);
+			} else {
+				this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier, false);
+			}
+		}
+	}
+
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference, org.eclipse.jdt.internal.compiler.lookup.ClassScope)
 	 */
@@ -5330,7 +5444,7 @@
 			if (numberOfParens > 0) {
 				manageOpeningParenthesizedExpression(qualifiedTypeReference, numberOfParens);
 			}
-			this.scribe.printQualifiedReference(qualifiedTypeReference.sourceEnd, numberOfParens>=0/*expect parenthesis*/);
+			formatQualifiedTypeReference(qualifiedTypeReference);
 
 			if (numberOfParens > 0) {
 				manageClosingParenthesizedExpression(qualifiedTypeReference, numberOfParens);
@@ -5339,6 +5453,40 @@
 	}
 
 	/**
+	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.ReferenceExpression, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
+	 */
+	public boolean visit(org.eclipse.jdt.internal.compiler.ast.ReferenceExpression referenceExpression, BlockScope blockScope) {
+		referenceExpression.lhs.traverse(this, blockScope);
+		this.scribe.printNextToken(TerminalTokens.TokenNameCOLON_COLON);
+		
+		TypeReference[] typeArguments = referenceExpression.typeArguments;
+		if (typeArguments != null) {
+				this.scribe.printNextToken(TerminalTokens.TokenNameLESS, this.preferences.insert_space_before_opening_angle_bracket_in_type_arguments);
+				if (this.preferences.insert_space_after_opening_angle_bracket_in_type_arguments) {
+					this.scribe.space();
+				}
+				int length = typeArguments.length;
+				for (int i = 0; i < length - 1; i++) {
+					typeArguments[i].traverse(this, blockScope);
+					this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_type_arguments);
+					if (this.preferences.insert_space_after_comma_in_type_arguments) {
+						this.scribe.space();
+					}
+				}
+				typeArguments[length - 1].traverse(this, blockScope);
+				if (isClosingGenericToken()) {
+					this.scribe.printNextToken(CLOSING_GENERICS_EXPECTEDTOKENS, this.preferences.insert_space_before_closing_angle_bracket_in_type_arguments);
+				}
+				if (this.preferences.insert_space_after_closing_angle_bracket_in_type_arguments) {
+					this.scribe.space();
+				}
+		}
+
+		this.scribe.printNextToken(referenceExpression.isMethodReference() ? TerminalTokens.TokenNameIdentifier : TerminalTokens.TokenNamenew);
+		return false;
+	}
+	
+	/**
 	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.ReturnStatement, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
 	 */
 	public boolean visit(ReturnStatement returnStatement, BlockScope scope) {
@@ -5402,6 +5550,9 @@
 		if (numberOfParens > 0) {
 			manageOpeningParenthesizedExpression(singleTypeReference, numberOfParens);
 		}
+		if (singleTypeReference.annotations != null) {
+			formatInlineAnnotations(singleTypeReference.annotations[0], false);
+		}
 		this.scribe.printNextToken(SINGLETYPEREFERENCE_EXPECTEDTOKENS);
 
 		if (numberOfParens > 0) {
@@ -5410,6 +5561,22 @@
 		return false;
 	}
 
+	private boolean formatInlineAnnotations(final Annotation[] annotations, boolean spaceBefore) {
+		if (annotations != null ) {
+			if (spaceBefore) this.scribe.space();
+			int length = annotations.length;
+			for (int i = 0; i < length; ++i) {
+				if (i != 0) this.scribe.space();
+				annotations[i].traverse(this, (BlockScope)null);
+			}
+			if (length > 0 && !this.isNextTokenPunctuation()) {
+				this.scribe.space();
+			}
+			return true;
+		}
+		return false;
+	}
+
 	/**
 	 * @see org.eclipse.jdt.internal.compiler.ASTVisitor#visit(org.eclipse.jdt.internal.compiler.ast.SingleTypeReference, org.eclipse.jdt.internal.compiler.lookup.ClassScope)
 	 */
@@ -5421,6 +5588,9 @@
 		if (numberOfParens > 0) {
 			manageOpeningParenthesizedExpression(singleTypeReference, numberOfParens);
 		}
+		if (singleTypeReference.annotations != null) {
+			formatInlineAnnotations(singleTypeReference.annotations[0], false);
+		}
 		this.scribe.printNextToken(SINGLETYPEREFERENCE_EXPECTEDTOKENS);
 
 		if (numberOfParens > 0) {
@@ -5878,6 +6048,9 @@
 		return false;
 	}
 	public boolean visit(TypeParameter typeParameter, BlockScope scope) {
+		if (typeParameter.annotations != null) {
+			formatInlineAnnotations(typeParameter.annotations, false);
+		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier);
 		if (typeParameter.type != null) {
 			this.scribe.space();
@@ -5904,6 +6077,9 @@
 		return false;
 	}
 	public boolean visit(TypeParameter typeParameter, ClassScope scope) {
+		if (typeParameter.annotations != null) {
+			formatInlineAnnotations(typeParameter.annotations, false);
+		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameIdentifier);
 		if (typeParameter.type != null) {
 			this.scribe.space();
@@ -6090,6 +6266,9 @@
 		return false;
 	}
 	public boolean visit(Wildcard wildcard, BlockScope scope) {
+		if (wildcard.annotations != null) {
+			if (formatInlineAnnotations(wildcard.annotations[0], false)) this.scribe.space();
+		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameQUESTION, this.preferences.insert_space_before_question_in_wilcard);
 		switch(wildcard.kind) {
 			case Wildcard.SUPER :
@@ -6110,6 +6289,9 @@
 		return false;
 	}
 	public boolean visit(Wildcard wildcard, ClassScope scope) {
+		if (wildcard.annotations != null) {
+			if (formatInlineAnnotations(wildcard.annotations[0], false)) this.scribe.space();
+		}
 		this.scribe.printNextToken(TerminalTokens.TokenNameQUESTION, this.preferences.insert_space_before_question_in_wilcard);
 		switch(wildcard.kind) {
 			case Wildcard.SUPER :
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
index a1f811f..d735737 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
@@ -310,6 +310,7 @@
 			optionsMap.put(CompilerOptions.OPTION_LocalVariableAttribute, CompilerOptions.DO_NOT_GENERATE); 
 			optionsMap.put(CompilerOptions.OPTION_LineNumberAttribute, CompilerOptions.DO_NOT_GENERATE);
 			optionsMap.put(CompilerOptions.OPTION_SourceFileAttribute, CompilerOptions.DO_NOT_GENERATE);
+			optionsMap.put(CompilerOptions.OPTION_MethodParametersAttribute, CompilerOptions.DO_NOT_GENERATE);
 			optionsMap.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
 			optionsMap.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.DISABLED); 
 			optionsMap.put(CompilerOptions.OPTION_ReportMethodWithConstructorName, CompilerOptions.IGNORE); 
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
index b26b14e..8975264 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
@@ -1,17 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * $Id: DefaultCodeFormatterOptions.java 22626 2009-09-30 17:37:31Z stephan $
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Brock Janiczak - Contribution for bug 150741
  *     Ray V. (voidstar@gmail.com) - Contribution for bug 282988
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Jesper S Moller - Contribution for bug 402173
  *******************************************************************************/
 package org.eclipse.jdt.internal.formatter;
 
@@ -92,6 +97,7 @@
 	public String brace_position_for_constructor_declaration;
 	public String brace_position_for_enum_constant;
 	public String brace_position_for_enum_declaration;
+	public String brace_position_for_lambda_body;
 	public String brace_position_for_method_declaration;
 	public String brace_position_for_type_declaration;
 	public String brace_position_for_switch;
@@ -203,6 +209,7 @@
 	public boolean insert_space_after_comma_in_type_arguments;
 	public boolean insert_space_after_comma_in_type_parameters;
 	public boolean insert_space_after_ellipsis;
+	public boolean insert_space_after_lambda_arrow;
 	public boolean insert_space_after_opening_angle_bracket_in_parameterized_type_reference;
 	public boolean insert_space_after_opening_angle_bracket_in_type_arguments;
 	public boolean insert_space_after_opening_angle_bracket_in_type_parameters;
@@ -280,6 +287,7 @@
 	public boolean insert_space_before_comma_in_type_arguments;
 	public boolean insert_space_before_comma_in_type_parameters;
 	public boolean insert_space_before_ellipsis;
+	public boolean insert_space_before_lambda_arrow;
 	public boolean insert_space_before_parenthesized_expression_in_return;
 	public boolean insert_space_before_parenthesized_expression_in_throw;
 	public boolean insert_space_before_question_in_wilcard;
@@ -403,6 +411,7 @@
 		options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_ENUM_DECLARATION, this.brace_position_for_enum_declaration);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION, this.brace_position_for_method_declaration);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_TYPE_DECLARATION, this.brace_position_for_type_declaration);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_LAMBDA_BODY, this.brace_position_for_lambda_body);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_SWITCH, this.brace_position_for_switch);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_BLOCK_COMMENT, this.comment_clear_blank_lines_in_block_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_CLEAR_BLANK_LINES_IN_JAVADOC_COMMENT, this.comment_clear_blank_lines_in_javadoc_comment ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
@@ -502,6 +511,7 @@
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_TYPE_PARAMETERS, this.insert_space_after_comma_in_type_parameters ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_BRACKET_IN_ARRAY_ALLOCATION_EXPRESSION, this.insert_space_after_opening_bracket_in_array_allocation_expression? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_ELLIPSIS, this.insert_space_after_ellipsis ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_LAMBDA_ARROW, this.insert_space_after_lambda_arrow ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE, this.insert_space_after_opening_angle_bracket_in_parameterized_type_reference? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_TYPE_ARGUMENTS, this.insert_space_after_opening_angle_bracket_in_type_arguments? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETERS, this.insert_space_after_opening_angle_bracket_in_type_parameters? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
@@ -578,6 +588,7 @@
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_TYPE_PARAMETERS, this.insert_space_before_comma_in_type_parameters? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_PARAMETERIZED_TYPE_REFERENCE, this.insert_space_before_comma_in_parameterized_type_reference? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_ELLIPSIS, this.insert_space_before_ellipsis ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
+		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_LAMBDA_ARROW, this.insert_space_before_lambda_arrow ? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE, this.insert_space_before_opening_angle_bracket_in_parameterized_type_reference? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_ARGUMENTS, this.insert_space_before_opening_angle_bracket_in_type_arguments? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
 		options.put(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_TYPE_PARAMETERS, this.insert_space_before_opening_angle_bracket_in_type_parameters? JavaCore.INSERT : JavaCore.DO_NOT_INSERT);
@@ -979,6 +990,14 @@
 				this.brace_position_for_enum_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
 			}
 		}
+		final Object bracePositionForLambdaDeclarationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_LAMBDA_BODY);
+		if (bracePositionForLambdaDeclarationOption != null) {
+			try {
+				this.brace_position_for_lambda_body = (String) bracePositionForLambdaDeclarationOption;
+			} catch(ClassCastException e) {
+				this.brace_position_for_lambda_body = DefaultCodeFormatterConstants.END_OF_LINE;
+			}
+		}
 		final Object bracePositionForMethodDeclarationOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_BRACE_POSITION_FOR_METHOD_DECLARATION);
 		if (bracePositionForMethodDeclarationOption != null) {
 			try {
@@ -1456,6 +1475,10 @@
 		if (insertSpaceAfterEllipsisOption != null) {
 			this.insert_space_after_ellipsis = JavaCore.INSERT.equals(insertSpaceAfterEllipsisOption);
 		}
+		final Object insertSpaceAfterLambdaArrowOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_LAMBDA_ARROW);
+		if (insertSpaceAfterLambdaArrowOption != null) {
+			this.insert_space_after_lambda_arrow = JavaCore.INSERT.equals(insertSpaceAfterLambdaArrowOption);
+		}
 		final Object insertSpaceAfterOpeningAngleBracketInParameterizedTypeReferenceOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE);
 		if (insertSpaceAfterOpeningAngleBracketInParameterizedTypeReferenceOption != null) {
 			this.insert_space_after_opening_angle_bracket_in_parameterized_type_reference = JavaCore.INSERT.equals(insertSpaceAfterOpeningAngleBracketInParameterizedTypeReferenceOption);
@@ -1764,6 +1787,10 @@
 		if (insertSpaceBeforeEllipsisOption != null) {
 			this.insert_space_before_ellipsis = JavaCore.INSERT.equals(insertSpaceBeforeEllipsisOption);
 		}
+		final Object insertSpaceBeforeLambdaArrowOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_LAMBDA_ARROW);
+		if (insertSpaceBeforeLambdaArrowOption != null) {
+			this.insert_space_before_lambda_arrow = JavaCore.INSERT.equals(insertSpaceBeforeLambdaArrowOption);
+		}
 		final Object insertSpaceBeforeOpeningAngleBrackerInParameterizedTypeReferenceOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE);
 		if (insertSpaceBeforeOpeningAngleBrackerInParameterizedTypeReferenceOption != null) {
 			this.insert_space_before_opening_angle_bracket_in_parameterized_type_reference = JavaCore.INSERT.equals(insertSpaceBeforeOpeningAngleBrackerInParameterizedTypeReferenceOption);
@@ -2222,6 +2249,7 @@
 		this.brace_position_for_constructor_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_enum_constant = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_enum_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
+		this.brace_position_for_lambda_body = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_method_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_type_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_switch = DefaultCodeFormatterConstants.END_OF_LINE;
@@ -2321,6 +2349,7 @@
 		this.insert_space_after_comma_in_type_arguments = true;
 		this.insert_space_after_comma_in_type_parameters = true;
 		this.insert_space_after_ellipsis = true;
+		this.insert_space_after_lambda_arrow = true;
 		this.insert_space_after_opening_angle_bracket_in_parameterized_type_reference = false;
 		this.insert_space_after_opening_angle_bracket_in_type_arguments = false;
 		this.insert_space_after_opening_angle_bracket_in_type_parameters = false;
@@ -2397,6 +2426,7 @@
 		this.insert_space_before_comma_in_type_arguments = false;
 		this.insert_space_before_comma_in_type_parameters = false;
 		this.insert_space_before_ellipsis = false;
+		this.insert_space_before_lambda_arrow = true;
 		this.insert_space_before_parenthesized_expression_in_return = true;
 		this.insert_space_before_parenthesized_expression_in_throw = true;
 		this.insert_space_before_opening_angle_bracket_in_parameterized_type_reference = false;
@@ -2513,6 +2543,7 @@
 		this.brace_position_for_constructor_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_enum_constant = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_enum_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
+		this.brace_position_for_lambda_body = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_method_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_type_declaration = DefaultCodeFormatterConstants.END_OF_LINE;
 		this.brace_position_for_switch = DefaultCodeFormatterConstants.END_OF_LINE;
@@ -2612,6 +2643,7 @@
 		this.insert_space_after_comma_in_type_arguments = true;
 		this.insert_space_after_comma_in_type_parameters = true;
 		this.insert_space_after_ellipsis = true;
+		this.insert_space_after_lambda_arrow = true;
 		this.insert_space_after_opening_angle_bracket_in_parameterized_type_reference = false;
 		this.insert_space_after_opening_angle_bracket_in_type_arguments = false;
 		this.insert_space_after_opening_angle_bracket_in_type_parameters = false;
@@ -2688,6 +2720,7 @@
 		this.insert_space_before_comma_in_type_arguments = false;
 		this.insert_space_before_comma_in_type_parameters = false;
 		this.insert_space_before_ellipsis = false;
+		this.insert_space_before_lambda_arrow = true;
 		this.insert_space_before_parenthesized_expression_in_return = true;
 		this.insert_space_before_parenthesized_expression_in_throw = true;
 		this.insert_space_before_opening_angle_bracket_in_parameterized_type_reference = false;
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
index 839eee9..29cfc3f 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/Scribe.java
@@ -5,11 +5,17 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Ray V. (voidstar@gmail.com) - Contribution for bug 282988
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *     Jesper S Moller - Contribution for bug 402892
+ *                       Contribution for bug 402818
  *******************************************************************************/
 package org.eclipse.jdt.internal.formatter;
 
@@ -4549,6 +4555,7 @@
 				int tokenStartPosition = this.scanner.getCurrentTokenStartPosition();
 				int tokenEndPosition = this.scanner.getCurrentTokenEndPosition();
 				switch(this.currentToken) {
+					case TerminalTokens.TokenNamedefault :
 					case TerminalTokens.TokenNamepublic :
 					case TerminalTokens.TokenNameprotected :
 					case TerminalTokens.TokenNameprivate :
@@ -4945,53 +4952,6 @@
 		}
 	}
 
-	public void printArrayQualifiedReference(int numberOfTokens, int sourceEnd) {
-		int currentTokenStartPosition = this.scanner.currentPosition;
-		int numberOfIdentifiers = 0;
-		try {
-			do {
-				printComment(CodeFormatter.K_UNKNOWN, NO_TRAILING_COMMENT);
-				switch(this.currentToken = this.scanner.getNextToken()) {
-					case TerminalTokens.TokenNameEOF :
-						return;
-					case TerminalTokens.TokenNameWHITESPACE :
-						addDeleteEdit(this.scanner.getCurrentTokenStartPosition(), this.scanner.getCurrentTokenEndPosition());
-						currentTokenStartPosition = this.scanner.currentPosition;
-						break;
-					case TerminalTokens.TokenNameCOMMENT_BLOCK :
-					case TerminalTokens.TokenNameCOMMENT_JAVADOC :
-						printBlockComment(false);
-						currentTokenStartPosition = this.scanner.currentPosition;
-						break;
-					case TerminalTokens.TokenNameCOMMENT_LINE :
-						printLineComment();
-						currentTokenStartPosition = this.scanner.currentPosition;
-						break;
-					case TerminalTokens.TokenNameIdentifier :
-						print(this.scanner.currentPosition - this.scanner.startPosition, false);
-						currentTokenStartPosition = this.scanner.currentPosition;
-						if (++ numberOfIdentifiers == numberOfTokens) {
-							this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-							return;
-						}
-						break;
-					case TerminalTokens.TokenNameDOT :
-						print(this.scanner.currentPosition - this.scanner.startPosition, false);
-						currentTokenStartPosition = this.scanner.currentPosition;
-						break;
-					case TerminalTokens.TokenNameRPAREN:
-						currentTokenStartPosition = this.scanner.startPosition;
-						// $FALL-THROUGH$ - fall through default case...
-					default:
-						this.scanner.resetTo(currentTokenStartPosition, this.scannerEndPosition - 1);
-						return;
-				}
-			} while (this.scanner.currentPosition <= sourceEnd);
-		} catch(InvalidInputException e) {
-			throw new AbortFormatting(e);
-		}
-	}
-
 	public void printQualifiedReference(int sourceEnd, boolean expectParenthesis) {
 		int currentTokenStartPosition = this.scanner.currentPosition;
 		try {
diff --git a/org.eclipse.jdt.core/grammar/java.g b/org.eclipse.jdt.core/grammar/java.g
index 319cb7f..ab7b021 100644
--- a/org.eclipse.jdt.core/grammar/java.g
+++ b/org.eclipse.jdt.core/grammar/java.g
@@ -53,7 +53,7 @@
 -- {ObjectTeams: keywords
 	as base callin playedBy precedence readonly team tsuper when with within
 
--- The following symbols are recoknized as keywords only in specific contexts:
+-- The following symbols are recognized as keywords only in specific contexts:
 -- After "<-":
 		replace after before 
 -- After "->":
@@ -116,15 +116,27 @@
 	EQUAL
 	AT
 	ELLIPSIS
+	ARROW
+	COLON_COLON
+	BeginLambda
+	BeginIntersectionCast
+	BeginTypeArguments
+	ElidedSemicolonAndRightBrace
+	AT308
+	AT308DOTDOTDOT
+
 -- {ObjectTeams
+	ATOT
 	BINDIN
-	BINDOUT
 	CALLOUT_OVERRIDE
+	SYNTHBINDOUT
 -- Markus Witte}
 --    BodyMarker
 
 $Alias
 
+    '::'   ::= COLON_COLON
+    '->'   ::= ARROW
 	'++'   ::= PLUS_PLUS
 	'--'   ::= MINUS_MINUS
 	'=='   ::= EQUAL_EQUAL
@@ -173,10 +185,12 @@
 	'='    ::= EQUAL
 	'@'	   ::= AT
 	'...'  ::= ELLIPSIS
+	'@308' ::= AT308
+	'@308...' ::= AT308DOTDOTDOT
 	
 -- {ObjectTeams
+	'@OT' ::= ATOT
 	'<-'   ::= BINDIN
-	'->'   ::= BINDOUT
 	'=>'   ::= CALLOUT_OVERRIDE
 -- Markus Witte}
 	
@@ -217,6 +231,12 @@
 Goal ::= '||' MemberValue
 -- syntax diagnosis
 Goal ::= '?' AnnotationTypeMemberDeclaration
+-- JSR 335 Reconnaissance missions.
+Goal ::= '->' ParenthesizedLambdaParameterList
+Goal ::= '(' ParenthesizedCastNameAndBounds
+Goal ::= '<' ReferenceExpressionTypeArgumentsAndTrunk
+-- JSR 308 Reconnaissance mission.
+Goal ::= '@' TypeAnnotations
 --{ObjectTeams new goals:
 Goal ::= ':' CallinParameterMappings
 Goal ::= ';' CalloutParameterMappings
@@ -247,21 +267,16 @@
 Type ::= PrimitiveType
 /.$putCase consumePrimitiveType(); $break ./
 Type -> ReferenceType
--- {ObjectTeams
-Type -> LiftingType
-Type -> ArrayLiftingType
-Type -> InvalidDeclaredArrayLifting
--- Markus Witte}
 /:$readableName Type:/
 
-PrimitiveType -> NumericType
+PrimitiveType -> TypeAnnotationsopt NumericType
 /:$readableName PrimitiveType:/
 NumericType -> IntegralType
 NumericType -> FloatingPointType
 /:$readableName NumericType:/
 
-PrimitiveType -> 'boolean'
-PrimitiveType -> 'void'
+PrimitiveType -> TypeAnnotationsopt 'boolean'
+PrimitiveType -> TypeAnnotationsopt 'void'
 IntegralType -> 'byte'
 IntegralType -> 'short'
 IntegralType -> 'int'
@@ -300,23 +315,20 @@
 /:$compliance 1.7:/
 
 -- {ObjectTeams: "Base as Role" types:
+LiftingTypeopt ::= $empty
 
-LiftingType ::= ClassType 'as' ClassType
+LiftingTypeopt ::= 'as' BeginLiftingType Type
 /.$putCase consumeLiftingType(); $break ./
 /:$readableName LiftingType:/
 
-ArrayLiftingType ::= ArrayType 'as' ArrayType
-/.$putCase consumeLiftingTypeArray(); $break ./
-/:$readableName ArrayLiftingType:/
+BeginLiftingType ::= $empty
+/.$putCase consumeBeginLiftingType(); $break ./
 
--- handle invalid array liftings: "Type as Array" and "Array as Type"
-InvalidDeclaredArrayLifting ::= ClassType 'as' ArrayType
-/.$putCase consumeLiftingTypeArrayInvalid(); $break ./
-/:$readableName InvalidDeclaredArrayLifting:/
+CatchLiftingTypeopt ::= $empty
 
-InvalidDeclaredArrayLifting ::= ArrayType 'as' ClassType
-/.$putCase consumeLiftingTypeArrayInvalid(); $break ./
-/:$readableName InvalidDeclaredArrayLifting:/
+CatchLiftingTypeopt ::= 'as' Type
+/.$putCase consumeLiftingType(); $break ./
+/:$readableName LiftingType:/
 -- SH}
 
 -- {ObjectTeams: "base.R" types:
@@ -365,7 +377,10 @@
 --------------------------------------------------------------
 --------------------------------------------------------------
 
-Name -> SimpleName
+Name ::= SimpleName
+/.$putCase consumeZeroTypeAnnotations(); $break ./
+Name -> TypeAnnotations SimpleName
+/:$compliance 1.8:/
 Name -> QualifiedName
 /:$readableName Name:/
 /:$recovery_template Identifier:/
@@ -373,10 +388,82 @@
 SimpleName -> 'Identifier'
 /:$readableName SimpleName:/
 
+UnannotatableName -> SimpleName
+UnannotatableName ::= UnannotatableName '.' SimpleName
+/.$putCase consumeUnannotatableQualifiedName(); $break ./
+/:$readableName UnannotatableQualifiedName:/
+
 QualifiedName ::= Name '.' SimpleName 
-/.$putCase consumeQualifiedName(); $break ./
+/.$putCase consumeQualifiedName(false); $break ./
+QualifiedName ::= Name '.' TypeAnnotations SimpleName 
+/.$putCase consumeQualifiedName(true); $break ./
+/:$compliance 1.8:/
 /:$readableName QualifiedName:/
 
+TypeAnnotationsopt ::= $empty
+/.$putCase consumeZeroTypeAnnotations(); $break ./
+TypeAnnotationsopt -> TypeAnnotations
+/:$compliance 1.8:/
+/:$readableName TypeAnnotationsopt:/
+
+-- Production name hardcoded in parser. Must be ::= and not -> 
+TypeAnnotations ::= TypeAnnotations0
+/:$readableName TypeAnnotations:/
+
+TypeAnnotations0 -> TypeAnnotation
+/:$compliance 1.8:/
+TypeAnnotations0 ::= TypeAnnotations0 TypeAnnotation
+/. $putCase consumeOneMoreTypeAnnotation(); $break ./
+/:$compliance 1.8:/
+/:$readableName TypeAnnotations:/
+
+TypeAnnotation ::= NormalTypeAnnotation
+/. $putCase consumeTypeAnnotation(); $break ./
+/:$compliance 1.8:/
+TypeAnnotation ::= MarkerTypeAnnotation
+/. $putCase consumeTypeAnnotation(); $break ./
+/:$compliance 1.8:/
+TypeAnnotation ::= SingleMemberTypeAnnotation
+/. $putCase consumeTypeAnnotation(); $break ./
+/:$compliance 1.8:/
+/:$readableName TypeAnnotation:/
+
+TypeAnnotationName ::= @308 UnannotatableName
+/.$putCase consumeAnnotationName() ; $break ./
+/:$readableName AnnotationName:/
+/:$compliance 1.8:/
+/:$recovery_template @ Identifier:/
+NormalTypeAnnotation ::= TypeAnnotationName '(' MemberValuePairsopt ')'
+/.$putCase consumeNormalAnnotation(true) ; $break ./
+/:$readableName NormalAnnotation:/
+/:$compliance 1.8:/
+MarkerTypeAnnotation ::= TypeAnnotationName
+/.$putCase consumeMarkerAnnotation(true) ; $break ./
+/:$readableName MarkerAnnotation:/
+/:$compliance 1.8:/
+SingleMemberTypeAnnotation ::= TypeAnnotationName '(' SingleMemberAnnotationMemberValue ')'
+/.$putCase consumeSingleMemberAnnotation(true) ; $break ./
+/:$readableName SingleMemberAnnotation:/
+/:$compliance 1.8:/
+
+RejectTypeAnnotations ::= $empty
+/.$putCase consumeNonTypeUseName(); $break ./
+/:$readableName RejectTypeAnnotations:/
+
+PushZeroTypeAnnotations ::= $empty
+/.$putCase consumeZeroTypeAnnotations(); $break ./
+/:$readableName ZeroTypeAnnotations:/
+
+VariableDeclaratorIdOrThis ::= 'this'
+/.$putCase consumeExplicitThisParameter(false); $break ./
+/:$compliance 1.8:/
+VariableDeclaratorIdOrThis ::= UnannotatableName '.' 'this'
+/.$putCase consumeExplicitThisParameter(true); $break ./
+/:$compliance 1.8:/
+VariableDeclaratorIdOrThis ::= VariableDeclaratorId
+/.$putCase consumeVariableDeclaratorIdParameter(); $break ./
+/:$readableName VariableDeclaratorId:/
+
 CompilationUnit ::= EnterCompilationUnit InternalCompilationUnit
 /.$putCase consumeCompilationUnit(); $break ./
 /:$readableName CompilationUnit:/
@@ -450,12 +537,12 @@
 /.$putCase consumePackageDeclaration(); $break ./
 /:$readableName PackageDeclaration:/
 
-PackageDeclarationName ::= Modifiers 'package' PushRealModifiers Name
+PackageDeclarationName ::= Modifiers 'package' PushRealModifiers Name RejectTypeAnnotations
 /.$putCase consumePackageDeclarationNameWithModifiers(); $break ./
 /:$readableName PackageDeclarationName:/
 /:$compliance 1.5:/
 
-PackageDeclarationName ::= PackageComment 'package' Name
+PackageDeclarationName ::= PackageComment 'package' Name RejectTypeAnnotations
 /.$putCase consumePackageDeclarationName(); $break ./
 /:$readableName PackageDeclarationName:/
 
@@ -479,14 +566,15 @@
 /.$putCase consumeImportDeclaration(); $break ./
 /:$readableName SingleTypeImportDeclaration:/
 
--- {ObjectTeams: special case: allow 'team' in imported package/type name:			  
--- orig: SingleTypeImportDeclarationName ::= 'import' Name
-SingleTypeImportDeclarationName ::= 'import' ImportName
+-- {ObjectTeams: special case: allow 'team' in imported package/type name:
+-- orig: SingleTypeImportDeclarationName ::= 'import' Name RejectTypeAnnotations
+SingleTypeImportDeclarationName ::= 'import' ImportName RejectTypeAnnotations
 /.$putCase consumeSingleTypeImportDeclarationName(); $break ./
 /:$readableName SingleTypeImportDeclarationName:/
 
 ImportName -> Name
-ImportName ::= Name '.' 'team' '.' Name
+-- FIXME: reject type annotations also for the first name:
+ImportName ::= Name '.' 'team' '.' Name 
 /.$putCase consumeNameContainingTeam(); $break ./
 /:$readableName Name:/
 -- SH}			  
@@ -495,7 +583,7 @@
 /.$putCase consumeImportDeclaration(); $break ./
 /:$readableName TypeImportOnDemandDeclaration:/
 
-TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
+TypeImportOnDemandDeclarationName ::= 'import' Name '.' RejectTypeAnnotations '*'
 /.$putCase consumeTypeImportOnDemandDeclarationName(); $break ./
 /:$readableName TypeImportOnDemandDeclarationName:/
 
@@ -712,6 +800,7 @@
 VariableDeclarators ::= VariableDeclarators ',' VariableDeclarator
 /.$putCase consumeVariableDeclarators(); $break ./
 /:$readableName VariableDeclarators:/
+/:$recovery_template Identifier:/
 
 VariableDeclarator ::= VariableDeclaratorId EnterVariable ExitVariableWithoutInitialization
 VariableDeclarator ::= VariableDeclaratorId EnterVariable '=' ForceNoDiet VariableInitializer RestoreDiet ExitVariableWithInitialization
@@ -761,24 +850,44 @@
 MethodDeclaration -> AbstractMethodDeclaration
 MethodDeclaration ::= MethodHeader MethodBody 
 /.$putCase // set to true to consume a method with a body
- consumeMethodDeclaration(true); $break ./
+ consumeMethodDeclaration(true, false); $break ./
+/:$readableName MethodDeclaration:/
+
+MethodDeclaration ::= DefaultMethodHeader MethodBody 
+/.$putCase // set to true to consume a method with a body
+ consumeMethodDeclaration(true, true); $break ./
 /:$readableName MethodDeclaration:/
 
 AbstractMethodDeclaration ::= MethodHeader ';'
 /.$putCase // set to false to consume a method without body
- consumeMethodDeclaration(false); $break ./
+ consumeMethodDeclaration(false, false); $break ./
 /:$readableName MethodDeclaration:/
 
 MethodHeader ::= MethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims MethodHeaderThrowsClauseopt
 /.$putCase consumeMethodHeader(); $break ./
 /:$readableName MethodDeclaration:/
 
+DefaultMethodHeader ::= DefaultMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims MethodHeaderThrowsClauseopt
+/.$putCase consumeMethodHeader(); $break ./
+/:$readableName MethodDeclaration:/
+
 MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
 /.$putCase consumeMethodHeaderNameWithTypeParameters(false); $break ./
 MethodHeaderName ::= Modifiersopt Type 'Identifier' '('
 /.$putCase consumeMethodHeaderName(false); $break ./
 /:$readableName MethodHeaderName:/
 
+DefaultMethodHeaderName ::= ModifiersWithDefault TypeParameters Type 'Identifier' '('
+/.$putCase consumeMethodHeaderNameWithTypeParameters(false); $break ./
+DefaultMethodHeaderName ::= ModifiersWithDefault Type 'Identifier' '('
+/.$putCase consumeMethodHeaderName(false); $break ./
+/:$readableName MethodHeaderName:/
+
+ModifiersWithDefault ::= Modifiersopt 'default' Modifiersopt
+/.$putCase consumePushCombineModifiers(); $break ./
+/:$readableName Modifiers:/
+/:$compliance 1.8:/
+
 MethodHeaderRightParen ::= ')'
 /.$putCase consumeMethodHeaderRightParen(); $break ./
 /:$readableName ):/
@@ -808,15 +917,19 @@
 /:$readableName FormalParameterList:/
 
 --1.1 feature
-FormalParameter ::= Modifiersopt Type VariableDeclaratorId
+--{ObjectTeams: inserted LiftingTypeopt:
+FormalParameter ::= Modifiersopt Type LiftingTypeopt VariableDeclaratorIdOrThis
 /.$putCase consumeFormalParameter(false); $break ./
-FormalParameter ::= Modifiersopt Type '...' VariableDeclaratorId
+FormalParameter ::= Modifiersopt Type LiftingTypeopt PushZeroTypeAnnotations '...' VariableDeclaratorIdOrThis
+/.$putCase consumeFormalParameter(true); $break ./
+/:$compliance 1.5:/
+FormalParameter ::= Modifiersopt Type LiftingTypeopt @308... TypeAnnotations '...' VariableDeclaratorIdOrThis
 /.$putCase consumeFormalParameter(true); $break ./
 /:$readableName FormalParameter:/
-/:$compliance 1.5:/
+/:$compliance 1.8:/
 /:$recovery_template Identifier Identifier:/
-
-CatchFormalParameter ::= Modifiersopt CatchType VariableDeclaratorId
+-- SH}
+CatchFormalParameter ::= Modifiersopt CatchType CatchLiftingTypeopt VariableDeclaratorId
 /.$putCase consumeCatchFormalParameter(); $break ./
 /:$readableName FormalParameter:/
 /:$recovery_template Identifier Identifier:/
@@ -919,6 +1032,7 @@
 
 
 CalloutParameterMappings ::= 'with' NestedParamMappings '{' CalloutParameterMappingList ,opt '}'
+/.$putCase consumeParameterMappings(); $break ./
 /:$readableName CalloutParameterMappings:/
 
 -- note that this rule is needed for diagnose parsing where bodies of parameter mappings are ignored
@@ -930,7 +1044,8 @@
 /.$putCase consumeParameterMappingList(); $break ./
 /:$readableName CalloutParameterMappingList:/
 
-ParameterMapping ::= Expression '->' 'Identifier'
+
+ParameterMapping ::= Expression SYNTHBINDOUT 'Identifier'
 /.$putCase consumeParameterMappingOut(); $break ./
 
 ParameterMapping ::= 'Identifier' '<-' ForceBaseIsIdentifier Expression RestoreBaseKeyword
@@ -1031,6 +1146,7 @@
 /:$readableName EmptyParameterMappings:/
 
 CallinParameterMappings ::= 'with' NestedParamMappings '{' CallinParameterMappingList ,opt '}'
+/.$putCase consumeParameterMappings(); $break ./
 /:$readableName CallinParameterMappings:/
 
 -- note that this rule is needed for diagnose parsing where bodies of parameter mappings are ignored
@@ -1257,10 +1373,18 @@
 /.$putCase consumeEmptyTypeDeclaration(); $break ./
 /:$readableName InterfaceMemberDeclaration:/
 
+
 InterfaceMemberDeclaration -> ConstantDeclaration
+InterfaceMemberDeclaration ::= DefaultMethodHeader MethodBody
+/:$compliance 1.8:/
+/.$putCase consumeInterfaceMethodDeclaration(false); $break ./
 InterfaceMemberDeclaration ::= MethodHeader MethodBody
-/.$putCase consumeInvalidMethodDeclaration(); $break ./
+/.$putCase consumeInterfaceMethodDeclaration(false); $break ./
 /:$readableName InterfaceMemberDeclaration:/
+-- the next rule is illegal but allows to give a more canonical error message from inside consumeInterfaceMethodDeclaration():
+InterfaceMemberDeclaration ::= DefaultMethodHeader ';'
+/:$compliance 1.8:/
+/.$putCase consumeInterfaceMethodDeclaration(true); $break ./
 
 -- These rules are added to be able to parse constructors inside interface and then report a relevent error message
 InvalidConstructorDeclaration ::= ConstructorHeader MethodBody
@@ -1688,13 +1812,122 @@
 
 --{ObjectTeams: R<@t>.class 
 -- (start with RelationalExpression to make the grammer LL1, further syntax checking in Parser)
-RelationalExpression ::= RelationalExpression '<' TypeAnchor '>' '.' 'class'
+RelationalExpression ::= RelationalExpression '<' AnyTypeAnchor '>' '.' 'class'
 /.$putCase consumeRoleClassLiteral(); $break ./
 -- SH}
 
 PrimaryNoNewArray -> MethodInvocation
 PrimaryNoNewArray -> ArrayAccess
+
+-----------------------------------------------------------------------
+--                   Start of rules for JSR 335
+-----------------------------------------------------------------------
+
+PrimaryNoNewArray -> LambdaExpression
+PrimaryNoNewArray -> ReferenceExpression
 /:$readableName Expression:/
+
+-- Production name hardcoded in parser. Must be ::= and not -> 
+ReferenceExpressionTypeArgumentsAndTrunk ::= ReferenceExpressionTypeArgumentsAndTrunk0
+/:$readableName ReferenceExpressionTypeArgumentsAndTrunk:/
+
+ReferenceExpressionTypeArgumentsAndTrunk0 ::= OnlyTypeArguments Dimsopt 
+/.$putCase consumeReferenceExpressionTypeArgumentsAndTrunk(false); $break ./
+/:$compliance 1.8:/
+ReferenceExpressionTypeArgumentsAndTrunk0 ::= OnlyTypeArguments '.' ClassOrInterfaceType Dimsopt 
+/.$putCase consumeReferenceExpressionTypeArgumentsAndTrunk(true); $break ./
+/:$readableName ReferenceExpressionTypeArgumentsAndTrunk:/
+/:$compliance 1.8:/
+
+ReferenceExpression ::= PrimitiveType Dims '::' NonWildTypeArgumentsopt IdentifierOrNew
+/.$putCase consumeReferenceExpressionTypeForm(true); $break ./
+/:$compliance 1.8:/
+
+ReferenceExpression ::= Name Dimsopt '::' NonWildTypeArgumentsopt IdentifierOrNew
+/.$putCase consumeReferenceExpressionTypeForm(false); $break ./
+/:$compliance 1.8:/
+
+-- BeginTypeArguments is a synthetic token the scanner concocts to help disambiguate
+-- between '<' as an operator and '<' in '<' TypeArguments '>'
+ReferenceExpression ::= Name BeginTypeArguments ReferenceExpressionTypeArgumentsAndTrunk '::' NonWildTypeArgumentsopt IdentifierOrNew
+/.$putCase consumeReferenceExpressionGenericTypeForm(); $break ./
+/:$compliance 1.8:/
+
+ReferenceExpression ::= Primary '::' NonWildTypeArgumentsopt Identifier
+/.$putCase consumeReferenceExpressionPrimaryForm(); $break ./
+/:$compliance 1.8:/
+ReferenceExpression ::= 'super' '::' NonWildTypeArgumentsopt Identifier
+/.$putCase consumeReferenceExpressionSuperForm(); $break ./
+/:$readableName ReferenceExpression:/
+/:$compliance 1.8:/
+
+NonWildTypeArgumentsopt ::= $empty
+/.$putCase consumeEmptyTypeArguments(); $break ./
+NonWildTypeArgumentsopt -> OnlyTypeArguments
+/:$readableName NonWildTypeArgumentsopt:/
+/:$compliance 1.8:/
+
+IdentifierOrNew ::= 'Identifier'
+/.$putCase consumeIdentifierOrNew(false); $break ./
+IdentifierOrNew ::= 'new'
+/.$putCase consumeIdentifierOrNew(true); $break ./
+/:$readableName IdentifierOrNew:/
+/:$compliance 1.8:/
+
+LambdaExpression ::= LambdaParameters '->' LambdaBody
+/.$putCase consumeLambdaExpression(); $break ./
+/:$readableName LambdaExpression:/
+/:$compliance 1.8:/
+
+LambdaParameters ::= Identifier
+/.$putCase consumeTypeElidedLambdaParameter(false); $break ./
+/:$readableName TypeElidedFormalParameter:/
+/:$compliance 1.8:/
+
+-- to make the grammar LALR(1), the scanner transforms the input string to
+-- contain synthetic tokens to signal start of lambda parameter list.
+LambdaParameters -> BeginLambda LambdaParameterList
+/:$readableName LambdaParameters:/
+/:$compliance 1.8:/
+
+-- Production name hardcoded in parser. Must be ::= and not -> 
+ParenthesizedLambdaParameterList ::= LambdaParameterList
+/:$readableName ParenthesizedLambdaParameterList:/
+
+LambdaParameterList -> PushLPAREN FormalParameterListopt PushRPAREN
+LambdaParameterList -> PushLPAREN TypeElidedFormalParameterList PushRPAREN
+/:$readableName LambdaParameterList:/
+/:$compliance 1.8:/
+
+TypeElidedFormalParameterList -> TypeElidedFormalParameter
+TypeElidedFormalParameterList ::= TypeElidedFormalParameterList ',' TypeElidedFormalParameter
+/.$putCase consumeFormalParameterList(); $break ./
+/:$readableName TypeElidedFormalParameterList:/
+/:$compliance 1.8:/
+
+-- to work around a shift reduce conflict, we accept Modifiersopt prefixed
+-- identifier - downstream phases should reject input strings with modifiers.
+TypeElidedFormalParameter ::= Modifiersopt Identifier
+/.$putCase consumeTypeElidedLambdaParameter(true); $break ./
+/:$readableName TypeElidedFormalParameter:/
+/:$compliance 1.8:/
+
+-- A lambda body of the form x is really '{' return x; '}'
+LambdaBody -> ElidedLeftBraceAndReturn Expression ElidedSemicolonAndRightBrace
+LambdaBody ::= NestedType NestedMethod  '{' BlockStatementsopt '}'
+/.$putCase consumeBlock(); $break ./
+/:$readableName LambdaBody:/
+/:$compliance 1.8:/
+
+ElidedLeftBraceAndReturn ::= $empty
+/.$putCase consumeElidedLeftBraceAndReturn(); $break ./
+/:$readableName ElidedLeftBraceAndReturn:/
+/:$compliance 1.8:/
+
+-----------------------------------------------------------------------
+--                   End of rules for JSR 335
+-----------------------------------------------------------------------
+
 --1.1 feature
 --
 -- In Java 1.0 a ClassBody could not appear at all in a
@@ -1786,8 +2019,8 @@
 /.$putCase consumeDimWithOrWithOutExprs(); $break ./
 /:$readableName Dimensions:/
 
-DimWithOrWithOutExpr ::= '[' Expression ']'
-DimWithOrWithOutExpr ::= '[' ']'
+DimWithOrWithOutExpr ::= TypeAnnotationsopt '[' Expression ']'
+DimWithOrWithOutExpr ::= TypeAnnotationsopt '[' ']'
 /. $putCase consumeDimWithOrWithOutExpr(); $break ./
 /:$readableName Dimension:/
 -- -----------------------------------------------
@@ -1799,7 +2032,10 @@
 DimsLoop ::= DimsLoop OneDimLoop
 /:$readableName Dimensions:/
 OneDimLoop ::= '[' ']'
-/. $putCase consumeOneDimLoop(); $break ./
+/. $putCase consumeOneDimLoop(false); $break ./
+OneDimLoop ::= TypeAnnotations '[' ']'
+/:$compliance 1.8:/
+/. $putCase consumeOneDimLoop(true); $break ./
 /:$readableName Dimension:/
 
 FieldAccess ::= Primary '.' 'Identifier'
@@ -1908,18 +2144,35 @@
 UnaryExpressionNotPlusMinus -> CastExpression
 /:$readableName Expression:/
 
-CastExpression ::= PushLPAREN PrimitiveType Dimsopt PushRPAREN InsideCastExpression UnaryExpression
+CastExpression ::= PushLPAREN PrimitiveType Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpression
 /.$putCase consumeCastExpressionWithPrimitiveType(); $break ./
-CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression Dimsopt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
 /.$putCase consumeCastExpressionWithGenericsArray(); $break ./
-CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus
+CastExpression ::= PushLPAREN Name OnlyTypeArgumentsForCastExpression '.' ClassOrInterfaceType Dimsopt AdditionalBoundsListOpt PushRPAREN InsideCastExpressionWithQualifiedGenerics UnaryExpressionNotPlusMinus
 /.$putCase consumeCastExpressionWithQualifiedGenericsArray(); $break ./
 CastExpression ::= PushLPAREN Name PushRPAREN InsideCastExpressionLL1 UnaryExpressionNotPlusMinus
 /.$putCase consumeCastExpressionLL1(); $break ./
-CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
+CastExpression ::=  BeginIntersectionCast PushLPAREN CastNameAndBounds PushRPAREN InsideCastExpressionLL1WithBounds UnaryExpressionNotPlusMinus
+/.$putCase consumeCastExpressionLL1WithBounds(); $break ./
+CastExpression ::= PushLPAREN Name Dims AdditionalBoundsListOpt PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
 /.$putCase consumeCastExpressionWithNameArray(); $break ./
 /:$readableName CastExpression:/
 
+AdditionalBoundsListOpt ::= $empty
+/.$putCase consumeZeroAdditionalBounds(); $break ./
+/:$readableName AdditionalBoundsListOpt:/
+AdditionalBoundsListOpt -> AdditionalBoundList
+/:$compliance 1.8:/
+/:$readableName AdditionalBoundsListOpt:/
+
+-- Production name hardcoded in parser. Must be ::= and not -> 
+ParenthesizedCastNameAndBounds ::= '(' CastNameAndBounds ')'
+/:$readableName ParenthesizedCastNameAndBounds:/
+
+CastNameAndBounds -> Name AdditionalBoundList
+/:$compliance 1.8:/
+/:$readableName CastNameAndBounds:/
+
 OnlyTypeArgumentsForCastExpression ::= OnlyTypeArguments
 /.$putCase consumeOnlyTypeArgumentsForCastExpression(); $break ./
 /:$readableName TypeArguments:/
@@ -1930,6 +2183,9 @@
 InsideCastExpressionLL1 ::= $empty
 /.$putCase consumeInsideCastExpressionLL1(); $break ./
 /:$readableName InsideCastExpression:/
+InsideCastExpressionLL1WithBounds ::= $empty
+/.$putCase consumeInsideCastExpressionLL1WithBounds (); $break ./
+/:$readableName InsideCastExpression:/
 InsideCastExpressionWithQualifiedGenerics ::= $empty
 /.$putCase consumeInsideCastExpressionWithQualifiedGenerics(); $break ./
 /:$readableName InsideCastExpression:/
@@ -2056,7 +2312,10 @@
 /:$readableName AssignmentOperator:/
 /:$recovery_template =:/
 
-Expression -> AssignmentExpression
+-- For handling lambda expressions, we need to know when a full Expression
+-- has been reduced.
+Expression ::= AssignmentExpression
+/.$putCase consumeExpression(); $break ./
 /:$readableName Expression:/
 /:$recovery_template Identifier:/
 
@@ -2265,7 +2524,7 @@
 /.$putCase consumeImportDeclaration(); $break ./
 /:$readableName SingleStaticImportDeclaration:/
 
-SingleStaticImportDeclarationName ::= 'import' 'static' Name
+SingleStaticImportDeclarationName ::= 'import' 'static' Name RejectTypeAnnotations
 /.$putCase consumeSingleStaticImportDeclarationName(); $break ./
 /:$readableName SingleStaticImportDeclarationName:/
 /:$compliance 1.5:/
@@ -2274,7 +2533,7 @@
 /.$putCase consumeImportDeclaration(); $break ./
 /:$readableName StaticImportOnDemandDeclaration:/
 
-StaticImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
+StaticImportOnDemandDeclarationName ::= 'import' 'static' Name '.' RejectTypeAnnotations '*'
 /.$putCase consumeStaticImportOnDemandDeclarationName(); $break ./
 /:$readableName StaticImportOnDemandDeclarationName:/
 /:$compliance 1.5:/
@@ -2313,26 +2572,103 @@
 /:$readableName TypeArgument:/
 /:$compliance 1.5:/
 
---{ObjectTeams: anchored types:
-TypeArgument -> TypeAnchor
-TypeArgument1 -> TypeAnchor '>'
-TypeArgument2 -> TypeAnchor '>>'
+--{ObjectTeams: anchored types: we explicitly don't decide between TypeAnchor and annotated type parameter yet
+TypeArgument -> TypeAnchorOrAnnotatedTypeArgument
+TypeArgument1 -> TypeAnchorOrAnnotatedTypeArgument1
+TypeArgument2 -> TypeAnchorOrAnnotatedTypeArgument2
+TypeArgument3 -> TypeAnchorOrAnnotatedTypeArgument3
 
-TypeAnchor ::= '@' Name
+-- ==== No Nested Generics ====
+-- case 1: it was indeed a type anchor:
+TypeAnchorOrAnnotatedTypeArgument -> AnyTypeAnchor
+-- case 2a: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument -> TentativeTypeAnchor NotAnAnchor ReferenceType
+/.$putCase consumeTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+-- case 2b: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument -> TentativeTypeAnchor NotAnAnchor Wildcard
+/.$putCase consumeAnnotationsOnTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+
+-- ==== One Level Nested Generics ====
+-- case 1: it was indeed a type anchor:
+TypeAnchorOrAnnotatedTypeArgument1 -> AnyTypeAnchor '>'
+-- case 2a: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument1 -> TentativeTypeAnchor NotAnAnchor ReferenceType1
+/.$putCase consumeAnnotationsOnTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+-- case 2b: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument1 -> TentativeTypeAnchor NotAnAnchor Wildcard1
+/.$putCase consumeAnnotationsOnTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+
+-- ==== Two Levels Nested Generics ====
+-- case 1: it was indeed a type anchor:
+TypeAnchorOrAnnotatedTypeArgument2 -> AnyTypeAnchor '>>'
+-- case 2a: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument2 -> TentativeTypeAnchor NotAnAnchor ReferenceType2
+/.$putCase consumeAnnotationsOnTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+-- case 2b: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument2 -> TentativeTypeAnchor NotAnAnchor Wildcard2
+/.$putCase consumeAnnotationsOnTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+
+-- ==== Three Levels Nested Generics ====
+-- case 1: it was indeed a type anchor:
+TypeAnchorOrAnnotatedTypeArgument3 -> AnyTypeAnchor '>>>'
+-- case 2a: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument3 -> TentativeTypeAnchor NotAnAnchor ReferenceType3
+/.$putCase consumeAnnotationsOnTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+-- case 2b: we were wrong in assuming a type anchor, now is the time to convert it into a marker type annotation:
+TypeAnchorOrAnnotatedTypeArgument3 -> TentativeTypeAnchor NotAnAnchor Wildcard3
+/.$putCase consumeAnnotationsOnTypeArgumentFromAnchor(); $break ./
+/:$readableName TypeArgument:/
+/:$compliance 1.5:/
+-- =====================================
+
+-- trigger converting a mistaken type anchor into a type argument
+NotAnAnchor ::= $empty
+/.$putCase convertTypeAnchor(0); $break ./
+/:$readableName annotatedTypeArgument:/
+NotAnAnchor -> '(' SingleMemberAnnotationMemberValue ')'
+/.$putCase convertTypeAnchor(1); $break ./
+/:$readableName annotatedTypeArgument:/
+NotAnAnchor -> '(' MemberValuePairsopt ')'
+/.$putCase convertTypeAnchor(2); $break ./
+/:$readableName annotatedTypeArgument:/
+
+
+AnyTypeAnchor -> TypeAnchor
+/:$readableName typeAnchor:/
+AnyTypeAnchor -> TentativeTypeAnchor
+/:$readableName typeAnchor:/
+
+-- this rule could indicate either a type anchor or a type annotation
+TentativeTypeAnchor ::= '@OT' UnannotatableName
 /.$putCase consumeTypeAnchor(false); $break ./
 /:$readableName typeAnchor:/
 
+-- the following rules indicate definite type anchors:
 -- base is a keyword in this mode, so explicitly expect it:
-TypeAnchor ::= '@' 'base'
+TypeAnchor ::= '@OT' 'base'
 /.$putCase consumeTypeAnchor(true); $break ./
 /:$readableName typeAnchor:/
 
 -- also 'this' requires special treatment (skip because redundant):
-TypeAnchor ::= '@' 'this'
+TypeAnchor ::= '@OT' 'this'
 /.$putCase skipThisAnchor(); $break ./
 /:$readableName typeAnchor:/
 
-TypeAnchor ::= '@' Name '.' 'base'
+TypeAnchor ::= '@OT' UnannotatableName '.' 'base'
 /:$readableName typeAnchor:/
 /.$putCase consumeQualifiedBaseTypeAnchor(); $break ./
 
@@ -2389,10 +2725,10 @@
 /:$readableName ReferenceType3:/
 /:$compliance 1.5:/
 
-Wildcard ::= '?'
+Wildcard ::= TypeAnnotationsopt '?'
 /.$putCase consumeWildcard(); $break ./
 /:$compliance 1.5:/
-Wildcard ::= '?' WildcardBounds
+Wildcard ::= TypeAnnotationsopt '?' WildcardBounds
 /.$putCase consumeWildcardWithBounds(); $break ./
 /:$readableName Wildcard:/
 /:$compliance 1.5:/
@@ -2405,10 +2741,10 @@
 /:$readableName WildcardBounds:/
 /:$compliance 1.5:/
 
-Wildcard1 ::= '?' '>'
+Wildcard1 ::= TypeAnnotationsopt '?' '>'
 /.$putCase consumeWildcard1(); $break ./
 /:$compliance 1.5:/
-Wildcard1 ::= '?' WildcardBounds1
+Wildcard1 ::= TypeAnnotationsopt '?' WildcardBounds1
 /.$putCase consumeWildcard1WithBounds(); $break ./
 /:$readableName Wildcard1:/
 /:$compliance 1.5:/
@@ -2421,10 +2757,10 @@
 /:$readableName WildcardBounds1:/
 /:$compliance 1.5:/
 
-Wildcard2 ::= '?' '>>'
+Wildcard2 ::= TypeAnnotationsopt '?' '>>'
 /.$putCase consumeWildcard2(); $break ./
 /:$compliance 1.5:/
-Wildcard2 ::= '?' WildcardBounds2
+Wildcard2 ::= TypeAnnotationsopt '?' WildcardBounds2
 /.$putCase consumeWildcard2WithBounds(); $break ./
 /:$readableName Wildcard2:/
 /:$compliance 1.5:/
@@ -2437,10 +2773,10 @@
 /:$readableName WildcardBounds2:/
 /:$compliance 1.5:/
 
-Wildcard3 ::= '?' '>>>'
+Wildcard3 ::= TypeAnnotationsopt '?' '>>>'
 /.$putCase consumeWildcard3(); $break ./
 /:$compliance 1.5:/
-Wildcard3 ::= '?' WildcardBounds3
+Wildcard3 ::= TypeAnnotationsopt '?' WildcardBounds3
 /.$putCase consumeWildcard3WithBounds(); $break ./
 /:$readableName Wildcard3:/
 /:$compliance 1.5:/
@@ -2453,7 +2789,7 @@
 /:$readableName WildcardBound3:/
 /:$compliance 1.5:/
 
-TypeParameterHeader ::= Identifier
+TypeParameterHeader ::= TypeAnnotationsopt Identifier
 /.$putCase consumeTypeParameterHeader(); $break ./
 /:$readableName TypeParameter:/
 /:$compliance 1.5:/
@@ -2513,7 +2849,7 @@
 /:$compliance 1.5:/
 /:$readableName TypeParameterBound:/ 
 
-AnchoredTypeParameterHeader0 ::= TypeParameterHeader '<' TypeAnchor
+AnchoredTypeParameterHeader0 ::= TypeParameterHeader '<' AnyTypeAnchor
 /.$putCase consumeAnchoredTypeParameter(); $break ./
 /:$compliance 1.5:/
 /:$readableName AnchoredTypeParameter:/
@@ -2811,13 +3147,14 @@
 /:$readableName Annotation:/
 /:$compliance 1.5:/
 
-AnnotationName ::= '@' Name
+AnnotationName ::= '@' UnannotatableName
 /.$putCase consumeAnnotationName() ; $break ./
 /:$readableName AnnotationName:/
 /:$compliance 1.5:/
+/:$recovery_template @ Identifier:/
 
 NormalAnnotation ::= AnnotationName '(' MemberValuePairsopt ')'
-/.$putCase consumeNormalAnnotation() ; $break ./
+/.$putCase consumeNormalAnnotation(false) ; $break ./
 /:$readableName NormalAnnotation:/
 /:$compliance 1.5:/
 
@@ -2889,7 +3226,7 @@
 /:$compliance 1.5:/
 
 MarkerAnnotation ::= AnnotationName
-/.$putCase consumeMarkerAnnotation() ; $break ./
+/.$putCase consumeMarkerAnnotation(false) ; $break ./
 /:$readableName MarkerAnnotation:/
 /:$compliance 1.5:/
 
@@ -2899,7 +3236,7 @@
 /:$compliance 1.5:/
 
 SingleMemberAnnotation ::= AnnotationName '(' SingleMemberAnnotationMemberValue ')'
-/.$putCase consumeSingleMemberAnnotation() ; $break ./
+/.$putCase consumeSingleMemberAnnotation(false) ; $break ./
 /:$readableName SingleMemberAnnotation:/
 /:$compliance 1.5:/
 --------------------------------------
@@ -2915,6 +3252,12 @@
 RecoveryMethodHeaderName ::= Modifiersopt Type 'Identifier' '('
 /.$putCase consumeRecoveryMethodHeaderName(); $break ./
 /:$readableName MethodHeaderName:/
+RecoveryMethodHeaderName ::= ModifiersWithDefault TypeParameters Type 'Identifier' '('
+/.$putCase consumeRecoveryMethodHeaderNameWithTypeParameters(); $break ./
+/:$compliance 1.5:/
+RecoveryMethodHeaderName ::= ModifiersWithDefault Type 'Identifier' '('
+/.$putCase consumeRecoveryMethodHeaderName(); $break ./
+/:$readableName MethodHeaderName:/
 
 RecoveryMethodHeader ::= RecoveryMethodHeaderName FormalParameterListopt MethodHeaderRightParen MethodHeaderExtendedDims AnnotationMethodHeaderDefaultValueopt
 /.$putCase consumeMethodHeader(); $break ./
@@ -3030,13 +3373,18 @@
 COMMA ::=    ','    
 DOT ::=    '.'    
 EQUAL ::=    '='    
-AT ::=    '@'    
+AT ::=    '@'
+AT308 ::= '@'
+AT308DOTDOTDOT ::= '@'
 ELLIPSIS ::=    '...'    
+ARROW ::= '->'
+COLON_COLON ::= '::'
 
 -- {ObjectTeams
+ATOT ::= '@'
 BINDIN ::= '<-'
-BINDOUT ::= '->'
 CALLOUT_OVERRIDE ::= '=>'
+SYNTHBINDOUT ::= '->'
 -- Markus Witte}
 
 $end
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java
index 4111627..c04334e 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/Flags.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: Flags.java 19912 2009-04-18 23:04:37Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -28,9 +31,13 @@
  * </p>
  * <p>
  * Note that the numeric values of these flags match the ones for class files
- * as described in the Java Virtual Machine Specification. The AST class
- * <code>Modifier</code> provides the same functionality as this class, only in
- * the <code>org.eclipse.jdt.core.dom</code> package.
+ * as described in the Java Virtual Machine Specification (except for
+ * {@link #AccDeprecated}, {@link #AccAnnotationDefault}, and {@link #AccDefaultMethod}).
+ * </p>
+ * <p>
+ * The AST class <code>Modifier</code> provides
+ * similar functionality as this class, only in the
+ * <code>org.eclipse.jdt.core.dom</code> package.
  * </p>
  *
  * @see IMember#getFlags()
@@ -39,7 +46,7 @@
 public final class Flags {
 
 	/**
-	 * Constant representing the absence of any flag
+	 * Constant representing the absence of any flag.
 	 * @since 3.0
 	 */
 	public static final int AccDefault = ClassFileConstants.AccDefault;
@@ -114,7 +121,11 @@
 	 */
 	public static final int AccSynthetic = ClassFileConstants.AccSynthetic;
 	/**
-	 * Deprecated property flag. See The Java Virtual Machine Specification for more details.
+	 * Deprecated property flag.
+	 * <p>
+	 * Note that this flag's value is internal and is not defined in the
+	 * Virtual Machine specification.
+	 * </p>
 	 * @since 2.0
 	 */
 	public static final int AccDeprecated = ClassFileConstants.AccDeprecated;
@@ -149,6 +160,7 @@
 	 */
 	public static final int AccAnnotation = ClassFileConstants.AccAnnotation;
 
+
 //	{ObjectTeams: Team, role, and callin constants added
 	 /**
 	  * Team property flag. See The ObjectTeams Specification for more details.
@@ -164,6 +176,28 @@
 	  */
 	 public static final int AccCallin = ExtraCompilerModifiers.AccCallin;
 //	Markus Witte}
+
+	/**
+	 * Default method property flag.
+	 * <p>
+	 * Note that this flag's value is internal and is not defined in the
+	 * Virtual Machine specification.
+	 * </p>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final int AccDefaultMethod = ExtraCompilerModifiers.AccDefaultMethod;
+
+	/**
+	 * Annotation method default property flag.
+	 * Used to flag annotation type methods that declare a default value.
+	 * <p>
+	 * Note that this flag's value is internal and is not defined in the
+	 * Virtual Machine specification.
+	 * </p>
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static final int AccAnnotationDefault = ClassFileConstants.AccAnnotationDefault;
+	
 	/**
 	 * Not instantiable.
 	 */
@@ -373,6 +407,19 @@
 		return (flags & AccAnnotation) != 0;
 	}
 
+	/**
+	 * Returns whether the given integer has the <code>AccDefaultMethod</code>
+	 * bit set. Note that this flag represents the usage of the 'default' keyword
+	 * on a method and should not be confused with the 'package' access visibility (which used to be called 'default access').
+	 *
+	 * @return <code>true</code> if the <code>AccDefaultMethod</code> flag is included
+	 * @see #AccDefaultMethod
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static boolean isDefaultMethod(int flags) {
+		return (flags & AccDefaultMethod) != 0;
+	}
+
 //{ObjectTeams: more queries for element kinds:
 	/**
 	 * Returns whether the given integer includes the <code>team</code> modifier.
@@ -409,19 +456,27 @@
 //}
 
 	/**
+	 * Returns whether the given integer has the <code>AccAnnnotationDefault</code>
+	 * bit set.
+	 *
+	 * @return <code>true</code> if the <code>AccAnnotationDefault</code> flag is included
+	 * @see #AccAnnotationDefault
+	 * @since 3.9 BETA_JAVA8
+	 */
+	public static boolean isAnnnotationDefault(int flags) {
+		return (flags & AccAnnotationDefault) != 0;
+	}
+	
+	/**
 	 * Returns a standard string describing the given modifier flags.
 	 * Only modifier flags are included in the output; deprecated,
 	 * synthetic, bridge, etc. flags are ignored.
 	 * <p>
 	 * The flags are output in the following order:
-	 * <pre>
-	 *   <code>public</code> <code>protected</code> <code>private</code>
-	 *   <code>static</code>
-	 *   <code>abstract</code> <code>final</code> <code>native</code> <code>synchronized</code> <code>transient</code> <code>volatile</code> <code>strictfp</code>
-	 * </pre>
-	 * This is a compromise between the orders specified in sections 8.1.1,
-	 * 8.3.1, 8.4.3, 8.8.3, 9.1.1, and 9.3 of <em>The Java Language
-	 * Specification, Second Edition</em> (JLS2).
+	 * <pre> public protected private
+	 * abstract default static final synchronized native strictfp transient volatile</pre>
+	 * <p>
+	 * This order is consistent with the recommendations in JLS8 ("*Modifier:" rules in chapters 8 and 9).
 	 * </p>
 	 * <p>
 	 * Note that the flags of a method can include the AccVarargs flag that has no standard description. Since the AccVarargs flag has the same value as
@@ -453,22 +508,24 @@
 			sb.append("protected "); //$NON-NLS-1$
 		if (isPrivate(flags))
 			sb.append("private "); //$NON-NLS-1$
-		if (isStatic(flags))
-			sb.append("static "); //$NON-NLS-1$
 		if (isAbstract(flags))
 			sb.append("abstract "); //$NON-NLS-1$
+		if (isDefaultMethod(flags))
+			sb.append("default "); //$NON-NLS-1$
+		if (isStatic(flags))
+			sb.append("static "); //$NON-NLS-1$
 		if (isFinal(flags))
 			sb.append("final "); //$NON-NLS-1$
-		if (isNative(flags))
-			sb.append("native "); //$NON-NLS-1$
 		if (isSynchronized(flags))
 			sb.append("synchronized "); //$NON-NLS-1$
+		if (isNative(flags))
+			sb.append("native "); //$NON-NLS-1$
+		if (isStrictfp(flags))
+			sb.append("strictfp "); //$NON-NLS-1$
 		if (isTransient(flags))
 			sb.append("transient "); //$NON-NLS-1$
 		if (isVolatile(flags))
 			sb.append("volatile "); //$NON-NLS-1$
-		if (isStrictfp(flags))
-			sb.append("strictfp "); //$NON-NLS-1$
 //{ObjectTeams: OT flags:
 		if (isTeam(flags))
 			sb.append("team "); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java
index 69c943a..072ff6e 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/IMember.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -63,9 +63,14 @@
  * Returns the modifier flags for this member. The flags can be examined using class
  * <code>Flags</code>.
  * <p>
- * Note that only flags as indicated in the source are returned. Thus if an interface
- * defines a method <code>void myMethod();</code> the flags don't include the
- * 'public' flag.
+ * For {@linkplain #isBinary() binary} members, flags from the class file
+ * as well as derived flags {@link Flags#AccAnnotationDefault} and {@link Flags#AccDefaultMethod} are included.
+ * </p>
+ * <p>
+ * For source members, only flags as indicated in the source are returned. Thus if an interface
+ * defines a method <code>void myMethod();</code>, the flags don't include the
+ * 'public' flag. Source flags include {@link Flags#AccAnnotationDefault} as well.
+ * </p>
  *
  * @exception JavaModelException if this element does not exist or if an
  *      exception occurs while accessing its corresponding resource.
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java
index 4575100..10064bb 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaConventions.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -410,7 +410,7 @@
 	 * 
 	 * <p>The source level and compliance level values should be taken from the constant defined inside
 	 * {@link JavaCore} class. The constants are named <code>JavaCore#VERSION_1_x</code>, x being set
-	 * between '1' and '7'.
+	 * between '1' and '8'.
 	 * </p>
 	 *
 	 * @param name the name of a type
@@ -430,6 +430,7 @@
 	 * @see JavaCore#VERSION_1_5
 	 * @see JavaCore#VERSION_1_6
 	 * @see JavaCore#VERSION_1_7
+	 * @see JavaCore#VERSION_1_8
 	 */
 	public static IStatus validateJavaTypeName(String name, String sourceLevel, String complianceLevel) {
 		if (name == null) {
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
index 5c794ea..d37e5a2 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: JavaCore.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -101,7 +104,12 @@
  *									COMPILER_INHERIT_NULL_ANNOTATIONS
  *									COMPILER_PB_NONNULL_PARAMETER_ANNOTATION_DROPPED
  *									COMPILER_PB_SYNTACTIC_NULL_ANALYSIS_FOR_FIELDS
+ *     Jesper S Moller   - Contributions for bug 381345 : [1.8] Take care of the Java 8 major version
+ *                       - added the following constants:
+ *									COMPILER_CODEGEN_METHOD_PARAMETERS_ATTR
+ *     
  *******************************************************************************/
+
 package org.eclipse.jdt.core;
 
 import java.util.ArrayList;
@@ -279,6 +287,19 @@
 	 */
 	public static final String COMPILER_CODEGEN_UNUSED_LOCAL = PLUGIN_ID + ".compiler.codegen.unusedLocal"; //$NON-NLS-1$
 	/**
+	 * Compiler option ID: Generating Method Parameters  Attribute.
+	 * <p>When generated, this attribute will enable parameter names to be accessed from reflection libraries, annotation processing,
+	 * code weaving, and in the debugger, from platform target level 1.8 and later.</p>
+	 * <dl>
+	 * <dt>Option id:</dt><dd><code>"org.eclipse.jdt.core.compiler.codegen.methodParameters"</code></dd>
+	 * <dt>Possible values:</dt><dd><code>{ "generate", "do not generate" }</code></dd>
+	 * <dt>Default:</dt><dd><code>"do not generate"</code></dd>
+	 * </dl>
+	 * @since 3.9 BETA_JAVA8
+	 * @category CompilerOptionID
+	 */
+	public static final String COMPILER_CODEGEN_METHOD_PARAMETERS_ATTR = PLUGIN_ID + ".compiler.codegen.methodParameters"; //$NON-NLS-1$
+	/**
 	 * Compiler option ID: Defining Target Java Platform.
 	 * <p>For binary compatibility reason, .class files can be tagged to with certain VM versions and later.</p>
 	 * <p>Note that <code>"1.4"</code> target requires to toggle compliance mode to <code>"1.4"</code>, <code>"1.5"</code> target requires
@@ -2660,6 +2681,12 @@
 	public static final String VERSION_1_7 = "1.7"; //$NON-NLS-1$
 	/**
 	 * Configurable option value: {@value}.
+	 * @since 3.9 BETA_JAVA8
+	 * @category OptionValue
+	 */
+	public static final String VERSION_1_8 = "1.8"; //$NON-NLS-1$
+	/**
+	 * Configurable option value: {@value}.
 	 * @since 3.4
 	 * @category OptionValue
 	 */
@@ -5591,6 +5618,15 @@
 				options.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR);
 				options.put(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, JavaCore.ERROR);
 				options.put(JavaCore.COMPILER_CODEGEN_INLINE_JSR_BYTECODE, JavaCore.ENABLED);
+				break;
+			case ClassFileConstants.MAJOR_VERSION_1_8:
+				options.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_8);
+				options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_8);
+				options.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_8);
+				options.put(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER, JavaCore.ERROR);
+				options.put(JavaCore.COMPILER_PB_ENUM_IDENTIFIER, JavaCore.ERROR);
+				options.put(JavaCore.COMPILER_CODEGEN_INLINE_JSR_BYTECODE, JavaCore.ENABLED);
+				break;
 		}
 	}
 
@@ -5646,4 +5682,4 @@
 		super.start(context);
 		JavaModelManager.getJavaModelManager().startup();
 	}
-}
\ No newline at end of file
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ITerminalSymbols.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ITerminalSymbols.java
index 10cad2c..df1686f 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ITerminalSymbols.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ITerminalSymbols.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: ITerminalSymbols.java 22626 2009-09-30 17:37:31Z stephan $
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -165,10 +168,20 @@
 	/**
 	 * @since 3.1
 	 */
-	int TokenNamegoto = 404,
+	int TokenNamegoto = 404;  // goto not found in Java ? :)
+
+	/**
+	 * @since 3.9 BETA_JAVA8
+	 */
+	int TokenNameARROW = 405;
+	/**
+	 * @since 3.9 BETA_JAVA8
+	 */
+	int TokenNameCOLON_COLON = 406;
 
 //{ObjectTeams: mirrored from auto-generated TerminalTokens.java. Note: the values here must be constant across Eclipse-versions, so do not simply copy the identifiers!
 	// Take values from 5000 upwards
+    int
     TokenNamebase = 5000,
     TokenNametsuper = 5001,
     TokenNamecallin = 5002,
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java
index 627f95c..34dba48 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2012 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 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
@@ -122,6 +122,8 @@
  * <ul>
  * <li> The working copy does not exist (ELEMENT_DOES_NOT_EXIST)</li>
  * </ul>
+ * @deprecated JLS4 has been deprecated. This method has been replaced by {@link #getAST8()} which returns an AST
+ * with JLS8 level.
  * @since 3.7.1
  */
 public org.eclipse.jdt.core.dom.CompilationUnit getAST4() throws JavaModelException {
@@ -140,6 +142,45 @@
 	return this.operation.makeConsistent(this.workingCopy);
 }
 /**
+ * Returns a resolved AST with {@link AST#JLS8 JLS8} level.
+ * It is created from the current state of the working copy.
+ * Creates one if none exists yet.
+ * Returns <code>null</code> if the current state of the working copy
+ * doesn't allow the AST to be created (e.g. if the working copy's content
+ * cannot be parsed).
+ * <p>
+ * If the AST level requested during reconciling is not {@link AST#JLS8}
+ * or if binding resolutions was not requested, then a different AST is created.
+ * Note that this AST does not become the current AST and it is only valid for
+ * the requestor.
+ * </p>
+ *
+ * @return the AST created from the current state of the working copy,
+ *   or <code>null</code> if none could be created
+ * @exception JavaModelException  if the contents of the working copy
+ *		cannot be accessed. Reasons include:
+ * <ul>
+ * <li> The working copy does not exist (ELEMENT_DOES_NOT_EXIST)</li>
+ * </ul>
+ * @since 3.9 BETA_JAVA8
+ */
+public org.eclipse.jdt.core.dom.CompilationUnit getAST8() throws JavaModelException {
+	if (this.operation.astLevel != AST.JLS8 || !this.operation.resolveBindings) {
+		// create AST (optionally resolving bindings)
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
+		parser.setCompilerOptions(this.workingCopy.getJavaProject().getOptions(true));
+		if (JavaProject.hasJavaNature(this.workingCopy.getJavaProject().getProject()))
+			parser.setResolveBindings(true);
+		parser.setStatementsRecovery((this.operation.reconcileFlags & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0);
+		parser.setBindingsRecovery((this.operation.reconcileFlags & ICompilationUnit.ENABLE_BINDINGS_RECOVERY) != 0);
+		parser.setSource(this.workingCopy);
+		parser.setIgnoreMethodBodies((this.operation.reconcileFlags & ICompilationUnit.IGNORE_METHOD_BODIES) != 0);
+		return (org.eclipse.jdt.core.dom.CompilationUnit) parser.createAST(this.operation.progressMonitor);
+	}
+	return this.operation.makeConsistent(this.workingCopy);
+}
+
+/**
  * Returns the AST level requested by the reconcile operation.
  * It is either {@link ICompilationUnit#NO_AST}, or one of the JLS constants defined on {@link AST}.
  *
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java
index e7fd2eb..ee049b7 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/CompilationUnitSorter.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -50,6 +50,7 @@
         case AST.JLS2 :
         case AST.JLS3 :
         case AST.JLS4 :
+        case AST.JLS8 :
             break;
         default :
             throw new IllegalArgumentException();
@@ -451,7 +452,7 @@
 		if (unit == null || comparator == null) {
 			throw new IllegalArgumentException();
 		}
-		SortElementsOperation operation = new SortElementsOperation(AST.JLS4, new IJavaElement[] { unit.getJavaElement() }, null, comparator);
+		SortElementsOperation operation = new SortElementsOperation(unit.getAST().apiLevel(), new IJavaElement[] { unit.getJavaElement() }, null, comparator);
 		return operation.calculateEdit(unit, group);
 	}
 }
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IAttributeNamesConstants.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IAttributeNamesConstants.java
index da838ec..da7d26b 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IAttributeNamesConstants.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IAttributeNamesConstants.java
@@ -1,12 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *        Jesper Steen Moller - Contributions for
+ *							Bug 406973 - [compiler] Parse MethodParameters attribute
  *******************************************************************************/
 package org.eclipse.jdt.core.util;
 
@@ -141,9 +149,28 @@
 	 */
 	char[] STACK_MAP = "StackMap".toCharArray(); //$NON-NLS-1$
 	
+ 	/**
+	 * "RuntimeVisibleTypeAnnotations" attribute (added in jsr 308).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	char[] RUNTIME_VISIBLE_TYPE_ANNOTATIONS = "RuntimeVisibleTypeAnnotations".toCharArray(); //$NON-NLS-1$
+
+	/**
+	 * "RuntimeInvisibleTypeAnnotations" attribute (added in jsr 308).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	char[] RUNTIME_INVISIBLE_TYPE_ANNOTATIONS = "RuntimeInvisibleTypeAnnotations".toCharArray(); //$NON-NLS-1$
+
+
 	/**
 	 * "BootstrapMethods" attribute (added in cldc1.0).
 	 * @since 3.8
 	 */
 	char[] BOOTSTRAP_METHODS = "BootstrapMethods".toCharArray(); //$NON-NLS-1$
+
+	/**
+	 * "MethodParameters" attribute (added in jep118).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	char[] METHOD_PARAMETERS = "MethodParameters".toCharArray(); //$NON-NLS-1$
 }
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IExtendedAnnotation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IExtendedAnnotation.java
new file mode 100644
index 0000000..2e96e72
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IExtendedAnnotation.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
+ *******************************************************************************/
+package org.eclipse.jdt.core.util;
+
+/**
+ * Description of an extended annotation structure as described in the JVM specifications
+ * (added in JavaSE-1.8).
+ *
+ * This interface may be implemented by clients.
+ *
+ * @since 3.9 BETA_JAVA8
+ */
+public interface IExtendedAnnotation extends IAnnotation {
+	/**
+	 * Answer back the target type as described in the JVM specifications.
+	 *
+	 * @return the target type
+	 */
+	int getTargetType();
+	
+	/**
+	 * Answer back the offset.
+	 * 
+	 * For a target_type value equals to:
+	 * <table border="1">
+	 * <tr>
+	 * <th>target_type</th>
+	 * <th>offset description</th>
+	 * </tr>
+	 * <tr>
+	 * <td>0x43 (INSTANCE_OF), 0x44 (NEW), 0x45 (CONSTRUCTOR_REFERENCE), 0x46 (METHOD_REFERENCE)</td>
+	 * <td>The offset within the bytecodes of the <code>instanceof</code> bytecode for INSTANCE_OF,
+	 * the <code>new</code> bytecode for NEW and the implementing instruction for either a
+	 * CONSTRUCTOR_REFERENCE or METHOD_REFERENCE.</td>
+	 * </tr>
+	 * <tr>
+	 * <td>0x47 (CAST), 0x48 (CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT), 0x49 (METHOD_INVOCATION_TYPE_ARGUMENT),
+	 * 0x4A (CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT), 0x4B (METHOD_REFERENCE_TYPE_ARGUMENT)</td>
+	 * <td>The offset within the bytecodes of the <code>new</code> bytecode for constructor call, or the
+	 * relevant bytecode for method invocation or method reference. For CAST the offset may
+	 * point to the <code>checkcast</code> or another instruction as it is possible the cast
+	 * may have been discarded by the compiler if it were a no-op.</td>
+	 * </tr>
+	 * </table>
+	 * 
+	 * 
+	 * @return the offset
+	 */
+	int getOffset();
+	
+	/**
+	 * Answer back the exception table index when the target_type is EXCEPTION_PARAMETER.
+	 * 
+	 * @return the exception table index
+	 */
+	int getExceptionTableIndex();
+	
+	/**
+	 * Answer back the local variable reference info table length of this entry as specified in
+	 * the JVM specifications.
+	 * 
+	 * <p>This is defined only for annotations related to a local variable.</p>
+	 *
+	 * @return the local variable reference info table length of this entry as specified in
+	 * the JVM specifications
+	 */
+	int getLocalVariableRefenceInfoLength();
+	
+	/**
+	 * Answer back the local variable reference info table of this entry as specified in
+	 * the JVM specifications. Answer an empty array if none.
+	 * 
+	 * <p>This is defined only for annotations related to a local variable.</p>
+	 *
+	 * @return the local variable reference info table of this entry as specified in
+	 * the JVM specifications. Answer an empty array if none
+	 */
+	ILocalVariableReferenceInfo[] getLocalVariableTable();
+	
+	/**
+	 * Answer back the method parameter index.
+	 * 
+	 * <p>The index is 0-based.</p>
+	 * 
+	 * @return the method parameter index
+	 */
+	int getParameterIndex();
+
+	/**
+	 * Answer back the index of the type parameter of the class or method
+	 * 
+	 * <p>The index is 0-based.</p>
+	 * 
+	 * @return the index of the type parameter of the class or method
+	 */
+	int getTypeParameterIndex();
+
+	/**
+	 * Answer back the index of the bound of the type parameter of the method or class
+	 * 
+	 * <p>The index is 0-based.</p>
+	 * 
+	 * @return the index of the bound of the type parameter of the method or class
+	 */
+	int getTypeParameterBoundIndex();
+
+	/**
+	 * Answer back the index in the given different situations.
+	 * 
+	 * <p>The index is 0-based.</p>
+	 * 
+	 * <table border="1">
+	 * <tr>
+	 * <th>target_type</th>
+	 * <th>offset description</th>
+	 * </tr>
+	 * <tr>
+	 * <td>0x10 (CLASS_EXTENDS)</td>
+	 * <td>the index of the type in the clause: <code>-1 (65535)</code> is used if the annotation is on 
+	 * the superclass type, and the value <code>i</code> is used if the annotation is on the <code>i</code>th
+	 * superinterface type (counting from zero).</td>
+	 * </tr>
+	 * <tr>
+	 * <td>0x17 (THROWS)</td>
+	 * <td>the index of the exception type in the clause: the value <code>i</code> denotes an annotation of the 
+	 * <code>i</code>th exception type (counting from zero).</td>
+	 * </tr>
+	 * <tr>
+	 * <td>0x47 (CAST), 0x48 (CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT), 0x49 (METHOD_INVOCATION_TYPE_ARGUMENT),
+	 * 0x4A (CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT), 0x4B (METHOD_REFERENCE_TYPE_ARGUMENT)</td>
+	 * <td>the type argument index in the expression</td>
+	 * </tr>
+	 * </table>
+	 * @return the index in the given different situations
+	 */
+	int getAnnotationTypeIndex();
+	
+	/**
+	 * Answer back the locations of the annotated type as described in the JVM specifications.
+	 * 
+	 * <p>This is used for parameterized and array types.</p>
+	 *
+	 * @return the locations of the annotated type
+	 */
+	int[][] getTypePath();
+	
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IExtendedAnnotationConstants.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IExtendedAnnotationConstants.java
new file mode 100644
index 0000000..c849076
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IExtendedAnnotationConstants.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.core.util;
+
+import org.eclipse.jdt.internal.compiler.codegen.AnnotationTargetTypeConstants;
+
+/**
+ * Description of an extended annotation target types constants as described in the JVM specifications
+ * (added in JavaSE-1.8).
+ *
+ * @since 3.9 BETA_JAVA8
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @noextend This interface is not intended to be extended by clients.
+ */
+public interface IExtendedAnnotationConstants {
+	
+	int CLASS_TYPE_PARAMETER = AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER;
+	int METHOD_TYPE_PARAMETER = AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER;
+
+	int CLASS_EXTENDS = AnnotationTargetTypeConstants.CLASS_EXTENDS;
+	int CLASS_TYPE_PARAMETER_BOUND = AnnotationTargetTypeConstants.CLASS_TYPE_PARAMETER_BOUND;
+	int METHOD_TYPE_PARAMETER_BOUND = AnnotationTargetTypeConstants.METHOD_TYPE_PARAMETER_BOUND;
+	int FIELD = AnnotationTargetTypeConstants.FIELD;
+	int METHOD_RETURN = AnnotationTargetTypeConstants.METHOD_RETURN;
+	int METHOD_RECEIVER = AnnotationTargetTypeConstants.METHOD_RECEIVER;
+	int METHOD_FORMAL_PARAMETER = AnnotationTargetTypeConstants.METHOD_FORMAL_PARAMETER;
+	int THROWS = AnnotationTargetTypeConstants.THROWS;
+
+	int LOCAL_VARIABLE = AnnotationTargetTypeConstants.LOCAL_VARIABLE;
+	int RESOURCE_VARIABLE = AnnotationTargetTypeConstants.RESOURCE_VARIABLE;
+	int EXCEPTION_PARAMETER = AnnotationTargetTypeConstants.EXCEPTION_PARAMETER;
+	int INSTANCEOF = AnnotationTargetTypeConstants.INSTANCEOF;
+	int NEW = AnnotationTargetTypeConstants.NEW;
+	int CONSTRUCTOR_REFERENCE = AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE;
+	int METHOD_REFERENCE = AnnotationTargetTypeConstants.METHOD_REFERENCE;
+	int CAST = AnnotationTargetTypeConstants.CAST;
+	int CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT = AnnotationTargetTypeConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT;
+	int METHOD_INVOCATION_TYPE_ARGUMENT = AnnotationTargetTypeConstants.METHOD_INVOCATION_TYPE_ARGUMENT;
+	int CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT = AnnotationTargetTypeConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT;
+	int METHOD_REFERENCE_TYPE_ARGUMENT = AnnotationTargetTypeConstants.METHOD_REFERENCE_TYPE_ARGUMENT;
+	
+	// Type path entry kinds
+	int TYPE_PATH_DEEPER_IN_ARRAY = 0;
+	int TYPE_PATH_DEEPER_IN_INNER_TYPE = 1;
+	int TYPE_PATH_ANNOTATION_ON_WILDCARD_BOUND = 2;
+	int TYPE_PATH_TYPE_ARGUMENT_INDEX = 3;
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ILocalVariableReferenceInfo.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ILocalVariableReferenceInfo.java
new file mode 100644
index 0000000..f3de2c5
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/ILocalVariableReferenceInfo.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.core.util;
+
+/**
+ * Description of a local variable reference info table entry as specified in the JVM specifications.
+ *
+ * This interface may be implemented by clients.
+ *
+ * @since 3.9 BETA_JAVA8
+ */
+public interface ILocalVariableReferenceInfo {
+
+	/**
+	 * Answer back the start pc of this entry as specified in
+	 * the JVM specifications.
+	 *
+	 * @return the start pc of this entry as specified in
+	 * the JVM specifications
+	 */
+	int getStartPC();
+
+	/**
+	 * Answer back the length of this entry as specified in
+	 * the JVM specifications.
+	 *
+	 * @return the length of this entry as specified in
+	 * the JVM specifications
+	 */
+	int getLength();
+
+	/**
+	 * Answer back the resolved position of the local variable as specified in
+	 * the JVM specifications.
+	 *
+	 * @return the resolved position of the local variable as specified in
+	 * the JVM specifications
+	 */
+	int getIndex();
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IMethodParametersAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IMethodParametersAttribute.java
new file mode 100644
index 0000000..def60c9
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IMethodParametersAttribute.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper Steen Moeller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     Jesper Steen Moeller - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.util;
+
+/**
+ * Description of a method's parameters names as described in the JVM specifications.
+ *
+ * This interface may be implemented by clients.
+ *
+ * @since 3.9 BETA_JAVA8
+ */
+public interface IMethodParametersAttribute extends IClassFileAttribute {
+
+	/**
+	 * Answer back the number of parameters for this method as specified in
+	 * the JVM specifications.
+	 *
+	 * @return the number of parameters for this method as specified in
+	 * the JVM specifications
+	 */
+	int getMethodParameterLength();
+
+	/**
+	 * Answer back the name for the i'th parameter. Answer null if no
+	 * name is available.
+	 *
+	 * @return back the name for the i'th parameter. Returns null if no
+	 * name is available.
+	 */
+	char[] getParameterName(int i);
+
+	/**
+	 * Answer back the access flags for the i'th parameter, a mask of
+	 * <code>ACC_FINAL</code>, <code>ACC_SYNTHETIC</code>, and <code>ACC_MANDATED</code>.
+	 *
+	 * @return the access flags for the i'th parameter.
+	 */
+	short getAccessFlags(int i);
+
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IModifierConstants.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IModifierConstants.java
index dd64c0b..87402aa 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IModifierConstants.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IModifierConstants.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Jesper Steen Moeller - Contribution for bug 406973 - [compiler] Parse MethodParameters attribute
  *******************************************************************************/
 package org.eclipse.jdt.core.util;
 
@@ -44,7 +50,7 @@
 	int ACC_ABSTRACT     = 0x0400;
 	int ACC_STRICT       = 0x0800;
 	/**
-	 * Indicates a synthetic member.
+	 * Indicates a synthetic member or method parameter.
 	 * @since 3.0
 	 */
 	int ACC_SYNTHETIC    = 0x1000;
@@ -60,4 +66,10 @@
 	 * @since 3.0
 	 */
 	int ACC_ENUM         = 0x4000;
+
+	/**
+	 * Indicates a mandated parameter, such as this$1 (added in Java SE 8).
+	 * @since 3.9 BETA_JAVA8
+	 */
+	int ACC_MANDATED     = 0x8000;
 }
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IRuntimeInvisibleTypeAnnotationsAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IRuntimeInvisibleTypeAnnotationsAttribute.java
new file mode 100644
index 0000000..f94d105
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IRuntimeInvisibleTypeAnnotationsAttribute.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.core.util;
+
+/**
+ * Description of a runtime invisible type annotations attribute as described in the JVM specifications
+ * (added in JavaSE-1.8).
+ *
+ * This interface may be implemented by clients.
+ *
+ * @since 3.9 BETA_JAVA8
+ */
+public interface IRuntimeInvisibleTypeAnnotationsAttribute extends IClassFileAttribute {
+
+	/**
+	 * Answer back the number of extended annotations as described in the JVM specifications.
+	 *
+	 * @return the number of extended annotations
+	 */
+	int getExtendedAnnotationsNumber();
+
+	/**
+	 * Answer back the extended annotations. Answers an empty collection if none.
+	 *
+	 * @return the extended annotations
+	 */
+	IExtendedAnnotation[] getExtendedAnnotations();
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IRuntimeVisibleTypeAnnotationsAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IRuntimeVisibleTypeAnnotationsAttribute.java
new file mode 100644
index 0000000..3564599
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/core/util/IRuntimeVisibleTypeAnnotationsAttribute.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.core.util;
+
+/**
+ * Description of a runtime visible type annotations attribute as described in the JVM specifications
+ * (added in JavaSE-1.8).
+ *
+ * This interface may be implemented by clients.
+ *
+ * @since 3.9 BETA_JAVA8
+ */
+public interface IRuntimeVisibleTypeAnnotationsAttribute extends IClassFileAttribute {
+
+	/**
+	 * Answer back the number of annotations as described in the JVM specifications.
+	 *
+	 * @return the number of annotations
+	 */
+	int getExtendedAnnotationsNumber();
+
+	/**
+	 * Answer back the extended annotations. Answers an empty collection if none.
+	 *
+	 * @return the extended annotations. Answers an empty collection if none.
+	 */
+	IExtendedAnnotation[] getExtendedAnnotations();
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java
index 3c2dad9..d1cc38f 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/DocumentElementParser.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -18,10 +22,10 @@
 import org.eclipse.jdt.internal.compiler.ast.*;
 import org.eclipse.jdt.internal.compiler.parser.*;
 import org.eclipse.jdt.internal.compiler.problem.*;
+import org.eclipse.jdt.internal.compiler.util.Util;
 
 public class DocumentElementParser extends Parser {
 	IDocumentElementRequestor requestor;
-	private int localIntPtr;
 	private int lastFieldEndPosition;
 	private int lastFieldBodyEndPosition;
 	private int typeStartPosition;
@@ -450,6 +454,9 @@
 	char[] varName = this.identifierStack[this.identifierPtr];
 	long namePosition = this.identifierPositionStack[this.identifierPtr--];
 	int extendedTypeDimension = this.intStack[this.intPtr--];
+	// pop any annotations on extended dimensions now, so they don't pollute the base dimensions.
+	Annotation [][] annotationsOnExtendedDimensions = extendedTypeDimension == 0 ? null : getAnnotationsOnDimensions(extendedTypeDimension);
+
 
 	AbstractVariableDeclaration declaration;
 	if (this.nestedMethod[this.nestedType] != 0) {
@@ -464,7 +471,6 @@
 	this.identifierLengthPtr--;
 	TypeReference type;
 	int variableIndex = this.variablesCounter[this.nestedType];
-	int typeDim = 0;
 	if (variableIndex == 0) {
 		// first variable of the declaration (FieldDeclaration or LocalDeclaration)
 		if (this.nestedMethod[this.nestedType] != 0) {
@@ -472,11 +478,11 @@
 			declaration.declarationSourceStart = this.intStack[this.intPtr--];
 			declaration.modifiersSourceStart = this.intStack[this.intPtr--];
 			declaration.modifiers = this.intStack[this.intPtr--];
-			type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
+			type = getTypeReference(this.intStack[this.intPtr--]); // type dimension
 			pushOnAstStack(type);
 		} else {
 			// field declaration
-			type = getTypeReference(typeDim = this.intStack[this.intPtr--]); // type dimension
+			type = getTypeReference(this.intStack[this.intPtr--]); // type dimension
 			pushOnAstStack(type);
 			declaration.declarationSourceStart = this.intStack[this.intPtr--];
 			declaration.modifiersSourceStart = this.intStack[this.intPtr--];
@@ -494,7 +500,6 @@
 		}
 	} else {
 		type = (TypeReference) this.astStack[this.astPtr - variableIndex];
-		typeDim = type.dimensions();
 		AbstractVariableDeclaration previousVariable =
 			(AbstractVariableDeclaration) this.astStack[this.astPtr];
 		declaration.declarationSourceStart = previousVariable.declarationSourceStart;
@@ -507,14 +512,9 @@
 		}
 	}
 
-	this.localIntPtr = this.intPtr;
-
-	if (extendedTypeDimension == 0) {
-		declaration.type = type;
-	} else {
-		int dimension = typeDim + extendedTypeDimension;
-		declaration.type = copyDims(type, dimension);
-	}
+	declaration.type = extendedTypeDimension != 0 ? augmentTypeWithAdditionalDimensions(type, extendedTypeDimension, annotationsOnExtendedDimensions, false) : type;
+	declaration.bits |= (type.bits & ASTNode.HasTypeAnnotations);
+	
 	this.variablesCounter[this.nestedType]++;
 	this.nestedMethod[this.nestedType]++;
 	pushOnAstStack(declaration);
@@ -538,6 +538,129 @@
 				extendedTypeDimension == 0 ? -1 : this.endPosition);
 	}
 }
+protected void consumeEnhancedForStatementHeaderInit(boolean hasModifiers) {
+	TypeReference type;
+
+	char[] identifierName = this.identifierStack[this.identifierPtr];
+	long namePosition = this.identifierPositionStack[this.identifierPtr];
+
+	LocalDeclaration localDeclaration = createLocalDeclaration(identifierName, (int) (namePosition >>> 32), (int) namePosition);
+	localDeclaration.declarationSourceEnd = localDeclaration.declarationEnd;
+
+	int extraDims = this.intStack[this.intPtr--];
+	this.identifierPtr--;
+	this.identifierLengthPtr--;
+	// remove fake modifiers/modifiers start
+	int declarationSourceStart1 = 0;
+	int modifiersSourceStart1 = 0;
+	int modifiersValue  = 0;
+	if (hasModifiers) {
+		declarationSourceStart1 = this.intStack[this.intPtr--];
+		modifiersSourceStart1 = this.intStack[this.intPtr--];
+		modifiersValue = this.intStack[this.intPtr--];
+	} else {
+		this.intPtr-=3;
+	}
+
+	type = getTypeReference(this.intStack[this.intPtr--] + extraDims); // type dimension
+
+	// consume annotations
+	int length;
+	if ((length = this.expressionLengthStack[this.expressionLengthPtr--])!= 0) {
+		System.arraycopy(
+			this.expressionStack,
+			(this.expressionPtr -= length) + 1,
+			localDeclaration.annotations = new Annotation[length],
+			0,
+			length);
+		localDeclaration.bits |= ASTNode.HasTypeAnnotations;
+	}
+	if (hasModifiers) {
+		localDeclaration.declarationSourceStart = declarationSourceStart1;
+		localDeclaration.modifiersSourceStart = modifiersSourceStart1;
+		localDeclaration.modifiers = modifiersValue;
+	} else {
+		localDeclaration.declarationSourceStart = type.sourceStart;
+	}
+	localDeclaration.type = type;
+	localDeclaration.bits |= (type.bits & ASTNode.HasTypeAnnotations);
+	ForeachStatement iteratorForStatement =
+		new ForeachStatement(
+			localDeclaration,
+			this.intStack[this.intPtr--]);
+	pushOnAstStack(iteratorForStatement);
+
+	iteratorForStatement.sourceEnd = localDeclaration.declarationSourceEnd;
+}
+protected void consumeMethodHeaderNameWithTypeParameters(boolean isAnnotationMethod) {
+	// MethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
+	// AnnotationMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
+	// RecoveryMethodHeaderName ::= Modifiersopt TypeParameters Type 'Identifier' '('
+	MethodDeclaration md = null;
+	if(isAnnotationMethod) {
+		md = new AnnotationMethodDeclaration(this.compilationUnit.compilationResult);
+		this.recordStringLiterals = false;
+	} else {
+		md = new MethodDeclaration(this.compilationUnit.compilationResult);
+	}
+
+	//name
+	md.selector = this.identifierStack[this.identifierPtr];
+	long selectorSource = this.identifierPositionStack[this.identifierPtr--];
+	this.identifierLengthPtr--;
+	//type
+	md.returnType = getTypeReference(this.intStack[this.intPtr--]);
+	if (isAnnotationMethod)
+		rejectIllegalLeadingTypeAnnotations(md.returnType);
+	md.bits |= (md.returnType.bits & ASTNode.HasTypeAnnotations);
+	// consume type parameters
+	int length = this.genericsLengthStack[this.genericsLengthPtr--];
+	this.genericsPtr -= length;
+	System.arraycopy(this.genericsStack, this.genericsPtr + 1, md.typeParameters = new TypeParameter[length], 0, length);
+
+	//modifiers
+	md.declarationSourceStart = this.intStack[this.intPtr--];
+	md.modifiersSourceStart = this.intStack[this.intPtr--];
+	md.modifiers = this.intStack[this.intPtr--];
+	// consume annotations
+	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
+		System.arraycopy(
+			this.expressionStack,
+			(this.expressionPtr -= length) + 1,
+			md.annotations = new Annotation[length],
+			0,
+			length);
+	}
+	// javadoc
+	md.javadoc = this.javadoc;
+	this.javadoc = null;
+
+	//highlight starts at selector start
+	md.sourceStart = (int) (selectorSource >>> 32);
+	pushOnAstStack(md);
+	md.sourceEnd = this.lParenPos;
+	md.bodyStart = this.lParenPos+1;
+	this.listLength = 0; // initialize this.listLength before reading parameters/throws
+
+	// recovery
+	if (this.currentElement != null){
+		boolean isType;
+		if ((isType = this.currentElement instanceof RecoveredType)
+			//|| md.modifiers != 0
+			|| (Util.getLineNumber(md.returnType.sourceStart, this.scanner.lineEnds, 0, this.scanner.linePtr)
+					== Util.getLineNumber(md.sourceStart, this.scanner.lineEnds, 0, this.scanner.linePtr))){
+			if(isType) {
+				((RecoveredType) this.currentElement).pendingTypeParameters = null;
+			}
+			this.lastCheckPoint = md.bodyStart;
+			this.currentElement = this.currentElement.add(md, 0);
+			this.lastIgnoredToken = -1;
+		} else {
+			this.lastCheckPoint = md.sourceStart;
+			this.restartRecovery = true;
+		}
+	}
+}
 /*
  *
  * INTERNAL USE-ONLY
@@ -582,40 +705,72 @@
 	/*
 	astStack :
 	identifierStack : type identifier
-	intStack : dim dim
+	intStack : dim dim 1||0  // 1 => normal parameter, 0 => this parameter
 	 ==>
 	astStack : Argument
 	identifierStack :
 	intStack :
 	*/
-
+	NameReference qualifyingNameReference = null;
+    boolean isReceiver = this.intStack[this.intPtr--] == 0;
+    if (isReceiver) {
+    	qualifyingNameReference = (NameReference) this.expressionStack[this.expressionPtr--];
+    	this.expressionLengthPtr --;
+    }
 	this.identifierLengthPtr--;
 	char[] parameterName = this.identifierStack[this.identifierPtr];
 	long namePositions = this.identifierPositionStack[this.identifierPtr--];
 	int extendedDimensions = this.intStack[this.intPtr--];
+	Annotation [][] annotationsOnExtendedDimensions = extendedDimensions == 0 ? null : getAnnotationsOnDimensions(extendedDimensions);
 	int endOfEllipsis = 0;
+	int length;
+	Annotation [] varArgsAnnotations = null;
 	if (isVarArgs) {
 		endOfEllipsis = this.intStack[this.intPtr--];
+		if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+			System.arraycopy(
+				this.typeAnnotationStack,
+				(this.typeAnnotationPtr -= length) + 1,
+				varArgsAnnotations = new Annotation[length],
+				0,
+				length);
+		} 
 	}
 	int firstDimensions = this.intStack[this.intPtr--];
-	final int typeDimensions = firstDimensions + extendedDimensions;
-	TypeReference type = getTypeReference(typeDimensions);
+	TypeReference type = getTypeReference(firstDimensions);
+
+	if (isVarArgs || extendedDimensions != 0) {
+		if (isVarArgs) {
+			type = augmentTypeWithAdditionalDimensions(type, 1, varArgsAnnotations != null ? new Annotation[][] { varArgsAnnotations } : null, true);	
+		} 
+		if (extendedDimensions != 0) { // combination illegal.
+			type = augmentTypeWithAdditionalDimensions(type, extendedDimensions, annotationsOnExtendedDimensions, false);
+		}
+		type.sourceEnd = type.isParameterizedTypeReference() ? this.endStatementPosition : this.endPosition;
+	}
 	if (isVarArgs) {
-		type = copyDims(type, typeDimensions + 1);
 		if (extendedDimensions == 0) {
 			type.sourceEnd = endOfEllipsis;
 		}
 		type.bits |= ASTNode.IsVarArgs; // set isVarArgs
 	}
 	this.intPtr -= 3;
-	Argument arg =
-		new Argument(
+	Argument arg;
+	if (isReceiver) {
+		arg = new Receiver(
+				parameterName, 
+				namePositions, 
+				type,
+				qualifyingNameReference,
+				this.intStack[this.intPtr + 1] & ~ClassFileConstants.AccDeprecated);
+	} else {
+		arg = new Argument(
 			parameterName,
 			namePositions,
 			type,
 			this.intStack[this.intPtr + 1]);// modifiers
+	}
 	// consume annotations
-	int length;
 	if ((length = this.expressionLengthStack[this.expressionLengthPtr--]) != 0) {
 		System.arraycopy(
 			this.expressionStack,
@@ -772,10 +927,10 @@
  *
  * INTERNAL USE-ONLY
  */
-protected void consumeMethodDeclaration(boolean isNotAbstract) {
+protected void consumeMethodDeclaration(boolean isNotAbstract, boolean isDefaultMethod) {
 	// MethodDeclaration ::= MethodHeader MethodBody
 	// AbstractMethodDeclaration ::= MethodHeader ';'
-	super.consumeMethodDeclaration(isNotAbstract);
+	super.consumeMethodDeclaration(isNotAbstract, isDefaultMethod);
 	if (isLocalDeclaration()) {
 		// we ignore the local variable declarations
 		return;
@@ -875,10 +1030,8 @@
 	int extendedDims = this.intStack[this.intPtr--];
 	this.extendsDim = extendedDims;
 	if (extendedDims != 0) {
-		TypeReference returnType = md.returnType;
 		md.sourceEnd = this.endPosition;
-		int dims = returnType.dimensions() + extendedDims;
-		md.returnType = copyDims(returnType, dims);
+		md.returnType = augmentTypeWithAdditionalDimensions(md.returnType, extendedDims, getAnnotationsOnDimensions(extendedDims), false);
 		if (this.currentToken == TokenNameLBRACE) {
 			md.bodyStart = this.endPosition + 1;
 		}
@@ -1407,62 +1560,4 @@
 	buffer.append(super.toString());
 	return buffer.toString();
 }
-/**
- * INTERNAL USE ONLY
- */
-protected TypeReference typeReference(
-	int dim,
-	int localIdentifierPtr,
-	int localIdentifierLengthPtr) {
-	/* build a Reference on a variable that may be qualified or not
-	 * This variable is a type reference and dim will be its dimensions.
-	 * We don't have any side effect on the stacks' pointers.
-	 */
-
-	int length;
-	TypeReference ref;
-	if ((length = this.identifierLengthStack[localIdentifierLengthPtr]) == 1) {
-		// single variable reference
-		if (dim == 0) {
-			ref =
-				new SingleTypeReference(
-					this.identifierStack[localIdentifierPtr],
-					this.identifierPositionStack[localIdentifierPtr--]);
-		} else {
-			ref =
-				new ArrayTypeReference(
-					this.identifierStack[localIdentifierPtr],
-					dim,
-					this.identifierPositionStack[localIdentifierPtr--]);
-			ref.sourceEnd = this.endPosition;
-		}
-	} else {
-		if (length < 0) { //flag for precompiled type reference on base types
-			ref = TypeReference.baseTypeReference(-length, dim);
-			ref.sourceStart = this.intStack[this.localIntPtr--];
-			if (dim == 0) {
-				ref.sourceEnd = this.intStack[this.localIntPtr--];
-			} else {
-				this.localIntPtr--;
-				ref.sourceEnd = this.endPosition;
-			}
-		} else { //Qualified variable reference
-			char[][] tokens = new char[length][];
-			localIdentifierPtr -= length;
-			long[] positions = new long[length];
-			System.arraycopy(this.identifierStack, localIdentifierPtr + 1, tokens, 0, length);
-			System.arraycopy(
-				this.identifierPositionStack,
-				localIdentifierPtr + 1,
-				positions,
-				0,
-				length);
-			if (dim == 0)
-				ref = new QualifiedTypeReference(tokens, positions);
-			else
-				ref = new ArrayQualifiedTypeReference(tokens, dim, positions);
-		}
-	}
-	return ref;
-}
 }
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementNotifier.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementNotifier.java
index 7fdbd4b..89ae1d2 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementNotifier.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementNotifier.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2011 IBM Corporation and others.
+ * Copyright (c) 2008, 2013 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
- * $Id: SourceElementNotifier.java 23404 2010-02-03 14:10:22Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -318,17 +321,17 @@
 		selectorSourceEnd = this.sourceEnds.get(methodDeclaration);
 		if (isInRange){
 			int currentModifiers = methodDeclaration.modifiers;
+			currentModifiers &= ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccDeprecated;
 			if (isVarArgs)
 				currentModifiers |= ClassFileConstants.AccVarargs;
-
-			// remember deprecation so as to not lose it below
-			boolean deprecated = (currentModifiers & ClassFileConstants.AccDeprecated) != 0 || hasDeprecatedAnnotation(methodDeclaration.annotations);
+			if (hasDeprecatedAnnotation(methodDeclaration.annotations))
+				currentModifiers |= ClassFileConstants.AccDeprecated;
 
 			ISourceElementRequestor.MethodInfo methodInfo = new ISourceElementRequestor.MethodInfo();
 			methodInfo.isConstructor = true;
 			methodInfo.declarationStart = methodDeclaration.declarationSourceStart;
+			methodInfo.modifiers = currentModifiers;
 // Note(SH): OT: no callin flag in constructor ;-)
-			methodInfo.modifiers = deprecated ? (currentModifiers & ExtraCompilerModifiers.AccJustFlag) | ClassFileConstants.AccDeprecated : currentModifiers & ExtraCompilerModifiers.AccJustFlag;
 			methodInfo.name = methodDeclaration.selector;
 			methodInfo.nameSourceStart = methodDeclaration.sourceStart;
 			methodInfo.nameSourceEnd = selectorSourceEnd;
@@ -378,11 +381,16 @@
 	selectorSourceEnd = this.sourceEnds.get(methodDeclaration);
 	if (isInRange) {
 		int currentModifiers = methodDeclaration.modifiers;
+//{ObjectTeams: additionally pass AccCallin:
+	/* orig:
+		currentModifiers &= ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccDeprecated | ClassFileConstants.AccAnnotationDefault | ExtraCompilerModifiers.AccDefaultMethod;
+    :giro */
+		currentModifiers &= ExtraCompilerModifiers.AccJustFlag | ExtraCompilerModifiers.AccCallin | ClassFileConstants.AccDeprecated | ClassFileConstants.AccAnnotationDefault | ExtraCompilerModifiers.AccDefaultMethod;
+// SH}
 		if (isVarArgs)
 			currentModifiers |= ClassFileConstants.AccVarargs;
-
-		// remember deprecation so as to not lose it below
-		boolean deprecated = (currentModifiers & ClassFileConstants.AccDeprecated) != 0 || hasDeprecatedAnnotation(methodDeclaration.annotations);
+		if (hasDeprecatedAnnotation(methodDeclaration.annotations))
+			currentModifiers |= ClassFileConstants.AccDeprecated;
 
 		TypeReference returnType = methodDeclaration instanceof MethodDeclaration
 			? ((MethodDeclaration) methodDeclaration).returnType
@@ -390,13 +398,7 @@
 		ISourceElementRequestor.MethodInfo methodInfo = new ISourceElementRequestor.MethodInfo();
 		methodInfo.isAnnotation = methodDeclaration instanceof AnnotationMethodDeclaration;
 		methodInfo.declarationStart = methodDeclaration.declarationSourceStart;
-//{ObjectTeams: special bitmask to pass selected bits:
-		int myJustFlags = ExtraCompilerModifiers.AccJustFlag | ExtraCompilerModifiers.AccCallin;
- 		methodInfo.modifiers = deprecated ? (currentModifiers & myJustFlags) | ClassFileConstants.AccDeprecated : currentModifiers & myJustFlags;
- /* orig:
-		methodInfo.modifiers = deprecated ? (currentModifiers & ExtraCompilerModifiers.AccJustFlag) | ClassFileConstants.AccDeprecated : currentModifiers & ExtraCompilerModifiers.AccJustFlag;
-   :giro */
-// SH,km}
+		methodInfo.modifiers = currentModifiers;
 		methodInfo.returnType = returnType == null ? null : CharOperation.concatWith(returnType.getParameterizedTypeName(), '.');
 		methodInfo.name = methodDeclaration.selector;
 		methodInfo.nameSourceStart = methodDeclaration.sourceStart;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java
index 0a5dced..34ed892 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -432,13 +436,26 @@
 		this.requestor.acceptMethodReference(memberValuepair.name, 0, memberValuepair.sourceStart);
 	}
 }
-protected void consumeMarkerAnnotation() {
-	super.consumeMarkerAnnotation();
-	Annotation annotation = (Annotation)this.expressionStack[this.expressionPtr];
+protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
+	super.consumeMarkerAnnotation(isTypeAnnotation);
+	Annotation annotation = (Annotation) (isTypeAnnotation ? this.typeAnnotationStack[this.typeAnnotationPtr] : this.expressionStack[this.expressionPtr]);
 	if (this.reportReferenceInfo) { // accept annotation type reference
 		this.requestor.acceptAnnotationTypeReference(annotation.type.getTypeName(), annotation.sourceStart, annotation.sourceEnd);
 	}
 }
+//{ObjectTeams: new hook that also creates annotations:
+protected void convertTypeAnchor(int annotationKind) {
+	// consumeMarkerAnnotation, consumeSingleMemberAnnotation, consumeNormalAnnotation:
+	super.convertTypeAnchor(annotationKind);
+	if (this.reportReferenceInfo) { // accept annotation type reference
+		Annotation annotation = this.typeAnnotationStack[this.typeAnnotationPtr];
+		if (annotation instanceof SingleMemberAnnotation)
+			this.requestor.acceptMethodReference(TypeConstants.VALUE, 0, annotation.sourceStart);
+		else
+			this.requestor.acceptAnnotationTypeReference(annotation.type.getTypeName(), annotation.sourceStart, annotation.sourceEnd);
+	}
+}
+// SH}
 protected void consumeMethodHeaderName(boolean isAnnotationMethod) {
 	long selectorSourcePositions = this.identifierPositionStack[this.identifierPtr];
 	int selectorSourceEnd = (int) selectorSourcePositions;
@@ -588,16 +605,16 @@
 	handleMessageSend(((BaseCallMessageSend) this.expressionStack[this.expressionPtr]).getMessageSend());
 }
 //SH}
-protected void consumeNormalAnnotation() {
-	super.consumeNormalAnnotation();
-	Annotation annotation = (Annotation)this.expressionStack[this.expressionPtr];
+protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
+	super.consumeNormalAnnotation(isTypeAnnotation);
+	Annotation annotation = (Annotation) (isTypeAnnotation ? this.typeAnnotationStack[this.typeAnnotationPtr] : this.expressionStack[this.expressionPtr]);
 	if (this.reportReferenceInfo) { // accept annotation type reference
 		this.requestor.acceptAnnotationTypeReference(annotation.type.getTypeName(), annotation.sourceStart, annotation.sourceEnd);
 	}
 }
-protected void consumeSingleMemberAnnotation() {
-	super.consumeSingleMemberAnnotation();
-	SingleMemberAnnotation member = (SingleMemberAnnotation) this.expressionStack[this.expressionPtr];
+protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
+	super.consumeSingleMemberAnnotation(isTypeAnnotation);
+	SingleMemberAnnotation member = (SingleMemberAnnotation) (isTypeAnnotation ? this.typeAnnotationStack[this.typeAnnotationPtr] : this.expressionStack[this.expressionPtr]);
 	if (this.reportReferenceInfo) {
 		this.requestor.acceptMethodReference(TypeConstants.VALUE, 0, member.sourceStart);
 	}
@@ -877,9 +894,12 @@
 		return ltr.baseReference; // don't surface illegal LTR
 	}
 // SH}
+	Annotation [][] annotationsOnDimensions = null;
+	TypeReference ref;
 	int length = this.identifierLengthStack[this.identifierLengthPtr--];
 	if (length < 0) { //flag for precompiled type reference on base types
-		TypeReference ref = TypeReference.baseTypeReference(-length, dim);
+		annotationsOnDimensions = getAnnotationsOnDimensions(dim);
+		ref = TypeReference.baseTypeReference(-length, dim, annotationsOnDimensions);
 		ref.sourceStart = this.intStack[this.intPtr--];
 		if (dim == 0) {
 			ref.sourceEnd = this.intStack[this.intPtr--];
@@ -890,12 +910,11 @@
 		if (this.reportReferenceInfo){
 				this.requestor.acceptTypeReference(ref.getParameterizedTypeName(), ref.sourceStart, ref.sourceEnd);
 		}
-		return ref;
 	} else {
 		int numberOfIdentifiers = this.genericsIdentifiersLengthStack[this.genericsIdentifiersLengthPtr--];
 		if (length != numberOfIdentifiers || this.genericsLengthStack[this.genericsLengthPtr] != 0) {
 			// generic type
-			TypeReference ref = getTypeReferenceForGenericType(dim, length, numberOfIdentifiers);
+			ref = getTypeReferenceForGenericType(dim, length, numberOfIdentifiers);
 			if (this.reportReferenceInfo) {
 				if (length == 1 && numberOfIdentifiers == 1) {
 					ParameterizedSingleTypeReference parameterizedSingleTypeReference = (ParameterizedSingleTypeReference) ref;
@@ -905,32 +924,34 @@
 					this.requestor.acceptTypeReference(parameterizedQualifiedTypeReference.tokens, parameterizedQualifiedTypeReference.sourceStart, parameterizedQualifiedTypeReference.sourceEnd);
 				}
 			}
-			return ref;
 		} else if (length == 1) {
-			// single variable reference
+			// single type reference
 			this.genericsLengthPtr--; // pop the 0
 			if (dim == 0) {
-				SingleTypeReference ref =
+				ref =
 					new SingleTypeReference(
 						this.identifierStack[this.identifierPtr],
 						this.identifierPositionStack[this.identifierPtr--]);
 				if (this.reportReferenceInfo) {
-					this.requestor.acceptTypeReference(ref.token, ref.sourceStart);
+					this.requestor.acceptTypeReference(((SingleTypeReference)ref).token, ref.sourceStart);
 				}
-				return ref;
 			} else {
-				ArrayTypeReference ref =
+				annotationsOnDimensions = getAnnotationsOnDimensions(dim);
+				ref =
 					new ArrayTypeReference(
 						this.identifierStack[this.identifierPtr],
 						dim,
+						annotationsOnDimensions,
 						this.identifierPositionStack[this.identifierPtr--]);
 				ref.sourceEnd = this.endPosition;
-				if (this.reportReferenceInfo) {
-					this.requestor.acceptTypeReference(ref.token, ref.sourceStart);
+				if (annotationsOnDimensions != null) {
+					ref.bits |= ASTNode.HasTypeAnnotations;
 				}
-				return ref;
+				if (this.reportReferenceInfo) {
+					this.requestor.acceptTypeReference(((ArrayTypeReference)ref).token, ref.sourceStart);
+				}
 			}
-		} else {//Qualified variable reference
+		} else { // Qualified type reference
 			this.genericsLengthPtr--;
 			char[][] tokens = new char[length][];
 			this.identifierPtr -= length;
@@ -943,26 +964,48 @@
 				0,
 				length);
 			if (dim == 0) {
-				QualifiedTypeReference ref = new QualifiedTypeReference(tokens, positions);
+				ref = new QualifiedTypeReference(tokens, positions);
 				if (this.reportReferenceInfo) {
-					this.requestor.acceptTypeReference(ref.tokens, ref.sourceStart, ref.sourceEnd);
+					this.requestor.acceptTypeReference(((QualifiedTypeReference)ref).tokens, ref.sourceStart, ref.sourceEnd);
 				}
-				return ref;
 			} else {
-				ArrayQualifiedTypeReference ref =
-					new ArrayQualifiedTypeReference(tokens, dim, positions);
+				annotationsOnDimensions = getAnnotationsOnDimensions(dim);
+				ref =
+					new ArrayQualifiedTypeReference(tokens, dim, annotationsOnDimensions, positions);
 				ref.sourceEnd = this.endPosition;
-				if (this.reportReferenceInfo) {
-					this.requestor.acceptTypeReference(ref.tokens, ref.sourceStart, ref.sourceEnd);
+				if (annotationsOnDimensions != null) {
+					ref.bits |= ASTNode.HasTypeAnnotations;
 				}
-				return ref;
+				if (this.reportReferenceInfo) {
+					this.requestor.acceptTypeReference(((ArrayQualifiedTypeReference)ref).tokens, ref.sourceStart, ref.sourceEnd);
+				}
 			}
 		}
 	}
+	int levels = ref.getAnnotatableLevels();
+	for (int i = levels - 1; i >= 0; i--) {
+		if ((length = this.typeAnnotationLengthStack[this.typeAnnotationLengthPtr--]) != 0) {
+			if (ref.annotations == null)
+				ref.annotations = new Annotation[levels][];
+			System.arraycopy(
+					this.typeAnnotationStack,
+					(this.typeAnnotationPtr -= length) + 1,
+					ref.annotations[i] = new Annotation[length],
+					0,
+					length);
+			if (i == 0) {
+				ref.sourceStart = ref.annotations[0][0].sourceStart;
+			}
+			ref.bits |= ASTNode.HasTypeAnnotations;
+		}
+	}
+	return ref;
 }
-public NameReference getUnspecifiedReference() {
+public NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
 	/* build a (unspecified) NameReference which may be qualified*/
-
+    if (rejectTypeAnnotations) {
+    	consumeNonTypeUseName();
+    }
 	int length;
 	if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1) {
 		// single variable reference
@@ -1000,7 +1043,7 @@
 	a field access. This optimization is IMPORTANT while it results
 	that when a NameReference is build, the type checker should always
 	look for that it is not a type reference */
-
+	consumeNonTypeUseName();
 	int length;
 	if ((length = this.identifierLengthStack[this.identifierLengthPtr--]) == 1) {
 		// single variable reference
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java
index b4ad6a2..b128087 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/BinaryMethod.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -27,6 +31,7 @@
 import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
 import org.eclipse.jdt.internal.compiler.env.IBinaryType;
 import org.eclipse.jdt.internal.compiler.lookup.Binding;
+import org.eclipse.jdt.internal.compiler.lookup.ExtraCompilerModifiers;
 import org.eclipse.jdt.internal.core.JavaModelManager.PerProjectInfo;
 import org.eclipse.jdt.internal.core.util.Util;
 
@@ -193,7 +198,10 @@
  */
 public int getFlags() throws JavaModelException {
 	IBinaryMethod info = (IBinaryMethod) getElementInfo();
-	return info.getModifiers();
+	int modifiers = info.getModifiers();
+	if (((IType) this.parent).isInterface() && (modifiers & (ClassFileConstants.AccAbstract | ClassFileConstants.AccStatic)) == 0)
+		modifiers |= ExtraCompilerModifiers.AccDefaultMethod;
+	return modifiers;
 }
 /*
  * @see JavaElement#getHandleMemento(StringBuffer)
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
index e596ffc..58aa745 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CompilationUnitProblemFinder.java
@@ -157,7 +157,8 @@
 		compilerOptions.performMethodsFullRecovery = statementsRecovery;
 		compilerOptions.performStatementsRecovery = statementsRecovery;
 		compilerOptions.parseLiteralExpressionsAsConstants = !creatingAST; /*parse literal expressions as constants only if not creating a DOM AST*/
-		compilerOptions.storeAnnotations = creatingAST; /*store annotations in the bindings if creating a DOM AST*/
+		if (creatingAST)
+			compilerOptions.storeAnnotations = true; /* store annotations in the bindings if creating a DOM AST */
 		return compilerOptions;
 	}
 
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
index 426d41e..409a1d4 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -86,7 +86,7 @@
 		initializeASTParser();
 	}
 	private void initializeASTParser() {
-		this.parser = ASTParser.newParser(AST.JLS4);
+		this.parser = ASTParser.newParser(AST.JLS8);
 	}
 	/**
 	 * Returns the children of <code>source</code> which are affected by this operation.
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateElementInCUOperation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateElementInCUOperation.java
index 6b2c602..6bdfda9 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateElementInCUOperation.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateElementInCUOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -263,7 +263,7 @@
 		// ensure cu is consistent (noop if already consistent)
 		cu.makeConsistent(this.progressMonitor);
 		// create an AST for the compilation unit
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
 		parser.setSource(cu);
 		return (CompilationUnit) parser.createAST(this.progressMonitor);
 	}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateTypeMemberOperation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateTypeMemberOperation.java
index b46a0f5..4e7da36 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateTypeMemberOperation.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CreateTypeMemberOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -91,7 +91,7 @@
 protected ASTNode generateElementAST(ASTRewrite rewriter, ICompilationUnit cu) throws JavaModelException {
 	if (this.createdNode == null) {
 		this.source = removeIndentAndNewLines(this.source, cu);
-		ASTParser parser = ASTParser.newParser(AST.JLS4);
+		ASTParser parser = ASTParser.newParser(AST.JLS8);
 		parser.setSource(this.source.toCharArray());
 		parser.setProject(getCompilationUnit().getJavaProject());
 		parser.setKind(ASTParser.K_CLASS_BODY_DECLARATIONS);
@@ -191,7 +191,7 @@
 	buff.append(lineSeparator + " public class A {" + lineSeparator); //$NON-NLS-1$
 	buff.append(this.source);
 	buff.append(lineSeparator).append('}');
-	ASTParser parser = ASTParser.newParser(AST.JLS4);
+	ASTParser parser = ASTParser.newParser(AST.JLS8);
 	parser.setSource(buff.toString().toCharArray());
 	CompilationUnit compilationUnit = (CompilationUnit) parser.createAST(null);
 	TypeDeclaration typeDeclaration = (TypeDeclaration) compilationUnit.types().iterator().next();
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeleteElementsOperation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeleteElementsOperation.java
index c151e60..c4df538 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeleteElementsOperation.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/DeleteElementsOperation.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -80,7 +80,7 @@
 	}
 
 	private void initASTParser() {
-		this.parser = ASTParser.newParser(AST.JLS4);
+		this.parser = ASTParser.newParser(AST.JLS8);
 	}
 
 	/**
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
index d51eb2a..159eeb9 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java
@@ -5,6 +5,10 @@
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - extended API and implementation
@@ -308,7 +312,7 @@
 
 	public static class CompilationParticipants {
 
-		private final static int MAX_SOURCE_LEVEL = 7; // 1.1 to 1.7
+		private final static int MAX_SOURCE_LEVEL = 8; // 1.1 to 1.8
 
 		/*
 		 * The registered compilation participants (a table from int (source level) to Object[])
@@ -452,6 +456,8 @@
 					return 5;
 				case ClassFileConstants.MAJOR_VERSION_1_7:
 					return 6;
+				case ClassFileConstants.MAJOR_VERSION_1_8:
+					return 7;
 				default:
 					// all other cases including ClassFileConstants.MAJOR_VERSION_1_1
 					return 0;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBinaryType.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBinaryType.java
index b90fa25..e62890a 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBinaryType.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBinaryType.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *         bug 407191 - [1.8] Binary access support for type annotations
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.hierarchy;
 
@@ -19,6 +25,7 @@
 import org.eclipse.jdt.internal.compiler.env.IBinaryMethod;
 import org.eclipse.jdt.internal.compiler.env.IBinaryNestedType;
 import org.eclipse.jdt.internal.compiler.env.IBinaryType;
+import org.eclipse.jdt.internal.compiler.env.IBinaryTypeAnnotation;
 import org.eclipse.jdt.internal.core.search.indexing.IIndexConstants;
 
 public class HierarchyBinaryType implements IBinaryType {
@@ -51,6 +58,12 @@
 public IBinaryAnnotation[] getAnnotations() {
 	return null;
 }
+/**
+ * @see org.eclipse.jdt.internal.compiler.env.IBinaryType
+ */
+public IBinaryTypeAnnotation[] getTypeAnnotations() {
+	return null;
+}
 public char[] getEnclosingMethod() {
 	return null;
 }
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
index 32edad8..e198234 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: HierarchyResolver.java 23404 2010-02-03 14:10:22Z stephan $
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -229,7 +232,7 @@
 			}
 		}
 		for (int t = this.typeIndex; t >= 0; t--) {
-			if (this.typeBindings[t] == superBinding) {
+			if (TypeBinding.equalsEquals(this.typeBindings[t], superBinding)) {
 				return this.builder.getHandle(this.typeModels[t], superBinding);
 			}
 		}
@@ -335,7 +338,7 @@
 			if (CharOperation.equals(simpleName, interfaceBinding.sourceName)) {
 				bindingIndex++;
 				for (int t = this.typeIndex; t >= 0; t--) {
-					if (this.typeBindings[t] == interfaceBinding) {
+					if (TypeBinding.equalsEquals(this.typeBindings[t], interfaceBinding)) {
 						IType handle = this.builder.getHandle(this.typeModels[t], interfaceBinding);
 						if (handle != null) {
 							superinterfaces[index++] = handle;
@@ -367,7 +370,7 @@
 				QualifiedAllocationExpression allocationExpression = localTypeBinding.scope.referenceContext.allocation;
 				TypeReference type;
 				if (allocationExpression != null && (type = allocationExpression.type) != null && type.resolvedType != null) {
-					localTypeBinding.superclass = (ReferenceBinding) type.resolvedType;
+					localTypeBinding.setSuperClass((ReferenceBinding) type.resolvedType);
 					continue;
 				}
 			}
@@ -382,7 +385,7 @@
 				if (superclass instanceof ReferenceBinding) {
 					// ensure we are not creating a cycle (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=215681 )
 					if (!(subTypeOfType((ReferenceBinding) superclass, typeBinding))) {
-						((SourceTypeBinding) typeBinding).superclass = (ReferenceBinding) superclass;
+						((SourceTypeBinding) typeBinding).setSuperClass((ReferenceBinding) superclass);
 					}
 				}
 
@@ -406,7 +409,7 @@
 					}
 					if (index < length)
 						System.arraycopy(interfaceBindings, 0, interfaceBindings = new ReferenceBinding[index], 0 , index);
-					((SourceTypeBinding) typeBinding).superInterfaces = interfaceBindings;
+					((SourceTypeBinding) typeBinding).setSuperInterfaces(interfaceBindings);
 				}
 			}
 		} else if (typeBinding instanceof BinaryTypeBinding) {
@@ -1062,7 +1065,7 @@
 }
 private boolean subTypeOfType(ReferenceBinding subType, ReferenceBinding typeBinding) {
 	if (typeBinding == null || subType == null) return false;
-	if (subType == typeBinding) return true;
+	if (TypeBinding.equalsEquals(subType, typeBinding)) return true;
 	ReferenceBinding superclass = subType.superclass();
 	if (superclass != null) superclass = (ReferenceBinding) superclass.erasure();
 //	if (superclass != null && superclass.id == TypeIds.T_JavaLangObject && subType.isHierarchyInconsistent()) return false;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BootstrapMethodsAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BootstrapMethodsAttribute.java
index b196927..2a7b376 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BootstrapMethodsAttribute.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/BootstrapMethodsAttribute.java
@@ -41,9 +41,10 @@
 		if (length != 0) {
 			int readOffset = 8;
 			this.entries = new IBootstrapMethodsEntry[length];
+			BootstrapMethodsEntry entry;
 			for (int i = 0; i < length; i++) {
-				this.entries[i] = new BootstrapMethodsEntry(classFileBytes, constantPool, offset + readOffset);
-				readOffset += 8;
+				this.entries[i] = entry = new BootstrapMethodsEntry(classFileBytes, constantPool, offset + readOffset);
+				readOffset += 4 + 2 * entry.getBootstrapArguments().length; 
 			}
 		} else {
 			this.entries = NO_ENTRIES;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ClassFileReader.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ClassFileReader.java
index 0426dc4..9460f88 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ClassFileReader.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ClassFileReader.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2011, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.util;
 
@@ -275,6 +281,10 @@
 							this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
 						} else if (equals(attributeName, IAttributeNamesConstants.BOOTSTRAP_METHODS)) {
 							this.attributes[attributesIndex++] = new BootstrapMethodsAttribute(classFileBytes, this.constantPool, readOffset);
+						} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS)) {
+							this.attributes[attributesIndex++] = new RuntimeVisibleTypeAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
+						} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS)) {
+							this.attributes[attributesIndex++] = new RuntimeInvisibleTypeAnnotationsAttribute(classFileBytes, this.constantPool, readOffset);
 						} else {
 							this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, this.constantPool, readOffset);
 						}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java
index a281ab0..4339375 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeAttribute.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.util;
 
@@ -86,6 +92,10 @@
 				this.attributes[attributesIndex++] = new StackMapTableAttribute(classFileBytes, constantPool, offset + readOffset);
 			} else if (equals(attributeName, IAttributeNamesConstants.STACK_MAP)) {
 				this.attributes[attributesIndex++] = new StackMapAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeVisibleTypeAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeInvisibleTypeAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
 			} else {
 				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
 			}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeSnippetParsingUtil.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeSnippetParsingUtil.java
index f2ddc4f..73f63e7 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeSnippetParsingUtil.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/CodeSnippetParsingUtil.java
@@ -1,10 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2002, 2009 IBM Corporation and others.
+ * Copyright (c) 2002, 2013 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
- * $Id: CodeSnippetParsingUtil.java 23137 2009-12-04 20:03:06Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -177,7 +180,7 @@
 
 		CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, compilerOptions.maxProblemsPerUnit);
 		CompilationUnitDeclaration unit = new CompilationUnitDeclaration(problemReporter, compilationResult, source.length);
-		Expression result = parser.parseExpression(source, offset, length, unit);
+		Expression result = parser.parseExpression(source, offset, length, unit, true /* record line separators */);
 
 		if (recordParsingInformation) {
 			this.recordedParsingInformation = getRecordedParsingInformation(compilationResult, unit.comments);
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
index 067a219..c08a006 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Disassembler.java
@@ -1,12 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *       Jesper Steen Moeller - Contributions for:
+ *                          Bug 406973 - [compiler] Parse MethodParameters attribute
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.util;
 
@@ -89,6 +97,12 @@
 				case IModifierConstants.ACC_ENUM :
 					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_ENUM, "enum", firstModifier); //$NON-NLS-1$
 					break;
+				case IModifierConstants.ACC_SYNTHETIC :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_SYNTHETIC, "synthetic", firstModifier); //$NON-NLS-1$
+					break;
+				case IModifierConstants.ACC_MANDATED :
+					firstModifier = appendModifier(buffer, accessFlags, IModifierConstants.ACC_MANDATED, "mandated", firstModifier); //$NON-NLS-1$
+					break;
 			}
 		}
 		if (!firstModifier) {
@@ -150,6 +164,14 @@
 		});
 	}
 
+	private final void decodeModifiersForMethodParameters(StringBuffer buffer, int accessFlags) {
+		decodeModifiers(buffer, accessFlags, false, true, new int[] {
+				IModifierConstants.ACC_FINAL,
+				IModifierConstants.ACC_MANDATED,
+				IModifierConstants.ACC_SYNTHETIC,
+		});
+	}
+
 	private final void decodeModifiersForType(StringBuffer buffer, int accessFlags) {
 		decodeModifiers(buffer, accessFlags, new int[] {
 				IModifierConstants.ACC_PUBLIC,
@@ -258,6 +280,200 @@
 		writeNewLine(buffer, lineSeparator, tabNumber + 1);
 		buffer.append(Messages.disassembler_annotationentryend);
 	}
+	
+	private void disassemble(IExtendedAnnotation extendedAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		final int typeIndex = extendedAnnotation.getTypeIndex();
+		final char[] typeName = CharOperation.replaceOnCopy(extendedAnnotation.getTypeName(), '/', '.');
+		buffer.append(
+			Messages.bind(Messages.disassembler_extendedannotationentrystart, new String[] {
+				Integer.toString(typeIndex),
+				new String(returnClassName(Signature.toCharArray(typeName), '.', mode))
+			}));
+		final IAnnotationComponent[] components = extendedAnnotation.getComponents();
+		for (int i = 0, max = components.length; i < max; i++) {
+			disassemble(components[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+		writeNewLine(buffer, lineSeparator, tabNumber + 2);
+		int targetType = extendedAnnotation.getTargetType();
+		buffer.append(
+				Messages.bind(Messages.disassembler_extendedannotation_targetType, new String[] {
+					Integer.toHexString(targetType),
+					getTargetType(targetType),
+				}));
+		switch(targetType) {
+			case IExtendedAnnotationConstants.METHOD_RECEIVER :
+			case IExtendedAnnotationConstants.METHOD_RETURN:
+			case IExtendedAnnotationConstants.FIELD :
+				break;
+			default:
+				writeNewLine(buffer, lineSeparator, tabNumber + 2);
+				disassembleTargetTypeContents(false, targetType, extendedAnnotation, buffer, lineSeparator, tabNumber, mode);
+		}
+		disassembleTypePathContents(targetType, extendedAnnotation, buffer, lineSeparator, tabNumber, mode);
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_extendedannotationentryend);
+	}
+
+	private void disassembleTypePathContents(int targetType, IExtendedAnnotation extendedAnnotation,StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		int[][] typepath = extendedAnnotation.getTypePath();
+		if (typepath.length != 0) {
+			writeNewLine(buffer, lineSeparator, tabNumber + 2);
+			buffer.append(
+				Messages.bind(Messages.disassembler_extendedannotation_typepath, new String[] {
+						toTypePathString(typepath),
+				}));
+		}
+	}
+	private void disassembleTargetTypeContents(boolean insideWildcard, int targetType, IExtendedAnnotation extendedAnnotation, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		switch(targetType) {
+			case IExtendedAnnotationConstants.CLASS_TYPE_PARAMETER :
+			case IExtendedAnnotationConstants.METHOD_TYPE_PARAMETER :
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_type_parameter, new String[] {
+							Integer.toString(extendedAnnotation.getTypeParameterIndex()),
+						}));
+				break;
+			case IExtendedAnnotationConstants.CLASS_EXTENDS :
+				buffer.append(
+					Messages.bind(Messages.disassembler_extendedannotation_classextendsimplements, new String[] {
+						Integer.toString(extendedAnnotation.getAnnotationTypeIndex()),
+					}));
+				break;
+				
+			case IExtendedAnnotationConstants.CLASS_TYPE_PARAMETER_BOUND :
+			case IExtendedAnnotationConstants.METHOD_TYPE_PARAMETER_BOUND :
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_type_parameter_with_bound, new String[] {
+							Integer.toString(extendedAnnotation.getTypeParameterIndex()),
+							Integer.toString(extendedAnnotation.getTypeParameterBoundIndex()),
+						}));
+				break;				
+			case IExtendedAnnotationConstants.FIELD :
+			case IExtendedAnnotationConstants.METHOD_RETURN :
+			case IExtendedAnnotationConstants.METHOD_RECEIVER :
+				break;
+			case IExtendedAnnotationConstants.METHOD_FORMAL_PARAMETER :
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_method_parameter, new String[] {
+							Integer.toString(extendedAnnotation.getParameterIndex()),
+						}));
+				break;
+			case IExtendedAnnotationConstants.THROWS :
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_throws, new String[] {
+							Integer.toString(extendedAnnotation.getAnnotationTypeIndex()),
+						}));
+				break;
+
+			case IExtendedAnnotationConstants.LOCAL_VARIABLE :
+			case IExtendedAnnotationConstants.RESOURCE_VARIABLE :
+				buffer.append(Messages.disassembler_localvariabletargetheader);
+				writeNewLine(buffer, lineSeparator, tabNumber + 3);
+				int localVariableTableSize = extendedAnnotation.getLocalVariableRefenceInfoLength();
+				ILocalVariableReferenceInfo[] localVariableTable = extendedAnnotation.getLocalVariableTable();
+				for (int i = 0; i < localVariableTableSize; i++) {
+					if (i != 0) {
+						writeNewLine(buffer, lineSeparator, tabNumber + 3);
+					}
+					ILocalVariableReferenceInfo info = localVariableTable[i];
+					int index= info.getIndex();
+					int startPC = info.getStartPC();
+					int length  = info.getLength();
+					buffer.append(Messages.bind(Messages.classfileformat_localvariablereferenceinfoentry,
+						new String[] {
+							Integer.toString(startPC),
+							Integer.toString(startPC + length),
+							Integer.toString(index),
+						}));
+				}
+				break;
+			case IExtendedAnnotationConstants.EXCEPTION_PARAMETER :
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_exception_table_index, new String[] {
+							Integer.toString(extendedAnnotation.getExceptionTableIndex()),
+						}));
+				break;
+				
+			case IExtendedAnnotationConstants.INSTANCEOF :
+			case IExtendedAnnotationConstants.NEW :
+			case IExtendedAnnotationConstants.CONSTRUCTOR_REFERENCE :
+			case IExtendedAnnotationConstants.METHOD_REFERENCE :
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_offset, new String[] {
+							Integer.toString(extendedAnnotation.getOffset()),
+						}));
+				break;
+			case IExtendedAnnotationConstants.CAST :
+			case IExtendedAnnotationConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT :
+			case IExtendedAnnotationConstants.METHOD_INVOCATION_TYPE_ARGUMENT :
+			case IExtendedAnnotationConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT :
+			case IExtendedAnnotationConstants.METHOD_REFERENCE_TYPE_ARGUMENT :
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_offset, new String[] {
+							Integer.toString(extendedAnnotation.getOffset()),
+						}));
+				writeNewLine(buffer, lineSeparator, tabNumber + 2);
+				buffer.append(
+						Messages.bind(Messages.disassembler_extendedannotation_type_argument, new String[] {
+							Integer.toString(extendedAnnotation.getAnnotationTypeIndex()),
+						}));
+				break;
+		}
+	}
+	private String getTargetType(int targetType) {
+		switch(targetType) {
+			case IExtendedAnnotationConstants.CLASS_TYPE_PARAMETER :
+				return "CLASS_TYPE_PARAMETER"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_TYPE_PARAMETER :
+				return "METHOD_TYPE_PARAMETER"; //$NON-NLS-1$
+
+			case IExtendedAnnotationConstants.CLASS_EXTENDS :
+				return "CLASS_EXTENDS"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.CLASS_TYPE_PARAMETER_BOUND :
+				return "CLASS_TYPE_PARAMETER_BOUND"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_TYPE_PARAMETER_BOUND :
+				return "METHOD_TYPE_PARAMETER_BOUND"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.FIELD :
+				return "FIELD"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_RETURN :
+				return "METHOD_RETURN"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_RECEIVER :
+				return "METHOD_RECEIVER"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_FORMAL_PARAMETER :
+				return "METHOD_FORMAL_PARAMETER"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.THROWS :
+				return "THROWS"; //$NON-NLS-1$
+
+			case IExtendedAnnotationConstants.LOCAL_VARIABLE :
+				return "LOCAL_VARIABLE"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.RESOURCE_VARIABLE :
+				return "RESOURCE_VARIABLE"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.EXCEPTION_PARAMETER :
+				return "EXCEPTION_PARAMETER"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.INSTANCEOF :
+				return "INSTANCEOF"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.NEW :
+				return "NEW"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.CONSTRUCTOR_REFERENCE :
+				return "CONSTRUCTOR_REFERENCE"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_REFERENCE :
+				return "METHOD_REFERENCE"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.CAST :
+				return "CAST"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT :
+				return "CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_INVOCATION_TYPE_ARGUMENT :
+				return "METHOD_INVOCATION_TYPE_ARGUMENT"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT :
+				return "CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT"; //$NON-NLS-1$
+			case IExtendedAnnotationConstants.METHOD_REFERENCE_TYPE_ARGUMENT :
+				return "METHOD_REFERENCE_TYPE_ARGUMENT"; //$NON-NLS-1$
+			default:
+				return "UNKNOWN"; //$NON-NLS-1$
+		}
+	}
+
 
 	private void disassemble(IAnnotationComponent annotationComponent, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
 		writeNewLine(buffer, lineSeparator, tabNumber + 1);
@@ -377,9 +593,22 @@
 			}));
 	}
 
+	private void disassemble(IMethodParametersAttribute methodParametersAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		tabNumber += 2;
+		writeNewLine(buffer, lineSeparator, tabNumber);
+		buffer.append(Messages.disassembler_methodparametersheader);
+		for (int i = 0, length = methodParametersAttribute.getMethodParameterLength(); i < length; ++i) {
+			writeNewLine(buffer, lineSeparator, tabNumber + 1);
+			short accessFlags = methodParametersAttribute.getAccessFlags(i);
+			decodeModifiersForMethodParameters(buffer, accessFlags);
+			buffer.append(methodParametersAttribute.getParameterName(i));
+		}
+	}
+
 	private void disassembleEnumConstructor(IClassFileReader classFileReader, char[] className, IMethodInfo methodInfo, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
 		writeNewLine(buffer, lineSeparator, tabNumber);
 		final ICodeAttribute codeAttribute = methodInfo.getCodeAttribute();
+		IMethodParametersAttribute methodParametersAttribute = (IMethodParametersAttribute) Util.getAttribute(methodInfo, IAttributeNamesConstants.METHOD_PARAMETERS);
 		char[] methodDescriptor = methodInfo.getDescriptor();
 		final IClassFileAttribute runtimeVisibleAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
 		final IClassFileAttribute runtimeInvisibleAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
@@ -396,7 +625,7 @@
 		decodeModifiersForMethod(buffer, accessFlags & IModifierConstants.ACC_PRIVATE);
 		CharOperation.replace(methodDescriptor, '/', '.');
 		final boolean isVarArgs = (accessFlags & IModifierConstants.ACC_VARARGS) != 0;
-		final char[] signature = Signature.toCharArray(methodDescriptor, returnClassName(className, '.', COMPACT), getParameterNames(methodDescriptor, codeAttribute, accessFlags) , !checkMode(mode, COMPACT), false, isVarArgs);
+		final char[] signature = Signature.toCharArray(methodDescriptor, returnClassName(className, '.', COMPACT), getParameterNames(methodDescriptor, codeAttribute, methodParametersAttribute, accessFlags) , !checkMode(mode, COMPACT), false, isVarArgs);
 		int index = CharOperation.indexOf(',', signature);
 		index = CharOperation.indexOf(',', signature, index + 1);
 		buffer.append(signature, 0, CharOperation.indexOf('(', signature) + 1);
@@ -465,8 +694,11 @@
 		final ISignatureAttribute signatureAttribute = (ISignatureAttribute) Util.getAttribute(methodInfo, IAttributeNamesConstants.SIGNATURE);
 		final IClassFileAttribute runtimeVisibleAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
 		final IClassFileAttribute runtimeInvisibleAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
+		final IClassFileAttribute runtimeVisibleTypeAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS);
+		final IClassFileAttribute runtimeInvisibleTypeAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS);
 		final IClassFileAttribute runtimeVisibleParameterAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS);
 		final IClassFileAttribute runtimeInvisibleParameterAnnotationsAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS);
+		final IClassFileAttribute methodParametersAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.METHOD_PARAMETERS);
 		final IClassFileAttribute annotationDefaultAttribute = Util.getAttribute(methodInfo, IAttributeNamesConstants.ANNOTATION_DEFAULT);
 		if (checkMode(mode, SYSTEM | DETAILED)) {
 			buffer.append(Messages.bind(Messages.classfileformat_methoddescriptor,
@@ -513,7 +745,7 @@
 		char[] methodHeader = null;
 		char[][] parameterNames = null;
 		if (!methodInfo.isClinit()) {
-			parameterNames = getParameterNames(methodDescriptor, codeAttribute, accessFlags);
+			parameterNames = getParameterNames(methodDescriptor, codeAttribute, (IMethodParametersAttribute)methodParametersAttribute, accessFlags);
 		}
 		if (methodInfo.isConstructor()) {
 			if (checkMode(mode, WORKING_COPY) && signatureAttribute != null) {
@@ -673,6 +905,11 @@
 				disassemble(codeAttribute, parameterNames, methodDescriptor, (accessFlags & IModifierConstants.ACC_STATIC) != 0, buffer, lineSeparator, tabNumber, mode);
 			}
 		}
+		if (checkMode(mode, SYSTEM | DETAILED)) {
+			if (methodParametersAttribute != null) {
+				disassemble((IMethodParametersAttribute)methodParametersAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+		}
 		if (checkMode(mode, SYSTEM)) {
 			IClassFileAttribute[] attributes = methodInfo.getAttributes();
 			int length = attributes.length;
@@ -685,8 +922,11 @@
 							&& attribute != annotationDefaultAttribute
 							&& attribute != runtimeInvisibleAnnotationsAttribute
 							&& attribute != runtimeVisibleAnnotationsAttribute
+							&& attribute != runtimeInvisibleTypeAnnotationsAttribute
+							&& attribute != runtimeVisibleTypeAnnotationsAttribute
 							&& attribute != runtimeInvisibleParameterAnnotationsAttribute
 							&& attribute != runtimeVisibleParameterAnnotationsAttribute
+							&& attribute != methodParametersAttribute
 							&& !CharOperation.equals(attribute.getAttributeName(), IAttributeNamesConstants.DEPRECATED)
 							&& !CharOperation.equals(attribute.getAttributeName(), IAttributeNamesConstants.SYNTHETIC)) {
 						disassemble(attribute, buffer, lineSeparator, tabNumber, mode);
@@ -709,6 +949,12 @@
 			if (runtimeInvisibleParameterAnnotationsAttribute != null) {
 				disassemble((IRuntimeInvisibleParameterAnnotationsAttribute) runtimeInvisibleParameterAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
 			}
+			if (runtimeVisibleTypeAnnotationsAttribute != null) {
+				disassemble((IRuntimeVisibleTypeAnnotationsAttribute) runtimeVisibleTypeAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (runtimeInvisibleTypeAnnotationsAttribute != null) {
+				disassemble((IRuntimeInvisibleTypeAnnotationsAttribute) runtimeInvisibleTypeAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+ 			}
 		}
 	}
 
@@ -769,6 +1015,8 @@
 				versionNumber = JavaCore.VERSION_1_6;
 			} else if (minorVersion == 0 && majorVersion == 51) {
 				versionNumber = JavaCore.VERSION_1_7;
+			} else if (minorVersion == 0 && majorVersion == 52) {
+				versionNumber = JavaCore.VERSION_1_8;
 			}
 			buffer.append(
 				Messages.bind(Messages.classfileformat_versiondetails,
@@ -800,7 +1048,9 @@
 		IInnerClassesAttribute innerClassesAttribute = classFileReader.getInnerClassesAttribute();
 		IClassFileAttribute runtimeVisibleAnnotationsAttribute = Util.getAttribute(classFileReader, IAttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
 		IClassFileAttribute runtimeInvisibleAnnotationsAttribute = Util.getAttribute(classFileReader, IAttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
-	
+		IClassFileAttribute runtimeVisibleTypeAnnotationsAttribute = Util.getAttribute(classFileReader, IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS);
+		IClassFileAttribute runtimeInvisibleTypeAnnotationsAttribute = Util.getAttribute(classFileReader, IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS);
+
 		IClassFileAttribute bootstrapMethods = Util.getAttribute(classFileReader, IAttributeNamesConstants.BOOTSTRAP_METHODS);
 	
 		if (checkMode(mode, DETAILED)) {
@@ -947,6 +1197,12 @@
 				if (runtimeInvisibleAnnotationsAttribute != null) {
 					disassemble((IRuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, 0, mode);
 				}
+				if (runtimeVisibleTypeAnnotationsAttribute != null) {
+					disassemble((IRuntimeVisibleTypeAnnotationsAttribute) runtimeVisibleTypeAnnotationsAttribute, buffer, lineSeparator, 0, mode);
+				}
+				if (runtimeInvisibleTypeAnnotationsAttribute != null) {
+					disassemble((IRuntimeInvisibleTypeAnnotationsAttribute) runtimeInvisibleTypeAnnotationsAttribute, buffer, lineSeparator, 0, mode);
+	 			}
 				if (length != 0) {
 					for (int i = 0; i < length; i++) {
 						IClassFileAttribute attribute = attributes[i];
@@ -956,6 +1212,8 @@
 								&& attribute != enclosingMethodAttribute
 								&& attribute != runtimeInvisibleAnnotationsAttribute
 								&& attribute != runtimeVisibleAnnotationsAttribute
+								&& attribute != runtimeInvisibleTypeAnnotationsAttribute
+								&& attribute != runtimeVisibleTypeAnnotationsAttribute
 								&& !CharOperation.equals(attribute.getAttributeName(), IAttributeNamesConstants.DEPRECATED)
 								&& !CharOperation.equals(attribute.getAttributeName(), IAttributeNamesConstants.SYNTHETIC)
 								&& attribute != bootstrapMethods) {
@@ -1180,6 +1438,10 @@
 					if (numberOfEntries != 0) {
 						disassemble(stackMapAttribute, buffer, lineSeparator, tabNumber, mode);
 					}
+				} else if (CharOperation.equals(attribute.getAttributeName(),IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS)) {
+					disassemble((IRuntimeVisibleTypeAnnotationsAttribute) attribute, buffer, lineSeparator, tabNumber, mode);
+				} else if (CharOperation.equals(attribute.getAttributeName(),IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS)) {
+					disassemble((IRuntimeInvisibleTypeAnnotationsAttribute) attribute, buffer, lineSeparator, tabNumber, mode);					
 				} else if (attribute != lineNumberAttribute
 						&& attribute != localVariableAttribute
 						&& attribute != localVariableTypeAttribute) {
@@ -1584,6 +1846,8 @@
 		}
 		final IClassFileAttribute runtimeVisibleAnnotationsAttribute = Util.getAttribute(fieldInfo, IAttributeNamesConstants.RUNTIME_VISIBLE_ANNOTATIONS);
 		final IClassFileAttribute runtimeInvisibleAnnotationsAttribute = Util.getAttribute(fieldInfo, IAttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS);
+		final IClassFileAttribute runtimeVisibleTypeAnnotationsAttribute = Util.getAttribute(fieldInfo, IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS);
+		final IClassFileAttribute runtimeInvisibleTypeAnnotationsAttribute = Util.getAttribute(fieldInfo, IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS);
 		if (checkMode(mode, DETAILED)) {
 			// disassemble compact version of annotations
 			if (runtimeInvisibleAnnotationsAttribute != null) {
@@ -1670,6 +1934,8 @@
 						&& attribute != signatureAttribute
 						&& attribute != runtimeInvisibleAnnotationsAttribute
 						&& attribute != runtimeVisibleAnnotationsAttribute
+						&& attribute != runtimeInvisibleTypeAnnotationsAttribute
+						&& attribute != runtimeVisibleTypeAnnotationsAttribute
 						&& !CharOperation.equals(attribute.getAttributeName(), IAttributeNamesConstants.DEPRECATED)
 						&& !CharOperation.equals(attribute.getAttributeName(), IAttributeNamesConstants.SYNTHETIC)) {
 						disassemble(attribute, buffer, lineSeparator, tabNumber, mode);
@@ -1682,6 +1948,12 @@
 			if (runtimeInvisibleAnnotationsAttribute != null) {
 				disassemble((IRuntimeInvisibleAnnotationsAttribute) runtimeInvisibleAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
 			}
+			if (runtimeVisibleTypeAnnotationsAttribute != null) {
+				disassemble((IRuntimeVisibleTypeAnnotationsAttribute) runtimeVisibleTypeAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+			}
+			if (runtimeInvisibleTypeAnnotationsAttribute != null) {
+				disassemble((IRuntimeInvisibleTypeAnnotationsAttribute) runtimeInvisibleTypeAnnotationsAttribute, buffer, lineSeparator, tabNumber, mode);
+ 			}
 		}
 	}
 
@@ -1815,7 +2087,16 @@
 			disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
 		}
 	}
-
+	
+	private void disassemble(IRuntimeInvisibleTypeAnnotationsAttribute runtimeInvisibleTypeAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_runtimeinvisibletypeannotationsattributeheader);
+		IExtendedAnnotation[] extendedAnnotations = runtimeInvisibleTypeAnnotationsAttribute.getExtendedAnnotations();
+		for (int i = 0, max = extendedAnnotations.length; i < max; i++) {
+			disassemble(extendedAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+		}
+	}
+		
 	private void disassemble(IRuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
 		writeNewLine(buffer, lineSeparator, tabNumber + 1);
 		buffer.append(Messages.disassembler_runtimevisibleannotationsattributeheader);
@@ -1833,6 +2114,15 @@
 			disassemble(i, parameterAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
 		}
 	}
+	
+	private void disassemble(IRuntimeVisibleTypeAnnotationsAttribute runtimeVisibleTypeAnnotationsAttribute, StringBuffer buffer, String lineSeparator, int tabNumber, int mode) {
+		writeNewLine(buffer, lineSeparator, tabNumber + 1);
+		buffer.append(Messages.disassembler_runtimevisibletypeannotationsattributeheader);
+		IExtendedAnnotation[] extendedAnnotations = runtimeVisibleTypeAnnotationsAttribute.getExtendedAnnotations();
+		for (int i = 0, max = extendedAnnotations.length; i < max; i++) {
+			disassemble(extendedAnnotations[i], buffer, lineSeparator, tabNumber + 1, mode);
+ 		}
+ 	}
 
 	private String disassemble(IVerificationTypeInfo[] infos, int mode) {
 		StringBuffer buffer = new StringBuffer();
@@ -2148,28 +2438,37 @@
 		return null;
 	}
 
-	private char[][] getParameterNames(char[] methodDescriptor, ICodeAttribute codeAttribute, int accessFlags) {
+	private char[][] getParameterNames(char[] methodDescriptor, ICodeAttribute codeAttribute, IMethodParametersAttribute parametersAttribute, int accessFlags) {
 		int paramCount = Signature.getParameterCount(methodDescriptor);
 		char[][] parameterNames = new char[paramCount][];
 		// check if the code attribute has debug info for this method
-		if (codeAttribute != null) {
-			ILocalVariableAttribute localVariableAttribute = codeAttribute.getLocalVariableAttribute();
-			if (localVariableAttribute != null) {
-				ILocalVariableTableEntry[] entries = localVariableAttribute.getLocalVariableTable();
-				final int startingIndex = (accessFlags & IModifierConstants.ACC_STATIC) != 0 ? 0 : 1;
-				for (int i = 0; i < paramCount; i++) {
-					ILocalVariableTableEntry searchedEntry = getEntryFor(getLocalIndex(startingIndex, i, methodDescriptor), entries);
-					if (searchedEntry != null) {
-						parameterNames[i] = searchedEntry.getName();
-					} else {
-						parameterNames[i] = CharOperation.concat(Messages.disassembler_parametername.toCharArray(), Integer.toString(i).toCharArray());
-					}
-				}
-			} else {
-				for (int i = 0; i < paramCount; i++) {
+		if (parametersAttribute != null) {
+			int parameterCount = parametersAttribute.getMethodParameterLength();
+			for (int i = 0; i < paramCount; i++) {
+				if (i < parameterCount && parametersAttribute.getParameterName(i) != null) {
+					parameterNames[i] = parametersAttribute.getParameterName(i);
+				} else {
 					parameterNames[i] = CharOperation.concat(Messages.disassembler_parametername.toCharArray(), Integer.toString(i).toCharArray());
 				}
 			}
+		} else if (codeAttribute != null) {
+				ILocalVariableAttribute localVariableAttribute = codeAttribute.getLocalVariableAttribute();
+				if (localVariableAttribute != null) {
+					ILocalVariableTableEntry[] entries = localVariableAttribute.getLocalVariableTable();
+					final int startingIndex = (accessFlags & IModifierConstants.ACC_STATIC) != 0 ? 0 : 1;
+					for (int i = 0; i < paramCount; i++) {
+						ILocalVariableTableEntry searchedEntry = getEntryFor(getLocalIndex(startingIndex, i, methodDescriptor), entries);
+						if (searchedEntry != null) {
+							parameterNames[i] = searchedEntry.getName();
+						} else {
+							parameterNames[i] = CharOperation.concat(Messages.disassembler_parametername.toCharArray(), Integer.toString(i).toCharArray());
+						}
+					}
+				} else {
+					for (int i = 0; i < paramCount; i++) {
+						parameterNames[i] = CharOperation.concat(Messages.disassembler_parametername.toCharArray(), Integer.toString(i).toCharArray());
+					}
+				}
 		} else {
 			for (int i = 0; i < paramCount; i++) {
 				parameterNames[i] = CharOperation.concat(Messages.disassembler_parametername.toCharArray(), Integer.toString(i).toCharArray());
@@ -2267,4 +2566,38 @@
 		buffer.append(lineSeparator);
 		dumpTab(tabNumber, buffer);
 	}
+	
+	private String toTypePathString(int[][] typepath) {
+		StringBuffer buffer = new StringBuffer();
+		buffer.append('[');
+		for (int i = 0, max = typepath.length; i < max; i++) {
+			int[] typepathElement = typepath[i];
+			if (i > 0) {
+				buffer.append(',').append(' ');
+			}
+			switch (typepathElement[0]) {
+				case IExtendedAnnotationConstants.TYPE_PATH_DEEPER_IN_ARRAY:
+					buffer.append(Messages.disassembler_extendedannotation_typepath_array);
+					break;
+				case IExtendedAnnotationConstants.TYPE_PATH_DEEPER_IN_INNER_TYPE:
+					buffer.append(Messages.disassembler_extendedannotation_typepath_innertype);
+					break;
+				case IExtendedAnnotationConstants.TYPE_PATH_ANNOTATION_ON_WILDCARD_BOUND:
+					buffer.append(Messages.disassembler_extendedannotation_typepath_wildcard);
+					break;
+				case IExtendedAnnotationConstants.TYPE_PATH_TYPE_ARGUMENT_INDEX:
+					buffer.append(
+							Messages.bind(Messages.disassembler_extendedannotation_typepath_typeargument,
+								new String[] {
+									Integer.toString(typepathElement[1])
+								}));
+					break;
+				default:
+					throw new IllegalStateException("Unrecognized type_path_kind: "+typepathElement[0]); //$NON-NLS-1$
+			}
+		}
+		buffer.append(']');
+		return String.valueOf(buffer);	
+	}
+
 }
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ExtendedAnnotation.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ExtendedAnnotation.java
new file mode 100644
index 0000000..85e80f0
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/ExtendedAnnotation.java
@@ -0,0 +1,302 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *                          Bug 409236 - [1.8][compiler] Type annotations on intersection cast types dropped by code generator
+ *                          Bug 409250 - [1.8][compiler] Various loose ends in 308 code generation
+ *******************************************************************************/
+package org.eclipse.jdt.internal.core.util;
+
+import org.eclipse.jdt.core.util.ClassFormatException;
+import org.eclipse.jdt.core.util.IAnnotationComponent;
+import org.eclipse.jdt.core.util.IConstantPool;
+import org.eclipse.jdt.core.util.IConstantPoolConstant;
+import org.eclipse.jdt.core.util.IConstantPoolEntry;
+import org.eclipse.jdt.core.util.IExtendedAnnotation;
+import org.eclipse.jdt.core.util.IExtendedAnnotationConstants;
+import org.eclipse.jdt.core.util.ILocalVariableReferenceInfo;
+
+/* http://types.cs.washington.edu/jsr308/specification/java-annotation-design.pdf
+ type_annotation {
+   // New fields in JSR 308:
+   u1 target_type; // the type of the targeted program element, see Section 3.2
+   union {
+     type_parameter_target;
+     supertype_target;
+     type_parameter_bound_target;
+     empty_target;
+     method_formal_parameter_target;
+     throws_target;
+     localvar_target;
+     catch_target;
+     offset_target;
+     type_argument_target;
+     method_reference_target;
+   } target_info; // identifies the targeted program element, see Section 3.3
+   type_path target_path; // identifies targeted type in a compound type (array, generic, etc.), see Section 3.4
+   // Original fields from "annotation" structure:
+   u2 type_index;
+   u2 num_element_value_pairs;
+   {
+     u2 element_name_index;
+     element_value value;
+   } element_value_pairs[num_element_value_pairs];
+*/
+/**
+ * @since 3.9 BETA_JAVA8
+ */
+public class ExtendedAnnotation extends ClassFileStruct implements IExtendedAnnotation {
+
+	private static final IAnnotationComponent[] NO_ENTRIES = new IAnnotationComponent[0];
+	private final static int[][] NO_TYPEPATH = new int[0][0];
+	private final static ILocalVariableReferenceInfo[] NO_LOCAL_VARIABLE_TABLE_ENTRIES = new ILocalVariableReferenceInfo[0];
+
+	private int targetType;
+	private int annotationTypeIndex;
+	private int[][] typePath;
+
+	private int typeIndex;
+	private char[] typeName;
+	private int componentsNumber;
+	private IAnnotationComponent[] components;
+	private int readOffset;
+	private int offset;
+	private int typeParameterIndex;
+	private int typeParameterBoundIndex;
+	private int parameterIndex;
+	private int exceptionTableIndex;
+	private ILocalVariableReferenceInfo[] localVariableTable = NO_LOCAL_VARIABLE_TABLE_ENTRIES;
+	
+	/**
+	 * Constructor for ExtendedAnnotation, builds an annotation from the supplied bytestream.
+	 *
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public ExtendedAnnotation(
+			byte[] classFileBytes,
+			IConstantPool constantPool,
+			int offset) throws ClassFormatException {
+
+		// Read target_type
+		int index = u1At(classFileBytes,0,offset);
+		this.targetType = index;
+		this.readOffset = 1;
+		
+		readTargetInfo(index, classFileBytes, constantPool, offset);
+
+		// Read type_path
+		index = u1At(classFileBytes, this.readOffset, offset);
+		this.readOffset++;
+		int typePathEntryCount = index;
+		if (typePathEntryCount == 0) {
+			this.typePath = NO_TYPEPATH;
+		} else {
+			this.typePath = new int[typePathEntryCount][];
+			for (int i = 0; i < typePathEntryCount; i++) {
+				int[] typePathEntry = (this.typePath[i] = new int[2]);
+				typePathEntry[0] = u1At(classFileBytes, this.readOffset++, offset);
+				typePathEntry[1] = u1At(classFileBytes, this.readOffset++, offset);
+			}
+		}
+		
+		// Read annotation
+		index = u2At(classFileBytes, this.readOffset, offset);
+		this.typeIndex = index;
+		this.readOffset+=2;
+		if (index != 0) {
+			IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(index);
+			if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
+				throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+			}
+			this.typeName = constantPoolEntry.getUtf8Value();
+		} else {
+			throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+		}
+		final int length = u2At(classFileBytes, this.readOffset, offset);
+		this.componentsNumber = length;
+		this.readOffset+=2;
+		if (length != 0) {
+			this.components = new IAnnotationComponent[length];
+			for (int i = 0; i < length; i++) {
+				AnnotationComponent component = new AnnotationComponent(classFileBytes, constantPool, offset + this.readOffset);
+				this.components[i] = component;
+				this.readOffset += component.sizeInBytes();
+			}
+		} else {
+			this.components = NO_ENTRIES;
+		}
+		if (this.annotationTypeIndex == 0xFFFF) {
+			this.annotationTypeIndex = -1;
+		}
+	}
+	
+	private void readTargetInfo(
+			int localTargetType,
+			byte[] classFileBytes,
+			IConstantPool constantPool,
+			int localOffset) throws ClassFormatException {
+		switch(localTargetType) {
+			case IExtendedAnnotationConstants.CLASS_TYPE_PARAMETER :
+			case IExtendedAnnotationConstants.METHOD_TYPE_PARAMETER :
+				this.typeParameterIndex = u1At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset++;
+				break;
+
+			case IExtendedAnnotationConstants.CLASS_EXTENDS :
+				this.annotationTypeIndex = u2At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset+=2;
+				break;
+
+			case IExtendedAnnotationConstants.CLASS_TYPE_PARAMETER_BOUND :
+			case IExtendedAnnotationConstants.METHOD_TYPE_PARAMETER_BOUND :
+				this.typeParameterIndex = u1At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset++;
+				this.typeParameterBoundIndex = u1At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset++;
+				break;
+				
+			case IExtendedAnnotationConstants.FIELD :
+			case IExtendedAnnotationConstants.METHOD_RETURN :
+			case IExtendedAnnotationConstants.METHOD_RECEIVER :
+				// nothing to do, target_info is empty_target
+				break;
+				
+			case IExtendedAnnotationConstants.METHOD_FORMAL_PARAMETER :
+				this.parameterIndex = u1At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset++;
+				break;
+				
+			case IExtendedAnnotationConstants.THROWS :
+				this.annotationTypeIndex = u2At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset+=2;
+				break;
+
+				
+			case IExtendedAnnotationConstants.LOCAL_VARIABLE :
+			case IExtendedAnnotationConstants.RESOURCE_VARIABLE :
+				int tableLength = u2At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset += 2;
+				this.localVariableTable = new LocalVariableReferenceInfo[tableLength];
+				for (int i = 0; i < tableLength; i++) {
+					this.localVariableTable[i] = new LocalVariableReferenceInfo(classFileBytes, constantPool, this.readOffset + localOffset);
+					this.readOffset += 6;
+				}
+				break;
+
+			case IExtendedAnnotationConstants.EXCEPTION_PARAMETER :
+				this.exceptionTableIndex = u2At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset += 2;
+				break;
+
+			case IExtendedAnnotationConstants.NEW :
+			case IExtendedAnnotationConstants.INSTANCEOF :
+			case IExtendedAnnotationConstants.METHOD_REFERENCE :
+			case IExtendedAnnotationConstants.CONSTRUCTOR_REFERENCE :
+				this.offset = u2At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset += 2;
+				break;	
+
+			case IExtendedAnnotationConstants.CAST :
+				this.offset = u2At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset += 2; 
+				// read type_argument_index
+				this.annotationTypeIndex = u1At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset++;
+				break;
+
+			case IExtendedAnnotationConstants.CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT :
+			case IExtendedAnnotationConstants.METHOD_INVOCATION_TYPE_ARGUMENT :
+			case IExtendedAnnotationConstants.CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT :
+			case IExtendedAnnotationConstants.METHOD_REFERENCE_TYPE_ARGUMENT :
+				this.offset = u2At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset += 2;
+				// read type_argument_index
+				this.annotationTypeIndex = u1At(classFileBytes, this.readOffset, localOffset);
+				this.readOffset++;
+				break;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getTypeIndex()
+	 */
+	public int getTypeIndex() {
+		return this.typeIndex;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getComponentsNumber()
+	 */
+	public int getComponentsNumber() {
+		return this.componentsNumber;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getComponents()
+	 */
+	public IAnnotationComponent[] getComponents() {
+		return this.components;
+	}
+
+	int sizeInBytes() {
+		return this.readOffset;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IAnnotation#getTypeName()
+	 */
+	public char[] getTypeName() {
+		return this.typeName;
+	}
+
+	public int getTargetType() {
+		return this.targetType;
+	}
+	
+	public int getExceptionTableIndex() {
+		return this.exceptionTableIndex;
+	}
+
+	public int getOffset() {
+		return this.offset;
+	}
+
+	public int getLocalVariableRefenceInfoLength() {
+		return this.localVariableTable.length;
+	}
+
+	public ILocalVariableReferenceInfo[] getLocalVariableTable() {
+		return this.localVariableTable;
+	}
+
+	public int getParameterIndex() {
+		return this.parameterIndex;
+	}
+
+	public int getTypeParameterIndex() {
+		return this.typeParameterIndex;
+	}
+
+	public int getTypeParameterBoundIndex() {
+		return this.typeParameterBoundIndex;
+	}
+
+	public int[][] getTypePath() {
+		return this.typePath;
+	}
+
+	public int getAnnotationTypeIndex() {
+		return this.annotationTypeIndex;
+	}
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/FieldInfo.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/FieldInfo.java
index e02f8c7..455b42e 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/FieldInfo.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/FieldInfo.java
@@ -1,12 +1,18 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.util;
 
@@ -90,6 +96,10 @@
 				this.attributes[attributesIndex++] = new RuntimeVisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
 			} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_INVISIBLE_ANNOTATIONS)) {
 				this.attributes[attributesIndex++] = new RuntimeInvisibleAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeVisibleTypeAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeInvisibleTypeAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
 			} else {
 				this.attributes[attributesIndex++] = new ClassFileAttribute(classFileBytes, constantPool, offset + readOffset);
 			}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/LocalVariableReferenceInfo.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/LocalVariableReferenceInfo.java
new file mode 100644
index 0000000..b56fcc9
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/LocalVariableReferenceInfo.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.core.util;
+
+import org.eclipse.jdt.core.util.ClassFormatException;
+import org.eclipse.jdt.core.util.IConstantPool;
+import org.eclipse.jdt.core.util.ILocalVariableReferenceInfo;
+
+
+public class LocalVariableReferenceInfo extends ClassFileStruct implements ILocalVariableReferenceInfo {
+
+	private int startPC;
+	private int length;
+	private int index;
+
+	/**
+	 * Constructor for LocalVariableTableEntry.
+	 *
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public LocalVariableReferenceInfo(
+			byte[] classFileBytes,
+			IConstantPool constantPool,
+			int offset) throws ClassFormatException {
+		this.startPC = u2At(classFileBytes, 0, offset);
+		this.length = u2At(classFileBytes, 2, offset);
+		this.index = u2At(classFileBytes, 4, offset);
+	}
+
+	/**
+	 * @see ILocalVariableReferenceInfo#getStartPC()
+	 */
+	public int getStartPC() {
+		return this.startPC;
+	}
+
+	/**
+	 * @see ILocalVariableReferenceInfo#getLength()
+	 */
+	public int getLength() {
+		return this.length;
+	}
+
+	/**
+	 * @see ILocalVariableReferenceInfo#getIndex()
+	 */
+	public int getIndex() {
+		return this.index;
+	}
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java
index ff1cf83..4207cbc 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/Messages.java
@@ -1,12 +1,20 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
  *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *     Jesper Steen Moeller - Contribution for
+ *                          Bug 406973 - [compiler] Parse MethodParameters attribute
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.util;
 
@@ -249,6 +257,7 @@
 	public static String disassembler_enclosingmethodheader;
 	public static String disassembler_exceptiontableheader;
 	public static String disassembler_linenumberattributeheader;
+	public static String disassembler_methodparametersheader;
 	public static String disassembler_localvariabletableattributeheader;
 	public static String disassembler_localvariabletypetableattributeheader;
 	public static String disassembler_arraydimensions;
@@ -294,6 +303,29 @@
 	public static String disassembler_annotationentrystart;
 	public static String disassembler_annotationentryend;
 	public static String disassembler_annotationcomponent;
+	// jsr308
+	public static String disassembler_extendedannotationentrystart;
+	public static String disassembler_extendedannotationentryend;
+	public static String disassembler_runtimevisibletypeannotationsattributeheader;
+	public static String disassembler_runtimeinvisibletypeannotationsattributeheader;
+	public static String disassembler_extendedannotation_classextendsimplements;
+	public static String disassembler_extendedannotation_typepath;
+	public static String disassembler_extendedannotation_method_parameter;
+	public static String disassembler_extendedannotation_offset;
+	public static String disassembler_extendedannotation_throws;
+	public static String disassembler_extendedannotation_type_argument;
+	public static String disassembler_extendedannotation_type_parameter;
+	public static String disassembler_extendedannotation_type_parameter_with_bound;
+	public static String disassembler_extendedannotation_wildcardlocationtype;
+	public static String disassembler_extendedannotation_targetType;
+	public static String disassembler_extendedannotation_wildcardlocations;
+	public static String disassembler_extendedannotation_exception_table_index;
+	public static String disassembler_extendedannotation_typepath_array;
+	public static String disassembler_extendedannotation_typepath_wildcard;
+	public static String disassembler_extendedannotation_typepath_typeargument;
+	public static String disassembler_extendedannotation_typepath_innertype;
+	public static String disassembler_localvariabletargetheader;
+
 	public static String disassembler_runtimevisibleannotationsattributeheader;
 	public static String disassembler_runtimeinvisibleannotationsattributeheader;
 	public static String disassembler_runtimevisibleparameterannotationsattributeheader;
@@ -308,6 +340,9 @@
 	public static String classfileformat_superflagisnotset;
 	public static String classfileformat_superflagisset;
 	public static String classfileformat_clinitname;
+	// jsr308
+	public static String classfileformat_localvariablereferenceinfoentry;
+
 	public static String classformat_classformatexception;
 	public static String classformat_anewarray;
 	public static String classformat_checkcast;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/MethodInfo.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/MethodInfo.java
index cfa2c3d..b4cb6e4 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/MethodInfo.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/MethodInfo.java
@@ -1,15 +1,22 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
- * $Id: MethodInfo.java 23401 2010-02-02 23:56:05Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
  *     Technical University Berlin - extended API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *        Jesper Steen Moeller - Contribution for
+ *                          Bug 406973 - [compiler] Parse MethodParameters attribute
  *******************************************************************************/
 package org.eclipse.jdt.internal.core.util;
 
@@ -118,6 +125,12 @@
 				this.attributes[attributesIndex++] = new RuntimeInvisibleParameterAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
 			} else if (equals(attributeName, IAttributeNamesConstants.ANNOTATION_DEFAULT)) {
 				this.attributes[attributesIndex++] = new AnnotationDefaultAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_VISIBLE_TYPE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeVisibleTypeAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (equals(attributeName, IAttributeNamesConstants.RUNTIME_INVISIBLE_TYPE_ANNOTATIONS)) {
+				this.attributes[attributesIndex++] = new RuntimeInvisibleTypeAnnotationsAttribute(classFileBytes, constantPool, offset + readOffset);
+			} else if (equals(attributeName, IAttributeNamesConstants.METHOD_PARAMETERS)) {
+				this.attributes[attributesIndex++] = new MethodParametersAttribute(classFileBytes, constantPool, offset + readOffset);
 			} else {
 //{ObjectTeams: OT-specific bytecode attribute
 				if (equals(attributeName, IOTConstants.ROLECLASS_METHOD_MODIFIERS_NAME))
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/MethodParametersAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/MethodParametersAttribute.java
new file mode 100644
index 0000000..10ce77b
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/MethodParametersAttribute.java
@@ -0,0 +1,87 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Jesper Steen Moeller 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     Jesper Steen Moeller - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.jdt.internal.core.util;
+
+import org.eclipse.jdt.core.util.ClassFormatException;
+import org.eclipse.jdt.core.util.IConstantPool;
+import org.eclipse.jdt.core.util.IConstantPoolConstant;
+import org.eclipse.jdt.core.util.IConstantPoolEntry;
+import org.eclipse.jdt.core.util.IMethodParametersAttribute;
+
+/**
+ * @since 3.9 BETA_JAVA8
+ */
+public class MethodParametersAttribute extends ClassFileAttribute implements IMethodParametersAttribute {
+
+	private static final char[][] NO_NAMES = new char[0][];
+	private static final short[] NO_ACCES_FLAGS = new short[0];
+	
+	private final int numberOfEntries;
+	private final char[][] names;
+	private final short[] accessFlags;
+	
+
+	MethodParametersAttribute(byte[] classFileBytes, IConstantPool constantPool, int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		
+		final int length = u1At(classFileBytes, 6, offset);
+		this.numberOfEntries = length;
+		if (length != 0) {
+			int readOffset = offset + 7;
+			this.names = new char[length][];
+			this.accessFlags = new short[length];
+			for (int i = 0; i < length; i++) {
+				int nameIndex = u2At(classFileBytes, 0, readOffset);
+				int mask = u2At(classFileBytes, 2, readOffset);
+				readOffset += 4;
+				if (nameIndex != 0) {
+					IConstantPoolEntry constantPoolEntry = constantPool.decodeEntry(nameIndex);
+					if (constantPoolEntry.getKind() != IConstantPoolConstant.CONSTANT_Utf8) {
+						throw new ClassFormatException(ClassFormatException.INVALID_CONSTANT_POOL_ENTRY);
+					}
+					this.names[i] = constantPoolEntry.getUtf8Value();
+				} else {
+					this.names[i] = null;
+				}
+				this.accessFlags[i] = (short) (mask & 0xFFFF);
+			}
+		} else {
+			this.names = NO_NAMES;
+			this.accessFlags = NO_ACCES_FLAGS;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IMethodParametersAttribute#getMethodParameterLength()
+	 */
+	public int getMethodParameterLength() {
+		return this.numberOfEntries;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IMethodParametersAttribute#getParameterName(int)
+	 */
+	public char[] getParameterName(int i) {
+		return this.names[i];
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IMethodParametersAttribute#getAccessFlags(int)
+	 */
+	public short getAccessFlags(int i) {
+		return this.accessFlags[i];
+	}
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
index d1c122f..fc776e2 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/PublicScanner.java
@@ -1,9 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
+ * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -1371,6 +1375,9 @@
 							return TokenNameMINUS_MINUS;
 						if (test > 0)
 							return TokenNameMINUS_EQUAL;
+// FIXME:
+						if (getNextChar('>'))
+							return TokenNameARROW;				
 //{ObjectTeams: check for callout binding after '-' tokens
 						else {
 							if (test < 0 && this._isOTSource)
@@ -1481,6 +1488,8 @@
 				case '?' :
 					return TokenNameQUESTION;
 				case ':' :
+					if (getNextChar(':'))
+						return TokenNameCOLON_COLON;
 					return TokenNameCOLON;
 				case '\'' :
 					{
@@ -4405,6 +4414,8 @@
 			return "+="; //$NON-NLS-1$
 		case TokenNameMINUS_EQUAL :
 			return "-="; //$NON-NLS-1$
+		case TokenNameARROW :
+			return "->"; //$NON-NLS-1$
 		case TokenNameMULTIPLY_EQUAL :
 			return "*="; //$NON-NLS-1$
 		case TokenNameDIVIDE_EQUAL :
@@ -4469,6 +4480,8 @@
 			return "?"; //$NON-NLS-1$
 		case TokenNameCOLON :
 			return ":"; //$NON-NLS-1$
+		case TokenNameCOLON_COLON :
+			return "::"; //$NON-NLS-1$
 		case TokenNameCOMMA :
 			return ","; //$NON-NLS-1$
 		case TokenNameDOT :
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeInvisibleTypeAnnotationsAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeInvisibleTypeAnnotationsAttribute.java
new file mode 100644
index 0000000..cb65eab
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeInvisibleTypeAnnotationsAttribute.java
@@ -0,0 +1,76 @@
+/*******************************************************************************
+ * Copyright (c) 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.core.util;
+
+import org.eclipse.jdt.core.util.ClassFormatException;
+import org.eclipse.jdt.core.util.IConstantPool;
+import org.eclipse.jdt.core.util.IExtendedAnnotation;
+import org.eclipse.jdt.core.util.IRuntimeInvisibleTypeAnnotationsAttribute;
+
+/**
+ * Default implementation of IRuntimeInvisibleTypeAnnotations
+ */
+public class RuntimeInvisibleTypeAnnotationsAttribute
+	extends ClassFileAttribute
+	implements IRuntimeInvisibleTypeAnnotationsAttribute {
+
+	private static final IExtendedAnnotation[] NO_ENTRIES = new IExtendedAnnotation[0];
+	private int extendedAnnotationsNumber;
+	private IExtendedAnnotation[] extendedAnnotations;
+
+	/**
+	 * Constructor for RuntimeInvisibleTypeAnnotations.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public RuntimeInvisibleTypeAnnotationsAttribute(
+			byte[] classFileBytes,
+			IConstantPool constantPool,
+			int offset)
+			throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		// read extended annotations
+		final int length = u2At(classFileBytes, 6, offset);
+		this.extendedAnnotationsNumber = length;
+		if (length != 0) {
+			int readOffset = 8;
+			this.extendedAnnotations = new IExtendedAnnotation[length];
+			for (int i = 0; i < length; i++) {
+				ExtendedAnnotation extendedAnnotation = new ExtendedAnnotation(classFileBytes, constantPool, offset + readOffset);
+				this.extendedAnnotations[i] = extendedAnnotation;
+				readOffset += extendedAnnotation.sizeInBytes();
+			}
+		} else {
+			this.extendedAnnotations = NO_ENTRIES;
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleTypeAnnotationsAttribute.getExtendedAnnotations()
+	 */
+	public IExtendedAnnotation[] getExtendedAnnotations() {
+		return this.extendedAnnotations;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeInvisibleTypeAnnotationsAttribute.getExtendedAnnotationsNumber()
+	 */
+	public int getExtendedAnnotationsNumber() {
+		return this.extendedAnnotationsNumber;
+	}
+}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeVisibleTypeAnnotationsAttribute.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeVisibleTypeAnnotationsAttribute.java
new file mode 100644
index 0000000..348e459
--- /dev/null
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/RuntimeVisibleTypeAnnotationsAttribute.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *        Andy Clement - Contributions for
+ *                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+ *******************************************************************************/
+package org.eclipse.jdt.internal.core.util;
+
+import org.eclipse.jdt.core.util.ClassFormatException;
+import org.eclipse.jdt.core.util.IConstantPool;
+import org.eclipse.jdt.core.util.IExtendedAnnotation;
+import org.eclipse.jdt.core.util.IRuntimeVisibleTypeAnnotationsAttribute;
+
+/**
+ * Default implementation of IRuntimeVisibleTypeAnnotations
+ */
+public class RuntimeVisibleTypeAnnotationsAttribute
+	extends ClassFileAttribute
+	implements IRuntimeVisibleTypeAnnotationsAttribute {
+
+	private static final IExtendedAnnotation[] NO_ENTRIES = new IExtendedAnnotation[0];
+	private int extendedAnnotationsNumber;
+	private IExtendedAnnotation[] extendedAnnotations;
+
+	/**
+	 * Constructor for RuntimeVisibleTypeAnnotations.
+	 * @param classFileBytes
+	 * @param constantPool
+	 * @param offset
+	 * @throws ClassFormatException
+	 */
+	public RuntimeVisibleTypeAnnotationsAttribute(
+			byte[] classFileBytes,
+			IConstantPool constantPool,
+			int offset) throws ClassFormatException {
+		super(classFileBytes, constantPool, offset);
+		final int length = u2At(classFileBytes, 6, offset);
+		this.extendedAnnotationsNumber = length;
+		if (length != 0) {
+			int readOffset = 8;
+			this.extendedAnnotations = new IExtendedAnnotation[length];
+			for (int i = 0; i < length; i++) {
+				ExtendedAnnotation extendedAnnotation = new ExtendedAnnotation(classFileBytes, constantPool, offset + readOffset);
+				this.extendedAnnotations[i] = extendedAnnotation;
+				readOffset += extendedAnnotation.sizeInBytes();
+			}
+		} else {
+			this.extendedAnnotations = NO_ENTRIES;
+		}
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleTypeAnnotationsAttribute.getExtendedAnnotations()
+	 */
+	public IExtendedAnnotation[] getExtendedAnnotations() {
+		return this.extendedAnnotations;
+	}
+	/* (non-Javadoc)
+	 * @see org.eclipse.jdt.core.util.IRuntimeVisibleTypeAnnotationsAttribute.getExtendedAnnotationsNumber()
+	 */
+	public int getExtendedAnnotationsNumber() {
+		return this.extendedAnnotationsNumber;
+	}
+}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties
index 5af88db..7715a7e 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/util/messages.properties
@@ -1,12 +1,20 @@
 ###############################################################################
-# Copyright (c) 2000, 2011 IBM Corporation and others.
+# Copyright (c) 2000, 2013 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
 #
+# This is an implementation of an early-draft specification developed under the Java
+# Community Process (JCP) and is made available for testing and evaluation purposes
+# only. The code is not compatible with any specification of the JCP.
+#
 # Contributors:
 #     IBM Corporation - initial API and implementation
+#        Andy Clement (GoPivotal, Inc) aclement@gopivotal.com - Contributions for
+#                          Bug 383624 - [1.8][compiler] Revive code generation support for type annotations (from Olivier's work)
+#        Jesper Steen Moeller - Contribution for
+#                          Bug 406973 - [compiler] Parse MethodParameters attribute
 ###############################################################################
 
 ### JavaModel messages.
@@ -273,6 +281,7 @@
 disassembler_enclosingmethodheader = Enclosing Method:
 disassembler_exceptiontableheader = Exception Table:
 disassembler_linenumberattributeheader = Line numbers:
+disassembler_methodparametersheader = Method Parameters:
 disassembler_localvariabletableattributeheader = Local variable table:
 disassembler_localvariabletypetableattributeheader = Local variable type table:
 disassembler_arraydimensions = []
@@ -319,9 +328,15 @@
 disassembler_annotationarrayvalueend = ]
 disassembler_annotationentrystart = #{0} @{1}(
 disassembler_annotationentryend = )
+# jsr308 (next two)
+disassembler_extendedannotationentrystart=#{0} @{1}(
+disassembler_extendedannotationentryend= )
 disassembler_annotationcomponent = #{0} {1}=
 disassembler_runtimevisibleannotationsattributeheader= RuntimeVisibleAnnotations:\ 
 disassembler_runtimeinvisibleannotationsattributeheader= RuntimeInvisibleAnnotations:\ 
+# jsr308 (next two)
+disassembler_runtimevisibletypeannotationsattributeheader= RuntimeVisibleTypeAnnotations:\ 
+disassembler_runtimeinvisibletypeannotationsattributeheader= RuntimeInvisibleTypeAnnotations:\ 
 disassembler_runtimevisibleparameterannotationsattributeheader= RuntimeVisibleParameterAnnotations:\ 
 disassembler_runtimeinvisibleparameterannotationsattributeheader= RuntimeInvisibleParameterAnnotations:\ 
 disassembler_parameterannotationentrystart=Number of annotations for parameter {0}: {1}
@@ -347,6 +362,25 @@
 disassembler_frame_full_frame=[pc: {0}, full, stack: {4}, locals: {2}]
 disassembler_frame_same_frame=[pc: {0}, same]
 disassembler_frame_same_locals_1_stack_item=[pc: {0}, same_locals_1_stack_item, stack: {1}]
+# jsr308
+disassembler_extendedannotation_targetType=target type = 0x{0} {1}
+disassembler_extendedannotation_classextendsimplements=type index = {0}
+disassembler_extendedannotation_typepath=location = {0}
+disassembler_extendedannotation_method_parameter=method parameter index = {0}
+disassembler_extendedannotation_offset=offset = {0}
+disassembler_extendedannotation_throws=throws index = {0}
+disassembler_extendedannotation_type_argument=type argument index = {0}
+disassembler_extendedannotation_type_parameter=type parameter index = {0}
+disassembler_extendedannotation_type_parameter_with_bound=type parameter index = {0} type parameter bound index = {1}
+disassembler_extendedannotation_wildcardlocationtype=wildcard location type = 0x{0} {1}
+disassembler_extendedannotation_wildcardlocations=wildcard locations = {0}
+disassembler_extendedannotation_exception_table_index=exception table index = {0}
+disassembler_localvariabletargetheader=local variable entries:
+disassembler_extendedannotation_typepath_array=ARRAY
+disassembler_extendedannotation_typepath_innertype=INNER_TYPE
+disassembler_extendedannotation_typepath_wildcard=WILDCARD
+disassembler_extendedannotation_typepath_typeargument=TYPE_ARGUMENT({0})
+
 ### classfileformat decoding
 classfileformat_versiondetails =\ (version {0} : {1}.{2}, {3})
 classfileformat_methoddescriptor = // Method descriptor #{0} {1}
@@ -394,6 +428,8 @@
 classfileformat_exceptiontableentry = [pc: {0}, pc: {1}] -> {2} when : {3}
 classfileformat_linenumbertableentry = [pc: {0}, line: {1}]
 classfileformat_localvariabletableentry = [pc: {0}, pc: {1}] local: {2} index: {3} type: {4}
+# jsr 308
+classfileformat_localvariablereferenceinfoentry=[pc: {0}, pc: {1}] index: {2}
 
 ### Eclipse Java Core completion messages.
 engine_completing = Computing proposals...
diff --git a/org.eclipse.jdt.core/pom.xml b/org.eclipse.jdt.core/pom.xml
index 7cc5e51..305416e 100644
--- a/org.eclipse.jdt.core/pom.xml
+++ b/org.eclipse.jdt.core/pom.xml
@@ -14,11 +14,11 @@
   <parent>
     <artifactId>eclipse.jdt.core</artifactId>
     <groupId>eclipse.jdt.core</groupId>
-    <version>4.4.0-SNAPSHOT</version>
+    <version>4.3.0-SNAPSHOT</version>
   </parent>
   <groupId>org.eclipse.jdt</groupId>
   <artifactId>org.eclipse.jdt.core</artifactId>
-  <version>3.10.0-SNAPSHOT</version>
+  <version>3.9.1-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <properties>
diff --git a/org.eclipse.jdt.core/scripts/generateOTParser.sh b/org.eclipse.jdt.core/scripts/generateOTParser.sh
index 903923e..1d2add7 100755
--- a/org.eclipse.jdt.core/scripts/generateOTParser.sh
+++ b/org.eclipse.jdt.core/scripts/generateOTParser.sh
@@ -28,11 +28,6 @@
 JIKESPG_HOME=${JIKESPG_HOME:-/usr/bin}
 export JIKESPG_HOME
 
-# please adjust:
-JDTCORE_JAR=/home/local/eclipse-SDK-3.7/plugins/org.eclipse.jdt.core_3.7.0.v_B61.jar
-
-
-
 if test $# -ne 2
 then
 	echo "Achtung: JIKESPG_HOME muss KORREKT gesetzt sein!"
@@ -239,11 +234,9 @@
 			print nextline ;
 		}
 		print nextline ;
-
 		while((getline nextline) == 1 ){
 			nextline ="";
 		}
-
 	} else {
 		print $0
 	}
@@ -253,9 +246,11 @@
 echo "Alles unnötige wegschneiden: javasym.java"
 cat javasym.java  | awk '{
 	if($0 ~ /^[ \t]*public final static int[ \t]*$/ ){
-		while((getline nextline) == 1 ){
+		while((getline nextline) == 1 && nextline !~ /^\}$/){
 			print nextline ;
 		}
+		print "\n\n\t// This alias is statically inserted by generateOTParser.sh:"
+		print "\tint TokenNameBINDOUT = TokenNameARROW;\n}\n" ;
 	}
 }
 ' > javasym_tmp.java
@@ -268,19 +263,7 @@
 cd output
 
 cp  ../UpdateParserFiles.java .
-if [ -z ${JDTCORE_JAR} ]
-then
-  if test -f ${ECLIPSE_HOME}/plugins/org.eclipse.jdt.core_3.0.0/jdtcore.jar
-  then
-	JDTCORE_JAR=${ECLIPSE_HOME}/plugins/org.eclipse.jdt.core_3.0.0/jdtcore.jar
-  else
-    	echo "FEHLER: jdtcore.jar nicht gefunden!"
-	echo "Bitte Umgebungsvariable ECLIPSE_HOME setzen."
-    	exit
-  fi
-fi
-echo "Verwende JDT/Core aus ${pluginDir}/bin"
-#cp ${JDTCORE_JAR} .
+
 echo "UpdateParserFiles kompilieren"
 javac -classpath ${pluginDir}/bin UpdateParserFiles.java
 echo "Ressourcendateien erzeugen (*.rsc)"
diff --git a/org.eclipse.jdt.core/scripts/generateParser.launch b/org.eclipse.jdt.core/scripts/generateParser.launch
index 87661a7..d59f3c3 100644
--- a/org.eclipse.jdt.core/scripts/generateParser.launch
+++ b/org.eclipse.jdt.core/scripts/generateParser.launch
@@ -3,7 +3,7 @@
 <stringAttribute key="bad_container_name" value="/org.eclipse.jdt.core/scripts/generateParser.launch"/>
 <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;resources&gt;&#10;&lt;item path=&quot;/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/parser&quot; type=&quot;2&quot;/&gt;&#10;&lt;/resources&gt;}"/>
 <mapAttribute key="org.eclipse.debug.core.environmentVariables">
-<mapEntry key="JIKESPG_HOME" value="${user_homedir}/bin"/>
+<mapEntry key="JIKESPG_HOME" value="${system_property:user.home}/bin"/>
 </mapAttribute>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${project}"/>
 <stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/org.eclipse.jdt.core/scripts/generateOTParser.sh}"/>
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
index 2ea7af8..f3d5a58 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocator.java
@@ -4,7 +4,10 @@
  * 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
- * $Id: MatchLocator.java 23417 2010-02-03 20:13:55Z stephan $
+ *
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
@@ -2557,6 +2560,16 @@
 		}
 	}
 }
+private void reportMatching(Annotation[][] annotationsList, IJavaElement enclosingElement, Binding binding,
+		MatchingNodeSet nodeSet, boolean matchedClassContainer) throws CoreException {
+	if (annotationsList != null) {
+		for (int i = 0, length = annotationsList.length; i < length; ++i) {
+			Annotation[] annotations = annotationsList[i];
+			if (annotations != null) 
+				reportMatching(annotations, enclosingElement, null, binding, nodeSet, matchedClassContainer, encloses(enclosingElement));	
+		}
+	}
+}
 /**
  * Visit the given resolved parse tree and report the nodes that match the search pattern.
  */
@@ -2899,11 +2912,20 @@
 		TypeReference superClass = type.superclass;
 		if (superClass != null) {
 			reportMatchingSuper(superClass, enclosingElement, type.binding, nodeSet, matchedClassContainer);
+			for (int i = 0, length = superClass.annotations == null ? 0 : superClass.annotations.length; i < length; i++) {
+				reportMatching(superClass.annotations[i], enclosingElement, null, type.binding, nodeSet, matchedClassContainer, enclosesElement);	
+			}
 		}
 		TypeReference[] superInterfaces = type.superInterfaces;
 		if (superInterfaces != null) {
 			for (int i = 0, l = superInterfaces.length; i < l; i++) {
 				reportMatchingSuper(superInterfaces[i], enclosingElement, type.binding, nodeSet, matchedClassContainer);
+				TypeReference typeReference  = type.superInterfaces[i];
+				if (typeReference != null &&  typeReference.annotations != null) {
+					for (int j = 0, length = typeReference.annotations.length; j < length; j++) {
+						reportMatching(typeReference.annotations[j], enclosingElement, null, type.binding, nodeSet, matchedClassContainer, enclosesElement);	
+					}
+				}			
 			}
 		}
 	}
@@ -3253,7 +3275,12 @@
 					report(match);
 				}
 			}
+			boolean matchedClassContainer = (this.matchContainer & PatternLocator.ALL_CONTAINER) != 0;
+			if (typeParameter.annotations != null) {
+				reportMatching(typeParameter.annotations, enclosingElement, null, typeParameter.binding, nodeSet, matchedClassContainer, encloses(enclosingElement));	
+			}
 			if (typeParameter.type != null) {
+				reportMatching(typeParameter.type.annotations, enclosingElement, typeParameter.binding, nodeSet, matchedClassContainer);
 				level = (Integer) nodeSet.matchingNodes.removeKey(typeParameter.type);
 				if (level != null) {
 					IJavaElement localElement = createHandle(typeParameter, enclosingElement);
@@ -3265,6 +3292,7 @@
                     	int length = paramSTR.typeArguments.length;
                     	for (int k=0; k<length; k++) {
 							TypeReference typeArgument = paramSTR.typeArguments[k];
+							reportMatching(typeArgument.annotations, enclosingElement, typeArgument.resolvedType, nodeSet, matchedClassContainer);
 							level = (Integer) nodeSet.matchingNodes.removeKey(typeArgument);
 							if (level != null) {
 								IJavaElement localElement = createHandle(typeParameter, enclosingElement);
@@ -3273,6 +3301,7 @@
 							if (typeArgument instanceof Wildcard) {
 	                            TypeReference wildcardBound = ((Wildcard) typeArgument).bound;
 	                            if (wildcardBound != null) {
+		            				reportMatching(wildcardBound.annotations, enclosingElement, wildcardBound.resolvedType, nodeSet, matchedClassContainer);
 									level = (Integer) nodeSet.matchingNodes.removeKey(wildcardBound);
 									if (level != null) {
 										IJavaElement localElement = createHandle(typeParameter, enclosingElement);
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
index a18ac2f..3ceb395 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchLocatorParser.java
@@ -1,10 +1,14 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
  * 
+ * This is an implementation of an early-draft specification developed under the Java
+ * Community Process (JCP) and is made available for testing and evaluation purposes
+ * only. The code is not compatible with any specification of the JCP.
+ * 
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Fraunhofer FIRST - extended API and implementation
@@ -266,6 +270,13 @@
 		this.patternLocator.match(castExpression.type, this.nodeSet);
 	}
 }
+protected void consumeCastExpressionLL1WithBounds() {
+	super.consumeCastExpressionLL1WithBounds();
+	if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) {
+		CastExpression castExpression = (CastExpression) this.expressionStack[this.expressionPtr];
+		this.patternLocator.match(castExpression.type, this.nodeSet);
+	}
+}
 protected void consumeCastExpressionWithGenericsArray() {
 	super.consumeCastExpressionWithGenericsArray();
 	if ((this.patternFineGrain & IJavaSearchConstants.CAST_TYPE_REFERENCE) != 0) {
@@ -413,13 +424,24 @@
 	this.patternLocator.match((LocalDeclaration) this.astStack[this.astPtr], this.nodeSet);
 }
 
-protected void consumeMarkerAnnotation() {
-	super.consumeMarkerAnnotation();
+protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
+	super.consumeMarkerAnnotation(isTypeAnnotation);
 	if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE) != 0) {
-		Annotation annotation = (Annotation) this.expressionStack[this.expressionPtr];
+		Annotation annotation = (Annotation) (isTypeAnnotation ? this.typeAnnotationStack[this.typeAnnotationPtr] : this.expressionStack[this.expressionPtr]);
 		this.patternLocator.match(annotation, this.nodeSet);
 	}
 }
+//{ObjectTeams: new hook that also creates annotations:
+protected void convertTypeAnchor(int annotationKind) {
+	// consumeMarkerAnnotation, consumeSingleMemberAnnotation, consumeNormalAnnotation:
+	super.convertTypeAnchor(annotationKind);
+	final boolean isTypeAnnotation = true;
+	if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE) != 0) {
+		Annotation annotation = (Annotation) (isTypeAnnotation ? this.typeAnnotationStack[this.typeAnnotationPtr] : this.expressionStack[this.expressionPtr]);
+		this.patternLocator.match(annotation, this.nodeSet);
+	}
+}
+// SH}
 protected void consumeMemberValuePair() {
 	super.consumeMemberValuePair();
 	this.patternLocator.match((MemberValuePair) this.astStack[this.astPtr], this.nodeSet);
@@ -626,11 +648,11 @@
 	}
 }
 
-protected void consumeNormalAnnotation() {
-	super.consumeNormalAnnotation();
+protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
+	super.consumeNormalAnnotation(isTypeAnnotation);
 	if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE) != 0) {
 		// this is always an Annotation
-		Annotation annotation = (Annotation) this.expressionStack[this.expressionPtr];
+		Annotation annotation = (Annotation) (isTypeAnnotation ? this.typeAnnotationStack[this.typeAnnotationPtr] : this.expressionStack[this.expressionPtr]);
 		this.patternLocator.match(annotation, this.nodeSet);
 	}
 }
@@ -664,11 +686,11 @@
 	this.intPtr--;
 }
 
-protected void consumeSingleMemberAnnotation() {
-	super.consumeSingleMemberAnnotation();
+protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
+	super.consumeSingleMemberAnnotation(isTypeAnnotation);
 	if (this.patternFineGrain == 0 || (this.patternFineGrain & IJavaSearchConstants.ANNOTATION_TYPE_REFERENCE) != 0) {
 		// this is always an Annotation
-		Annotation annotation = (Annotation) this.expressionStack[this.expressionPtr];
+		Annotation annotation = (Annotation) (isTypeAnnotation ? this.typeAnnotationStack[this.typeAnnotationPtr] : this.expressionStack[this.expressionPtr]);
 		this.patternLocator.match(annotation, this.nodeSet);
 	}
 }
@@ -892,8 +914,8 @@
 	}
 }
 
-protected TypeReference copyDims(TypeReference typeRef, int dim) {
-	TypeReference result = super.copyDims(typeRef, dim);
+protected TypeReference augmentTypeWithAdditionalDimensions(TypeReference typeRef, int additionalDimensions, Annotation [][] additionalAnnotations, boolean isVarargs) {
+	TypeReference result = super.augmentTypeWithAdditionalDimensions(typeRef, additionalDimensions, additionalAnnotations, isVarargs);
 	 if (this.nodeSet.removePossibleMatch(typeRef) != null)
 		this.nodeSet.addPossibleMatch(result);
 	 else if (this.nodeSet.removeTrustedMatch(typeRef) != null)
@@ -907,7 +929,7 @@
 protected TypeReference getTypeReference(int dim, boolean liftingTypeAllowed) {
 /*orig:
 	TypeReference typeRef = super.getTypeReference(dim);
- :giro */
+*/
 	TypeReference typeRef = super.getTypeReference(dim, liftingTypeAllowed);
 // SH}
 	if (this.patternFineGrain == 0) {
@@ -915,8 +937,8 @@
 	}
 	return typeRef;
 }
-protected NameReference getUnspecifiedReference() {
-	NameReference nameRef = super.getUnspecifiedReference();
+protected NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
+	NameReference nameRef = super.getUnspecifiedReference(rejectTypeAnnotations);
 	if (this.patternFineGrain == 0) {
 		this.patternLocator.match(nameRef, this.nodeSet); // NB: Don't check container since unspecified reference can happen anywhere
 	} else if ((this.patternFineGrain & IJavaSearchConstants.QUALIFIED_REFERENCE) != 0) {
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchingNodeSet.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchingNodeSet.java
index cd419f8..0860597 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchingNodeSet.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MatchingNodeSet.java
@@ -89,7 +89,13 @@
 	// see http://bugs.eclipse.org/bugs/show_bug.cgi?id=29366)
 	long key = (((long) node.sourceStart) << 32) + node.sourceEnd;
 	ASTNode existing = (ASTNode) this.possibleMatchingNodesKeys.get(key);
+//{ObjectTeams: also expect a type reference to replace a name reference when a type anchor 
+// 				is converted to a type annotation (see Parser#convertTypeAnchor()):
+/* orig:
 	if (existing != null && existing.getClass().equals(node.getClass()))
+  :giro */
+	if (existing != null)
+// SH}
 		this.possibleMatchingNodesSet.remove(existing);
 
 	// add node to set
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java
index 6a10ced..d15bd7a 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/MethodLocator.java
@@ -149,7 +149,7 @@
 		TypeBinding[] parameters = method.parameters;
 		if (argumentTypes.length == parameters.length) {
 			for (int j=0,l=parameters.length; j<l; j++) {
-				if (parameters[j].erasure() != argumentTypes[j].erasure()) {
+				if (TypeBinding.notEquals(parameters[j].erasure(), argumentTypes[j].erasure())) {
 					continue methodsLoop;
 				}
 			}
@@ -1094,7 +1094,7 @@
 				if (argumentTypes.length == parameters.length) {
 					boolean found = true;
 					for (int k=0,l=parameters.length; k<l; k++) {
-						if (parameters[k].erasure() != argumentTypes[k].erasure()) {
+						if (TypeBinding.notEquals(parameters[k].erasure(), argumentTypes[k].erasure())) {
 							found = false;
 							break;
 						}
diff --git a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java
index 01e07b7..14cb7ae 100644
--- a/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java
+++ b/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/matching/PatternLocator.java
@@ -555,12 +555,12 @@
 			int length = argumentsBindings.length;
 			if (length == typeVariables.length) {
 				for (int i=0; i<length; i++) {
-				if (argumentsBindings[i] != typeVariables[i]) {
-					needUpdate = true;
-					break;
+					if (TypeBinding.notEquals(argumentsBindings[i], typeVariables[i])) {
+						needUpdate = true;
+						break;
+					}
 				}
 			}
-			}
 			if (needUpdate) {
 				char[][] patternArguments =  patternTypeArguments[depth];
 				updateMatch(argumentsBindings, locator, patternArguments, patternHasTypeParameters);	
@@ -686,7 +686,7 @@
 					if (argumentBinding.isWildcard()) { // argument is a wildcard
 						WildcardBinding wildcardBinding = (WildcardBinding) argumentBinding;
 						// It's ok if wildcards are identical
-						if (wildcardBinding.boundKind == patternWildcardKind && wildcardBinding.bound == patternBinding) {
+						if (wildcardBinding.boundKind == patternWildcardKind && TypeBinding.equalsEquals(wildcardBinding.bound, patternBinding)) {
 							continue;
 						}
 						// Look for wildcard compatibility
@@ -714,7 +714,7 @@
 					if (argumentBinding.isWildcard()) { // argument is a wildcard
 						WildcardBinding wildcardBinding = (WildcardBinding) argumentBinding;
 						// It's ok if wildcards are identical
-						if (wildcardBinding.boundKind == patternWildcardKind && wildcardBinding.bound == patternBinding) {
+						if (wildcardBinding.boundKind == patternWildcardKind && TypeBinding.equalsEquals(wildcardBinding.bound, patternBinding)) {
 							continue;
 						}
 						// Look for wildcard compatibility
@@ -760,7 +760,7 @@
 								matchRule &= ~SearchPattern.R_FULL_MATCH;
 								continue;
 						}
-					} else if (argumentBinding == patternBinding)
+					} else if (TypeBinding.equalsEquals(argumentBinding, patternBinding))
 						// valid only when arg is equals to pattern
 						continue;
 					break;
diff --git a/othersrc/JCLMin1.5/.gitignore b/othersrc/JCLMin1.5/.gitignore
new file mode 100644
index 0000000..5e56e04
--- /dev/null
+++ b/othersrc/JCLMin1.5/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/META-INF/MANIFEST.MF b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/META-INF/MANIFEST.MF
index 00094f3..625d4a6 100644
--- a/plugins/org.eclipse.objectteams.otdt.debug.adaptor/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.objectteams.otdt.debug.adaptor/META-INF/MANIFEST.MF
@@ -12,7 +12,7 @@
  org.eclipse.objectteams.otdt.debug.ui;bundle-version="[2.2.0,3.0.0)",
  org.eclipse.objectteams.otdt.ui;bundle-version="[2.2.0,3.0.0)",
  org.eclipse.core.runtime;bundle-version="[3.7.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.9.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.8.100,4.0.0)",
  org.eclipse.jdt.ui;bundle-version="[3.9.0,4.0.0)",
  org.eclipse.debug.core;bundle-version="[3.8.0,4.0.0)",
  org.eclipse.debug.ui;bundle-version="[3.9.0,4.0.0)",
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java
index 54b9144..9fd983e 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/assist/CompletionAdaptor/StubUtility2.java
@@ -40,8 +40,6 @@
 {
 
 	// CALLOUT INTERFACE:
-	List createParameters(IJavaProject project, ImportRewrite imports, ImportRewriteContext context, AST ast, IMethodBinding binding, MethodDeclaration decl) 
-		-> List createParameters(IJavaProject project, ImportRewrite imports, ImportRewriteContext context, AST ast, IMethodBinding binding, MethodDeclaration decl);
 
 	void findUnimplementedInterfaceMethods(ITypeBinding typeBinding, HashSet<ITypeBinding> visited, ArrayList<IMethodBinding> allMethods, IPackageBinding currPack, ArrayList<IMethodBinding> toImplement) 
 		-> void findUnimplementedInterfaceMethods(ITypeBinding typeBinding, HashSet<ITypeBinding> visited, ArrayList<IMethodBinding> allMethods, IPackageBinding currPack, ArrayList<IMethodBinding> toImplement);
diff --git a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java
index 268c677..1b42294 100644
--- a/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java
+++ b/plugins/org.eclipse.objectteams.otdt.jdt.ui/src/org/eclipse/objectteams/otdt/internal/ui/util/OTStubUtility.java
@@ -59,11 +59,11 @@
 
 		protected List createParameters(IJavaProject project, ImportRewrite imports,
 				ImportRewriteContext context, AST ast, IMethodBinding binding,
-				MethodDeclaration decl)
+				String[] paramNames, MethodDeclaration decl)
 		->
 		List createParameters(IJavaProject project, ImportRewrite imports,
 				ImportRewriteContext context, AST ast, IMethodBinding binding,
-				MethodDeclaration decl);	
+				String[] paramNames, MethodDeclaration decl);	
 	}
 	
 	static OTStubUtility getDefault() {
@@ -75,7 +75,7 @@
 			ImportRewriteContext context, AST ast, IMethodBinding binding,
 			MethodDeclaration decl)
 	{
-		return StubUtility2.createParameters(project, imports, context, ast, binding, decl);
+		return StubUtility2.createParameters(project, imports, context, ast, binding, null/*use suggested argument names*/, decl);
 	}
 	
 	/** This method is inspired by createImplementationStub(..), but much leaner. */
diff --git a/plugins/org.eclipse.objectteams.otdt.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.objectteams.otdt.ui/META-INF/MANIFEST.MF
index 2f20ee5..12923f7 100644
--- a/plugins/org.eclipse.objectteams.otdt.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.objectteams.otdt.ui/META-INF/MANIFEST.MF
@@ -27,7 +27,7 @@
  org.eclipse.compare;bundle-version="[3.5.200,4.0.0)",
  org.eclipse.team.core;bundle-version="[3.6.0,4.0.0)",
  org.eclipse.team.ui;bundle-version="[3.6.100,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.10.0.v_OTDT_r230,4.0.0)",
+ org.eclipse.jdt.core;bundle-version="[3.9.1.v_OTDT_r230,4.0.0)",
  org.eclipse.objectteams.otdt.debug;bundle-version="[2.0.0,3.0.0)",
  org.eclipse.objectteams.otdt;bundle-version="[2.0.0,3.0.0)"
 Bundle-ActivationPolicy: lazy
diff --git a/plugins/org.eclipse.objectteams.runtime/.gitignore b/plugins/org.eclipse.objectteams.runtime/.gitignore
new file mode 100644
index 0000000..d6e238c
--- /dev/null
+++ b/plugins/org.eclipse.objectteams.runtime/.gitignore
@@ -0,0 +1 @@
+/bcelpatchbin
diff --git a/releng/build-scripts/build/otdt_prerequisites.sh b/releng/build-scripts/build/otdt_prerequisites.sh
index f95bec5..7519834 100644
--- a/releng/build-scripts/build/otdt_prerequisites.sh
+++ b/releng/build-scripts/build/otdt_prerequisites.sh
@@ -52,14 +52,14 @@
 
 # VERSIONS:
 # Eclipse SDK build identifier (used for substitution in otdt.map.in etc.):
-SDK_QUALIFIER=I20131030-2000
+SDK_QUALIFIER=R4_3
 
 # Architecture (as used by OSGi):
 ARCH=`arch`
 
 # used only locally (components of the ECLIPSE_SDK_TGZ path):
-EVERSION=4.4M3
-DROP=${BASEDIR}/drops4/S-4.4M3-201310302000
+EVERSION=4.3
+DROP=${BASEDIR}/drops4/R-4.3-201306052000
 
 # EXPORT: archive file of the base eclipse SDK build:
 ECLIPSE_SDK_TGZ=${DROP}/eclipse-SDK-${EVERSION}-linux-gtk-${ARCH}.tar.gz
diff --git a/releng/build-scripts/build/run.properties b/releng/build-scripts/build/run.properties
index d50289d..f26bd6a 100644
--- a/releng/build-scripts/build/run.properties
+++ b/releng/build-scripts/build/run.properties
@@ -22,12 +22,12 @@
 
 # ------------- insert current versions here ---------------
 # Details of the Eclipse SDK built upon:
-run.eclipseScriptDir=plugins/org.eclipse.pde.build_3.9.0.v20131003-1506/scripts
+run.eclipseScriptDir=plugins/org.eclipse.pde.build_3.8.100.v20130514-1028/scripts
 org.eclipse.equinox.launcher_jar=org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
 
 # for patching our patch feature to match this version with any suffix:
-jdt.feature.version=3.10.0.v20131030-2000
-jdt.feature.version.next=3.10.0.v20131030-2001
+jdt.feature.version=3.9.0.v20130605-2000
+jdt.feature.version.next=3.9.0.v20130605-2001
 # -----------------------------------------------------------
 
 #Git Support for PDE BUILD:
diff --git a/releng/build-scripts/build/test.properties.in b/releng/build-scripts/build/test.properties.in
index 4c5872c..6961d93 100644
--- a/releng/build-scripts/build/test.properties.in
+++ b/releng/build-scripts/build/test.properties.in
@@ -2,9 +2,9 @@
 
 # ----
 org.eclipse.jdt.core.tests.builder=org.eclipse.jdt.core.tests.builder_3.8.2.@SDK_QUALIFIER@
-org.eclipse.jdt.debug.tests=org.eclipse.jdt.debug.tests_3.8.200.@SDK_QUALIFIER@
-org.eclipse.jdt.ui.tests=org.eclipse.jdt.ui.tests_3.10.0.@SDK_QUALIFIER@
-org.eclipse.jdt.ui.tests.refactoring=org.eclipse.jdt.ui.tests.refactoring_3.10.0.@SDK_QUALIFIER@
+org.eclipse.jdt.debug.tests=org.eclipse.jdt.debug.tests_3.8.100.@SDK_QUALIFIER@
+org.eclipse.jdt.ui.tests=org.eclipse.jdt.ui.tests_3.9.0.@SDK_QUALIFIER@
+org.eclipse.jdt.ui.tests.refactoring=org.eclipse.jdt.ui.tests.refactoring_3.9.0.@SDK_QUALIFIER@
 org.eclipse.test.performance=org.eclipse.test.performance_3.7.0.@SDK_QUALIFIER@
 # ----
 
diff --git a/releng/map/otdt.map.in b/releng/map/otdt.map.in
index d1727d0..039cedc 100644
--- a/releng/map/otdt.map.in
+++ b/releng/map/otdt.map.in
@@ -1,62 +1,66 @@
 !***************  OTDT CONTRIBUTION  ******************************************************** 

 

 !-- Don't set version numbers for features, otherwise pdebuild would complain about a non-existent Basedir: -- 

-feature@org.eclipse.objectteams.otdt=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.feature

-feature@org.eclipse.objectteams.otdt.source.feature=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.source.feature

-feature@org.eclipse.objectteams.otdt.core.patch=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.core.patch

-feature@org.eclipse.objectteams.otequinox=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otequinox.feature

+feature@org.eclipse.objectteams.otdt=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.feature,tag=branches/OT_BETA_JAVA8

+feature@org.eclipse.objectteams.otdt.source.feature=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.source.feature,tag=branches/OT_BETA_JAVA8

+feature@org.eclipse.objectteams.otdt.core.patch=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.core.patch,tag=branches/OT_BETA_JAVA8

+feature@org.eclipse.objectteams.otequinox=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otequinox.feature,tag=builds/201305210612

 

 !-- Also don't use version numbers for those plugins that hold the various otre jars: --

-plugin@org.eclipse.jdt.core,3.10.0.v_OTDT_r230_qualifier=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=org.eclipse.jdt.core

+plugin@org.eclipse.jdt.core,3.9.1.v_OTDT_r230_qualifier=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=org.eclipse.jdt.core,tag=branches/OT_BETA_JAVA8

 

 !next plug-in don't specify version so that org.eclipse.objectteams.runtime/customBuildCallbacks.xml will find the plug-in directory:

-plugin@org.eclipse.objectteams.otdt=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt

+plugin@org.eclipse.objectteams.otdt=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt,tag=branches/OT_BETA_JAVA8

 

-plugin@org.eclipse.objectteams.otdt.debug,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.debug,tag=builds/201305210612

-plugin@org.eclipse.objectteams.otdt.debug.ui,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.debug.ui

-plugin@org.eclipse.objectteams.otdt.ui,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.ui

-plugin@org.eclipse.objectteams.otdt.doc,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.doc,tag=builds/201306040500

+plugin@org.eclipse.objectteams.otdt.debug,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.debug,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.debug.ui,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.debug.ui,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.ui,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.ui,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.doc,2.1.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.doc,tag=branches/OT_BETA_JAVA8

 plugin@org.eclipse.objectteams.otdt.metrics,0.7.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.metrics,tag=builds/201101290806

 

-plugin@org.eclipse.objectteams.runtime=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.runtime

+plugin@org.eclipse.objectteams.runtime=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.runtime,tag=builds/201305210612

+fragment@org.eclipse.objectteams.otequinox.hook,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.hook,tag=builds/201305210612

+fragment@org.eclipse.objectteams.otequinox.sunjvm,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.sunjvm,tag=builds/201109201811

 !the following is also referenced in otdt.doc/buildDoc.xml (plugin-name without version):

-plugin@org.eclipse.objectteams.otequinox=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox

-fragment@org.eclipse.objectteams.otequinox.bug253244workaround,1.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.bug253244workaround

+plugin@org.eclipse.objectteams.otequinox=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox,tag=builds/201305210612

 plugin@org.eclipse.objectteams.eclipse.monitor,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.eclipse.monitor,tag=builds/201305210612

 

 !not currently maintained:

 !plugin@org.eclipse.objectteams.otdt.earlyui=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.earlyui

 !plugin@org.eclipse.objectteams.otdt.metrics.export=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.metrics.export

 

-!** OT/J Plugins **!

-plugin@org.eclipse.objectteams.otequinox.branding,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.branding

-plugin@org.eclipse.objectteams.otdt.jdt.ui,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.jdt.ui

-plugin@org.eclipse.objectteams.otdt.ui.help,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.ui.help,tag=builds/201306040500

-plugin@org.eclipse.objectteams.otdt.apt,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.apt,tag=builds/201305210612

-plugin@org.eclipse.objectteams.otdt.compiler.adaptor,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.compiler.adaptor

-plugin@org.eclipse.objectteams.otdt.debug.adaptor,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.debug.adaptor

-plugin@org.eclipse.objectteams.otdt.refactoring,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.refactoring

-plugin@org.eclipse.objectteams.otdt.pde.ui,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.pde.ui

-plugin@org.eclipse.objectteams.otdt.samples,2.3.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.samples

+!** OT/J Plugins **!
+plugin@org.eclipse.objectteams.otequinox.branding,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otequinox.branding,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.jdt.ui,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.jdt.ui,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.ui.help,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.ui.help,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.apt,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.apt,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.compiler.adaptor,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.compiler.adaptor,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.debug.adaptor,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.debug.adaptor,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.refactoring,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.refactoring,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.pde.ui,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.pde.ui,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.samples,2.2.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=plugins/org.eclipse.objectteams.otdt.samples,tag=branches/OT_BETA_JAVA8

 

 !** Consume BCEL from Orbit: **!

 plugin@org.apache.bcel,5.2.0=p2IU,id=org.apache.bcel,version=5.2.0.v201005080400,repository=http://download.eclipse.org/tools/orbit/downloads/drops/R20120526062928/repository

 

+!========== JDT/UI BETA_JAVA8: ==========!

+plugin@org.eclipse.jdt.ui=GIT,tag=branches/BETA_JAVA8,repo=git://git.eclipse.org/gitroot/jdt/eclipse.jdt.ui.git,path=org.eclipse.jdt.ui

+

 !***************  OTDT Test CONTRIBUTION  ******************************************************** 

 

 

-feature@org.eclipse.objectteams.otdt-tests=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.feature/unit-tests-feature

+feature@org.eclipse.objectteams.otdt-tests=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=features/org.eclipse.objectteams.otdt.feature/unit-tests-feature,tag=branches/OT_BETA_JAVA8

 

-plugin@org.eclipse.jdt.core.tests.compiler=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=org.eclipse.jdt.core.tests.compiler

-plugin@org.eclipse.jdt.core.tests.model=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=org.eclipse.jdt.core.tests.model

-plugin@org.eclipse.objectteams.otdt.tests,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.tests

-plugin@org.eclipse.objectteams.otdt.ui.tests.dom,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.ui.tests.dom

-plugin@org.eclipse.objectteams.otdt.debug.tests,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.debug.tests

-plugin@org.eclipse.objectteams.otdt.ui.tests.refactoring,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring

+plugin@org.eclipse.jdt.core.tests.compiler=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=org.eclipse.jdt.core.tests.compiler,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.jdt.core.tests.model=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=org.eclipse.jdt.core.tests.model,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.tests=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.tests,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.ui.tests.dom=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.ui.tests.dom,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.debug.tests=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.debug.tests,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.ui.tests.refactoring=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.ui.tests.refactoring,tag=branches/OT_BETA_JAVA8

 

 !** OT/J Test Plugins **!

-plugin@org.eclipse.objectteams.otdt.test.builder,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.test.builder

-plugin@org.eclipse.objectteams.otdt.ui.tests,2.0.0=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.ui.tests

+plugin@org.eclipse.objectteams.otdt.test.builder=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.test.builder,tag=branches/OT_BETA_JAVA8

+plugin@org.eclipse.objectteams.otdt.ui.tests=GIT,repo=git://git.eclipse.org/gitroot/objectteams/org.eclipse.objectteams.git,path=testplugins/org.eclipse.objectteams.otdt.ui.tests,tag=branches/OT_BETA_JAVA8

 

 !-- Tests fetched from original GIT (some are required indirectly by jdt.ui.tests): --

 plugin@org.eclipse.jdt.core.tests.builder=GIT,tag=@SDK_QUALIFIER@,repo=git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git,path=org.eclipse.jdt.core.tests.builder

@@ -67,3 +71,7 @@
 plugin@org.eclipse.jface.text.tests=GIT,tag=@SDK_QUALIFIER@,repo=git://git.eclipse.org/gitroot/platform/eclipse.platform.text.git,path=org.eclipse.jface.text.tests

 plugin@org.eclipse.text.tests=GIT,tag=@SDK_QUALIFIER@,repo=git://git.eclipse.org/gitroot/platform/eclipse.platform.text.git,path=org.eclipse.text.tests

 plugin@org.eclipse.core.filebuffers.tests=GIT,tag=@SDK_QUALIFIER@,repo=git://git.eclipse.org/gitroot/platform/eclipse.platform.text.git,path=org.eclipse.core.filebuffers.tests

+

+!-- jdt.annotation: --!

+plugin@org.eclipse.jdt.annotation,2.0.0=GIT,tag=BETA_JAVA8,repo=git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git,path=org.eclipse.jdt.annotation

+plugin@org.eclipse.jdt.annotation,1.1.0=GIT,tag=BETA_JAVA8,repo=git://git.eclipse.org/gitroot/jdt/eclipse.jdt.core.git,path=org.eclipse.jdt.annotation_v1

diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java b/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java
index de6cb6e..dda15b6 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/compiler/org/eclipse/objectteams/otdt/tests/compiler/smap/AbstractSourceMapGeneratorTest.java
@@ -191,7 +191,11 @@
             public boolean proceedOnErrors()

             {

                 return true;

-            }

+            }
+
+			public boolean ignoreAllErrors() {
+				return false;
+			}

         };

     }

 

diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
index 1cfbd06..9608fdd 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/AbstractOTJLDTest.java
@@ -33,6 +33,7 @@
 import org.eclipse.jdt.core.tests.util.Util;
 import org.eclipse.jdt.internal.compiler.Compiler;
 import org.eclipse.jdt.internal.compiler.batch.FileSystem;
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.objectteams.otdt.tests.ClasspathUtil;
@@ -78,6 +79,25 @@
 			"-Xbootclasspath/a:"+ClasspathUtil.OTRE_MIN_JAR_PATH,
 			"-Dot.dump=1"
 		};
+	
+	public static boolean IS_JRE_8;
+	static {
+		String javaVersion = System.getProperty("java.specification.version");
+		IS_JRE_8 = "1.8".equals(javaVersion);
+	}
+	protected String foreach(String elemType) {
+		return (IS_JRE_8 && this.complianceLevel < ClassFileConstants.JDK1_8) 
+				? "public void forEach(java.util.function.Consumer<? super "+elemType+"> element) {}\n"
+				: "";
+	}
+	protected String spliterator(String elemType) {
+		return (IS_JRE_8 && this.complianceLevel < ClassFileConstants.JDK1_8) 
+				? "public java.util.Spliterator<"+elemType+"> spliterator() { return null; }\n"
+				: "";
+	}
+	protected String spliteratorCallout() {
+		return (IS_JRE_8 && this.complianceLevel < ClassFileConstants.JDK1_8) ? "spliterator -> spliterator;\n" : "";
+	}
 	// ===
 	
 	protected static final JavacTestOptions DEFAULT_TEST_OPTIONS = new JavacTestOptions();
@@ -138,8 +158,26 @@
 	
 	protected void runNegativeTestMatching(String[] testFiles, String expectedCompilerLog) {
 		this.errorMatching = true;
-		// ensure expectingCompilerError is set, which runNegativeTest(String[],String) not always does
-		super.runNegativeTest(testFiles, expectedCompilerLog, DEFAULT_TEST_OPTIONS);
+		runTest(
+		 		// test directory preparation
+				true /* flush output directory */,
+				testFiles /* test files */,
+				// compiler options
+				null /* no class libraries */,
+				null /* no custom options */,
+				false /* do not perform statements recovery */,
+				null /* no custom requestor */,
+				// compiler results
+				true /* expecting compiler errors */,
+				expectedCompilerLog /* expected compiler log */,
+				// runtime options
+				false /* do not force execution */,
+				null /* no vm arguments */,
+				// runtime results
+				null /* do not check output string */,
+				null /* do not check error string */,
+				// javac options
+				DEFAULT_TEST_OPTIONS /* javac test options */);
 		this.errorMatching = false;
 	}
 
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
index cea102d..3c73a0e 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/calloutbinding/CalloutParameterBinding_LiftingAndLowering.java
@@ -21,6 +21,7 @@
 
 import junit.framework.Test;
 
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
 import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
 
@@ -34,7 +35,7 @@
 	// Static initializer to specify tests subset using TESTS_* static variables
 	// All specified tests which does not belong to the class are skipped...
 	static {
-//		TESTS_NAMES = new String[] { "test0c11_implicitlyInheritingStaticRoleMethod1"};
+//		TESTS_NAMES = new String[] { "test321_calloutInvocationWithMappedParameter6"};
 //		TESTS_NUMBERS = new int[] { 1459 };
 //		TESTS_RANGE = new int[] { 1097, -1 };
 	}
@@ -348,64 +349,136 @@
     		"public team class Team321ciwmp6 {\n" + 
     		"	^\n" + 
     		"Syntax error on token \";\", ++ expected before this token\n" + 
-    		"----------\n" + 
-    		"2. ERROR in Team321ciwmp6.java (at line 5)\n" + 
-    		"	int doSomethingOther(int r1) -> int doSomething(int b1) wrong\n" + 
-    		"	                                                        ^^^^^\n" + 
-    		"Syntax error on token \"wrong\", delete this token\n" + 
-    		"----------\n" + 
-    		"3. ERROR in Team321ciwmp6.java (at line 9)\n" + 
-    		"	};\n" + 
-    		"	 ^\n" + 
-    		"Syntax error, insert \"}\" to complete ClassBody\n" + 
-    		"----------\n" + 
-    		"4. ERROR in Team321ciwmp6.java (at line 9)\n" + 
-    		"	};\n" + 
-    		"	 ^\n" + 
-    		"Syntax error, insert \"}\" to complete ClassBody\n" + 
-    		"----------\n" + 
-    		"5. ERROR in Team321ciwmp6.java (at line 11)\n" + 
-    		"	int doCalloutGetSomeFieldDoubled() -> get int someField\n" + 
-    		"	^^^\n" + 
-    		"Syntax error on token \"int\", @ expected\n" + 
-    		"----------\n" + 
-    		"6. ERROR in Team321ciwmp6.java (at line 11)\n" + 
-    		"	int doCalloutGetSomeFieldDoubled() -> get int someField\n" + 
-    		"                        with {\n" + 
-    		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
-    		"Syntax error on tokens, ClassHeader expected instead\n" + 
-    		"----------\n" + 
-    		"7. ERROR in Team321ciwmp6.java (at line 12)\n" + 
-    		"	with {\n" + 
-    		"                                result <- 2 * base.someField\n" + 
-    		"	      ^\n" + 
-    		"Syntax error on token \";\", & expected before this token\n" + 
-    		"----------\n" + 
-    		"8. ERROR in Team321ciwmp6.java (at line 13)\n" + 
-    		"	result <- 2 * base.someField\n" + 
-    		"	^^^^^^^^^^^^^\n" + 
-    		"Syntax error on tokens, delete these tokens\n" + 
-    		"----------\n" + 
-    		"9. ERROR in Team321ciwmp6.java (at line 13)\n" + 
-    		"	result <- 2 * base.someField\n" + 
-    		"	              ^^^^^\n" + 
-    		"Syntax error on tokens, delete these tokens\n" + 
-    		"----------\n" + 
-    		"10. ERROR in Team321ciwmp6.java (at line 13)\n" + 
-    		"	result <- 2 * base.someField\n" + 
-    		"	                  ^\n" + 
-    		"Syntax error, insert \"enum Identifier\" to complete EnumHeaderName\n" + 
-    		"----------\n" + 
-    		"11. ERROR in Team321ciwmp6.java (at line 13)\n" + 
-    		"	result <- 2 * base.someField\n" + 
-    		"	                  ^\n" + 
-    		"Syntax error, insert \"EnumBody\" to complete ClassBodyDeclarations\n" + 
-    		"----------\n" + 
-    		"12. ERROR in Team321ciwmp6.java (at line 14)\n" + 
-    		"	};\n" + 
-    		"	^\n" + 
-    		"Syntax error on token \"}\", { expected\n" + 
-    		"----------\n");
+    		"----------\n" +
+    		( this.complianceLevel < ClassFileConstants.JDK1_8 
+    		?
+	    		"2. ERROR in Team321ciwmp6.java (at line 5)\n" + 
+	    		"	int doSomethingOther(int r1) -> int doSomething(int b1) wrong\n" + 
+	    		"                        with {\n" + 
+	    		"	                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+	    		"Syntax error on tokens, EmptyParameterMappings expected instead\n" + 
+	    		"----------\n" + 
+	    		"3. ERROR in Team321ciwmp6.java (at line 7)\n" + 
+	    		"	r1 -> b1,\n" + 
+	    		"	        ^\n" + 
+	    		"Syntax error on token \",\", ; expected\n"+ 
+	    		"----------\n" + 
+	    		"4. ERROR in Team321ciwmp6.java (at line 9)\n" + 
+	    		"	};\n" + 
+	    		"	 ^\n" + 
+	    		"Syntax error, insert \"}\" to complete ClassBody\n" + 
+	    		"----------\n" + 
+	    		"5. ERROR in Team321ciwmp6.java (at line 11)\n" + 
+	    		"	int doCalloutGetSomeFieldDoubled() -> get int someField\n" + 
+	    		"	^^^\n" + 
+	    		"Syntax error on token \"int\", @ expected\n" + 
+	    		"----------\n" + 
+	    		"6. ERROR in Team321ciwmp6.java (at line 11)\n" + 
+	    		"	int doCalloutGetSomeFieldDoubled() -> get int someField\n" + 
+	    		"                        with {\n" + 
+	    		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+	    		"Syntax error on tokens, ClassHeader expected instead\n" + 
+	    		"----------\n" + 
+	    		"7. ERROR in Team321ciwmp6.java (at line 12)\n" + 
+	    		"	with {\n" + 
+	    		"                                result <- 2 * base.someField\n" + 
+	    		"	      ^\n" + 
+	    		"Syntax error on token \";\", & expected before this token\n" + 
+	    		"----------\n" + 
+	    		"8. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+	    		"	result <- 2 * base.someField\n" + 
+	    		"	^^^^^^^^^^^^^\n" + 
+	    		"Syntax error on tokens, delete these tokens\n" + 
+	    		"----------\n" + 
+	    		"9. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+	    		"	result <- 2 * base.someField\n" + 
+	    		"	              ^^^^^\n" + 
+	    		"Syntax error on tokens, delete these tokens\n" + 
+	    		"----------\n" + 
+	    		"10. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+	    		"	result <- 2 * base.someField\n" + 
+	    		"	                  ^\n" + 
+	    		"Syntax error, insert \"enum Identifier\" to complete EnumHeaderName\n" + 
+	    		"----------\n" + 
+	    		"11. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+	    		"	result <- 2 * base.someField\n" + 
+	    		"	                  ^\n" + 
+	    		"Syntax error, insert \"EnumBody\" to complete ClassBodyDeclarations\n" + 
+	    		"----------\n" + 
+	    		"12. ERROR in Team321ciwmp6.java (at line 14)\n" + 
+	    		"	};\n" + 
+	    		"	^\n" + 
+	    		"Syntax error on token \"}\", { expected\n" + 
+	    		"----------\n"
+    		:
+        		"2. ERROR in Team321ciwmp6.java (at line 5)\n" + 
+        		"	int doSomethingOther(int r1) -> int doSomething(int b1) wrong\n" + 
+        		"	                                                        ^^^^^\n" + 
+        		"Syntax error on token \"wrong\", delete this token\n" + 
+        		"----------\n" + 
+        		"3. ERROR in Team321ciwmp6.java (at line 7)\n" + 
+        		"	r1 -> b1,\n" + 
+        		"	      ^^\n" + 
+        		"Syntax error, insert \"AssignmentOperator Expression\" to complete Assignment\n" + 
+        		"----------\n" + 
+        		"4. ERROR in Team321ciwmp6.java (at line 7)\n" + 
+        		"	r1 -> b1,\n" + 
+        		"	      ^^\n" + 
+        		"Syntax error, insert \"-> Identifier\" to complete ParameterMapping\n" + 
+        		"----------\n" + 
+        		"5. ERROR in Team321ciwmp6.java (at line 9)\n" + 
+        		"	};\n" + 
+        		"	 ^\n" + 
+        		"Syntax error, insert \"}\" to complete ClassBody\n" + 
+        		"----------\n" + 
+        		"6. ERROR in Team321ciwmp6.java (at line 9)\n" + 
+        		"	};\n" + 
+        		"	 ^\n" + 
+        		"Syntax error, insert \"}\" to complete ClassBody\n" + 
+        		"----------\n" + 
+        		"7. ERROR in Team321ciwmp6.java (at line 11)\n" + 
+        		"	int doCalloutGetSomeFieldDoubled() -> get int someField\n" + 
+        		"	^^^\n" + 
+        		"Syntax error on token \"int\", @ expected\n" + 
+        		"----------\n" + 
+        		"8. ERROR in Team321ciwmp6.java (at line 11)\n" + 
+        		"	int doCalloutGetSomeFieldDoubled() -> get int someField\n" + 
+        		"                        with {\n" + 
+        		"	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+        		"Syntax error on tokens, ClassHeader expected instead\n" + 
+        		"----------\n" + 
+        		"9. ERROR in Team321ciwmp6.java (at line 12)\n" + 
+        		"	with {\n" + 
+        		"                                result <- 2 * base.someField\n" + 
+        		"	      ^\n" + 
+        		"Syntax error on token \";\", & expected before this token\n" + 
+        		"----------\n" + 
+        		"10. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+        		"	result <- 2 * base.someField\n" + 
+        		"	^^^^^^^^^^^^^\n" + 
+        		"Syntax error on tokens, delete these tokens\n" + 
+        		"----------\n" + 
+        		"11. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+        		"	result <- 2 * base.someField\n" + 
+        		"	              ^^^^^\n" + 
+        		"Syntax error on tokens, delete these tokens\n" + 
+        		"----------\n" + 
+        		"12. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+        		"	result <- 2 * base.someField\n" + 
+        		"	                  ^\n" + 
+        		"Syntax error, insert \"enum Identifier\" to complete EnumHeaderName\n" + 
+        		"----------\n" + 
+        		"13. ERROR in Team321ciwmp6.java (at line 13)\n" + 
+        		"	result <- 2 * base.someField\n" + 
+        		"	                  ^\n" + 
+        		"Syntax error, insert \"EnumBody\" to complete ClassBodyDeclarations\n" + 
+        		"----------\n" + 
+        		"14. ERROR in Team321ciwmp6.java (at line 14)\n" + 
+        		"	};\n" + 
+        		"	^\n" + 
+        		"Syntax error on token \"}\", { expected\n" + 
+        		"----------\n"
+    		));
     }
 
     // an invocation of a callout-bound base method from the direct base class that has a implicit result mapping
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/liftlower/DeclaredLifting.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/liftlower/DeclaredLifting.java
index 8e225e4..402f7df 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/liftlower/DeclaredLifting.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/liftlower/DeclaredLifting.java
@@ -34,7 +34,8 @@
 	// Static initializer to specify tests subset using TESTS_* static variables
 	// All specified tests which does not belong to the class are skipped...
 	static {
-//		TESTS_NAMES = new String[] { "test6112_declaredLiftingInConstructor4"};
+//		TESTS_NAMES = new String[] { "test612_liftedExternalizedRoleFeatureAccess1"};
+//		TESTS_NAMES = new String[] { "test6113_maximalSyntax1" };
 //		TESTS_NUMBERS = new int[] { 1459 };
 //		TESTS_RANGE = new int[] { 1097, -1 };
 	}
@@ -1341,4 +1342,56 @@
     	"OK");
     }
 
+    public void test6113_maximalSyntax1() {
+        
+        runConformTest(
+             new String[] {
+ 		"T6113ms1Main.java",
+ 			    "\n" +
+ 			    "public class T6113ms1Main {\n" +
+ 			    "    @SuppressWarnings(\"roletypesyntax\")\n" +
+ 			    "    public static void main(String[] args) {\n" +
+ 			    "        final Team6113ms1 t = new Team6113ms1();\n" +
+ 			    "        t.Role6113ms1_2   r = t.new Role6113ms1_2(\"NOTOK\");\n" +
+ 			    "\n" +
+ 			    "        // should lower the role object as the external signature of the method is\n" +
+ 			    "        //   Team6113ms1.getValue(T6113ms1 obj)\n" +
+ 			    "        System.out.print(t.getValue(r));\n" +
+ 			    "    }\n" +
+ 			    "}\n" +
+ 			    "    \n",
+ 		"T6113ms1.java",
+ 			    "\n" +
+ 			    "public class T6113ms1 {}\n" +
+ 			    "    \n",
+ 		"Team6113ms1.java",
+ 			    "\n" +
+ 			    "public team class Team6113ms1 {\n" +
+ 			    "    public class Role6113ms1_1 playedBy T6113ms1 {\n" +
+ 			    "        protected String getValue() {\n" +
+ 			    "            return \"OK\";\n" +
+ 			    "        }\n" +
+ 			    "    }\n" +
+ 			    "\n" +
+ 			    "    public class Role6113ms1_2 playedBy T6113ms1 {\n" +
+ 			    "        @SuppressWarnings(\"unused\")\n" +
+ 			    "        private String value;\n" +
+ 			    "\n" +
+ 			    "        public Role6113ms1_2(String value) {\n" +
+ 			    "            base();\n" +
+ 			    "            this.value = value;\n" +
+ 			    "        }\n" +
+ 			    "    }\n" +
+ 			    "\n" +
+// 			    "    public String getValue(int i, final @NonNullB T6113ms1<@NullableB String>@d1[]@d12 @d123[]@d2 @d22 @d234[] as @NonNullR Role6113ms1_1<@NullableR String>@D2[]@D2 @D22[] obj) {\n" +
+ 				"    public String getValue(java.lang.Object i, final @NonNullB p1.T6113ms1[][][] as @NonNullR Role6113ms1_1[][] obj) {\n" +
+ 			    "        return obj.getValue();\n" +
+ 			    "    }\n" +
+ 			    "}\n" +
+ 			    "    \n"
+             },
+             "OK");
+    	
+    }
+
 }
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
index 258b7b4..18d2f87 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java5.java
@@ -34,7 +34,7 @@
 	// Static initializer to specify tests subset using TESTS_* static variables
 	// All specified tests which does not belong to the class are skipped...
 	static {
-//		TESTS_NAMES = new String[] { "testA112_genericTeam4"};
+//		TESTS_NAMES = new String[] { "testA122_genericsRegression1"};
 //		TESTS_NUMBERS = new int[] { 1459 };
 //		TESTS_RANGE = new int[] { 1097, -1 };
 	}
@@ -2211,6 +2211,8 @@
 			    "        }\n" +
 			    "        U getLast() -> U getLast();\n" +
 			    "        Iterator<U> iterator() -> Iterator<U> iterator();\n" +
+			    foreach("U") +
+			    spliteratorCallout() +
 			    "    }\n" +
 			    "    public String manipulate(TA17gb5List<String> as R<String> r, String e) {\n" +
 			    "        r.duplicate();\n" +
@@ -2266,6 +2268,8 @@
 			    "        }\n" +
 			    "        U getLast() -> U getLast();\n" +
 			    "        Iterator<U> iterator() -> Iterator<U> iterator();\n" +
+			    foreach("U") +
+			    spliteratorCallout() +
 			    "    }\n" +
 			    "    public <X> X manipulate(TA17gb6List<X> as R<X> r, X e) {\n" +
 			    "        r.duplicate();\n" +
@@ -4564,6 +4568,72 @@
             "OK");
     }
 
+    // a type parameter has a nested value parameter with additional type bound (super role)
+    // like previous but illegally use qualified type reference
+    public void testA119_nestedValueParameter4b() {
+       this.compileOrder = new String[][]{{"pb/TA119nvp4_2.java"}, {"pt/TeamA119nvp4.java"}, {"pb/TA119nvp4_1.java"}, {"TA119nvp4Main.java"}};
+       runNegativeTest(
+            new String[] {
+		"TA119nvp4Main.java",
+			    "\n" +
+			    "public class TA119nvp4Main {\n" +
+			    "    public static void main(String[] args) {\n" +
+			    "        final pt.TeamA119nvp4 t1 = new pt.TeamA119nvp4();\n" +
+			    "        Role<@t1> r = new Role<@t1>();\n" +
+			    "        pb.TA119nvp4_1<@t1,Role<@t1>> c = new pb.TA119nvp4_1<@t1,Role<@t1>>();\n" +
+			    "        c.test(r);\n" +
+			    "    }\n" +
+			    "}\n" +
+			    "    \n",
+		"pb/TA119nvp4_1.java",
+			    "package pb;\n" +
+			    "import pt.TeamA119nvp4;\n" +
+			    "public class TA119nvp4_1<TeamA119nvp4 t, R<@t> extends Showable<@t>> {\n" +
+			    "    public void test(R<@t> r) {\n" +
+			    "        t.show(r);\n" +
+			    "    }\n" +
+			    "}\n" +
+			    "    \n",
+		"pb/TA119nvp4_2.java",
+			    "package pb;\n" +
+			    "public class TA119nvp4_2 {}\n" +
+			    "    \n",
+		"pt/TeamA119nvp4.java",
+			    "package pt;\n" +
+			    "public team class TeamA119nvp4 {\n" +
+			    "    public abstract class Showable {\n" +
+			    "        public abstract void show();\n" +
+			    "    }\n" +
+			    "    public class Role extends Showable playedBy pb.TA119nvp4_2 {\n" +
+			    "        public Role() { base(); }\n" +
+			    "		 @Override\n" +
+			    "        public void show() { System.out.print(\"OK\"); }\n" +
+			    "    }\n" +
+			    "    public void show(Showable s) {\n" +
+			    "        s.show();\n" +
+			    "    }\n" +
+			    "}\n" +
+			    "    \n"
+            },
+            "----------\n" + 
+    		"1. WARNING in pt\\TeamA119nvp4.java (at line 6)\n" + 
+    		"	public class Role extends Showable playedBy pb.TA119nvp4_2 {\n" + 
+    		"	                                            ^^^^^^^^^^^^^^\n" + 
+    		"Qualified reference to base class pb.TA119nvp4_2 is deprecated, should use a base import instead (OTJLD 2.1.2(d)).\n" + 
+    		"----------\n" + 
+    		"----------\n" + 
+    		"1. ERROR in TA119nvp4Main.java (at line 6)\n" + 
+    		"	pb.TA119nvp4_1<@t1,Role<@t1>> c = new pb.TA119nvp4_1<@t1,Role<@t1>>();\n" + 
+    		"	               ^^^\n" + 
+    		"Illegal position for value parameter @t1: must be a parameter of a single name type reference(OTJLD A.9(a)).\n" + 
+    		"----------\n" + 
+    		"2. ERROR in TA119nvp4Main.java (at line 6)\n" + 
+    		"	pb.TA119nvp4_1<@t1,Role<@t1>> c = new pb.TA119nvp4_1<@t1,Role<@t1>>();\n" + 
+    		"	                                                     ^^^\n" + 
+    		"Illegal position for value parameter @t1: must be a parameter of a single name type reference(OTJLD A.9(a)).\n" + 
+    		"----------\n");
+    }
+
     // a type parameter has a nested value parameter with additional type bound - role not subtype of bound
     // A.1.19-otjld-nested-value-parameter-5
     public void testA119_nestedValueParameter5() {
@@ -5199,5 +5269,15 @@
     		});
     }
     
+    public void testA122_genericsRegression1() {
+    	runConformTest(
+    		new String[] {
+    	"TA122gr1.java",
+    		"import java.util.*;\n" +
+    		"public class TA122gr1 {\n" +
+    		"	HashMap<String,Class<?>> map = new HashMap<String,Class<?>>();\n" +
+    		"}\n"
+    		});
+    }
 
 }
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java8.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java8.java
new file mode 100644
index 0000000..72c24d2
--- /dev/null
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Java8.java
@@ -0,0 +1,242 @@
+/**********************************************************************
+ * This file is part of "Object Teams Development Tooling"-Software
+ *
+ * Copyright 2012 Stephan Herrmann
+ *
+ * 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
+ *
+ * Please visit http://www.eclipse.org/objectteams for updates and contact.
+ *
+ * Contributors:
+ * 	  Stephan Herrmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.objectteams.otdt.tests.otjld.other;
+
+import junit.framework.Test;
+
+import org.eclipse.objectteams.otdt.tests.otjld.AbstractOTJLDTest;
+
+public class Java8 extends AbstractOTJLDTest {
+
+	public Java8(String name) {
+		super(name);
+	}
+
+// Static initializer to specify tests subset using TESTS_* static variables
+// All tests which do not belong to the subset are skipped...
+	static {
+		TESTS_NAMES = new String[] { "testTypeAnnotationAndTypeAnchor_2"};
+//		TESTS_NUMBERS = new int[] { 1459 };
+//		TESTS_RANGE = new int[] { 1097, -1 };
+	}
+
+	@SuppressWarnings("unchecked")
+	public static Test suite() {
+		Test suite = buildMinimalComplianceTestSuite(Java8.class, F_1_8);
+		TESTS_COUNTERS.put(Java8.class.getName(), new Integer(suite.countTestCases()));
+		return suite;
+	}
+
+	public static Class testClass() {
+		return Java8.class;
+	}
+
+	// A lambda expression appears in a parameter mapping
+	// - empty param list
+	public void testA11_lambdaExpression01() {
+		runConformTest(
+			new String[] {
+		"p1/TeamA11le01.java",
+			"package p1;\n" +
+			"public team class TeamA11le01 {\n" +
+			"    protected class Role playedBy TA11le01 {\n" +
+			"        void outside() -> void run(Runnable r) with {\n" +
+			"            () -> System.out.println(Role.this) -> r\n" +
+			"        }\n" +
+			"    }\n" +
+			"    void test(TA11le01 as Role r) {\n" +
+			"        r.outside();\n" +
+			"    } \n" +
+			"    public static void main(String[] args) throws Exception {\n" +
+			"        new TeamA11le01().test(new TA11le01());\n" +
+			"    }\n" +
+			"}",
+	"p1/TA11le01.java",
+			"package p1;\n" +
+			"public class TA11le01 {\n" +
+			"    public void run(Runnable r) {\n" +
+			"      try {\n" +
+			"        r.run();\n" +
+			"      } catch (NullPointerException npe) {System.out.print(\"caught\"); }\n" +
+			"    }\n" +
+			"}",
+			},
+			"caught"); // FIXME real execution of lambda
+	}
+
+	// A lambda expression appears in a parameter mapping
+	// - single ident param
+	// - lambda is 2nd mapping
+	public void testA11_lambdaExpression02() {
+		runConformTest(
+			new String[] {
+		"p1/TeamA11le02.java",
+			"package p1;\n" +
+			"public team class TeamA11le02 {\n" +
+			"    protected class Role playedBy TA11le02 {\n" +
+			"        void outside() -> void run(String s, Runnable r) with {\n" +
+			"            \"prefix.\" -> s,\n" +
+			"            x -> System.out.println(Role.this) -> r\n" +
+			"        }\n" +
+			"    }\n" +
+			"    void test(TA11le02 as Role r) {\n" +
+			"        r.outside();\n" +
+			"    } \n" +
+			"    public static void main(String[] args) throws Exception {\n" +
+			"        new TeamA11le02().test(new TA11le02());\n" +
+			"    }\n" +
+			"}",
+	"p1/TA11le02.java",
+			"package p1;\n" +
+			"public class TA11le02 {\n" +
+			"    public void run(String s, Runnable r) {\n" +
+			"        System.out.print(s);\n" +
+			"      try {\n" +
+			"        r.run();\n" +
+			"      } catch (NullPointerException npe) {System.out.print(\"caught\"); }\n" +
+			"    }\n" +
+			"}",
+			},
+			"prefix.caught"); // FIXME real execution of lambda
+	}
+
+	// A lambda expression appears in a parameter mapping
+	// - two type elided params
+	public void testA11_lambdaExpression03() {
+		runConformTest(
+			new String[] {
+		"p1/TeamA11le03.java",
+			"package p1;\n" +
+			"public team class TeamA11le03 {\n" +
+			"    protected class Role playedBy TA11le03 {\n" +
+			"        void outside() -> void run(IA11le03 r) with {\n" +
+			"            (x,y) -> System.out.println(\"\"+x+y) -> r\n" +
+			"        }\n" +
+			"    }\n" +
+			"    void test(TA11le03 as Role r) {\n" +
+			"        r.outside();\n" +
+			"    } \n" +
+			"    public static void main(String[] args) throws Exception {\n" +
+			"        new TeamA11le03().test(new TA11le03());\n" +
+			"    }\n" +
+			"}",
+		"p1/IA11le03.java",
+			"package p1;\n" +
+			"public interface IA11le03 {\n" +
+			"    void invoke(String s1, String s2);\n" +
+			"}",
+		"p1/TA11le03.java",
+			"package p1;\n" +
+			"public class TA11le03 {\n" +
+			"    public void run(IA11le03 r) {\n" +
+			"      try {\n" +
+			"        r.invoke(\"O\", \"K\");\n" +
+			"      } catch (NullPointerException npe) {System.out.print(\"caught\"); }\n" +
+			"    }\n" +
+			"}",
+			},
+			"caught"); // FIXME real execution of lambda
+	}
+
+	// A lambda expression appears in a parameter mapping
+	// - two typed params
+	public void testA11_lambdaExpression04() {
+		runConformTest(
+			new String[] {
+		"p1/TeamA11le04.java",
+			"package p1;\n" +
+			"public team class TeamA11le04 {\n" +
+			"    protected class Role playedBy TA11le04 {\n" +
+			"        void outside() -> void run(IA11le04 r) with {\n" +
+			"            (String x, String y) -> System.out.println(\"\"+x+y) -> r\n" +
+			"        }\n" +
+			"    }\n" +
+			"    void test(TA11le04 as Role r) {\n" +
+			"        r.outside();\n" +
+			"    } \n" +
+			"    public static void main(String[] args) throws Exception {\n" +
+			"        new TeamA11le04().test(new TA11le04());\n" +
+			"    }\n" +
+			"}",
+		"p1/IA11le04.java",
+			"package p1;\n" +
+			"public interface IA11le04 {\n" +
+			"    void invoke(String s1, String s2);\n" +
+			"}",
+		"p1/TA11le04.java",
+			"package p1;\n" +
+			"public class TA11le04 {\n" +
+			"    public void run(IA11le04 r) {\n" +
+			"      try {\n" +
+			"        r.invoke(\"O\", \"K\");\n" +
+			"      } catch (NullPointerException npe) {System.out.print(\"caught\"); }\n" +
+			"    }\n" +
+			"}",
+			},
+			"caught"); // FIXME real execution of lambda
+	}
+	
+	public void testTypeAnnotationAndTypeAnchor_1() {
+		runConformTest(
+			new String[] {
+		"Marker.java",
+			"import java.lang.annotation.*;\n" +
+			"@Retention(RetentionPolicy.CLASS)\n" + 
+			"@Target({ ElementType.TYPE_USE })\n" + 
+			"public @interface Marker {}\n",
+		"T1.java,",
+			"public team class T1 {\n" +
+			"	public class R {}\n" +
+			"}\n",
+		"C1.java",
+			"public abstract class C1 {\n" +
+			"	abstract void test1(final T1 o, R<@o> c);\n" +
+			"	abstract void test2(final Object o, C2<@Marker Object> c);\n" +
+			"}\n" +
+			"class C2<T> {}\n"
+			});
+	}
+	
+	public void testTypeAnnotationAndTypeAnchor_2() {
+		runConformTest(
+			new String[] {
+		"p1/Marker.java",
+				"package p1;\n" +
+				"import java.lang.annotation.*;\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@Target({ ElementType.TYPE_USE })\n" + 
+				"public @interface Marker {}\n",
+		"p1/Marker2.java",
+				"package p1;\n" +
+				"import java.lang.annotation.*;\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" + 
+				"@Target({ ElementType.TYPE_USE })\n" + 
+				"public @interface Marker2 {}\n",
+		"T1.java,",
+			"public team class T1 {\n" +
+			"	public class R {}\n" +
+			"}\n",
+		"C1.java",
+			"public abstract class C1 {\n" +
+			"	final T1 t = new T1();\n" +
+			"	abstract void test1(final C1 a, R<@a.t> c);\n" +
+			"	abstract void test2(final Object o, C2<@p1.Marker java.lang.Object> c);\n" + // bug, should be java.lang. @p1.Marker Object
+			"	abstract void test3(final Object o, C2<@p1.Marker @p1.Marker2 Object> c);\n" + // bug, should be java.lang. @p1.Marker Object
+			"}\n" +
+			"class C2<T> {}\n"
+			});
+	}
+}
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Modifiers.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Modifiers.java
index 5d4891e..597bd13 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Modifiers.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/other/Modifiers.java
@@ -33,7 +33,7 @@
 	// Static initializer to specify tests subset using TESTS_* static variables
 	// All specified tests which does not belong to the class are skipped...
 	static {
-//		TESTS_NAMES = new String[] { "test713_roleImplementsInheritedAbstractMethod2"};
+//		TESTS_NAMES = new String[] { "test7112_callinMethodOverwritesNoncallinMethod2"};
 //		TESTS_NUMBERS = new int[] { 1459 };
 //		TESTS_RANGE = new int[] { 1097, -1 };
 	}
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
index a4a3424..4c2ebc4 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java
@@ -2178,7 +2178,12 @@
 				"2. ERROR in TeamB11sh49.java (at line 4)\n" + 
 				"	void getString() -> toString;\n" + 
 				"	                    ^^^^^^^^\n" + 
-				"Syntax error on token \"toString\", invalid CallloutFieldSpec\n" + 
+				"Syntax error, insert \"Identifier (\" to complete MethodHeaderName\n" + 
+				"----------\n" + 
+				"3. ERROR in TeamB11sh49.java (at line 4)\n" + 
+				"	void getString() -> toString;\n" + 
+				"	                    ^^^^^^^^\n" + 
+				"Syntax error, insert \")\" to complete MethodSpecLong\n" + 
 				"----------\n",
 				null/*classLibraries*/,
 				false/*shouldFlushOutputDirectory*/,
@@ -4151,7 +4156,7 @@
     		"1. ERROR in "+convertedOutputPath+"TeamB11sh90.java (at line 3)\n" + 
     		"	public class RB11sh90 {}\n" + 
     		"	  ^^^^^^^^\n" + 
-    		"The method put(TB11sh90, RB11sh90<@tthis[TeamB11sh90]>) in the type DoublyWeakHashMap<TB11sh90,RB11sh90<@tthis[TeamB11sh90]>> is not applicable for the arguments (TB11sh90, RB11sh90<@tthis[TeamB11sh90]>)\n" + 
+    		"The method put(TB11sh90, TeamB11sh90.RB11sh90) in the type DoublyWeakHashMap<TB11sh90,RB11sh90<@tthis[TeamB11sh90]>> is not applicable for the arguments (TB11sh90, TeamB11sh90.RB11sh90)\n" + 
     		"----------\n" + 
     		"----------\n" + 
     		"1. ERROR in TeamB11sh90\\RB11sh90.java (at line 3)\n" + 
@@ -4516,7 +4521,7 @@
 		"1. ERROR in t\\T1.java (at line 4)\n" + 
 		"	protected team interface IR {}\n" + 
 		"	                         ^^\n" + 
-		"Illegal modifier for the member interface IR; only public, protected, private, static & abstract are permitted\n" + 
+		"Illegal modifier for the member interface IR; only public, protected, private, abstract & static are permitted\n" + 
 		"----------\n" + 
 		"2. WARNING in t\\T1.java (at line 8)\n" + 
 		"	this.foo();\n" + 
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/ExternalizedRoles.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/ExternalizedRoles.java
index 2d8a386..46ab1f0 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/ExternalizedRoles.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/ExternalizedRoles.java
@@ -747,7 +747,7 @@
     // a type anchor is a 3 element path - non final element in path
     // 1.6.6-otjld-type-anchor-is-path-1f
     public void test166_typeAnchorIsPath1f() {
-        runNegativeTestMatching(
+        runNegativeTest(
             new String[] {
 		"T166taia1fMain.java",
 			    "\n" +
@@ -940,7 +940,7 @@
     // a type anchor is a 3 element path - role is accessed by a field - non final element in path
     // 1.6.6-otjld-type-anchor-is-path-4f
     public void test166_typeAnchorIsPath4f() {
-        runNegativeTestMatching(
+        runNegativeTest(
             new String[] {
 		"T166taia4fMain.java",
 			    "\n" +
@@ -3326,6 +3326,8 @@
     		"			list.add(new R2(\"Rb\"));\n" +
     		"			return list.iterator();\n" +
     		"		}\n" +
+    		foreach("R2") +
+    		spliterator("R2") +
     		"	}\n" +
     		"	public class R2 {\n" +
     		"		String val;\n" +
@@ -3384,6 +3386,8 @@
 	    		"			list.add(new R0(\"Rb\"));\n" +
 	    		"			return list.iterator();\n" +
 	    		"		}\n" +
+	    		foreach("R0") +
+	    		spliterator("R0") +
 	    		"	}\n" +
 	    		"	public class R0 {\n" +
 	    		"		String val;\n" +
@@ -3439,6 +3443,8 @@
 	    		"			list.add(new R0(\"Rb\"));\n" +
 	    		"			return list.iterator();\n" +
 	    		"		}\n" +
+	    		foreach("R0") +
+	    		spliterator("R0") +
 	    		"	}\n" +
 	    		"	public class R0 {\n" +
 	    		"		String val;\n" +
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/FileStructure.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/FileStructure.java
index 0d3e53f..40905e5 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/FileStructure.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/rolesandteams/FileStructure.java
@@ -1581,7 +1581,7 @@
 			"	\n" + 
 			"\n" + 
 			"	^^^\n" + 
-			"Type mismatch: cannot convert from Mid1517nrf5<@tthis[Team1517nrf5]> to Mid1517nrf5<@tthis[Team1517nrf5]>\n" + 
+			"Type mismatch: cannot convert from Team1517nrf5.Mid1517nrf5 to Team1517nrf5.Mid1517nrf5\n" + 
 			"----------\n" + 
 			"----------\n" + 
 			"1. ERROR in "+convertedOutputPath+"p\\Team1517nrf5\\Mid1517nrf5.java (at line 3)\n" + 
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java
index 6fa7f55..94da3e4 100644
--- a/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java
+++ b/testplugins/org.eclipse.objectteams.otdt.tests/otjld/org/eclipse/objectteams/otdt/tests/otjld/syntax/Syntax.java
@@ -31,7 +31,7 @@
 	// Static initializer to specify tests subset using TESTS_* static variables
 	// All specified tests which does not belong to the class are skipped...
 	static {
-//		TESTS_NAMES = new String[] { "test8133_incompleteBaseCall"};
+//		TESTS_NAMES = new String[] { "test881_buggyRole3"};
 //		TESTS_NUMBERS = new int[] { 1459 };
 //		TESTS_RANGE = new int[] { 1097, -1 };
 	}
@@ -533,7 +533,7 @@
     // a parameter mapping separates parts with semicolon
     // 8.6.1-otjld-parammap-illegal-semi-1
     public void test861_parammapIllegalSemi1() {
-        runNegativeTestMatching(
+        runNegativeTest(
             new String[] {
 		"Team861pis1.java",
 			    "\n" +
@@ -549,7 +549,18 @@
 			    "}\n" +
 			    "	\n"
             },
-            "\";\"");
+            "----------\n" + 
+    		"1. WARNING in Team861pis1.java (at line 3)\n" + 
+    		"	protected class Role playedBy Object {\n" + 
+    		"	                              ^^^^^^\n" + 
+    		"Base class java.lang.Object appears to be a system class, which means that load time weaving could possibly fail\n" + 
+    		"if this class is loaded from rt.jar/the bootstrap classpath.\n" + 
+    		"----------\n" + 
+    		"2. ERROR in Team861pis1.java (at line 7)\n" + 
+    		"	this -> other;\n" + 
+    		"	             ^\n" + 
+    		"Syntax error on token \";\", , expected\n" + 
+    		"----------\n");
     }
 
     // a parameter mapping is terminated by semicolon
@@ -683,7 +694,7 @@
     		"1. ERROR in Team871buid4.java (at line 5)\n" + 
     		"	i;\n" + 
     		"	^\n" + 
-    		"Syntax error on token \"i\", VariableDeclarator expected after this token\n" + 
+    		"Syntax error, insert \"Identifier (\" to complete MethodHeaderName\n" + 
     		"----------\n");
     }
 
@@ -874,7 +885,7 @@
     		"5. ERROR in Team881br2.java (at line 8)\n" + 
     		"	abstract int wrong(noTypeGiven);\n" + 
     		"	                   ^^^^^^^^^^^\n" + 
-    		"Syntax error on token \"noTypeGiven\", VariableDeclaratorId expected after this token\n" + 
+    		"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameterList\n" + 
     		"----------\n" + 
     		"6. ERROR in Team881br2.java (at line 9)\n" + 
     		"	}\n" + 
@@ -948,7 +959,7 @@
     		"6. ERROR in Team881br3.java (at line 14)\n" + 
     		"	abstract int wrong(noTypeGiven);\n" + 
     		"	                   ^^^^^^^^^^^\n" + 
-    		"Syntax error on token \"noTypeGiven\", VariableDeclaratorId expected after this token\n" + 
+    		"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameterList\n" + 
     		"----------\n" + 
     		"7. ERROR in Team881br3.java (at line 15)\n" + 
     		"	}\n" + 
@@ -1147,7 +1158,7 @@
     // a declared lifting lacks an argument name
     // 8.11.2-otjld-declared-lifting-syntax-error-1
     public void test8112_declaredLiftingSyntaxError1() {
-        runNegativeTestMatching(
+        runNegativeTest(
             new String[] {
 		"Team8112dlse1.java",
 			    "\n" +
@@ -1167,7 +1178,7 @@
     		"1. ERROR in Team8112dlse1.java (at line 7)\n" + 
     		"	void run(Object as R)  {\n" + 
     		"	                   ^\n" + 
-    		"Syntax error on token \"R\", VariableDeclaratorId expected after this token\n" + 
+    		"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameterList\n" + 
     		"----------\n");
     }
 
@@ -1195,7 +1206,7 @@
     		"1. ERROR in Team8112dlse2.java (at line 8)\n" + 
     		"	callin void run(Object as R)  {\n" + 
     		"	                          ^\n" + 
-    		"Syntax error on token \"R\", VariableDeclaratorId expected after this token\n" + 
+    		"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameterList\n" + 
     		"----------\n" + 
     		"2. ERROR in Team8112dlse2.java (at line 11)\n" + 
     		"	}\n" + 
@@ -1245,7 +1256,7 @@
     		"1. ERROR in Team8112dlse3.java (at line 7)\n" + 
     		"	callin void m(T8112dlse3_2 as R) {\n" + 
     		"	                              ^\n" + 
-    		"Syntax error on token \"R\", VariableDeclaratorId expected after this token\n" + 
+    		"Syntax error, insert \"... VariableDeclaratorId\" to complete FormalParameterList\n" + 
     		"----------\n");
     }
 
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/CallinMappingDeclarationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/CallinMappingDeclarationTest.java
index b0198ac..0c5f5a1 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/CallinMappingDeclarationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/CallinMappingDeclarationTest.java
@@ -70,7 +70,7 @@
 		buf.append("}\n");	
 		ICompilationUnit cu= pack1.createCompilationUnit("T.java", buf.toString(), false, null);	
 		
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		RoleTypeDeclaration type= findRoleTypeDeclaration(findTypeDeclaration(astRoot, "T"), "E");
diff --git a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/TypeDeclarationTest.java b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/TypeDeclarationTest.java
index a22cc0b..1461514 100644
--- a/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/TypeDeclarationTest.java
+++ b/testplugins/org.eclipse.objectteams.otdt.ui.tests.dom/src/org/eclipse/objectteams/otdt/ui/tests/dom/rewrite/describing/TypeDeclarationTest.java
@@ -66,7 +66,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("T.java", buf.toString(), false, null);			
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		
@@ -126,7 +126,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("T.java", buf.toString(), false, null);			
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		
@@ -195,7 +195,7 @@
 		buf.append("}\n");
 		ICompilationUnit cu= pack1.createCompilationUnit("R1.java", buf.toString(), false, null);			
 
-		CompilationUnit astRoot= createAST3(cu);
+		CompilationUnit astRoot= createAST(cu);
 		ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
 		AST ast= astRoot.getAST();
 		
@@ -222,7 +222,7 @@
 		// re-get to also challenge ASTConverter and NaiveASTFlattener:
 		IPackageFragment pack2 = this.sourceFolder.createPackageFragment("test2.MyTeam", false, null);
 		cu= pack2.createCompilationUnit("R1.java", buf.toString(), false, null);		
-		astRoot= createAST3(cu);
+		astRoot= createAST(cu);
 		assertEqualString(astRoot.toString(), buf.toString());
 	}
 }