ExportedPreferences realNode = (ExportedPreferences) node; String version = realNode.getVersion(); if (version == null || !PluginVersionIdentifier.validateVersion(version).isOK()) return true; PluginVersionIdentifier versionInFile = new PluginVersionIdentifier(version);   String bundleName = getBundleName(node.absolutePath()); if (bundleName == null) return true; String stringVersion = getBundleVersion(bundleName); if (stringVersion == null || !PluginVersionIdentifier.validateVersion(stringVersion).isOK()) return true; PluginVersionIdentifier versionInMemory = new PluginVersionIdentifier(stringVersion);   IStatus verification = validatePluginVersions(bundleName, versionInFile, versionInMemory); if (verification != null) result.add(verification);
String path = absolutePath.length() <= baseLength ? EMPTY_STRING : EclipsePreferences.makeRelative(absolutePath.substring(baseLength));  for (int i = 0; i < excludesList.length; i++) { String exclusion = EclipsePreferences.makeRelative(excludesList[i]); if (path.startsWith(exclusion)) return false; } boolean needToAddVersion = InstanceScope.SCOPE.equals(scope);  String[] keys = node.keys(); for (int i = 0; i < keys.length; i++) { String key = keys[i]; boolean ignore = false; for (int j = 0; !ignore && j < excludesList.length; j++) if (EclipsePreferences.encodePath(path, key).startsWith(EclipsePreferences.makeRelative(excludesList[j]))) ignore = true; if (!ignore) { String value = node.get(key, null); if (value != null) { if (needToAddVersion) { String bundle = getBundleName(absolutePath); if (bundle != null) { String version = getBundleVersion(bundle); if (version != null) result.put(BUNDLE_VERSION_PREFIX + bundle, version); } needToAddVersion = false; } result.put(EclipsePreferences.encodePath(absolutePath, key), value); } } }
			public boolean visit(IEclipsePreferences node) {				if (!(node instanceof ExportedPreferences))					return false;				// calculate the version in the file				ExportedPreferences realNode = (ExportedPreferences) node;				String version = realNode.getVersion();				if (version == null || !PluginVersionIdentifier.validateVersion(version).isOK())					return true;				PluginVersionIdentifier versionInFile = new PluginVersionIdentifier(version);				// calculate the version of the installed bundle				String bundleName = getBundleName(node.absolutePath());				if (bundleName == null)					return true;				String stringVersion = getBundleVersion(bundleName);				if (stringVersion == null || !PluginVersionIdentifier.validateVersion(stringVersion).isOK())					return true;				PluginVersionIdentifier versionInMemory = new PluginVersionIdentifier(stringVersion);				// verify the versions based on the matching rules				IStatus verification = validatePluginVersions(bundleName, versionInFile, versionInMemory);				if (verification != null)					result.add(verification);				return true;			}