<commit_before>package org.intermine.web;

/*
 * Copyright (C) 2002-2004 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */

import java.util.Map;
import java.util.HashMap;
import java.util.LinkedHashMap;

import java.io.Reader;
import java.io.StringWriter;

import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

import org.intermine.util.SAXParser;

/**
 * Convert PathQueries to and from XML
 *
 * @author <NAME>
 */
public class TemplateQueryBinding
{
    /**
     * Convert a TemplateQuery to XML
     *
     * @param template the PathQuery
     * @return the corresponding XML String
     */
    public String marshal(TemplateQuery template) {
        StringWriter sw = new StringWriter();
        XMLOutputFactory factory = XMLOutputFactory.newInstance();

        try {
            XMLStreamWriter writer = factory.createXMLStreamWriter(sw);
            writer.writeStartElement("template");
            writer.writeAttribute("name", template.getName());
            writer.writeAttribute("description", template.getDescription());
            writer.writeAttribute("category", template.getCategory());
            new PathQueryBinding().marshal(template.getQuery(),
                                           template.getName(),
                                           template.getQuery().getModel().getName(),
                                           writer);
            writer.writeEndElement();
        } catch (XMLStreamException e) {
            throw new RuntimeException(e);
        }

        System.out.println(sw.toString());
        
        return sw.toString();
    }
<commit_msg>Removed a println<commit_after>package org.intermine.web;

/*
 * Copyright (C) 2002-2004 FlyMine
 *
 * This code may be freely distributed and modified under the
 * terms of the GNU Lesser General Public Licence.  This should
 * be distributed with the code.  See the LICENSE file for more
 * information or http://www.gnu.org/copyleft/lesser.html.
 *
 */

import java.util.Map;
import java.util.HashMap;
import java.util.LinkedHashMap;

import java.io.Reader;
import java.io.StringWriter;

import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

import org.intermine.util.SAXParser;

/**
 * Convert PathQueries to and from XML
 *
 * @author <NAME>
 */
public class TemplateQueryBinding
{
    /**
     * Convert a TemplateQuery to XML
     *
     * @param template the PathQuery
     * @return the corresponding XML String
     */
    public String marshal(TemplateQuery template) {
        StringWriter sw = new StringWriter();
        XMLOutputFactory factory = XMLOutputFactory.newInstance();

        try {
            XMLStreamWriter writer = factory.createXMLStreamWriter(sw);
            writer.writeStartElement("template");
            writer.writeAttribute("name", template.getName());
            writer.writeAttribute("description", template.getDescription());
            writer.writeAttribute("category", template.getCategory());
            new PathQueryBinding().marshal(template.getQuery(),
                                           template.getName(),
                                           template.getQuery().getModel().getName(),
                                           writer);
            writer.writeEndElement();
        } catch (XMLStreamException e) {
            throw new RuntimeException(e);
        }
        
        return sw.toString();
    }

{'fraction_non_alphanumeric': 0.09929078014184398, 'fraction_numerical': 0.004052684903748734, 'mean_word_length': 2.457968476357268, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5450430', 'n_tokens_mistral': 1022, 'n_tokens_neox': 986, 'n_words': 253}