text:
<!--
  ~ Copyright 2016-present Open Networking Foundation
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
-->

<scenario name="distributed-work-queue-test"
          description="ONOS WorkQueue distributed primitive Test">
    <group name="Distributed-Primitive-WorkQueue">

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-AddOne"
              exec="onos-execute-expect ${OCI} work-queue-test stc-test-work-queue add foo --expect Done"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-Check-Pending-1"
              requires="^"
              exec="onos-cluster-execute-expect work-queue-test stc-test-work-queue totalPending --expect 1"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-Check-InProgress-1"
              requires="^"
              exec="onos-cluster-execute-expect work-queue-test stc-test-work-queue totalInProgress --expect 0"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-Check-TotalCompleted-1"
              requires="^"
              exec="onos-cluster-execute-expect work-queue-test stc-test-work-queue totalCompleted --expect 0"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-AddMultiple"
              requires="^"
              exec="onos-execute-expect ${OCI} work-queue-test stc-test-work-queue addMultiple bar car --expect Done"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-TakeAndComplete"
              requires="^"
              exec="onos-execute-expect ${OCI} work-queue-test stc-test-work-queue takeAndComplete 3 --expect Done"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-Check-Pending-2"
              requires="^"
              exec="onos-cluster-execute-expect work-queue-test stc-test-work-queue totalPending --expect 0"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-Check-InProgress-2"
              requires="^"
              exec="onos-cluster-execute-expect work-queue-test stc-test-work-queue totalInProgress --expect 0"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-Check-TotalCompleted-2"
              requires="^"
              exec="onos-cluster-execute-expect work-queue-test stc-test-work-queue totalCompleted --expect 3"/>

        <step name="Distributed-Primitive-WorkQueue.Test-Queue-Destroy"
              requires="^"
              exec="onos ${OCI} work-queue-test stc-test-work-queue destroy"/>

        <group name="Distributed-Primitive-WorkQueue.Check-Log-Exceptions"
               requires="Distributed-Primitive-WorkQueue.Test-Queue-Destroy">
            <parallel var="${OC#}">
                <step name="Distributed-Primitive-WorkQueue.Check-Log-Exceptions-${#}"
                      exec="onos-check-logs ${OC#}"/>
            </parallel>
        </group>

    </group>
</scenario>


text:
from django.utils.encoding import python_2_unicode_compatible

from ..models import models
from ..utils import gisfield_may_be_null

@python_2_unicode_compatible
class NamedModel(models.Model):
    name = models.CharField(max_length=30)

    objects = models.GeoManager()

    class Meta:
        abstract = True
        required_db_features = ['gis_enabled']

    def __str__(self):
        return self.name

class Country(NamedModel):
    mpoly = models.MultiPolygonField()  # SRID, by default, is 4326

class City(NamedModel):
    point = models.PointField()

    class Meta:
        app_label = 'geoapp'
        required_db_features = ['gis_enabled']

# This is an inherited model from City
class PennsylvaniaCity(City):
    county = models.CharField(max_length=30)
    founded = models.DateTimeField(null=True)

    # TODO: This should be implicitly inherited.

    objects = models.GeoManager()

    class Meta:
        app_label = 'geoapp'
        required_db_features = ['gis_enabled']

class State(NamedModel):
    poly = models.PolygonField(null=gisfield_may_be_null)  # Allowing NULL geometries here.

    class Meta:
        app_label = 'geoapp'
        required_db_features = ['gis_enabled']

class Track(NamedModel):
    line = models.LineStringField()

class MultiFields(NamedModel):
    city = models.ForeignKey(City)
    point = models.PointField()
    poly = models.PolygonField()

    class Meta:
        unique_together = ('city', 'point')
        required_db_features = ['gis_enabled']

class Truth(models.Model):
    val = models.BooleanField(default=False)

    objects = models.GeoManager()

    class Meta:
        required_db_features = ['gis_enabled']

class Feature(NamedModel):
    geom = models.GeometryField()

class MinusOneSRID(models.Model):
    geom = models.PointField(srid=-1)  # Minus one SRID.

    objects = models.GeoManager()

    class Meta:
        required_db_features = ['gis_enabled']

