update jdt.core.testd.* to I20120808-2000
diff --git a/org.eclipse.jdt.core.tests.compiler/META-INF/eclipse.inf b/org.eclipse.jdt.core.tests.compiler/META-INF/eclipse.inf
new file mode 100644
index 0000000..5cff5c2
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/META-INF/eclipse.inf
@@ -0,0 +1 @@
+jarprocessor.exclude.pack=true
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 8c518e8..4e4c52e 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
@@ -15,8 +15,8 @@
 import java.io.BufferedReader;
 import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileOutputStream;
 import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
@@ -986,11 +986,13 @@
 		return null;
 	}
 
-	protected INameEnvironment[] getClassLibs() {
+	protected INameEnvironment[] getClassLibs(boolean useDefaultClasspaths) {
 		String encoding = (String)getCompilerOptions().get(CompilerOptions.OPTION_Encoding);
 		if ("".equals(encoding))
 			encoding = null;
-
+		if (useDefaultClasspaths && encoding == null)
+			return DefaultJavaRuntimeEnvironment.create(this.classpaths);
+		// fall back to FileSystem
 		INameEnvironment[] classLibs = new INameEnvironment[1];
 		classLibs[0] = new FileSystem(this.classpaths, new String[]{}, // ignore initial file names
 				encoding // default encoding
@@ -1016,7 +1018,7 @@
 	}
 
 	protected String[] getDefaultClassPaths() {
-		return Util.concatWithClassLibs(OUTPUT_DIR, false);
+		return DefaultJavaRuntimeEnvironment.getDefaultClassPaths();
 	}
 	protected IErrorHandlingPolicy getErrorHandlingPolicy() {
 		return new IErrorHandlingPolicy() {
@@ -1033,7 +1035,7 @@
 	 */
 	protected INameEnvironment getNameEnvironment(final String[] testFiles, String[] classPaths) {
 		this.classpaths = classPaths == null ? getDefaultClassPaths() : classPaths;
-		return new InMemoryNameEnvironment(testFiles, getClassLibs());
+		return new InMemoryNameEnvironment(testFiles, getClassLibs(classPaths == null));
 	}
 	protected IProblemFactory getProblemFactory() {
 		return new DefaultProblemFactory(Locale.getDefault());
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 875c58e..c5a75b4 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
@@ -11,6 +11,7 @@
  *								bug 295551 - Add option to automatically promote all warnings to error
  *								bug 185682 - Increment/decrement operators mark local variables as read
  *								bug 366003 - CCE in ASTNode.resolveAnnotations(ASTNode.java:639)
+ *								bug 384663 - Package Based Annotation Compilation Error in JDT 3.8/4.2 (works in 3.7.2) 
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -47,7 +48,7 @@
 	// 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[] { "testBug376429" };
+//		TESTS_NAMES = new String[] { "testBug384663" };
 //		TESTS_NUMBERS = new int[] { 297 };
 //		TESTS_RANGE = new int[] { 294, -1 };
 	}
@@ -10608,4 +10609,32 @@
 			expectedErrorString,
 			JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
 }
+// https://bugs.eclipse.org/384663
+// Package Based Annotation Compilation Error in JDT 3.8/4.2 (works in 3.7.2)
+public void testBug384663() {
+	String[] testFiles = {
+		"annotations/test/IExtendsInterface.java",
+		"package annotations.test;\n" +
+		"public interface IExtendsInterface extends Interface {}\n",
+
+		"annotations/test/Interface.java",
+		"package annotations.test;\n" +
+		"public interface Interface {}\n",
+
+		"annotations/test/package-info.java",
+		"@AnnotationDefinition(\"Test1\") \n" +
+		"package annotations.test;\n" +
+		"import annotations.AnnotationDefinition;",
+
+		"annotations/AnnotationDefinition.java",
+		"package annotations;\n" +
+		"import java.lang.annotation.*;\n" +
+		"@Retention(RetentionPolicy.RUNTIME)\n" +
+		"@Target(ElementType.PACKAGE)\n" +
+		"public @interface AnnotationDefinition {\n" +
+		"	String value();\n" + 
+		"}",
+	};
+	runConformTest(testFiles);
+}
 }
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 0b0e640..2f45746 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
@@ -127,8 +127,7 @@
 		"    4  putstatic X.X : java.lang.Object[] [9]\n" +
 		"    7  return\n" +
 		"      Line numbers:\n" +
-		"        [pc: 0, line: 2]\n" +
-		"        [pc: 7, line: 1]\n";
+		"        [pc: 0, line: 2]\n";
 
 	int index = actualOutput.indexOf(expectedOutput);
 	if (index == -1 || expectedOutput.length() == 0) {
@@ -284,12 +283,12 @@
 			"      Line numbers:\n" +
 			"        [pc: 0, line: 4]\n" +
 			"        [pc: 5, line: 5]\n" +
-			"        [pc: 15, line: 6]\n" +
+			"        [pc: 12, line: 6]\n" +
 			"        [pc: 16, line: 7]\n" +
 			"        [pc: 24, line: 9]\n" +
 			"      Local variable table:\n" +
 			"        [pc: 0, pc: 25] local: args index: 0 type: java.lang.String[]\n" +
-			"        [pc: 5, pc: 15] local: all index: 1 type: java.lang.Object[][]\n" +
+			"        [pc: 5, pc: 12] local: all index: 1 type: java.lang.Object[][]\n" +
 			"        [pc: 16, pc: 24] local: e index: 1 type: java.lang.ArrayStoreException\n";
 
 	File f = new File(OUTPUT_DIR + File.separator + "X.class");
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 f69d3b2..dc6f0cd 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
@@ -82,7 +82,7 @@
 			"}\n";
 
 	static {
-//		TESTS_NAMES = new String[] { "test315_warn_options_a" };
+//		TESTS_NAMES = new String[] { "testBug375409e" };
 //		TESTS_NUMBERS = new int[] { 306 };
 //		TESTS_RANGE = new int[] { 298, -1 };
 	}
@@ -1772,16 +1772,34 @@
         "      intfAnnotation     + annotation type used as super interface\n" +
         "      intfNonInherited   + interface non-inherited method compatibility\n" +
         "      intfRedundant        find redundant superinterfaces\n" + 
+        "      invalidJavadoc       all warnings for malformed javadoc tags\n" + 
+        "      invalidJavadocTag    validate javadoc tag arguments\n" + 
+        "      invalidJavadocTagDep validate deprecated references in javadoc tag args\n" + 
+        "      invalidJavadocTagNotVisible  validate non-visible references in javadoc\n" + 
+        "							tag args\n" + 
+        "      invalidJavadocVisibility(<visibility>)  specify visibility modifier\n" + 
+        "							for malformed javadoc tag warnings\n" + 
         "      javadoc              invalid javadoc\n" +
         "      localHiding          local variable hiding another variable\n" +
         "      maskedCatchBlock   + hidden catch block\n" +
         "      nls                  string literal lacking non-nls tag //$NON-NLS-<n>$\n" +
         "      noEffectAssign     + assignment without effect\n" +
         "      null                 potential missing or redundant null check\n" +
-        "      nullAnnot(<annot. names separated by |>) + annotation based null analysis,\n" +
+        "      nullAnnot(<annot. names separated by |>)   annotation based null analysis,\n" +
         "                           nullable|nonnull|nonnullbydefault annotation types\n" +
-        "                           optionally specified using fully qualified names\n" +
+        "                           optionally specified using fully qualified names.\n" +
+        "							Enabling this option enables all null-annotation\n" + 
+        "							related sub-options. These can be individually\n" + 
+        "							controlled using options listed below.\n" + 
+        "      nullAnnotConflict    conflict between null annotation specified\n" + 
+        "							and nullness inferred. Is effective only with\n" + 
+        "							nullAnnot option enabled.\n" + 
+        "      nullAnnotRedundant   redundant specification of null annotation. Is\n" + 
+        "							effective only with nullAnnot option enabled.\n" + 
         "      nullDereference    + missing null check\n" + 
+        "	   nullUncheckedConversion unchecked conversion from non-annotated type\n" + 
+        "							to @NonNull type. Is effective only with\n" + 
+        "							nullAnnot option enabled.\n" + 
         "      over-ann             missing @Override annotation (superclass)\n" + 
         "      paramAssign          assignment to a parameter\n" + 
         "      pkgDefaultMethod   + attempt to override package-default method\n" + 
@@ -1801,7 +1819,7 @@
         "      staticReceiver     + non-static reference to static member\n" +
         "      super                overriding a method without making a super invocation\n" +
         "      suppress           + enable @SuppressWarnings\n" + 
-        "                           When used with -err:, it can also silent optional\n" +
+        "                           When used with -err:, it can also silent optional\n" + 
         "                           errors and warnings\n" + 
         "      switchDefault      + switch statement lacking a default case\n" + 
         "      syncOverride         missing synchronized in synchr. method override\n" +
@@ -1821,8 +1839,18 @@
         "      unusedImport       + unused import declaration\n" +
         "      unusedLabel        + unused label\n" +
         "      unusedLocal        + unread local variable\n" +
+        "      unusedParam		    unused parameter\n" + 
+        "      unusedParamOverriding unused parameter for overriding method\n" + 
+        "      unusedParamImplementing unused parameter for implementing method\n" + 
+        "      unusedParamIncludeDoc unused parameter documented in comment tag\n" + 
         "      unusedPrivate      + unused private member declaration\n" +
         "      unusedThrown         unused declared thrown exception\n" +
+        "      unusedThrownWhenOverriding unused declared thrown exception in \n" + 
+        "							overriding method\n" + 
+        "      unusedThrownIncludeDocComment     unused declared thrown exception,\n" + 
+        "							documented in a comment tag\n" + 
+        "      unusedThrownExemptExceptionThrowable  unused declared thrown exception,\n" + 
+        "							exempt Exception and Throwable\n" + 
         "      unusedTypeArgs     + unused type arguments for method and constructor\n" +
         "      uselessTypeCheck     unnecessary cast/instanceof operation\n" +
         "      varargsCast        + varargs argument need explicit cast\n" +
@@ -13248,4 +13276,255 @@
 			"1 problem (1 warning)",
 			true);
 }
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=375409
+public void testBug375409a() {
+	this.runConformTest(
+		new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"public class X {\n" +
+				"/** \n" +
+				"* Description {@see String}, {@category cat}\n" +
+				"* @param a\n" + 
+				"*/\n" +
+				"public void foo(int i) {}}\n" 
+		},
+		"\"" + OUTPUT_DIR +  File.separator + "p" + File.separator + "X.java\""
+		+ " -sourcepath \"" + OUTPUT_DIR + "\""
+		+ " -1.5"
+		+ " -warn:invalidJavadoc -proc:none -d \"" + OUTPUT_DIR + "\"",
+		"",
+		"----------\n" + 
+		"1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 4)\n" + 
+		"	* Description {@see String}, {@category cat}\n" + 
+		"	                ^^^\n" + 
+		"Javadoc: Unexpected tag\n" + 
+		"----------\n" + 
+		"2. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 4)\n" + 
+		"	* Description {@see String}, {@category cat}\n" + 
+		"	                               ^^^^^^^^\n" + 
+		"Javadoc: Unexpected tag\n" + 
+		"----------\n" + 
+		"3. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 5)\n" + 
+		"	* @param a\n" + 
+		"	         ^\n" + 
+		"Javadoc: Parameter a is not declared\n" + 
+		"----------\n" + 
+		"3 problems (3 warnings)",
+		true);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=375409
+public void testBug375409b() {
+	this.runConformTest(
+		new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"public class X {\n" +
+				"/** \n" +
+				"* Description {@see String}, {@category cat}\n" +
+				"* @param a\n" + 
+				"*/\n" +
+				"public void foo(int i) {}}\n" 
+		},
+		"\"" + OUTPUT_DIR +  File.separator + "p" + File.separator + "X.java\""
+		+ " -sourcepath \"" + OUTPUT_DIR + "\""
+		+ " -1.5"
+		+ " -warn:missingJavadocTags,missingJavadocTagsVisibility(public) -proc:none -d \"" + OUTPUT_DIR + "\"",
+		"",
+		"----------\n" + 
+		"1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 7)\n" + 
+		"	public void foo(int i) {}}\n" + 
+		"	                    ^\n" + 
+		"Javadoc: Missing tag for parameter i\n" + 
+		"----------\n" + 
+		"1 problem (1 warning)",
+		true);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=375409
+public void testBug375409c() {
+	this.runConformTest(
+		new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"public class X {\n" +
+				"/** \n" +
+				"* Description {@see String}, {@category cat}\n" +
+				"* @param a\n" + 
+				"*/\n" +
+				"public void foo(int i) {}}\n" 
+		},
+		"\"" + OUTPUT_DIR +  File.separator + "p" + File.separator + "X.java\""
+		+ " -sourcepath \"" + OUTPUT_DIR + "\""
+		+ " -1.5"
+		+ " -warn:missingJavadocComments -proc:none -d \"" + OUTPUT_DIR + "\"",
+		"",
+		"----------\n" + 
+		"1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 2)\n" + 
+		"	public class X {\n" + 
+		"	             ^\n" + 
+		"Javadoc: Missing comment for public declaration\n" + 
+		"----------\n" + 
+		"1 problem (1 warning)",
+		true);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=375409
+public void testBug375409d() {
+	this.runConformTest(
+		new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"public class X {\n" +
+				"/** \n" +
+				"* Description {@see String}, {@category cat}\n" +
+				"* @param a\n" + 
+				"*/\n" +
+				"void foo(int i) {}\n" +
+				"/** \n" +
+				"* Description {@see String}, {@category cat}\n" +
+				"* @param a\n" + 
+				"*/\n" +
+				"public void foo2(int i2) {}}\n" 
+		},
+		"\"" + OUTPUT_DIR +  File.separator + "p" + File.separator + "X.java\""
+		+ " -sourcepath \"" + OUTPUT_DIR + "\""
+		+ " -1.5"
+		+ " -warn:missingJavadocTags,missingJavadocTagsVisibility(public) -proc:none -d \"" + OUTPUT_DIR + "\"",
+		"",
+		"----------\n" + 
+		"1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 12)\n" + 
+		"	public void foo2(int i2) {}}\n" + 
+		"	                     ^^\n" + 
+		"Javadoc: Missing tag for parameter i2\n" + 
+		"----------\n" + 
+		"1 problem (1 warning)",
+		true);
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=375409
+// -warn option - regression tests to check option nullAnnotConflict
+public void testBug375409e() {
+	this.runConformTest(
+		new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"import static java.lang.annotation.ElementType.*;\n" +
+				"import java.lang.annotation.*;\n" +
+				"public class X {\n" +
+				"  @NonNull Object foo(@Nullable Object o, @NonNull Object o2) {\n" +
+				"	 return new X().bar();\n" +
+				"  }\n" +
+				"  @Nullable Object bar() {\n" +
+				"	 return null;\n" +
+				"  }\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ METHOD, PARAMETER })\n" +
+				"@interface NonNull{\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ METHOD, PARAMETER })\n" +
+				"@interface Nullable{\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ PACKAGE, TYPE, METHOD, CONSTRUCTOR })\n" +
+				"@interface NonNullByDefault{\n" +
+				"}"
+		},
+		"\"" + OUTPUT_DIR +  File.separator + "p" + File.separator + "X.java\""
+		+ " -1.5"
+		+ " -warn:+nullAnnot(p.Nullable|p.NonNull|p.NonNullByDefault),+null,-nullAnnotConflict "
+		+ "-proc:none -d \"" + OUTPUT_DIR + "\"",
+		"",
+		"", 
+		true);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=375409
+// -warn option - regression tests to check option nullAnnotRedundant
+public void testBug375409f() {
+	this.runConformTest(
+		new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"import static java.lang.annotation.ElementType.*;\n" +
+				"import java.lang.annotation.*;\n" +
+				"@NonNullByDefault public class X {\n" +
+				"  @NonNull Object foo() {\n" +
+				"	 return null;\n" +
+				"  }\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ METHOD, PARAMETER })\n" +
+				"@interface NonNull{\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ METHOD, PARAMETER })\n" +
+				"@interface Nullable{\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ PACKAGE, TYPE, METHOD, CONSTRUCTOR })\n" +
+				"@interface NonNullByDefault{\n" +
+				"}"
+		},
+		"\"" + OUTPUT_DIR +  File.separator + "p" + File.separator + "X.java\""
+		+ " -1.5"
+		+ " -warn:+nullAnnot(p.Nullable|p.NonNull|p.NonNullByDefault),+null,-nullAnnotRedundant "
+		+ "-proc:none -d \"" + OUTPUT_DIR + "\"",
+		"",
+		"----------\n" + 
+		"1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/X.java (at line 6)\n" + 
+		"	return null;\n" + 
+		"	       ^^^^\n" + 
+		"Null type mismatch: required \'@NonNull Object\' but the provided value is null\n" + 
+		"----------\n" + 
+		"1 problem (1 warning)", 
+		true);
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=375409
+// -warn option - regression tests to check option nullUncheckedConversion
+public void testBug375409g() {
+	this.runConformTest(
+		new String[] {
+				"p/X.java",
+				"package p;\n" +
+				"import static java.lang.annotation.ElementType.*;\n" +
+				"import java.lang.annotation.*;\n" +
+				"public class X {\n" +
+				"  @NonNull Object foo(@Nullable Object o, @NonNull Object o2) {\n" +
+				"	 return new X().bar();\n" +
+				"  }\n" +
+				"  Object bar() {\n" +
+				"	 return null;\n" +
+				"  }\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ METHOD, PARAMETER })\n" +
+				"@interface NonNull{\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ METHOD, PARAMETER })\n" +
+				"@interface Nullable{\n" +
+				"}\n" +
+				"@Documented\n" +
+				"@Retention(RetentionPolicy.CLASS)\n" +
+				"@Target({ PACKAGE, TYPE, METHOD, CONSTRUCTOR })\n" +
+				"@interface NonNullByDefault{\n" +
+				"}"
+		},
+		"\"" + OUTPUT_DIR +  File.separator + "p" + File.separator + "X.java\""
+		+ " -1.5"
+		+ " -warn:+nullAnnot(p.Nullable|p.NonNull|p.NonNullByDefault) -warn:+null -warn:-nullUncheckedConversion "
+		+ "-proc:none -d \"" + OUTPUT_DIR + "\"",
+		"",
+		"", 
+		true);
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java
index 2d73cd3..e03d0a7 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest_1_4.java
@@ -1885,7 +1885,7 @@
 			"      Line numbers:\n" +
 			"        [pc: 0, line: 6]\n" +
 			"        [pc: 9, line: 7]\n" +
-			"        [pc: 14, line: 8]\n" +
+			"        [pc: 11, line: 8]\n" +
 			"        [pc: 18, line: 10]\n" +
 			"        [pc: 20, line: 8]\n" +
 			"        [pc: 21, line: 9]\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DefaultJavaRuntimeEnvironment.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DefaultJavaRuntimeEnvironment.java
new file mode 100644
index 0000000..7d89a84
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/DefaultJavaRuntimeEnvironment.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import org.eclipse.jdt.core.tests.util.Util;
+import org.eclipse.jdt.internal.compiler.batch.FileSystem;
+import org.eclipse.jdt.internal.compiler.env.INameEnvironment;
+
+public class DefaultJavaRuntimeEnvironment extends FileSystem {
+
+	private DefaultJavaRuntimeEnvironment(String[] jreClasspaths) {
+		super(jreClasspaths, new String[] {} /* ignore initial file names */, null);
+	}
+
+	private static INameEnvironment[] defaultJreClassLibs;
+
+	public static INameEnvironment[] create(String[] jreClasspaths) {
+		if (defaultJreClassLibs == null) {
+			defaultJreClassLibs = new INameEnvironment[1];
+			defaultJreClassLibs[0] = new DefaultJavaRuntimeEnvironment(jreClasspaths);
+		}
+		return defaultJreClassLibs;
+	}
+
+	public void cleanup() {
+		// reset output folder only, which is the last entry on the classpath list
+		// see #getDefaultClassPaths()
+		this.classpaths[this.classpaths.length - 1].reset();
+	}
+
+	private static String[] javaLibsAndOutputDir;
+	
+	static String[] getDefaultClassPaths() {
+		if (javaLibsAndOutputDir == null)
+			javaLibsAndOutputDir = Util.concatWithClassLibs(AbstractRegressionTest.OUTPUT_DIR, false);
+		return javaLibsAndOutputDir;
+	}
+}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
index f503888..20b8825 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/Deprecated15Test.java
@@ -7,7 +7,9 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for Bug 354536 - compiling package-info.java still depends on the order of compilation units
+ *     Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for
+ *								bug 354536 - compiling package-info.java still depends on the order of compilation units
+ *								bug 384870 - [compiler] @Deprecated annotation not detected if preceded by other annotation
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -266,6 +268,36 @@
 		"----------\n",
 		JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
 }
+// https://bugs.eclipse.org/384870 - [compiler] @Deprecated annotation not detected if preceded by other annotation
+public void test006() {
+	Map customOptions = new HashMap();
+	customOptions.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
+	this.runNegativeTest(
+		true,
+		new String[] {
+			"test1/E02.java",
+			"package test1;\n" +
+			"public class E02 {\n" +
+			"	public void foo(E01 arg) {\n" +
+			"		// nop\n" +
+			"	}\n" +
+			"}",
+			"test1/E01.java",
+			"package test1;\n" +
+			"@SuppressWarnings(\"all\") @Deprecated\n" +
+			"public class E01 {\n" +
+			"	public static int x = 5;\n" +
+			"}"
+		},
+		null, customOptions,
+		"----------\n" + 
+		"1. ERROR in test1\\E02.java (at line 3)\n" + 
+		"	public void foo(E01 arg) {\n" + 
+		"	                ^^^\n" + 
+		"The type E01 is deprecated\n" + 
+		"----------\n",
+		JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
+}
 public static Class testClass() {
 	return Deprecated15Test.class;
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
index 56b2ce3..7c02b9d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java
@@ -11,6 +11,7 @@
  *     							bug 236385 - [compiler] Warn for potential programming problem if an object is created but not used
  *      						bug 349326 - [1.7] new warning for missing try-with-resources
  *      						bug 360328 - [compiler][null] detect null problems in nested code (local class inside a loop)
+ *								bug 383690 - [compiler] location of error re uninitialized final field should be aligned
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -2320,9 +2321,9 @@
 			"}\n"
 		},
 		"----------\n" + 
-		"1. ERROR in X.java (at line 1)\n" + 
-		"	public class X {\n" + 
-		"	             ^\n" + 
+		"1. ERROR in X.java (at line 2)\n" + 
+		"	public final int field1;\n" + 
+		"	                 ^^^^^^\n" + 
 		"The blank final field field1 may not have been initialized\n" + 
 		"----------\n" + 
 		"2. WARNING in X.java (at line 7)\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 3278e91..7eba0a5 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
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Technical University Berlin - adapted for Object Teams
+ *     Stephan Herrmann - Contribution for bug 383690 - [compiler] location of error re uninitialized final field should be aligned
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -6670,9 +6671,9 @@
 			"G is a raw type. References to generic type G<E> should be parameterized\n" +
 			"----------\n" +
 			"----------\n" +
-			"1. ERROR in test\\cheetah\\G.java (at line 2)\n" +
-			"	public class G<E> {\n" +
-			"	             ^\n" +
+			"1. ERROR in test\\cheetah\\G.java (at line 3)\n" +
+			"	protected final Object o;\n" +
+			"	                       ^\n" +
 			"The blank final field o may not have been initialized\n" +
 			"----------\n");
 	}
