for (int i = 0; i < oe.length; ++i) { IRuntimeClasspathEntry entry = oe[i]; String ls = entry.getLocation(); IPath loc = (null == ls) ? null : new Path(ls); if (null == loc) { resolved.add(entry); } else { if (!allEntries.contains(loc)) { resolved.add(entry); allEntries.add(loc); } } } } return (IRuntimeClasspathEntry[]) resolved.toArray( new IRuntimeClasspathEntry[resolved.size()]); }
IRuntimeClasspathEntry[] entries2 = super.resolveClasspath(entries, configuration); for (int i = 0; i < entries2.length; ++i) { IRuntimeClasspathEntry entry = entries2[i]; String name = entry.getPath().segment(0); int entryType = entry.getType();  if (entryType == IRuntimeClasspathEntry.PROJECT) { if (!projectJars.containsKey(name)) { IProject project = (IProject) entry.getResource(); JavaProject javaProject = (JavaProject) JavaCore.create(project).getAdapter(JavaProject.class); IPath path = javaProject.getWOJavaArchive();  entry = JavaRuntime.newArchiveRuntimeClasspathEntry(path);  ArrayList al = new ArrayList(); al.add(entry); projectJars.put(name, al); projectList.add(name); } } else if (entryType == IRuntimeClasspathEntry.ARCHIVE) {  Matcher match = pattern.matcher(entry.getPath().toString()); if (match.find()) { frameworks.add(entry); } else if (projectJars.containsKey(name)) { ArrayList al = (ArrayList) projectJars.get(name); al.add(entry); } } }   ArrayList resolved = new ArrayList();   Set frameworkSet = new HashSet();   for (Iterator it = projectList.iterator(); it.hasNext();) { String name = (String) it.next(); ArrayList al = (ArrayList) projectJars.get(name); for (Iterator it2 = al.iterator(); it2.hasNext();) { IRuntimeClasspathEntry cpe = (IRuntimeClasspathEntry) it2.next(); Matcher match = pattern.matcher(cpe.getPath().toString()); if (match.find()) { String frameworkJar = match.group(1) + "-" + match.group(2); if (!frameworkSet.contains(frameworkJar)) { frameworkSet.add(frameworkJar); resolved.add(cpe); log.debug(cpe.getPath()); } else { log.debug("Bypassing - " + cpe.getPath()); } } else { resolved.add(cpe); log.debug(cpe.getPath()); } } }   for (Iterator it = frameworks.iterator(); it.hasNext();) { IRuntimeClasspathEntry cpe = (IRuntimeClasspathEntry) it.next(); Matcher match = pattern.matcher(cpe.getPath().toString()); if (match.find()) { String frameworkJar = match.group(1) + "-" + match.group(2); if (!frameworkSet.contains(frameworkJar)) { frameworkSet.add(frameworkJar); resolved.add(cpe); log.debug(cpe.getPath()); } else { log.debug("Bypassing - " + cpe.toString()); } } }  return (IRuntimeClasspathEntry[]) resolved.toArray(new IRuntimeClasspathEntry[resolved.size()]); }
	public IRuntimeClasspathEntry[] resolveClasspath(		IRuntimeClasspathEntry[] entries,		ILaunchConfiguration configuration)		throws CoreException {		List others = new ArrayList();		List resolved = new ArrayList();		// used for duplicate removal		Set allEntries = new HashSet();				// looks like we need to let super do it's thing before		// we start tinkering with things ourselves		entries = super.resolveClasspath(entries, configuration);		// resolve WO framework/application projects ourselves, let super do the rest		for (int i = 0; i < entries.length; ++i) {			IRuntimeClasspathEntry entry = entries[i];			IPath archive = _getWOJavaArchive(entry);			if (null != archive) {				// I think this line here breaks things: (hn3000)				//resolved.add(entry);				if (!allEntries.contains(archive.toString())) {					resolved.add(						JavaRuntime.newArchiveRuntimeClasspathEntry(archive));					allEntries.add(archive.toString());				}				allEntries.add(entry.toString());			} else {				others.add(entry);			}		}		// ... let super do the rest but remove duplicates from the resulting		// classpath ...		if (others.size() != 0) {			IRuntimeClasspathEntry oe[] =				(IRuntimeClasspathEntry[]) others.toArray(						new IRuntimeClasspathEntry[others.size()]				);			for (int i = 0; i < oe.length; ++i) {				IRuntimeClasspathEntry entry = oe[i];				String ls = entry.getLocation();				IPath loc = (null == ls) ? null : new Path(ls);				if (null == loc) {					resolved.add(entry);				} else {					if (!allEntries.contains(loc)) {						resolved.add(entry);						allEntries.add(loc);					}				}			}		}		return (IRuntimeClasspathEntry[]) resolved.toArray(			new IRuntimeClasspathEntry[resolved.size()]);	}