class NonConcreteField(models.IntegerField):

    def db_type(self, connection):
        return None

    def get_attname_column(self):
        attname, column = super(NonConcreteField, self).get_attname_column()
        return attname, None

class NonConcreteModel(NamedModel):
    non_concrete = NonConcreteField()
    point = models.PointField(geography=True)

redpajama_set_name: RedPajamaGithub


text:
#include "PapyrusForm.h"

#include "GameForms.h"
#include "GameRTTI.h"
#include "PapyrusVM.h"
#include "PapyrusEvents.h"
#include "GameMenus.h"

namespace papyrusForm
{
	UInt32 GetType(TESForm* thisForm)
	{
		return (thisForm) ? thisForm->GetFormType() : 0;
	}

	BSFixedString GetName(TESForm* thisForm)
	{
		if (!thisForm)
			return NULL;

		TESFullName* pFullName = DYNAMIC_CAST(thisForm, TESForm, TESFullName);
		if (pFullName)
			return pFullName->name.data;
		return NULL;
	}

	void SetName(TESForm* thisForm, BSFixedString nuName)
	{
		TESFullName* pFullName = DYNAMIC_CAST(thisForm, TESForm, TESFullName);
		// is a const string, so have to just reassign it.
		if (pFullName) {
			pFullName->name = nuName;
		}
	}

	float GetWeight(TESForm* thisForm)
	{
		if (!thisForm)
			return 0.0;

		TESWeightForm* pWeight = DYNAMIC_CAST(thisForm, TESForm, TESWeightForm);
		if (pWeight)
			return pWeight->weight;
		return 0.0;
	}

	void SetWeight(TESForm* thisForm, float nuWeight)
	{
		if (!thisForm)
			return;

		TESWeightForm* pWeight = DYNAMIC_CAST(thisForm, TESForm, TESWeightForm);
		if (pWeight)
			pWeight->weight = nuWeight;
	}

	UInt32 GetBaseDamage(TESForm* thisForm)
	{
		if (!thisForm)
			return 0;
		TESAttackDamageForm* pAttack = DYNAMIC_CAST(thisForm, TESForm, TESAttackDamageForm);
		if (pAttack)
			return pAttack->GetAttackDamage();
		return 0;
	}

	UInt32 GetValue(TESForm* thisForm)
	{
		if (!thisForm)
			return 0;
		TESValueForm* pValue = DYNAMIC_CAST(thisForm, TESForm, TESValueForm);
		if (pValue)
			return pValue->value;
		return 0;
	}

	void SetGoldValue(TESForm* thisForm, UInt32 value)
	{
		if (!thisForm)
			return;
		TESValueForm* pValue = DYNAMIC_CAST(thisForm, TESForm, TESValueForm);
		if (pValue)
			pValue->value = value;
	}

	UInt32 GetNumKeywords(TESForm* thisForm)
	{
		if (!thisForm)
			return 0;
		BGSKeywordForm* pKeywords = DYNAMIC_CAST(thisForm, TESForm, BGSKeywordForm);
		if (pKeywords)
			return pKeywords->numKeywords;
		return 0;
	}

	BGSKeyword* GetNthKeyword(TESForm* thisForm, UInt32 index)
	{
		if (!thisForm)
			return NULL;
		BGSKeywordForm* pKeywords = DYNAMIC_CAST(thisForm, TESForm, BGSKeywordForm);
		if (pKeywords && index < pKeywords->numKeywords) {
			return pKeywords->keywords[index];
		}
		return NULL;
	}

