text:
/*******************************************************************************
 *
 * Module Name: nseval - Object evaluation, includes control method execution
 *
 ******************************************************************************/

/*
 * Copyright (C) 2000 - 2013, Intel Corp.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions, and the following disclaimer,
 *    without modification.
 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
 *    substantially similar to the "NO WARRANTY" disclaimer below
 *    ("Disclaimer") and any redistribution must be conditioned upon
 *    including a substantially similar Disclaimer requirement for further
 *    binary redistribution.
 * 3. Neither the names of the above-listed copyright holders nor the names
 *    of any contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * Alternatively, this software may be distributed under the terms of the
 * GNU General Public License ("GPL") version 2 as published by the Free
 * Software Foundation.
 *
 * NO WARRANTY
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGES.
 */

#define __NSEVAL_C__

#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
#include "acinterp.h"
#include "acnamesp.h"

#define _COMPONENT          ACPI_NAMESPACE
        ACPI_MODULE_NAME    ("nseval")

/* Local prototypes */

static void
AcpiNsExecModuleCode (
    ACPI_OPERAND_OBJECT     *MethodObj,
    ACPI_EVALUATE_INFO      *Info);

/*******************************************************************************
 *
 * FUNCTION:    AcpiNsEvaluate
 *
 * PARAMETERS:  Info            - Evaluation info block, contains:
 *                  PrefixNode      - Prefix or Method/Object Node to execute
 *                  RelativePath    - Name of method to execute, If NULL, the
 *                                    Node is the object to execute
 *                  Parameters      - List of parameters to pass to the method,
 *                                    terminated by NULL. Params itself may be
 *                                    NULL if no parameters are being passed.
 *                  ReturnObject    - Where to put method's return value (if
 *                                    any). If NULL, no value is returned.
 *                  ParameterType   - Type of Parameter list
 *                  ReturnObject    - Where to put method's return value (if
 *                                    any). If NULL, no value is returned.
 *                  Flags           - ACPI_IGNORE_RETURN_VALUE to delete return
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Execute a control method or return the current value of an
 *              ACPI namespace object.
 *
 * MUTEX:       Locks interpreter
 *
 ******************************************************************************/

ACPI_STATUS
AcpiNsEvaluate (
    ACPI_EVALUATE_INFO      *Info)
{
    ACPI_STATUS             Status;

    ACPI_FUNCTION_TRACE (NsEvaluate);

    if (!Info)
    {
        return_ACPI_STATUS (AE_BAD_PARAMETER);
    }

    if (!Info->Node)
    {
        /*
         * Get the actual namespace node for the target object if we
         * need to. Handles these cases:
         *
         * 1) Null node, valid pathname from root (absolute path)
         * 2) Node and valid pathname (path relative to Node)
         * 3) Node, Null pathname
         */
        Status = AcpiNsGetNode (Info->PrefixNode, Info->RelativePathname,
            ACPI_NS_NO_UPSEARCH, &Info->Node);
        if (ACPI_FAILURE (Status))
        {
            return_ACPI_STATUS (Status);
        }
    }

    /*
     * For a method alias, we must grab the actual method node so that
     * proper scoping context will be established before execution.
     */
    if (AcpiNsGetType (Info->Node) == ACPI_TYPE_LOCAL_METHOD_ALIAS)
    {
        Info->Node = ACPI_CAST_PTR (
            ACPI_NAMESPACE_NODE, Info->Node->Object);
    }

    /* Complete the info block initialization */

    Info->ReturnObject = NULL;
    Info->NodeFlags = Info->Node->Flags;
    Info->ObjDesc = AcpiNsGetAttachedObject (Info->Node);

    ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "%s [%p] Value %p\n",
        Info->RelativePathname, Info->Node,
        AcpiNsGetAttachedObject (Info->Node)));

    /* Get info if we have a predefined name (_HID, etc.) */

    Info->Predefined = AcpiUtMatchPredefinedMethod (Info->Node->Name.Ascii);

    /* Get the full pathname to the object, for use in warning messages */

    Info->FullPathname = AcpiNsGetExternalPathname (Info->Node);
    if (!Info->FullPathname)
    {
        return_ACPI_STATUS (AE_NO_MEMORY);
    }

    /* Count the number of arguments being passed in */

    Info->ParamCount = 0;
    if (Info->Parameters)
    {
        while (Info->Parameters[Info->ParamCount])
        {
            Info->ParamCount++;
        }

        /* Warn on impossible argument count */

        if (Info->ParamCount > ACPI_METHOD_NUM_ARGS)
        {
            ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, ACPI_WARN_ALWAYS,
                "Excess arguments (%u) - using only %u",
                Info->ParamCount, ACPI_METHOD_NUM_ARGS));

            Info->ParamCount = ACPI_METHOD_NUM_ARGS;
        }
    }

    /*
     * For predefined names: Check that the declared argument count
     * matches the ACPI spec -- otherwise this is a BIOS error.
     */
    AcpiNsCheckAcpiCompliance (Info->FullPathname, Info->Node,
        Info->Predefined);

    /*
     * For all names: Check that the incoming argument count for
     * this method/object matches the actual ASL/AML definition.
     */
    AcpiNsCheckArgumentCount (Info->FullPathname, Info->Node,
        Info->ParamCount, Info->Predefined);

    /* For predefined names: Typecheck all incoming arguments */

    AcpiNsCheckArgumentTypes (Info);

    /*
     * Three major evaluation cases:
     *
     * 1) Object types that cannot be evaluated by definition
     * 2) The object is a control method -- execute it
     * 3) The object is not a method -- just return it's current value
     */
    switch (AcpiNsGetType (Info->Node))
    {
    case ACPI_TYPE_DEVICE:
    case ACPI_TYPE_EVENT:
    case ACPI_TYPE_MUTEX:
    case ACPI_TYPE_REGION:
    case ACPI_TYPE_THERMAL:
    case ACPI_TYPE_LOCAL_SCOPE:
        /*
         * 1) Disallow evaluation of certain object types. For these,
         *    object evaluation is undefined and not supported.
         */
        ACPI_ERROR ((AE_INFO,
            "%s: Evaluation of object type [%s] is not supported",
            Info->FullPathname,
            AcpiUtGetTypeName (Info->Node->Type)));

        Status = AE_TYPE;
        goto Cleanup;

    case ACPI_TYPE_METHOD:
        /*
         * 2) Object is a control method - execute it
         */

        /* Verify that there is a method object associated with this node */

        if (!Info->ObjDesc)
        {
            ACPI_ERROR ((AE_INFO, "%s: Method has no attached sub-object",
                Info->FullPathname));
            Status = AE_NULL_OBJECT;
            goto Cleanup;
        }

        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
            "**** Execute method [%s] at AML address %p length %X\n",
            Info->FullPathname,
            Info->ObjDesc->Method.AmlStart + 1,
            Info->ObjDesc->Method.AmlLength - 1));

        /*
         * Any namespace deletion must acquire both the namespace and
         * interpreter locks to ensure that no thread is using the portion of
         * the namespace that is being deleted.
         *
         * Execute the method via the interpreter. The interpreter is locked
         * here before calling into the AML parser
         */
        AcpiExEnterInterpreter ();
        Status = AcpiPsExecuteMethod (Info);
        AcpiExExitInterpreter ();
        break;

    default:
        /*
         * 3) All other non-method objects -- get the current object value
         */

        /*
         * Some objects require additional resolution steps (e.g., the Node
         * may be a field that must be read, etc.) -- we can't just grab
         * the object out of the node.
         *
         * Use ResolveNodeToValue() to get the associated value.
         *
         * NOTE: we can get away with passing in NULL for a walk state because
         * the Node is guaranteed to not be a reference to either a method
         * local or a method argument (because this interface is never called
         * from a running method.)
         *
         * Even though we do not directly invoke the interpreter for object
         * resolution, we must lock it because we could access an OpRegion.
         * The OpRegion access code assumes that the interpreter is locked.
         */
        AcpiExEnterInterpreter ();

        /* TBD: ResolveNodeToValue has a strange interface, fix */

        Info->ReturnObject = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Info->Node);

        Status = AcpiExResolveNodeToValue (ACPI_CAST_INDIRECT_PTR (
            ACPI_NAMESPACE_NODE, &Info->ReturnObject), NULL);
        AcpiExExitInterpreter ();

        if (ACPI_FAILURE (Status))
        {
            goto Cleanup;
        }

        ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Returned object %p [%s]\n",
            Info->ReturnObject,
            AcpiUtGetObjectTypeName (Info->ReturnObject)));

        Status = AE_CTRL_RETURN_VALUE; /* Always has a "return value" */
        break;
    }

    /*
     * For predefined names, check the return value against the ACPI
     * specification. Some incorrect return value types are repaired.
     */
    (void) AcpiNsCheckReturnValue (Info->Node, Info, Info->ParamCount,
        Status, &Info->ReturnObject);

    /* Check if there is a return value that must be dealt with */

    if (Status == AE_CTRL_RETURN_VALUE)
    {
        /* If caller does not want the return value, delete it */

        if (Info->Flags & ACPI_IGNORE_RETURN_VALUE)
        {
            AcpiUtRemoveReference (Info->ReturnObject);
            Info->ReturnObject = NULL;
        }

        /* Map AE_CTRL_RETURN_VALUE to AE_OK, we are done with it */

        Status = AE_OK;
    }

    ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
        "*** Completed evaluation of object %s ***\n",
        Info->RelativePathname));

Cleanup:
    /*
     * Namespace was unlocked by the handling AcpiNs* function, so we
     * just free the pathname and return
     */
    ACPI_FREE (Info->FullPathname);
    Info->FullPathname = NULL;
    return_ACPI_STATUS (Status);
}

/*******************************************************************************
 *
 * FUNCTION:    AcpiNsExecModuleCodeList
 *
 * PARAMETERS:  None
 *
 * RETURN:      None. Exceptions during method execution are ignored, since
 *              we cannot abort a table load.
 *
 * DESCRIPTION: Execute all elements of the global module-level code list.
 *              Each element is executed as a single control method.
 *
 ******************************************************************************/

