private IPreferenceFilter[] internalMatches(IEclipsePreferences tree, IPreferenceFilter[] filters) throws BackingStoreException { ArrayList result = new ArrayList(); for (int i = 0; i < filters.length; i++) if (internalMatches(tree, filters[i])) result.add(filters[i]); return (IPreferenceFilter[]) result.toArray(new IPreferenceFilter[result.size()]);
private boolean internalMatches(IEclipsePreferences tree, IPreferenceFilter filter) throws BackingStoreException { String[] scopes = filter.getScopes(); if (scopes == null) throw new IllegalArgumentException(); String treePath = tree.absolutePath();  for (int i = 0; i < scopes.length; i++) { String scope = scopes[i]; Map mapping = filter.getMapping(scope);  if (mapping == null) {  if (tree.parent() == null && tree.nodeExists(scope)) return containsKeys((IEclipsePreferences) tree.node(scope));  if (scopeMatches(scope, tree) && containsKeys(tree)) return true; continue; }  for (Iterator iter = mapping.keySet().iterator(); iter.hasNext();) { String nodePath = (String) iter.next(); String nodeFullPath = '/' + scope + '/' + nodePath;  if (!nodeFullPath.startsWith(treePath)) continue;  String childPath = nodeFullPath.substring(treePath.length()); childPath = EclipsePreferences.makeRelative(childPath); if (tree.nodeExists(childPath)) { PreferenceFilterEntry[] entries;  try { entries = (PreferenceFilterEntry[]) mapping.get(nodePath); } catch (ClassCastException e) { log(createStatusError(PrefsMessages.preferences_classCastFilterEntry, e)); continue; }   Preferences child = tree.node(childPath); if (entries == null) return child.keys().length != 0 || child.childrenNames().length != 0;  for (int j = 0; j < entries.length; j++) { if (entries[j] != null && child.get(entries[j].getKey(), null) != null) return true; } } } } return false;
	private IPreferenceFilter[] internalMatches(IEclipsePreferences tree, IPreferenceFilter[] filters) throws BackingStoreException {		ArrayList result = new ArrayList();		for (int i = 0; i < filters.length; i++)			if (internalMatches(tree, filters[i]))				result.add(filters[i]);		return (IPreferenceFilter[]) result.toArray(new IPreferenceFilter[result.size()]);	}