diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java
index 0e7f507..d40758f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/AbstractJavaSearchTests.java
@@ -38,8 +38,6 @@
 	protected static boolean COPY_DIRS = true;
 	protected static int EXACT_RULE = SearchPattern.R_EXACT_MATCH | SearchPattern.R_CASE_SENSITIVE;
 	protected static int EQUIVALENT_RULE = EXACT_RULE | SearchPattern.R_EQUIVALENT_MATCH;
-	protected static int ERASURE_RULE = EXACT_RULE | SearchPattern.R_ERASURE_MATCH;
-	protected static int RAW_RULE = EXACT_RULE | SearchPattern.R_ERASURE_MATCH | SearchPattern.R_EQUIVALENT_MATCH;
 
 //	IJavaScriptUnit[] workingCopies;
 //	boolean discard;
@@ -164,8 +162,6 @@
 								line.append("EXACT_");
 							} else if (match.isEquivalent()) {
 								line.append("EQUIVALENT_");
-							} else if (match.isErasure()) {
-								line.append("ERASURE_");
 							} else {
 								line.append("INVALID_RULE_");
 							}
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java
index 585d60a..35c0016 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/CompletionTests.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -3694,24 +3694,6 @@
 		requestor.getResults());
 }
 
-public void testCompletionFindSuperInterface() throws JavaScriptModelException {
-	this.wc = getWorkingCopy(
-            "/Completion/src/CompletionFindSuperInterface.js",
-            "public class CompletionFindSuperInterface implements SuperInterface {\n"+
-            "}");
-    
-    
-    CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
-    String str = this.wc.getSource();
-    String completeBehind = "Super";
-    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
-    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
-
-    assertResults(
-           "SuperInterface[TYPE_REF]{SuperInterface, , LSuperInterface;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_INTERFACE + R_UNQUALIFIED + R_NON_RESTRICTED)+"}",
-			requestor.getResults());
-}
-
 /**
  * Complete the field "bar" from "this.ba"
  */
@@ -9879,71 +9861,7 @@
 		}
 	}
 }
-public void testCompletionSuperType3() throws JavaScriptModelException {
-	IJavaScriptUnit superClass = null;
-	IJavaScriptUnit superClass2 = null;
-	IJavaScriptUnit superInterface = null;
-	IJavaScriptUnit superInterface2 = null;
-	try {
-		superClass = getWorkingCopy(
-	            "/Completion/src/CompletionSuperClass.js",
-	            "public class CompletionSuperClass{\n" +
-	            "	public class Inner {}\n" +
-	            "	public int eqFoo(int a,Object b){\n" +
-	            "		return 1;\n" +
-	            "	}\n" +
-	            "}");
-		
-		superClass2 = getWorkingCopy(
-	            "/Completion/src/CompletionSuperClass2.js",
-	            "public class CompletionSuperClass2 {\n" +
-	            "	public class InnerClass {}\n" +
-	            "	public interface InnerInterface {}\n" +
-	            "}");
-		
-		superInterface = getWorkingCopy(
-	            "/Completion/src/CompletionSuperInterface.js",
-	            "public interface CompletionSuperInterface{\n" +
-	            "	public int eqFoo(int a,Object b);\n" +
-	            "}");
-		
-		superInterface2 = getWorkingCopy(
-	            "/Completion/src/CompletionSuperInterface2.js",
-	            "public interface CompletionSuperInterface2 {\n" +
-	            "	public class InnerClass {}\n" +
-	            "	public interface InnerInterface {}\n" +
-	            "}");
-		
-		this.wc = getWorkingCopy(
-	            "/Completion/src/CompletionSuperType3.js",
-	            "public class CompletionSuperType3 implements CompletionSuper");
-	    
-	    
-	    CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
-	    String str = this.wc.getSource();
-	    String completeBehind = "CompletionSuper";
-	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
-	    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
-	
-		assertResults(
-			"CompletionSuperInterface[TYPE_REF]{CompletionSuperInterface, , LCompletionSuperInterface;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_INTERFACE + R_UNQUALIFIED + R_NON_RESTRICTED)+"}\n" +
-			"CompletionSuperInterface2[TYPE_REF]{CompletionSuperInterface2, , LCompletionSuperInterface2;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_INTERFACE + R_UNQUALIFIED + R_NON_RESTRICTED)+"}",
-			requestor.getResults());
-	} finally {
-		if(superClass != null) {
-			superClass.discardWorkingCopy();
-		}
-		if(superClass2 != null) {
-			superClass2.discardWorkingCopy();
-		}
-		if(superInterface != null) {
-			superInterface.discardWorkingCopy();
-		}
-		if(superInterface2 != null) {
-			superInterface2.discardWorkingCopy();
-		}
-	}
-}
+
 public void testCompletionSuperType4() throws JavaScriptModelException {
 	IJavaScriptUnit superClass2 = null;
 	try {
@@ -9975,164 +9893,6 @@
 		}
 	}
 }