void
AcpiNsExecModuleCodeList (
    void)
{
    ACPI_OPERAND_OBJECT     *Prev;
    ACPI_OPERAND_OBJECT     *Next;
    ACPI_EVALUATE_INFO      *Info;
    UINT32                  MethodCount = 0;

    ACPI_FUNCTION_TRACE (NsExecModuleCodeList);

    /* Exit now if the list is empty */

    Next = AcpiGbl_ModuleCodeList;
    if (!Next)
    {
        return_VOID;
    }

    /* Allocate the evaluation information block */

    Info = ACPI_ALLOCATE (sizeof (ACPI_EVALUATE_INFO));
    if (!Info)
    {
        return_VOID;
    }

    /* Walk the list, executing each "method" */

    while (Next)
    {
        Prev = Next;
        Next = Next->Method.Mutex;

        /* Clear the link field and execute the method */

        Prev->Method.Mutex = NULL;
        AcpiNsExecModuleCode (Prev, Info);
        MethodCount++;

        /* Delete the (temporary) method object */

        AcpiUtRemoveReference (Prev);
    }

    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
        "Executed %u blocks of module-level executable AML code",
        MethodCount));

    ACPI_FREE (Info);
    AcpiGbl_ModuleCodeList = NULL;
    return_VOID;
}

/*******************************************************************************
 *
 * FUNCTION:    AcpiNsExecModuleCode
 *
 * PARAMETERS:  MethodObj           - Object container for the module-level code
 *              Info                - Info block for method evaluation
 *
 * RETURN:      None. Exceptions during method execution are ignored, since
 *              we cannot abort a table load.
 *
 * DESCRIPTION: Execute a control method containing a block of module-level
 *              executable AML code. The control method is temporarily
 *              installed to the root node, then evaluated.
 *
 ******************************************************************************/

static void
AcpiNsExecModuleCode (
    ACPI_OPERAND_OBJECT     *MethodObj,
    ACPI_EVALUATE_INFO      *Info)
{
    ACPI_OPERAND_OBJECT     *ParentObj;
    ACPI_NAMESPACE_NODE     *ParentNode;
    ACPI_OBJECT_TYPE        Type;
    ACPI_STATUS             Status;

    ACPI_FUNCTION_TRACE (NsExecModuleCode);

    /*
     * Get the parent node. We cheat by using the NextObject field
     * of the method object descriptor.
     */
    ParentNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
                    MethodObj->Method.NextObject);
    Type = AcpiNsGetType (ParentNode);

    /*
     * Get the region handler and save it in the method object. We may need
     * this if an operation region declaration causes a _REG method to be run.
     *
     * We can't do this in AcpiPsLinkModuleCode because
     * AcpiGbl_RootNode->Object is NULL at PASS1.
     */
    if ((Type == ACPI_TYPE_DEVICE) && ParentNode->Object)
    {
        MethodObj->Method.Dispatch.Handler =
            ParentNode->Object->Device.Handler;
    }

    /* Must clear NextObject (AcpiNsAttachObject needs the field) */

    MethodObj->Method.NextObject = NULL;

    /* Initialize the evaluation information block */

    ACPI_MEMSET (Info, 0, sizeof (ACPI_EVALUATE_INFO));
    Info->PrefixNode = ParentNode;

    /*
     * Get the currently attached parent object. Add a reference, because the
     * ref count will be decreased when the method object is installed to
     * the parent node.
     */
    ParentObj = AcpiNsGetAttachedObject (ParentNode);
    if (ParentObj)
    {
        AcpiUtAddReference (ParentObj);
    }

    /* Install the method (module-level code) in the parent node */

    Status = AcpiNsAttachObject (ParentNode, MethodObj,
                ACPI_TYPE_METHOD);
    if (ACPI_FAILURE (Status))
    {
        goto Exit;
    }

    /* Execute the parent node as a control method */

    Status = AcpiNsEvaluate (Info);

    ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "Executed module-level code at %p\n",
        MethodObj->Method.AmlStart));

    /* Delete a possible implicit return value (in slack mode) */

    if (Info->ReturnObject)
    {
        AcpiUtRemoveReference (Info->ReturnObject);
    }

    /* Detach the temporary method object */

    AcpiNsDetachObject (ParentNode);

    /* Restore the original parent object */

    if (ParentObj)
    {
        Status = AcpiNsAttachObject (ParentNode, ParentObj, Type);
    }
    else
    {
        ParentNode->Type = (UINT8) Type;
    }

Exit:
    if (ParentObj)
    {
        AcpiUtRemoveReference (ParentObj);
    }
    return_VOID;
}


text:
import sbt._
import sbt.Keys._
import sbt.Keys._

object IeslPluginLoader extends Build {

  // .settings(resolvers += Resolver.url("sbt-plugin-releases", new URL("http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/"))(Resolver.ivyStylePatterns))

