text:
package org.apache.flink.api.java.utils;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.api.java.Utils;
import org.apache.flink.util.Preconditions;

import org.apache.commons.lang3.math.NumberUtils;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;

/**
 * This class provides simple utility methods for reading and parsing program arguments from
 * different sources. Multiple values parameter in args could be supported. For example, --multi
 * multiValue1 --multi multiValue2. If {@link MultipleParameterTool} object is used for
 * GlobalJobParameters, the last one of multiple values will be used. Navigate to {@link #toMap()}
 * for more information.
 */
@PublicEvolving
public class MultipleParameterTool extends AbstractParameterTool {
    private static final long serialVersionUID = 1L;

    // ------------------ Constructors ------------------------

    /**
     * Returns {@link MultipleParameterTool} for the given arguments. The arguments are keys
     * followed by values. Keys have to start with '-' or '--'
     *
     *
Example arguments: --key1 value1 --key2 value2 -key3 value3 --multi
     * multiValue1 --multi multiValue2
     *
     * @param args Input array arguments
     * @return A {@link MultipleParameterTool}
     */
    public static MultipleParameterTool fromArgs(String[] args) {
        final Map<String, Collection<String>> map = new HashMap<>(args.length / 2);

        int i = 0;
        while (i < args.length) {
            final String key = Utils.getKeyFromArgs(args, i);

            i += 1; // try to find the value

            map.putIfAbsent(key, new ArrayList<>());
            if (i >= args.length) {
                map.get(key).add(NO_VALUE_KEY);
            } else if (NumberUtils.isNumber(args[i])) {
                map.get(key).add(args[i]);
                i += 1;
            } else if (args[i].startsWith("--") || args[i].startsWith("-")) {
                // the argument cannot be a negative number because we checked earlier
                // -> the next argument is a parameter name
                map.get(key).add(NO_VALUE_KEY);
            } else {
                map.get(key).add(args[i]);
                i += 1;
            }
        }

        return fromMultiMap(map);
    }

    /**
     * Returns {@link MultipleParameterTool} for the given multi map.
     *
     * @param multiMap A map of arguments. Key is String and value is a Collection.
     * @return A {@link MultipleParameterTool}
     */
    public static MultipleParameterTool fromMultiMap(Map<String, Collection<String>> multiMap) {
        Preconditions.checkNotNull(multiMap, "Unable to initialize from empty map");
        return new MultipleParameterTool(multiMap);
    }

    // ------------------ ParameterUtil  ------------------------
    protected final Map<String, Collection<String>> data;

    private MultipleParameterTool(Map<String, Collection<String>> data) {
        this.data = Collections.unmodifiableMap(new HashMap<>(data));

        this.defaultData = new ConcurrentHashMap<>(data.size());

        this.unrequestedParameters =
                Collections.newSetFromMap(new ConcurrentHashMap<>(data.size()));

        unrequestedParameters.addAll(data.keySet());
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MultipleParameterTool that = (MultipleParameterTool) o;
        return Objects.equals(data, that.data)
                && Objects.equals(defaultData, that.defaultData)
                && Objects.equals(unrequestedParameters, that.unrequestedParameters);
    }

    @Override
    public int hashCode() {
        return Objects.hash(data, defaultData, unrequestedParameters);
    }

    // ------------------ Get data from the util ----------------

    /** Returns number of parameters in {@link ParameterTool}. */
    @Override
    public int getNumberOfParameters() {
        return data.size();
    }

    /**
     * Returns the String value for the given key. The value should only have one item. Use {@link
     * #getMultiParameter(String)} instead if want to get multiple values parameter. If the key does
     * not exist it will return null.
     */
    @Override
    public String get(String key) {
        addToDefaults(key, null);
        unrequestedParameters.remove(key);
        if (!data.containsKey(key)) {
            return null;
        }
        Preconditions.checkState(
                data.get(key).size() == 1, "Key %s should has only one value.", key);
        return (String) data.get(key).toArray()[0];
    }

    /** Check if value is set. */
    @Override
    public boolean has(String value) {
        addToDefaults(value, null);
        unrequestedParameters.remove(value);
        return data.containsKey(value);
    }

    /**
     * Returns the Collection of String values for the given key. If the key does not exist it will
     * return null.
     */
    public Collection<String> getMultiParameter(String key) {
        addToDefaults(key, null);
        unrequestedParameters.remove(key);
        return data.getOrDefault(key, null);
    }

    /**
     * Returns the Collection of String values for the given key. If the key does not exist it will
     * throw a {@link RuntimeException}.
     */
    public Collection<String> getMultiParameterRequired(String key) {
        addToDefaults(key, null);
        Collection<String> value = getMultiParameter(key);
        if (value == null) {
            throw new RuntimeException("No data for required key '" + key + "'");
        }
        return value;
    }

    // ------------------------- Export to different targets -------------------------

    /**
     * Return MultiMap of all the parameters processed by {@link MultipleParameterTool}.
     *
     * @return MultiMap of the {@link MultipleParameterTool}. Key is String and Value is a
     *     Collection of String.
     */
    public Map<String, Collection<String>> toMultiMap() {
        return data;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return new MultipleParameterTool(this.data);
    }

    // ------------------------- Interaction with other ParameterUtils -------------------------

    /**
     * Merges two {@link MultipleParameterTool}.
     *
     * @param other Other {@link MultipleParameterTool} object
     * @return The Merged {@link MultipleParameterTool}
     */
    public MultipleParameterTool mergeWith(MultipleParameterTool other) {
        final Map<String, Collection<String>> resultData =
                new HashMap<>(data.size() + other.data.size());
        resultData.putAll(data);
        other.data.forEach(
                (key, value) -> {
                    resultData.putIfAbsent(key, new ArrayList<>());
                    resultData.get(key).addAll(value);
                });

        final MultipleParameterTool ret = new MultipleParameterTool(resultData);

        final HashSet<String> requestedParametersLeft = new HashSet<>(data.keySet());
        requestedParametersLeft.removeAll(unrequestedParameters);

        final HashSet<String> requestedParametersRight = new HashSet<>(other.data.keySet());
        requestedParametersRight.removeAll(other.unrequestedParameters);

        ret.unrequestedParameters.removeAll(requestedParametersLeft);
        ret.unrequestedParameters.removeAll(requestedParametersRight);

        return ret;
    }

    // ------------------------- ExecutionConfig.UserConfig interface -------------------------

    @Override
    public Map<String, String> toMap() {
        return getFlatMapOfData(data);
    }

    /**
     * Get the flat map of the multiple map data. If the key have multiple values, only the last one
     * will be used. This is also the current behavior when multiple parameters is specified for
     * {@link ParameterTool}.
     *
     * @param data multiple map of data.
     * @return flat map of data.
     */
    private static Map<String, String> getFlatMapOfData(Map<String, Collection<String>> data) {
        return data.entrySet().stream()
                .collect(
                        Collectors.toMap(
                                Map.Entry::getKey,
                                e -> {
                                    if (e.getValue().size() > 0) {
                                        return (String)
                                                e.getValue().toArray()[e.getValue().size() - 1];
                                    } else {
                                        return NO_VALUE_KEY;
                                    }
                                }));
    }

    // ------------------------- Serialization ---------------------------------------------

    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        in.defaultReadObject();

        defaultData = new ConcurrentHashMap<>(data.size());
        unrequestedParameters = Collections.newSetFromMap(new ConcurrentHashMap<>(data.size()));
    }
}


text:
package org.keycloak.messages;

import org.keycloak.provider.Provider;
import org.keycloak.provider.ProviderFactory;
import org.keycloak.provider.Spi;

/**
 * @author Leonardo Zanivan
 */
public class MessagesSpi implements Spi {

    @Override
    public boolean isInternal() {
        return true;
    }

    @Override
    public String getName() {
        return "messages";
    }

    @Override
    public Class<? extends Provider> getProviderClass() {
        return MessagesProvider.class;
    }

    @Override
    public Class<? extends ProviderFactory> getProviderFactoryClass() {
        return MessagesProviderFactory.class;
    }

}

redpajama_set_name: RedPajamaGithub


