text:
import test from 'ava';

const replaceParsedPlainLinksWithTitles = require('../lib/replace-parsed-plain-links-with-titles.js');

const basicInput = 'https://www.codedread.com/test-crawlers.html';
const basicPlusSlash = basicInput + '/';
const endOfFileReference = '[1]: ' + basicInput;

const basicInputUrlSecond = 'http://www.google.com';
const basicOutputSecond = '"[Google](' + basicInputUrlSecond + ')", *google.com*';

test.cb('An empty markdown should result in an empty list', t => {
  const inputArray = [{
    titleMarkdown: 'Does not matter',
    url: basicInput
  }];

  t.plan(1);
  try {
    replaceParsedPlainLinksWithTitles(inputArray, endOfFileReference, outputMarkdown => {
      t.is(endOfFileReference, outputMarkdown);
      t.end();
    });
  } catch (err) {
    t.fail(err.message);
    t.end();
  }
});

test.cb('An empty url should be skipped in the results', t => {
  const inputArray = [{
    titleMarkdown: '',
    url: ''
  }];

  t.plan(1);
  try {
    replaceParsedPlainLinksWithTitles(inputArray, endOfFileReference, outputMarkdown => {
      t.is(endOfFileReference, outputMarkdown);
      t.end();
    });
  } catch (err) {
    t.fail(err.message);
    t.end();
  }
});

test.cb('A short part of url should not be replace a longer part', t => {
  const inputArray = [{
    titleMarkdown: 'some title markdown',
    url: basicInput
  }];

  t.plan(1);
  try {
    replaceParsedPlainLinksWithTitles(inputArray, basicPlusSlash, outputMarkdown => {
      t.is(basicPlusSlash, outputMarkdown);
      t.end();
    });
  } catch (err) {
    t.fail(err.message);
    t.end();
  }
});

test.cb('Won\'t replace a url that is already linkified', t => {
  const inputArray = [{
    titleMarkdown: basicOutputSecond,
    url: basicInputUrlSecond
  }];

  t.plan(1);
  try {
    replaceParsedPlainLinksWithTitles(inputArray, basicOutputSecond, outputMarkdown => {
      t.is(basicOutputSecond, outputMarkdown);
      t.end();
    });
  } catch (err) {
    t.fail(err.message);
    t.end();
  }
});


text:
package com.xplus.commons.mvn.impl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

import com.xplus.commons.mvn.api.FileMaker;
import com.xplus.commons.mvn.impl.entity.BClassPath;
import com.xplus.commons.tpl.api.TemplateMaker;

/**
 * @author huzexiong
 *
 */
@Component(ClassPathFileMakerImpl.BEAN_ID)
public class ClassPathFileMakerImpl implements FileMaker<BClassPath> {

  private final Logger logger = LoggerFactory.getLogger(ClassPathFileMakerImpl.class);

  public static final String BEAN_ID = "commons-mvn.classPathFileMakerImpl";

  /**
   * 模板读写器
   */
  @Resource(name = "commons-tpl.freeMarkerTemplateMaker")
  private TemplateMaker templateMaker;

  /**
   * 模板的相对路径
   */
  @Value("${commons-mvn.tpl.path:META-INF/commons-mvn/ftl}")
  private String tplPath;

  @Override
  public void make(BClassPath t) {
    makeClasspath(t);
  }

  protected void makeClasspath(BClassPath t) {
    if (null == t || StringUtils.isEmpty(t.getJ2seName())) {
      logger.debug("classpath info not found, ignore files.");
      return;
    }
    String tpl = String.format("%s/%s", tplPath, "classpath.ftl");
    String outPath = String.format("%s/%s", t.getPath(), ".classpath");
    logger.debug(".classpath File Maker Begin [{}]...", tpl);
    templateMaker.make(t, tpl, outPath);
    logger.debug(".classpath File Maker Done[{}].", outPath);
  }

}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Magento\Catalog\Pricing\Price;

