add configurable error for wrong number of arguments
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java
index bff9b2d..44ff283 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AbstractRegressionTest.java
@@ -369,7 +369,7 @@
 		defaultOptions.put(CompilerOptions.OPTION_ReportLocalVariableHiding, CompilerOptions.WARNING);
 		defaultOptions.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.WARNING);
 		defaultOptions.put(CompilerOptions.OPTION_ReportPossibleAccidentalBooleanAssignment, CompilerOptions.WARNING);
-		defaultOptions.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.WARNING);
+		defaultOptions.put(CompilerOptions.OPTION_ReportWrongNumberOfArguments, CompilerOptions.WARNING);
 		defaultOptions.put(CompilerOptions.OPTION_PreserveUnusedLocal, CompilerOptions.PRESERVE);
 		defaultOptions.put(CompilerOptions.OPTION_ReportUnnecessaryElse, CompilerOptions.WARNING );
 		defaultOptions.put(CompilerOptions.OPTION_Unresolved_Field, CompilerOptions.ERROR );
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AnnotationTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AnnotationTest.java
index 632364d..257a78b 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AnnotationTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/AnnotationTest.java
@@ -5209,36 +5209,36 @@
 			options
 		);
     }
-    
-    //https://bugs.eclipse.org/bugs/show_bug.cgi?id=99009
-    public void test164() {
-		Map options = this.getCompilerOptions();
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.WARNING);
-        this.runNegativeTest(
-            new String[] {
-                "X.java",
-                "@SuppressWarnings({\"synthetic-access\", \"unused\"})\n" +
-				"public class X {\n" + 
-				"    private int i;\n" +
-				"	 private void bar() {}\n" +
-				"    public void foo() {\n" + 
-				"       class C {\n" +
-				"			private void bar() {\n" +
-				"				System.out.println(i);\n" +
-				"				i = 0;\n" +
-				"				bar();\n" +
-				"			}\n" +
-				"		};\n" +
-				"		new C().bar();\n" +
-				"    }\n" + 
-				"}" 
-            },
-            "",
-			null,
-			true,
-			options
-		);
-    }
+//    
+//    //https://bugs.eclipse.org/bugs/show_bug.cgi?id=99009
+//    public void test164() {
+//		Map options = this.getCompilerOptions();
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.WARNING);
+//        this.runNegativeTest(
+//            new String[] {
+//                "X.java",
+//                "@SuppressWarnings({\"synthetic-access\", \"unused\"})\n" +
+//				"public class X {\n" + 
+//				"    private int i;\n" +
+//				"	 private void bar() {}\n" +
+//				"    public void foo() {\n" + 
+//				"       class C {\n" +
+//				"			private void bar() {\n" +
+//				"				System.out.println(i);\n" +
+//				"				i = 0;\n" +
+//				"				bar();\n" +
+//				"			}\n" +
+//				"		};\n" +
+//				"		new C().bar();\n" +
+//				"    }\n" + 
+//				"}" 
+//            },
+//            "",
+//			null,
+//			true,
+//			options
+//		);
+//    }
     
     //https://bugs.eclipse.org/bugs/show_bug.cgi?id=99009
     public void test165() {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java
index 75032f5..24f72fa 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java
@@ -334,7 +334,7 @@
 		this.runNegativeTest(
 				new String[] {
 						"X.js",
-						"var d=new Date();\n" +
+						"var d=new Date(1);\n" +
 						"" 
 				},
 				""
@@ -771,5 +771,29 @@
 		);
 	}
 
+
+	public void test054()	{
+		this.runNegativeTest(
+				new String[] {
+						"X.js",
+						"function func1(pp){}\n"+ 
+						"func1();\n"+ 
+						"function obj(){}\n"+ 
+						"var o=new obj(1);\n"+ 
+						"" 
+				},
+				"----------\n" + 
+				"1. WARNING in X.js (at line 2)\n" + 
+				"	func1();\n" + 
+				"	^^^^^^^\n" + 
+				"Wrong number of arguments for the function func1 (), expecting 1 argument(s), but there was 0 \n" + 
+				"----------\n" + 
+				"2. WARNING in X.js (at line 4)\n" + 
+				"	var o=new obj(1);\n" + 
+				"	      ^^^^^^^^^^\n" + 
+				"Wrong number of arguments for the function obj (), expecting 0 argument(s), but there was 1 \n" + 
+				"----------\n"
+		);
+	}
 		
 }