text:
package org.wso2.identity.integration.test.rest.api.server.script.library.v1;

import io.restassured.RestAssured;
import io.restassured.config.EncoderConfig;
import io.restassured.response.Response;
import org.apache.commons.lang.StringUtils;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.wso2.identity.integration.test.rest.api.server.common.RESTAPIServerTestBase;

import java.io.IOException;

import static io.restassured.RestAssured.given;

/**
 * Base test class for Script library management REST APIs.
 */
public class ScriptLibraryTestBase extends RESTAPIServerTestBase {

    public static final String API_DEFINITION_NAME = "scriptLibrary.yaml";
    public static final String API_VERSION = "v1";
    public static final String API_PACKAGE_NAME = "org.wso2.carbon.identity.api.server.script.library.v1";
    public static final String SCRIPT_LIBRARY_API_BASE_PATH = "/script-libraries";
    public static final String PATH_SEPARATOR = "/";

    protected static String swaggerDefinition;

    static {
        try {
            swaggerDefinition = getAPISwaggerDefinition(API_PACKAGE_NAME, API_DEFINITION_NAME);
        } catch (IOException e) {
            Assert.fail(String.format("Unable to read the swagger definition %s from %s", API_DEFINITION_NAME,
                    API_PACKAGE_NAME), e);
        }
    }

    @AfterClass(alwaysRun = true)
    public void testConclude() throws Exception {

        super.conclude();
    }

    @BeforeMethod(alwaysRun = true)
    public void testInit() {

        RestAssured.basePath = basePath;
    }

    @AfterMethod(alwaysRun = true)
    public void testFinish() {

        RestAssured.basePath = StringUtils.EMPTY;
    }

    /**
     * Multipart POST request to add the script library.
     *
     * @param endpointUri Endpoint to add script library
     * @param content     Script library content.
     * @param name        Script library name.
     * @param description Script library description
     * @return response
     */
    protected Response getResponseOfMultipartPost(String endpointUri, String content, String name, String description) {

        EncoderConfig encoderconfig = new EncoderConfig();
        return given().auth().preemptive().basic(authenticatingUserName, authenticatingCredential)
                .config(RestAssured.config().encoderConfig(encoderconfig
                        .appendDefaultContentCharsetToContentTypeIfUndefined(false)))
                .multiPart("name", name)
                .multiPart("content", content)
                .multiPart("description", description)
                .log().ifValidationFails()
                .when()
                .log().ifValidationFails()
                .post(endpointUri);
    }

    /**
     * Multipart PUT request to update the script library..
     *
     * @param endpointUri Endpoint to add script library
     * @param content     Script library content.
     * @param description Script library description
     * @return response
     */
    protected Response getResponseOfMultipartPut(String endpointUri, String content, String description) {

        EncoderConfig encoderconfig = new EncoderConfig();
        return given().auth().preemptive().basic(authenticatingUserName, authenticatingCredential)
                .config(RestAssured.config().encoderConfig(encoderconfig
                        .appendDefaultContentCharsetToContentTypeIfUndefined(false)))
                .multiPart("content", content)
                .multiPart("description", description)
                .log().ifValidationFails()
                .when()
                .log().ifValidationFails()
                .put(endpointUri);
    }

}


text:
/*
Title: Can I access diversity information?

*/

Administrators and recruiter users only may access a candidate's diversity information. This data is only shown in the candidate area and never in the applicant viewer when you are processing an applicant against a job.
- On the home page, on the top right action bar click on candidates.
- Find the desired candidate in the candidates list by searching for their name, email or ID number and click on their name.

