This method processes the query parameters associated with the supplied node to extract
templated named values as properties on the trace node.

@param trace The trace
@param node The node
@return Whether query parameters were processed
18075
protected boolean processQueryParameters(Trace trace, Node node) {
        boolean ret = false;

        // Translate query string into a map
        Set<Property> queryString = node.getProperties(Constants.PROP_HTTP_QUERY);
        if (!queryString.isEmpty()) {
            StringTokenizer st = new StringTokenizer(queryString.iterator().next().getValue(), "&");
            while (st.hasMoreTokens()) {
                String token = st.nextToken();
                String[] namevalue = token.split("=");
                if (namevalue.length == 2) {
                    if (queryParameters.contains(namevalue[0])) {
                        try {
                            node.getProperties().add(new Property(namevalue[0],
                                    URLDecoder.decode(namevalue[1], "UTF-8")));
                            ret = true;
                        } catch (UnsupportedEncodingException e) {
                            if (log.isLoggable(Level.FINEST)) {
                                log.finest("Failed to decode value '" + namevalue[1] + "': " + e);
                            }
                        }
                    } else if (log.isLoggable(Level.FINEST)) {
                        log.finest("Ignoring query parameter '" + namevalue[0] + "'");
                    }
                } else if (log.isLoggable(Level.FINEST)) {
                    log.finest("Query string part does not include name/value pair: " + token);
                }
            }
        }

        return ret;
    }
1261192
void applyActiveTrace()
                    throws java.io.IOException {
        String[] names = activeNames.split(":");

        // Loop over existing Components.
        for (java.util.Iterator traceIterator = activeTrace.values().iterator(); traceIterator.hasNext();) {
            AbstractTrace abstractTrace = (AbstractTrace) traceIterator.next();

            int traceLevelToSet = Trace.Level_None;
            // Loop over active Components, testing to see if any of them is a match.
            for (int i = 0; i < names.length; i++) {
                String name = names[i];
                if (name.equals("*"))
                    name = ".*";
                if (java.util.regex.Pattern.matches(name, abstractTrace.getSourceClass().getName()))
                    traceLevelToSet = traceLevel;
            } // for names...
            abstractTrace.setLevel(traceLevelToSet);
        } // for ... activeTrace Map.

    }
444241
private void extractProperties(final Node node) {

		for (final String key : node.getPropertyKeys()) {

			final Object value = node.getProperty(key);
			if (value != null) {
				properties.put(key, value.getClass());
			}
		}
	}
287846
public void trace(Object message, Throwable t) {
        doLog(Level.TRACE, FQCN, message, null, t);
    }
24945
public void addTraces(List<LogTrace<E>> traces) throws ParameterException {
                Validate.notNull(traces);
                for (LogTrace<E> trace : traces) {
                        addTrace(trace);
                }
        }
1003884
private void traceKey(Key<?> key, GinjectorBindings bindings) {
    Binding binding = bindings.getBinding(key);
    // Make sure the binding is present: optional bindings might be missing.
    if (binding != null) {
      if (!reachable.add(binding)) {
        // The binding was already marked as reachable.
        return;
      }

      getReachableMemberInjects(bindings).addAll(binding.getMemberInjectRequests());

      for (Dependency dependency : binding.getDependencies()) {
        if (dependency.getSource().equals(key)) {
          Key<?> target = dependency.getTarget();

          PrettyPrinter.log(logger, TreeLogger.DEBUG, "%s:%s -> %s:%s [%s]",
              bindings, key, bindings, dependency.getTarget(), binding);
          traceKey(target, bindings);
        }
      }

      // Special cases: parent / child bindings induce dependencies between
      // GinjectorBindings objects, which can't be represented in the standard
      // dependency graph.
      if (binding instanceof ParentBinding) {
        ParentBinding parentBinding = (ParentBinding) binding;
        PrettyPrinter.log(logger, TreeLogger.DEBUG, "%s:%s -> %s:%s [inherited]",
            bindings, key, parentBinding.getParentBindings(), key);
        traceKey(key, parentBinding.getParentBindings());
      } else if (binding instanceof ExposedChildBinding) {
        ExposedChildBinding exposedChildBinding = (ExposedChildBinding) binding;
        PrettyPrinter.log(logger, TreeLogger.DEBUG, "%s:%s -> %s:%s [exposed]",
            bindings, key, exposedChildBinding.getChildBindings(), key);
        traceKey(key, exposedChildBinding.getChildBindings());
      }
    }
  }