  lazy val root = Project(id = "plugins", base = file("."))
    .settings(resolvers += "IESL Public Releases" at "http://dev-iesl.cs.umass.edu/nexus/content/groups/public")
    .settings(resolvers += "IESL Public Snapshots" at "http://dev-iesl.cs.umass.edu/nexus/content/groups/public-snapshots")
    .settings(addSbtPlugin("edu.umass.cs.iesl" %% "iesl-sbt-base" % "latest.release"))
    .settings(addSbtPlugin("com.typesafe.play" %% "sbt-plugin" % "2.3.4"))
    .settings(addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.6.3"))

    // .settings(addSbtPlugin("com.mojolly.scalate" % "xsbt-scalate-generator" % "0.4.2"))
    // .settings(addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.8.8"))
}

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <originChamber>House</originChamber>
    <laws />
    <actions>
      <actionByCounts>
        <houseOfRepresentatives>3</houseOfRepresentatives>
      </actionByCounts>
      <item>
        <text>Referred to the House Committee on Foreign Affairs.</text>
        <actionDate>2017-03-16</actionDate>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <type>IntroReferral</type>
        <actionCode>H11100</actionCode>
        <links />
        <committee>
          <name>Foreign Affairs Committee</name>
          <systemCode>hsfa00</systemCode>
        </committee>
      </item>
      <item>
        <text>Introduced in House</text>
        <actionDate>2017-03-16</actionDate>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <type>IntroReferral</type>
        <actionCode>Intro-H</actionCode>
        <links />
        <committee />
      </item>
      <item>
        <text>Introduced in House</text>
        <actionDate>2017-03-16</actionDate>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <type>IntroReferral</type>
        <actionCode>1000</actionCode>
        <links />
        <committee />
      </item>
      <actionTypeCounts>
        <introducedInTheHouse>1</introducedInTheHouse>
        <billReferrals>1</billReferrals>
        <introducedInHouse>1</introducedInHouse>
      </actionTypeCounts>
    </actions>
    <relatedBills />
    <policyArea>
      <name>International Affairs</name>
    </policyArea>
    <subjects>
      <billSubjects>
        <policyArea>
          <name>International Affairs</name>
        </policyArea>
        <legislativeSubjects>
          <item>
            <name>Alliances</name>
          </item>
          <item>
            <name>Defense spending</name>
          </item>
          <item>
            <name>Europe</name>
          </item>
          <item>
            <name>Military operations and strategy</name>
          </item>
          <item>
            <name>Terrorism</name>
          </item>
        </legislativeSubjects>
      </billSubjects>
    </subjects>
    <summaries>
      <billSummaries>
        <item>
          <actionDesc>Introduced in House</actionDesc>
          <lastSummaryUpdateDate>2017-03-18T12:59:43Z</lastSummaryUpdateDate>
          <versionCode>00</versionCode>
          <updateDate>2017-03-16T04:00:00Z</updateDate>
          <text><![CDATA[
Expresses the sense of the House of Representatives that: (1) the United States reaffirms its commitment to the North Atlantic Treaty Organization (NATO) as the foundation of transatlantic security and defense, (2) NATO serves as a critical coalition in preserving transatlantic peace and stability, and (3) NATO's continuing development of new capabilities and technologies to combat terrorism and a changing international security environment are crucial to enhancing national security and strengthening the ability of the United States to combat security threats.

 Encourages each NATO member country to meet or exceed the commitment to spend 2% of its gross domestic product on defense.
]]></text>
          <actionDate>2017-03-16</actionDate>
          <name>Introduced in House</name>
        </item>
      </billSummaries>
    </summaries>
    <createDate>2017-03-17T04:49:39Z</createDate>
    <congress>115</congress>
    <calendarNumbers />
    <cboCostEstimates />
    <title>Reaffirming the commitment of the United States to the North Atlantic Treaty Organization (NATO).</title>
    <titles>
      <item>
        <chamberName />
        <titleType>Official Title as Introduced</titleType>
        <parentTitleType />
        <chamberCode />
        <title>Reaffirming the commitment of the United States to the North Atlantic Treaty Organization (NATO).</title>
      </item>
      <item>
        <chamberName />
        <titleType>Display Title</titleType>
        <parentTitleType />
        <chamberCode />
        <title>Reaffirming the commitment of the United States to the North Atlantic Treaty Organization (NATO).</title>
      </item>
    </titles>
    <billNumber>202</billNumber>
    <billType>HRES</billType>
    <committeeReports />
    <latestAction>
      <links />
      <actionDate>2017-03-16</actionDate>
      <text>Referred to the House Committee on Foreign Affairs.</text>
    </latestAction>
    <updateDate>2017-05-26T19:00:09Z</updateDate>
    <cosponsors>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>CO</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Mike</firstName>
        <fullName>Rep. Coffman, Mike [R-CO-6]</fullName>
        <bioguideId>C001077</bioguideId>
        <identifiers>
          <lisID>1912</lisID>
          <bioguideId>C001077</bioguideId>
          <gpoId>7864</gpoId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>6</district>
        <lastName>Coffman</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>CA</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>SUSAN</firstName>
        <fullName>Rep. Davis, Susan A. [D-CA-53]</fullName>
        <bioguideId>D000598</bioguideId>
        <identifiers>
          <bioguideId>D000598</bioguideId>
          <lisID>1641</lisID>
          <gpoId>7858</gpoId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>A.</middleName>
        <district>53</district>
        <lastName>DAVIS</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>MO</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Ann</firstName>
        <fullName>Rep. Wagner, Ann [R-MO-2]</fullName>
        <bioguideId>W000812</bioguideId>
        <identifiers>
          <lisID>2137</lisID>
          <bioguideId>W000812</bioguideId>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>2</district>
        <lastName>Wagner</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>OK</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Tom</firstName>
        <fullName>Rep. Cole, Tom [R-OK-4]</fullName>
        <bioguideId>C001053</bioguideId>
        <identifiers>
          <lisID>1742</lisID>
          <bioguideId>C001053</bioguideId>
          <gpoId>8112</gpoId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>4</district>
        <lastName>Cole</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>MA</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Seth</firstName>
        <fullName>Rep. Moulton, Seth [D-MA-6]</fullName>
        <bioguideId>M001196</bioguideId>
        <identifiers>
          <lisID>2246</lisID>
          <bioguideId>M001196</bioguideId>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>6</district>
        <lastName>Moulton</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>MO</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Vicky</firstName>
        <fullName>Rep. Hartzler, Vicky [R-MO-4]</fullName>
        <bioguideId>H001053</bioguideId>
        <identifiers>
          <bioguideId>H001053</bioguideId>
          <gpoId>8012</gpoId>
          <lisID>2032</lisID>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>4</district>
        <lastName>Hartzler</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>MD</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>C. A.</firstName>
        <fullName>Rep. Ruppersberger, C. A. Dutch [D-MD-2]</fullName>
        <bioguideId>R000576</bioguideId>
        <identifiers>
          <bioguideId>R000576</bioguideId>
          <gpoId>7977</gpoId>
          <lisID>1728</lisID>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>Dutch</middleName>
        <district>2</district>
        <lastName>Ruppersberger</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>FL</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Ted</firstName>
        <fullName>Rep. Yoho, Ted S. [R-FL-3]</fullName>
        <bioguideId>Y000065</bioguideId>
        <identifiers>
          <bioguideId>Y000065</bioguideId>
          <gpoId />
          <lisID>2115</lisID>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>S.</middleName>
        <district>3</district>
        <lastName>Yoho</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>PA</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Matt</firstName>
        <fullName>Rep. Cartwright, Matt [D-PA-17]</fullName>
        <bioguideId>C001090</bioguideId>
        <identifiers>
          <bioguideId>C001090</bioguideId>
          <gpoId />
          <lisID>2159</lisID>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>17</district>
        <lastName>Cartwright</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>CA</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Doug</firstName>
        <fullName>Rep. LaMalfa, Doug [R-CA-1]</fullName>
        <bioguideId>L000578</bioguideId>
        <identifiers>
          <lisID>2100</lisID>
          <gpoId />
          <bioguideId>L000578</bioguideId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>1</district>
        <lastName>LaMalfa</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>IN</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Andre</firstName>
        <fullName>Rep. Carson, Andre [D-IN-7]</fullName>
        <bioguideId>C001072</bioguideId>
        <identifiers>
          <lisID>1889</lisID>
          <bioguideId>C001072</bioguideId>
          <gpoId>7946</gpoId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>7</district>
        <lastName>Carson</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>NJ</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Leonard</firstName>
        <fullName>Rep. Lance, Leonard [R-NJ-7]</fullName>
        <bioguideId>L000567</bioguideId>
        <identifiers>
          <lisID>1936</lisID>
          <gpoId>8049</gpoId>
          <bioguideId>L000567</bioguideId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>7</district>
        <lastName>Lance</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>OH</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>MARCY</firstName>
        <fullName>Rep. Kaptur, Marcy [D-OH-9]</fullName>
        <bioguideId>K000009</bioguideId>
        <identifiers>
          <bioguideId>K000009</bioguideId>
          <lisID>616</lisID>
          <gpoId>8099</gpoId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>9</district>
        <lastName>KAPTUR</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>MI</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>John</firstName>
        <fullName>Rep. Moolenaar, John R. [R-MI-4]</fullName>
        <bioguideId>M001194</bioguideId>
        <identifiers>
          <lisID>2248</lisID>
          <bioguideId>M001194</bioguideId>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>R.</middleName>
        <district>4</district>
        <lastName>Moolenaar</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>CA</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Norma</firstName>
        <fullName>Rep. Torres, Norma J. [D-CA-35]</fullName>
        <bioguideId>T000474</bioguideId>
        <identifiers>
          <lisID>2231</lisID>
          <bioguideId>T000474</bioguideId>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>J.</middleName>
        <district>35</district>
        <lastName>Torres</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>MD</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Andy</firstName>
        <fullName>Rep. Harris, Andy [R-MD-1]</fullName>
        <bioguideId>H001052</bioguideId>
        <identifiers>
          <bioguideId>H001052</bioguideId>
          <lisID>2026</lisID>
          <gpoId>7976</gpoId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName />
        <district>1</district>
        <lastName>Harris</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>CA</state>
        <sponsorshipDate>2017-03-16</sponsorshipDate>
        <firstName>Scott</firstName>
        <fullName>Rep. Peters, Scott H. [D-CA-52]</fullName>
        <bioguideId>P000608</bioguideId>
        <identifiers>
          <lisID>2113</lisID>
          <gpoId />
          <bioguideId>P000608</bioguideId>
        </identifiers>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <middleName>H.</middleName>
        <district>52</district>
        <lastName>Peters</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>KY</state>
        <sponsorshipDate>2017-03-24</sponsorshipDate>
        <firstName>Andy</firstName>
        <fullName>Rep. Barr, Andy [R-KY-6]</fullName>
        <bioguideId>B001282</bioguideId>
        <identifiers>
          <lisID>2131</lisID>
          <bioguideId>B001282</bioguideId>
          <gpoId />
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <district>6</district>
        <lastName>Barr</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>CO</state>
        <sponsorshipDate>2017-03-24</sponsorshipDate>
        <firstName>Ed</firstName>
        <fullName>Rep. Perlmutter, Ed [D-CO-7]</fullName>
        <bioguideId>P000593</bioguideId>
        <identifiers>
          <lisID>1835</lisID>
          <bioguideId>P000593</bioguideId>
          <gpoId>7865</gpoId>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <district>7</district>
        <lastName>Perlmutter</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>TX</state>
        <sponsorshipDate>2017-03-30</sponsorshipDate>
        <firstName>Ted</firstName>
        <fullName>Rep. Poe, Ted [R-TX-2]</fullName>
        <bioguideId>P000592</bioguideId>
        <identifiers>
          <bioguideId>P000592</bioguideId>
          <lisID>1802</lisID>
          <gpoId>8158</gpoId>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <district>2</district>
        <lastName>Poe</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>TX</state>
        <sponsorshipDate>2017-03-30</sponsorshipDate>
        <firstName>SHEILA</firstName>
        <fullName>Rep. Jackson Lee, Sheila [D-TX-18]</fullName>
        <bioguideId>J000032</bioguideId>
        <identifiers>
          <bioguideId>J000032</bioguideId>
          <lisID>588</lisID>
          <gpoId>8174</gpoId>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <district>18</district>
        <lastName>JACKSON LEE</lastName>
      </item>
      <item>
        <party>R</party>
        <sponsorshipWithdrawnDate />
        <state>NY</state>
        <sponsorshipDate>2017-05-15</sponsorshipDate>
        <firstName>Daniel</firstName>
        <fullName>Rep. Donovan, Daniel M., Jr. [R-NY-11]</fullName>
        <bioguideId>D000625</bioguideId>
        <identifiers>
          <bioguideId>D000625</bioguideId>
          <gpoId />
          <lisID>2293</lisID>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName>M.</middleName>
        <district>11</district>
        <lastName>Donovan</lastName>
      </item>
      <item>
        <party>D</party>
        <sponsorshipWithdrawnDate />
        <state>CA</state>
        <sponsorshipDate>2017-05-15</sponsorshipDate>
        <firstName>Eric</firstName>
        <fullName>Rep. Swalwell, Eric [D-CA-15]</fullName>
        <bioguideId>S001193</bioguideId>
        <identifiers>
          <bioguideId>S001193</bioguideId>
          <gpoId />
          <lisID>2104</lisID>
        </identifiers>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <middleName />
        <district>15</district>
        <lastName>Swalwell</lastName>
      </item>
    </cosponsors>
    <recordedVotes />
    <introducedDate>2017-03-16</introducedDate>
    <sponsors>
      <item>
        <byRequestType />
        <fullName>Rep. Delaney, John K. [D-MD-6]</fullName>
        <identifiers>
          <lisID>2133</lisID>
          <gpoId />
          <bioguideId>D000620</bioguideId>
        </identifiers>
        <district>6</district>
        <firstName>John</firstName>
        <bioguideId>D000620</bioguideId>
        <middleName>K.</middleName>
        <party>D</party>
        <lastName>Delaney</lastName>
        <state>MD</state>
      </item>
    </sponsors>
    <version>1.0.0</version>
    <constitutionalAuthorityStatementText />
    <committees>
      <billCommittees>
        <item>
          <subcommittees />
          <chamber>House</chamber>
          <name>Foreign Affairs Committee</name>
          <systemCode>hsfa00</systemCode>
          <activities>
            <item>
              <name>Referred to</name>
              <date>2017-03-16T14:02:40Z</date>
            </item>
          </activities>
          <type>Standing</type>
        </item>
      </billCommittees>
    </committees>
    <amendments />
    <notes />
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
package wshttpserver;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Denotes that the specified method is safe to be called by multiple threads at the same time.
 * If specified on an interface / abstract method, it denotes that any implementation must be thread safe.
 * @author Joris
 */
@Documented
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.SOURCE)
public @interface ThreadSafe
{

}