@@ -35480,13 +35481,13 @@
 		"        [pc: 0, line: 4]\n" +
 		"        [pc: 2, line: 5]\n" +
 		"        [pc: 5, line: 6]\n" +
-		"        [pc: 32, line: 7]\n" +
+		"        [pc: 29, line: 7]\n" +
 		"        [pc: 33, line: 8]\n" +
 		"        [pc: 41, line: 10]\n" +
 		"      Local variable table:\n" +
 		"        [pc: 0, pc: 42] local: args index: 0 type: java.lang.String[]\n" +
-		"        [pc: 2, pc: 32] local: foo index: 1 type: int\n" +
-		"        [pc: 5, pc: 32] local: bar index: 2 type: java.lang.String\n" +
+		"        [pc: 2, pc: 29] local: foo index: 1 type: int\n" +
+		"        [pc: 5, pc: 29] local: bar index: 2 type: java.lang.String\n" +
 		"        [pc: 33, pc: 41] local: e index: 1 type: java.lang.NullPointerException\n";
 
 	File f = new File(OUTPUT_DIR + File.separator + "X.class");
@@ -36019,16 +36020,16 @@
 				"        [pc: 27, line: 8]\n" +
 				"        [pc: 30, line: 9]\n" +
 				"        [pc: 36, line: 11]\n" +