use Magento\Framework\Pricing\Price\AbstractPrice;
use Magento\Framework\Pricing\Price\BasePriceProviderInterface;

/**
 * Class RegularPrice
 */
class RegularPrice extends AbstractPrice implements BasePriceProviderInterface
{
    /**
     * Price type
     */
    const PRICE_CODE = 'regular_price';

    /**
     * Get price value
     *
     * @return float|bool
     */
    public function getValue()
    {
        if ($this->value === null) {
            $price = $this->product->getPrice();
            $priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price);
            $this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : false;
        }
        return $this->value;
    }
}


text:
Engagement Evaluation

The Engagement Evaluation is an informal survey/assessment, designed to be used after meetings or engagements with users, but not necessarily after each engagement. There are two pieces to the evaluation below:

general information, which could mostly be provided by the facilitator

a series of interview questions, which could be administered to the researcher in person or via a survey tool

Depending on the goal of this evaluation, these pieces can be mixed and matched in order to:

track specific users and/or projects in a standardized manner

obtain feedback on facilitation interactions in order to adjust and improve future interaction

understand the impact of ACI-REF interactions

Engagement Information

1. Name/UserID

2. Dept

3. PI/group

4. Facilitator

5. Date (range) of Interaction

6. Reason for contact

    1. ____ 	Help with grant proposal

    2. ____ 	Help via ticketing system (for items not listed here)

    3. ____ 	Have ACI-REF speak at lab/group meeting (or research gathering)

    4. ____     Discuss Sstorage options

    5. ____ 	Discuss compute options

    6. ____ 	Use an high-performance or high-throughput system (cluster)

    7. ____ 	Use one or more software packages

    8. ____ 	Install software

    9. ____ 	Scale a functioning program to HPC/HTC

    10. ____ 	Optimize/troubleshoot a workflow

    11. ____ 	Develop or adopt a workflow

    12. ____ 	Other _______________________________________________________________

7. Rate engagement (1-5 scale)

Engagement Interview

Give a 3 sentence description of your research

Describe how ACI resources are a critical component of your research

What progress have you made?

What roadblocks have you had?

Describe what would or would not have been possible without the help of an ACI-REF (e.g. save XX amount of time, started a new line of research, etc).:

Please list any publications that were accelerated or improved from the help of an ACI-REF:

Did you use the skills & expertise you gained from the ACI-REF to assist or train others?

Other grad students?					____  Yes	____  No

Other post-docs?						____  Yes	____  No

Other faculty?							____  Yes	____  No

Any suggestions for how we can improve our interactions/(relationship)/collaboration?


text:
using System;
using System.Reflection;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif

namespace HoloToolkit.Unity
{
    // Displays a drop-down menu of Component objects that are limited to the scene (no prefabs)
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
    public sealed class SceneComponentAttribute : DrawOverrideAttribute
    {
        public string CustomLabel { get; private set; }

        public SceneComponentAttribute(string customLabel = null)
        {
            CustomLabel = customLabel;
        }

#if UNITY_EDITOR
        public override void DrawEditor(UnityEngine.Object target, FieldInfo field, SerializedProperty property)
        {
            Component fieldValue = field.GetValue(target) as Component;
            fieldValue = SceneObjectField(
                SplitCamelCase(field.Name),
                fieldValue,
                field.FieldType);
            field.SetValue(target, fieldValue);
        }

        public override void DrawEditor(UnityEngine.Object target, PropertyInfo prop)
        {
            Component propValue = prop.GetValue(target, null) as Component;
            propValue = SceneObjectField(
                SplitCamelCase(prop.Name),
                propValue,
                prop.PropertyType);
            prop.SetValue(target, propValue, null);
        }

