Produces an SCXMLFrontier by reversing a decomposition; the model text is bundled into the decomposition.

@param decomposition the decomposition, assembled back into a map
@return a rebuilt SCXMLFrontier
19692
public Frontier reproduce(Map<String, String> decomposition) {
        return reproduce(decomposition, new LinkedList<CustomTagExtension>());
    }
773679
public void transform(Source xmlSource, Result outputTarget, boolean shouldRelease)
          throws TransformerException
  {

    synchronized (m_reentryGuard)
    {
      SerializationHandler xoh = createSerializationHandler(outputTarget);
      this.setSerializationHandler(xoh);        

      m_outputTarget = outputTarget;

      transform(xmlSource, shouldRelease);
    }
  }
591169
public Path getTransformedXSLTPath(FileModel payload)
    {
        ReportService reportService = new ReportService(getGraphContext());
        Path outputPath = reportService.getReportDirectory();
        outputPath = outputPath.resolve(this.getRelativeTransformedXSLTPath(payload));
        if (!Files.isDirectory(outputPath))
        {
            try
            {
                Files.createDirectories(outputPath);
            }
            catch (IOException e)
            {
                throw new WindupException("Failed to create output directory at: " + outputPath + " due to: "
                            + e.getMessage(), e);
            }
        }
        return outputPath;
    }
843026
@Override
    final String decompile(int indent, int flags)
    {
        String encodedSource = getEncodedSource();
        if (encodedSource == null) {
            return super.decompile(indent, flags);
        }
        UintMap properties = new UintMap(1);
        properties.put(Decompiler.INITIAL_INDENT_PROP, indent);
        return Decompiler.decompile(encodedSource, flags, properties);
    }
430116
public static ObjectMapper createMapperWithJaxbAnnotationInspector() {
        ObjectMapper mapper = new ObjectMapper();
        AnnotationIntrospector annotationInspector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
        mapper.getSerializationConfig().with(annotationInspector);
        return mapper;
    }
901655
public T headerFragment(Object model, ObjectMapper objectMapper) {
        try {
            return header(objectMapper.writer().writeValueAsString(model));
        } catch (JsonProcessingException e) {
            throw new CitrusRuntimeException("Failed to map object graph for message header data", e);
        }
    }
585312
public MultimapJoiner useForNull(final String nullText) {
		return new MultimapJoiner(entryJoiner.useForNull(nullText), separator, keyValueSeparator) {
			@Override
			protected CharSequence toString(Object part) {
				return (part == null) ? nullText : MultimapJoiner.this.toString(part);
			}

			@Override
			public MultimapJoiner useForNull(String nullText) {
				throw new UnsupportedOperationException("already specified useForNull");
			}

			@Override
			public MultimapJoiner skipNulls() {
				throw new UnsupportedOperationException("already specified useForNull");
			}
		};
	}
1152298
public String rewrite() {
        if (sqlTokens.isEmpty()) {
            return originalSQL;
        }
        SQLBuilder result = new SQLBuilder(Collections.emptyList());
        int count = 0;
        for (SQLToken each : sqlTokens) {
            if (0 == count) {
                result.appendLiterals(originalSQL.substring(0, each.getStartIndex()));
            }
            if (each instanceof SchemaToken) {
                appendSchemaPlaceholder(originalSQL, result, (SchemaToken) each, count);
            }
            count++;
        }
        return result.toSQL(masterSlaveRule, metaData.getDataSource());
    }
240095
private Diff generateFullRevision(final Revision revision)
		throws UnsupportedEncodingException
	{

		Diff diff = new Diff();
		RevisionCodecData codecData = new RevisionCodecData();

		// FullRevisionUncompressed (C L T)
		part = new DiffPart(DiffAction.FULL_REVISION_UNCOMPRESSED);

		// L T
		text = revision.getRevisionText();
		revCurrent = text.toCharArray();

		part.setText(text);
		codecData.checkBlocksizeL(text.getBytes(WIKIPEDIA_ENCODING).length);

		diff.add(part);

		diff.setCodecData(codecData);
		return diff;
	}
632544
protected IntermediateQueryBuilder convertToBuilderAndTransform(IntermediateQuery originalQuery,
                                                                  HomogeneousQueryNodeTransformer nodeTransformer,
                                                                  DistinctVariableOnlyDataAtom transformedProjectionAtom) {
        IntermediateQueryBuilder queryBuilder = originalQuery.newBuilder();

        // Clone the original root node and apply the transformer if available.
        QueryNode originalRootNode = originalQuery.getRootNode();
        QueryNode newRootNode;
        newRootNode = originalRootNode.acceptNodeTransformer(nodeTransformer);
        queryBuilder.init(transformedProjectionAtom, newRootNode);
        return copyChildrenNodesToBuilder(originalQuery, queryBuilder, originalRootNode, newRootNode, nodeTransformer);
    }