-				"        [pc: 79, line: 12]\n" +
+				"        [pc: 76, line: 12]\n" +
 				"        [pc: 81, line: 13]\n" +
 				"        [pc: 115, line: 16]\n" +
-				"        [pc: 158, line: 17]\n" +
+				"        [pc: 155, line: 17]\n" +
 				"        [pc: 160, line: 18]\n" +
 				"        [pc: 194, line: 21]\n" +
-				"        [pc: 240, line: 22]\n" +
+				"        [pc: 237, line: 22]\n" +
 				"        [pc: 242, line: 23]\n" +
 				"        [pc: 276, line: 26]\n" +
-				"        [pc: 322, line: 27]\n" +
+				"        [pc: 319, line: 27]\n" +
 				"        [pc: 324, line: 28]\n" +
 				"        [pc: 358, line: 30]\n" +
 				"      Local variable table:\n" +
@@ -36201,16 +36202,16 @@
 				"        [pc: 27, line: 8]\n" +
 				"        [pc: 30, line: 9]\n" +
 				"        [pc: 36, line: 11]\n" +
-				"        [pc: 79, line: 12]\n" +
+				"        [pc: 76, line: 12]\n" +
 				"        [pc: 81, line: 13]\n" +
 				"        [pc: 115, line: 16]\n" +
-				"        [pc: 158, line: 17]\n" +
+				"        [pc: 155, line: 17]\n" +
 				"        [pc: 160, line: 18]\n" +
 				"        [pc: 194, line: 21]\n" +
-				"        [pc: 240, line: 22]\n" +
+				"        [pc: 237, line: 22]\n" +
 				"        [pc: 242, line: 23]\n" +
 				"        [pc: 276, line: 26]\n" +
-				"        [pc: 322, line: 27]\n" +
+				"        [pc: 319, line: 27]\n" +
 				"        [pc: 324, line: 28]\n" +
 				"        [pc: 358, line: 30]\n" +
 				"      Local variable table:\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java
index 85d63b1..89a3d14 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InitializationTests.java
@@ -7,7 +7,9 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
- *     Stephan Herrmann - contribution for bug 324178 - [null] ConditionalExpression.nullStatus(..) doesn't take into account the analysis of condition itself
+ *     Stephan Herrmann - contributions for
+ *								bug 324178 - [null] ConditionalExpression.nullStatus(..) doesn't take into account the analysis of condition itself
+ *								bug 383690 - [compiler] location of error re uninitialized final field should be aligned
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -464,6 +466,28 @@
 		"The local variable b2 may not have been initialized\n" + 
 		"----------\n");
 }
+// Bug 383690 - [compiler] location of error re uninitialized final field should be aligned
+public void testBug383690() {
+	this.runNegativeTest(
+		new String[] {
+			"X.java",
+			"public class X {\n" +
+			"	 final Object o; // report here!\n" +
+			"	 final static Object oStatic; // report here!\n" +
+			"}\n"
+		},
+		"----------\n" +
+		"1. ERROR in X.java (at line 2)\n" +
+		"	final Object o; // report here!\n" +
+		"	             ^\n" +
+		"The blank final field o may not have been initialized\n" +
+		"----------\n" +
+		"2. ERROR in X.java (at line 3)\n" +
+		"	final static Object oStatic; // report here!\n" +
+		"	                    ^^^^^^^\n" +
+		"The blank final field oStatic may not have been initialized\n" +
+		"----------\n");
+}
 public static Class testClass() {
 	return InitializationTests.class;
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
index 899041f..9d9cf1d 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java
@@ -44,7 +44,7 @@
 // All specified tests which does not belong to the class are skipped...
 static {
 //		TESTS_PREFIX = "testBug96237";
-//		TESTS_NAMES = new String[] { "testBug68017javadocWarning2" };
+//		TESTS_NAMES = new String[] { "testBug382606" };
 //		TESTS_NUMBERS = new int[] { 129241 };
 //		TESTS_RANGE = new int[] { 21, 50 };
 }
@@ -8856,5 +8856,29 @@
 		}
 	);
 }
+
+public void testBug382606() {
+	runConformTest(
+			new String[] {
+				"pack/A.java",
+				"package pack;\n" +
+				"/**\n"+
+				"* @see A\n" +
+				"*/\n" +
+				"public interface A {\n"+
+				"}\n"+
+				"/**\n"+
+				"* @see #B()\n"+
+				"*/\n"+
+				"class B {\n"+
+				" B() {}\n"+
+				"\n"+
+				" public void foo(){\n"+ 
+				"     new B();\n"+
+				" }\n"+
+				"}\n"
+			}
+		);
+}
 }
 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java