        public static Component SceneObjectField(string label, Component sceneObject, Type componentType)
        {

            EditorGUILayout.BeginHorizontal();
            if (string.IsNullOrEmpty(label))
            {
                sceneObject = (Component)EditorGUILayout.ObjectField(sceneObject, componentType, true);
            }
            else
            {
                sceneObject = (Component)EditorGUILayout.ObjectField(label, sceneObject, componentType, true);
            }
            if (sceneObject != null && sceneObject.gameObject.scene.name == null)
            {
                // Don't allow objects that aren't in the scene!
                sceneObject = null;
            }

            UnityEngine.Object[] objectsInScene = GameObject.FindObjectsOfType(componentType);
            int selectedIndex = 0;
            string[] displayedOptions = new string[objectsInScene.Length + 1];
            displayedOptions[0] = "(None)";
            for (int i = 0; i < objectsInScene.Length; i++)
            {
                displayedOptions[i + 1] = objectsInScene[i].name;
                if (objectsInScene[i] == sceneObject)
                {
                    selectedIndex = i + 1;
                }
            }
            selectedIndex = EditorGUILayout.Popup(selectedIndex, displayedOptions);
            if (selectedIndex == 0)
            {
                sceneObject = null;
            }
            else
            {
                sceneObject = (Component)objectsInScene[selectedIndex - 1];
            }
            EditorGUILayout.EndHorizontal();
            return sceneObject;
        }
#endif

    }
}


text:
class HTTPBackend : public Backend{
public:
  HTTPBackend(const std::string &url);
  virtual ~HTTPBackend();

  void processDoorSignal(int sensor_id, int sensor_type, uint8_t message);

private:
  std::string m_url;

};

#endif //DOMOS_HTTPBACKEND_H


text:
bool Capp::InitGuard()
{
	// Load Guard Image
	m_Guard = LoadImage(m_Renderer, "Data/GFX/Guard.png");
	if (m_Guard == nullptr)
	{
		Shutdown();

		return false;
	}

	return true;
}

void Capp::UpdateGuard(unsigned int elapsedTime)
{

}

void Capp::RenderGuard(unsigned int elapsedTime)
{

}


text:
namespace movers {
    float g_t = 0;
    using icomplex = std::complex<float>;

    // The farther away, the more jiggle you have
    auto smoke_rise(float base_energy, float move_scale) {
        return [=](icomplex i) {
            float dist = abs(norm(i) - 1.0f) + base_energy;
            //float dist = log(abs(norm(i)-1) + 1) + base_energy;
            icomplex dp = move_scale * dist * icomplex(rando::next_range(), rando::next_range());

            return i + dp;
        };
    }

    //things in the center of the screen move more
    auto center_out(float move_scale, float falloff) {
        return [=](icomplex i) {
            float dist = 1 / (falloff * abs(i.real()) + 1);
            auto norm = (i + icomplex(1, 1)) * 500.0f;
            icomplex dp = move_scale * dist * icomplex(rando::next_position(norm, 1), rando::next_position(norm, 100));
            return i + dp;
        };
    }

}


text:
<?php

namespace Elcodi\Component\CartShipping\EventListener;

use Elcodi\Component\Cart\Event\CartOnLoadEvent;
use Elcodi\Component\CartShipping\Services\CartShippingAmountLoader;

/**
 * Class LoadCartShippingAmountEventListener.
 */
final class LoadCartShippingAmountEventListener
{
    /**
     * @var CartShippingAmountLoader
     *
     * Cart shipping amount loader
     */
    private $cartShippingAmountLoader;

    /**
     * Construct.
     *
     * @param CartShippingAmountLoader $cartShippingAmountLoader Cart shipping amount loader
     */
    public function __construct(CartShippingAmountLoader $cartShippingAmountLoader)
    {
        $this->cartShippingAmountLoader = $cartShippingAmountLoader;
    }

    /**
     * Load cart shipping amount.
     *
     * @param CartOnLoadEvent $event Event
     */
    public function loadCartShippingAmount(CartOnLoadEvent $event)
    {
        $this
            ->cartShippingAmountLoader
            ->loadCartShippingAmount(
                $event->getCart()
            );
    }
}


text:
package com.skycaster.geomapper.fragment;

