<commit_before>import gov.nih.nci.cagrid.cqlresultset.CQLObjectResult;
import gov.nih.nci.cagrid.cqlresultset.CQLQueryResults;
import gov.nih.nci.cagrid.data.utilities.CQLQueryResultsIterator;
import gov.nih.nci.cagrid.dcql.DCQLQuery;

import java.io.FileInputStream;
import java.io.File;

import junit.framework.TestCase;

import org.globus.wsrf.encoding.ObjectDeserializer;

import org.xml.sax.InputSource;

import gov.nih.nci.cagrid.fqp.processor.FederatedQueryEngine;


public class TestFQE extends TestCase {

    public TestFQE(String sTestName) {
        super(sTestName);
    }

    protected void setUp() throws Exception {
        super.setUp();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }


    public void testFQE()  throws Exception {
        String qryFile = "simpleQuery1.xml";
		String QUERIES_DIR = "test" + File.separator + "resources" + File.separator;
        try {
            DCQLQuery dcql = (DCQLQuery) ObjectDeserializer.deserialize(new InputSource(new FileInputStream(QUERIES_DIR+File.separator+qryFile)),DCQLQuery.class);
            FederatedQueryEngine fqe = new FederatedQueryEngine();

            CQLQueryResults results = fqe.executeAndAggregateResults(dcql);
<commit_msg>added comments<commit_after>import gov.nih.nci.cagrid.cqlresultset.CQLObjectResult;
import gov.nih.nci.cagrid.cqlresultset.CQLQueryResults;
import gov.nih.nci.cagrid.data.utilities.CQLQueryResultsIterator;
import gov.nih.nci.cagrid.dcql.DCQLQuery;

import java.io.FileInputStream;
import java.io.File;

import junit.framework.TestCase;

import org.globus.wsrf.encoding.ObjectDeserializer;

import org.xml.sax.InputSource;

import gov.nih.nci.cagrid.fqp.processor.FederatedQueryEngine;


/**
 * This is a system test to test the functionality of the FQE, which is performs DCQL queries.  
 * It is a system test because it requires a number of services to be available and running.
 * @author <NAME>
 * @testType system
 */
public class TestFQE extends TestCase {

    public TestFQE(String sTestName) {
        super(sTestName);
    }

    protected void setUp() throws Exception {
        super.setUp();
    }

    protected void tearDown() throws Exception {
        super.tearDown();
    }

    /**
     * Tests the FQP
     * @throws Exception
     */
    public void testFQE()  throws Exception {
        String qryFile = "simpleQuery1.xml";
		String QUERIES_DIR = "test" + File.separator + "resources" + File.separator;
        try {
            DCQLQuery dcql = (DCQLQuery) ObjectDeserializer.deserialize(new InputSource(new FileInputStream(QUERIES_DIR+File.separator+qryFile)),DCQLQuery.class);
            FederatedQueryEngine fqe = new FederatedQueryEngine();

            CQLQueryResults results = fqe.executeAndAggregateResults(dcql);

{'fraction_non_alphanumeric': 0.09585121602288985, 'fraction_numerical': 0.000715307582260372, 'mean_word_length': 3.692953020134228, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2368498', 'n_tokens_mistral': 919, 'n_tokens_neox': 896, 'n_words': 182}