	void RegisterForKey(TESForm * thisForm, UInt32 key)
	{
		if(!thisForm)
			return;
		g_inputKeyEventRegs.Register<TESForm>(key, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForKey(TESForm * thisForm, UInt32 key)
	{
		if(!thisForm)
			return;
		g_inputKeyEventRegs.Unregister<TESForm>(key, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForAllKeys(TESForm * thisForm)
	{
		if(!thisForm)
			return;
		g_inputKeyEventRegs.UnregisterAll<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void RegisterForControl(TESForm * thisForm, BSFixedString control)
	{
		if(!thisForm)
			return;
		g_inputControlEventRegs.Register<TESForm>(control, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForControl(TESForm * thisForm, BSFixedString control)
	{
		if(!thisForm)
			return;
		g_inputControlEventRegs.Unregister<TESForm>(control, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForAllControls(TESForm * thisForm)
	{
		if(!thisForm)
			return;
		g_inputControlEventRegs.UnregisterAll<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void UpdateKeys(UInt8 * data)
	{
		/*static UInt8	oldState[0x100] = { 0 };

		if(!*g_skyrimVM) return;

		// ### this is off because it's a super temp hack

		BSFixedString		eventName("OnKeyDown");
		VMClassRegistry		* registry =	(*g_skyrimVM)->GetClassRegistry();

		for(UInt32 i = 0; i < 0x100; i++)
		{
			if(!oldState[i] && data[i])
			{
				RegisteredKeyMap::iterator	registeredHandles = g_regKeyMap.find(i);
				if(registeredHandles != g_regKeyMap.end())
				{
					for(HandleList::iterator iter = registeredHandles->second.begin(); iter != registeredHandles->second.end(); ++iter)
					{
						OneIntArg	args(i);

						registry->QueueEvent(*iter, &eventName, &args);
					}
				}
			}

			oldState[i] = data[i];
		}*/
	}

	void RegisterForMenu(TESForm * thisForm, BSFixedString menuName)
	{
		if(!thisForm || !menuName.data)
			return;

		g_menuOpenCloseRegs.Register<TESForm>(menuName, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForMenu(TESForm * thisForm, BSFixedString menuName)
	{
		if(!thisForm || !menuName.data)
			return;

		g_menuOpenCloseRegs.Unregister<TESForm>(menuName, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForAllMenus(TESForm * thisForm)
	{
		if(!thisForm)
			return;

		g_menuOpenCloseRegs.UnregisterAll<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void RegisterForModEvent(TESForm * thisForm, BSFixedString eventName, BSFixedString callbackName)
	{
		if(!thisForm || !eventName.data || !callbackName.data)
			return;

		ModCallbackParameters params;
		params.callbackName = callbackName;

		g_modCallbackRegs.Register<TESForm>(eventName, thisForm->GetFormType(), thisForm, &params);
	}

	void UnregisterForModEvent(TESForm * thisForm, BSFixedString eventName)
	{
		if(!thisForm || !eventName.data)
			return;

		g_modCallbackRegs.Unregister<TESForm>(eventName, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForAllModEvents(TESForm * thisForm)
	{
		g_modCallbackRegs.UnregisterAll<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void SendModEvent(TESForm * thisForm, BSFixedString eventName, BSFixedString strArg, float numArg)
	{
		if (!eventName.data)
			return;

		SKSEModCallbackEvent evn(eventName, strArg, numArg, thisForm);
		g_modCallbackEventDispatcher.SendEvent(&evn);
	}

	void RegisterForCameraState(TESForm * thisForm)
	{
		if(!thisForm)
			return;

		g_cameraEventRegs.Register<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void UnregisterForCameraState(TESForm * thisForm)
	{
		if(!thisForm)
			return;

		g_cameraEventRegs.Unregister<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void RegisterForCrosshairRef(TESForm * thisForm)
	{
		if(!thisForm)
			return;

		g_crosshairRefEventRegs.Register<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void UnregisterForCrosshairRef(TESForm * thisForm)
	{
		if(!thisForm)
			return;

		g_crosshairRefEventRegs.Unregister<TESForm>(thisForm->GetFormType(), thisForm);
	}

	void RegisterForActorAction(TESForm * thisForm, UInt32 actionType)
	{
		if(!thisForm)
			return;

		g_actionEventRegs.Register<TESForm>(actionType, thisForm->GetFormType(), thisForm);
	}

	void UnregisterForActorAction(TESForm * thisForm, UInt32 actionType)
	{
		if(!thisForm)
			return;

		g_actionEventRegs.Unregister<TESForm>(actionType, thisForm->GetFormType(), thisForm);
	}

	TESForm * TempClone(TESForm * thisForm)
	{
		TESForm	* result = NULL;

		if(thisForm)
		{
			IFormFactory	* factory = IFormFactory::GetFactoryForType(thisForm->formType);
			if(factory)
			{
				result = factory->Create();
				if(result)
				{
					result->Init();
					result->CopyFrom(thisForm);
					result->CopyFromEx(thisForm);
				}
				else
				{
					_ERROR("Form::TempClone: factory for type %02X failed", thisForm->formType);
				}
			}
			else
			{
				_MESSAGE("Form::TempClone: tried to clone form %08X (type %02X), no factory found", thisForm->formID, thisForm->formType);
			}
		}

		return result;
	}
}

#include "PapyrusVM.h"
#include "PapyrusNativeFunctions.h"

void papyrusForm::RegisterFuncs(VMClassRegistry* registry)
{
	registry->RegisterFunction(
		new NativeFunction0 <TESForm, UInt32> ("GetType", "Form", papyrusForm::GetType, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, BSFixedString> ("GetName", "Form", papyrusForm::GetName, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, BSFixedString> ("SetName", "Form", papyrusForm::SetName, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, float> ("GetWeight", "Form", papyrusForm::GetWeight, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, float> ("SetWeight", "Form", papyrusForm::SetWeight, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, UInt32> ("SetGoldValue", "Form", papyrusForm::SetGoldValue, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, UInt32> ("GetNumKeywords", "Form", papyrusForm::GetNumKeywords, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, BGSKeyword *, UInt32> ("GetNthKeyword", "Form", papyrusForm::GetNthKeyword, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, UInt32> ("RegisterForKey", "Form", papyrusForm::RegisterForKey, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, UInt32> ("UnregisterForKey", "Form", papyrusForm::UnregisterForKey, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("UnregisterForAllKeys", "Form", papyrusForm::UnregisterForAllKeys, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, BSFixedString> ("RegisterForMenu", "Form", papyrusForm::RegisterForMenu, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, BSFixedString> ("UnregisterForMenu", "Form", papyrusForm::UnregisterForMenu, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("UnregisterForAllMenus", "Form", papyrusForm::UnregisterForAllMenus, registry));

	registry->RegisterFunction(
		new NativeFunction2 <TESForm, void, BSFixedString, BSFixedString> ("RegisterForModEvent", "Form", papyrusForm::RegisterForModEvent, registry));

	registry->RegisterFunction(
		new NativeFunction3 <TESForm, void, BSFixedString, BSFixedString, float> ("SendModEvent", "Form", papyrusForm::SendModEvent, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, BSFixedString> ("UnregisterForModEvent", "Form", papyrusForm::UnregisterForModEvent, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("UnregisterForAllModEvents", "Form", papyrusForm::UnregisterForAllModEvents, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, TESForm *> ("TempClone", "Form", papyrusForm::TempClone, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, BSFixedString> ("RegisterForControl", "Form", papyrusForm::RegisterForControl, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, BSFixedString> ("UnregisterForControl", "Form", papyrusForm::UnregisterForControl, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("UnregisterForAllControls", "Form", papyrusForm::UnregisterForAllControls, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("RegisterForCameraState", "Form", papyrusForm::RegisterForCameraState, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("UnregisterForCameraState", "Form", papyrusForm::UnregisterForCameraState, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("RegisterForCrosshairRef", "Form", papyrusForm::RegisterForCrosshairRef, registry));

	registry->RegisterFunction(
		new NativeFunction0 <TESForm, void> ("UnregisterForCrosshairRef", "Form", papyrusForm::UnregisterForCrosshairRef, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, UInt32> ("RegisterForActorAction", "Form", papyrusForm::RegisterForActorAction, registry));

	registry->RegisterFunction(
		new NativeFunction1 <TESForm, void, UInt32> ("UnregisterForActorAction", "Form", papyrusForm::UnregisterForActorAction, registry));

	registry->SetFunctionFlags("Form", "RegisterForKey", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForKey", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForAllKeys", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "RegisterForMenu", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForMenu", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForAllMenus", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "RegisterForModEvent", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "SendModEvent", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForAllModEvents", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "RegisterForControl", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForControl", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForAllControls", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "RegisterForCameraState", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForCameraState", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "RegisterForCrosshairRef", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForCrosshairRef", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "RegisterForActorAction", VMClassRegistry::kFunctionFlag_NoWait);
	registry->SetFunctionFlags("Form", "UnregisterForActorAction", VMClassRegistry::kFunctionFlag_NoWait);
}


text:
package brooklyn.entity.trait;

import java.util.NoSuchElementException;

import brooklyn.entity.annotation.Effector;
import brooklyn.entity.annotation.EffectorParam;
import brooklyn.entity.basic.MethodEffector;
import brooklyn.entity.group.StopFailedRuntimeException;

public interface MemberReplaceable {

    MethodEffector<String> REPLACE_MEMBER = new MethodEffector<String>(MemberReplaceable.class, "replaceMember");

    /**
     * Replaces the entity with the given ID, if it is a member.
     * <p>
     * First adds a new member, then removes this one.
     *
     * @param memberId entity id of a member to be replaced
     * @return the id of the new entity
     * @throws NoSuchElementException If entity cannot be resolved, or it is not a member
     * @throws StopFailedRuntimeException If stop failed, after successfully starting replacement
     */
    @Effector(description="Replaces the entity with the given ID, if it is a member; first adds a new member, then removes this one. "+
            "Returns id of the new entity; or throws exception if couldn't be replaced.")
    String replaceMember(@EffectorParam(name="memberId", description="The entity id of a member to be replaced") String memberId);
}


text:
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo.Domain.Configuration.Country.Validators
{
    public class Destroy : AbstractValidator<Commands.Destroy>
    {
        public Destroy()
        {
            RuleFor(x => x.CountryId).NotEmpty();
        }
    }
}


text:
<?php

declare (strict_types=1);
namespace Rector\CodeQuality\Rector\FuncCall;

use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Name;
use Rector\Core\Rector\AbstractRector;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
/**
 * @see \Rector\Tests\CodeQuality\Rector\FuncCall\InArrayAndArrayKeysToArrayKeyExistsRector\InArrayAndArrayKeysToArrayKeyExistsRectorTest
 */
final class InArrayAndArrayKeysToArrayKeyExistsRector extends \Rector\Core\Rector\AbstractRector
{
    public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
    {
        return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Simplify `in_array` and `array_keys` functions combination into `array_key_exists` when `array_keys` has one argument only', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample('in_array("key", array_keys($array), true);', 'array_key_exists("key", $array);')]);
    }
    /**
     * @return array<class-string<Node>>
     */
    public function getNodeTypes() : array
    {
        return [\PhpParser\Node\Expr\FuncCall::class];
    }
    /**
     * @param FuncCall $node
     */
    public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
    {
        if (!$this->isName($node, 'in_array')) {
            return null;
        }
        $secondArgument = $node->args[1]->value;
        if (!$secondArgument instanceof \PhpParser\Node\Expr\FuncCall) {
            return null;
        }
        if (!$this->isName($secondArgument, 'array_keys')) {
            return null;
        }
        if (\count($secondArgument->args) > 1) {
            return null;
        }
        $keyArg = $node->args[0];
        $arrayArg = $node->args[1];
        /** @var FuncCall $innerFuncCallNode */
        $innerFuncCallNode = $arrayArg->value;
        $arrayArg = $innerFuncCallNode->args[0];
        $node->name = new \PhpParser\Node\Name('array_key_exists');
        $node->args = [$keyArg, $arrayArg];
        return $node;
    }
}


text:
/* Generated SBE (Simple Binary Encoding) message codec */
using System;
using System.Text;
using System.Collections.Generic;
using Adaptive.Agrona;

namespace Adaptive.Cluster.Codecs {

public class RequestVoteEncoder
{
    public const ushort BLOCK_LENGTH = 28;
    public const ushort TEMPLATE_ID = 51;
    public const ushort SCHEMA_ID = 111;
    public const ushort SCHEMA_VERSION = 8;

    private RequestVoteEncoder _parentMessage;
    private IMutableDirectBuffer _buffer;
    protected int _offset;
    protected int _limit;

    public RequestVoteEncoder()
    {
        _parentMessage = this;
    }

    public ushort SbeBlockLength()
    {
        return BLOCK_LENGTH;
    }

    public ushort SbeTemplateId()
    {
        return TEMPLATE_ID;
    }

    public ushort SbeSchemaId()
    {
        return SCHEMA_ID;
    }

    public ushort SbeSchemaVersion()
    {
        return SCHEMA_VERSION;
    }

    public string SbeSemanticType()
    {
        return "";
    }

    public IMutableDirectBuffer Buffer()
    {
        return _buffer;
    }

    public int Offset()
    {
        return _offset;
    }

    public RequestVoteEncoder Wrap(IMutableDirectBuffer buffer, int offset)
    {
        this._buffer = buffer;
        this._offset = offset;
        Limit(offset + BLOCK_LENGTH);

        return this;
    }

    public RequestVoteEncoder WrapAndApplyHeader(
        IMutableDirectBuffer buffer, int offset, MessageHeaderEncoder headerEncoder)
    {
        headerEncoder
            .Wrap(buffer, offset)
            .BlockLength(BLOCK_LENGTH)
            .TemplateId(TEMPLATE_ID)
            .SchemaId(SCHEMA_ID)
            .Version(SCHEMA_VERSION);

        return Wrap(buffer, offset + MessageHeaderEncoder.ENCODED_LENGTH);
    }

    public int EncodedLength()
    {
        return _limit - _offset;
    }

    public int Limit()
    {
        return _limit;
    }

    public void Limit(int limit)
    {
        this._limit = limit;
    }

    public static int LogLeadershipTermIdEncodingOffset()
    {
        return 0;
    }

    public static int LogLeadershipTermIdEncodingLength()
    {
        return 8;
    }

    public static long LogLeadershipTermIdNullValue()
    {
        return -9223372036854775808L;
    }

    public static long LogLeadershipTermIdMinValue()
    {
        return -9223372036854775807L;
    }

    public static long LogLeadershipTermIdMaxValue()
    {
        return 9223372036854775807L;
    }

    public RequestVoteEncoder LogLeadershipTermId(long value)
    {
        _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
        return this;
    }

    public static int LogPositionEncodingOffset()
    {
        return 8;
    }

    public static int LogPositionEncodingLength()
    {
        return 8;
    }

    public static long LogPositionNullValue()
    {
        return -9223372036854775808L;
    }

    public static long LogPositionMinValue()
    {
        return -9223372036854775807L;
    }

    public static long LogPositionMaxValue()
    {
        return 9223372036854775807L;
    }

    public RequestVoteEncoder LogPosition(long value)
    {
        _buffer.PutLong(_offset + 8, value, ByteOrder.LittleEndian);
        return this;
    }

    public static int CandidateTermIdEncodingOffset()
    {
        return 16;
    }

    public static int CandidateTermIdEncodingLength()
    {
        return 8;
    }

    public static long CandidateTermIdNullValue()
    {
        return -9223372036854775808L;
    }

    public static long CandidateTermIdMinValue()
    {
        return -9223372036854775807L;
    }

    public static long CandidateTermIdMaxValue()
    {
        return 9223372036854775807L;
    }

    public RequestVoteEncoder CandidateTermId(long value)
    {
        _buffer.PutLong(_offset + 16, value, ByteOrder.LittleEndian);
        return this;
    }

    public static int CandidateMemberIdEncodingOffset()
    {
        return 24;
    }

    public static int CandidateMemberIdEncodingLength()
    {
        return 4;
    }

    public static int CandidateMemberIdNullValue()
    {
        return -2147483648;
    }

    public static int CandidateMemberIdMinValue()
    {
        return -2147483647;
    }

    public static int CandidateMemberIdMaxValue()
    {
        return 2147483647;
    }

    public RequestVoteEncoder CandidateMemberId(int value)
    {
        _buffer.PutInt(_offset + 24, value, ByteOrder.LittleEndian);
        return this;
    }

    public override string ToString()
    {
        return AppendTo(new StringBuilder(100)).ToString();
    }

    public StringBuilder AppendTo(StringBuilder builder)
    {
        RequestVoteDecoder writer = new RequestVoteDecoder();
        writer.Wrap(_buffer, _offset, BLOCK_LENGTH, SCHEMA_VERSION);

        return writer.AppendTo(builder);
    }
}
}


text:
typedef enum branch_side {

	LEFT,
	RIGHT

} branch_side;

typedef enum branch_player {
	P1,
	P2
} branch_player;

typedef struct branch_t {

	float x;
	float y; //should move in conjunction with LOG_SPEED
	branch_side side;
	branch_player player;

} branch_t;

void branch_update(branch_t* branch);
void branch_draw(branch_t* branch, sprite_t* sprite);

#endif //_BRANCH_H_


text:
<?php
/**
 * @author OnTheGo Systems
 */
class WPML_Support_Info {
	/** @var wpdb */
	private $wpdb;

	/**
	 * @param wpdb $wpdb
	 */
	public function __construct( wpdb $wpdb ) {
		$this->wpdb = $wpdb;
	}

	public function is_suhosin_active() {
		return extension_loaded( 'suhosin' );
	}

	public function eval_disabled_by_suhosin() {
		return (bool) ini_get( 'suhosin.executor.disable_eval' );
	}

	public function get_max_execution_time() {
		return ini_get( 'max_execution_time' );
	}

	public function get_max_input_vars() {
		return ini_get( 'max_input_vars' );
	}

	public function get_php_memory_limit() {
		return ini_get('memory_limit');
	}

	public function get_memory_usage() {
		return $this->format_size_units( memory_get_usage() );
	}

	public function get_php_version() {
		return PHP_VERSION;
	}

	public function get_wp_memory_limit() {
		return constant('WP_MEMORY_LIMIT');
	}

	public function get_wp_max_memory_limit() {
		return constant('WP_MAX_MEMORY_LIMIT');
	}

	public function get_wp_multisite() {
		return is_multisite();
	}

	public function get_wp_version() {
		return $GLOBALS['wp_version'];
	}

	public function is_memory_less_than( $reference, $memory ) {
		if ( (int) $reference === - 1 ) {
			return false;
		}

		$reference_in_bytes = $this->return_bytes( $reference );
		$memory_in_bytes    = $this->return_bytes( $memory );

		return $memory_in_bytes < $reference_in_bytes;
	}

	public function is_version_less_than( $reference, $version ) {
		return version_compare( $version, $reference, '<' );
	}

	public function is_utf8mb4_charset_supported() {
		return $this->wpdb->has_cap( 'utf8mb4' );
	}

	private function return_bytes( $val ) {
		$val  = trim( $val );

		$exponents = array(
			'k' => 1,
			'm' => 2,
			'g' => 3,
		);

		$last = strtolower( substr( $val, - 1 ) );

		if ( ! is_numeric( $last ) ) {
			$val = (int) substr( $val, 0, - 1 );

			if ( array_key_exists( $last, $exponents ) ) {
				$val *= pow( 1024, $exponents[ $last ] );
			}
		} else {
			$val = (int) $val;
		}

		return $val;
	}

	private function format_size_units( $bytes ) {
		if ( $bytes >= 1073741824 ) {
			$bytes = number_format( $bytes / 1073741824, 2 ) . ' GB';
		} elseif ( $bytes >= 1048576 ) {
			$bytes = number_format( $bytes / 1048576, 2 ) . ' MB';
		} elseif ( $bytes >= 1024 ) {
			$bytes = number_format( $bytes / 1024, 2 ) . ' KB';
		} elseif ( $bytes > 1 ) {
			$bytes .= ' bytes';
		} elseif ( $bytes === 1 ) {
			$bytes .= ' byte';
		} else {
			$bytes = '0 bytes';
		}

		return $bytes;
	}
}