import android.graphics.Bitmap;
import android.os.Bundle;
import android.widget.ImageView;

import com.skycaster.geomapper.R;
import com.skycaster.geomapper.base.BaseApplication;
import com.skycaster.geomapper.base.BaseFragment;
import com.skycaster.geomapper.util.ImageUtil;

/**
 * Created by 廖华凯 on 2017/7/18.
 */

public class PicIteratorFragment extends BaseFragment {
    private ImageView mImageView;
    private static final String PIC_PATH="pic_path";
    private String mPath;

    public PicIteratorFragment(String picPath) {
        Bundle bundle=new Bundle();
        bundle.putString(PIC_PATH,picPath);
        setArguments(bundle);
    }

    @Override
    protected int setContentView() {
        return R.layout.fragment_pic;
    }

    @Override
    protected void initView() {
        mImageView= (ImageView) findViewById(R.id.fragment_pic_iterator_iv_pic);

    }

    @Override
    protected void initData(Bundle arguments) {
        mPath = arguments.getString(PIC_PATH);
        Bitmap bitmap = ImageUtil.getFixedWidthBitmap(mPath, BaseApplication.getDisplayMetrics().widthPixels);
        if(bitmap!=null){
            mImageView.setImageBitmap(bitmap);
        }else {
            mImageView.setImageResource(R.drawable.pic_file_deleted);
        }

    }

    @Override
    protected void initListeners() {

    }
}


text:
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-crowdin-request --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-crowdin-request');
```

## Configuration
_Run this task with the `grunt crowdin-request:<action>` command._

There are currently two supported actions:

- upload
- download

Task targets, files and options may be specified according to the grunt [Configuring tasks](http://gruntjs.com/configuring-tasks) guide.

### Options

#### api-key

Type: `String`
Default: `''`

Your Crowdin API key. Remember to keep it secret!

#### project-identifier

Type: `String`
Default: `''`

The name of your project at Crowdin. What you access at https://crowdin.com/project/<my-project-name>

#### filename

Type: `String`
Default: `''`

The filename to send to Crowdin. Can be anything you like to identify a file. This option can also use the current Git branch you might be on.
Use `#GIT_BRANCH#` to insert the branch name.

#### branch

Type: `String`
Default: `''`

The name of your Crowdin branch. More info about Crowdin branches at https://support.crowdin.com/articles/versions-management/

### Upload

#### srcFile

Type: `String`
Default: `''`

The location of the file to be uploaded, relative to `Gruntfile.js`

### Download

#### targetLanguage

Type: `String`
Default: `'all'`

Target language files to download. If not specified, 'all' will be used and all available languages will be downloaded.

#### outputDir

Type: `String`
Default: `''`

The folder where translations should be downloaded to. This will extract the .zip from Crowdin and create subdirectories for each locale contained therein.

#### renameFileTo

Type: `String`
Default: `''`

If provided will rename the download files from Crowdin to be renamed to something different than what they were uploaded as. The use case being you upload with a Git branch filename
But want to download to a single consistent filename.

## Sample config

```javascript
var config = {
    'crowdin-request': {

        options: {
            'api-key': 'xyz123',
            'project-identifier': 'test-project',
            filename: '#GIT_BRANCH#.pot'
        },

        upload: {
            srcFile: 'i18n/translations.pot'
        },

        download: {
            outputDir: 'i18n',
            renameFileTo: 'messages-#LOCALE#.po'
        }
    }
};

grunt.initConfig(config);
```

## Usage

```sh
grunt crowdin-request:upload
```

```sh
grunt crowdin-request:download
```


text:
<jqxTreeGrid #myTreeGrid
    (onContextmenu)="myTreeGridOnContextmenu()" (onRowClick)="myTreeGridOnRowClick($event)"
    [width]="850" [source]="dataAdapter" [columns]="columns"
    [columnsResize]="true" [ready]="ready">
</jqxTreeGrid>