-public void testCompletionSuperType5() throws JavaScriptModelException {
-	IJavaScriptUnit superInterface2 = null;
-	try {
-		superInterface2 = getWorkingCopy(
-	            "/Completion/src/CompletionSuperInterface2.js",
-	            "public interface CompletionSuperInterface2 {\n" +
-	            "	public class InnerClass {}\n" +
-	            "	public interface InnerInterface {}\n" +
-	            "}");
-		
-		this.wc = getWorkingCopy(
-	            "/Completion/src/CompletionSuperType5.js",
-	            "public class CompletionSuperType5 implements CompletionSuperInterface2.Inner");
-	    
-	    
-	    CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
-	    String str = this.wc.getSource();
-	    String completeBehind = "CompletionSuperInterface2.Inner";
-	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
-	    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
-	
-		assertResults(
-			"CompletionSuperInterface2.InnerClass[TYPE_REF]{InnerClass, , LCompletionSuperInterface2$InnerClass;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}\n" +
-			"CompletionSuperInterface2.InnerInterface[TYPE_REF]{InnerInterface, , LCompletionSuperInterface2$InnerInterface;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_INTERFACE+ R_NON_RESTRICTED)+"}",
-			requestor.getResults());
-	} finally {
-		if(superInterface2 != null) {
-			superInterface2.discardWorkingCopy();
-		}
-	}
-}
-public void testCompletionSuperType6() throws JavaScriptModelException {
-	IJavaScriptUnit superClass = null;
-	IJavaScriptUnit superClass2 = null;
-	IJavaScriptUnit superInterface = null;
-	IJavaScriptUnit superInterface2 = null;
-	try {
-		superClass = getWorkingCopy(
-	            "/Completion/src/CompletionSuperClass.js",
-	            "public class CompletionSuperClass{\n" +
-	            "	public class Inner {}\n" +
-	            "	public int eqFoo(int a,Object b){\n" +
-	            "		return 1;\n" +
-	            "	}\n" +
-	            "}");
-		
-		superClass2 = getWorkingCopy(
-	            "/Completion/src/CompletionSuperClass2.js",
-	            "public class CompletionSuperClass2 {\n" +
-	            "	public class InnerClass {}\n" +
-	            "	public interface InnerInterface {}\n" +
-	            "}");
-		
-		superInterface = getWorkingCopy(
-	            "/Completion/src/CompletionSuperInterface.js",
-	            "public interface CompletionSuperInterface{\n" +
-	            "	public int eqFoo(int a,Object b);\n" +
-	            "}");
-		
-		superInterface2 = getWorkingCopy(
-	            "/Completion/src/CompletionSuperInterface2.js",
-	            "public interface CompletionSuperInterface2 {\n" +
-	            "	public class InnerClass {}\n" +
-	            "	public interface InnerInterface {}\n" +
-	            "}");
-		
-		this.wc = getWorkingCopy(
-	            "/Completion/src/CompletionSuperType6.js",
-	            "public interface CompletionSuperType6 extends CompletionSuper");
-	    
-	    
-	    CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
-	    String str = this.wc.getSource();
-	    String completeBehind = "CompletionSuper";
-	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
-	    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
-	
-		assertResults(
-				"CompletionSuperInterface[TYPE_REF]{CompletionSuperInterface, , LCompletionSuperInterface;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_INTERFACE + R_NON_RESTRICTED)+"}\n" +
-				"CompletionSuperInterface2[TYPE_REF]{CompletionSuperInterface2, , LCompletionSuperInterface2;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_UNQUALIFIED + R_INTERFACE+ R_NON_RESTRICTED)+"}",
-				requestor.getResults());
-	} finally {
-		if(superClass != null) {
-			superClass.discardWorkingCopy();
-		}
-		if(superClass2 != null) {
-			superClass2.discardWorkingCopy();
-		}
-		if(superInterface != null) {
-			superInterface.discardWorkingCopy();
-		}
-		if(superInterface2 != null) {
-			superInterface2.discardWorkingCopy();
-		}
-	}
-}
-public void testCompletionSuperType7() throws JavaScriptModelException {
-	IJavaScriptUnit superClass2 = null;
-	try {
-		superClass2 = getWorkingCopy(
-	            "/Completion/src/CompletionSuperClass2.js",
-	            "public class CompletionSuperClass2 {\n" +
-	            "	public class InnerClass {}\n" +
-	            "	public interface InnerInterface {}\n" +
-	            "}");
-		
-		this.wc = getWorkingCopy(
-	            "/Completion/src/CompletionSuperType7.js",
-	            "public interface CompletionSuperType7 extends CompletionSuperClass2.Inner");
-	    
-	    
-	    CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
-	    String str = this.wc.getSource();
-	    String completeBehind = "CompletionSuperClass2.Inner";
-	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
-	    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
-	
-		assertResults(
-			"CompletionSuperClass2.InnerClass[TYPE_REF]{InnerClass, , LCompletionSuperClass2$InnerClass;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}\n" +
-			"CompletionSuperClass2.InnerInterface[TYPE_REF]{InnerInterface, , LCompletionSuperClass2$InnerInterface;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_INTERFACE+ R_NON_RESTRICTED)+"}",
-			requestor.getResults());
-	} finally {
-		if(superClass2 != null) {
-			superClass2.discardWorkingCopy();
-		}
-	}
-}
-public void testCompletionSuperType8() throws JavaScriptModelException {
-	IJavaScriptUnit superInterface2 = null;
-	try {
-		superInterface2 = getWorkingCopy(
-	            "/Completion/src/CompletionSuperInterface2.js",
-	            "public interface CompletionSuperInterface2 {\n" +
-	            "	public class InnerClass {}\n" +
-	            "	public interface InnerInterface {}\n" +
-	            "}");
-		
-		this.wc = getWorkingCopy(
-	            "/Completion/src/CompletionSuperType8.js",
-	            "public interface CompletionSuperType8 extends CompletionSuperInterface2.Inner");
-	    
-	    
-	    CompletionTestsRequestor2 requestor = new CompletionTestsRequestor2(true);
-	    String str = this.wc.getSource();
-	    String completeBehind = "CompletionSuperInterface2.Inner";
-	    int cursorLocation = str.lastIndexOf(completeBehind) + completeBehind.length();
-	    this.wc.codeComplete(cursorLocation, requestor, this.wcOwner);
-	
-		assertResults(
-			"CompletionSuperInterface2.InnerClass[TYPE_REF]{InnerClass, , LCompletionSuperInterface2$InnerClass;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_NON_RESTRICTED)+"}\n" +
-			"CompletionSuperInterface2.InnerInterface[TYPE_REF]{InnerInterface, , LCompletionSuperInterface2$InnerInterface;, null, null, "+(R_DEFAULT + R_INTERESTING + R_CASE + R_INTERFACE+ R_NON_RESTRICTED)+"}",
-			requestor.getResults());
-	} finally {
-		if(superInterface2 != null) {
-			superInterface2.discardWorkingCopy();
-		}
-	}
-}
 public void testCompletionThrowStatement() throws JavaScriptModelException {
 	CompletionTestsRequestor requestor = new CompletionTestsRequestor();
 	IJavaScriptUnit cu= getCompilationUnit("Completion", "src", "", "CompletionThrowStatement.js");
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
index ccb33f3..dd4af2d 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchBugsTests.java
@@ -794,26 +794,6 @@
 	assertSearchResults("");
 }
 