![Image](https://s3.amazonaws.com/tw-desk/i/122167/attachment-inline/98318.20150430145755284.98318.201504301457552844RT6f)
<br>
- Once your candidate comes back in the search results click on their name to view their candidate record. This should look similar to the one below. Click on Diversity Details tab. You should now be able to see this candidate's diversity details if these were collected.

    Please note: The collection of diversity information is not normally mandatory on application forms, so candidates can choose not to provide this or select options such as "Prefer not to say"

![Image](https://s3.amazonaws.com/tw-desk/i/122167/attachment-inline/98318.20150430145843246.98318.20150430145843246GruQz)


text:
<?php

namespace Doctrine\Tests\DBAL;

use Doctrine\DBAL\Connection;
use Doctrine\DBAL\SQLParserUtils;

require_once __DIR__ . '/../TestInit.php';

/**
 * @group DBAL-78
 * @group DDC-1372
 */
class SQLParserUtilsTest extends \Doctrine\Tests\DbalTestCase
{
    static public function dataGetPlaceholderPositions()
    {
        return array(
            // none
            array('SELECT * FROM Foo', true, array()),
            array('SELECT * FROM Foo', false, array()),

            // Positionals
            array('SELECT ?', true, array(7)),
            array('SELECT * FROM Foo WHERE bar IN (?, ?, ?)', true, array(32, 35, 38)),
            array('SELECT ? FROM ?', true, array(7, 14)),
            array('SELECT "?" FROM foo', true, array()),
            array("SELECT '?' FROM foo", true, array()),
            array('SELECT "?" FROM foo WHERE bar = ?', true, array(32)),
            array("SELECT '?' FROM foo WHERE bar = ?", true, array(32)),

            // named
            array('SELECT :foo FROM :bar', false, array(7 => 'foo', 17 => 'bar')),
            array('SELECT * FROM Foo WHERE bar IN (:name1, :name2)', false, array(32 => 'name1', 40 => 'name2')),
            array('SELECT ":foo" FROM Foo WHERE bar IN (:name1, :name2)', false, array(37 => 'name1', 45 => 'name2')),
            array("SELECT ':foo' FROM Foo WHERE bar IN (:name1, :name2)", false, array(37 => 'name1', 45 => 'name2')),
            array('SELECT :foo_id', false, array(7 => 'foo_id')), // Ticket DBAL-231
        );
    }

    /**
     * @dataProvider dataGetPlaceholderPositions
     * @param type $query
     * @param type $isPositional
     * @param type $expectedParamPos
     */
    public function testGetPlaceholderPositions($query, $isPositional, $expectedParamPos)
    {
        $actualParamPos = SQLParserUtils::getPlaceholderPositions($query, $isPositional);
        $this->assertEquals($expectedParamPos, $actualParamPos);
    }

    static public function dataExpandListParameters()
    {
        return array(
            // Positional: Very simple with one needle
            array(
                "SELECT * FROM Foo WHERE foo IN (?)",
                array(array(1, 2, 3)),
                array(Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?, ?, ?)',
                array(1, 2, 3),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            // Positional: One non-list before d one after list-needle
            array(
                "SELECT * FROM Foo WHERE foo = ? AND bar IN (?)",
                array("string", array(1, 2, 3)),
                array(\PDO::PARAM_STR, Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?)',
                array("string", 1, 2, 3),
                array(\PDO::PARAM_STR, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            // Positional: One non-list after list-needle
            array(
                "SELECT * FROM Foo WHERE bar IN (?) AND baz = ?",
                array(array(1, 2, 3), "foo"),
                array(Connection::PARAM_INT_ARRAY, \PDO::PARAM_STR),
                'SELECT * FROM Foo WHERE bar IN (?, ?, ?) AND baz = ?',
                array(1, 2, 3, "foo"),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR)
            ),
            // Positional: One non-list before and one after list-needle
            array(
                "SELECT * FROM Foo WHERE foo = ? AND bar IN (?) AND baz = ?",
                array(1, array(1, 2, 3), 4),
                array(\PDO::PARAM_INT, Connection::PARAM_INT_ARRAY, \PDO::PARAM_INT),
                'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?) AND baz = ?',
                array(1, 1, 2, 3, 4),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            // Positional: Two lists
            array(
                "SELECT * FROM Foo WHERE foo IN (?, ?)",
                array(array(1, 2, 3), array(4, 5)),
                array(Connection::PARAM_INT_ARRAY, Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?, ?, ?, ?, ?)',
                array(1, 2, 3, 4, 5),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            //  Positional : Empty "integer" array DDC-1978
            array(
                "SELECT * FROM Foo WHERE foo IN (?)",
                array('foo'=>array()),
                array('foo'=>Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?)',
                array(),
                array()
            ),
            //  Positional : Empty "str" array DDC-1978
            array(
                "SELECT * FROM Foo WHERE foo IN (?)",
                array('foo'=>array()),
                array('foo'=>Connection::PARAM_STR_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?)',
                array(),
                array()
            ),
            //  Named parameters : Very simple with param int
            array(
                "SELECT * FROM Foo WHERE foo = :foo",
                array('foo'=>1),
                array('foo'=>\PDO::PARAM_INT),
                'SELECT * FROM Foo WHERE foo = ?',
                array(1),
                array(\PDO::PARAM_INT)
            ),

             //  Named parameters : Very simple with param int and string
            array(
                "SELECT * FROM Foo WHERE foo = :foo AND bar = :bar",
                array('bar'=>'Some String','foo'=>1),
                array('foo'=>\PDO::PARAM_INT,'bar'=>\PDO::PARAM_STR),
                'SELECT * FROM Foo WHERE foo = ? AND bar = ?',
                array(1,'Some String'),
                array(\PDO::PARAM_INT, \PDO::PARAM_STR)
            ),

            //  Named parameters : Very simple with one needle
            array(
                "SELECT * FROM Foo WHERE foo IN (:foo)",
                array('foo'=>array(1, 2, 3)),
                array('foo'=>Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?, ?, ?)',
                array(1, 2, 3),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            // Named parameters: One non-list before d one after list-needle
            array(
                "SELECT * FROM Foo WHERE foo = :foo AND bar IN (:bar)",
                array('foo'=>"string", 'bar'=>array(1, 2, 3)),
                array('foo'=>\PDO::PARAM_STR, 'bar'=>Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?)',
                array("string", 1, 2, 3),
                array(\PDO::PARAM_STR, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            // Named parameters: One non-list after list-needle
            array(
                "SELECT * FROM Foo WHERE bar IN (:bar) AND baz = :baz",
                array('bar'=>array(1, 2, 3), 'baz'=>"foo"),
                array('bar'=>Connection::PARAM_INT_ARRAY, 'baz'=>\PDO::PARAM_STR),
                'SELECT * FROM Foo WHERE bar IN (?, ?, ?) AND baz = ?',
                array(1, 2, 3, "foo"),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_STR)
            ),
            // Named parameters: One non-list before and one after list-needle
            array(
                "SELECT * FROM Foo WHERE foo = :foo AND bar IN (:bar) AND baz = :baz",
                array('bar'=>array(1, 2, 3),'foo'=>1, 'baz'=>4),
                array('bar'=>Connection::PARAM_INT_ARRAY, 'foo'=>\PDO::PARAM_INT, 'baz'=>\PDO::PARAM_INT),
                'SELECT * FROM Foo WHERE foo = ? AND bar IN (?, ?, ?) AND baz = ?',
                array(1, 1, 2, 3, 4),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            // Named parameters: Two lists
            array(
                "SELECT * FROM Foo WHERE foo IN (:a, :b)",
                array('b'=>array(4, 5),'a'=>array(1, 2, 3)),
                array('a'=>Connection::PARAM_INT_ARRAY, 'b'=>Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?, ?, ?, ?, ?)',
                array(1, 2, 3, 4, 5),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
            //  Named parameters : With the same name arg type string
            array(
                "SELECT * FROM Foo WHERE foo <> :arg AND bar = :arg",
                array('arg'=>"Some String"),
                array('arg'=>\PDO::PARAM_STR),
                'SELECT * FROM Foo WHERE foo <> ? AND bar = ?',
                array("Some String","Some String"),
                array(\PDO::PARAM_STR,\PDO::PARAM_STR,)
            ),
             //  Named parameters : With the same name arg
            array(
                "SELECT * FROM Foo WHERE foo IN (:arg) AND NOT bar IN (:arg)",
                array('arg'=>array(1, 2, 3)),
                array('arg'=>Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?, ?, ?) AND NOT bar IN (?, ?, ?)',
                array(1, 2, 3, 1, 2, 3),
                array(\PDO::PARAM_INT,\PDO::PARAM_INT, \PDO::PARAM_INT,\PDO::PARAM_INT,\PDO::PARAM_INT, \PDO::PARAM_INT)
            ),

             //  Named parameters : Same name, other name in between DBAL-299
            array(
                "SELECT * FROM Foo WHERE (:foo = 2) AND (:bar = 3) AND (:foo = 2)",
                array('foo'=>2,'bar'=>3),
                array('foo'=>\PDO::PARAM_INT,'bar'=>\PDO::PARAM_INT),
                'SELECT * FROM Foo WHERE (? = 2) AND (? = 3) AND (? = 2)',
                array(2, 3, 2),
                array(\PDO::PARAM_INT, \PDO::PARAM_INT, \PDO::PARAM_INT)
            ),
             //  Named parameters : Empty "integer" array DDC-1978
            array(
                "SELECT * FROM Foo WHERE foo IN (:foo)",
                array('foo'=>array()),
                array('foo'=>Connection::PARAM_INT_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?)',
                array(),
                array()
            ),
             //  Named parameters : Two empty "str" array DDC-1978
            array(
                "SELECT * FROM Foo WHERE foo IN (:foo) OR bar IN (:bar)",
                array('foo'=>array(), 'bar'=>array()),
                array('foo'=>Connection::PARAM_STR_ARRAY, 'bar'=>Connection::PARAM_STR_ARRAY),
                'SELECT * FROM Foo WHERE foo IN (?) OR bar IN (?)',
                array(),
                array()
            ),
        );
    }

    /**
     * @dataProvider dataExpandListParameters
     * @param type $q
     * @param type $p
     * @param type $t
     * @param type $expectedQuery
     * @param type $expectedParams
     * @param type $expectedTypes
     */
    public function testExpandListParameters($q, $p, $t, $expectedQuery, $expectedParams, $expectedTypes)
    {
        list($query, $params, $types) = SQLParserUtils::expandListParameters($q, $p, $t);

        $this->assertEquals($expectedQuery, $query, "Query was not rewritten correctly.");
        $this->assertEquals($expectedParams, $params, "Params dont match");
        $this->assertEquals($expectedTypes, $types, "Types dont match");
    }
}


text:
module TwitterAds
  module Creative

    class ImageAppDownloadCard

      include TwitterAds::DSL
      include TwitterAds::Resource
      include TwitterAds::Persistence

      attr_reader :account

      property :card_type, read_only: true
      property :card_uri, read_only: true
      property :created_at, type: :time, read_only: true
      property :deleted, type: :bool, read_only: true
      property :id, read_only: true
      property :image_display_height, read_only: true
      property :image_display_width, read_only: true
      property :preview_url, read_only: true
      property :updated_at, type: :time, read_only: true
      property :wide_app_image, read_only: true

      property :app_country_code
      property :app_cta
      property :googleplay_app_id
      property :googleplay_deep_link
      property :iphone_app_id
      property :iphone_deep_link
      property :ipad_app_id
      property :ipad_deep_link
      property :name
      property :wide_app_image_media_id

      RESOURCE_COLLECTION = "/#{TwitterAds::API_VERSION}/" +
                            'accounts/%{account_id}/cards/image_app_download'.freeze # @api private
      RESOURCE = "/#{TwitterAds::API_VERSION}/" +
                 'accounts/%{account_id}/cards/image_app_download/%{id}'.freeze # @api private

      def initialize(account)
        @account = account
        self
      end

    end

  end
end


text:
using System.Collections.Generic;
using System.Linq;
using ZKWeb.Plugins.Common.Base.src.UIComponents.ListItems.Interfaces;

namespace ZKWeb.Plugins.Common.Base.src.UIComponents.ListItems {
	/// <summary>
	/// 自定义选项列表提供器
	/// 请配合ListItemValueWithProvider使用
	/// </summary>
	public class CustomListItemProvider : IListItemProvider {
		/// <summary>
		/// 选项列表
		/// </summary>
		public IList<ListItem> Items { get; set; }

		/// <summary>
		/// 初始化
		/// </summary>
		/// <param name="items">选项列表</param>
		public CustomListItemProvider(IList<ListItem> items) {
			Items = items;
		}

		/// <summary>
		/// 初始化
		/// </summary>
		/// <param name="items">选项列表</param>
		public CustomListItemProvider(params ListItem[] items) : this(items.ToList()) { }

		/// <summary>
		/// 获取选项列表
		/// </summary>
		/// <returns></returns>
		public IEnumerable<ListItem> GetItems() {
			return Items;
		}
	}
}


text:
extern "C"
{
#endif

#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <ncurses.h>

#ifdef __cplusplus
}
#endif

#define PORT 5000

class CLIENT {
	public:
            CLIENT (char *IP);
            ~CLIENT ();
            void Play ();
            SERVER exchangeCIandName ();
            void sendPK ();
            void sendNonce ();
            std::string recvPK ();
            std::string recvNonce ();
            int getSFD ();
            std::string encryptMSG (std::string &msg, SERVER &receiver);
            std::string decryptMSG (std::string &msg, SERVER &sender);
            SERVER & getServer ();
            WINDOW * getReadWin ();
            WINDOW * getWriteWin ();
	private:
            CRYPTO cryptinfo;
            int sockfd;
            SERVER server;
            bool name_verified;
            WINDOW *read_win;
            WINDOW *write_win;
};

void readLoop (CLIENT *client_p);
void writeLoop (CLIENT *client_p);

#endif


text:
layout: base
title:  'Features'
generated: 'true'
permalink: fo/feat/index.html
---

# Features

{% include fo-feat-table.html %}

----------

Alphabetical listing

{% assign sorted = site.fo-feat | sort: 'title' %}{% for p in sorted %}
* [{{ p.title }}](): {{ p.shortdef }}{% endfor %}


text:
require "test_helper"

module Cogy
  class BuiltinHelpersTest < ActionDispatch::IntegrationTest
    include Engine.routes.url_helpers

    def test_args_helper_overrides_predefined_helpers
      cmd :args_overrides, COG_ARGV_1: "hu", COG_ARGV_0: "haha"
      assert_equal "hahahu", response.body
    end

    def test_args_with_empty_arguments
      cmd :empty_args
      assert_equal "true", response.body
    end

    def test_args
      cmd :add, COG_ARGV_0: 1, COG_ARGV_1: 2
      assert_equal "3", response.body
    end
  end
end


text:
<?php
$configs = parse_ini_file('default.ini.php', true);
if (!is_array($configs)) {
    die(header("Status: 501"));
}

$delayTime = $_GET['delay_time'];        // In minutes
if (!$delayTime) {
    $delayTime = $configs['general']['default_timer'];
}

$timeFile = $configs['paths']['time_file'];
$endingTime = time();

$fh = fopen($timeFile, "w");
    $endingTime += $delayTime;
    fwrite($fh, $endingTime);
fclose($fh);

exit(header("Status: 200"));


text:
#define NOMINMAX
#include <limits>
#include <vcc/physical_device.h>
#include <vcc/queue.h>

namespace vcc {
namespace queue {

queue_type get_device_queue(const type::supplier<const device::device_type> &device,
		uint32_t queue_family_index, uint32_t queue_index) {
	VkQueue queue;
	vkGetDeviceQueue(internal::get_instance(*device), queue_family_index,
		queue_index, &queue);
	return queue_type(queue, device, queue_family_index);
}

queue_type get_queue(const type::supplier<const device::device_type> &device, VkQueueFlags flags) {
	const std::vector<VkQueueFamilyProperties> queue_props(
		physical_device::queue_famility_properties(device::get_physical_device(*device)));
	for (std::size_t i = 0; i < queue_props.size(); ++i) {
		if ((queue_props[i].queueFlags & flags) == flags) {
			return get_device_queue(device, (uint32_t) i, 0);
		}
	}
	throw vcc_exception("Failed to find queue");
}

queue_type get_present_queue(const type::supplier<const device::device_type> &device,
		const surface::surface_type &surface) {
	const std::vector<VkQueueFamilyProperties> queue_props(
		physical_device::queue_famility_properties(
			device::get_physical_device(*device)));
	for (std::size_t i = 0; i < queue_props.size(); ++i) {
		if (vcc::surface::physical_device_support(device::get_physical_device(*device),
				surface, (uint32_t) i)) {
			return get_device_queue(device, (uint32_t) i, 0);
		}
	}
	throw vcc_exception("Failed to find a present queue");
}

std::pair<queue_type, queue_type> get_graphics_and_present_queues(
		const type::supplier<const device::device_type> &device,
		surface::surface_type &surface) {
	const std::vector<VkQueueFamilyProperties> queue_props(
		physical_device::queue_famility_properties(device::get_physical_device(*device)));
	std::size_t graphics_index = std::numeric_limits<std::size_t>::max();
	std::size_t present_index = std::numeric_limits<std::size_t>::max();
	for (std::size_t i = 0; i < queue_props.size(); ++i) {
		const bool present_support(vcc::surface::physical_device_support(
			device::get_physical_device(*device), surface, (uint32_t) i));
		if (present_support) {
			present_index = i;
		}
		if (queue_props[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) {
			graphics_index = i;
			if (present_support) {
				present_index = i;
				break;
			}
		}
	}
	if (present_index == std::numeric_limits<std::size_t>::max()
		|| graphics_index == std::numeric_limits<std::size_t>::max()) {
		throw vcc_exception("failed to find queues for present and graphics");
	}
	return std::make_pair(get_device_queue(device, (uint32_t) graphics_index, 0),
		get_device_queue(device, (uint32_t) present_index, 0));
}

void submit(const queue_type &queue,
		const std::vector<wait_semaphore> &wait_semaphores,
		const std::vector<std::reference_wrapper<const command_buffer::command_buffer_type>>
			&command_buffers,
		const std::vector<std::reference_wrapper<const semaphore::semaphore_type>> &signal_semaphores,
		const fence::fence_type *fence) {
	std::vector<VkCommandBuffer> converted_command_buffers;
	converted_command_buffers.reserve(command_buffers.size());
	for (const command_buffer::command_buffer_type &command_buffer : command_buffers) {
		converted_command_buffers.push_back(internal::get_instance(command_buffer));
		command_buffer::internal::get_pre_execute_hook(command_buffer)(queue);
	}
	std::vector<VkSemaphore> converted_wait_semaphores;
	converted_wait_semaphores.reserve(wait_semaphores.size());
	std::vector<VkPipelineStageFlags> wait_mask;
	wait_mask.reserve(wait_semaphores.size());
	for (const wait_semaphore &semaphore : wait_semaphores) {
		converted_wait_semaphores.push_back(internal::get_instance(*semaphore.semaphore));
		wait_mask.push_back(semaphore.wait_dst_stage_mask);
	}
	std::vector<VkSemaphore> converted_signal_semaphores;
	converted_signal_semaphores.reserve(signal_semaphores.size());
	for (const semaphore::semaphore_type &semaphore : signal_semaphores) {
		converted_signal_semaphores.push_back(internal::get_instance(semaphore));
	}
	VkSubmitInfo submit = { VK_STRUCTURE_TYPE_SUBMIT_INFO, NULL };
	submit.waitSemaphoreCount = (uint32_t)converted_wait_semaphores.size();
	submit.pWaitSemaphores = converted_wait_semaphores.empty() ? NULL : &converted_wait_semaphores.front();
	submit.pWaitDstStageMask = wait_mask.empty() ? NULL : wait_mask.data();
	submit.commandBufferCount = (uint32_t)converted_command_buffers.size();
	submit.pCommandBuffers = converted_command_buffers.data();
	submit.signalSemaphoreCount = (uint32_t)converted_signal_semaphores.size();
	submit.pSignalSemaphores = converted_signal_semaphores.empty() ? NULL : &converted_signal_semaphores.front();
	std::vector<std::unique_lock<std::mutex>> locks;
	locks.reserve(wait_semaphores.size() + signal_semaphores.size());
	for (const wait_semaphore &semaphore : wait_semaphores) {
		locks.emplace_back(internal::get_mutex(*semaphore.semaphore), std::defer_lock);
	}
	for (const semaphore::semaphore_type &semaphore : signal_semaphores) {
		locks.emplace_back(internal::get_mutex(semaphore), std::defer_lock);
	}
	util::lock(locks);
	if (fence) {
		std::lock(internal::get_mutex(queue), internal::get_mutex(*fence));
		std::lock_guard<std::mutex> queue_lock(internal::get_mutex(queue), std::adopt_lock);
		std::lock_guard<std::mutex> fence_lock(internal::get_mutex(*fence), std::adopt_lock);
		VKCHECK(vkQueueSubmit(internal::get_instance(queue), 1, &submit,
			internal::get_instance(*fence)));
	} else {
		std::lock_guard<std::mutex> queue_lock(internal::get_mutex(queue));
		VKCHECK(vkQueueSubmit(internal::get_instance(queue), 1, &submit, VK_NULL_HANDLE));
	}
}

void submit(const queue_type &queue,
		const std::vector<wait_semaphore> &wait_semaphores,
		const std::vector<std::reference_wrapper<const command_buffer::command_buffer_type>>
			&command_buffers,
		const std::vector<std::reference_wrapper<const semaphore::semaphore_type>> &signal_semaphores,
		const fence::fence_type &fence) {
	submit(queue, wait_semaphores, command_buffers, signal_semaphores, &fence);
}

void submit(const queue_type &queue,
	const std::vector<wait_semaphore> &wait_semaphores,
	const std::vector<std::reference_wrapper<const command_buffer::command_buffer_type>> &command_buffers,
	const std::vector<std::reference_wrapper<const semaphore::semaphore_type>> &signal_semaphores) {
	submit(queue, wait_semaphores, command_buffers, signal_semaphores, nullptr);
}

void wait_idle(const queue_type &queue) {
	VKCHECK(vkQueueWaitIdle(internal::get_instance(queue)));
}

VkResult present(const queue_type &queue,
		const std::vector<std::reference_wrapper<const semaphore::semaphore_type>> &semaphores,
		const std::vector<std::reference_wrapper<const swapchain::swapchain_type>> &swapchains,
		const std::vector<uint32_t> &image_indices) {
	VkPresentInfoKHR info = {VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, NULL};
	info.waitSemaphoreCount = (uint32_t) semaphores.size();
	std::vector<std::unique_lock<std::mutex>> locks;
	locks.reserve(1 + semaphores.size() + swapchains.size());
	locks.emplace_back(internal::get_mutex(queue), std::defer_lock);
	std::vector<VkSemaphore> converted_semaphores;
	converted_semaphores.reserve(semaphores.size());
	for (const semaphore::semaphore_type &semaphore : semaphores) {
		converted_semaphores.push_back(internal::get_instance(semaphore));
		locks.emplace_back(internal::get_mutex(semaphore), std::defer_lock);
	}
	info.pWaitSemaphores = semaphores.empty() ? NULL : &converted_semaphores.front();
	info.swapchainCount = (uint32_t) swapchains.size();
	std::vector<VkSwapchainKHR> converted_swapchains;
	converted_swapchains.reserve(swapchains.size());
	for (const swapchain::swapchain_type &swapchain : swapchains) {
		converted_swapchains.push_back(internal::get_instance(swapchain));
		locks.emplace_back(internal::get_mutex(swapchain), std::defer_lock);
	}
	info.pSwapchains = swapchains.empty() ? NULL : &converted_swapchains.front();
	info.pImageIndices = image_indices.empty() ? NULL : &image_indices.front();
	info.pResults = NULL;
	util::lock(locks);
	return vkQueuePresentKHR(internal::get_instance(queue), &info);
}

}  // namespace queue
}  // namespace vcc


text:
<!DOCTYPE html>

    <meta charset='utf-8'>
    <title>HTML Test: dropzone_attribute_inputbox_element_dbcs</title>
    <link rel='author' title='Intel' href='http://www.intel.com'>
    <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-dropzone-attribute'>

Select all the inputbox DBCS (Double Byte Character Set) text then drag to rectangular box.

    <input draggable='true' type='text' value='您好,互联网。'></input>


text:
using iSukces.Code.Interfaces;

namespace iSukces.Code.Irony
{
    public sealed class DirectCode : ICsExpression
    {
        public DirectCode(string code) => Code = code;

        public string GetCode(ITypeNameResolver resolver) => Code;

        public string Code { get; }
    }
}


text:
namespace dev
{

/// Sets the data dir for the default ("ethereum") prefix.
void setDataDir(boost::filesystem::path const& _dir);
/// @returns the path for user data.
boost::filesystem::path getDataDir(std::string _prefix = "ethereum");
/// @returns the default path for user data, ignoring the one set by `setDataDir`.
boost::filesystem::path getDefaultDataDir(std::string _prefix = "ethereum");
/// Sets the ipc socket dir
void setIpcPath(boost::filesystem::path const& _ipcPath);
/// @returns the ipc path (default is DataDir)
boost::filesystem::path getIpcPath();

/// @returns a new path whose file name is suffixed with the given suffix.
boost::filesystem::path appendToFilename(boost::filesystem::path const& _orig, std::string const& _suffix);

}


text:
Neuron Lang depends on a set of core ontology files that define the
predicates and complex neuronal phenotypes that are the building blocks
for neurons. At the moment these files live in the
[neurons branch](https://github.com/SciCrunch/NIF-Ontology/tree/neurons)
ofthe NIF-Ontology repository. As such, Neuron Lang requires a local copy
of the NIF-Ontology repository which has the neurons branch checked out.
To accomplish this run the following.
```
git clone https://github.com/SciCrunch/NIF-Ontology.git`
cd NIF-Ontology
git checkout neurons
```

## The notebook environment for neuron lang support
1. Install `neurondm` following the [installation](./../README.md#installation) and
[configuration](./../README.md#configuration) instructions.
2. If you encounter any issues the most detailed instructions can be found in the
[setup documentation](https://github.com/SciCrunch/sparc-curation/blob/master/docs/setup.org)
for bootstrapping a full pyontutils/NIF-Ontology/protc development environment.

# Running the notebook
From the outer `neurondm` folder (../ from the folder of this README) run the following commands.
```
export SCICRUNCH_API_KEY=$(cat path/to/my/apikey)
cd docs/
jupyter-notebook
```
At this point your browser should open up with a view of this folder
and you should be able to select [NeuronLangExample.ipynb](./NeuronLangExample.ipynb) and run it.

# If you want to run this on an existing dedicated notebook server
[Create an issue](https://github.com/tgbugs/pyontutils/issues/new)
and I will help you figure out how to get all the dependencies installed.


text:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/horizontalList"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/toolbar"
    android:clipToPadding="false"
    android:orientation="horizontal"
    android:paddingEnd="@dimen/margin_small"
    android:paddingRight="@dimen/margin_small"
    app:layoutManager="LinearLayoutManager"
    tools:context="no.dnt.sjekkut.ui.MainListFragment"
    tools:ignore="RtlSymmetry"
    tools:listitem="@layout/card_place_in_nearby" />


text:
from __future__ import unicode_literals

SITENAME = 'Essence'
SITEURL = 'http://essenceguild.com/test'
TIMEZONE = 'Europe/Brussels'

AUTHOR_SAVE_AS = False
CATEGORY_SAVE_AS = False
TAG_SAVE_AS = False
DIRECT_TEMPLATES = ('index',)

PATH = 'content'
STATIC_PATH = ['images','css','js','pages']

DEFAULT_LANG = 'en'

# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRANSLATION_FEED_ATOM = None
AUTHOR_FEED_ATOM = None
AUTHOR_FEED_RSS = None

MENUITEMS = (
    ('HOME', '/'),
    ('FORUM', 'forum'),
    ('APPLY', 'forum/viewtopic.php?f=3&t=20'),
    ('VIDEOS', 'https://www.youtube.com/playlist?list=PLODPS8kjBtYsBCFEITxpuFWYEjFYJTb8J')
)

# Social widget
SOCIAL = (('You can add links in your config file', '#'),
          ('Another social link', '#'),)

DEFAULT_PAGINATION = False

# Uncomment following line if you want document-relative URLs when developing
#RELATIVE_URLS = True

# custom page generated with a jinja2 template


text:
<?php

namespace maple\beyond;

use Yii;
use yii\helpers\Json;

class Widget extends \yii\base\Widget
{
    /**
     * @var array the HTML attributes for the widget container tag.
     * @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
     */
    public $options = [];
    /**
     * @var array the options for the underlying Bootstrap JS plugin.
     * Please refer to the corresponding Bootstrap plugin Web page for possible options.
     * For example, [this page](http://getbootstrap.com/javascript/#modals) shows
     * how to use the "Modal" plugin and the supported options (e.g. "remote").
     */
    public $clientOptions = [];
    /**
     * @var array the event handlers for the underlying Bootstrap JS plugin.
     * Please refer to the corresponding Bootstrap plugin Web page for possible events.
     * For example, [this page](http://getbootstrap.com/javascript/#modals) shows
     * how to use the "Modal" plugin and the supported events (e.g. "shown").
     */
    public $clientEvents = [];

    /**
     * Initializes the widget.
     * This method will register the bootstrap asset bundle. If you override this method,
     * make sure you call the parent implementation first.
     */
    public function init()
    {
        parent::init();
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
    }

    /**
     * Registers a specific Bootstrap plugin and the related events
     * @param string $name the name of the Bootstrap plugin
     */
    protected function registerPlugin($name)
    {
        $view = $this->getView();

        BeyondPluginAsset::register($view);

        $id = $this->options['id'];

        if ($this->clientOptions !== false) {
            $options = empty($this->clientOptions) ? '' : Json::encode($this->clientOptions);
            $js = "jQuery('#$id').$name($options);";
            $view->registerJs($js);
        }

        $this->registerClientEvents();
    }

    /**
     * Registers JS event handlers that are listed in [[clientEvents]].
     * @since 2.0.2
     */
    protected function registerClientEvents()
    {
        if (!empty($this->clientEvents)) {
            $id = $this->options['id'];
            $js = [];
            foreach ($this->clientEvents as $event => $handler) {
                $js[] = "jQuery('#$id').on('$event', $handler);";
            }
            $this->getView()->registerJs(implode("\n", $js));
        }
    }
}


text:
package org.ovirt.engine.api.resource;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.POST;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
import org.jboss.resteasy.annotations.providers.jaxb.Formatted;

import org.ovirt.engine.api.model.Role;
import org.ovirt.engine.api.model.Roles;

/**
 * Provides read-only access to the global set of roles
 */
@Path("/roles")
@Produces({ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML})
public interface RolesResource {

    @GET
    @Formatted
    public Roles list();

    @POST
    @Formatted
    @Consumes({ApiMediaType.APPLICATION_XML, ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML})
    public Response add(Role role);

    @DELETE
    @Path("{id}")
    public Response remove(@PathParam("id") String id);

    /**
     * Sub-resource locator method, returns individual RoleResource on which the
     * remainder of the URI is dispatched.
     *
     * @param id  the Role ID
     * @return    matching subresource if found
     */
    @Path("{id}")
    public UpdatableRoleResource getRoleSubResource(@PathParam("id") String id);
}


text:
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   A copy of the license can be found in the license.txt file supplied   *
 *   with this software or at: http://www.gnu.org/copyleft/gpl.html        *
 *                                                                         *
 ***************************************************************************/
package de.uniba.wiai.lspi.chord.com.rmi;

import java.rmi.AccessException;
import java.rmi.AlreadyBoundException;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

import de.uniba.wiai.lspi.chord.com.CommunicationException;
import de.uniba.wiai.lspi.chord.com.Endpoint;
import de.uniba.wiai.lspi.chord.com.Entry;
import de.uniba.wiai.lspi.chord.com.Node;
import de.uniba.wiai.lspi.chord.com.RefsAndEntries;
import de.uniba.wiai.lspi.chord.data.ID;
import de.uniba.wiai.lspi.chord.data.URL;

public final class RMIEndpoint extends Endpoint implements RemoteNode {

	private Registry registry = null;

	private RemoteNode remoteNode = null;

	static final String NAME_IN_REGISTRY = "oc_endpoint_";

	public RMIEndpoint(Node node1, URL url1) {
		super(node1, url1);
	}

	/**
	 * Can only be called if Endpoint is not in state STARTED!
	 * @return
	 */
	RemoteNode getRemoteNode() {
		if (this.remoteNode == null) {
			throw new IllegalStateException();
		}
		return this.remoteNode;
	}

	@Override
	protected void closeConnections() {
		try {
			UnicastRemoteObject.unexportObject(this, true);
			registry.unbind(NAME_IN_REGISTRY + this.url.toString());
			this.setState(STARTED);
		} catch (AccessException e) {
		} catch (RemoteException e) {
		} catch (NotBoundException e) {
		}
	}

	@Override
	protected void entriesAcceptable() {
		this.setState(ACCEPT_ENTRIES);
	}

	@Override
	protected void openConnections() {
		try {
			if (registry == null) {
				registry = LocateRegistry.createRegistry(this.url.getPort());
			}
			Remote remoteRef;
			remoteNode = (RemoteNode) UnicastRemoteObject.exportObject(this);
			registry.bind(NAME_IN_REGISTRY + this.url.toString(), remoteNode);
			this.setState(LISTENING);
		} catch (RemoteException e) {
			throw new RuntimeException(e);
		} catch (AlreadyBoundException e) {
			throw new RuntimeException(e);
		}
	}

	private RemoteNodeInfo createInfo(Node node) {
		if (node.getNodeID().equals(this.node.getNodeID())) {
			return new RemoteNodeInfo(remoteNode, this.node.getNodeID(),
					this.node.getNodeURL());
		} else {
			return new RemoteNodeInfo(((RMIProxy) node).getRemoteNode(), node
					.getNodeID(), node.getNodeURL());
		}
	}

	public RemoteNodeInfo findSuccessor(ID key) throws CommunicationException,
			RemoteException {
		try {
			Node node = this.node.findSuccessor(key);
			return createInfo(node);
		} catch (ClassCastException e) {
			throw new RemoteException(
					"Remote node uses unsuitable communication protocol!", e);
		}
	}

	public ID getNodeID() throws RemoteException {
		return this.node.getNodeID();
	}

	public void insertEntry(Entry entryToInsert) throws RemoteException,
			CommunicationException {
		this.node.insertEntry(entryToInsert);
	}

	public void insertReplicas(Set<Entry> entries) throws RemoteException,
			CommunicationException {
		this.node.insertReplicas(entries);
	}

	public void leavesNetwork(RemoteNodeInfo predecessor)
			throws RemoteException, CommunicationException {
		this.node.leavesNetwork(new RMIProxy(predecessor, this.getURL()));
	}

	public List<RemoteNodeInfo> notify(RemoteNodeInfo potentialPredecessor)
			throws RemoteException, CommunicationException {
		List<Node> nodes = this.node.notify(new RMIProxy(potentialPredecessor,
				this.getURL()));
		List<RemoteNodeInfo> result = new LinkedList<RemoteNodeInfo>();
		for (Node node : nodes) {
			result.add(this.createInfo(node));

		}
		return result;
	}

	public RemoteRefsAndEntries notifyAndCopyEntries(
			RemoteNodeInfo potentialPredecessor) throws RemoteException,
			CommunicationException {
		RefsAndEntries raes = this.node.notifyAndCopyEntries(new RMIProxy(
				potentialPredecessor, this.getURL()));
		List<RemoteNodeInfo> rNodes = new LinkedList<RemoteNodeInfo>();
		List<Node> nodes = raes.getRefs();
		for (Node node : nodes) {
			rNodes.add(this.createInfo(node));
		}
		return new RemoteRefsAndEntries(raes.getEntries(), rNodes);
	}

	public void ping() throws RemoteException {
	}

	public void removeEntry(Entry entryToRemove) throws RemoteException,
			CommunicationException {
		this.node.removeEntry(entryToRemove);
	}

	public void removeReplicas(ID sendingNode, Set<Entry> replicasToRemove)
			throws RemoteException, CommunicationException {
		this.node.removeReplicas(sendingNode, replicasToRemove);

	}

	public Set<Entry> retrieveEntries(ID id) throws RemoteException,
			CommunicationException {
		return this.node.retrieveEntries(id);
	}
}


text:
<?php
/**
 * Generated by Protobuf protoc plugin.
 *
 * File descriptor :
 * POGOProtos/Networking/Platform/Responses/BuyItemAndroidResponse.proto
 */

namespace POGOProtos\Networking\Platform\Responses\BuyItemAndroidResponse;

/**
 * Protobuf enum :
 * POGOProtos.Networking.Platform.Responses.BuyItemAndroidResponse.Status
 */
class Status extends \Protobuf\Enum
{

    /**
     * UNKNOWN = 0
     */
    const UNKNOWN_VALUE = 0;

    /**
     * SUCCESS = 1
     */
    const SUCCESS_VALUE = 1;

    /**
     * @var \POGOProtos\Networking\Platform\Responses\BuyItemAndroidResponse\Status
     */
    protected static $UNKNOWN = null;

    /**
     * @var \POGOProtos\Networking\Platform\Responses\BuyItemAndroidResponse\Status
     */
    protected static $SUCCESS = null;

    /**
     * @return \POGOProtos\Networking\Platform\Responses\BuyItemAndroidResponse\Status
     */
    public static function UNKNOWN()
    {
        if (self::$UNKNOWN !== null) {
            return self::$UNKNOWN;
        }

        return self::$UNKNOWN = new self('UNKNOWN', self::UNKNOWN_VALUE);
    }

    /**
     * @return \POGOProtos\Networking\Platform\Responses\BuyItemAndroidResponse\Status
     */
    public static function SUCCESS()
    {
        if (self::$SUCCESS !== null) {
            return self::$SUCCESS;
        }

        return self::$SUCCESS = new self('SUCCESS', self::SUCCESS_VALUE);
    }

    /**
     * @param int $value
     * @return \POGOProtos\Networking\Platform\Responses\BuyItemAndroidResponse\Status
     */
    public static function valueOf($value)
    {
        switch ($value) {
            case 0: return self::UNKNOWN();
            case 1: return self::SUCCESS();
            default: return null;
        }
    }

}


text:
package com.hczhang.hummingbird.demo.basic;

/**
 * Created by steven on 7/15/15.
 */
public class HelloWorld {
    private String message;

    public void setMessage(String message){
        this.message  = message;
    }

    public void getMessage(){
        System.out.println("Your Message : " + message);
    }
}


text:
class AddTimestampsToConference < ActiveRecord::Migration

  def self.up
    add_column :conferences, :created_at, :datetime
    add_column :conferences, :updated_at, :datetime
  end

  def self.down
    remove_column :conferences, :updated_at
    remove_column :conferences, :created_at
  end
end


text:
<?xml version="1.0"?>
<TestCases system="AllOf">
  <Has name="server" value="/"/>
  <Has name="title" value="AllOf"/>
  <Has name="version" value="0.0.0"/>
  <Function name="POST_allOf">
    <Has name="operation" value="POST"/>
    <Has name="path" value="/allOf"/>
    <Has name="server" value="/"/>
    <Has name="title" value="AllOf"/>
    <Has name="version" value="0.0.0"/>
    <TestCase id="0" name="param0.Defined='Yes'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative0,param0LengthValid,param0NotEmpty,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="0">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" value="3">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="1" name="param0.Defined='No'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0Alternative1"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="No">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="1">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="2" name="param0.Alternative.0.Value.Length='> 3'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative0,param0LengthValid,param0NotEmpty,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="0">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" value="> 3">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="3" name="param0.Alternative.1.Type='string'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative1,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="1">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" value="A">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="4" name="param0.Alternative.1.Value='B'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative1,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="1">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" value="B">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="5" name="param0.Alternative.1.Value='C'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative1,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="1">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" value="C">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="6" failure="true" name="param0.Alternative.0.Type=null">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative0"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="0">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" value="null" failure="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="7" failure="true" name="param0.Alternative.0.Type='Not string'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative0"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="0">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" value="Not string" failure="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="8" failure="true" name="param0.Alternative.0.Value.Length='2'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative0,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="0">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" value="2" failure="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="9" failure="true" name="param0.Alternative.0.Value.Matches-Patterns.0='No'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative0,param0LengthValid,param0NotEmpty,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="0">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" value="3">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" value="No" failure="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="10" failure="true" name="param0.Alternative.0.Value.Matches-Patterns.1='No'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative0,param0LengthValid,param0NotEmpty,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="0">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" value="3">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" value="No" failure="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
    <TestCase id="11" failure="true" name="param0.Alternative.1.Value='Other'">
      <Has name="operation" value="POST"/>
      <Has name="path" value="/allOf"/>
      <Has name="properties" value="param0,param0Alternative1,param0Value"/>
      <Has name="server" value="/"/>
      <Has name="title" value="AllOf"/>
      <Has name="version" value="0.0.0"/>
      <Input type="header">
        <Var name="param0.Defined" value="Yes">
          <Has name="paramName" value="param0"/>
          <Has name="style" value="simple"/>
        </Var>
        <Var name="param0.Alternative.Used" value="1">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Type" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Length" NA="true">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.0" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value=".*"/>
        </Var>
        <Var name="param0.Alternative.0.Value.Matches-Patterns.1" NA="true">
          <Has name="paramName" value="param0"/>
          <Has name="pattern" value="XXX"/>
        </Var>
        <Var name="param0.Alternative.1.Type" value="string">
          <Has name="paramName" value="param0"/>
        </Var>
        <Var name="param0.Alternative.1.Value" value="Other" failure="true">
          <Has name="excluded" value="'A','B','C'"/>
          <Has name="paramName" value="param0"/>
        </Var>
      </Input>
    </TestCase>
  </Function>
</TestCases>


text:
{% extends "base_registration.html" %}
{% block content %}

Activation complete!

{% endblock %}


text:
/**
 *
 * Emerald (kbi/elude @2012-2015)
 *
 */
#ifndef OGL_CONTEXT_H
#define OGL_CONTEXT_H

#include "ogl/ogl_types.h"
#include "ogl/ogl_context_bo_bindings.h"
#include "ogl/ogl_context_sampler_bindings.h"
#include "ogl/ogl_context_texture_compression.h"
#include "raGL/raGL_backend.h"
#include "raGL/raGL_types.h"

REFCOUNT_INSERT_DECLARATIONS(ogl_context,
                             ogl_context)

typedef enum ogl_context_property
{
    /* not settable, raGL_backend */
    OGL_CONTEXT_PROPERTY_BACKEND,

    /* not settable, ral_backend_type */
    OGL_CONTEXT_PROPERTY_BACKEND_TYPE,

    /* not settable, ogl_context_bo_bindings */
    OGL_CONTEXT_PROPERTY_BO_BINDINGS,

    /* not settable, ral_context */
    OGL_CONTEXT_PROPERTY_CONTEXT_RAL,

    /* not settable, raGL_framebuffer */
    OGL_CONTEXT_PROPERTY_DEFAULT_FBO,

    /* not settable, ral_texture_format */
    OGL_CONTEXT_PROPERTY_DEFAULT_FBO_COLOR_TEXTURE_FORMAT,

    /* not settable, uint32_t[2] */
    OGL_CONTEXT_PROPERTY_DEFAULT_FBO_SIZE,

    /* not settable, ogl_context_es_entrypoints*.
     *
     * Only accessible for ES contexts
     */
    OGL_CONTEXT_PROPERTY_ENTRYPOINTS_ES,

    /* not settable, ogl-context_es_entrypoints_ext_texture_buffer*.
     *
     * Only accessible for ES contexts
     */
    OGL_CONTEXT_PROPERTY_ENTRYPOINTS_ES_EXT_TEXTURE_BUFFER,

    /* not settable, ogl_context_gl_entrypoints*.
     * Only accessible for GL contexts */
    OGL_CONTEXT_PROPERTY_ENTRYPOINTS_GL,

    /* not settable, ogl_context_entrypoints_arb_clear_texture*
     *
     * Only accessible for GL contexts
     */
    OGL_CONTEXT_PROPERTY_ENTRYPOINTS_GL_ARB_CLEAR_TEXTURE,

    /* not settable, ogl_context_entrypoints_arb_buffer_storage*
     *
     * Only accessible for GL contexts
     */
    OGL_CONTEXT_PROPERTY_ENTRYPOINTS_GL_ARB_BUFFER_STORAGE,

    /* not settable, ogl_context_entrypoints_arb_sparse_buffer*
     *
     * Only accessible for GL contexts
     */
    OGL_CONTEXT_PROPERTY_ENTRYPOINTS_GL_ARB_SPARSE_BUFFER,

    /* not settable, ogl_context_entrypoints_ext_direct_state_access*
     *
     * Only accessible for GL contexts
     */
    OGL_CONTEXT_PROPERTY_ENTRYPOINTS_GL_EXT_DIRECT_STATE_ACCESS,

    /* not settable, ogl_context_info* */
    OGL_CONTEXT_PROPERTY_INFO,

    /* not settable, bool.
     *
     * True if the platform is using AMD driver, false otherwise */
    OGL_CONTEXT_PROPERTY_IS_AMD_DRIVER,

    /* settable, bool. */
    OGL_CONTEXT_PROPERTY_IS_HELPER_CONTEXT,

    /* not settable, bool.
     *
     * True if the platform is using Intel drivers, false otherwise */
    OGL_CONTEXT_PROPERTY_IS_INTEL_DRIVER,

    /* not settable, bool.
     *
     * True if the platform is using NVIDIA drivers, false otheriwse */
    OGL_CONTEXT_PROPERTY_IS_NV_DRIVER,

    /* not settable, ogl_context_limits* */
    OGL_CONTEXT_PROPERTY_LIMITS,

    /* not settable, ogl_context_limits_arb_sparse_buffer* */
    OGL_CONTEXT_PROPERTY_LIMITS_ARB_SPARSE_BUFFER,

    /* not settable, ogl_context_limits_ext_texture_filter_anisotropic* */
    OGL_CONTEXT_PROPERTY_LIMITS_EXT_TEXTURE_FILTER_ANISOTROPIC,

    /* not settable, uint32_t */
    OGL_CONTEXT_PROPERTY_MAJOR_VERSION,

    /* not settable, uint32_t */
    OGL_CONTEXT_PROPERTY_MINOR_VERSION,

    /* not settable, ogl_context */
    OGL_CONTEXT_PROPERTY_PARENT_CONTEXT,

    /* not settable, system_pixel_format */
    OGL_CONTEXT_PROPERTY_PIXEL_FORMAT,

    /* settable, not queriable, ogl_context_linux or ogl_context_win32 */
    OGL_CONTEXT_PROPERTY_PLATFORM_CONTEXT,

    /* not settable, ogl_context_handle */
    OGL_CONTEXT_PROPERTY_RENDERING_CONTEXT,

    /* not settable, ogl_context_sampler_bindings */
    OGL_CONTEXT_PROPERTY_SAMPLER_BINDINGS,

    /* not settable, ogl_context_state_cache */
    OGL_CONTEXT_PROPERTY_STATE_CACHE,

    /* not settable, bool */
    OGL_CONTEXT_PROPERTY_SUPPORT_ES_EXT_TEXTURE_BUFFER,

    /* not settable, bool */
    OGL_CONTEXT_PROPERTY_SUPPORT_GL_ARB_BUFFER_STORAGE,

    /* not settable, bool */
    OGL_CONTEXT_PROPERTY_SUPPORT_GL_ARB_CLEAR_TEXTURE,

    /* not settable, bool */
    OGL_CONTEXT_PROPERTY_SUPPORT_GL_ARB_MULTI_BIND,

    /* not settable, bool */
    OGL_CONTEXT_PROPERTY_SUPPORT_GL_ARB_SPARSE_BUFFERS,

    /* not settable, bool */
    OGL_CONTEXT_PROPERTY_SUPPORT_GL_EXT_DIRECT_STATE_ACCESS,

    /* nots ettable, bool */
    OGL_CONTEXT_PROPERTY_SUPPORT_GL_EXT_TEXTURE_FILTER_ANISOTROPIC,

    /* not settable, ogl_context_texture_compression */
    OGL_CONTEXT_PROPERTY_TEXTURE_COMPRESSION,

    /* not settable, ogl_context_to_bindings */
    OGL_CONTEXT_PROPERTY_TO_BINDINGS,

    /* not settable, system_window */
    OGL_CONTEXT_PROPERTY_WINDOW,

    /* not settable, ogl_context_vaos */
    OGL_CONTEXT_PROPERTY_VAOS,

    /* settable, bool
     *
     * NOTE: Under Windows, this property can only be changed if the affected window is not
     *                      assigned a rendering context at the time of the setter call.
     * NOTE: Under Linux,   this property can only be changed for VISIBLE (mapped) windows!
     */
    OGL_CONTEXT_PROPERTY_VSYNC_ENABLED,

#ifdef _WIN32
    /* not settable, HDC */
    OGL_CONTEXT_PROPERTY_DC,
#endif

} ogl_context_property;

typedef void (*PFNINITCONTEXTAFTERCREATIONPROC)( ogl_context context);

/** TODO */
PUBLIC void ogl_context_bind_to_current_thread( ogl_context);

/** TODO */
PUBLIC void ogl_context_create_from_system_window(system_hashed_ansi_string name,
                                                  ral_context               context,
                                                  raGL_backend              backend,
                                                  system_window             window,
                                                  ogl_context               parent_context);

/** TODO
 *
 *  NOTE: Internal use only.
 */
PUBLIC void ogl_context_deinit_global();

/** Returns information about the supported numbers of samples that can be used for color,
 *  depth and stencil attachments, given user-specified pixel format requirements.
 *
 *  Instead of rendering to the back buffer, Emerald uses a multisample render-buffer. Once
 *  the frame rendering process finishes, it blits the contents of the render-buffer's color
 *  attachment to the back buffer and performs the swap operation.
 *  The approach was mostly dictated by two things:
 *
 *  1) Linux and Windows builds would require significantly different platform-specific code
 *     paths to provide the same information for back buffer-based MSAA.
 *  2) Use of multisample render-targets better fits APIs we will need to support in the future.
 *
 *  NOTE: The returned data is sorted in a descending order.
 *
 *  NOTE: It is caller's responsibility to ensure only one ogl_context_enumerate_msaa_samples() call
 *        is active at the same time. The function uses root context to retrieve
 *        API-specific information and badness may/will happen if this requirement is ignored.
 *
 *  @param backend_type            TODO.
 *  @param pf                      TODO. Ownership is NOT claimed by the function.
 *  @param out_n_supported_samples TODO.
 *  @param out_supported_samples   TODO.
 *
 */
PUBLIC void ogl_context_enumerate_msaa_samples(ral_backend_type    backend_type,
                                               system_pixel_format pf,
                                               unsigned int*       out_n_supported_samples,
                                               unsigned int**      out_supported_samples);

/** TODO */
PUBLIC ogl_context ogl_context_get_current_context();

/** TODO */
PUBLIC void ogl_context_get_property(const ogl_context    context,
                                     ogl_context_property property,
                                     void*                out_result_ptr);

/** TODO
 *
 *  NOTE: Internal use only.
 */
PUBLIC void ogl_context_init_global();

/** TODO */
PUBLIC bool ogl_context_is_extension_supported(ogl_context,
                                               system_hashed_ansi_string);

/** TODO */
PUBLIC bool ogl_context_release_managers(ogl_context);

/** TODO */
PUBLIC void ogl_context_set_passthrough_context(ogl_context passthrough_context);

/** TODO.
 *
 *  This setter will NOT throw an assertion failure if @param property is not recognized.
 */
PUBLIC bool ogl_context_set_property(ogl_context          context,
                                     ogl_context_property property,
                                     const void*          data);

/** TODO */
PUBLIC void ogl_context_swap_buffers(ogl_context context);

/** TODO */
PUBLIC void ogl_context_unbind_from_current_thread(ogl_context context);

/** TODO */
PUBLIC void ogl_context_wait_till_inited(ogl_context context);

#endif /* OGL_CONTEXT_H */