Bug 103089 [JUnit] Running JUnit tests constrained by package takes minutes to run on jumbos
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/util/TestSearchEngine.java
private static IType testCaseType(IJavaProject javaProject) {
		try {
			return javaProject.findType("junit.framework.TestCase"); 
		} catch (JavaModelException e) {
			JUnitPlugin.log(e.getStatus());
			return null;
		} 
	}
	
	private static IRegion getRegion(IJavaProject javaProject) throws JavaModelException{
	    IRegion region = JavaCore.newRegion();
	    IJavaElement[] elements= javaProject.getChildren();
	    for(int i=0; i<elements.length; i++) {
	        if (((IPackageFragmentRoot)elements[i]).isArchive())
	            continue;
	        region.add(elements[i]);
	    }
	    return region;
	}
	private static Object computeScope(Object element) throws JavaModelException {
		if (element instanceof IFileEditorInput)
			element= ((IFileEditorInput)element).getFile();
		if (element instanceof IResource)
			element= JavaCore.create((IResource)element);
		if (element instanceof IClassFile) {
			IClassFile cf= (IClassFile)element;
			element= cf.getType();
		}
		return element;
	}