// Path: src/edu/toronto/cs/xcurator/utils/StrUtils.java
// public class StrUtils {
// 
//     private static final SecureRandom random = new SecureRandom();
// 
//     public static String nextRandString() {
//         return new BigInteger(130, random).toString(32);
//     }
// 
//     public static void main(String[] args) {
//         for (int i = 1; i < 100; i++) {
//             System.out.println(nextRandString());
//         }
//     }
// }


import edu.toronto.cs.xcurator.utils.StrUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.apache.commons.io.IOUtils;
import org.semanticweb.yars.nx.parser.NxParser;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
            tf.transform(domSource, sr);

        } catch (FileNotFoundException ex) {
            Logger.getLogger(GoldStandardGenerator.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException | TransformerException ex) {
            Logger.getLogger(GoldStandardGenerator.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                inputStream.close();
            } catch (IOException ex) {
                Logger.getLogger(GoldStandardGenerator.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }

    public void modifyValues(Node node) {
        // do something with the current node instead of System.out
//        System.out.println(node);
//        System.out.println("NodeName:" + node.getNodeName());
//        System.out.println("NodeValue:" + node.getNodeValue());
//        System.out.println("NodeType:" + node.getNodeType());
        if (node.getNodeType() == Node.TEXT_NODE) {
//            System.out.println("TextContent:" + node.getTextContent());
            node.setTextContent(StrUtils.nextRandString());
        }
        NamedNodeMap attrs = node.getAttributes();

        if (attrs != null) {
            for (int i = 0; i < attrs.getLength(); i++) {
                final Node attr = attrs.item(i);
// Path: src/edu/toronto/cs/xcurator/utils/StrUtils.java
// public class StrUtils {
// 
//     private static final SecureRandom random = new SecureRandom();
// 
//     public static String nextRandString() {
//         return new BigInteger(130, random).toString(32);
//     }
// 
//     public static void main(String[] args) {
//         for (int i = 1; i < 100; i++) {
//             System.out.println(nextRandString());
//         }
//     }
// }


// Path: src/edu/toronto/cs/xcurator/eval/GoldStandardGenerator.java
import edu.toronto.cs.xcurator.utils.StrUtils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import org.apache.commons.io.IOUtils;
import org.semanticweb.yars.nx.parser.NxParser;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

            tf.transform(domSource, sr);

        } catch (FileNotFoundException ex) {
            Logger.getLogger(GoldStandardGenerator.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException | TransformerException ex) {
            Logger.getLogger(GoldStandardGenerator.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            try {
                inputStream.close();
            } catch (IOException ex) {
                Logger.getLogger(GoldStandardGenerator.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }

    public void modifyValues(Node node) {
        // do something with the current node instead of System.out
//        System.out.println(node);
//        System.out.println("NodeName:" + node.getNodeName());
//        System.out.println("NodeValue:" + node.getNodeValue());
//        System.out.println("NodeType:" + node.getNodeType());
        if (node.getNodeType() == Node.TEXT_NODE) {
//            System.out.println("TextContent:" + node.getTextContent());
            node.setTextContent(StrUtils.nextRandString());
        }
        NamedNodeMap attrs = node.getAttributes();

        if (attrs != null) {
            for (int i = 0; i < attrs.getLength(); i++) {
                final Node attr = attrs.item(i);
                attr.setTextContent(StrUtils.nextRandString());