synchronized (pkgSource) {
synchronized (pkgSources) {
	PackageSource createPackageSource(ExportPackageDescription export, boolean storeSource) {		PackageSource pkgSource = null;		// check to see if it is a reexport		if (!export.isRoot()) {			pkgSource = new ReexportPackageSource(export.getName());		} else {			// check to see if it is a filtered export			String includes = (String) export.getDirective(Constants.INCLUDE_DIRECTIVE);			String excludes = (String) export.getDirective(Constants.EXCLUDE_DIRECTIVE);			String[] friends = (String[]) export.getDirective(Constants.FRIENDS_DIRECTIVE);			if (friends != null) {				boolean strict = Constants.STRICT_MODE.equals(bundle.framework.adaptor.getState().getPlatformProperties()[0].get(Constants.OSGI_RESOLVER_MODE));				if (!strict)					friends = null; // do not pay attention to friends if not in strict mode			}			if (includes != null || excludes != null || friends != null) {				ExportPackageDescription[] exports = description.getExportPackages();				int index = -1;				int first = -1;				for (int i = 0; i < exports.length; i++) {					if (first == -1 && exports[i].getName().equals(export.getName()))						first = i;					if (exports[i] == export && first != i) {						index = i;						break;					}				}				pkgSource = new FilteredSourcePackage(export.getName(), index, this, includes, excludes, friends);			}		}		if (storeSource) {			// if the package source is not null then store the source only if it is not already present;			// getByKey is called outside of a synch block because we really do not			// care too much of duplicates getting created.  Only the first one will			// successfully get stored into pkgSources			if (pkgSource != null && pkgSources.getByKey(export.getName()) == null)				synchronized (pkgSource) {					pkgSources.add(pkgSource);				}		} else {			// we are not storing the special case sources, but pkgSource == null this means this			// is a normal package source; get it and return it.			if (pkgSource == null)				pkgSource = getPackageSource(export.getName());		}		return pkgSource;	}