index 4355bd3..7afa765 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/LineNumberAttributeTest.java
@@ -105,12 +105,12 @@
 		"        [pc: 33, line: 15]\n" +
 		"        [pc: 36, line: 16]\n" +
 		"        [pc: 39, line: 17]\n" +
-		"        [pc: 46, line: 18]\n" +
+		"        [pc: 43, line: 18]\n" +
 		"        [pc: 47, line: 19]\n" +
 		"        [pc: 55, line: 21]\n" +
 		"      Local variable table:\n" +
 		"        [pc: 0, pc: 56] local: args index: 0 type: java.lang.String[]\n" +
-		"        [pc: 23, pc: 46] local: x index: 1 type: X\n" +
+		"        [pc: 23, pc: 43] local: x index: 1 type: X\n" +
 		"        [pc: 47, pc: 55] local: e index: 1 type: java.lang.NullPointerException\n";
 	int index = actualOutput.indexOf(expectedOutput);
 	if (index == -1 || expectedOutput.length() == 0) {
@@ -196,7 +196,7 @@
 		"        [pc: 13, line: 23]\n" +
 		"        [pc: 16, line: 24]\n" +
 		"        [pc: 19, line: 25]\n" +
-		"        [pc: 26, line: 26]\n" +
+		"        [pc: 23, line: 26]\n" +
 		"        [pc: 27, line: 27]\n" +
 		"        [pc: 35, line: 29]\n" +
 		"      Local variable table:\n" +
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java
index d1013ef..146f3e6 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodHandleTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * 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
@@ -13,6 +13,7 @@
 import java.util.Map;
 
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
 
 import junit.framework.Test;
 
@@ -30,6 +31,10 @@
 	public static Class testClass() {
 		return MethodHandleTest.class;
 	}
+	
+	static {
+//		TESTS_NAMES = new String [] { "test009" };
+	}
 
 	public void test001() {
 		this.runConformTest(
@@ -303,4 +308,81 @@
 			true,
 			options);
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=386259, wrong unnecessary cast warning.
+	public void test009() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, CompilerOptions.ERROR);
+		runNegativeTest(
+				// test directory preparation
+				true /* flush output directory */,
+				new String[] { /* test files */
+						"X.java",
+						"import java.lang.invoke.MethodHandle;\n" +
+						"import java.lang.invoke.MethodHandles;\n" +
+						"import java.lang.invoke.MethodType;\n" +
+						"public class X {\n" +
+						"  public static void main(String[] args) throws Throwable {\n" +
+						"    String str = \"test\";\n" +
+						"    MethodHandle mh = MethodHandles.lookup().findVirtual(String.class, \"toString\", \n" +
+						"        MethodType.methodType(String.class));\n" +
+						"    String actual = (String) mh.invoke(str);\n" +
+						"    assert \"test\".equals(actual);\n" +
+						"    Zork z;\n" +
+						"  }\n" +
+						"}\n"
+				},
+				// compiler options
+				null /* no class libraries */,
+				customOptions /* custom options */,
+				// compiler results
+				"----------\n" + /* expected compiler log */
+				"1. ERROR in X.java (at line 11)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n",
+				// javac options
+				JavacTestOptions.Excuse.EclipseWarningConfiguredAsError /* javac test options */);
+	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=386259 variation.
+	public void test010() {
+		Map customOptions = getCompilerOptions();
+		customOptions.put(CompilerOptions.OPTION_ReportUnnecessaryTypeCheck, CompilerOptions.ERROR);
+		runNegativeTest(
+				// test directory preparation
+				true /* flush output directory */,
+				new String[] { /* test files */
+						"X.java",
+						"import java.lang.invoke.MethodHandle;\n" +
+						"import java.lang.invoke.MethodHandles;\n" +
+						"import java.lang.invoke.MethodType;\n" +
+						"public class X {\n" +
+						"  public static void main(String[] args) throws Throwable {\n" +
+						"    String str = \"test\";\n" +
+						"    MethodHandle mh = MethodHandles.lookup().findVirtual(String.class, \"toString\", \n" +
+						"        MethodType.methodType(String.class));\n" +
+						"    Object actual = (Object) mh.invoke(str);\n" +
+						"    assert \"test\".equals(actual);\n" +
+						"    Zork z;\n" +
+						"  }\n" +
+						"}\n"
+				},
+				// compiler options
+				null /* no class libraries */,
+				customOptions /* custom options */,
+				// compiler results
+				"----------\n" + 
+				"1. ERROR in X.java (at line 9)\n" + 
+				"	Object actual = (Object) mh.invoke(str);\n" + 
+				"	                ^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+				"Unnecessary cast from Object to Object\n" + 
+				"----------\n" + 
+				"2. ERROR in X.java (at line 11)\n" + 
+				"	Zork z;\n" + 
+				"	^^^^\n" + 
+				"Zork cannot be resolved to a type\n" + 
+				"----------\n",
+				// javac options
+				JavacTestOptions.Excuse.EclipseWarningConfiguredAsError /* javac test options */);
+	}
 }
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 253c543..38adde2 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
@@ -53,7 +53,7 @@
 // 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[] { "testBug374129" };
+//		TESTS_NAMES = new String[] { "testBug385626" };
 //		TESTS_NUMBERS = new int[] { 561 };
 //		TESTS_RANGE = new int[] { 1, 2049 };
 }
@@ -3661,4 +3661,58 @@
 		libs,
 		true /* shouldFlush*/);
 }
+
+// Bug 385626 - @NonNull fails across loop boundaries
+public void testBug385626_1() {
+	runConformTestWithLibs(
+		new String[] {
+			"X.java",
+			"import java.util.ArrayList;\n" +
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public class X {\n" +
+			"    void test() {\n" +
+			"        for (Integer i : new ArrayList<Integer>()) {\n" +
+			"            if (i != null) {\n" +
+			"                for (Integer j : new ArrayList<Integer>()) {\n" +
+			"                    if (j != null) {\n" +
+			"                        @NonNull Integer j1 = i; // bogus error was here\n" +
+			"                    }\n" +
+			"                }\n" + 
+			"            }\n" +
+			"        }\n" +
+			"    }\n" +
+			"}\n"
+		},
+		null,//options
+		"");
+}
+
+// Bug 385626 - @NonNull fails across loop boundaries
+public void testBug385626_2() {
+	runConformTestWithLibs(
+		new String[] {
+			"X.java",
+			"import java.util.ArrayList;\n" +
+			"import org.eclipse.jdt.annotation.*;\n" +
+			"public class X {\n" +
+			"    void test(Integer j) {\n" +
+			"        for (Integer i : new ArrayList<Integer>()) {\n" +
+			"            if (i != null) {\n" +
+			"                try {\n" +
+			"                    if (j != null) {\n" +
+			"                        @NonNull Integer j1 = i;\n" +
+			"                    }\n" +
+			"                } finally {\n" +
+			"                    if (j != null) {\n" +
+			"                        @NonNull Integer j1 = i; // bogus error was here\n" +
+			"                    }\n" +
+			"                }\n" + 
+			"            }\n" +
+			"        }\n" +
+			"    }\n" +
+			"}\n"
+		},
+		null,//options
+		"");
+}
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
index 5cea094..f8c7d16 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java
@@ -22,6 +22,7 @@
  * 							bug 349326 - [1.7] new warning for missing try-with-resources
  * 							bug 360328 - [compiler][null] detect null problems in nested code (local class inside a loop)
  * 							bug 367879 - Incorrect "Potential null pointer access" warning on statement after try-with-resources within try-finally
+ * 							bug 383690 - [compiler] location of error re uninitialized final field should be aligned
  *******************************************************************************/
 package org.eclipse.jdt.core.tests.compiler.regression;
 
@@ -11005,9 +11006,9 @@
 			"  }\n" +
 			"}\n"},
 		"----------\n" +
-		"1. ERROR in X.java (at line 12)\n" +
-		"	class Inner extends X {\n" +
-		"	      ^^^^^\n" +
+		"1. ERROR in X.java (at line 20)\n" +
+		"	final int m164;\n" +
+		"	          ^^^^\n" +
 		"The blank final field m164 may not have been initialized\n" +
 		"----------\n");
 }
@@ -11070,11 +11071,11 @@
 			"    System.out.println((new Inner()).bar());\n" +
 			"  }\n" +
 			"}\n"},
-		"----------\n" +
-		"1. ERROR in X.java (at line 26)\n" +
-		"	class Inner extends X {\n" +
-		"	      ^^^^^\n" +
-		"The blank final field m164 may not have been initialized\n" +
+		"----------\n" + 
+		"1. ERROR in X.java (at line 34)\n" + 
+		"	final int m164;\n" + 
+		"	          ^^^^\n" + 
+		"The blank final field m164 may not have been initialized\n" + 
 		"----------\n");
 }
 
@@ -11879,9 +11880,11 @@
 				"        [pc: 4, line: 7]\n" + 
 				"        [pc: 26, line: 8]\n" + 
 				"        [pc: 30, line: 9]\n" + 
+				"        [pc: 38, line: 10]\n" + 
 				"        [pc: 41, line: 11]\n" + 
 				"        [pc: 49, line: 13]\n" + 
 				"        [pc: 53, line: 14]\n" + 
+				"        [pc: 61, line: 15]\n" + 
 				"        [pc: 64, line: 16]\n" + 
 				"        [pc: 72, line: 19]\n" + 
 				"      Local variable table:\n" + 
@@ -11931,9 +11934,11 @@
 						"        [pc: 4, line: 7]\n" + 
 						"        [pc: 26, line: 8]\n" + 
 						"        [pc: 30, line: 9]\n" + 
+						"        [pc: 38, line: 10]\n" + 
 						"        [pc: 41, line: 11]\n" + 
 						"        [pc: 49, line: 13]\n" + 
 						"        [pc: 53, line: 14]\n" + 
+						"        [pc: 61, line: 15]\n" + 
 						"        [pc: 64, line: 16]\n" + 
 						"        [pc: 72, line: 19]\n" + 
 						"      Local variable table:\n" + 
