text:
package io.github.privacystreams.device;

import android.Manifest;
import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.util.Log;

import io.github.privacystreams.core.UQI;
import io.github.privacystreams.core.PStreamProvider;

import static android.content.ContentValues.TAG;

/**
 * Provide a stream of current visible bluetooth device list.
 */

class BluetoothDeviceListProvider extends PStreamProvider {

    // Sets up the permission requirement
    BluetoothDeviceListProvider() {
        this.addRequiredPermissions(Manifest.permission.BLUETOOTH);
        this.addRequiredPermissions(Manifest.permission.BLUETOOTH_ADMIN);
    }

    @Override
    protected void provide() {
        BluetoothAdapter BTAdapter = BluetoothAdapter.getDefaultAdapter();               // Set up the adaptor
        if (BTAdapter == null || !BTAdapter.isEnabled()) {
            this.finish();
            return;
        }
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction(android.bluetooth.BluetoothDevice.ACTION_FOUND);
        intentFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED);
        intentFilter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
        getContext().registerReceiver(mReceiver, intentFilter);
        BTAdapter.startDiscovery();
    }

    private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            String action = intent.getAction();
            // When discovery finds a device
            if (android.bluetooth.BluetoothDevice.ACTION_FOUND.equals(action)) {
                // Get the BluetoothDevice object from the Intent
                android.bluetooth.BluetoothDevice device = intent.getParcelableExtra(android.bluetooth.BluetoothDevice.EXTRA_DEVICE);
                // return the new bluetooth device
                Log.e("bt device",device.getAddress());
                BluetoothDeviceListProvider.this.output(new BluetoothDevice(device));
            }
            else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action))
            {
                Log.e(TAG,"Entered the Finished ");
                BluetoothDeviceListProvider.this.finish();
            }

        }
    };

    @Override
    protected void onCancel(UQI uqi) {
        super.onCancel(uqi);
        try {
            getContext().unregisterReceiver(mReceiver);
        }
        catch (Exception ignored) {
        }
    }
}


text:
file(REMOVE_RECURSE
  "CMakeFiles/install-LLVMNaClBitAnalysis"
)

