private String dump(String profileName,String dir,String parameters) {
        // Import profiles
        if (dir.isEmpty())
            dir = ".";
        File dirInAppPackage = new File(dir, "search/query-profiles");
        if (dirInAppPackage.exists())
            dir = dirInAppPackage.getPath();
        QueryProfileXMLReader reader = new QueryProfileXMLReader();
        QueryProfileRegistry registry = reader.read(dir);
        registry.freeze();

        // Dump (through query to get wiring & parameter parsing done easily)
        Query query = new Query("?" + parameters, registry.compile().findQueryProfile(profileName));
        Map<String,Object> properties = query.properties().listProperties();

        // Create result
        StringBuilder b = new StringBuilder();
        for (Map.Entry<String,Object> property : properties.entrySet()) {
            b.append(property.getKey());
            b.append("=");
            b.append(property.getValue().toString());
            b.append("\n");
        }
        return b.toString();
    }
Creates and returns a dump from some parameters
container-search/src/main/java/com/yahoo/search/query/profile/DumpTool.java