Resolve the specified map and return the resolved map.

@param root
@return
547116
public static Map<String, Object> resolve(Map<String, Object> root)
	{
		Map<String, Object> newRoot = new HashMap<String, Object>();
		resolve(newRoot, root, "");
		return newRoot;
	}
752299
public RootMethodRunResult getRunResultByRootMethodKey(String key) {
        if (key == null) {
            throw new NullPointerException();
        }
        for (RootMethodRunResult rootMethodRunResult : rootMethodRunResults) {
            if ((rootMethodRunResult.getRootMethod() != null)
                    && key.equals(rootMethodRunResult.getRootMethod().getKey())) {
                return rootMethodRunResult;
            }
        }
        return null;
    }
977198
Mappings matchRoot(IAtom root) {
        checkCompatibleAPI(root);
        IAtomContainer mol = root.getContainer();
        if (query.getAtomCount() > 0 && ((IQueryAtom) query.getAtom(0)).matches(root)) {
            DfState local = new DfState(state);
            local.setRoot(root);
            return filter(new Mappings(query, mol, local), query, mol);
        } else {
            return new Mappings(query, mol, Collections.<int[]>emptySet());
        }
    }
99388
@Override
    public STRATEGYSTAGETYPE resolve(String... coordinates) throws IllegalArgumentException, ResolutionException {
        return delegate.resolve(coordinates);
    }
380315
public function setResolverArguments($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo): self
    {
        return $this
            ->setRoot($root)
            ->setArgs($args)
            ->setContext($context)
            ->setResolveInfo($resolveInfo);
    }
1277751
@Override
    public InetAddress[] resolve(String host) throws UnknownHostException {

        if (ipStringToBytes(host) != null) {
            return new InetAddress[] { InetAddress.getByAddress(ipStringToBytes(host)) };
        }

        List<InetAddress> inetAddresses = new ArrayList<>();
        try {
            resolve(host, inetAddresses);
        } catch (NamingException e) {
            throw new UnknownHostException(String.format("Cannot resolve %s to a hostname because of %s", host, e));
        }

        if (inetAddresses.isEmpty()) {
            throw new UnknownHostException(String.format("Cannot resolve %s to a hostname", host));
        }

        return inetAddresses.toArray(new InetAddress[inetAddresses.size()]);
    }
457813
public static String resolve(
            final Map<String, Map<String, String>> data, final String group,
            final String key
    )
    {
        return resolve(data, group, key, null);
    }
1281449
@SuppressWarnings("unchecked")
	protected Map<String, Object> getNestedMap(Map<String, Object> map, String key) {
		Object value = map.get(key);
		if (value == null) {
			return Collections.emptyMap();
		}
		return (Map<String, Object>) value;
	}
620218
public static String resolve( String base, String child )
	{
		String childPath = child.startsWith( "/" ) ? child.substring( 1 ) : child;
		String basePath = base.endsWith( "/" ) ? base : base + "/";
		return basePath + childPath;
	}
395845
public static void resolve(Map<String, String> env) {
		for (Map.Entry<String,String> entry: env.entrySet()) {
			entry.setValue(Util.replaceMacro(entry.getValue(), env));
		}
	}
493519
@Override
    public Extension resolve(ExtensionId extensionId) throws ResolveException
    {
        try {
            return resolve(extensionId.getId(), extensionId.getVersion());
        } catch (ResourceNotFoundException e) {
            throw new ExtensionNotFoundException("Could not find extension [" + extensionId + "]", e);
        } catch (Exception e) {
            throw new ResolveException("Failed to create extension object for extension [" + extensionId + "]", e);
        }
    }
41248
public List<Resource<?>> resolve()
   {
      Resource<?> r = res;
      String tk;

      char slashChar = File.separatorChar;
      String slashString = File.separator;

      if (".".equals(path))
      {
         return singleResult(r);
      }
      else if (path.startsWith("~"))
      {
         File homeDir = OperatingSystemUtils.getUserHomeDir();

         if (path.length() == 1)
         {
            return singleResult(factory.create(DirectoryResource.class, homeDir));
         }
         else
         {
            cursor++;
            r = factory.create(DirectoryResource.class, homeDir);
         }
      }
      // for windows, support drive letter prefixes here.
      else if (isWindows && WINDOWS_DRIVE_PATTERN.matcher(path).matches())
      {
         int idx = path.lastIndexOf(slashChar) + 1;
         r = factory.create(DirectoryResource.class, new File(path.substring(0, idx)).getAbsoluteFile());
         cursor = idx;
      }
      // Is an URL ?
      else if (path.matches(".*://.*"))
      {
         int idx = path.indexOf(" ");
         if (idx == -1)
         {
            idx = length;
         }
         try
         {
            r = factory.create(URLResource.class, new URL(path.substring(0, idx)));
         }
         catch (MalformedURLException e)
         {
            throw new RuntimeException(e);
         }
         cursor = idx + 1;
      }

      while (cursor < length)
      {
         SW: switch (path.charAt(cursor++))
         {
         case '\\':
         case '/':
            if (cursor - 1 == 0)
            {
               r = factory.create(new File(slashString).getAbsoluteFile());
            }
            continue;

         case '.':
            switch (read())
            {
            case '.':
               cursor++;
               Resource<?> parent = r.getParent();
               if (parent != null)
               {
                  r = parent;
               }
               break SW;

            default:
               if (cursor < length && path.charAt(cursor) == slashChar)
               {
                  cursor++;
                  break SW;
               }
            }

         default:
            boolean first = --cursor == 0;
            tk = capture();

            if (WILDCARDS_PATTERN.matcher(tk).matches())
            {
               boolean startDot = tk.startsWith(".");
               String regex = pathspecToRegEx(tk.startsWith(slashString) ? tk.substring(1) : tk);
               Pattern p;
               try
               {
                  p = Pattern.compile(regex);
               }
               catch (PatternSyntaxException pe)
               {
                  // Regex might be incomplete, trying again quoted
                  p = Pattern.compile(Pattern.quote(regex));
               }

               List<Resource<?>> res = new ArrayList<>();

               for (Resource<?> child : r.listResources())
               {
                  if (p.matcher(child.getName()).matches())
                  {
                     // child.setFlag(ResourceFlag.AmbiguouslyQualified);

                     if (child.getName().startsWith("."))
                     {
                        if (startDot)
                        {
                           res.add(child);
                        }
                     }
                     else
                     {
                        res.add(child);
                     }
                  }
               }

               if (cursor != length)
               {
                  for (Resource<?> child : res)
                  {
                     results.addAll(new ResourcePathResolver(factory, child, path, cursor).resolve());
                  }
               }
               else
               {
                  results.addAll(res);
               }

               return results;
            }

            if (tk.startsWith(slashString))
            {
               if (first)
               {
                  r = factory.create(new File(tk));
                  cursor++;
                  continue;
               }
               else
               {
                  tk = tk.substring(1);
               }
            }

            Resource<?> child = r.getChild(tk);
            if (child == null)
            {
               throw new RuntimeException("no such child: " + tk);
            }
            r = child;
            break;
         }
      }

      return singleResult(r);
   }