81888
protected void initContextParam(XmlParser.Node node)
    {
        String name=node.getString("param-name",false,true);
        String value=node.getString("param-value",false,true);
        if(log.isDebugEnabled())
            log.debug("ContextParam: "+name+"="+value);
        getWebApplicationContext().setInitParameter(name,value);
    }
327319
public ImmutableList<TemplateMetadata> getTemplates(CallNode node) {
    if (node instanceof CallBasicNode) {
      String calleeName = ((CallBasicNode) node).getCalleeName();
      TemplateMetadata template = basicTemplatesOrElementsMap.get(calleeName);
      return template == null ? ImmutableList.of() : ImmutableList.of(template);
    } else {
      String calleeName = ((CallDelegateNode) node).getDelCalleeName();
      return delTemplateSelector.delTemplateNameToValues().get(calleeName);
    }
  }
1010396
public void trace(Object message) {
        doLog(Level.TRACE, FQCN, message, null, null);
    }
120813
protected void checkForCompletion(FragmentBuilder builder, Node node) {
        // Check if completed
        if (builder.isComplete()) {
            if (node != null) {
                Trace trace = builder.getTrace();

                if (builder.getLevel().ordinal() <= ReportingLevel.None.ordinal()) {
                    if (log.isLoggable(Level.FINEST)) {
                        log.finest("Not recording trace (level="
                                + builder.getLevel() + "): " + trace);
                    }
                } else {
                    if (trace != null && !trace.getNodes().isEmpty()) {
                        if (log.isLoggable(Level.FINEST)) {
                            log.finest("Record trace: " + trace);
                        }

                        // Check if first top level node is an internal consumer
                        // and if so move subsequent top level nodes within its scope
                        if (trace.getNodes().size() > 1
                                && trace.getNodes().get(0).getClass() == Consumer.class
                                && ((Consumer)trace.getNodes().get(0)).getEndpointType() == null) {
                            Consumer consumer=(Consumer)trace.getNodes().get(0);
                            while (trace.getNodes().size() > 1) {
                                consumer.getNodes().add(trace.getNodes().get(1));
                                trace.getNodes().remove(1);
                            }
                        }

                        recorder.record(trace);
                    }
                }
            }

            fragmentManager.clear();

            // Remove uncompleted correlation ids
            for (String id : builder.getUncompletedCorrelationIds()) {
                correlations.remove(id);
            }

            diagnostics();
        }
    }