<jqxMenu #myMenu (onItemclick)="myMenuOnItemClick($event)"
    [width]="200" [height]="58" [autoOpenPopup]="false" [mode]="'popup'">

Edit Selected Row

Delete Selected Row

</jqxMenu>


text:
import mock
import unittest2 as unittest

from neutronclient.common import exceptions as q_exceptions

from akanda.rug import populate

class TestPrePopulateWorkers(unittest.TestCase):

    @mock.patch('akanda.rug.api.quantum.Quantum')
    def test_retry_loop(self, mocked_quantum_api):
        quantum_client = mock.Mock()
        returned_value = [Exception, []]
        quantum_client.get_routers.side_effect = returned_value

        mocked_quantum_api.return_value = quantum_client

        sched = mock.Mock()
        populate._pre_populate_workers(sched)
        self.assertEqual(
            quantum_client.get_routers.call_args_list,
            [
                mock.call(detailed=False)
                for value in xrange(len(returned_value))
            ]
        )
        self.assertEqual(
            quantum_client.get_routers.call_count,
            len(returned_value)
        )

    def _exit_loop_bad_auth(self, mocked_quantum_api, log, exc):
        quantum_client = mock.Mock()
        quantum_client.get_routers.side_effect = exc
        mocked_quantum_api.return_value = quantum_client
        sched = mock.Mock()
        populate._pre_populate_workers(sched)
        log.warning.assert_called_once_with(
            'PrePopulateWorkers thread failed: %s',
            mock.ANY
        )

    @mock.patch('akanda.rug.populate.LOG')
    @mock.patch('akanda.rug.api.quantum.Quantum')
    def test_exit_loop_unauthorized(self, mocked_quantum_api, log):
        exc = q_exceptions.Unauthorized
        self._exit_loop_bad_auth(mocked_quantum_api, log, exc)

    @mock.patch('akanda.rug.populate.LOG')
    @mock.patch('akanda.rug.api.quantum.Quantum')
    def test_exit_loop_forbidden(self, mocked_quantum_api, log):
        exc = q_exceptions.Forbidden
        self._exit_loop_bad_auth(mocked_quantum_api, log, exc)

    @mock.patch('akanda.rug.populate.LOG')
    @mock.patch('akanda.rug.api.quantum.Quantum')
    def test_retry_loop_logging(self, mocked_quantum_api, log):
        quantum_client = mock.Mock()
        message = mock.Mock(tenant_id='1', router_id='2')
        returned_value = [
            q_exceptions.NeutronClientException,
            [message]
        ]
        quantum_client.get_routers.side_effect = returned_value

        mocked_quantum_api.return_value = quantum_client

        sched = mock.Mock()
        populate._pre_populate_workers(sched)
        expected = [
            mock.call.warning(u'Could not fetch routers from quantum: '
                              'An unknown exception occurred.'),
            mock.call.warning('sleeping 1 seconds before retrying'),
            mock.call.debug('Start pre-populating the workers '
                            'with %d fetched routers', 1)
        ]
        self.assertEqual(log.mock_calls, expected)

    @mock.patch('akanda.rug.event.Event')
    @mock.patch('akanda.rug.api.quantum.Quantum')
    def test_scheduler_handle_message(self, mocked_quantum_api, event):

        def message_to_router_args(message):
            tmp = message.copy()
            tmp['id'] = tmp.pop('router_id')
            return tmp

        quantum_client = mock.Mock()
        message1 = {'tenant_id': '1', 'router_id': '2',
                    'body': {}, 'crud': 'poll'}
        message2 = {'tenant_id': '3', 'router_id': '4',
                    'body': {}, 'crud': 'poll'}

        return_value = [
            mock.Mock(**message_to_router_args(message1)),
            mock.Mock(**message_to_router_args(message2))
        ]

        quantum_client.get_routers.return_value = return_value

        sched = mock.Mock()
        mocked_quantum_api.return_value = quantum_client
        populate._pre_populate_workers(sched)

        self.assertEqual(sched.handle_message.call_count, len(return_value))
        expected = [
            mock.call(message1['tenant_id'], mock.ANY),
            mock.call(message2['tenant_id'], mock.ANY)
        ]
        self.assertEqual(sched.handle_message.call_args_list, expected)

        self.assertEqual(event.call_count, 2)
        expected = [mock.call(**message1), mock.call(**message2)]
        self.assertEqual(event.call_args_list, expected)

    @mock.patch('threading.Thread')
    def test_pre_populate_workers(self, thread):
        sched = mock.Mock()
        t = populate.pre_populate_workers(sched)
        thread.assert_called_once_with(
            target=populate._pre_populate_workers,
            args=(sched,),
            name='PrePopulateWorkers'
        )
        self.assertEqual(
            t.mock_calls,
            [mock.call.setDaemon(True), mock.call.start()]
        )