-/**
- * Bug 79803: [1.5][search] Search for references to type A reports match for type variable A
- * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=79803"
- */
-public void testBug79803() throws CoreException {
-	workingCopies = new IJavaScriptUnit[1];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79803/A.js",
-		"package b79803;\n" + 
-		"class A<A> {\n" + 
-		"    A a;\n" + 
-		"    b79803.A pa= new b79803.A();\n" + 
-		"}\n"	
-	);
-	IType type = workingCopies[0].getType("A");
-	search(type, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b79803/A.java b79803.A.pa [b79803.A] EXACT_MATCH\n" + 
-		"src/b79803/A.java b79803.A.pa [b79803.A] EXACT_MATCH"
-	);
-}
 public void testBug79803string() throws CoreException {
 	workingCopies = new IJavaScriptUnit[1];
 	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b79803/A.js",
@@ -1320,7 +1300,7 @@
 public void testBug80918() throws CoreException {
 	IType type = getClassFile("JavaSearchBugs", getExternalJCLPathString("1.5"), "java.lang", "Exception.class").getType();
 	IJavaScriptSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaScriptProject[] {getJavaProject("JavaSearchBugs")}, IJavaScriptSearchScope.SOURCES);
-	search(type, REFERENCES, SearchPattern.R_CASE_SENSITIVE|SearchPattern.R_ERASURE_MATCH, scope);
+	search(type, REFERENCES, SearchPattern.R_CASE_SENSITIVE|SearchPattern.R_EQUIVALENT_MATCH, scope);
 	assertSearchResults(
 		"" // do not expect to find anything, just verify that no CCE happens
 	);
@@ -1508,49 +1488,6 @@
 		"src/b82208/Test.java b82208.B82208 [B82208] EXACT_MATCH"
 	);
 }
-public void testBug82208_INTERFACE() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug82208();
-	search("B82208*", INTERFACE, ALL_OCCURRENCES);
-	assertSearchResults(
-		"src/b82208/Test.java b82208.B82208_I [B82208_I] EXACT_MATCH"
-	);
-}
-public void testBug82208_ENUM() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug82208();
-	search("B82208*", ENUM, ALL_OCCURRENCES);
-	assertSearchResults(
-		"src/b82208/Test.java b82208.B82208_E [B82208_E] EXACT_MATCH"
-	);
-}
-public void testBug82208_ANNOTATION_TYPE() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug82208();
-	search("B82208*", ANNOTATION_TYPE, ALL_OCCURRENCES);
-	assertSearchResults(
-		"src/b82208/Test.java b82208.B82208_A [B82208_A] EXACT_MATCH"
-	);
-}
-public void testBug82208_CLASS_AND_INTERFACE() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug82208();
-	search("B82208*", CLASS_AND_INTERFACE, ALL_OCCURRENCES);
-	assertSearchResults(
-		"src/b82208/Test.java b82208.B82208_I [B82208_I] EXACT_MATCH\n" + 
-		"src/b82208/Test.java b82208.B82208 [B82208] EXACT_MATCH"
-	);
-}
-public void testBug82208_CLASS_AND_ENUMERATION() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug82208();
-	search("B82208*", CLASS_AND_ENUM, ALL_OCCURRENCES);
-	assertSearchResults(
-		"src/b82208/Test.java b82208.B82208_E [B82208_E] EXACT_MATCH\n" + 
-		"src/b82208/Test.java b82208.B82208 [B82208] EXACT_MATCH"
-	);
-}
-
 /**
  * Bug 82673: [1.5][search][annot] Search for annotations misses references in default and values constructs
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=83012"
@@ -1773,197 +1710,6 @@
 }
 
 /**
- * Bug 83304: [search] correct results are missing in java search
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=83304"
- */
-public void testBug83304() throws CoreException {
-	resultCollector.showRule = true;
-	workingCopies = new IJavaScriptUnit[1];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Test.js",
-		"package b83304;\n" + 
-		"public class Test {\n" + 
-		"	void foo() {\n" + 
-		"		Class<? extends Throwable> l1= null;\n" + 
-		"		Class<Exception> l2= null;\n" + 
-		"		\n" + 
-		"		Class<String> string_Class;\n" + 
-		"	}\n" + 
-		"}\n"
-		);
-	IType type = selectType(workingCopies[0], "Class", 3);
-	search(type, REFERENCES, ERASURE_RULE, getJavaSearchWorkingCopiesScope());
-	assertSearchResults(
-		"src/b83304/Test.java void b83304.Test.foo() [Class] ERASURE_MATCH\n" + 
-		"src/b83304/Test.java void b83304.Test.foo() [Class] ERASURE_MATCH\n" + 
-		"src/b83304/Test.java void b83304.Test.foo() [Class] EXACT_MATCH"
-	);
-}
-private void setUpBug83304_TypeParameterizedElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	workingCopies = new IJavaScriptUnit[1];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Types.js",
-		"package b83304;\n" + 
-		"import g1.t.s.def.Generic;\n" + 
-		"public class Types {\n" + 
-		"	public Generic gen;\n" + 
-		"	public Generic<Object> gen_obj;\n" + 
-		"	public Generic<Exception> gen_exc;\n" + 
-		"	public Generic<?> gen_wld;\n" + 
-		"	public Generic<? extends Throwable> gen_thr;\n" + 
-		"	public Generic<? super RuntimeException> gen_run;\n" + 
-		"}\n"
-	);
-}
-public void testBug83304_TypeParameterizedElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_TypeParameterizedElementPattern();
-	IType type = selectType(workingCopies[0], "Generic", 4);
-	search(type, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Types.java [g1.t.s.def.Generic] EQUIVALENT_RAW_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen [Generic] EQUIVALENT_RAW_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_obj [Generic] ERASURE_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_exc [Generic] EXACT_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_wld [Generic] EQUIVALENT_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_thr [Generic] EQUIVALENT_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_run [Generic] EQUIVALENT_MATCH\n" + 
-		"lib/JavaSearch15.jar g1.t.s.def.Generic<T> g1.t.s.def.Generic.foo() ERASURE_MATCH"
-	);
-}
-public void testBug83304_TypeGenericElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_TypeParameterizedElementPattern();
-	IType type = getClassFile("JavaSearchBugs", "lib/JavaSearch15.jar", "g1.t.s.def", "Generic.class").getType();
-	search(type, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Types.java [g1.t.s.def.Generic] EQUIVALENT_RAW_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen [Generic] ERASURE_RAW_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_obj [Generic] ERASURE_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_exc [Generic] ERASURE_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_wld [Generic] ERASURE_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_thr [Generic] ERASURE_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_run [Generic] ERASURE_MATCH\n" + 
-		"lib/JavaSearch15.jar g1.t.s.def.Generic<T> g1.t.s.def.Generic.foo() EXACT_MATCH"
-	);
-}
-public void testBug83304_TypeStringPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_TypeParameterizedElementPattern();
-	search("Generic<? super Exception>", TYPE, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Types.java [Generic] EQUIVALENT_RAW_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen [Generic] EQUIVALENT_RAW_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_obj [Generic] EQUIVALENT_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_exc [Generic] EQUIVALENT_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_wld [Generic] EQUIVALENT_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_thr [Generic] ERASURE_MATCH\n" + 
-		"src/b83304/Types.java b83304.Types.gen_run [Generic] ERASURE_MATCH\n" + 
-		"lib/JavaSearch15.jar g1.t.s.def.Generic<T> g1.t.s.def.Generic.foo() ERASURE_MATCH"
-	);
-}
-private void setUpBug83304_MethodParameterizedElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	workingCopies = new IJavaScriptUnit[1];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Methods.js",
-		"package b83304;\n" + 
-		"import g5.m.def.Single;\n" + 
-		"public class Methods {\n" + 
-		"	void test() {\n" + 
-		"		Single<Exception> gs = new Single<Exception>();\n" + 
-		"		Exception exc = new Exception();\n" + 
-		"		gs.<Throwable>generic(exc);\n" + 
-		"		gs.<Exception>generic(exc);\n" + 
-		"		gs.<String>generic(\"\");\n" + 
-		"	}\n" + 
-		"}\n"
-	);
-}
-public void testBug83304_MethodParameterizedElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_MethodParameterizedElementPattern();
-	IFunction method = selectMethod(workingCopies[0], "generic", 2);
-	search(method, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(exc)] EXACT_MATCH\n" + 
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(\"\")] ERASURE_MATCH"
-	);
-}
-public void testBug83304_MethodGenericElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_MethodParameterizedElementPattern();
-	IType type = getClassFile("JavaSearchBugs", "lib/JavaSearch15.jar", "g5.m.def", "Single.class").getType();
-	IFunction method = type.getFunction("generic", new String[] { "TU;" });
-	search(method, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(\"\")] ERASURE_MATCH"
-	);
-}
-public void testBug83304_MethodStringPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_MethodParameterizedElementPattern();
-	search("<Exception>generic", METHOD, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(exc)] EXACT_MATCH\n" + 
-		"src/b83304/Methods.java void b83304.Methods.test() [generic(\"\")] ERASURE_MATCH"
-	);
-}
-private void setUpBug83304_ConstructorGenericElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	workingCopies = new IJavaScriptUnit[1];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b83304/Constructors.js",
-		"package b83304;\n" + 
-		"import g5.c.def.Single;\n" + 
-		"public class Constructors {\n" + 
-		"	void test() {\n" + 
-		"		Exception exc= new Exception();\n" + 
-		"		new <Throwable>Single<String>(\"\", exc);\n" + 
-		"		new <Exception>Single<String>(\"\", exc);\n" + 
-		"		new <String>Single<String>(\"\", \"\");\n" + 
-		"	}\n" + 
-		"}\n"
-	);
-}
-public void testBug83304_ConstructorGenericElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_ConstructorGenericElementPattern();
-	IFunction method = selectMethod(workingCopies[0], "Single", 3);
-	search(method, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <Throwable>Single<String>(\"\", exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <Exception>Single<String>(\"\", exc)] EXACT_MATCH\n" + 
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <String>Single<String>(\"\", \"\")] ERASURE_MATCH"
-	);
-}
-public void testBug83304_ConstructorParameterizedElementPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_ConstructorGenericElementPattern();
-	IType type = getClassFile("JavaSearchBugs", "lib/JavaSearch15.jar", "g5.c.def", "Single.class").getType();
-	IFunction method = type.getFunction("Single", new String[] { "TT;", "TU;" });
-	search(method, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <Throwable>Single<String>(\"\", exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <Exception>Single<String>(\"\", exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <String>Single<String>(\"\", \"\")] ERASURE_MATCH"
-	);
-}
-public void testBug83304_ConstructorStringPattern() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug83304_ConstructorGenericElementPattern();
-	search("<Exception>Single", CONSTRUCTOR, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <Throwable>Single<String>(\"\", exc)] ERASURE_MATCH\n" + 
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <Exception>Single<String>(\"\", exc)] EXACT_MATCH\n" + 
-		"src/b83304/Constructors.java void b83304.Constructors.test() [new <String>Single<String>(\"\", \"\")] ERASURE_MATCH\n" + 
-		"lib/JavaSearch15.jar g5.m.def.Single<T> g5.m.def.Single.returnParamType() ERASURE_MATCH\n" + 
-		"lib/JavaSearch15.jar g5.m.def.Single<T> g5.m.def.Single.complete(U, g5.m.def.Single<T>) ERASURE_MATCH"
-	);
-}
-
-/**
  * Bug 83804: [1.5][javadoc] Missing Javadoc node for package declaration
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=83804"
  */
@@ -3018,110 +2764,6 @@
 		"b92944.B92944",
 		requestor);
 }
