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
StringBuffer source= new StringBuffer(originalContent);
					
					
					int start= source.toString().indexOf(START_MARKER);
					if (start > -1) {
						
						
						int end= source.toString().indexOf(END_MARKER, start);
						if (end > -1) {
							monitor.subTask(WizardMessages.getString("NewTestSuiteWizPage.createType.updating.suite_method")); 
							monitor.worked(1);
							end += END_MARKER.length();
							source.replace(start, end, getUpdatableString());
							buf.replace(range.getOffset(), range.getLength(), source.toString());
							cu.reconcile();  
							originalContent= buf.getText(0, buf.getLength());
							monitor.worked(1);
							String formattedContent=
								JUnitStubUtility.codeFormat(originalContent, 0, lineDelimiter);
							buf.replace(0, buf.getLength(), formattedContent);
							monitor.worked(1);
							cu.save(new SubProgressMonitor(monitor, 1), false);
						} else {
							cannotUpdateSuiteError();
						}
					} else {
						cannotUpdateSuiteError();
					}
				} else {
					MessageDialog.openError(getShell(), WizardMessages.getString("NewTestSuiteWizPage.createType.updateErrorDialog.title"), WizardMessages.getString("NewTestSuiteWizPage.createType.updateErrorDialog.message"));