@@ -11982,9 +11987,11 @@
 						"        [pc: 4, line: 7]\n" + 
 						"        [pc: 26, line: 8]\n" + 
 						"        [pc: 30, line: 9]\n" + 
+						"        [pc: 38, line: 10]\n" + 
 						"        [pc: 41, line: 11]\n" + 
 						"        [pc: 49, line: 13]\n" + 
 						"        [pc: 53, line: 14]\n" + 
+						"        [pc: 61, line: 15]\n" + 
 						"        [pc: 64, line: 16]\n" + 
 						"        [pc: 72, line: 19]\n" + 
 						"      Local variable table:\n" + 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java
index 6c60003..df9dd79 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PolymorphicSignatureTest.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2011 IBM Corporation.
+ * Copyright (c) 2011, 2012 IBM Corporation.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -27,18 +27,34 @@
 		this.runConformTest(
 			new String[] {
 				"X.java",
-				"import java.lang.invoke.*;  \n" +
+				"import java.lang.invoke.*;\n" +
 				"public class X {\n" +
 				"   public static void main(String[] args) throws Throwable{\n" +
 				"      MethodType mt; MethodHandle mh; \n" +
 				"      MethodHandles.Lookup lookup = MethodHandles.lookup();\n" +
 				"      mt = MethodType.methodType(String.class, char.class, char.class);\n"+
 				"      mh = lookup.findVirtual(String.class, \"replace\", mt);\n"+
-	    		"      String s = (String) mh.invokeExact(\"daddy\",'d','n');\n"+
+				"      String s = (String) mh.invokeExact(\"daddy\",'d','n');\n"+
 				"      System.out.println(s);\n"+
 				"   }\n" +
 				"}\n"
 			},
 			"nanny");
 	}
+	public void test0002() {
+		this.runConformTest(
+			new String[] {
+				"X.java",
+				"import static java.lang.invoke.MethodHandles.*; \n" + 
+				"import java.lang.invoke.MethodHandle;\n" + 
+				"public class X {\n" + 
+				"	public static void main(String[] args) throws Throwable {\n" + 
+				"		MethodHandle mh = dropArguments(insertArguments(identity(int.class), 0, 42), 0, Object[].class);\n" + 
+				"		int value = (int)mh.invokeExact(new Object[0]);\n" +
+				"		System.out.println(value);\n"+
+				"	}\n" + 
+				"}"
+			},
+			"42");
+	}
 }
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 aa95982..35d56a5 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
@@ -112,7 +112,7 @@
 				"      Line numbers:\n" +
 				"        [pc: 0, line: 4]\n" +
 				"        [pc: 21, line: 6]\n" +
-				"        [pc: 32, line: 7]\n" +
+				"        [pc: 29, line: 7]\n" +
 				"        [pc: 33, line: 8]\n" +
 				"        [pc: 37, line: 10]\n" +
 				"      Local variable table:\n" +
@@ -293,7 +293,7 @@
 				"        [pc: 23, line: 11]\n" +
 				"        [pc: 26, line: 13]\n" +
 				"        [pc: 32, line: 15]\n" +
-				"        [pc: 40, line: 16]\n" +
+				"        [pc: 37, line: 16]\n" +
 				"        [pc: 42, line: 17]\n" +
 				"        [pc: 46, line: 19]\n" +
 				"        [pc: 51, line: 18]\n" +
@@ -310,7 +310,7 @@
 				"        [pc: 2, pc: 40] local: i index: 3 type: double\n" +
 				"        [pc: 46, pc: 51] local: i index: 3 type: double\n" +
 				"        [pc: 55, pc: 81] local: i index: 3 type: double\n" +
-				"        [pc: 12, pc: 40] local: j index: 5 type: int\n" +
+				"        [pc: 12, pc: 37] local: j index: 5 type: int\n" +
 				"        [pc: 19, pc: 32] local: d1 index: 6 type: double\n" +
 				"        [pc: 42, pc: 46] local: e index: 5 type: java.lang.NullPointerException\n" +
 				"        [pc: 66, pc: 81] local: j index: 5 type: long\n" +
@@ -412,7 +412,7 @@
 				"        [pc: 10, line: 6]\n" +
 				"        [pc: 13, line: 7]\n" +
 				"        [pc: 17, line: 8]\n" +
-				"        [pc: 24, line: 9]\n" +
+				"        [pc: 21, line: 9]\n" +
 				"        [pc: 25, line: 10]\n" +
 				"        [pc: 29, line: 12]\n" +
 				"        [pc: 40, line: 11]\n" +
@@ -423,7 +423,7 @@
 				"      Local variable table:\n" +
 				"        [pc: 0, pc: 60] local: b index: 0 type: boolean\n" +
 				"        [pc: 2, pc: 60] local: i index: 1 type: int\n" +
-				"        [pc: 17, pc: 24] local: j index: 2 type: int\n" +
+				"        [pc: 17, pc: 21] local: j index: 2 type: int\n" +
 				"        [pc: 25, pc: 29] local: e index: 2 type: java.lang.NullPointerException\n" +
 				"      Stack map table: number of frames 4\n" +
 				"        [pc: 24, full, stack: {java.lang.NullPointerException}, locals: {int, int}]\n" +
@@ -498,6 +498,7 @@
 				"      Line numbers:\n" +
 				"        [pc: 0, line: 4]\n" +
 				"        [pc: 4, line: 5]\n" +
+				"        [pc: 12, line: 6]\n" +
 				"        [pc: 15, line: 7]\n" +
 				"        [pc: 23, line: 9]\n" +
 				"        [pc: 29, line: 10]\n" +
@@ -945,6 +946,7 @@
 				"        [pc: 4, line: 4]\n" +
 				"        [pc: 6, line: 5]\n" +
 				"        [pc: 13, line: 6]\n" +
+				"        [pc: 21, line: 7]\n" +
 				"        [pc: 24, line: 8]\n" +
 				"        [pc: 32, line: 10]\n" +
 				"        [pc: 54, line: 11]\n" +
@@ -1138,6 +1140,7 @@
 				"        [pc: 11, line: 8]\n" +
 				"        [pc: 19, line: 9]\n" +
 				"        [pc: 24, line: 10]\n" +
+				"        [pc: 35, line: 11]\n" +
 				"        [pc: 38, line: 12]\n" +
 				"        [pc: 44, line: 14]\n" +
 				"        [pc: 64, line: 16]\n" +
@@ -1275,6 +1278,7 @@
 				"        [pc: 11, line: 7]\n" +
 				"        [pc: 19, line: 8]\n" +
 				"        [pc: 24, line: 9]\n" +
+				"        [pc: 32, line: 10]\n" +
 				"        [pc: 35, line: 11]\n" +
 				"        [pc: 37, line: 13]\n" +
 				"        [pc: 56, line: 15]\n" +
@@ -1371,7 +1375,7 @@
 			"        [pc: 0, line: 4]\n" +
 			"        [pc: 4, line: 5]\n" +
 			"        [pc: 6, line: 7]\n" +
-			"        [pc: 14, line: 8]\n" +
+			"        [pc: 11, line: 8]\n" +
 			"        [pc: 15, line: 4]\n" +
 			"        [pc: 23, line: 11]\n" +
 			"      Local variable table:\n" +
@@ -6473,8 +6477,10 @@
 			"    30  return\n" + 
 			"      Line numbers:\n" + 
 			"        [pc: 0, line: 5]\n" + 
+			"        [pc: 3, line: 4]\n" + 
 			"        [pc: 6, line: 6]\n" + 
 			"        [pc: 11, line: 7]\n" + 
+			"        [pc: 19, line: 8]\n" + 
 			"        [pc: 22, line: 9]\n" + 
 			"        [pc: 30, line: 11]\n" + 
 			"      Local variable table:\n" + 
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java
index a0678a8..db54f85 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/SwitchTest.java
@@ -365,14 +365,13 @@
 		"        [pc: 4, line: 6]\n" +
 		"        [pc: 28, line: 8]\n" +
 		"        [pc: 31, line: 10]\n" +
-		"        [pc: 33, line: 12]\n" +
-		"        [pc: 36, line: 13]\n" +
+		"        [pc: 33, line: 13]\n" +
 		"        [pc: 37, line: 15]\n" +
 		"        [pc: 45, line: 16]\n" +
 		"      Local variable table:\n" +
 		"        [pc: 0, pc: 46] local: args index: 0 type: java.lang.String[]\n" +
 		"        [pc: 2, pc: 46] local: x index: 1 type: boolean\n" +
-		"        [pc: 4, pc: 36] local: i index: 2 type: int\n";
+		"        [pc: 4, pc: 33] local: i index: 2 type: int\n";
 
 	File f = new File(OUTPUT_DIR + File.separator + "X.class");
 	byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f);
@@ -484,6 +483,7 @@
 			"        [pc: 13, line: 8]\n" +
 			"        [pc: 21, line: 9]\n" +
 			"        [pc: 26, line: 10]\n" +
+			"        [pc: 34, line: 11]\n" +
 			"        [pc: 37, line: 12]\n" +
 			"        [pc: 39, line: 14]\n" +
 			"        [pc: 60, line: 16]\n" +
@@ -559,6 +559,7 @@
 			"        [pc: 13, line: 8]\n" +
 			"        [pc: 21, line: 9]\n" +
 			"        [pc: 26, line: 10]\n" +
+			"        [pc: 34, line: 11]\n" +
 			"        [pc: 37, line: 12]\n" +
 			"        [pc: 39, line: 14]\n" +
 			"        [pc: 60, line: 16]\n" +
@@ -2157,7 +2158,7 @@
 			"1. WARNING in p\\X.java (at line 4)\n" +
 			"	switch (i) {\n" +
 			"	        ^\n" +
-			"The switch over the type int should have a default case\n" +
+			"The switch statement should have a default case\n" +
 			"----------\n",
 			null,
 			true,
