Bug 15277 Recreate test suite allows you to add the suite to itself
If you have a test suite that is also a test case (done to allow cascading tests), and recreate the test suite, you're allowed to add the suite to itself. This results in a recursive call to .suite(), which ends up causing a stack overflow when run. I'm not too sure on this, but I believe previously in this situtation the suite was added to itself a test case (new Suite(class) as opposed to class.suite()), which prevented this from happening. I do prefer this new behaviour, as it makes chaining suites together much easier (now if it only searched sub-packages for suites). This one special case just needs to be handled better.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/wizards/NewTestSuiteCreationWizardPage.java
}
	}
	/*
	 * @see TypePage#evalMethods
	 */
	protected void createTypeMembers(IType type, ImportsManager imports, IProgressMonitor monitor) throws CoreException {
		writeImports(imports);
		if (fMethodStubsButtons.isEnabled() && fMethodStubsButtons.isSelected(0)) 
			createMain(type);
		type.createMethod(getSuiteMethodString(), null, false, null);	
	}
	protected void createMain(IType type) throws JavaModelException {
		type.createMethod(fMethodStubsButtons.getMainMethod(getTypeName()), null, false, null);	
	}
	/**
	 * Returns the string content for creating a new suite() method.
	 */
	public String getSuiteMethodString() throws JavaModelException {
		IPackageFragment pack= getPackageFragment();
		String packName= pack.getElementName();
		StringBuffer suite= new StringBuffer("public static Test suite () {TestSuite suite= new TestSuite(\"Test for "+((packName.equals(""))?"default package":packName)+"\");\n"); 
		suite.append(getUpdatableString());
		suite.append("\nreturn suite;}"); 
		return suite.toString();
	}
	
	/**
	 * Returns the new code to be included in a new suite() or which replaces old code in an existing suite().
	 */
	public static String getUpdatableString(Object[] selectedClasses) throws JavaModelException {