text: update ACT_GE_PROPERTY set VALUE_ = '6.5.1.6' where NAME_ = 'eventsubscription.schema.version';


text:
"""Require talks for presentations.

Revision ID: 141c85333cb
Revises: 37c84eaa437
Create Date: 2014-08-02 15:30:42.380999

"""

# revision identifiers, used by Alembic.
revision = '141c85333cb'
down_revision = '37c84eaa437'

from alembic import op
import sqlalchemy as sa

def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('presentations', 'talk_id',
               existing_type=sa.INTEGER(),
               nullable=False)
    ### end Alembic commands ###

def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('presentations', 'talk_id',
               existing_type=sa.INTEGER(),
               nullable=True)
    ### end Alembic commands ###


text:
namespace wasm {

namespace decode {

class Page;
class PageCursor;

// Holds the end of a block within a queue. The outermost block is
// always defined as enclosing the entire queue. Note: EobBitAddress
// is the extra bits in the next byte, efter EobAddress, when eob doesn't
// align on a byte boundary (i.e. only applies to bit streams).
class BlockEob : public std::enable_shared_from_this<BlockEob> {
  BlockEob(const BlockEob&) = delete;
  BlockEob& operator=(const BlockEob&) = delete;

 public:
  explicit BlockEob(AddressType Address = kMaxEofAddress);
  BlockEob(AddressType ByteAddr,
           const std::shared_ptr<BlockEob> EnclosingEobPtr);
  ~BlockEob();
  AddressType& getEobAddress() { return EobAddress; }
  void setEobAddress(const AddressType& Address) { EobAddress = Address; }
  bool isGood() const { return isGoodAddress(EobAddress); }
  bool isDefined() const { return isDefinedAddress(EobAddress); }
  std::shared_ptr<BlockEob> getEnclosingEobPtr() const {
    return EnclosingEobPtr;
  }
  void fail();
  // For debugging.
  FILE* describe(FILE* File) const;

 private:
  AddressType EobAddress;
  std::shared_ptr<BlockEob> EnclosingEobPtr;
  void init() { assert(isGood()); }
};

}  // end of namespace decode

}  // end of namespace wasm

#endif  // DECOMPRESSOR_SRC_STREAM_BLOCKEOB_H_


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>oss-parent</artifactId>
    <groupId>org.sonatype.oss</groupId>
    <version>7.0.0.redhat-4</version>
  </parent>

  <groupId>jaxen</groupId>
  <artifactId>jaxen</artifactId>
  <packaging>bundle</packaging>
  <name>jaxen</name>
  <version>1.1.6</version>
  <description>Jaxen is a universal Java XPath engine.</description>
  <url>http://jaxen.codehaus.org/</url>
  <licenses>
    <license>
      <url>http://jaxen.codehaus.org/license.html</url>
    </license>
  </licenses>
  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.codehaus.org/BrowseProject.jspa?id=10022</url>
  </issueManagement>
  <ciManagement>
    <notifiers>
      <notifier>
        <configuration>
          <address>dev@jaxen.codehaus.org</address>
        </configuration>
      </notifier>
    </notifiers>
  </ciManagement>
  <inceptionYear>2001</inceptionYear>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <mailingLists>
    <mailingList>
      <name>Jaxen Users List</name>
      <subscribe>user-subscribe@jaxen.codehaus.org</subscribe>
      <unsubscribe>user-unsubscribe@jaxen.codehaus.org</unsubscribe>
      <archive>http://archive.jaxen.codehaus.org/user/</archive>
    </mailingList>
    <mailingList>
      <name>Jaxen Developers List</name>
      <subscribe>dev-subscribe@jaxen.codehaus.org</subscribe>
      <unsubscribe>dev-unsubscribe@jaxen.codehaus.org</unsubscribe>
      <archive>http://archive.jaxen.codehaus.org/dev/</archive>
    </mailingList>
    <mailingList>
      <name>Jaxen Commits List</name>
      <subscribe>scm-subscribe@jaxen.codehaus.org</subscribe>
      <unsubscribe>scm-unsubscribe@jaxen.codehaus.org</unsubscribe>
      <archive>http://archive.jaxen.codehaus.org/scm/</archive>
    </mailingList>
  </mailingLists>

  <developers>
    <developer>
      <id>bob</id>
      <name>Bob McWhirter</name>
      <email>bob@eng.werken.com</email>
      <organization>The Werken Company</organization>
    </developer>
    <developer>
      <id>jstrachan</id>
      <name>James Strachan</name>
      <email>james_strachan@yahoo.co.uk</email>
      <organization>Spiritsoft</organization>
    </developer>
    <developer>
      <id>dmegginson</id>
      <name>David Megginson</name>
      <email>contact@megginson.com</email>
      <organization>Megginson Technologies</organization>
    </developer>
    <developer>
      <id>eboldwidt</id>
      <name>Erwin Bolwidt</name>
      <email>erwin@klomp.org</email>
    </developer>
    <developer>
      <id>mbelonga</id>
      <name>Mark A. Belonga</name>
      <email>mbelonga@users.sourceforge.net</email>
    </developer>
    <developer>
      <id>cnentwich</id>
      <name>Christian Nentwich</name>
      <email>xcut@users.sourceforge.net</email>
    </developer>
    <developer>
      <id>purpletech</id>
      <name>Alexander Day Chaffee</name>
      <email>purpletech@users.sourceforge.net</email>
      <organization>Purple Technologies</organization>
    </developer>
    <developer>
      <id>jdvorak</id>
      <name>Jan Dvorak</name>
      <email>jdvorak@users.sourceforge.net</email>
    </developer>
    <developer>
      <id>szegedia</id>
      <name>Attila Szegedi</name>
      <email>szegedia@users.sourceforge.net</email>
    </developer>
    <developer>
      <id>proyal</id>
      <name>Peter Royal</name>
      <email>peter.royal@pobox.com</email>
      <url>http://fotap.org/~osi</url>
    </developer>
    <developer>
      <id>ssanders</id>
      <name>Scott Sanders</name>
      <email>scott@dotnot.org</email>
      <url>http://dotnot.org/blog</url>
      <organization>dotnot</organization>
    </developer>
    <developer>
      <id>bewins</id>
      <name>Brian Ewins</name>
      <email>brian.ewins@gmail.com</email>
    </developer>
    <developer>
      <id>elharo</id>
      <name>Elliotte Rusty Harold</name>
      <email>elharo@ibiblio.org</email>
      <url>http://www.elharo.com/</url>
      <organization>Cafe au Lait</organization>
    </developer>
  </developers>

  <contributors>
    <contributor>
      <name>Ryan Gustafson</name>
      <email>rgustav@users.sourceforge.net</email>
    </contributor>
    <contributor>
      <name>David Peterson</name>
      <email>david@randombits.org</email>
    </contributor>
    <contributor>
      <name>Mark Wilson</name>
      <email>mark.wilson@wilsoncom.de</email>
    </contributor>
    <contributor>
      <name>Jacob Kjome</name>
      <email>hoju@visi.com</email>
    </contributor>
    <contributor>
      <name>Michael Brennan</name>
      <email>mpbrennan@earthlink.net</email>
    </contributor>
    <contributor>
      <name>Jason Hunter</name>
      <email>jhunter@xquery.com</email>
    </contributor>
    <contributor>
      <name>Brett Mclaughlin</name>
      <email>brett.mclaughlin@lutris.com</email>
    </contributor>
    <contributor>
      <name>Bradley S. Huffman</name>
      <email>hip@cs.okstate.edu</email>
    </contributor>
    <contributor>
      <name>K. Ari Krupnikov</name>
      <email>ari@lib.aero</email>
    </contributor>
    <contributor>
      <name>Paul R. Brown</name>
      <email>prb@fivesight.com</email>
    </contributor>
    <contributor>
      <name>Guoliang Cao</name>
      <email>cao@ispsoft.com</email>
    </contributor>
    <contributor>
      <name>Jérôme Nègre</name>
      <email>jerome.negre@e-xmlmedia.fr</email>
    </contributor>
    <contributor>
      <name>Eddie McGreal</name>
      <email>emcgreal@BlackPearl.com</email>
    </contributor>
    <contributor>
      <name>Steen Lehmann</name>
      <email>slehmann@users.sourceforge.net</email>
    </contributor>
    <contributor>
      <name>Ben McCann</name>
      <email>benjamin.j.mccann@gmail.com</email>
    </contributor>
    <contributor>
      <name>Don Corley</name>
      <email>don@donandann.com</email>
    </contributor>
  </contributors>

  <scm>
    <connection>scm:svn:https://svn.codehaus.org/jaxen/trunk/jaxen/</connection>
    <url>http://fisheye.codehaus.org/browse/jaxen/</url>
  </scm>

  <organization>
    <name>Codehaus</name>
    <url>http://codehaus.org</url>
  </organization>

  <build>
    <sourceDirectory>src/java/main</sourceDirectory>
    <testSourceDirectory>src/java/test</testSourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <debug>true</debug>
          <optimize>true</optimize>
          <showDeprecation>true</showDeprecation>
          <source>1.3</source>
          <target>1.2</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-ManifestVersion>2</Bundle-ManifestVersion>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Export-Package>org.jaxen.*;version=${project.version}</Export-Package>
            <Include-Resource>
              org/w3c/dom/UserDataHandler.class=target/classes/org/w3c/dom/UserDataHandler.class,
              META-INF/LICENSE.txt=LICENSE.txt
            </Include-Resource>
            <Import-Package>
              org.w3c.dom;resolution:=optional,
              *;resolution:=optional
            </Import-Package>
            <Private-Package>!org.w3c.dom</Private-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptorRefs>
            <descriptorRef>project</descriptorRef>
            <descriptorRef>src</descriptorRef>
            <descriptorRef>bin</descriptorRef>
          </descriptorRefs>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-repository-plugin</artifactId>
        <version>2.3.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8.1</version>
        <configuration>
          <excludePackageNames>org.jaxen.saxpath.base,org.jaxen.saxpath.helpers</excludePackageNames>
          <links>
            <link>http://java.sun.com/j2se/1.4.2/docs/api/</link>
          </links>
          <stylesheetfile>${basedir}/src/site/resources/css/javadoc-style.css</stylesheetfile>
          <docencoding>UTF-8</docencoding>
          <stylesheetfile>./xdocs/stylesheets/javadoc-style.css</stylesheetfile>
          <tags>
            <tag>
              <head>To Do:</head>
              <name>todo</name>
              <placement>Xa</placement>
            </tag>
          </tags>
          <docencoding>UTF-8</docencoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.1</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.4.0</version>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>1.0</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.3.02</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.6.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>xom</groupId>
      <artifactId>xom</artifactId>
      <version>1.0</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-changelog-plugin</artifactId>
        <version>2.2</version>
        <configuration>
          <type>date</type>
          <dates>
            <date>2007-05-06</date>
          </dates>
          <outputEncoding>UTF-8</outputEncoding>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.9.1</version>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.6.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>2.4</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.4.3</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.1</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.4.0</version>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jdepend-maven-plugin</artifactId>
        <version>2.0-beta-2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependencies</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <distributionManagement>
    <site>
      <id>default</id>
      <name>Default Site</name>
      <url>scp://jaxen.codehaus.org/home/projects/jaxen/public_html</url>
    </site>
  </distributionManagement>