@@ -2396,6 +2397,172 @@
 			"The local variable b may not have been initialized\n" + 
 			"----------\n");	
 }
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383629
+// To check that code gen is ok
+public void testBug383629() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"X.java",
+			"public class X {\n" +
+			"	  public static void main(String[] args) {\n" +           
+			"	    char  chc;         \n" +
+			"	     do {      \n" +                   
+			"	        if (args == null) {      \n" +                                       
+			"	           switch ('a') {     \n" +                                        
+			"	           case '\\n':      \n" +            
+			"	                 chc = 'b';\n" +
+			"	           }               \n" +
+			"	        } else {            \n" +   
+			"	           switch ('a') {       \n" +           
+			"	              case '\\r':\n" +
+			"	           }          \n" +     
+			"	        }\n" +
+			"	     } while (false);\n" +
+			"	     System.out.println(\"Done\");\n" +
+			"	  }\n" +
+			"}",
+		}); // custom requestor
+	
+	String expectedOutput = this.complianceLevel < ClassFileConstants.JDK1_6 ?
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 61] local: args index: 0 type: java.lang.String[]\n":
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 61] local: args index: 0 type: java.lang.String[]\n" + 
+				"      Stack map table: number of frames 4\n" + 
+				"        [pc: 24, same]\n" + 
+				"        [pc: 27, same]\n" + 
+				"        [pc: 30, same]\n" + 
+				"        [pc: 52, same]\n";
+	
+	File f = new File(OUTPUT_DIR + File.separator + "X.class");
+	byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f);
+	ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+	String result = disassembler.disassemble(classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED);
+	int index = result.indexOf(expectedOutput);
+	if (index == -1 || expectedOutput.length() == 0) {
+		System.out.println(Util.displayString(result, 3));
+	}
+	if (index == -1) {
+		assertEquals("Wrong contents", expectedOutput, result);
+	}
+}
+
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=381172
+// To check that code gen is ok
+public void testBug381172() throws Exception {
+	this.runConformTest(
+		new String[] {
+			"X.java",
+			"public class X {\n" + 
+			"    public static void main(String[] args){\n" + 
+			"        System.out.println(\"Test\");\n" + 
+			"    }\n" + 
+			"    public void method() {\n" + 
+			"        try {\n" + 
+			"            int rc;\n" + 
+			"            switch ( 0 )\n" + 
+			"            {\n" + 
+			"                case 0:\n" + 
+			"                    rc = 0;\n" + 
+			"                    setRC( rc );\n" + 
+			"                    break;\n" + 
+			"                case 1:\n" + 
+			"                    rc = 1;\n" + 
+			"                    setRC( 0 );\n" + 
+			"                    break;\n" + 
+			"                case 2:\n" + 
+			"                    rc = 2;\n" + 
+			"                    setRC( 0 );\n" + 
+			"                    break;\n" + 
+			"                default:\n" + 
+			"                    break;\n" + 
+			"            }\n" + 
+			"        }\n" + 
+			"        catch ( final Exception ex ) {}\n" + 
+			"    }\n" + 
+			"    private void setRC(int rc) {}\n" + 
+			"}",
+		}); // custom requestor
+	
+	String expectedOutput = this.complianceLevel < ClassFileConstants.JDK1_6 ?
+			"      Local variable table:\n" + 
+			"        [pc: 0, pc: 1] local: this index: 0 type: X\n" + 
+			"        [pc: 0, pc: 1] local: rc index: 1 type: int\n":
+				"      Local variable table:\n" + 
+				"        [pc: 0, pc: 63] local: this index: 0 type: X\n" + 
+				"        [pc: 30, pc: 38] local: rc index: 1 type: int\n" + 
+				"        [pc: 40, pc: 48] local: rc index: 1 type: int\n" + 
+				"        [pc: 50, pc: 58] local: rc index: 1 type: int\n" + 
+				"      Stack map table: number of frames 6\n" + 
+				"        [pc: 28, same]\n" + 
+				"        [pc: 38, same]\n" + 
+				"        [pc: 48, same]\n" + 
+				"        [pc: 58, same]\n" + 
+				"        [pc: 61, same_locals_1_stack_item, stack: {java.lang.Exception}]\n" + 
+				"        [pc: 62, same]\n";
+	
+	File f = new File(OUTPUT_DIR + File.separator + "X.class");
+	byte[] classFileBytes = org.eclipse.jdt.internal.compiler.util.Util.getFileByteContent(f);
+	ClassFileBytesDisassembler disassembler = ToolFactory.createDefaultClassFileBytesDisassembler();
+	String result = disassembler.disassemble(classFileBytes, "\n", ClassFileBytesDisassembler.DETAILED);
+	int index = result.indexOf(expectedOutput);
+	if (index == -1 || expectedOutput.length() == 0) {
+		System.out.println(Util.displayString(result, 3));
+	}
+	if (index == -1) {
+		assertEquals("Wrong contents", expectedOutput, result);
+	}
+}
+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383643, NPE in problem reporter.
+public void test383643() {
+	Map options = getCompilerOptions();
+	options.put(JavaCore.COMPILER_PB_SWITCH_MISSING_DEFAULT_CASE, JavaCore.WARNING);
+	this.runNegativeTest(
+			new String[] {
+					"X.java",
+					"public class X {\n" +
+					"    void foo() {\n" +
+					"        String s;\n" +
+					"        switch (p) {\n" +
+					"            case ONE:\n" +
+					"                s= \"1\";\n" +
+					"                break;\n" +
+					"            case TWO:\n" +
+					"                s= \"2\";\n" +
+					"                break;\n" +
+					"        }\n" +
+					"\n" +
+					"        s.toString();\n" +
+					"    }\n" +
+					"}\n",
+				},
+			"----------\n" + 
+			"1. ERROR in X.java (at line 4)\n" + 
+			"	switch (p) {\n" + 
+			"	        ^\n" + 
+			"p cannot be resolved to a variable\n" + 
+			"----------\n" + 
+			"2. WARNING in X.java (at line 4)\n" + 
+			"	switch (p) {\n" + 
+			"	        ^\n" + 
+			"The switch statement should have a default case\n" + 
+			"----------\n" + 
+			"3. ERROR in X.java (at line 5)\n" + 
+			"	case ONE:\n" + 
+			"	     ^^^\n" + 
+			"ONE cannot be resolved to a variable\n" + 
+			"----------\n" + 
+			"4. ERROR in X.java (at line 8)\n" + 
+			"	case TWO:\n" + 
+			"	     ^^^\n" + 
+			"TWO cannot be resolved to a variable\n" + 
+			"----------\n",
+			null,
+			true,
+			options
+		);	
+}
 public static Class testClass() {
 	return SwitchTest.class;
 }
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java
index 49dced1..6f61716 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TryStatementTest.java
@@ -904,7 +904,7 @@
 
 	String expectedOutput =
 		"      Local variable table:\n" +
-		"        [pc: 6, pc: 21] local: i index: 0 type: int\n" +
+		"        [pc: 6, pc: 20] local: i index: 0 type: int\n" +
 		"        [pc: 16, pc: 20] local: e index: 1 type: java.lang.Throwable\n";
 
 	File f = new File(OUTPUT_DIR + File.separator + "X.class");
@@ -956,7 +956,6 @@
 		"      Local variable table:\n" +
 		"        [pc: 0, pc: 20] local: this index: 0 type: X\n" +
 		"        [pc: 0, pc: 20] local: b index: 1 type: boolean\n" +
-		"        [pc: 6, pc: 9] local: i index: 2 type: int\n" +
 		"        [pc: 10, pc: 14] local: e index: 2 type: java.lang.Exception\n";
 
 	File f = new File(OUTPUT_DIR + File.separator + "X.class");
@@ -3681,7 +3680,7 @@
 				"        [pc: 0, line: 50]\n" +
 				"        [pc: 7, line: 51]\n" +
 				"        [pc: 28, line: 52]\n" +
-				"        [pc: 29, line: 53]\n" +
+				"        [pc: 29, line: 55]\n" +
 				"        [pc: 32, line: 56]\n" +
 				"        [pc: 37, line: 58]\n" +
 				"      Local variable table:\n" +
@@ -3828,7 +3827,7 @@
 			"        [pc: 0, line: 50]\n" +
 			"        [pc: 7, line: 51]\n" +
 			"        [pc: 28, line: 52]\n" +
-			"        [pc: 29, line: 53]\n" +
+			"        [pc: 29, line: 55]\n" +
 			"        [pc: 32, line: 56]\n" +
 			"        [pc: 37, line: 58]\n" +
 			"      Local variable table:\n" +
@@ -4056,7 +4055,7 @@
 			"        [pc: 0, line: 46]\n" +
 			"        [pc: 7, line: 47]\n" +
 			"        [pc: 28, line: 48]\n" +
-			"        [pc: 36, line: 49]\n" +
+			"        [pc: 36, line: 51]\n" +
 			"        [pc: 39, line: 52]\n" +
 			"        [pc: 44, line: 54]\n" +
 			"      Local variable table:\n" +
@@ -4217,7 +4216,7 @@
 			"        [pc: 0, line: 46]\n" +
 			"        [pc: 7, line: 47]\n" +
 			"        [pc: 28, line: 48]\n" +
-			"        [pc: 36, line: 49]\n" +
+			"        [pc: 36, line: 51]\n" +
 			"        [pc: 39, line: 52]\n" +
 			"        [pc: 44, line: 54]\n" +
 			"      Local variable table:\n" +
@@ -4415,7 +4414,7 @@
 				"        [pc: 0, line: 46]\n" +
 				"        [pc: 7, line: 47]\n" +
 				"        [pc: 28, line: 48]\n" +
-				"        [pc: 31, line: 49]\n" +
+				"        [pc: 31, line: 51]\n" +
 				"        [pc: 34, line: 52]\n" +
 				"        [pc: 39, line: 54]\n" +
 				"      Local variable table:\n" +
@@ -4545,7 +4544,7 @@
 			"        [pc: 0, line: 46]\n" +
 			"        [pc: 7, line: 47]\n" +
 			"        [pc: 28, line: 48]\n" +