-public void testBug92944_CLASS_AND_INTERFACE() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug92944();
-	TypeNameRequestor requestor =  new SearchTests.SearchTypeNameRequestor();
-	new SearchEngine(this.workingCopies).searchAllTypeNames(
-		null,
-		SearchPattern.R_EXACT_MATCH,
-		null,
-		SearchPattern.R_PATTERN_MATCH, // case insensitive
-		CLASS_AND_INTERFACE,
-		getJavaSearchWorkingCopiesScope(),
-		requestor,
-		IJavaScriptSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
-		null
-	);
-	// Remove enum and annotation
-	assertSearchResults(
-		"Unexpected all type names",
-		"b92944.B92944\n" + 
-		"b92944.B92944_I",  // Annotation is an interface in java.lang
-		requestor);
-}
-public void testBug92944_CLASS_AND_ENUM() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug92944();
-	TypeNameRequestor requestor =  new SearchTests.SearchTypeNameRequestor();
-	new SearchEngine(this.workingCopies).searchAllTypeNames(
-		null,
-		SearchPattern.R_EXACT_MATCH,
-		null,
-		SearchPattern.R_PATTERN_MATCH, // case insensitive
-		CLASS_AND_ENUM,
-		getJavaSearchWorkingCopiesScope(),
-		requestor,
-		IJavaScriptSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
-		null
-	);
-	// Remove interface and annotation
-	assertSearchResults(
-		"Unexpected all type names",
-		"b92944.B92944\n" + 
-		"b92944.B92944_E",
-		requestor);
-}
-public void testBug92944_INTERFACE() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug92944();
-	TypeNameRequestor requestor =  new SearchTests.SearchTypeNameRequestor();
-	new SearchEngine(this.workingCopies).searchAllTypeNames(
-		null,
-		SearchPattern.R_EXACT_MATCH,
-		null,
-		SearchPattern.R_PATTERN_MATCH, // case insensitive
-		INTERFACE,
-		getJavaSearchWorkingCopiesScope(),
-		requestor,
-		IJavaScriptSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
-		null
-	);
-	assertSearchResults(
-		"Unexpected all type names",
-		"b92944.B92944_I",
-		requestor);
-}
-public void testBug92944_ENUM() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug92944();
-	TypeNameRequestor requestor =  new SearchTests.SearchTypeNameRequestor();
-	new SearchEngine(this.workingCopies).searchAllTypeNames(
-		null,
-		SearchPattern.R_EXACT_MATCH,
-		null,
-		SearchPattern.R_PATTERN_MATCH, // case insensitive
-		ENUM,
-		getJavaSearchWorkingCopiesScope(),
-		requestor,
-		IJavaScriptSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
-		null
-	);
-	assertSearchResults(
-		"Unexpected all type names",
-		"b92944.B92944_E",
-		requestor);
-}
-public void testBug92944_ANNOTATION_TYPE() throws CoreException {
-	resultCollector.showRule = true;
-	setUpBug92944();
-	TypeNameRequestor requestor =  new SearchTests.SearchTypeNameRequestor();
-	new SearchEngine(this.workingCopies).searchAllTypeNames(
-		null,
-		SearchPattern.R_EXACT_MATCH,
-		null,
-		SearchPattern.R_PATTERN_MATCH, // case insensitive
-		ANNOTATION_TYPE,
-		getJavaSearchWorkingCopiesScope(),
-		requestor,
-		IJavaScriptSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
-		null
-	);
-	assertSearchResults(
-		"Unexpected all type names",
-		"b92944.B92944_A",
-		requestor);
-}
 
 /**
  * Bug 93392: [1.5][search][annot] search for annotation elements does not seem to be implemented yet
@@ -3607,34 +3249,6 @@
 }
 
 /**
- * Bug 97087: [1.5][search] Can't find reference of generic class's constructor.
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=97087"
- */
-public void testBug97087() throws CoreException {
-	workingCopies = new IJavaScriptUnit[1];
-	this.resultCollector.showRule = true;
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97087/Bug.js",
-		"package b97087;\n" + 
-		"public class Bug<Type> {\n" + 
-		"    Bug(){}\n" + 
-		"}\n" + 
-		"class Foo extends Bug<String>{\n" + 
-		"    Foo(){}\n" + 
-		"}\n" +
-		"class Bar extends Bug<Exception>{\n" + 
-		"    Bar(){super();}\n" + 
-		"}"
-	);
-	IType type = workingCopies[0].getType("Bug");
-	IFunction method= type.getFunctions()[0];
-	search(method, REFERENCES, SearchPattern.R_ERASURE_MATCH);
-	assertSearchResults(
-		"src/b97087/Bug.java b97087.Foo() [Foo] EXACT_MATCH\n" + 
-		"src/b97087/Bug.java b97087.Bar() [super();] ERASURE_MATCH"
-	);
-}
-
-/**
  * Bug 97120: 
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=97120"
  */