</project>


text:
// +skip_license_check

/*
This file contains portions of code directly taken from the 'xenolf/lego' project.
A copy of the license for this code can be found in the file named LICENSE in
this directory.
*/

package clouddns

import (
	"os"
	"testing"
	"time"

	"golang.org/x/net/context"
	"golang.org/x/oauth2/google"
	"google.golang.org/api/dns/v1"

	"github.com/jetstack/cert-manager/pkg/issuer/acme/dns/util"
	"github.com/stretchr/testify/assert"
)

var (
	gcloudLiveTest bool
	gcloudProject  string
	gcloudDomain   string
)

func init() {
	gcloudProject = os.Getenv("GCE_PROJECT")
	gcloudDomain = os.Getenv("GCE_DOMAIN")
	_, err := google.DefaultClient(context.Background(), dns.NdevClouddnsReadwriteScope)
	if err == nil && len(gcloudProject) > 0 && len(gcloudDomain) > 0 {
		gcloudLiveTest = true
	}
}

func restoreGCloudEnv() {
	os.Setenv("GCE_PROJECT", gcloudProject)
}

func TestNewDNSProviderValid(t *testing.T) {
	if !gcloudLiveTest {
		t.Skip("skipping live test (requires credentials)")
	}
	os.Setenv("GCE_PROJECT", "")
	_, err := NewDNSProviderCredentials("my-project", util.RecursiveNameservers, "")
	assert.NoError(t, err)
	restoreGCloudEnv()
}

func TestNewDNSProviderValidEnv(t *testing.T) {
	if !gcloudLiveTest {
		t.Skip("skipping live test (requires credentials)")
	}
	os.Setenv("GCE_PROJECT", "my-project")
	_, err := NewDNSProviderEnvironment(util.RecursiveNameservers, "")
	assert.NoError(t, err)
	restoreGCloudEnv()
}

func TestNewDNSProviderMissingCredErr(t *testing.T) {
	os.Setenv("GCE_PROJECT", "")
	_, err := NewDNSProviderEnvironment(util.RecursiveNameservers, "")
	assert.EqualError(t, err, "Google Cloud project name missing")
	restoreGCloudEnv()
}

func TestLiveGoogleCloudPresent(t *testing.T) {
	if !gcloudLiveTest {
		t.Skip("skipping live test")
	}

	provider, err := NewDNSProviderCredentials(gcloudProject, util.RecursiveNameservers, "")
	assert.NoError(t, err)

	err = provider.Present(gcloudDomain, "_acme-challenge."+gcloudDomain+".", "123d==")
	assert.NoError(t, err)
}

func TestLiveGoogleCloudPresentMultiple(t *testing.T) {
	if !gcloudLiveTest {
		t.Skip("skipping live test")
	}

	provider, err := NewDNSProviderCredentials(gcloudProject, util.RecursiveNameservers, "")
	assert.NoError(t, err)

	// Check that we're able to create multiple entries
	err = provider.Present(gcloudDomain, "_acme-challenge."+gcloudDomain+".", "123d==")
	assert.NoError(t, err)
	err = provider.Present(gcloudDomain, "_acme-challenge."+gcloudDomain+".", "1123d==")
	assert.NoError(t, err)
}

func TestLiveGoogleCloudCleanUp(t *testing.T) {
	if !gcloudLiveTest {
		t.Skip("skipping live test")
	}

	time.Sleep(time.Second * 1)

	provider, err := NewDNSProviderCredentials(gcloudProject, util.RecursiveNameservers, "")
	assert.NoError(t, err)

	err = provider.CleanUp(gcloudDomain, "_acme-challenge."+gcloudDomain+".", "123d==")
	assert.NoError(t, err)
}

func TestDNSProvider_getHostedZone(t *testing.T) {
	if !gcloudLiveTest {
		t.Skip("skipping live test")
	}

	testProvider, err := NewDNSProviderCredentials("my-project", util.RecursiveNameservers, "test-zone")
	assert.NoError(t, err)

	type args struct {
		domain string
	}
	tests := []struct {
		name     string
		args     args
		want     string
		wantErr  bool
		provider *DNSProvider
	}{
		{
			name:     "test given hosted zone name",
			provider: testProvider,
			want:     "test-zone",
			wantErr:  false,
			args:     args{domain: "example.com"},
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			c := tt.provider
			got, err := c.getHostedZone(tt.args.domain)
			if (err != nil) != tt.wantErr {
				t.Errorf("getHostedZone() error = %v, wantErr %v", err, tt.wantErr)
				return
			}
			if got != tt.want {
				t.Errorf("getHostedZone() got = %v, want %v", got, tt.want)
			}
		})
	}
}


text:
It's API for a Hacker News clone. The app will collect links submitted by users and will allow them to vote on those links.

### Technology
The goal was to build REST API with Sinatra. API stucture supposed to be similiar to gems. We couldn't use [*sinatra-activerecord*](https://github.com/janko-m/sinatra-activerecord). API supports `json` and `xml` responses - depends on content type in `Accept` header.

API supports versioning - available versions: `v1` and `v2`.

In `v2` API uses caching:
- `/recent` - `Cache-Control` header with expiration date
- `/stories` - checks `If-Modified-Since` header, sends back `Last-Modified` header.