1003177
protected String resolveKey(String alias) {
		List<String> possibleKeys = aliases.get(alias);
		for (String key : possibleKeys) {
			if (resolver.containsProperty(key)) {
				return key;
			}
		}
		return null;
	}
1353565
function (map, ctx) {
            for (var k in map) {
                map[k] = this.resolveAssets(map[k], ctx);
            }

            return map;
        }
24717
public static Map<String,List<String>> findImages( File rootDir ) {
		File files[] = rootDir.listFiles();
		if( files == null )
			return null;

		List<File> imageDirectories = new ArrayList<>();
		for( File f : files ) {
			if( f.isDirectory() ) {
				imageDirectories.add(f);
			}
		}
		Map<String,List<String>> out = new HashMap<>();
		for( File d : imageDirectories ) {
			List<String> images = new ArrayList<>();

			files = d.listFiles();
			if( files == null )
				throw new RuntimeException("Should be a directory!");

			for( File f : files ) {
				if( f.isHidden() || f.isDirectory() || f.getName().endsWith(".txt") ) {
					continue;
				}

				images.add( f.getPath() );
			}

			String key = d.getName().toLowerCase();

			out.put(key,images);
		}

		return out;
	}
284010
public static String resolveURI(final String baseURI, final Parent parent, String url) {

        if (!resolveURIs) {
            return url;
        }

        if (isRelativeURI(url)) {

            if (".".equals(url) || "./".equals(url)) {
                url = "";
            }

            if (url.startsWith("/") && baseURI != null) {
                String base = null;
                final int slashslash = baseURI.indexOf("//");
                final int nextslash = baseURI.indexOf("/", slashslash + 2);
                if (nextslash != -1) {
                    base = baseURI.substring(0, nextslash);
                }
                return formURI(base, url);
            }

            // Relative URI with parent
            if (parent != null && parent instanceof Element) {

                // Do we have an xml:base?
                String xmlbase = ((Element) parent).getAttributeValue("base", Namespace.XML_NAMESPACE);
                if (xmlbase != null && xmlbase.trim().length() > 0) {
                    if (isAbsoluteURI(xmlbase)) {
                        // Absolute xml:base, so form URI right now
                        if (url.startsWith("/")) {
                            // Host relative URI
                            final int slashslash = xmlbase.indexOf("//");
                            final int nextslash = xmlbase.indexOf("/", slashslash + 2);
                            if (nextslash != -1) {
                                xmlbase = xmlbase.substring(0, nextslash);
                            }
                            return formURI(xmlbase, url);
                        }
                        if (!xmlbase.endsWith("/")) {
                            // Base URI is filename, strip it off
                            xmlbase = xmlbase.substring(0, xmlbase.lastIndexOf("/"));
                        }
                        return formURI(xmlbase, url);
                    } else {
                        // Relative xml:base, so walk up tree
                        return resolveURI(baseURI, parent.getParent(), stripTrailingSlash(xmlbase) + "/" + stripStartingSlash(url));
                    }
                }
                // No xml:base so walk up tree
                return resolveURI(baseURI, parent.getParent(), url);

                // Relative URI with no parent (i.e. top of tree), so form URI
                // right now
            } else if (parent == null || parent instanceof Document) {
                return formURI(baseURI, url);
            }
        }

        return url;

    }
987816
public XMLNode parseXML(String root) {
        if (xmlElementsMap.containsKey(root)) {
            return xmlElementsMap.get(root);
        }
        try {
            currentRoot = root;
            isParsing = false;
            SAXParserFactory factory = SAXParserFactory.newInstance();
            SAXParser saxParser = factory.newSAXParser();
            InputStream in = configuration.getBuilderXML();
            saxParser.parse(in, this);
            return xmlElementsMap.get(root);
        } catch (Throwable t) {
            t.printStackTrace();
            throw new DocletAbortException(t);
        }
    }