bundle = ((BundleContextImpl) context).getBundleByLocation(token);
String symbolicName = token; Version version = null;    int ix = token.indexOf( "@" ); if (ix != -1) { if ((ix + 1) != token.length()) { try {  version = Version.parseVersion( token.substring( ix + 1, token.length() )); symbolicName = token.substring( 0, ix ); } catch (IllegalArgumentException e) {  } } }  Bundle[] bundles = context.getBundles(); for (int i = 0, n = bundles.length; i < n; i++ ) { AbstractBundle b = (AbstractBundle)bundles[i];   if ((symbolicName.equals(b.getSymbolicName()) && (version == null || version.equals(b.getVersion()))) || token.equals(b.getLocation())) { bundle = b; break; } }
	protected AbstractBundle getBundleFromToken(CommandInterpreter intp, String token, boolean error) {		AbstractBundle bundle;		try {			long id = Long.parseLong(token);			bundle = (AbstractBundle) context.getBundle(id);		} catch (NumberFormatException nfe) {			bundle = ((BundleContextImpl) context).getBundleByLocation(token);		}		if ((bundle == null) && error) {			intp.println(NLS.bind(ConsoleMsg.CONSOLE_CANNOT_FIND_BUNDLE_ERROR, token)); 		}		return (bundle);	}