# Per-language clean rules from dependency scanning.
foreach(lang )
  include(CMakeFiles/install-LLVMNaClBitAnalysis.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

redpajama_set_name: RedPajamaGithub


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package practice;

/**
 *
 * @author mars
 */
public class Patterns {

    public static void main(String[] args) {
        for (int i = 1; i <= 4; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}


text:
package org.apache.cassandra.streaming;

import java.net.InetAddress;
import java.util.*;
import java.io.IOException;
import java.io.File;
import java.io.IOError;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

import org.apache.log4j.Logger;
import org.apache.commons.lang.StringUtils;

import org.apache.cassandra.dht.Range;
import org.apache.cassandra.db.Table;
import org.apache.cassandra.io.SSTable;
import org.apache.cassandra.io.SSTableReader;
import org.apache.cassandra.net.Message;
import org.apache.cassandra.net.MessagingService;

/**
 * This class handles streaming data from one node to another.
 *
 * For bootstrap,
 *  1. BOOTSTRAP_TOKEN asks the most-loaded node what Token to use to split its Range in two.
 *  2. STREAM_REQUEST tells source nodes to send us the necessary Ranges
 *  3. source nodes send STREAM_INITIATE to us to say "get ready to receive data" [if there is data to send]
 *  4. when we have everything set up to receive the data, we send STREAM_INITIATE_DONE back to the source nodes and they start streaming
 *  5. when streaming is complete, we send STREAM_FINISHED to the source so it can clean up on its end
 *
 * For unbootstrap, the leaving node starts with step 3 (1 and 2 are skipped entirely).  This is why
 * STREAM_INITIATE is a separate verb, rather than just a reply to STREAM_REQUEST; the REQUEST is optional.
 */
public class StreamOut
{
    private static Logger logger = Logger.getLogger(StreamOut.class);

    static String TABLE_NAME = "STREAMING-TABLE-NAME";

    /**
     * Split out files for all tables on disk locally for each range and then stream them to the target endpoint.
    */
    public static void transferRanges(InetAddress target, String tableName, Collection<Range> ranges, Runnable callback)
    {
        assert ranges.size() > 0;

        logger.debug("Beginning transfer process to " + target + " for ranges " + StringUtils.join(ranges, ", "));

        /*
         * (1) dump all the memtables to disk.
         * (2) anticompaction -- split out the keys in the range specified
         * (3) transfer the data.
        */
        try
        {
            Table table = Table.open(tableName);
            logger.info("Flushing memtables for " + tableName + "...");
            for (Future f : table.flush())
            {
                try
                {
                    f.get();
                }
                catch (InterruptedException e)
                {
                    throw new RuntimeException(e);
                }
                catch (ExecutionException e)
                {
                    throw new RuntimeException(e);
                }
            }
            logger.info("Performing anticompaction ...");
            /* Get the list of files that need to be streamed */
            transferSSTables(target, table.forceAntiCompaction(ranges, target), tableName); // SSTR GC deletes the file when done
        }
        catch (IOException e)
        {
            throw new IOError(e);
        }
        finally
        {
            StreamOutManager.remove(target);
        }
        if (callback != null)
            callback.run();
    }

    /**
     * Transfers a group of sstables from a single table to the target endpoint
     * and then marks them as ready for local deletion.
     */
    public static void transferSSTables(InetAddress target, List<SSTableReader> sstables, String table) throws IOException
    {
        PendingFile[] pendingFiles = new PendingFile[SSTable.FILES_ON_DISK * sstables.size()];
        int i = 0;
        for (SSTableReader sstable : sstables)
        {
            for (String filename : sstable.getAllFilenames())
            {
                File file = new File(filename);
                pendingFiles[i++] = new PendingFile(file.getAbsolutePath(), file.length(), table);
            }
        }
        logger.info("Stream context metadata " + StringUtils.join(pendingFiles, ", " + " " + sstables.size() + " sstables."));
        StreamOutManager.get(target).addFilesToStream(pendingFiles);
        StreamInitiateMessage biMessage = new StreamInitiateMessage(pendingFiles);
        Message message = StreamInitiateMessage.makeStreamInitiateMessage(biMessage);
        message.setHeader(StreamOut.TABLE_NAME, table.getBytes());
        logger.info("Sending a stream initiate message to " + target + " ...");
        MessagingService.instance.sendOneWay(message, target);

        if (pendingFiles.length > 0)
        {
            logger.info("Waiting for transfer to " + target + " to complete");
            StreamOutManager.get(target).waitForStreamCompletion();
            // todo: it would be good if there were a dafe way to remove the StreamManager for target.
            // (StreamManager will delete the streamed file on completion.)
            logger.info("Done with transfer to " + target);
        }
    }

}


text:
\hypertarget{dir_c8da8e49bcd350979e922c896ff72385}{\section{Occluded\+Library/utilities/files Directory Reference}
\label{dir_c8da8e49bcd350979e922c896ff72385}\index{Occluded\+Library/utilities/files Directory Reference@{Occluded\+Library/utilities/files Directory Reference}}
}
\subsection*{Files}
\begin{DoxyCompactItemize}
\item
file {\bfseries file\+\_\+reader.\+cpp}
\item
file {\bfseries file\+\_\+reader.\+h}
\end{DoxyCompactItemize}


text:
package com.wrapper.spotify.exceptions;

public class WebApiException extends Exception {

  public WebApiException(String message) {
    super(message);
  }

  public WebApiException() {
    super();
  }

}


text:
<!doctype html>

    <title>
        {% block title %}{{ page_title }}{% endblock %}
    </title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="apple-touch-icon" sizes="57x57" href="/static/favicon/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/static/favicon/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/static/favicon/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/static/favicon/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/static/favicon/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/static/favicon/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/static/favicon/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/static/favicon/apple-touch-icon-152x152.png">
    <link rel="apple-touch-icon" sizes="180x180" href="/static/favicon/apple-touch-icon-180x180.png">
    <link rel="icon" type="image/png" href="/static/favicon/favicon-32x32.png" sizes="32x32">
    <link rel="icon" type="image/png" href="/static/favicon/favicon-194x194.png" sizes="194x194">
    <link rel="icon" type="image/png" href="/static/favicon/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/static/favicon/android-chrome-192x192.png" sizes="192x192">
    <link rel="icon" type="image/png" href="/static/favicon/favicon-16x16.png" sizes="16x16">
    <link rel="manifest" href="/static/favicon/manifest.json">
    <link rel="shortcut icon" href="/static/favicon/favicon.ico">
    <meta name="msapplication-TileColor" content="#2d89ef">
    <meta name="msapplication-TileImage" content="/static/favicon/mstile-144x144.png">
    <meta name="msapplication-config" content="/static/favicon/browserconfig.xml">
    <meta name="theme-color" content="#ffffff">

    <link rel="shortcut icon" href="{{ url_for('static', filename='favicon-%d.png' % config.CACHE_BUSTER) }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style-%d.css' % config.CACHE_BUSTER) }}">
    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="article" />
    <meta property="og:title" content="{{ config.SITE_NAME }}" />
    <meta property="og:description" content="{{ page_title }}" />
    <meta property="og:url" content="{{ request.url }}" />
    <meta property="og:image" content="{{ og_photo_url }}"/>
    <meta property="og:site_name" content="{{ config.SITE_NAME }}" />

    {% block head %}{% endblock %}

                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
                    Toggle navigation

                </button>
                {{ config.SITE_NAME }}

                    {% autoescape false %}
                        {% if current_user.is_authenticated() %}
                            {{ navbar_link('index_home', 'Dashboard', icon='home') }}
                            {{ navbar_link('users_change_password', 'Change your Password', icon='lock', login_required=true) }}
                            {% if current_user.role == "admin" %}
                                {{ navbar_link('users_list', 'Users', icon='users', login_required=true) }}
                            {% endif %}
                        {% endif %}
                    {% endautoescape %}

                    {% autoescape false %}
                        {% if not current_user.is_authenticated() %}
                            {{ navbar_link('users_login', 'Sign In', icon='user') }}
                        {% else %}
                            {{ navbar_link('users_logout', 'Sign Out', icon='user', login_required=true) }}
                        {% endif %}
                    {% endautoescape %}

        {% with messages = get_flashed_messages(with_categories=True) %}
            {% if messages %}
                {% for category, message in messages %}

                        <button type="button" class="close" data-dismiss="alert">×</button>
                        {{ message }}

                {% endfor %}
            {% endif %}
        {% endwith %}

        {% block body %}{% endblock %}

    {% block javascript%}{% endblock %}


text:
from __future__ import unicode_literals

from django.db import migrations, models

def add_data_analysis_levels(apps, schema_editor):
    DataAnalysisLevel = apps.get_model('workshops', 'DataAnalysisLevel')
    L = [
        'Little to no prior computational experience',
        'Some experience with data analysis in programming languages like R,'
            ' SAS, Matlab or Python',
        'Experienced in data analysis, but need to know how to work with '
            'different data types or bigger data or computer cluster',
    ]
    for name in L:
        DataAnalysisLevel.objects.create(name=name)

class Migration(migrations.Migration):

    dependencies = [
        ('workshops', '0043_auto_20150903_1508'),
    ]

    operations = [
        migrations.RunPython(add_data_analysis_levels),
    ]


text:
import java.lang.Thread;

// we import the vtk wrapped classes forst
import vtk.*;

// then we define our class
public class Cone4 {
  // in the static contructor we load in the native code
  // The libraries must be in your path to work
  static {
    System.loadLibrary("vtkCommonJava");
    System.loadLibrary("vtkFilteringJava");
    System.loadLibrary("vtkIOJava");
    System.loadLibrary("vtkImagingJava");
    System.loadLibrary("vtkGraphicsJava");
    System.loadLibrary("vtkRenderingJava");
  }

  // now the main program
  public static void main (String []args) throws Exception {
    //
    // Next we create an instance of vtkConeSource and set some of its
    // properties. The instance of vtkConeSource "cone" is part of a
    // visualization pipeline (it is a source process object); it produces
    // data (output type is vtkPolyData) which other filters may process.
    //
    vtkConeSource cone = new vtkConeSource();
    cone.SetHeight( 3.0 );
    cone.SetRadius( 1.0 );
    cone.SetResolution( 10 );

    //
    // In this example we terminate the pipeline with a mapper process object.
    // (Intermediate filters such as vtkShrinkPolyData could be inserted in
    // between the source and the mapper.)  We create an instance of
    // vtkPolyDataMapper to map the polygonal data into graphics primitives. We
    // connect the output of the cone souece to the input of this mapper.
    //
    vtkPolyDataMapper coneMapper = new vtkPolyDataMapper();
    coneMapper.SetInputConnection(cone.GetOutputPort());

    //
    // Create an actor to represent the first cone. The actor's properties are
    // modified to give it different surface properties. By default, an actor
    // is create with a property so the GetProperty() method can be used.
    //
    vtkActor coneActor = new vtkActor();
    coneActor.SetMapper(coneMapper);
    coneActor.GetProperty().SetColor(0.2, 0.63, 0.79);
    coneActor.GetProperty().SetDiffuse(0.7);
    coneActor.GetProperty().SetSpecular(0.4);
    coneActor.GetProperty().SetSpecularPower(20);

    //
    // Create a property and directly manipulate it. Assign it to the
    // second actor.
    //
    vtkProperty property = new vtkProperty();
    property.SetColor(1.0, 0.3882, 0.2784);
    property.SetDiffuse(0.7);
    property.SetSpecular(0.4);
    property.SetSpecularPower(20);

    //
    // Create a second actor and a property. The property is directly
    // manipulated and then assigned to the actor. In this way, a single
    // property can be shared among many actors. Note also that we use the
    // same mapper as the first actor did. This way we avoid duplicating
    // geometry, which may save lots of memory if the geoemtry is large.
    vtkActor coneActor2 = new vtkActor();
    coneActor2.SetMapper(coneMapper);
    coneActor2.GetProperty().SetColor(0.2, 0.63, 0.79);
    coneActor2.SetProperty(property);
    coneActor2.SetPosition(0, 2, 0);

    //
    // Create the Renderer and assign actors to it. A renderer is like a
    // viewport. It is part or all of a window on the screen and it is
    // responsible for drawing the actors it has.  We also set the
    // background color here.
    //
    vtkRenderer ren1 = new vtkRenderer();
    ren1.AddActor(coneActor);
    ren1.AddActor(coneActor2);
    ren1.SetBackground(0.1, 0.2, 0.4);

    //
    // Finally we create the render window which will show up on the screen.
    // We add our two renderers into the render window using AddRenderer. We also
    // set the size to be 600 pixels by 300.
    //
    vtkRenderWindow renWin = new vtkRenderWindow();
    renWin.AddRenderer( ren1 );
    renWin.SetSize(300, 300);

    //
    // Make one camera view 90 degrees from other.
    //
    ren1.ResetCamera();
    ren1.GetActiveCamera().Azimuth(90);

    //
    // now we loop over 360 degreeees and render the cone each time
    //
    int i;
    for (i = 0; i < 360; ++i)
      {
      Thread.sleep(10);
      // render the image
      renWin.Render();
      // rotate the active camera by one degree
      ren1.GetActiveCamera().Azimuth( 1 );
      }
    }
}


text:
import unittest
import random
import sys
import pymorton as pm
from nose.tools import assert_raises

class TestOrdinalHashing(unittest.TestCase):

    def test_hashing_2d_valid(self):
        assert pm.interleave(100, 50) == pm.interleave2(100, 50)

    def test_hashing_3d_valid(self):
        assert pm.interleave(10, 50, 40) == pm.interleave3(10, 50, 40)

    def test_hash_reversability_2d_valid(self):
        assert (100, 30) == pm.deinterleave2(pm.interleave(100, 30))
        if getattr(sys, 'maxint', 0) and sys.maxint <= 2 ** 31 - 1:
            max_v = 0x0fff
        else:
            max_v = 0x0fffffff
        for i in range(100):
            p1 = (random.randint(0, max_v), random.randint(0, max_v))
            print(p1, pm.deinterleave2(pm.interleave(*p1)))
            assert p1 == pm.deinterleave2(pm.interleave(*p1))

    def test_hash_reversability_3d_valid(self):
        assert pm.deinterleave3(pm.interleave(100, 30, 50)) == (100, 30, 50)
        if getattr(sys, 'maxint', 0) and sys.maxint <= 2 ** 31 - 1:
            max_v = 0xff
        else:
            max_v = 0xffff
        for i in range(100):
            p1 = (random.randint(0, max_v), random.randint(0, max_v), random.randint(0, max_v))
            print(p1, pm.deinterleave3(pm.interleave(*p1)))
            assert p1 == pm.deinterleave3(pm.interleave(*p1))

    def test_hash_ordinality_2d(self):
        assert pm.interleave(10, 25) < pm.interleave(10, 50)

    def test_hash_ordinality_3d(self):
        assert pm.interleave(10, 25, 50) < pm.interleave(10, 25, 100)

    def test_interleave2_input_length_invalid(self):
        assert_raises(ValueError, pm.interleave2, 74)

    def test_interleave2_input_type_invalid(self):
        assert_raises(ValueError, pm.interleave2, 78, "73")

    def test_interleave3_input_length_invalid(self):
        assert_raises(ValueError, pm.interleave3, 78, 73)

    def test_interleave3_input_type_invalid(self):
        assert_raises(ValueError, pm.interleave3, 78, 77, "73")

    def test_deinterleave2_input_type_invalid(self):
        assert_raises(ValueError, pm.deinterleave2, "73")

    def test_deinterleave3_input_type_invalid(self):
        assert_raises(ValueError, pm.deinterleave3, "73")

    def test_interleave_input_length_invalid(self):
        assert_raises(ValueError, pm.interleave, 77)

class TestGeoHashing(unittest.TestCase):

    def test_standard_geohashing(self):
        lat, lng = 40.712014, -74.008164
        latlng_morton = pm.interleave_latlng(lat, lng)
        assert '03023211232311330231120312032231' == latlng_morton
        assert pm.deinterleave_latlng(latlng_morton) == (40.712014, -74.008164)

    def test_invalid_positive_longitude(self):
        lat, lng = 40.712013, 190.008164
        assert pm.deinterleave_latlng(pm.interleave_latlng(lat, lng)) == (lat, round(lng - 180.0, 6))

    def test_invalid_negative_longitude(self):
        lat, lng = -40.712013, -190.008164
        assert pm.deinterleave_latlng(pm.interleave_latlng(lat, lng)) == (lat, round(lng + 180.0, 6))

    def test_invalid_positive_latitude(self):
        lat, lng = 220.712013, -74.008164
        assert pm.deinterleave_latlng(pm.interleave_latlng(lat, lng)) == (round(lat - 180.0, 6), lng)

    def test_invalid_negative_latitude(self):
        lat, lng = -220.712013, -74.008164
        assert pm.deinterleave_latlng(pm.interleave_latlng(lat, lng)) == (round(lat + 180.0, 6), lng)

    def test_non_float_input_interleave_latlng(self):
        lat, lng = -220.712013, "-74.008164"
        assert_raises(ValueError, pm.interleave_latlng, lat, lng)

    def test_geohash_ordinality(self):
        assert pm.interleave_latlng(-40.723471, -73.985361) < pm.interleave_latlng(-40.523471, -73.785361)

if __name__ == '__main__':
    unittest.main()


text:
namespace Google.Cloud.BareMetalSolution.V2.Snippets
{
    // [START baremetalsolution_v2_generated_BareMetalSolution_GetInstance_async_flattened_resourceNames]
    using Google.Cloud.BareMetalSolution.V2;
    using System.Threading.Tasks;

    public sealed partial class GeneratedBareMetalSolutionClientSnippets
    {
        /// <summary>Snippet for GetInstanceAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public async Task GetInstanceResourceNamesAsync()
        {
            // Create client
            BareMetalSolutionClient bareMetalSolutionClient = await BareMetalSolutionClient.CreateAsync();
            // Initialize request argument(s)
            InstanceName name = InstanceName.FromProjectLocationInstance("[PROJECT]", "[LOCATION]", "[INSTANCE]");
            // Make the request
            Instance response = await bareMetalSolutionClient.GetInstanceAsync(name);
        }
    }
    // [END baremetalsolution_v2_generated_BareMetalSolution_GetInstance_async_flattened_resourceNames]
}


text:
#include <assert.h>
#include <stdio.h>
#include <float.h>
#include "easy-library.h"

int main(int argc, char **argv)
{
  const uint32_t maxTries = 50000;
  randomInit(0);
  for (int i=0; i< maxTries; ++i){
    assert(probabilityFromZeroToTenThousand() <= 10000);
    assert(1 - probabilityFromZeroToOne() > DBL_EPSILON );
  }

  return 0;
}


text:
<?php

namespace Zephir\Cache;

use Zephir\Call;
use Zephir\ClassMethod;
use Zephir\Variable;
use Zephir\CompilationContext;

/**
 * MethodCache
 *
 * Calls in Zephir implement monomorphic and polimorphic caches to
 * improve performance. Method/Functions lookups are cached in a standard
 * first-level method lookup cache.
 *
 * The concept of inline caching is based on the empirical observation
 * that the objects that occur at a particular call site are often of the same type
 * Internal functions are considered monomorphic since they do not change across execution.
 * Final and private methods are also monomorphic because of their own nature.
 * Due to the Ahead-Of-Time compilation approach provided by Zephir, is not possible
 * to implement inline caches, however is possible to add barriers/guards to
 * take advantage of profile guided optimizations (PGO) and branch prediction.
 *
 * This implementation is based on the work of Hölzle, Chambers and Ungar [1].
 *
 * [1] http://www.cs.ucsb.edu/~urs/oocsb/papers/ecoop91.pdf
 */
class MethodCache
{
    protected $cache = array();

    protected $gatherer;

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

    /**
     * Retrieves/Creates a function cache for a method call
     *
     * @param CompilationContext $compilationContext
     * @param ClassMethod $method
     * @param Variable $caller
     */
    public function get(CompilationContext $compilationContext, $method, $caller)
    {
        if (!is_object($method)) {
            /**
             * Try to generate a cache based on the fact the variable is not modified within the loop block
             */
            if ($compilationContext->insideCycle && !$caller->isTemporal()) {
                if (count($compilationContext->cycleBlocks) && $caller->getType() == 'variable') {
                    $currentBlock = $compilationContext->cycleBlocks[count($compilationContext->cycleBlocks) - 1];

                    if ($currentBlock->getMutateGatherer(true)->getNumberOfMutations($caller->getName()) == 0) {
                        $functionCache = $compilationContext->symbolTable->getTempVariableForWrite('zephir_fcall_cache_entry', $compilationContext);
                        $functionCache->setMustInitNull(true);
                        $functionCache->setReusable(false);

                        return '&' . $functionCache->getName();
                    }
                }
            }

            return 'NULL';
        }

        if (!($method instanceof \ReflectionMethod)) {
            /**
             * Avoid generate caches for external classes
             */
            if ($method->getClassDefinition()->isExternal()) {
                return 'NULL';
            }

            $completeName = $method->getClassDefinition()->getCompleteName();
            if (isset($this->cache[$completeName][$method->getName()])) {
                return '&' . $this->cache[$completeName][$method->getName()]->getName();
            }

            if ($method->getClassDefinition()->isInterface()) {
                return 'NULL';
            }
        }

        if (!$compilationContext->insideCycle) {
            if (!($method instanceof \ReflectionMethod)) {
                if (!$method->isPrivate() && !$method->isFinal() && !$method->getClassDefinition()->isFinal()) {
                    $gatherer = $this->gatherer;
                    if (is_object($gatherer)) {
                        $number = $gatherer->getNumberOfMethodCalls($method->getClassDefinition()->getCompleteName(), $method->getName());
                        if ($number <= 1) {
                            return 'NULL';
                        }
                    } else {
                        return 'NULL';
                    }
                }
            } else {
                return 'NULL';
            }
        }

        if (!($method instanceof \ReflectionMethod) && ($method->isPrivate() || $method->isFinal() || $method->getClassDefinition()->isFinal())) {
            $functionCache = $compilationContext->symbolTable->getTempVariableForWrite('static_zephir_fcall_cache_entry', $compilationContext);
        } else {
            $functionCache = $compilationContext->symbolTable->getTempVariableForWrite('zephir_fcall_cache_entry', $compilationContext);
        }

        $functionCache->setMustInitNull(true);
        $functionCache->setReusable(false);

        if (!($method instanceof \ReflectionMethod)) {
            $this->cache[$completeName][$method->getName()] = $functionCache;
        }

        return '&' . $functionCache->getName();
    }
}


text:
module OrigenTesters
  class IGXLBasedTester
    class Parser
      class PatternSet
        class Pattern
          attr_accessor :parser

          ATTRS = %w(pattern_set file_name start_label stop_label comment)

          ALIASES = {
            pattern: :file_name,
            file:    :file_name,
            name:    :file_name
          }

          # Generate readers for all attributes and their aliases
          ATTRS.each do |attr|
            attr_reader attr.to_sym
          end

          ALIASES.each do |_alias, attr|
            define_method("#{_alias}") do
              send(attr)
            end
          end

          def initialize(line)
            @line = line
            parse
            if valid?
              ATTRS.each_with_index do |attr, i|
                instance_variable_set("@#{attr}", components[i + 1])
              end
            end
          end

          def parse
            @components = @line.split("\t") unless @line.strip.empty?
          end

          def valid?
            components[1] && !components[1].empty? && components[1] != 'Pattern Set' &&
              components[2] && !components[2].empty?
          end

          def components
            @components ||= []
          end
        end

        def initialize(line, options = {})
          @parser = options[:parser]
          p = add_pattern_line(line)
          @name = p.pattern_set if p.valid?
        end

        def inspect  # :nodoc:
          "<PatternSet: #{name}>"
        end

        def name
          @name
        end

        def patterns
          @patterns ||= []
        end

        def self.extract_name(line)
          new(line).name
        end

        def add_pattern_line(line)
          p = Pattern.new(line)
          patterns << Pattern.new(line) if p.valid?
          p
        end

        def valid?
          patterns.all?(&:valid?)
        end

        # Returns an array containing all pattern names contained in this
        # pattern set
        def pattern_names
          # This removes the path and extensions
          patterns.map { |pat| pat.name.gsub(/.*[\\\/]/, '').gsub(/\..*/, '') }
        end
      end
    end
  end
end


text:
<?php // lint >= 8.0

class Whatever
{

	/** @param string|int $a */
	private function simple($a)
	{}

	/** @param string|true $a */
	private function withTrue($a)
	{}

	/** @param string|false $a */
	private function withFalse($a)
	{}

	/** @param string|null $a */
	private function withNull($a)
	{}

	/** @param int|string|null $a */
	private function moreWithNull($a)
	{}

	/** @param int[]|Anything $a */
	private function arrayIterable($a)
	{}

	/** @param int[]|Traversable $a */
	private function traversable($a)
	{}

	/** @param int[]|Traversable|ArrayIterator $a */
	private function moreTraversable($a)
	{}

	/** @param string|mixed[] $a */
	private function unionWithMixedArray($a = null)
	{}

	/** @param scalar $a */
	private function scalar($a)
	{}

	/** @param scalar|null $a */
	private function scalarNullable($a)
	{}

	/** @param numeric $a */
	private function numeric($a)
	{}

	/** @param numeric|null $a */
	private function numericNullable($a)
	{}

	/** @param scalar|numeric|null $a */
	private function scalarAndnumericNullable($a)
	{}

}


text:
package com.abuabdul.munstalk.document.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * @author abuabdul
 *
 */
@Document(collection = MunstalkGlobalAvatar.GLOBAL_AVATAR)
public class MunstalkGlobalAvatar {

	public static final String GLOBAL_AVATAR = "GlobalAvatar";

	@Id
	private String id;

	private String munsRepresentation;
	private String abuRepresentation;

	public MunstalkGlobalAvatar() {
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the munsRepresentation
	 */
	public String getMunsRepresentation() {
		return munsRepresentation;
	}

	/**
	 * @param munsRepresentation
	 *            the munsRepresentation to set
	 */
	public void setMunsRepresentation(String munsRepresentation) {
		this.munsRepresentation = munsRepresentation;
	}

	/**
	 * @return the abuRepresentation
	 */
	public String getAbuRepresentation() {
		return abuRepresentation;
	}

	/**
	 * @param abuRepresentation
	 *            the abuRepresentation to set
	 */
	public void setAbuRepresentation(String abuRepresentation) {
		this.abuRepresentation = abuRepresentation;
	}
}