In `v2` `/recent` endpoint supports `GitHub` style pagination [*Traversing with Pagination*](https://developer.github.com/guides/traversing-with-pagination/) with `kaminari` gem.

In `v2` API translates error messages in Polish ang English languages - it supports `Accept-Language` header. Uses English when no header is given. Returns `406` status code for unsupported languages.

### Available endpoints
#### `v1` - with `Accept` header `application/vnd.news-app.v1+json` or `application/vnd.news-app+json`
available without logging in:
- `GET /stories` - returns all stories
- `GET /stories/:id` - returns story
- `POST /users` with json `{"username": "xyz", "password": "pass", "password_confirmation": "pass"}` - creates user account

available with logging in - with Authentication header:
- `POST /stories` with json `{"title": "xyz", "url": "www.xyz.com"}` - creates story
- `PUT /stories/:id` with json `{"title": "xyz2", "url": "www.xyz2.com"}` - updates story
- `POST /stories/:id/upvote` - upvote story
- `POST /stories/:id/downvote` - downvote story
- `DELETE /stories/:id/unvote` - unvotes story

#### `v2` - with `Accept` header `application/vnd.news-app.v2+json`
Changes in `v2`:
- `GET /stories` - returns 10 most popular stories
- `GET /recent` - returns 10 most recent stories
- `DELETE /stories/:id` - deletes story (only for authenticated users)

### Heroku
[*https://workshop-7-api.herokuapp.com/stories*](https://workshop-7-api.herokuapp.com/stories) (works only in HTTP-clients like `Postman` or `DHC` because Accept header with vendor is required)


text:
//
//===========================================================================================================
// THIS IS GENERATED CODE! - do not edit
//
// To edit, change JSON configs under 'com/harlie/radiotheater/radiomysterytheater/generate_data_contentprovider/'
// Then run the bash script './generate-data-contentprovider.sh' in that same directory
// to create new Java code under 'com/harlie/radiotheater/radiomysterytheater/data/' + note old 'data' is deleted!
//
// THIS IS GENERATED CODE! - do not edit
//===========================================================================================================
//
package com.harlie.radiotheater.radiomysterytheater.data.actorsepisodes;

import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;

import com.harlie.radiotheater.radiomysterytheater.data.base.AbstractSelection;

/**
 * Selection for the {@code actors_episodes} table.
 */
public class ActorsEpisodesSelection extends AbstractSelection<ActorsEpisodesSelection> {
    @Override
    protected Uri baseUri() {
        return ActorsEpisodesColumns.CONTENT_URI;
    }

    /**
     * Query the given content resolver using this selection.
     *
     * @param contentResolver The content resolver to query.
     * @param projection A list of which columns to return. Passing null will return all columns, which is inefficient.
     * @return A {@code ActorsEpisodesCursor} object, which is positioned before the first entry, or null.
     */
    public ActorsEpisodesCursor query(ContentResolver contentResolver, String[] projection) {
        Cursor cursor = contentResolver.query(uri(), projection, sel(), args(), order());
        if (cursor == null) return null;
        return new ActorsEpisodesCursor(cursor);
    }

    /**
     * Equivalent of calling {@code query(contentResolver, null)}.
     */
    public ActorsEpisodesCursor query(ContentResolver contentResolver) {
        return query(contentResolver, null);
    }

    /**
     * Query the given content resolver using this selection.
     *
     * @param context The context to use for the query.
     * @param projection A list of which columns to return. Passing null will return all columns, which is inefficient.
     * @return A {@code ActorsEpisodesCursor} object, which is positioned before the first entry, or null.
     */
    public ActorsEpisodesCursor query(Context context, String[] projection) {
        Cursor cursor = context.getContentResolver().query(uri(), projection, sel(), args(), order());
        if (cursor == null) return null;
        return new ActorsEpisodesCursor(cursor);
    }

    /**
     * Equivalent of calling {@code query(context, null)}.
     */
    public ActorsEpisodesCursor query(Context context) {
        return query(context, null);
    }

    public ActorsEpisodesSelection id(long... value) {
        addEquals("actors_episodes." + ActorsEpisodesColumns._ID, toObjectArray(value));
        return this;
    }

    public ActorsEpisodesSelection idNot(long... value) {
        addNotEquals("actors_episodes." + ActorsEpisodesColumns._ID, toObjectArray(value));
        return this;
    }

    public ActorsEpisodesSelection orderById(boolean desc) {
        orderBy("actors_episodes." + ActorsEpisodesColumns._ID, desc);
        return this;
    }

    public ActorsEpisodesSelection orderById() {
        return orderById(false);
    }

    public ActorsEpisodesSelection fieldActorId(long... value) {
        addEquals(ActorsEpisodesColumns.FIELD_ACTOR_ID, toObjectArray(value));
        return this;
    }

    public ActorsEpisodesSelection fieldActorIdNot(long... value) {
        addNotEquals(ActorsEpisodesColumns.FIELD_ACTOR_ID, toObjectArray(value));
        return this;
    }

    public ActorsEpisodesSelection fieldActorIdGt(long value) {
        addGreaterThan(ActorsEpisodesColumns.FIELD_ACTOR_ID, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorIdGtEq(long value) {
        addGreaterThanOrEquals(ActorsEpisodesColumns.FIELD_ACTOR_ID, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorIdLt(long value) {
        addLessThan(ActorsEpisodesColumns.FIELD_ACTOR_ID, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorIdLtEq(long value) {
        addLessThanOrEquals(ActorsEpisodesColumns.FIELD_ACTOR_ID, value);
        return this;
    }

    public ActorsEpisodesSelection orderByFieldActorId(boolean desc) {
        orderBy(ActorsEpisodesColumns.FIELD_ACTOR_ID, desc);
        return this;
    }

    public ActorsEpisodesSelection orderByFieldActorId() {
        orderBy(ActorsEpisodesColumns.FIELD_ACTOR_ID, false);
        return this;
    }

    public ActorsEpisodesSelection fieldActorName(String... value) {
        addEquals(ActorsEpisodesColumns.FIELD_ACTOR_NAME, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorNameNot(String... value) {
        addNotEquals(ActorsEpisodesColumns.FIELD_ACTOR_NAME, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorNameLike(String... value) {
        addLike(ActorsEpisodesColumns.FIELD_ACTOR_NAME, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorNameContains(String... value) {
        addContains(ActorsEpisodesColumns.FIELD_ACTOR_NAME, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorNameStartsWith(String... value) {
        addStartsWith(ActorsEpisodesColumns.FIELD_ACTOR_NAME, value);
        return this;
    }

    public ActorsEpisodesSelection fieldActorNameEndsWith(String... value) {
        addEndsWith(ActorsEpisodesColumns.FIELD_ACTOR_NAME, value);
        return this;
    }

    public ActorsEpisodesSelection orderByFieldActorName(boolean desc) {
        orderBy(ActorsEpisodesColumns.FIELD_ACTOR_NAME, desc);
        return this;
    }

    public ActorsEpisodesSelection orderByFieldActorName() {
        orderBy(ActorsEpisodesColumns.FIELD_ACTOR_NAME, false);
        return this;
    }

    public ActorsEpisodesSelection fieldEpisodeNumber(long... value) {
        addEquals(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, toObjectArray(value));
        return this;
    }

    public ActorsEpisodesSelection fieldEpisodeNumberNot(long... value) {
        addNotEquals(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, toObjectArray(value));
        return this;
    }

    public ActorsEpisodesSelection fieldEpisodeNumberGt(long value) {
        addGreaterThan(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, value);
        return this;
    }

    public ActorsEpisodesSelection fieldEpisodeNumberGtEq(long value) {
        addGreaterThanOrEquals(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, value);
        return this;
    }

    public ActorsEpisodesSelection fieldEpisodeNumberLt(long value) {
        addLessThan(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, value);
        return this;
    }

    public ActorsEpisodesSelection fieldEpisodeNumberLtEq(long value) {
        addLessThanOrEquals(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, value);
        return this;
    }

    public ActorsEpisodesSelection orderByFieldEpisodeNumber(boolean desc) {
        orderBy(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, desc);
        return this;
    }

    public ActorsEpisodesSelection orderByFieldEpisodeNumber() {
        orderBy(ActorsEpisodesColumns.FIELD_EPISODE_NUMBER, false);
        return this;
    }
}


text:
package com.github.jengelman.gradle.plugins.shadow.tasks;

import com.github.jengelman.gradle.plugins.shadow.ShadowStats;
import com.github.jengelman.gradle.plugins.shadow.internal.DependencyFilter;
import com.github.jengelman.gradle.plugins.shadow.relocation.Relocator;
import com.github.jengelman.gradle.plugins.shadow.relocation.SimpleRelocator;
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer;
import com.github.jengelman.gradle.plugins.shadow.transformers.Transformer;
import org.gradle.api.Action;
import org.gradle.api.file.CopySpec;

import java.lang.reflect.InvocationTargetException;

interface ShadowSpec extends CopySpec {
    ShadowSpec minimize();

    ShadowSpec minimize(Action<DependencyFilter> configureClosure);

    ShadowSpec dependencies(Action<DependencyFilter> configure);

    ShadowSpec transform(Class<? extends Transformer> clazz) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    <T extends Transformer> ShadowSpec transform(Class<T> clazz, Action<T> configure) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    ShadowSpec transform(Transformer transformer);

    ShadowSpec mergeServiceFiles();

    ShadowSpec mergeServiceFiles(String rootPath);

    ShadowSpec mergeServiceFiles(Action<ServiceFileTransformer> configureClosure);

    ShadowSpec mergeGroovyExtensionModules();

    ShadowSpec append(String resourcePath);

    ShadowSpec relocate(String pattern, String destination);

    ShadowSpec relocate(String pattern, String destination, Action<SimpleRelocator> configure);

    ShadowSpec relocate(Relocator relocator);

    ShadowSpec relocate(Class<? extends Relocator> clazz) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    <R extends Relocator> ShadowSpec relocate(Class<R> clazz, Action<R> configure) throws InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException;

    ShadowStats getStats();
}


text:
Monitor::Monitor(
    uint8_t pin,
    float multiplier
) {
    this->pin = pin;
    this->multiplier = multiplier;
}

void Monitor::update() {
    analogRead(this->pin); // Fake read to settle ADC
    this->value = (float) analogRead(this->pin) * this->multiplier;
}


text:
<!DOCTYPE html>

<html>

	<head>
		<title>Intuit Bootcamp</title>
		<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
		<script data-main="js/main" src="libs/requirejs/require.js"></script>
	</head>

	<body>
		<div id = "hey"> </div>
	</body>
</html>


text:
using System.Collections.Generic;
using AutoQueryable.Core.Enums;
using Serilog;

namespace AutoQueryable.Core.Models
{
    public class AutoQueryableProfile : IAutoQueryableProfile
    {
        public AutoQueryableProfile(AutoQueryableSettings settings)
        {
            SelectableProperties = settings.SelectableProperties;
            UnselectableProperties = settings.UnselectableProperties;
            SortableProperties = settings.SortableProperties;
            UnSortableProperties = settings.UnSortableProperties;
            GroupableProperties = settings.GroupableProperties;
            UnGroupableProperties = settings.UnGroupableProperties;
            AllowedClauses = settings.AllowedClauses;
            DisAllowedClauses = settings.DisAllowedClauses;
            AllowedConditions = settings.AllowedConditions;
            DisAllowedConditions = settings.DisAllowedConditions;
            AllowedWrapperPartType = settings.AllowedWrapperPartType;
            DisAllowedWrapperPartType = settings.DisAllowedWrapperPartType;
            MaxToTake = settings.MaxToTake;
            MaxToSkip = settings.MaxToSkip;
            MaxDepth = settings.MaxDepth;
            DefaultToTake = settings.DefaultToTake;
            DefaultToSelect = settings.DefaultToSelect;
            DefaultOrderBy = settings.DefaultOrderBy;
            UseBaseType = settings.UseBaseType;
            ToListBeforeSelect = settings.ToListBeforeSelect;
        }

        public ILogger Logger { get; }

        public string[] SelectableProperties { get; set; }

        public string[] UnselectableProperties { get; set; }

        public string[] SortableProperties { get; set; }

        public string[] UnSortableProperties { get; set; }

        public string[] GroupableProperties { get; set; }

        public string[] UnGroupableProperties { get; set; }

        public ClauseType? AllowedClauses { get; set; }

        public ClauseType? DisAllowedClauses { get; set; }

        public ConditionType? AllowedConditions { get; set; }

        public ConditionType? DisAllowedConditions { get; set; }

        public WrapperPartType? AllowedWrapperPartType { get; set; }

        public WrapperPartType? DisAllowedWrapperPartType { get; set; }

        public int? MaxToTake { get; set; }

        public int? MaxToSkip { get; set; }

        public int? MaxDepth { get; set; }

        public int DefaultToTake { get; set; }

        public string DefaultToSelect { get; set; }

        public Dictionary<string, bool> DefaultOrderBy { get; set; }

        public bool UseBaseType { get; set; }
        public bool ToListBeforeSelect { get; set; }

        public bool IsClauseAllowed(ClauseType clauseType)
        {
            var isClauseAllowed = true;
            var isAllowed = AllowedClauses?.HasFlag(clauseType);
            var isDisallowed = DisAllowedClauses?.HasFlag(clauseType);

            if (isAllowed.HasValue && !isAllowed.Value)
            {
                isClauseAllowed = false;
            }

            if (isDisallowed.HasValue && isDisallowed.Value)
            {
                isClauseAllowed = false;
            }
            return isClauseAllowed;
        }

        public bool IsConditionAllowed(ConditionType conditionType)
        {
            var isConditionAllowed = true;
            var isAllowed = AllowedConditions?.HasFlag(conditionType);
            var isDisallowed = DisAllowedConditions?.HasFlag(conditionType);

            if (isAllowed.HasValue && !isAllowed.Value)
            {
                isConditionAllowed = false;
            }

            if (isDisallowed.HasValue && isDisallowed.Value)
            {
                isConditionAllowed = false;
            }
            return isConditionAllowed;
        }

        public bool IsWrapperPartAllowed(WrapperPartType wrapperPartType)
        {
            var isWrapperPartAllowed = true;
            var isAllowed = AllowedWrapperPartType?.HasFlag(wrapperPartType);
            var isDisallowed = DisAllowedWrapperPartType?.HasFlag(wrapperPartType);

            if (isAllowed.HasValue && !isAllowed.Value)
            {
                isWrapperPartAllowed = false;
            }

            if (isDisallowed.HasValue && isDisallowed.Value)
            {
                isWrapperPartAllowed = false;
            }
            return isWrapperPartAllowed;
        }
    }
}


text:
<?php

namespace ONGR\MonitoringBundle\Document;

use ONGR\ElasticsearchBundle\Annotation as ES;
use ONGR\ElasticsearchBundle\Document\AbstractDocument;

/**
 * Event document.
 *
 * @ES\Document(type="event")
 */
class Event extends AbstractDocument
{
    const EVENT_STARTED = 'started';
    const EVENT_TERMINATED = 'completed';
    const EVENT_EXCEPTION = 'exception';

    /**
     * @var string
     *
     * @ES\Property(type="string", name="command")
     */
    public $command;

    /**
     * @var string
     *
     * @ES\Property(type="string", name="argument")
     */
    public $argument;

    /**
     * @var string
     *
     * @ES\Property(type="string", name="status")
     */
    public $status;

    /**
     * @var string
     *
     * @ES\Property(type="string", name="message")
     */
    public $message;

    /**
     * @var \DateTime
     *
     * @ES\Property(name="started", type="date")
     */
    public $started;

    /**
     * @var \DateTime
     *
     * @ES\Property(name="ended", type="date")
     */
    public $ended;

    /**
     * @return string
     */
    public function getCommand()
    {
        return $this->command;
    }

    /**
     * @param string $command
     */
    public function setCommand($command)
    {
        $this->command = $command;
    }

    /**
     * @return string
     */
    public function getArgument()
    {
        return $this->argument;
    }

    /**
     * @param string $argument
     */
    public function setArgument($argument)
    {
        $this->argument = $argument;
    }

    /**
     * @return \DateTime
     */
    public function getStarted()
    {
        return $this->started;
    }

    /**
     * @param \DateTime $started
     */
    public function setStarted($started)
    {
        $this->started = $started;
    }

    /**
     * @return \DateTime
     */
    public function getEnded()
    {
        return $this->ended;
    }

    /**
     * @param \DateTime $ended
     */
    public function setEnded($ended)
    {
        $this->ended = $ended;
    }

    /**
     * @return string
     */
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * @param string $status
     */
    public function setStatus($status)
    {
        $this->status = $status;
    }

    /**
     * @return string
     */
    public function getMessage()
    {
        return $this->message;
    }

    /**
     * @param string $message
     */
    public function setMessage($message)
    {
        $this->message = $message;
    }
}


text:
/**
 * The open query tab (Repository viewer)
 */
var OpenQuery = Backbone.View.extend({
    className: 'tab_container',

    events: {
        'click .query': 'view_query',
        'dblclick .query': 'select_and_open_query',
        'click .add_folder' : 'add_folder',
        'click li.folder': 'toggle_folder',
        'click .workspace_toolbar a.button' : 'prevent_default',
        'click .workspace_toolbar a.run': 'open_query',
        'click .workspace_toolbar a.edit': 'edit_query',
        'click .workspace_toolbar [href=#edit_folder]': 'edit_folder',
        'click .workspace_toolbar [href=#delete_folder]': 'delete_repoObject',
        'click .workspace_toolbar [href=#delete_query]': 'delete_repoObject',
        'click .workspace_toolbar [href=#edit_permissions]': 'edit_permissions',
        'click .queries' : 'click_canvas',
        'keyup .search_file' : 'search_file',
        'click .cancel_search' : 'cancel_search'
    },

    template: function() {
        return _.template($("#template-open-dialog").html())();
    },

    template_repository_objects: function( repository ) {
        var self = this;
        $(this.el).find('.sidebar ul').html(
            _.template( $( '#template-repository-objects' ).html( ) )( {
                repoObjects: repository
            } )
        );
    },

    caption: function() {
        return "Repository";
    },

    /*jshint -W069 */
    render: function() {
        // Load template
        $(this.el).html(this.template());

        // Adjust tab when selected
        this.tab.bind('tab:select', this.fetch_queries);
        this.tab.bind('tab:select', this.adjust);
        $(window).resize(this.adjust);

        var self = this;
        var menuitems = {
                    "open": {name: "Open", i18n: true },
                    "edit": {name: "Edit", i18n: true },
//                    "rename": {name: "Rename", i18n: true },
                    "delete": {name: "Delete", i18n: true },
                    "move": {name: "Move", i18n: true},
                    "sep1": "---------",
                    "new": {name: "New Folder", i18n: true},
                    "opencontents": {name: "Open Folder Contents", i18n: true}
        };
        $.each(menuitems, function(key, item){
            recursive_menu_translate(item, Saiku.i18n.po_file);
        });

        $.contextMenu('destroy', 'li.query, div.folder_row');
        $.contextMenu({
                selector: 'li.query, div.folder_row',
                events: {
                    show: function(opt) {
                        $( self.el ).find( '.selected' ).removeClass( 'selected' );
                        $(this).addClass('selected');
                        var path = $(this).find('a').attr('href').replace('#', '');
                        var item = self.queries[path];

                        if (typeof item.acl != "undefined" && _.indexOf(item.acl, "WRITE") <  0) {
                            opt.commands['delete'].disabled = true;
                            opt.items['delete'].disabled = true;
                            opt.commands['edit'].disabled = true;
                            opt.items['edit'].disabled = true;
                            opt.commands['move'].disabled = true;
                            opt.items['move'].disabled = true;

                        } else {
                            opt.commands['delete'].disabled = false;
                            opt.items['delete'].disabled = false;
                            opt.commands['edit'].disabled = false;
                            opt.items['edit'].disabled = false;
                            opt.commands['move'].disabled = false;
                            opt.items['move'].disabled = false;
                        }

                        if ($(this).hasClass('folder_row')) {
                            opt.commands.open.disabled = true;
                            opt.items.open.disabled = true;
                        } else {
                            opt.commands.open.disabled = false;
                            opt.items.open.disabled = false;
                        }
                    }

                },
                callback: function(key, options) {
                    var path = $(this).find('a').attr('href').replace('#', '');
                    var item = self.queries[path];
                    self.selected_query = new SavedQuery({ file: path, name: item.name, type: item.type });
                    if (key == "open" && $(this).hasClass('query')) {
                        self.open_query();
                    } if (key == "edit" && $(this).hasClass('query')) {
                        self.edit_query();
                    } else if (key == "new") {
                        self.add_folder();
                    } else if (key == "delete") {
                        self.delete_repoObject();
                    } else if(key == "move"){
                        self.move_repoObject();
                    } else if(key =="opencontents"){
                        self.open_contents();
                    }

                },
                items: menuitems
            });

		// Fire off new openQuery event
		Saiku.session.trigger('openQuery:new', { openQuery: this });

        return this;
    },

    initialize: function(args) {
        // Maintain `this`
        _.bindAll(this, "adjust", "fetch_queries",
                "clear_query","select_and_open_query", "cancel_search", "add_folder");

        // Initialize repository
        this.repository = new Repository({}, { dialog: this });
    },

    fetch_queries: function() {
        this.repository.fetch();
    },

    populate: function( repository ) {
        var self = this;
        self.template_repository_objects( repository );
        self.queries = {};
        function getQueries( entries ) {
            _.forEach( entries, function( entry ) {
                self.queries[ entry.path ] = entry;
                if( entry.type === 'FOLDER' ) {
                    getQueries( entry.repoObjects );
                }
            } );
        }
        getQueries( repository );
    },

    search_file: function(event) {
        var filter = $(this.el).find('.search_file').val().toLowerCase();
        var isEmpty = (typeof filter == "undefined" || filter === "" || filter === null);
        if (isEmpty || event.which == 27 || event.which == 9) {
            this.cancel_search();
        } else {
            if ($(this.el).find('.search_file').val()) {
                $(this.el).find('.cancel_search').show();
            } else {
                $(this.el).find('.cancel_search').hide();
            }
            $(this.el).find('li.query').removeClass('hide');
            $(this.el).find('li.query a').each(function (index) {
                if($(this).text().toLowerCase().indexOf(filter) == -1) {
                    $(this).parent('li.query').addClass('hide');
                }
            });
            $(this.el).find('li.folder').addClass('hide');
            $(this.el).find('li.query').not('.hide').parents('li.folder').removeClass('hide');
            //$(this.el).find( 'li.folder .folder_content').not(':has(.query:visible)').parent().addClass('hide');

            //not(':contains("' + filter + '")').parent().hide();
            $(this.el).find( 'li.folder .folder_row' ).find('.sprite').removeClass( 'collapsed' );
            $(this.el).find( 'li.folder .folder_content' ).removeClass('hide');
        }
        return false;
    },
    cancel_search: function(event) {
        $(this.el).find('input.search_file').val('');
        $(this.el).find('.cancel_search').hide();
        $(this.el).find('li.query, li.folder').removeClass('hide');
        $(this.el).find( '.folder_row' ).find('.sprite').addClass( 'collapsed' );
        $(this.el).find( 'li.folder .folder_content' ).addClass('hide');
        $(this.el).find('.search_file').val('').focus();
        $(this.el).find('.cancel_search').hide();

    },
    view_query: function(event) {
        event.preventDefault( );
        var $currentTarget = $( event.currentTarget );
        var $target = $currentTarget.find('a');
        this.unselect_current_selected( );
        $currentTarget.addClass( 'selected' );
        var path = $target.attr('href').replace('#', '');
        var name = $target.text();
        var query = this.queries[path];
        $( this.el ).find( '.workspace_toolbar' ).removeClass( 'hide' );
        $( this.el ).find( '.for_queries' ).addClass( 'hide' );
        $( this.el ).find( '.for_folder' ).addClass( 'hide' );
        $( this.el ).find( '.add_folder' ).parent().addClass( 'hide' );

        if (typeof query.acl != "undefined" && _.indexOf(query.acl, "READ") > -1) {
            $( this.el ).find( '.for_queries .run' ).parent().removeClass( 'hide' );
        }
        if (typeof query.acl != "undefined" && _.indexOf(query.acl, "WRITE") > -1) {
            $( this.el ).find( '.for_queries .delete' ).parent().removeClass( 'hide' );
            $( this.el ).find( '.for_queries .edit' ).parent().removeClass( 'hide' );
        }
        if (typeof query.acl != "undefined" && _.indexOf(query.acl, "GRANT") > -1) {
            $( this.el ).find( '.for_queries .edit_permissions' ).parent().removeClass( 'hide' );
        }
        try {
            var query_path = path.split("/");
            if (query_path.length > 1) {
                    var folder_path = query_path.splice(0,query_path.length - 1).join("/");
                    var folder = this.queries[folder_path];
                    if (typeof folder.acl != "undefined" && _.indexOf(folder.acl, "WRITE") > -1) {
                        $( this.el ).find( '.add_folder' ).parent().removeClass( 'hide' );
                    }
            } else if (query_path.length == 1) {
                $( this.el ).find( '.add_folder' ).parent().removeClass( 'hide' );
            }
        } catch(e) {
            //console.log(e);
        }

        var $results = $(this.el).find('.workspace_results')
            .html('
' + query.name + '
');
        var $properties = $('
').appendTo($results);

        // Iterate through properties and show a key=>value set in the information pane
        for (var property in query) {
            if (query.hasOwnProperty(property) && property != "name") {
                $properties.append($('
').html("" +
                        property + " : " + query[property]));
            }
        }

        this.selected_query = new SavedQuery({ file: path, name: name, type: query.type });

        return false;
    },

    view_folder: function( event ) {
        var $target = $( event.currentTarget ).children('div').children('a');
        var path = $target.attr('href').replace('#', '');
        var name = $target.text();
        var folder = this.queries[path];
        $( this.el ).find( '.workspace_toolbar' ).removeClass( 'hide' );
        $( this.el ).find( '.add_folder' ).parent().addClass( 'hide' );
        $( this.el ).find( '.for_queries' ).addClass( 'hide' );
        $( this.el ).find( '.for_folder' ).addClass( 'hide' );

        if (typeof folder.acl != "undefined" && _.indexOf(folder.acl, "WRITE") > -1) {
            $( this.el ).find( '.for_folder .delete' ).parent().removeClass( 'hide' );
            $( this.el ).find( '.add_folder' ).parent().removeClass( 'hide' );
        }
        if (typeof folder.acl != "undefined" && _.indexOf(folder.acl, "GRANT") > -1) {
            $( this.el ).find( '.for_folder .edit_permissions' ).parent().removeClass( 'hide' );
        }

        $( this.el ).find( '.workspace_results' )
            .html( '
' + name + '
' );

        this.selected_query = new SavedQuery({ file: path , name: name, type: folder.type });

    },

    prevent_default: function(event) {
        event.preventDefault();
        return false;
    },

    add_folder: function( event ) {
        $selected = $(this.el).find('.selected');
        var path ="";
        if (typeof $selected !== "undefined" && $selected) {
            if ($selected.hasClass('folder_row')) {
                path = $selected.children('a').attr('href');
                path = path.length > 1 ? path.substring(1,path.length) : path;
                path+= "/";

            } else if ($selected.hasClass('query') && !$selected.parent().hasClass('RepositoryObjects')) {
                var query = $selected.find('a');
                path = query.attr('href');
                var queryname = query.text();
                path = path.substring(1, path.length - queryname.length );
            }
        }

        (new AddFolderModal({
            path: path,
            success: this.clear_query
        })).render().open();

        return false;
    },

    click_canvas: function(event) {
        var $target = $( event.currentTarget );
        if ($target.hasClass('sidebar')) {
            $(this.el).find('.selected').removeClass('selected');
        }
        $( this.el ).find( '.add_folder' ).parent().removeClass( 'hide' );
        return false;
    },

    toggle_folder: function( event ) {
        var $target = $( event.currentTarget );
        this.unselect_current_selected( );
        $target.children('.folder_row').addClass( 'selected' );
        var $queries = $target.children( '.folder_content' );
        var isClosed = $target.children( '.folder_row' ).find('.sprite').hasClass( 'collapsed' );
        if( isClosed ) {
            $target.children( '.folder_row' ).find('.sprite').removeClass( 'collapsed' );
            $queries.removeClass( 'hide' );
        } else {
            $target.children( '.folder_row' ).find('.sprite').addClass( 'collapsed' );
            $queries.addClass( 'hide' );
        }

        this.view_folder( event );

        return false;
    },

    select_and_open_query: function(event) {
        var $target = $(event.currentTarget).find('a');
        var path = $target.attr('href').replace('#', '');
        var name = $target.text();
        this.selected_query = new SavedQuery({ file: path, name: path });
        this.open_query();
    },

    open_query: function(viewstate) {
        Saiku.ui.block("Opening query...");
        var item = this.queries[this.selected_query.get('file')];
        var params = _.extend({
                        file: this.selected_query.get('file'),
                        formatter: Settings.CELLSET_FORMATTER
                    }, Settings.PARAMS);

        var query = new Query(params,{ name: this.selected_query.get('name') });
        var state = null;
        if(viewstate && !viewstate.hasOwnProperty('currentTarget')) {
            state = viewstate;
        }

        if (item.fileType === 'saiku') {
            var tab = Saiku.tabs.add(new Workspace({ query: query, item: item, viewState: state }));
        }
        else {
            Saiku.session.trigger('openQuery:open_query', { query: query, item: item, viewState: state });
        }

        return false;
    },
    open_contents: function(viewstate) {
        var files = [];
        var itemF = this.queries[this.selected_query.get('file')];
        _.forEach( itemF.repoObjects, function( entry){
           if(entry.type === "FILE"){
               files.push(entry);
           }
        });

        var obj = {files: files, viewstate: viewstate};

        (new WarningModal({
            title: "Open Multiple Queries", message: "You are about to open "+files.length+" queries",
            okay: this.run_open_contents, okayobj: obj
        })).render().open();

        return false;
    },
    run_open_contents: function(fileargs){
        _.forEach( fileargs.files, function( entry ) {
            Saiku.ui.block("Opening query...");

            var item = entry;
            var params = _.extend({
                file: item.path,
                formatter: Settings.CELLSET_FORMATTER
            }, Settings.PARAMS);

            var query = new Query(params,{ name: item.name });
            var state = null;
            if(fileargs.viewstate && !fileargs.viewstate.hasOwnProperty('currentTarget')) {
                state = viewstate;
            }
            var tab = Saiku.tabs.add(new Workspace({ query: query, item: item, viewState: state }));

        });
    },
    edit_query: function() {
        this.open_query('edit');
    },

    delete_repoObject: function(event) {
        (new DeleteRepositoryObject({
            query: this.selected_query,
            success: this.clear_query
        })).render().open();

        return false;
    },

    move_repoObject: function(event) {
        (new MoveRepositoryObject({
            query: this.selected_query,
            success: this.clear_query
        })).render().open();

        return false;
    },

    edit_folder: function( event ) {
        alert( 'todo: edit folder properties/permissions' );
        return false;
    },

    edit_permissions: function(event) {
        (new PermissionsModal({
            workspace: this.workspace,
            title: "Permissions",
            file: this.selected_query.get('file')
        })).open();
    },

    clear_query: function() {
        $(this.el).find('.workspace_toolbar').addClass('hide');
        $(this.el).find('.workspace_results').html('');
        this.fetch_queries();
    },

    adjust: function() {
        // Adjust the height of the separator
        $separator = $(this.el).find('.sidebar_separator');
        $separator.height($("body").height() - 87);
        $(this.el).find('.sidebar').css( { 'width' : 300,
                                            'height' : $("body").height() - 87 });
        $(this.el).find('.workspace_inner').css({ 'margin-left' : 305});
        $(this.el).find('.workspace').css({ 'margin-left' : -305});
        // Adjust the dimensions of the results window
        $(this.el).find('.workspace_results').css({
            width: $(document).width() - $(this.el).find('.sidebar').width() - 30,
            height: $(document).height() - $("#header").height() -
                $(this.el).find('.workspace_toolbar').height() -
                $(this.el).find('.workspace_fields').height() - 40
        });
        //$(this.el).find('.canvas_wrapper').show();
    },

    toggle_sidebar: function() {
        // Toggle sidebar
        $(this.el).find('.sidebar').toggleClass('hide');
        var new_margin = $(this.el).find('.sidebar').hasClass('hide') ?
                5 : 265;
        $(this.el).find('.workspace_inner').css({ 'margin-left': new_margin });
    },

    unselect_current_selected: function( ) {
        $( this.el ).find( '.selected' ).removeClass( 'selected' );
    }

});