703500
public static String denormalize(final CharSequence self) {
        final String s = self.toString();
        // Don't do this in static initializer because we may never be needed.
        // TODO: Put this lineSeparator property somewhere everyone can use it.
        if (lineSeparator == null) {
            final StringWriter sw = new StringWriter(2);
            try {
                // We use BufferedWriter rather than System.getProperty because
                // it has the security manager rigamarole to deal with the possible exception.
                final BufferedWriter bw = new BufferedWriter(sw);
                bw.newLine();
                bw.flush();
                lineSeparator = sw.toString();
            } catch (IOException ioe) {
                // This shouldn't happen, but this is the same default used by
                // BufferedWriter on a security exception.
                lineSeparator = "\n";
            }
        }

        final int len = s.length();

        if (len < 1) {
            return s;
        }

        final StringBuilder sb = new StringBuilder((110 * len) / 100);

        int i = 0;

        while (i < len) {
            final char ch = s.charAt(i++);

            switch (ch) {
                case '\r':
                    sb.append(lineSeparator);

                    // Eat the following LF if any.
                    if ((i < len) && (s.charAt(i) == '\n')) {
                        ++i;
                    }

                    break;

                case '\n':
                    sb.append(lineSeparator);
                    break;

                default:
                    sb.append(ch);
                    break;
            }
         }

        return sb.toString();
    }
335210
@Get("/projects/{projectName}/repos/{repoName}/revision/{revision}")
    @RequiresReadPermission
    public Map<String, Integer> normalizeRevision(Repository repository, @Param("revision") String revision) {
        final Revision normalizedRevision = repository.normalizeNow(new Revision(revision));
        return ImmutableMap.of("revision", normalizedRevision.major());
    }
636297
public DecomposableMatchBuilder0<T> decomposeFirst(DecomposableMatchBuilder0<A> first) {
    Objects.requireNonNull(first);

    Map<Integer, DecomposableMatchBuilder> buildersByIndex = Maps.treeMapOf(extractedIndex, first);

    List<Matcher<Object>> matchers = getChildMatchers(buildersByIndex);

    NestedFieldExtractor<T> nestedFieldExtractor = getNestedFieldExtractor(buildersByIndex);

    return new DecomposableMatchBuilder0<>(matchers, nestedFieldExtractor);
  }
812866
@Pure
	public final Transform2D toTransform2D(Segment1D<?, ?> segment) {
		assert segment != null : AssertMessages.notNullParameter(0);
		final Point2D<?, ?> a = segment.getFirstPoint();
		if (a == null) {
			return null;
		}
		final Point2D<?, ?> b = segment.getLastPoint();
		if (b == null) {
			return null;
		}
		return toTransform2D(a.getX(), a.getY(), b.getX(), b.getY());
	}
740494
public String getXML(boolean bIncludeHeader)
    {
        String strOut = Util.convertDOMToXML(this.getNode(false));
        if (bIncludeHeader)
            if (this.getMessageHeader() != null)
        {
            String strHeaderXML = this.getMessageHeader().addXML(null).toString();
            int iStartOfRootTag = strOut.lastIndexOf("</");
            if (iStartOfRootTag != -1)
                strOut = strOut.substring(0, iStartOfRootTag) + strHeaderXML + strOut.substring(iStartOfRootTag);
        }
        return strOut;
    }
867382
public String getXML(boolean bIncludeHeader)
    {
        StringBuffer sbXML = new StringBuffer();
        String rootTag = ROOT_TAG;
        if (this.getMessageDataDesc(null) != null)
        	if (this.getMessageDataDesc(null).getKey() != null)
        		rootTag = this.getMessageDataDesc(null).getKey();
        Util.addStartTag(sbXML, rootTag).append(Constant.RETURN);
        Util.addXMLMap(sbXML, this.getMap());
        if (bIncludeHeader)
            if (this.getMessageHeader() != null)
                this.getMessageHeader().addXML(sbXML);
        Util.addEndTag(sbXML, rootTag);
        return sbXML.toString();
    }
1071429
private static MyNode compactForm(MyNode n) {
        if (n.node.getNodeType() == Node.TEXT_NODE) {
            n.out = n.node.getNodeValue().trim();
        } else {
            n.out = n.node.getNodeName();
            if (n.out.startsWith("m:")) {
                n.out = n.out.substring(2);
            }
            if ("annotation-xml".equals(n.out)) {
                n.out = "";
            }
            if ("pquery".equals(n.out) || "cquery".equals(n.out)) {
                n.out = "";
            }
            if ("mws:qvar".equals(n.out)) {
                final String qname = n.node.getAttributes().getNamedItem("name").toString();
                if (n.qVar == null) {
                    n.out = "\\qvar{x_0}";
                    n.qVar = new HashMap<>();
                    n.qVar.put(qname, 0);
                } else {
                    Integer qInt = n.qVar.get(qname);
                    if (qInt == null) {
                        n.out = "\\qvar{x_" + n.qVar.size() + "}";
                        n.qVar.put(qname, n.qVar.size());
                    } else {
                        n.out = "\\qqvar{x_" + qInt + "}";
                    }
                }
            }
            if (n.node.hasChildNodes()) {
                String sChild = "";
                for (Node childNode = n.node.getFirstChild();
                     childNode != null; childNode = childNode.getNextSibling()) {
                    MyNode ret = compactForm(new MyNode(childNode, n.qVar));
                    String cn = ret.out;
                    n.qVar = ret.qVar;
                    if (!cn.isEmpty()) {
                        sChild += cn + ";";
                    }
                }
                if (sChild.endsWith(";")) {
                    sChild = sChild.substring(0, sChild.length() - 1).trim();
                }
                if (!sChild.isEmpty() && sChild.codePointAt(0) != 8290 && sChild.codePointAt(0) != 8289) {
                    if ("m:annotation-xml".equals(n.node.getNodeName())) {
                        n.out += sChild;
                    } else {
                        n.out += '[' + sChild + ']';
                    }
                }
            }
        }
        if ("mo".equals(n.out)) {
            //Remove empty mo elements
            n.out = "";
        }
        return n;
    }