@@ -3681,63 +3295,6 @@
 	search(method, REFERENCES);
 	assertSearchResults(""); // Expect no result
 }
-
-/**
- * Bug 97606: [1.5][search] Raw type reference is reported as exact match for qualified names
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=97606"
- */
-public void testBug97606() throws CoreException {
-	workingCopies = new IJavaScriptUnit[4];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/L.js",
-		"package b97606.pack.def;\n" + 
-		"public interface L<E> {}\n"
-	);
-	workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/LL.js",
-		"package b97606.pack.def;\n" + 
-		"public class LL<E> implements L<E> {\n" + 
-		"	public Object clone() {\n" + 
-		"		return null;\n" + 
-		"	}\n" + 
-		"}\n"
-	);
-	workingCopies[2] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/K.js",
-		"package b97606.pack.ref;\n" + 
-		"public interface K {}\n"
-	);
-	workingCopies[3] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/ref/X.js",
-		"package b97606.pack.ref;\n" + 
-		"public class X implements K {\n" + 
-		"	private b97606.pack.def.LL sg;\n" + 
-		"	protected synchronized b97606.pack.def.L<K> getSG() {\n" + 
-		"		return (sg != null) \n" + 
-		"			? (b97606.pack.def.L) sg.clone()\n" + 
-		"			: null;\n" + 
-		"	}\n" + 
-		"}\n"
-	);
-	IPath pathDef = new Path("/JavaSearchBugs/src/b97606/pack/def");
-	IPath pathRef = new Path("/JavaSearchBugs/src/b97606/pack/ref");
-	try {
-		createFolder(pathDef);
-		createFolder(pathRef);
-		workingCopies[0].commitWorkingCopy(true, null);
-		workingCopies[1].commitWorkingCopy(true, null);
-		workingCopies[2].commitWorkingCopy(true, null);
-		workingCopies[3].commitWorkingCopy(true, null);
-		this.resultCollector.showRule = true;
-		IType type = workingCopies[0].getType("L");
-		search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH);
-		assertSearchResults(
-			"src/b97606/pack/def/LL.java b97606.pack.def.LL [L] ERASURE_MATCH\n" + 
-			"src/b97606/pack/ref/X.java b97606.pack.def.L<K> b97606.pack.ref.X.getSG() [b97606.pack.def.L] ERASURE_MATCH\n" + 
-			"src/b97606/pack/ref/X.java b97606.pack.def.L<K> b97606.pack.ref.X.getSG() [b97606.pack.def.L] ERASURE_RAW_MATCH"
-		);
-	}
-	finally {
-		deleteFolder(pathDef);
-		deleteFolder(pathRef);
-	}
-}
 public void testBug97606b() throws CoreException {
 	workingCopies = new IJavaScriptUnit[4];
 	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97606/pack/def/L.js",
@@ -3779,7 +3336,7 @@
 		workingCopies[3].commitWorkingCopy(true, null);
 		this.resultCollector.showRule = true;
 		IType type = workingCopies[0].getType("L");
-		search(type, REFERENCES, SearchPattern.R_ERASURE_MATCH);
+		search(type, REFERENCES, SearchPattern.R_EQUIVALENT_MATCH);
 		assertSearchResults(
 			"src/b97606/pack/def/LL.java b97606.pack.def.LL [L] ERASURE_MATCH\n" + 
 			"src/b97606/pack/ref/X.java L<K> b97606.pack.ref.X.getSG() [L] ERASURE_MATCH\n" + 
@@ -5697,30 +5254,6 @@
 }
 
 /**
- * Bug 116459: [search] correct results are missing in java search
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=116459"
- */
-public void testBug116459() throws CoreException {
-	workingCopies = new IJavaScriptUnit[1];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/p1/X.js",
-		"package p1;\n" + 
-		"class X<T> {\n" + 
-		"	X<T> gen;\n" + 
-		"	X<String> param;\n" + 
-		"	X raw;\n" + 
-		"}"
-	);
-	IType type = workingCopies[0].getType("X");
-	this.resultCollector.showRule = true;
-	search(type, REFERENCES, ERASURE_RULE);
-	assertSearchResults(
-		"src/p1/X.java p1.X.gen [X] EXACT_MATCH\n" + 
-		"src/p1/X.java p1.X.param [X] ERASURE_MATCH\n" + 
-		"src/p1/X.java p1.X.raw [X] ERASURE_RAW_MATCH"
-	);
-}
-
-/**
  * @test Bug 119545: [search] Binary java method model elements returned by SearchEngine have unresolved parameter types
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=119545"
  */
