Bug 96580 [JUnit] can create two launch configurations with the same name
Against N20050525-0010. Steps to reproduce: 1) Create a project named "directions", with a package named also named "directions". (I'll attach an example) 2) Select the project name, and Run As > JUnit Test 3) Select the package name, and Run As > JUnit Test Two launches named "directions" are created. Interestingly, if you swap steps 2 and 3, then the launches are given unique names (the project launch is named "directions (1)".
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitLaunchShortcut.java
public class LaunchCancelledByUserException extends Exception {
		private static final long serialVersionUID = 1L;
	}
	/**
	 * @see ILaunchShortcut#launch(IEditorPart, String)
	 */
	public void launch(IEditorPart editor, String mode) {
		IJavaElement element= null;
		IEditorInput input = editor.getEditorInput();
		element = (IJavaElement) input.getAdapter(IJavaElement.class);
		if (element != null) {
			searchAndLaunch(new Object[] {element}, mode);
		} 
	}
	
	/**
	 * @see ILaunchShortcut#launch(ISelection, String)
	 */
	public void launch(ISelection selection, String mode) {
		if (selection instanceof IStructuredSelection) {
			searchAndLaunch(((IStructuredSelection)selection).toArray(), mode);
		} 
	}
	protected void searchAndLaunch(Object[] search, String mode) {
		try {
			if (search != null) {