public boolean addContribution(InputStream is, IContributor contributor, boolean persist, String contributionName, ResourceBundle translationBundle, Object key) { if (!checkReadWriteAccess(key, persist)) throw new IllegalArgumentException("Unauthorized access to the ExtensionRegistry.addXMLContribution() method. Check if proper access token is supplied."); if (contributionName == null) contributionName = "";  RegistryContributor internalContributor = (RegistryContributor) contributor; registryObjects.addContributor(internalContributor);  String ownerName = internalContributor.getActualName(); String message = NLS.bind(RegistryMessages.parse_problems, ownerName); MultiStatus problems = new MultiStatus(RegistryMessages.OWNER_NAME, ExtensionsParser.PARSE_PROBLEM, message, null); ExtensionsParser parser = new ExtensionsParser(problems, this); Contribution contribution = getElementFactory().createContribution(internalContributor.getActualId(), persist);  try { parser.parseManifest(strategy.getXMLParser(), new InputSource(is), contributionName, getObjectManager(), contribution, translationBundle); int status = problems.getSeverity(); if (status != IStatus.OK) { log(problems); if (status == IStatus.ERROR || status == IStatus.CANCEL) return false; } } catch (ParserConfigurationException e) { logError(ownerName, contributionName, e); return false; } catch (SAXException e) { logError(ownerName, contributionName, e); return false; } catch (IOException e) { logError(ownerName, contributionName, e); return false; } finally { try { is.close(); } catch (IOException ioe) {  } } add(contribution); return true;
public boolean addContribution(InputStream is, IContributor contributor, boolean persist, String contributionName, ResourceBundle translationBundle, Object key, long timestamp) { boolean result = addContribution(is, contributor, persist, contributionName, translationBundle, key); if (timestamp != 0) aggregatedTimestamp.add(timestamp); return result;
	public boolean addContribution(InputStream is, IContributor contributor, boolean persist, String contributionName, ResourceBundle translationBundle, Object key) {		if (!checkReadWriteAccess(key, persist))			throw new IllegalArgumentException("Unauthorized access to the ExtensionRegistry.addXMLContribution() method. Check if proper access token is supplied."); //$NON-NLS-1$		if (contributionName == null)			contributionName = ""; //$NON-NLS-1$		RegistryContributor internalContributor = (RegistryContributor) contributor;		registryObjects.addContributor(internalContributor); // only adds a contributor if it is not already present		String ownerName = internalContributor.getActualName();		String message = NLS.bind(RegistryMessages.parse_problems, ownerName);		MultiStatus problems = new MultiStatus(RegistryMessages.OWNER_NAME, ExtensionsParser.PARSE_PROBLEM, message, null);		ExtensionsParser parser = new ExtensionsParser(problems, this);		Contribution contribution = getElementFactory().createContribution(internalContributor.getActualId(), persist);		try {			parser.parseManifest(strategy.getXMLParser(), new InputSource(is), contributionName, getObjectManager(), contribution, translationBundle);			int status = problems.getSeverity();			if (status != IStatus.OK) {				log(problems);				if (status == IStatus.ERROR || status == IStatus.CANCEL)					return false;			}		} catch (ParserConfigurationException e) {			logError(ownerName, contributionName, e);			return false;		} catch (SAXException e) {			logError(ownerName, contributionName, e);			return false;		} catch (IOException e) {			logError(ownerName, contributionName, e);			return false;		} finally {			try {				is.close();			} catch (IOException ioe) {				// nothing to do			}		}		add(contribution); // the add() method does synchronization		return true;	}