1219141
public void readConfiguration(InputStream inputStream) throws TracerFactory.Exception {
    if (this.traceConfigSchema == null)
      System.err.println("CAUTION: Unable to validate the given configuration against a schema.");

    DocumentBuilderFactory builderFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
    builderFactory.setNamespaceAware(true);
    builderFactory.setXIncludeAware(false);

    try {
      DocumentBuilder parser = builderFactory.newDocumentBuilder();
      Document tracerConfigDoc = parser.parse(inputStream);

      if (this.traceConfigSchema != null) {
        DOMSource domSource = new DOMSource(tracerConfigDoc);
        Validator traceConfigValidator = this.traceConfigSchema.newValidator();
        TracerFactory.ErrorHandler errorHandler = new TracerFactory.ErrorHandler();
        traceConfigValidator.setErrorHandler(errorHandler);
        traceConfigValidator.validate(domSource);
      }
      
      this.poolWriteLock.lock();
      try {
        NodeList tracerNodes = (NodeList) this.xpath.evaluate("/dns:TraceConfig/dns:Pool/dns:TraceLogger", tracerConfigDoc.getDocumentElement(), XPathConstants.NODESET);
        System.out.println();
        System.out.println("Configured Pool Tracers = " + tracerNodes.getLength());
        for (int i = 0; i < tracerNodes.getLength(); i++) {
          System.out.println();
          System.out.println("(+) " + (i + 1) + ". TraceLogger");
          Element tracerElement = (Element) tracerNodes.item(i);
          if (!tracerElement.hasAttribute("name"))
            throw new TracerFactory.Exception("Missing 'name' attribut.");
          String name = tracerElement.getAttribute("name");
          String className = tracerElement.getAttribute("class");
          System.out.println("name = " + name);
          System.out.println("className = " + className);
          Class<?> tracerClass = Class.forName(className);
          if (!AbstractTracer.class.isAssignableFrom(tracerClass))
            throw new TracerFactory.Exception("Illegal tracer class!");
          AbstractTracer tracer = createTracer((Class<? extends AbstractTracer>) tracerClass, name);
          tracer.readConfiguration(this.xpath, tracerElement);

  //        synchronized (this.mapGuardObj) {
  //          this.tracerPool.put(name, tracer);
  //        }
          this.tracerPool.put(name, tracer);
        }

        NodeList threadNodes = (NodeList) this.xpath.evaluate("/dns:TraceConfig/dns:Map/dns:Threads/dns:Thread", tracerConfigDoc.getDocumentElement(), XPathConstants.NODESET);
        System.out.println();
        System.out.println("Configured Tracermappings = " + threadNodes.getLength());
        for (int i = 0; i < threadNodes.getLength(); i++) {
          System.out.println();
          System.out.println("(+) " + (i + 1) + ". Mapping");
          Element threadElement = (Element) threadNodes.item(i);
          String threadName = threadElement.getAttribute("name");
          String referencedTracerName = (String) this.xpath.evaluate("./dns:TraceLogger/@ref", threadElement, XPathConstants.STRING);
          System.out.println(threadName + " => " + referencedTracerName);
          this.threadName2Element.put(threadName, threadElement);
        }

        Node defaultTracerNode = (Node) this.xpath.evaluate("/dns:TraceConfig/dns:DefaultTracer", tracerConfigDoc.getDocumentElement(), XPathConstants.NODE);
        if (defaultTracerNode != null) {
          String className = ((Element) defaultTracerNode).getAttribute("class");
          Class<?> tracerClass = Class.forName(className);
          if (!NullTracer.class.isAssignableFrom(tracerClass))
            throw new TracerFactory.Exception("Requiring a NullTracer as default tracer!");
          this.defaultTracer = createTracer((Class<? extends NullTracer>) tracerClass);
        }
        else {
          this.defaultTracer = TracerFactory.NULLTRACER;
        }
      }
      finally {
        this.poolWriteLock.unlock();
      }
      
      this.queueWriteLock.lock();
      try {
        Node queueNode = (Node) this.xpath.evaluate("/dns:TraceConfig/dns:Queue", tracerConfigDoc.getDocumentElement(), XPathConstants.NODE);
        if (queueNode != null) {
          this.queueConfig = new Queue(queueNode);
        }
        else {
          this.queueConfig = new Queue();
        }
      }
      finally {
        this.queueWriteLock.unlock();
      }
    }
    catch (IOException | ParserConfigurationException | SAXException | XPathExpressionException | ClassNotFoundException | AbstractTracer.Exception ex) {
      throw new TracerFactory.Exception(ex);
    }
  }
392068
public Map<List<String>, String> extractNestedTypes(XTrace trace) {
		return XCostType.instance().extractNestedValues(trace);
	}
499429
public void trace( String format, Object arg )
    {
        if( m_delegate.isTraceEnabled() )
        {
            FormattingTuple tuple = MessageFormatter.format( format, arg );
            m_delegate.trace( tuple.getMessage(), tuple.getThrowable() );
        }
    }
63099
private static boolean checkForSamplingProperties(Node node) {
        Set<Property> samplingProperties = node instanceof ContainerNode ?
                ((ContainerNode) node).getPropertiesIncludingDescendants(Tags.SAMPLING_PRIORITY.getKey()) :
                node.getProperties(Tags.SAMPLING_PRIORITY.getKey());

        for (Property prop: samplingProperties) {
            int priority = 0;
            try {
                priority = Integer.parseInt(prop.getValue());
            } catch (NumberFormatException ex) {
                // continue on error
            }

            if (priority > 0) {
                return true;
            }
        }

        return false;
    }
1371940
public void process(Trace trace, Node node, Direction direction,
            Map<String, ?> headers, Object... values) {

        if (log.isLoggable(Level.FINEST)) {
            log.finest("ProcessManager: process trace=" + trace + " node=" + node
                    + " direction=" + direction + " headers=" + headers + " values=" + values
                    + " : available processors=" + processors);
        }

        if (trace.getTransaction() != null) {
            List<ProcessorWrapper> procs = null;

            synchronized (processors) {
                procs = processors.get(trace.getTransaction());
            }

            if (log.isLoggable(Level.FINEST)) {
                log.finest("ProcessManager: trace name=" + trace.getTransaction() + " processors=" + procs);
            }

            if (procs != null) {
                for (int i = 0; i < procs.size(); i++) {
                    procs.get(i).process(trace, node, direction, headers, values);
                }
            }
        }
    }
762027
public boolean isExist(String property) {
		try {
			new ValueExpression(property).evaluate(node);
		} catch (MissingNodeException e) {
			return false;
		}
		return true;
	}
1139455
public void logDomNode (String msg, Node node) {
		StackTraceElement caller = StackTraceUtils.getCallerStackTraceElement ();
		
		logDomNode (msg, node, Level.FINER, caller);
	}