-			"        [pc: 31, line: 49]\n" +
+			"        [pc: 31, line: 51]\n" +
 			"        [pc: 34, line: 52]\n" +
 			"        [pc: 39, line: 54]\n" +
 			"      Local variable table:\n" +
@@ -4618,8 +4617,7 @@
 			"        [pc: 2, line: 8]\n" +
 			"        [pc: 4, line: 9]\n" +
 			"        [pc: 7, line: 10]\n" +
-			"        [pc: 16, line: 11]\n" +
-			"        [pc: 19, line: 13]\n" +
+			"        [pc: 16, line: 13]\n" +
 			"        [pc: 20, line: 15]\n" +
 			"      Local variable table:\n" +
 			"        [pc: 2, pc: 22] local: count index: 0 type: int\n" +
@@ -4648,8 +4646,7 @@
 			"        [pc: 2, line: 8]\n" +
 			"        [pc: 4, line: 9]\n" +
 			"        [pc: 7, line: 10]\n" +
-			"        [pc: 16, line: 11]\n" +
-			"        [pc: 19, line: 13]\n" +
+			"        [pc: 16, line: 13]\n" +
 			"        [pc: 20, line: 15]\n" +
 			"      Local variable table:\n" +
 			"        [pc: 2, pc: 22] local: count index: 0 type: int\n" +
@@ -4784,11 +4781,11 @@
 			"      Line numbers:\n" +
 			"        [pc: 0, line: 5]\n" +
 			"        [pc: 7, line: 6]\n" +
-			"        [pc: 17, line: 7]\n" +
+			"        [pc: 14, line: 7]\n" +
 			"        [pc: 18, line: 9]\n" +
 			"      Local variable table:\n" +
 			"        [pc: 0, pc: 19] local: args index: 0 type: java.lang.String[]\n" +
-			"        [pc: 3, pc: 17] local: val index: 1 type: int\n"
+			"        [pc: 3, pc: 14] local: val index: 1 type: int\n"
 		:
 			"  // Method descriptor #15 ([Ljava/lang/String;)V\n" +
 			"  // Stack: 2, Locals: 2\n" +
@@ -4808,11 +4805,11 @@
 			"      Line numbers:\n" +
 			"        [pc: 0, line: 5]\n" +
 			"        [pc: 7, line: 6]\n" +
-			"        [pc: 17, line: 7]\n" +
+			"        [pc: 14, line: 7]\n" +
 			"        [pc: 18, line: 9]\n" +
 			"      Local variable table:\n" +
 			"        [pc: 0, pc: 19] local: args index: 0 type: java.lang.String[]\n" +
-			"        [pc: 3, pc: 17] local: val index: 1 type: int\n" +
+			"        [pc: 3, pc: 14] local: val index: 1 type: int\n" +
 			"      Stack map table: number of frames 3\n" +
 			"        [pc: 7, append: {int}]\n" +
 			"        [pc: 17, full, stack: {java.lang.Exception}, locals: {java.lang.String[]}]\n" +
@@ -5275,12 +5272,12 @@
 			"        [pc: 53, pc: 56] -> 34 when : any\n" +
 			"      Line numbers:\n" +
 			"        [pc: 0, line: 5]\n" +
-			"        [pc: 11, line: 6]\n" +
+			"        [pc: 8, line: 6]\n" +
 			"        [pc: 15, line: 8]\n" +
 			"        [pc: 17, line: 6]\n" +
 			"        [pc: 18, line: 7]\n" +
 			"        [pc: 26, line: 8]\n" +
-			"        [pc: 34, line: 9]\n" +
+			"        [pc: 31, line: 9]\n" +
 			"        [pc: 39, line: 11]\n" +
 			"        [pc: 42, line: 9]\n" +
 			"        [pc: 43, line: 10]\n" +
@@ -5321,11 +5318,11 @@
 			"        [pc: 0, pc: 33] -> 33 when : any\n" +
 			"      Line numbers:\n" +
 			"        [pc: 0, line: 5]\n" +
-			"        [pc: 11, line: 6]\n" +
+			"        [pc: 8, line: 6]\n" +
 			"        [pc: 12, line: 7]\n" +
 			"        [pc: 20, line: 8]\n" +
 			"        [pc: 22, line: 7]\n" +
-			"        [pc: 33, line: 9]\n" +
+			"        [pc: 30, line: 9]\n" +
 			"        [pc: 34, line: 10]\n" +
 			"        [pc: 42, line: 11]\n" +
 			"        [pc: 44, line: 10]\n" +
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 536723b..e2752d0 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,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2011 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
@@ -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[] { "test000" };
+//		TESTS_NAMES = new String[] { "test070b" };
 //		TESTS_NUMBERS = new int[] { 61 };
 //		TESTS_RANGE = new int[] { 11, -1 };
 	}
@@ -798,6 +798,55 @@
 			"----------\n"
 		);
 	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383780
+	public void test015_tolerate() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		Map options = getCompilerOptions();
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel >= ClassFileConstants.JDK1_7) {
+			this.runNegativeTest(
+					new String[] {
+							"X.java",
+							"public class X {\n" +
+							"	public static void main(String[] s) {\n" +
+							"		Y.count(new int[0]);\n" + // for some reason this is not ambiguous
+							"	}\n" +
+							"}\n" +
+							"class Y {\n" +
+							"	public static void count(int[] array, int ... values) { System.out.print(1); }\n" +
+							"	public static void count(int[] array, int[] ... values) { System.out.print(2); }\n" +
+							"}\n",
+				},
+				"----------\n" + 
+				"1. ERROR in X.java (at line 3)\n" + 
+				"	Y.count(new int[0]);\n" + 
+				"	  ^^^^^\n" + 
+				"The method count(int[], int[]) is ambiguous for the type Y\n" + 
+				"----------\n",
+				null, true, options);
+			} else {
+				this.runConformTest(
+					new String[] {
+							"X.java",
+							"public class X {\n" +
+							"	public static void main(String[] s) {\n" +
+							"		Y.count(new int[0]);\n" + // for some reason this is not ambiguous
+							"	}\n" +
+							"}\n" +
+							"class Y {\n" +
+							"	public static void count(int[] array, int ... values) { System.out.print(1); }\n" +
+							"	public static void count(int[] array, int[] ... values) { System.out.print(2); }\n" +
+							"}\n",
+				},
+				"1", 
+				null, true, null, options, null);
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+	}
 
 	public void test016() { // check behaviour of Scope.mostSpecificMethodBinding()
 		this.runNegativeTest( // but this call is ambiguous
@@ -1235,7 +1284,7 @@
 			},
 			"1");
 	}
-	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=102631
+ 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=102631
 	public void test033() {
 		this.runNegativeTest(
 			new String[] {
@@ -1302,6 +1351,61 @@
 			"----------\n"
 		);
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383780
+	public void test033_tolerate() {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		Map options = getCompilerOptions();
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel >= ClassFileConstants.JDK1_7) {
+				this.runNegativeTest(
+					new String[] {
+						"X.java",
+						"public class X {\n" +
+						"	void a(boolean b, Object... o) {System.out.print(1);}\n" +
+						"	void a(Object... o) {System.out.print(2);}\n" +
+						"	public static void main(String[] args) {\n" +
+						"		X x = new X();\n" +
+						"		x.a(true);\n" +
+						"		x.a(true, \"foobar\");\n" +
+						"		x.a(\"foo\", \"bar\");\n" +
+						"	}\n" +
+						"}\n",
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 6)\n" + 
+					"	x.a(true);\n" + 
+					"	  ^\n" + 
+					"The method a(boolean, Object[]) is ambiguous for the type X\n" + 
+					"----------\n" + 
+					"2. ERROR in X.java (at line 7)\n" + 
+					"	x.a(true, \"foobar\");\n" + 
+					"	  ^\n" + 
+					"The method a(boolean, Object[]) is ambiguous for the type X\n" + 
+					"----------\n",
+					null, true, options);
+			} else {
+				this.runConformTest(
+						new String[] {
+							"X.java",
+							"public class X {\n" +
+							"	void a(boolean b, Object... o) {System.out.print(1);}\n" +
+							"	void a(Object... o) {System.out.print(2);}\n" +
+							"	public static void main(String[] args) {\n" +
+							"		X x = new X();\n" +
+							"		x.a(true);\n" +
+							"		x.a(true, \"foobar\");\n" +
+							"		x.a(\"foo\", \"bar\");\n" +
+							"	}\n" +
+							"}\n",
+						},
+						"112",
+						null, true, null, options, null);
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+	}
 	//https://bugs.eclipse.org/bugs/show_bug.cgi?id=106106
 	public void test034() {
 		this.runConformTest(
@@ -2818,6 +2922,106 @@
 			},
 			"Done");
 	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383780
+	public void test070_tolerate() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		Map options = getCompilerOptions();
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel < ClassFileConstants.JDK1_7) {
+				this.runNegativeTest(
+					new String[] {
+						"X.java",
+						"public class X {\n" +
+						"        public static void foo(int ...i) {}\n" +
+						"        public static void foo(double...d) {}\n" +
+						"        public static void main(String[] args) {\n" +
+						"            foo(1, 2, 3);\n" +
+						"            System.out.println (\"Done\");\n" +
+						"        }\n" +
+						"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 5)\n" + 
+					"	foo(1, 2, 3);\n" + 
+					"	^^^\n" + 
+					"The method foo(int[]) is ambiguous for the type X\n" + 
+					"----------\n", 
+					null, true, options);
+			} else {
+				this.runConformTest(
+						new String[] {
+							"X.java",
+							"public class X {\n" +
+							"        public static void foo(int ...i) {}\n" +
+							"        public static void foo(double...d) {}\n" +
+							"        public static void main(String[] args) {\n" +
+							"            foo(1, 2, 3);\n" +
+							"            System.out.println (\"Done\");\n" +
+							"        }\n" +
+							"}\n"
+						},
+						"Done", 
+						null, true, null, options, null);
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+		
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383780
+	public void test070_tolerate2() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		Map options = getCompilerOptions();
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel >= ClassFileConstants.JDK1_7) {
+				this.runNegativeTest(
+					new String[] {
+						"X.java",
+						"import java.util.Arrays;\n" +
+						"public class X {\n" +
+						"        public static void test(int... a) {\n" +
+						"			System.out.println(Arrays.toString(a));\n}\n" +
+						"        public static <T> void test(Object... a) {\n" +
+						"			System.out.println(Arrays.toString(a));\n}\n" +
+						"        public static void main(String[] args) {\n" +
+						"            test(1);\n" +
+						"        }\n" +
+						"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 10)\n" + 
+					"	test(1);\n" + 
+					"	^^^^\n" + 
+					"The method test(int[]) is ambiguous for the type X\n" + 
+					"----------\n", 
+					null, true, options);
+			} else {
+				this.runConformTest(
+						new String[] {
+								"X.java",
+								"import java.util.Arrays;\n" +
+								"public class X {\n" +
+								"        public static void test(int... a) {\n" +
+								"			System.out.println(Arrays.toString(a));\n}\n" +
+								"        public static <T> void test(Object... a) {\n" +
+								"			System.out.println(Arrays.toString(a));\n}\n" +
+								"        public static void main(String[] args) {\n" +
+								"            test(1);\n" +
+								"        }\n" +
+								"}\n"
+						},
+						"[1]", 
+						null, true, null, options, null);
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+		
+	}
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=346038
 	public void test070a() throws Exception {
 		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
@@ -2835,6 +3039,52 @@
 			},
 			"Done");
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383780
+	public void test070a_tolerate() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		Map options = getCompilerOptions();
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel < ClassFileConstants.JDK1_7) {
+				this.runNegativeTest(
+					new String[] {
+						"X.java",
+						"public class X {\n" +
+						"        public static <T> void foo(int ...i) {}\n" +
+						"        public static <T> void foo(double...d) {}\n" +
+						"        public static void main(String[] args) {\n" +
+						"            foo(1, 2, 3);\n" +
+						"            System.out.println (\"Done\");\n" +
+						"        }\n" +
+						"}\n"
+					},
+					"----------\n" + 
+					"1. ERROR in X.java (at line 5)\n" + 
+					"	foo(1, 2, 3);\n" + 
+					"	^^^\n" + 
+					"The method foo(int[]) is ambiguous for the type X\n" + 
+					"----------\n", 
+					null, true, options);
+			} else {
+				this.runConformTest(
+						new String[] {
+							"X.java",
+							"public class X {\n" +
+							"        public static <T> void foo(int ...i) {}\n" +
+							"        public static <T> void foo(double...d) {}\n" +
+							"        public static void main(String[] args) {\n" +
+							"            foo(1, 2, 3);\n" +
+							"            System.out.println (\"Done\");\n" +
+							"        }\n" +
+							"}\n"
+						},
+						"Done", 
+						null, true, null, options, null);
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+	}
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=346038
 	public void test070b() throws Exception {
 		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
@@ -2851,6 +3101,41 @@
 			},
 			"");
 	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383780