text:
Timekeeper
==================

A world clock application for Sailfish OS.

View the time in different countries and time zones. Configure clocks from pre-set time zones, or set a custom time offset to keep track of times across the world.


text:
package br.odb.crosstraffic;

import br.odb.utils.Updatable;
import br.odb.utils.math.Vec2;

public class Astroman extends SpaceBody implements Updatable {

	float fuel = 1.0f;

	public final Vec2 accel = new Vec2();

	@Override
	public void update(long ms) {
		super.update(ms);
		speed.addTo( accel );
	}

}


text:
package net.venaglia.nondairy.soylang.cache;

import com.intellij.openapi.util.Key;
import com.intellij.openapi.vfs.VirtualFile;
import net.venaglia.nondairy.util.TinySet;
import org.jetbrains.annotations.NotNull;

import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

/**
 * User: ed
 * Date: 5/21/12
 * Time: 6:06 PM
 */
public abstract class AbstractTemplateCache<ME extends AbstractTemplateCache<ME>> extends AbstractCache<String,Set<CacheEntry>> {

    private final Set<VirtualFile> files = new TinySet<VirtualFile>();

    protected final AbstractChangeAwareCache<ME> parent;
    protected final String place;

    public AbstractTemplateCache(AbstractChangeAwareCache<ME> parent, String place) {
        this.parent = parent;
        this.place = place;
    }

    public String getPlace() {
        return place;
    }

    @NotNull
    @Override
    protected Set<CacheEntry> create(String key) {
        return new CacheSet(key);
    }

    @SuppressWarnings("unchecked")
    private ME self() {
        return (ME)this;
    }

    abstract Key<ME> getCacheKey();

    void addFile(@NotNull VirtualFile file) {
        if (!files.contains(file)) {
            ME old = file.getUserData(getCacheKey());
            if (old != null) {
                old.removeFile(file);
            }
            file.replace(getCacheKey(), old, self());
            files.add(file);
        }
    }

    void removeFile(@NotNull VirtualFile file) {
        if (files.contains(file)) {
            file.replace(getCacheKey(), self(), null);
            files.remove(file);
            if (files.isEmpty()) {
                parent.removeChild(self());
            } else {
                removeImpl(file);
            }
        }
    }

    private Set<CacheEntry> removeImpl(VirtualFile file) {
        Set<CacheEntry> removed = new HashSet<CacheEntry>();
        for (Iterator<Set<CacheEntry>> cesi = values().iterator(); cesi.hasNext(); ) {
            Set<CacheEntry> cec = cesi.next();
            for (Iterator<CacheEntry> cei = cec.iterator(); cei.hasNext(); ) {
                CacheEntry ce = cei.next();
                if (file.equals(ce.getFile())) {
                    cei.remove();
                    removed.add(ce);
                }
            }
            if (cec.isEmpty()) {
                cesi.remove();
            }
        }
        if (!removed.isEmpty()) {
            parent.removed(removed.iterator());
        }
        return removed;
    }

    @Override
    public boolean removeChild(Set<CacheEntry> value) {
        boolean b = super.removeChild(value);
        if (b && isEmpty()) {
            parent.removeChild(self());
        }
        return b;
    }