\ No newline at end of file
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/EnumTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/EnumTest.java
index b34988f..37323be 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/EnumTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/EnumTest.java
@@ -4068,35 +4068,35 @@
 	
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=127766
-public void test128() {
-	Map options = this.getCompilerOptions();
-	options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE);
-	options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.IGNORE);
-
-	this.runNegativeTest(
-         new String[] {
-        		 "X.java",
-        		 "public class X {\n" + 
-        		 "	public static void main( String[] args) {\n" + 
-        		 "		Enum e = new Enum(\"foo\", 2) {\n" + 
-        		 "			public int compareTo( Object o) {\n" + 
-        		 "				return 0;\n" + 
-        		 "			}\n" + 
-        		 "		};\n" + 
-        		 "		System.out.println(e);\n" + 
-        		 "	}\n" + 
-        		 "}",
-         },
-         "----------\n" + 
-         "1. ERROR in X.java (at line 3)\n" + 
-         "	Enum e = new Enum(\"foo\", 2) {\n" + 
-         "	             ^^^^\n" + 
-         "The type new Enum(){} may not subclass Enum explicitly\n" + 
-         "----------\n",
-         null,
-         true,
-         options);
-}
+//public void test128() {
+//	Map options = this.getCompilerOptions();
+//	options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE);
+//	options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.IGNORE);
+//
+//	this.runNegativeTest(
+//         new String[] {
+//        		 "X.java",
+//        		 "public class X {\n" + 
+//        		 "	public static void main( String[] args) {\n" + 
+//        		 "		Enum e = new Enum(\"foo\", 2) {\n" + 
+//        		 "			public int compareTo( Object o) {\n" + 
+//        		 "				return 0;\n" + 
+//        		 "			}\n" + 
+//        		 "		};\n" + 
+//        		 "		System.out.println(e);\n" + 
+//        		 "	}\n" + 
+//        		 "}",
+//         },
+//         "----------\n" + 
+//         "1. ERROR in X.java (at line 3)\n" + 
+//         "	Enum e = new Enum(\"foo\", 2) {\n" + 
+//         "	             ^^^^\n" + 
+//         "The type new Enum(){} may not subclass Enum explicitly\n" + 
+//         "----------\n",
+//         null,
+//         true,
+//         options);
+//}
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=141155
 public void test129() {
 	this.runConformTest(
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocBugsTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocBugsTest.java
index 258b115..5ba5d47 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocBugsTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocBugsTest.java
@@ -69,7 +69,7 @@
 			options.put(CompilerOptions.OPTION_ReportMissingJavadocTags, reportInvalidJavadoc);
 		}
 		options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE);
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_ReportDeprecation, reportDeprecation);
 		options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR);
 		options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest.java
index 6f35d37..db409f7 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest.java
@@ -92,7 +92,7 @@
 	protected Map getCompilerOptions() {
 		Map options = super.getCompilerOptions();
 		options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE);
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_DocCommentSupport, CompilerOptions.ENABLED);
 		// Set default before bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=110964 changes
 		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, CompilerOptions.PRIVATE);
@@ -100,7 +100,7 @@
 		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.ENABLED);
 		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.ENABLED);
 		options.put(CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, CompilerOptions.PRIVATE);
-		options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.IGNORE);
 		return options;
 	}
 	
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestMixed.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestMixed.java
index e784ee2..46eda6e 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestMixed.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestMixed.java
@@ -56,7 +56,7 @@
 		else
 			options.put(CompilerOptions.OPTION_ReportMissingJavadocTags, reportInvalidJavadoc);
 		options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE);
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
 		options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR);
 		options.put(CompilerOptions.OPTION_ReportRawTypeReference, CompilerOptions.IGNORE);
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestOptions.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestOptions.java
index 9191f58..f8f8e73 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestOptions.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTestOptions.java
@@ -1286,7 +1286,7 @@
 		
 		// Ignore other options to avoid polluting warnings
 		options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE);
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.IGNORE);
 		return options;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_3.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_3.java
index cb91f6e..6c15e91 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_3.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_3.java
@@ -64,7 +64,7 @@
 		else
 			options.put(CompilerOptions.OPTION_ReportMissingJavadocTags, reportInvalidJavadoc);
 		options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE);
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
 		options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR);
 		return options;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_4.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_4.java
index c1a7274..7bbdb7c 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_4.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_4.java
@@ -65,7 +65,7 @@
 		else
 			options.put(CompilerOptions.OPTION_ReportMissingJavadocTags, reportInvalidJavadoc);
 		options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE);
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
 		options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR);
 		return options;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_5.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_5.java
index 07ec4be..c26bd25 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_5.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/JavadocTest_1_5.java
@@ -68,7 +68,7 @@
 			options.put(CompilerOptions.OPTION_ReportMissingJavadocTags, reportInvalidJavadoc);
 		}
 		options.put(CompilerOptions.OPTION_ReportFieldHiding, CompilerOptions.IGNORE);
-		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//		options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 		options.put(CompilerOptions.OPTION_ReportDeprecation, CompilerOptions.ERROR);
 		options.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR);
 		return options;
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/MethodVerifyTest.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/MethodVerifyTest.java
index 15e8363..17bdc59 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/MethodVerifyTest.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/MethodVerifyTest.java
@@ -6304,7 +6304,7 @@
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=159973
 public void test102() {
 	Map options = this.getCompilerOptions();
-	options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//	options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
@@ -6725,7 +6725,7 @@
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=159973
 public void test108() {
 	Map options = this.getCompilerOptions();
-	options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
+//	options.put(CompilerOptions.OPTION_ReportSyntheticAccessEmulation, CompilerOptions.IGNORE);
 	this.runNegativeTest(
 		new String[] {
 			"X.java",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/SerialVersionUIDTests.java b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/SerialVersionUIDTests.java
index 2ce6a5c..ae25a46 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/SerialVersionUIDTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/SerialVersionUIDTests.java
@@ -42,7 +42,7 @@
 }
 protected Map getCompilerOptions() {
 	Map options = super.getCompilerOptions();
-	options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.ERROR);
+//	options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.ERROR);
 	return options;
 }
 // https://bugs.eclipse.org/bugs/show_bug.cgi?id=101476