+	public void test070b_tolerate() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		String[] src = new String[] {
+				"X.java",
+				"public class X {\n" +
+				"        public static void foo(int ...i) {}\n" +
+				"        public static void foo(double d1, double...d) {}\n" +
+				"        public static void main(String[] args) {\n" +
+				"            foo(1, 2, 3);     // foo NOT flagged ambiguous\n" +
+				"        }\n" +
+				"}\n" 
+			};
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel >= ClassFileConstants.JDK1_7) {
+				this.runConformTest(
+					src,
+					"");
+			} else {
+				this.runNegativeTest(
+						src,
+						"----------\n" + 
+						"1. ERROR in X.java (at line 5)\n" + 
+						"	foo(1, 2, 3);     // foo NOT flagged ambiguous\n" + 
+						"	^^^\n" + 
+						"The method foo(int[]) is ambiguous for the type X\n" + 
+						"----------\n");
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+	}
+	
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=346038
 	public void test070c() { // check behaviour of Scope.mostSpecificMethodBinding()
 		this.runNegativeTest(
@@ -2935,6 +3220,48 @@
 			},
 			"1");
 	}
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=383780
+	public void test071_tolerate() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		String[] src = 
+			new String[] {
+				"X.java",
+				"public class X implements IClass{\n" +
+				"    X(IClass c, X t, IType... args) {\n" +
+				"	     System.out.println (\"1\");\n" +
+				"    }\n" +
+				"    X(IClass c, IType... args) {\n" +
+				"	    System.out.println (\"2\");\n" +
+				"    }\n" +
+				"    public static void main(String args[]) {\n" +
+				"        IClass c = null;\n" +
+				"        X t = null;\n" +
+				"        X t2 = new X(c, t);     // incorrectly flagged ambiguous\n" +
+				"    }\n" +
+				"}\n" +
+				"interface IType{}\n" +
+				"interface IClass extends IType{}\n"
+			};
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel >= ClassFileConstants.JDK1_7) {
+				this.runConformTest(
+					src,
+					"1");
+			} else {
+				this.runNegativeTest(
+						src,
+						"----------\n" + 
+						"1. ERROR in X.java (at line 11)\n" + 
+						"	X t2 = new X(c, t);     // incorrectly flagged ambiguous\n" + 
+						"	       ^^^^^^^^^^^\n" + 
+						"The constructor X(IClass, X, IType[]) is ambiguous\n" + 
+						"----------\n");
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+	}
 	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=364672
 	public void test072() {
 		this.runConformTest(
@@ -3010,4 +3337,87 @@
 			"The constructor B(A...) of type B is not applicable as the formal varargs element type A is not accessible here\n" + 
 			"----------\n");
 	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=382469
+	public void testBug382469() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		String[] src = 
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"    private static void bar(Object... objs) {\n" +
+				"	     System.out.println (\"1\");\n" +
+				"    }\n" +
+				"    private static void bar(int intValue, Object... objs) {\n" +
+				"	     System.out.println (\"2\");\n" +
+				"    }\n" +
+				"    public static void main(String args[]) {\n" +
+				"        bar(5);\n" +
+				"    }\n" +
+				"}\n"
+			};
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel < ClassFileConstants.JDK1_7) {
+				this.runConformTest(
+					src,
+					"2");
+			} else {
+				this.runNegativeTest(
+						src,
+						"----------\n" + 
+						"1. WARNING in X.java (at line 5)\n" + 
+						"	private static void bar(int intValue, Object... objs) {\n" + 
+						"	                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
+						"The method bar(int, Object...) from the type X is never used locally\n" + 
+						"----------\n" + 
+						"2. ERROR in X.java (at line 9)\n" + 
+						"	bar(5);\n" + 
+						"	^^^\n" + 
+						"The method bar(Object[]) is ambiguous for the type X\n" + 
+						"----------\n");
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+	}
+	
+	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=386361
+	public void testBug386361() throws Exception {
+		if (this.complianceLevel < ClassFileConstants.JDK1_5) return;
+		String[] src = 
+			new String[] {
+				"X.java",
+				"public class X {\n" +
+				"    public static void test(int i, Object... objects) {\n" +
+				"	     System.out.println (\"1\");\n" +
+				"    }\n" +
+				"    public static void test(Object... objects) {\n" +
+				"	     System.out.println (\"2\");\n" +
+				"    }\n" +
+				"    public static void main(String args[]) {\n" +
+				"        test(1,\"test\");\n" +
+				"    }\n" +
+				"}\n"
+			};
+		try {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "true");
+			if (this.complianceLevel < ClassFileConstants.JDK1_7) {
+				this.runConformTest(
+					src,
+					"1");
+			} else {
+				this.runNegativeTest(
+						src,
+						"----------\n" + 
+						"1. ERROR in X.java (at line 9)\n" + 
+						"	test(1,\"test\");\n" + 
+						"	^^^^\n" + 
+						"The method test(int, Object[]) is ambiguous for the type X\n" + 
+						"----------\n");
+			}
+		} finally {
+			System.setProperty("tolerateIllegalAmbiguousVarargsInvocation", "false");
+		}
+	}
 }
\ No newline at end of file
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 82acc8c..eeffbcc 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, 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
@@ -76,10 +76,18 @@
 						break;
 					case RANDOM_ORDER_JDT:
 						String version = new Main(null/*outWriter*/, null/*errWriter*/, false/*systemExit*/, null/*options*/, null/*progress*/).bind("compiler.version");
+						version = version.substring(0, version.indexOf(','));
 						try {
-							String v_number = version.substring(2, 5);
-							ordering = Long.parseLong(v_number);
-							System.err.println("Note that tests will be run in random order using seed="+v_number+" (ie. JDT/Core version)");
+							// https://bugs.eclipse.org/bugs/show_bug.cgi?id=384531
+							// compiler.version is a timestamp since the the above fix (of the format: v20120725-181921)
+							StringBuffer buffer = new StringBuffer();
+							for (int i = 0; i < version.length(); i++) {
+								if (Character.isDigit(version.charAt(i))) {
+									buffer.append(version.charAt(i));
+								}
+							}
+							ordering = Long.parseLong(buffer.toString());
+							System.err.println("Note that tests will be run in random order using seed="+ordering+" (ie. JDT/Core version)");
 						}
 						catch (NumberFormatException nfe) {
 							System.err.println("Cannot extract valid JDT/Core version number from 'compiler.version': "+version+" => no order will be finally used...");
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 70415af..52d132f 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,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
@@ -718,8 +718,6 @@
 /**
  * Search the user hard-drive for a Java class library.
  * Returns null if none could be found.
- *
- * Example of use: [org.eclipse.jdt.core.tests.util.Util.getJavaClassLib()]
 */
 public static String[] getJavaClassLibs() {
 	// check bootclasspath properties for Sun, JRockit and Harmony VMs