    @Override
    public String getKeyFor(@NotNull Set<CacheEntry> value) {
        if (value instanceof CacheSet) {
            return ((CacheSet)value).getTemplateName();
        }
        return null;
    }

    @NotNull
    public Set<VirtualFile> getFiles() {
        return Collections.unmodifiableSet(files);
    }

    @SuppressWarnings("HardCodedStringLiteral")
    @Override
    public String toString() {
        return String.format("%s{namespace=\"%s\",templates=%d}", getClass().getSimpleName(), place, size());
    }

    @NotNull
    @Override
    protected Set<CacheEntry> unmodifiableValue(@NotNull Set<CacheEntry> value) {
        return Collections.unmodifiableSet(value);
    }

    @NotNull
    @Override
    protected Set<CacheEntry> cloneValue(@NotNull Set<CacheEntry> value) {
        return ((CacheSet)value).clone();
    }

    public static class CacheSet extends TinySet<CacheEntry> {

        private final String templateName;

        public CacheSet(String templateName) {
            this.templateName = templateName;
        }

        public String getTemplateName() {
            return templateName;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof CacheSet)) return false;

            CacheSet cacheSet = (CacheSet)o;

            return !(templateName != null
                   ? !templateName.equals(cacheSet.templateName)
                   : cacheSet.templateName != null);
        }

        @Override
        public int hashCode() {
            return templateName != null ? templateName.hashCode() : 0;
        }

        @Override
        public String toString() {
            StringBuilder buffer = new StringBuilder();
            buffer.append('[');
            boolean first = true;
            for (CacheEntry cacheEntry : this) {
                if (first) {
                    first = false;
                } else {
                    buffer.append(',');
                }
                buffer.append(cacheEntry.getTemplate());
            }
            buffer.append(']');
            return buffer.toString();
        }
    }

}


text:
<?php

namespace Celtric\Fixtures;

use Celtric\Fixtures\DefinitionLocators\LocatorCacher;
use Celtric\Fixtures\DefinitionLocators\SingleParserDefinitionLocator;
use Celtric\Fixtures\Parsers\AliceStyleParser;
use Celtric\Fixtures\Parsers\CeltricStyleParser;
use Celtric\Fixtures\RawDataLocators\YAMLRawDataLocator;

final class Fixtures
{
    /** @var DefinitionLocator */
    private $definitionLocator;

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

    /**
     * @param string $fixturesPath
     * @return Fixtures
     */
    public static function celtricStyle($fixturesPath)
    {
        $definitionLocator = new SingleParserDefinitionLocator(
                new YAMLRawDataLocator($fixturesPath),
                new CeltricStyleParser(
                        new CachedDefinitionFactory(new \ArrayObject(), new FixtureDefinitionFactory(), true)));

        return new self(new LocatorCacher($definitionLocator));
    }

    /**
     * @param string $fixturesPath
     * @return Fixtures
     */
    public static function aliceStyle($fixturesPath)
    {
        $definitionLocator = new SingleParserDefinitionLocator(
                new YAMLRawDataLocator($fixturesPath),
                new AliceStyleParser(
                        new CachedDefinitionFactory(new \ArrayObject(), new FixtureDefinitionFactory(), true)));

        return new self(new LocatorCacher($definitionLocator));
    }

    /**
     * @param string $fullFixtureName
     * @return mixed
     */
    public function fixture($fullFixtureName)
    {
        $fixtureIdentifier = new FixtureIdentifier($fullFixtureName);

        return $this->definitionLocator->fixtureDefinition($fixtureIdentifier)->instantiate();
    }

    /**
     * @param string $namespace
     * @return array
     */
    public function namespaceFixtures($namespace)
    {
        $definitions = $this->definitionLocator->namespaceDefinitions($namespace);

        return array_map(function (FixtureDefinition $d) { return $d->instantiate(); }, $definitions);
    }
}