@@ -5815,13 +5348,6 @@
 		"src/b122442/X.java b122442.X [I] EXACT_MATCH"
 	);
 }
-public void testBug122442b() throws CoreException {
-	setUpBug122442a();
-	search("I", INTERFACE, IMPLEMENTORS);
-	assertSearchResults(
-		"src/b122442/II.java b122442.II [I] EXACT_MATCH"
-	);
-}
 public void testBug122442c() throws CoreException {
 	setUpBug122442a();
 	search("I", CLASS, IMPLEMENTORS);
@@ -5850,13 +5376,6 @@
 		"src/b122442/User.java void b122442.User.m():<anonymous>#2 [Interface] EXACT_MATCH"
 	);
 }
-public void testBug122442e() throws CoreException {
-	setUpBug122442d();
-	search("Interface", INTERFACE, IMPLEMENTORS);
-	assertSearchResults(
-		"" // expected no result
-	);
-}
 public void testBug122442f() throws CoreException {
 	setUpBug122442d();
 	search("Interface", CLASS, IMPLEMENTORS);
@@ -5872,13 +5391,6 @@
 		"src/b122442/User.java b122442.Sub [Klass] EXACT_MATCH"
 	);
 }
-public void testBug122442h() throws CoreException {
-	setUpBug122442d();
-	search("Klass", INTERFACE, IMPLEMENTORS);
-	assertSearchResults(
-		"" // expected no result
-	);
-}
 public void testBug122442i() throws CoreException {
 	setUpBug122442d();
 	search("Klass", CLASS, IMPLEMENTORS);
@@ -6983,39 +6495,6 @@
 }
 
 /**
- * Bug 156177: [1.5][search] interfaces and annotations could be found with only one requets of searchAllTypeName
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=156177"
- */
-public void testBug156177() throws CoreException {
-	resultCollector.showRule = true;
-	workingCopies = new IJavaScriptUnit[1];
-	workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b156177/Test.js",
-		"package b156177;\n" + 
-		"interface B156177_I {}\n" + 
-		"enum B156177_E {}\n" + 
-		"@interface B156177_A {}\n" + 
-		"public class B156177 {}\n"
-	);
-	TypeNameRequestor requestor =  new SearchTests.SearchTypeNameRequestor();
-	new SearchEngine(this.workingCopies).searchAllTypeNames(
-		null,
-		SearchPattern.R_EXACT_MATCH,
-		null,
-		SearchPattern.R_PATTERN_MATCH, // case insensitive
-		INTERFACE_AND_ANNOTATION,
-		getJavaSearchWorkingCopiesScope(),
-		requestor,
-		IJavaScriptSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
-		null
-	);
-	assertSearchResults(
-		"Unexpected all type names",
-		"b156177.B156177_A\n" + 
-		"b156177.B156177_I",
-		requestor);
-}
-
-/**
  * Bug 156491: [1.5][search] interfaces and annotations could be found with only one requets of searchAllTypeName
  * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=156491"
  */
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
index 8529ee1..c306689 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/JavaSearchTests.java
@@ -1635,30 +1635,6 @@
 		"src/s4/X.java void s4.X.fred() [foo()] OUTSIDE_JAVADOC",
 		this.resultCollector);
 }
-/*
- * Generic method reference.
- */
-public void testMethodReference16() throws CoreException {
-	IType type = getCompilationUnit("JavaSearch15/src/p2/X.js").getType("X");
-	IFunction method = type.getFunction("foo", new String[] {"QE;"});
-	search(method, REFERENCES, ERASURE_RULE, getJavaSearchScope15(), resultCollector);
-	assertSearchResults(
-		"src/p2/Y.java void p2.Y.bar() [foo(this)]",
-		this.resultCollector);
-}
-/**
- * Bug 111416: [search] wrong potential matches on a static method open
- * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=111416"
- */
-public void testMethodReference17() throws CoreException {
-	IType type = getCompilationUnit("JavaSearch/src/b111416/X.js").getType("X");
-	IFunction method = type.getFunction("open", new String[] {"QString;"});
-	resultCollector.showAccuracy = true;
-	search(method, REFERENCES, ERASURE_RULE, getJavaSearchScope(), resultCollector);
-	assertSearchResults(
-		"src/b111416/X.java void b111416.X.foo() [open(\"\")] EXACT_MATCH",
-		this.resultCollector);
-}
 /**
  * OrPattern test.
  * (regression test for bug 5862 search : too many matches on search with OrPattern)
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
index 31c0e4e..1a611fd 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/NameLookupTests2.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -150,7 +150,7 @@
 		);
 		NameLookup nameLookup = project.newNameLookup(workingCopies);
 		//		NameLookup.Answer answer=nameLookup.findBinding("foo","",Binding.METHOD, false, NameLookup.ACCEPT_ALL,false);
-		NameLookup.Answer answer=nameLookup.findBinding("foo","",Binding.METHOD, false, NameLookup.ACCEPT_ALL,false, false, null); 
+		NameLookup.Answer answer=nameLookup.findBinding("foo","",Binding.METHOD, false, NameLookup.ACCEPT_CLASSES,false, false, null); 
 		assertEquals(
 			"Unepexted ",
 			"foo",
@@ -221,7 +221,7 @@
 				"}"
 			}, 
 			"1.4");
-		IType type = getNameLookup((JavaProject) project).findType("p.X$$1", false, NameLookup.ACCEPT_ALL);
+		IType type = getNameLookup((JavaProject) project).findType("p.X$$1", false, NameLookup.ACCEPT_CLASSES);
 		assertTypesEqual(
 			"Unexpected type", 
 			"p.X$$1\n",
@@ -240,7 +240,7 @@
 		createFolder("/P/lib/p");
 		createFile("/P/lib/p/X.js", "");
 		createFile("/P/lib/p/X$X.js", "");
-		IType type = getNameLookup((JavaProject) project).findType("p.X", false, NameLookup.ACCEPT_ALL);
+		IType type = getNameLookup((JavaProject) project).findType("p.X", false, NameLookup.ACCEPT_CLASSES);
 		assertTypesEqual(
 			"Unexpected type", 
 			"p.X\n",
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
index 4f6e9f4..97b147c 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyNotificationTests.java
@@ -210,7 +210,7 @@
 		this.assertOneChange(h);
 		h.refresh(null);
 		IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.js").getType("E");
-		IType[] subtypes = h.getSubtypes(eE);
+		IType[] subtypes = h.getSubclasses(eE);
 		assertTrue("Should be one subtype of e.E", subtypes.length == 1);
 		assertEquals("Subtype of e.E should be p.Z2", newCU2.getType("Z2"), subtypes[0]);
 	} finally {
@@ -247,7 +247,7 @@
 		this.assertOneChange(h);
 		h.refresh(null);
 		IType dD = getCompilationUnit("TypeHierarchyNotification", "src", "d", "D.js").getType("D");
-		IType[] subtypes = h.getSubtypes(dD);
+		IType[] subtypes = h.getSubclasses(dD);
 		assertTrue("Should be one subtype of d.D", subtypes.length == 1);
 		assertEquals("Subtype of d.D should be p.Z3.InnerZ", newCU3.getType("Z3").getType("InnerZ"), subtypes[0]);
 	} finally {
@@ -305,7 +305,7 @@
 			this.assertOneChange(h);
 			h.refresh(null);
 			IType eE = getCompilationUnit("TypeHierarchyNotification", "src", "e", "E.js").getType("E");
-			IType[] subtypes = h.getSubtypes(eE);
+			IType[] subtypes = h.getSubclasses(eE);
 			assertTrue("Should be one subtype of e.E", subtypes.length == 1);
 			assertEquals("Subtype of e.E should be p.Z2", newCU2.getType("Z2"), subtypes[0]);
 		} finally {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java
index ba60eed..2f2df3f 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchySerializationTests.java
@@ -49,8 +49,8 @@
 	IType type2 = loaded.getType();
 	assertEquals("["+focus+"] focus are not the same", type1, type2);
 	
-	IType[] allTypes1 = stored.getAllTypes();
-	IType[] allTypes2 = loaded.getAllTypes();
+	IType[] allTypes1 = stored.getAllClasses();
+	IType[] allTypes2 = loaded.getAllClasses();
 	compare("["+focus+"] all types are not the same", allTypes1, allTypes2);
 	
 	IType[] allClasses1 = stored.getAllClasses();
@@ -76,22 +76,17 @@
 		IType superclass2 = loaded.getSuperclass(aType);
 		assertEquals("["+focus+"] superclass are not the same for "+aType.getFullyQualifiedName(), superclass1, superclass2);
 		
-		IType[] superTypes1 = stored.getSupertypes(aType);
-		IType[] superTypes2 = loaded.getSupertypes(aType);
+		IType[] superTypes1 = new IType[]{stored.getSuperclass(aType)};
+		IType[] superTypes2 = new IType[]{loaded.getSuperclass(aType)};
 		compare("["+focus+"] all super types are not the same for "+aType.getFullyQualifiedName(), superTypes1, superTypes2);
 		
 		IType[] subclasses1 = stored.getSubclasses(aType);
 		IType[] subclasses2 = loaded.getSubclasses(aType);
 		compare("["+focus+"] all subclasses are not the same for "+aType.getFullyQualifiedName(), subclasses1, subclasses2);
 		
-		IType[] subtypes1 = stored.getSubtypes(aType);
-		IType[] subtypes2 = loaded.getSubtypes(aType);
+		IType[] subtypes1 = stored.getSubclasses(aType);
+		IType[] subtypes2 = loaded.getSubclasses(aType);
 		compare("["+focus+"] all subtypes are not the same for "+aType.getFullyQualifiedName(), subtypes1, subtypes2);
-		
-		IType[] implementingClasses1 = stored.getImplementingClasses(aType);
-		IType[] implementingClasses2 = loaded.getImplementingClasses(aType);
-		compare("["+focus+"] all implemeting classes are not the same for "+aType.getFullyQualifiedName(), implementingClasses1, implementingClasses2);
-		
 	}
 }
 private static void compare(String msg, Object[] types1, Object[] types2) {
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
index 176e80e..8ac335c 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/TypeHierarchyTests.java
@@ -277,7 +277,7 @@
 public void testAnonymousType07() throws CoreException {
 	IType type = getClassFile("TypeHierarchy","myLib.jar", "my.pkg", "X.class").getType();
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
-	IType[] subtypes = hierarchy.getSubtypes(type);
+	IType[] subtypes = hierarchy.getSubclasses(type);
 	assertEquals("Unexpected key", "Lmy/pkg/Y$1;", subtypes.length < 1 ? null : subtypes[0].getKey());
 }
 /*
@@ -739,7 +739,7 @@
 	getJavaProject("TypeHierarcht15").close();
 	IType type = getClassFile("TypeHierarchy15","lib15.jar", "util", "AbstractList.class").getType();
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
-	IType[] subtypes = hierarchy.getSubtypes(type);
+	IType[] subtypes = hierarchy.getSubclasses(type);
 	assertEquals("Unexpected key", "Lutil/Map<TK;TV;>;", subtypes.length < 2 ? null : subtypes[1].getKey());
 }
 /*
@@ -926,7 +926,7 @@
 	assertTrue("Invalid type for class file \""+fileName+"\"", javaElement instanceof IClassFile);
 	IType type = ((IClassFile) javaElement).getType();
 	ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null); // it works when we use newTypeHierarchy(null)
-	IType[] types = hierarchy.getAllSupertypes(type);
+	IType[] types = hierarchy.getAllSuperclasses(type);
 	assertTypesEqual(
 		"Unexpected all super classes of X53095", 
 		"java.lang.RuntimeException\n" +
@@ -945,7 +945,7 @@
 	IClassFile cf = getClassFile("TypeHierarchy", "test54043.jar", "p54043", "X54043.class");
 	IType type = cf.getType();
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
-	IType[] types = hierarchy.getAllSupertypes(type);
+	IType[] types = hierarchy.getAllSuperclasses(type);
 	assertTypesEqual(
 		"Unexpected all super classes of X54043", 
 		"java.lang.RuntimeException\n" +
@@ -962,7 +962,7 @@
 public void testGetAllSupertypes() throws JavaScriptModelException {
 	IType type = getCompilationUnit("TypeHierarchy", "src", "p1", "Z.js").getType("Z");
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
-	IType[] types = hierarchy.getAllSupertypes(type);
+	IType[] types = hierarchy.getAllSuperclasses(type);
 	assertTypesEqual(
 		"Unexpected all super types of Z", 
 		"java.lang.Object\n" + 
@@ -980,7 +980,7 @@
 public void testGetAllSupertypes2() throws JavaScriptModelException {
 	IType type = getCompilationUnit("TypeHierarchy", "src", "p3", "B.js").getType("B");
 	ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
-	IType[] types = hierarchy.getAllSupertypes(type);
+	IType[] types = hierarchy.getAllSuperclasses(type);
 	assertTypesEqual(
 		"Unexpected all super types of B", 
 		"java.lang.Object\n" +
@@ -1005,7 +1005,7 @@
 		"p1.X\n" + 
 		"p1.Y\n" + 
 		"p1.Z\n",
-		hierarchy.getAllTypes()
+		hierarchy.getAllClasses()
 	);
 }
 /**
@@ -1056,7 +1056,7 @@
  */
 public void testGetSubtypes() throws JavaScriptModelException {
 	IType type = getClassFile("TypeHierarchy", "lib.jar", "binary", "X.class").getType();
-	IType[] types = this.typeHierarchy.getSubtypes(type);
+	IType[] types = this.typeHierarchy.getSubclasses(type);
 	this.assertTypesEqual(
 		"Unexpected subtypes of binary.X",
 		"binary.Y\n",
@@ -1064,7 +1064,7 @@
 	);
 	
 	type = getClassFile("TypeHierarchy", "lib.jar", "binary", "I.class").getType();
-	types = this.typeHierarchy.getSubtypes(type);
+	types = this.typeHierarchy.getSubclasses(type);
 	this.assertTypesEqual(
 		"Unexpected subtypes of binary.I",
 		"binary.X\n" + 
@@ -1093,7 +1093,7 @@
  */
 public void testGetSupertypesInRegion() throws JavaScriptModelException {
 	IType type = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y.class").getType();
-	IType[] superTypes = this.typeHierarchy.getSupertypes(type);
+	IType[] superTypes = new IType[]{this.typeHierarchy.getSuperclass(type)};
 	assertTypesEqual(
 		"Unexpected super types of Y",
 		"binary.X\n",
@@ -1109,7 +1109,7 @@
 	region.add(project);
 	IType type = getClassFile("TypeHierarchy", "lib.jar", "binary", "Y.class").getType();
 	ITypeHierarchy hierarchy = project.newTypeHierarchy(type, region, null);
-	IType[] superTypes = hierarchy.getSupertypes(type);
+	IType[] superTypes = new IType[]{hierarchy.getSuperclass(type)};
 	assertTypesEqual(
 		"Unexpected super types of Y",
 		"binary.X\n",
@@ -1312,7 +1312,7 @@
 	IJavaScriptUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "X.js");
 	IType type = cu.getType("X");
 	ITypeHierarchy h = type.newTypeHierarchy(project, null);
-	IType[] types = h.getSubtypes(type);
+	IType[] types = h.getSubclasses(type);
 	this.assertTypesEqual(
 		"Unexpected sub types of X",
 		"p1.Y\n",
@@ -1334,7 +1334,7 @@
 		"q1.X\n" +
 		"q1.Z\n" +
 		"q2.Y\n",
-		h.getAllTypes()
+		h.getAllClasses()
 	);
 }
 /*
@@ -1351,7 +1351,7 @@
 		"java.lang.Object\n" + 
 		"q1.X\n" +
 		"q2.Y\n",
-		h.getAllTypes()
+		h.getAllClasses()
 	);
 }
 /*
@@ -1369,7 +1369,7 @@
 		"p9.X\n" + 
 		"p9.X$1\n" + 
 		"p9.X$Y\n",
-		h.getAllTypes()
+		h.getAllClasses()
 	);
 }
 public void testRegion4() throws CoreException {
@@ -1424,7 +1424,7 @@
  */
 public void testRegion_Bug150289() throws JavaScriptModelException {
 	ITypeHierarchy h = this.currentProject.newTypeHierarchy(JavaScriptCore.newRegion(), null);
-	assertEquals("Unexpected number of types in hierarchy", 0, h.getAllTypes().length);
+	assertEquals("Unexpected number of types in hierarchy", 0, h.getAllClasses().length);
 }
 //https://bugs.eclipse.org/bugs/show_bug.cgi?id=144976
 public void testResilienceToMissingBinaries() throws CoreException {
@@ -1454,7 +1454,7 @@
 			);
 		IType type = getCompilationUnit("P", "src", "tools", "DisplayTestResult2.js").getType("DisplayTestResult2");		
 		ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
-		assertNotNull(hierarchy.getSupertypes(type));
+		assertNotNull(hierarchy.getSuperclass(type));
 		assertHierarchyEquals(
 				"Focus: DisplayTestResult2 [in DisplayTestResult2.java [in tools [in src [in P]]]]\n" + 
 				"Super types:\n" + 
@@ -1612,7 +1612,7 @@
 public void testSupertypeHierarchyGetSubtypes() throws JavaScriptModelException {
 	IType type = getClassFile("TypeHierarchy", getSystemJsPathString(), "java.lang", "Object.class").getType();
 	ITypeHierarchy hierarchy = type.newSupertypeHierarchy(null);
-	IType[] types = hierarchy.getSubtypes(type);
+	IType[] types = hierarchy.getSubclasses(type);
 	assertTypesEqual(
 		"Unexpected subtypes of Object", 
 		"", 
@@ -1621,7 +1621,7 @@
 	IJavaScriptUnit cu = getCompilationUnit("TypeHierarchy", "src", "p1", "Y.js");
 	type = cu.getType("Y");
 	hierarchy = type.newSupertypeHierarchy(null);
-	types = hierarchy.getSubtypes(type);
+	types = hierarchy.getSubclasses(type);
 	assertTypesEqual(
 		"Unexpected subtypes of Y", 
 		"", 
diff --git a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
index 8c1b5d8..68badae 100644
--- a/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
+++ b/tests/org.eclipse.wst.jsdt.core.tests.model/src/org/eclipse/wst/jsdt/core/tests/model/WorkingCopyOwnerTests.java
@@ -854,7 +854,7 @@
 			this.workingCopy = getCompilationUnit("/P/Y.js").getWorkingCopy(owner, null/*no progress*/);
 			IType focus = getCompilationUnit("/P/X.js").getType("X");
 			ITypeHierarchy hierarchy = focus.newTypeHierarchy(owner, null/*no progress*/);
-			IType[] subtypes = hierarchy.getSubtypes(focus);
+			IType[] subtypes = hierarchy.getSubclasses(focus);
 			assertTypesEqual(
 				"Unexpected types", 
 				"Y\n",
