text:
package java.beans;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.harmony.beans.internal.nls.Messages;

public class Introspector {

    public static final int USE_ALL_BEANINFO = 1;

    public static final int IGNORE_IMMEDIATE_BEANINFO = 2;

    public static final int IGNORE_ALL_BEANINFO = 3;

    private Introspector() {
    }

    public static String decapitalize(String name) {
        if ((name != null) && (name.length() > 0)) {
            String result;

            // first two letters are capital
            if ((name.length() > 1)
                    && Character.isUpperCase(name.charAt(0))
                    && Character.isUpperCase(name.charAt(1))) {
                return name;
            }

            result = name.substring(0, 1).toLowerCase();
            if (name.length() > 1) {
                result += name.substring(1);
            }

            return result;
        }
        return name;
    }

    public static BeanInfo getBeanInfo(Class<?> beanClass, int flags)
            throws IntrospectionException {
        switch (flags) {
            case USE_ALL_BEANINFO:
                return getBeanInfo(beanClass, null, false, false);
            case IGNORE_IMMEDIATE_BEANINFO:
                return getBeanInfo(beanClass, null, true, false);
            case IGNORE_ALL_BEANINFO:
                return getBeanInfo(beanClass, null, true, true);
            default:
                // TODO: verify that default behavior complies with RI
                return getBeanInfo(beanClass, null, false, false);
        }
    }

    public static BeanInfo getBeanInfo(Class<?> beanClass)
            throws IntrospectionException {
        return getBeanInfo(beanClass, null, false, false);
    }

    public static BeanInfo getBeanInfo(Class<?> beanClass, Class<?> stopClass)
            throws IntrospectionException {
        return getBeanInfo(beanClass, stopClass, false, false);
    }

    public static synchronized void setBeanInfoSearchPath(String[] searchPath) {
        SecurityManager sm = System.getSecurityManager();

        if (sm != null) {
            sm.checkPropertiesAccess();
        }

        path = searchPath;
    }

    public static synchronized String[] getBeanInfoSearchPath() {
        // compatible with RI
        if (path == null) {
            throw new NullPointerException(
                    Messages.getString("beans.4F")); //$NON-NLS-1$
        }

        return path.clone();
    }

    public static void flushFromCaches(Class<?> clz) {
        removeBeanInfoClassFromCache(clz);
    }

    public static void flushCaches() {
        removeAllBeanInfoClassesFromCache();
    }

    // private methods

    private static BeanInfoWrapper getBeanInfo(Class<?> beanClass,
            Class<?> stopClass, boolean ignoreBeanClassBeanInfo,
            boolean ignoreSuperClassBeanInfo) throws IntrospectionException {
        BeanInfoWrapper beanInfoWrapper;
        BeanInfo beanInfo;
        BeanInfoImpl beanInfoImpl;
        BeanInfoWrapper wrapper;
        Class<?> parent;

        if (beanClass == null) {
            throw new java.lang.NullPointerException();
        }

        if (stopClass != null && !stopClass.isAssignableFrom(beanClass)) {
            throw new IntrospectionException(
                    Messages.getString("beans.4E")); //$NON-NLS-1$
        }

        beanInfoWrapper = findBeanInfoClassInCache(beanClass,
                stopClass, ignoreBeanClassBeanInfo, ignoreSuperClassBeanInfo);

        if (beanInfoWrapper != null) {
            return beanInfoWrapper;
        }

        // find bean info as a separate class

        beanInfo = null;

        if (!ignoreBeanClassBeanInfo) {
            try {
                Class<?> beanInfoClass = findBeanInfoClass(beanClass);

                if (beanInfoClass != null) {
                    beanInfo = (BeanInfo) beanInfoClass.newInstance();
                }
            } catch (Exception e) {
            }
        }

        // ...

        // generate bean info automatically

        beanInfoImpl = new BeanInfoImpl(beanClass);

        // ...

        wrapper = new BeanInfoWrapper(beanInfo, beanInfoImpl);

        parent = beanClass.getSuperclass();

        if (parent != null && parent != stopClass) {
            BeanInfoWrapper parentBeanInfo = getBeanInfo(parent, stopClass,
                    ignoreSuperClassBeanInfo, ignoreSuperClassBeanInfo);

            wrapper.setParentToMerge(parentBeanInfo);
        }

        // ...

        storeBeanInfoClassInCache(wrapper, beanClass, stopClass,
                ignoreBeanClassBeanInfo, ignoreSuperClassBeanInfo);

        return wrapper;
    }

    private static Class<?> findBeanInfoClass(Class<?> beanClass) {
        String beanClassName = beanClass.getName();
        int idx = beanClassName.lastIndexOf("."); //$NON-NLS-1$
        String shortBeanInfoClassName = beanClassName.substring(idx + 1,
                beanClassName.length())
                + "BeanInfo"; //$NON-NLS-1$
        String fullBeanInfoClassName = beanClassName + "BeanInfo"; //$NON-NLS-1$

        Class<?> beanInfoClass = null;
        try {
            beanInfoClass = Class.forName(fullBeanInfoClassName, true,
                    beanClass.getClassLoader());

        } catch (ClassNotFoundException cnfe) {
            for (String element : path) {
                try {
                    fullBeanInfoClassName = element + "." //$NON-NLS-1$
                            + shortBeanInfoClassName;
                    beanInfoClass = Class.forName(fullBeanInfoClassName, true,
                            beanClass.getClassLoader());
                    break;
                } catch (ClassNotFoundException cnfe2) {
                }
            }
        }

        return beanInfoClass;
    }

    private static BeanInfoWrapper findBeanInfoClassInCache(Class<?> beanClass,
            Class<?> stopClass, boolean ignoreBeanClassBeanInfo,
            boolean ignoreSuperClassBeanInfo) {
        BeanInfoWrapper result = null;
        List<BeanInfoData> beanInfoDatas = beanInfos.get(beanClass.getName());
        if (beanInfoDatas != null) {
            Iterator<BeanInfoData> iterator = beanInfoDatas.iterator();
            while (iterator.hasNext()) {
                BeanInfoData beanInfoData = iterator.next();
                if ((beanInfoData.getStopClass() == stopClass)
                        && (beanInfoData.getIgnoreBeanClassBeanInfo() == ignoreBeanClassBeanInfo)
                        && (beanInfoData.getIgnoreSuperClassBeanInfo() == ignoreSuperClassBeanInfo)) {
                    result = beanInfoData.getBeanInfoWrapper();
                }
                if (result != null) {
                    break;
                }
            }
        }
        return result;
    }

    private static void storeBeanInfoClassInCache(
            BeanInfoWrapper beanInfoWrapper, Class<?> beanClass,
            Class<?> stopClass, boolean ignoreBeanClassBeanInfo,
            boolean ignoreSuperClassBeanInfo) {
        List<BeanInfoData> beanInfoDatas = beanInfos.get(beanClass.getName());
        if (beanInfoDatas == null) {
            beanInfoDatas = new ArrayList<BeanInfoData>();
            beanInfos.put(beanClass.getName(), beanInfoDatas);
        }
        beanInfoDatas.add(new BeanInfoData(stopClass, ignoreBeanClassBeanInfo,
                ignoreSuperClassBeanInfo, beanInfoWrapper));
    }

    private static void removeBeanInfoClassFromCache(Class<?> beanClass) {
        beanInfos.remove(beanClass.getName());
    }

    private static void removeAllBeanInfoClassesFromCache() {
        beanInfos.clear();
    }

    // private fields

    private static String[] path = { "org.apache.harmony.beans.infos" }; //$NON-NLS-1$

    private static final Map<String, List<BeanInfoData>> beanInfos =
            new HashMap<String, List<BeanInfoData>>();

}


text:
package co.cask.tigon.data.transaction.queue;

/**
 *
 */
public interface QueueMetrics {

  void emitEnqueue(int count);

  void emitEnqueueBytes(int bytes);

  static final QueueMetrics NOOP_QUEUE_METRICS = new QueueMetrics() {
    @Override
    public void emitEnqueue(int count) {
      // no-op
    }

    @Override
    public void emitEnqueueBytes(int bytes) {
      // no-op
    }
  };
}

redpajama_set_name: RedPajamaGithub


text:
FROM dkwasny/hive-base
MAINTAINER David Kwasny <dkwasny67@gmail.com>

USER hive

CMD ["/usr/lib/hive-hcatalog/sbin/webhcat_server.sh", "foreground"]


text:
Spree::Core::Engine.routes.draw do
  namespace :api do
    post '/api_status', to: 'nf4web#api_status'
    get  '/api_status', to: 'nf4web#api_status'
    post '/api_order', to: 'nf4web#api_order'
    get  '/api_order', to: 'nf4web#api_order'
    post '/api_nfecommerce', to: 'nf4web#api_nfecommerce'
    get  '/api_nfecommerce', to: 'nf4web#api_nfecommerce'
  end
end


text:
require 'spec_helper'

module Spree
  module Stock
    describe Estimator do
      let!(:shipping_method) { create(:shipping_method) }
      let(:package) { build(:stock_package_fulfilled) }
      let(:order) { package.order }
      subject { Estimator.new(order) }

      context "#shipping rates" do
        before(:each) do
          shipping_method.zones.first.members.create(:zoneable => order.ship_address.country)
          ShippingMethod.any_instance.stub_chain(:calculator, :available?).and_return(true)
          ShippingMethod.any_instance.stub_chain(:calculator, :compute).and_return(4.00)
          ShippingMethod.any_instance.stub_chain(:calculator, :preferences).and_return({:currency => "USD"})

          package.stub(:shipping_methods => [shipping_method])
        end

        it "returns shipping rates from a shipping method if the order's ship address is in the same zone" do
          shipping_rates = subject.shipping_rates(package)
          shipping_rates.first.cost.should eq 4.00
        end

        it "does not return shipping rates from a shipping method if the order's ship address is in a different zone" do
          shipping_method.zones.each{|z| z.members.delete_all}
          shipping_rates = subject.shipping_rates(package)
          shipping_rates.should == []
        end

        it "does not return shipping rates from a shipping method if the calculator is not available for that order" do
          ShippingMethod.any_instance.stub_chain(:calculator, :available?).and_return(false)
          shipping_rates = subject.shipping_rates(package)
          shipping_rates.should == []
        end

        it "returns shipping rates from a shipping method if the currency matches the order's currency" do
          shipping_rates = subject.shipping_rates(package)
          shipping_rates.first.cost.should eq 4.00
        end

        it "does not return shipping rates from a shipping method if the currency is different than the order's currency" do
          order.currency = "GBP"
          shipping_rates = subject.shipping_rates(package)
          shipping_rates.should == []
        end
      end
    end
  end
end


text:
(function(){

    ccs.Armature.WebGLRenderCmd = function(renderableObject){
        cc.Node.WebGLRenderCmd.call(this, renderableObject);
        this._needDraw = true;

        this._realAnchorPointInPoints = new cc.Point(0,0);
    };

    var proto = ccs.Armature.WebGLRenderCmd.prototype = Object.create(cc.Node.WebGLRenderCmd.prototype);
    cc.inject(ccs.Armature.RenderCmd, proto);
    proto.constructor = ccs.Armature.WebGLRenderCmd;

    proto.rendering = function (ctx, dontChangeMatrix) {
        var node = this._node;

        if(!dontChangeMatrix){
            cc.kmGLMatrixMode(cc.KM_GL_MODELVIEW);
            cc.kmGLPushMatrix();
            cc.kmGLLoadMatrix(this._stackMatrix);
        }

        var locChildren = node._children;
        var alphaPremultiplied = cc.BlendFunc.ALPHA_PREMULTIPLIED, alphaNonPremultipled = cc.BlendFunc.ALPHA_NON_PREMULTIPLIED;
        for (var i = 0, len = locChildren.length; i < len; i++) {
            var selBone = locChildren[i];
            if (selBone && selBone.getDisplayRenderNode) {
                var selNode = selBone.getDisplayRenderNode();
                if (null === selNode)
                    continue;
                selNode.setShaderProgram(this._shaderProgram);
                switch (selBone.getDisplayRenderNodeType()) {
                    case ccs.DISPLAY_TYPE_SPRITE:
                        if (selNode instanceof ccs.Skin) {
                            this._updateColorAndOpacity(selNode._renderCmd, selBone);   //because skin didn't call visit()
                            selNode.updateTransform();

                            var func = selBone.getBlendFunc();
                            if (func.src !== alphaPremultiplied.src || func.dst !== alphaPremultiplied.dst)
                                selNode.setBlendFunc(selBone.getBlendFunc());
                            else {
                                if ((node._blendFunc.src === alphaPremultiplied.src && node._blendFunc.dst === alphaPremultiplied.dst)
                                    && !selNode.getTexture().hasPremultipliedAlpha())
                                    selNode.setBlendFunc(alphaNonPremultipled);
                                else
                                    selNode.setBlendFunc(node._blendFunc);
                            }
                            selNode._renderCmd.rendering(ctx);
                        }
                        break;
                    case ccs.DISPLAY_TYPE_ARMATURE:
                        selNode._renderCmd.rendering(ctx, true);
                        break;
                    default:
                        selNode._renderCmd.transform();
                        selNode._renderCmd.rendering(ctx);
                        break;
                }
            } else if (selBone instanceof cc.Node) {
                selBone.setShaderProgram(this._shaderProgram);
                selBone._renderCmd.transform();
                if(selBone._renderCmd.rendering)
                    selBone._renderCmd.rendering(ctx);
            }
        }
        if(!dontChangeMatrix)
            cc.kmGLPopMatrix();
    };

    proto.initShaderCache = function(){
        this._shaderProgram = cc.shaderCache.programForKey(cc.SHADER_POSITION_TEXTURECOLOR);
    };

    proto.setShaderProgram = function(shaderProgram){
        this._shaderProgram = shaderProgram;
    };

    proto._updateColorAndOpacity = function(skinRenderCmd, bone){
        //update displayNode's color and opacity
        var parentColor = bone._renderCmd._displayedColor, parentOpacity = bone._renderCmd._displayedOpacity;
        var flags = cc.Node._dirtyFlags, locFlag = skinRenderCmd._dirtyFlag;
        var colorDirty = locFlag & flags.colorDirty,
            opacityDirty = locFlag & flags.opacityDirty;
        if(colorDirty)
            skinRenderCmd._updateDisplayColor(parentColor);
        if(opacityDirty)
            skinRenderCmd._updateDisplayOpacity(parentOpacity);
        if(colorDirty || opacityDirty)
            skinRenderCmd._updateColor();
    };

    proto.updateChildPosition = function(ctx, dis, selBone, alphaPremultiplied, alphaNonPremultipled){
        var node = this._node;
        dis.updateTransform();

        var func = selBone.getBlendFunc();
        if (func.src !== alphaPremultiplied.src || func.dst !== alphaPremultiplied.dst)
            dis.setBlendFunc(selBone.getBlendFunc());
        else {
            if ((node._blendFunc.src === alphaPremultiplied.src && node_blendFunc.dst === alphaPremultiplied.dst)
                && !dis.getTexture().hasPremultipliedAlpha())
                dis.setBlendFunc(alphaNonPremultipled);
            else
                dis.setBlendFunc(node._blendFunc);
        }
        dis.rendering(ctx);
    };

    proto.updateStatus = function () {
        var flags = cc.Node._dirtyFlags, locFlag = this._dirtyFlag;
        var colorDirty = locFlag & flags.colorDirty,
            opacityDirty = locFlag & flags.opacityDirty;
        if(colorDirty)
            this._updateDisplayColor();

        if(opacityDirty)
            this._updateDisplayOpacity();

        if(colorDirty || opacityDirty)
            this._updateColor();

        if (locFlag & flags.orderDirty)
            this._dirtyFlag = this._dirtyFlag & flags.orderDirty ^ this._dirtyFlag;

        //update the transform every visit, don't need dirty flag,
        this.transform(this.getParentRenderCmd(), true);
    };

    proto.visit = function(parentCmd){
        var node = this._node;
        // quick return if not visible. children won't be drawn.
        if (!node._visible)
            return;

        var currentStack = cc.current_stack;
        currentStack.stack.push(currentStack.top);
        this.updateStatus(parentCmd);
        currentStack.top = this._stackMatrix;

        node.sortAllChildren();
        cc.renderer.pushRenderCommand(this);

        this._dirtyFlag = 0;
        currentStack.top = currentStack.stack.pop();
    };
})();


text:
#include "domflags.h"

DomFlags::DomFlags(eTimeType type) : Serializable("RFlags")
{
    if(F == type) {
        domStaticElementAttributes_["b"] = "0";
        domStaticElementAttributes_["f"] = "4";
    } else {
        domStaticElementAttributes_["b"] = "4";
        domStaticElementAttributes_["f"] = "0";
    }
    domStaticElementAttributes_.insert("sMode","N");
}


text:
import { isFunction } from 'lodash/lang';

/**
 * @desc Wrapper for custom message responses.
 */
export default class Response {
  /**
   * Constructor.
   * @param {Function} executor - The function which will handle the message response.
   * @throws {TypeError} Thrown if the given handler is not a function.
   */
  constructor(executor) {
    if (!isFunction(executor)) {
      throw new TypeError('Expected executor to be a function.');
    }

    /**
     * The function handling the message response.
     * @type {Function}
     * @private
     */
    this.executor = executor;
  }

  /**
   * Executes the message response handler.
   * @returns {*} The returned value from the handler.
   */
  respond() {
    return this.executor();
  }
}


text:
import BsPopoverComponent, { Args } from "../bs-popover/component";

class BsTooltipComponent extends BsPopoverComponent<Args> {
  type = 'tooltip';
}

export default BsTooltipComponent;


text:
import { useSystemContext } from "System/useSystemContext"
import "jest-styled-components"
import { graphql } from "react-relay"
import { FollowArtistButtonFragmentContainer } from "Components/FollowButton/FollowArtistButton"
import * as openAuthModal from "Utils/openAuthModal"
import { setupTestWrapperTL } from "DevTools/setupTestWrapper"
import { fireEvent, screen } from "@testing-library/react"
import { FollowArtistButton_Test_Query } from "__generated__/FollowArtistButton_Test_Query.graphql"
import { useMutation } from "Utils/Hooks/useMutation"
import { useFollowButtonTracking } from "Components/FollowButton/useFollowButtonTracking"

jest.unmock("react-relay")

jest.mock("Utils/Hooks/useMutation")
jest.mock("System/useSystemContext")
jest.mock("../useFollowButtonTracking")

const onFollow = jest.fn()

const { renderWithRelay } = setupTestWrapperTL<FollowArtistButton_Test_Query>({
  Component: props => {
    return (
      <FollowArtistButtonFragmentContainer
        artist={props.artist!}
        onFollow={onFollow}
      />
    )
  },
  query: graphql`
    query FollowArtistButton_Test_Query @relay_test_operation {
      artist(id: "example") {
        ...FollowArtistButton_artist
      }
    }
  `,
})

describe("FollowArtistButton", () => {
  const submitMutation = jest.fn()
  const trackFollow = jest.fn()

  beforeEach(() => {
    ;(useMutation as jest.Mock).mockImplementation(() => {
      return { submitMutation }
    })
    ;(useFollowButtonTracking as jest.Mock).mockImplementation(() => {
      return { trackFollow }
    })
  })

  afterEach(() => {
    jest.clearAllMocks()
  })

  describe("logged out", () => {
    beforeEach(() => {
      ;(useSystemContext as jest.Mock).mockImplementation(() => {
        return { isLoggedIn: false }
      })
    })

    it("renders correctly", () => {
      renderWithRelay()
      expect(screen.getByText("Follow")).toBeInTheDocument()
    })

    // FIXME: SWC_COMPILER_MIGRATION
    it.skip("opens the auth modal", () => {
      const openAuthToSatisfyIntent = jest.spyOn(
        openAuthModal,
        "openAuthToSatisfyIntent"
      )

      renderWithRelay({
        Artist: () => ({
          name: "Example",
          slug: "example",
        }),
      })

      const button = screen.getByRole("button")
      fireEvent.click(button)

      expect(openAuthToSatisfyIntent).toBeCalledWith(undefined, {
        contextModule: "artistHeader",
        entity: { name: "Example", slug: "example" },
        intent: "followArtist",
      })
    })
  })

  describe("logged in", () => {
    beforeEach(() => {
      ;(useSystemContext as jest.Mock).mockImplementation(() => {
        return { isLoggedIn: true }
      })
    })

    it("calls the follow mutation", () => {
      renderWithRelay({
        Artist: () => ({
          internalID: "example",
        }),
      })

      const button = screen.getByRole("button")
      fireEvent.click(button)

      expect(submitMutation).toBeCalledWith({
        variables: {
          input: {
            artistID: "example",
            unfollow: false,
          },
        },
      })
    })

    it("tracks the follow click when following", () => {
      renderWithRelay({
        Artist: () => ({
          isFollowed: false,
        }),
      })

      const button = screen.getByRole("button")
      fireEvent.click(button)

      expect(trackFollow).toBeCalledWith(false)
    })

    it("tracks the unfollow click when unfollowing", () => {
      renderWithRelay({
        Artist: () => ({
          isFollowed: true,
        }),
      })

      const button = screen.getByRole("button")
      fireEvent.click(button)

      expect(trackFollow).toBeCalledWith(true)
    })

    it("calls the onFollow callback", () => {
      renderWithRelay({
        Artist: () => ({
          isFollowed: true,
        }),
      })

      const button = screen.getByRole("button")
      fireEvent.click(button)

      expect(onFollow).toBeCalledTimes(1)
      expect(onFollow).toBeCalledWith(false)
    })
  })
})


text:
$packageName = 'VS2012.IdentityAndAccessTool'
$windowsInstallerName = 'Identity and Access Tool for Visual Studio 2012.*'
$installerType = 'VSIX'
$url = 'http://visualstudiogallery.msdn.microsoft.com/e21bf653-dfe1-4d81-b3d3-795cb104066e/file/68485/4/Identity%20and%20Access%20Tool.vsix' # download url
$url64 = $url # 64bit URL uses the same as $url
$silentArgs = "/Quiet /NoRestart /Log VS2012_U2.log"
$validExitCodes = @(0,3010)
try {
		Install-ChocolateyVsixPackage $packageName $url
}catch {
  Write-ChocolateyFailure $packageName $($_.Exception.Message)
  throw
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<title>Picture Captions</title>

Picture Captions


text:
package MailChimpClone::Model::DB;

use strict;
use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__->config(
    schema_class => 'DB::Schema',

    connect_info => {
        dsn => 'dbi:mysql:mc',
        user => 'root',
        password => '',
    }
);

=head1 NAME

MailChimpClone::Model::DB - Catalyst DBIC Schema Model

=head1 SYNOPSIS

See L<MailChimpClone>

=head1 DESCRIPTION

L<Catalyst::Model::DBIC::Schema> Model using schema L<DB::Schema>

=head1 GENERATED BY

Catalyst::Helper::Model::DBIC::Schema - 0.62

=head1 AUTHOR

ttpy

=head1 LICENSE

This library is free software, you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

1;


text:
import * as tsutils from "tsutils";
import * as ts from "typescript";

import * as Lint from "../index";

export class Rule extends Lint.Rules.OptionallyTypedRule {
    public static metadata: Lint.IRuleMetadata = {
        description: "Prevents unnecessary and/or misleading scope bindings on functions.",
        optionExamples: [true],
        options: null,
        optionsDescription: "Not configurable.",
        rationale: Lint.Utils.dedent`
            \`function\` expressions that are immediately bound to \`this\` are equivalent to \`() =>\` arrow lambdas.
            Additionally, there's no use in binding a scope to an arrow lambda, as it already has one.
        `,
        requiresTypeInfo: true,
        ruleName: "unnecessary-bind",
        type: "style",
        typescriptOnly: false,
    };

    public static FAILURE_STRING_FUNCTION =
        "Don't bind `this` without arguments as a scope to a function. Use an arrow lambda instead.";

    public static FAILURE_STRING_ARROW =
        "Don't bind scopes to arrow lambdas, as they already have a bound scope.";

    public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
        return this.applyWithFunction(sourceFile, walk);
    }

    public applyWithProgram(sourceFile: ts.SourceFile, program: ts.Program): Lint.RuleFailure[] {
        return this.applyWithFunction(sourceFile, walk, undefined, program.getTypeChecker());
    }
}

function walk(context: Lint.WalkContext, typeChecker?: ts.TypeChecker) {
    const variableUsage = tsutils.collectVariableUsage(context.sourceFile);

    function checkArrowFunction(node: ts.CallExpression): void {
        if (node.arguments.length !== 1) {
            return;
        }

        context.addFailureAtNode(node, Rule.FAILURE_STRING_ARROW);
    }

    function canFunctionExpressionBeFixed(
        callExpression: ts.CallExpression,
        valueDeclaration: ts.FunctionExpression,
    ): boolean {
        if (
            callExpression.arguments.length !== 1 ||
            callExpression.arguments[0].kind !== ts.SyntaxKind.ThisKeyword ||
            valueDeclaration.asteriskToken !== undefined ||
            valueDeclaration.decorators !== undefined
        ) {
            return false;
        }

        const { name } = valueDeclaration;
        if (name === undefined) {
            return true;
        }

        const nameInfo = variableUsage.get(name);
        return nameInfo === undefined || nameInfo.uses.length === 0;
    }

    function checkFunctionExpression(
        callExpression: ts.CallExpression,
        valueDeclaration: ts.FunctionExpression,
    ): void {
        if (!canFunctionExpressionBeFixed(callExpression, valueDeclaration)) {
            return;
        }

        context.addFailureAtNode(callExpression, Rule.FAILURE_STRING_FUNCTION);
    }

    function getArrowFunctionDeclaration(node: ts.Node): ts.ArrowFunction | undefined {
        if (typeChecker === undefined) {
            return undefined;
        }

        const { symbol } = typeChecker.getTypeAtLocation(node);
        if (symbol === undefined) {
            return undefined;
        }

        const { valueDeclaration } = symbol;
        if (valueDeclaration === undefined) {
            return undefined;
        }

        if (!tsutils.isArrowFunction(valueDeclaration)) {
            return undefined;
        }

        return valueDeclaration;
    }

    function isDecoratedPropertyMember(node: ts.CallExpression): boolean {
        return (
            node.parent !== undefined &&
            tsutils.isPropertyDeclaration(node.parent) &&
            node.parent.decorators !== undefined
        );
    }

    function checkCallExpression(node: ts.CallExpression): void {
        if (isDecoratedPropertyMember(node)) {
            return;
        }

        const bindExpression = node.expression;
        if (!isBindPropertyAccess(bindExpression)) {
            return;
        }

        const boundExpression = Lint.unwrapParentheses(bindExpression.expression);
        if (tsutils.isFunctionExpression(boundExpression)) {
            checkFunctionExpression(node, boundExpression);
            return;
        }

        const valueDeclaration = getArrowFunctionDeclaration(boundExpression);
        if (valueDeclaration !== undefined) {
            checkArrowFunction(node);
        }
    }

    return ts.forEachChild(context.sourceFile, function callback(node: ts.Node): void {
        if (ts.isCallExpression(node)) {
            checkCallExpression(node);
        }

        return ts.forEachChild(node, callback);
    });
}

function isBindPropertyAccess(
    node: ts.LeftHandSideExpression,
): node is ts.PropertyAccessExpression {
    return ts.isPropertyAccessExpression(node) && node.name.text === "bind";
}


text:
<?php
/**
 * TextFilter.php
 *
 * @since 19/01/17
 * @author gseidel
 */

namespace Enhavo\Bundle\AppBundle\Filter\Filter;

use Enhavo\Bundle\AppBundle\Filter\FilterInterface;
use Enhavo\Bundle\AppBundle\Type\AbstractType;
use Enhavo\Bundle\AppBundle\Filter\FilterQuery;

class BooleanFilter extends AbstractType implements FilterInterface
{
    public function render($options, $value)
    {
        return $this->renderTemplate('EnhavoAppBundle:Filter:boolean.html.twig', [
            'type' => $this->getType(),
            'value' => $value,
            'label' => $this->getOption('label', $options, ''),
            'translationDomain' => $this->getOption('translationDomain', $options, null),
            'icon' => $this->getOption('icon', $options, ''),
            'name' => $this->getRequiredOption('name', $options),
        ]);
    }

    public function buildQuery(FilterQuery $query, $options, $value)
    {
        $property = $this->getRequiredOption('property', $options);

        $value = (boolean)$value;
        if($value) {
            $equals = $this->getRequiredOption('equals', $options);
            $query->addWhere($property, FilterQuery::OPERATOR_EQUALS, $equals);
        }
    }

    public function getType()
    {
        return 'boolean';
    }
}


text:
/**
 * This is a model to store the value and the type of a crypted object.
 *
 * @param String value, crypted value.
 * @param String type, crypted type of object
 */
var Ink   = function(value, type){
  this.value = value;
  this.type  = type;
};

module.exports.Ink = Ink;


text:
package build

import (
	"fmt"
	"go/ast"
	"go/build"
	"go/parser"
	"go/scanner"
	"go/token"
	"go/types"
	"io"
	"io/ioutil"
	"os"
	"os/exec"
	"path"
	"path/filepath"
	"strconv"
	"strings"
	"time"

	"github.com/fsnotify/fsnotify"
	"github.com/gopherjs/gopherjs/compiler"
	"github.com/gopherjs/gopherjs/compiler/natives"
	"github.com/kardianos/osext"
	"github.com/neelance/sourcemap"
)

type ImportCError struct {
	pkgPath string
}

func (e *ImportCError) Error() string {
	return e.pkgPath + `: importing "C" is not supported by GopherJS`
}

func NewBuildContext(installSuffix string, buildTags []string) *build.Context {
	return &build.Context{
		GOROOT:        build.Default.GOROOT,
		GOPATH:        build.Default.GOPATH,
		GOOS:          build.Default.GOOS,
		GOARCH:        "js",
		InstallSuffix: installSuffix,
		Compiler:      "gc",
		BuildTags:     append(buildTags, "netgo"),
		ReleaseTags:   build.Default.ReleaseTags,
		CgoEnabled:    true, // detect `import "C"` to throw proper error
	}
}

// Import returns details about the Go package named by the import path. If the
// path is a local import path naming a package that can be imported using
// a standard import path, the returned package will set p.ImportPath to
// that path.
//
// In the directory containing the package, .go and .inc.js files are
// considered part of the package except for:
//
//    - .go files in package documentation
//    - files starting with _ or . (likely editor temporary files)
//    - files with build constraints not satisfied by the context
//
// If an error occurs, Import returns a non-nil error and a nil
// *PackageData.
func Import(path string, mode build.ImportMode, installSuffix string, buildTags []string) (*PackageData, error) {
	return importWithSrcDir(path, "", mode, installSuffix, buildTags)
}

func importWithSrcDir(path string, srcDir string, mode build.ImportMode, installSuffix string, buildTags []string) (*PackageData, error) {
	buildContext := NewBuildContext(installSuffix, buildTags)
	if path == "runtime" || path == "syscall" {
		buildContext.GOARCH = build.Default.GOARCH
		buildContext.InstallSuffix = "js"
		if installSuffix != "" {
			buildContext.InstallSuffix += "_" + installSuffix
		}
	}
	pkg, err := buildContext.Import(path, srcDir, mode)
	if err != nil {
		return nil, err
	}

	switch path {
	case "runtime":
		pkg.GoFiles = []string{"error.go"}
	case "runtime/internal/sys":
		pkg.GoFiles = []string{fmt.Sprintf("zgoos_%s.go", buildContext.GOOS), "zversion.go"}
	case "runtime/pprof":
		pkg.GoFiles = nil
	case "crypto/rand":
		pkg.GoFiles = []string{"rand.go", "util.go"}
	case "crypto/x509":
		pkg.CgoFiles = nil
	case "hash/crc32":
		pkg.GoFiles = []string{"crc32.go", "crc32_generic.go"}
	}

	if len(pkg.CgoFiles) > 0 {
		return nil, &ImportCError{path}
	}

	if pkg.IsCommand() {
		pkg.PkgObj = filepath.Join(pkg.BinDir, filepath.Base(pkg.ImportPath)+".js")
	}

	if _, err := os.Stat(pkg.PkgObj); os.IsNotExist(err) && strings.HasPrefix(pkg.PkgObj, build.Default.GOROOT) {
		// fall back to GOPATH
		firstGopathWorkspace := filepath.SplitList(build.Default.GOPATH)[0] // TODO: Need to check inside all GOPATH workspaces.
		gopathPkgObj := filepath.Join(firstGopathWorkspace, pkg.PkgObj[len(build.Default.GOROOT):])
		if _, err := os.Stat(gopathPkgObj); err == nil {
			pkg.PkgObj = gopathPkgObj
		}
	}

	jsFiles, err := jsFilesFromDir(pkg.Dir)
	if err != nil {
		return nil, err
	}

	return &PackageData{Package: pkg, JSFiles: jsFiles}, nil
}

// ImportDir is like Import but processes the Go package found in the named
// directory.
func ImportDir(dir string, mode build.ImportMode) (*PackageData, error) {
	pkg, err := build.ImportDir(dir, mode)
	if err != nil {
		return nil, err
	}

	jsFiles, err := jsFilesFromDir(pkg.Dir)
	if err != nil {
		return nil, err
	}

	return &PackageData{Package: pkg, JSFiles: jsFiles}, nil
}

// parseAndAugment parses and returns all .go files of given pkg.
// Standard Go library packages are augmented with files in compiler/natives folder.
// If isTest is true and pkg.ImportPath has no _test suffix, package is built for running internal tests.
// If isTest is true and pkg.ImportPath has _test suffix, package is built for running external tests.
//
// The native packages are augmented by the contents of natives.FS in the following way.
// The file names do not matter except the usual `_test` suffix. The files for
// native overrides get added to the package (even if they have the same name
// as an existing file from the standard library). For all identifiers that exist
// in the original AND the overrides, the original identifier in the AST gets
// replaced by `_`. New identifiers that don't exist in original package get added.
func parseAndAugment(pkg *build.Package, isTest bool, fileSet *token.FileSet) ([]*ast.File, error) {
	var files []*ast.File
	replacedDeclNames := make(map[string]bool)
	funcName := func(d *ast.FuncDecl) string {
		if d.Recv == nil || len(d.Recv.List) == 0 {
			return d.Name.Name
		}
		recv := d.Recv.List[0].Type
		if star, ok := recv.(*ast.StarExpr); ok {
			recv = star.X
		}
		return recv.(*ast.Ident).Name + "." + d.Name.Name
	}
	isXTest := strings.HasSuffix(pkg.ImportPath, "_test")
	importPath := pkg.ImportPath
	if isXTest {
		importPath = importPath[:len(importPath)-5]
	}

	nativesContext := &build.Context{
		GOROOT:   "/",
		GOOS:     build.Default.GOOS,
		GOARCH:   "js",
		Compiler: "gc",
		JoinPath: path.Join,
		SplitPathList: func(list string) []string {
			if list == "" {
				return nil
			}
			return strings.Split(list, "/")
		},
		IsAbsPath: path.IsAbs,
		IsDir: func(name string) bool {
			dir, err := natives.FS.Open(name)
			if err != nil {
				return false
			}
			defer dir.Close()
			info, err := dir.Stat()
			if err != nil {
				return false
			}
			return info.IsDir()
		},
		HasSubdir: func(root, name string) (rel string, ok bool) {
			panic("not implemented")
		},
		ReadDir: func(name string) (fi []os.FileInfo, err error) {
			dir, err := natives.FS.Open(name)
			if err != nil {
				return nil, err
			}
			defer dir.Close()
			return dir.Readdir(0)
		},
		OpenFile: func(name string) (r io.ReadCloser, err error) {
			return natives.FS.Open(name)
		},
	}
	if nativesPkg, err := nativesContext.Import(importPath, "", 0); err == nil {
		names := nativesPkg.GoFiles
		if isTest {
			names = append(names, nativesPkg.TestGoFiles...)
		}
		if isXTest {
			names = nativesPkg.XTestGoFiles
		}
		for _, name := range names {
			fullPath := path.Join(nativesPkg.Dir, name)
			r, err := nativesContext.OpenFile(fullPath)
			if err != nil {
				panic(err)
			}
			file, err := parser.ParseFile(fileSet, fullPath, r, parser.ParseComments)
			if err != nil {
				panic(err)
			}
			r.Close()
			for _, decl := range file.Decls {
				switch d := decl.(type) {
				case *ast.FuncDecl:
					replacedDeclNames[funcName(d)] = true
				case *ast.GenDecl:
					switch d.Tok {
					case token.TYPE:
						for _, spec := range d.Specs {
							replacedDeclNames[spec.(*ast.TypeSpec).Name.Name] = true
						}
					case token.VAR, token.CONST:
						for _, spec := range d.Specs {
							for _, name := range spec.(*ast.ValueSpec).Names {
								replacedDeclNames[name.Name] = true
							}
						}
					}
				}
			}
			files = append(files, file)
		}
	}
	delete(replacedDeclNames, "init")

	var errList compiler.ErrorList
	for _, name := range pkg.GoFiles {
		if !filepath.IsAbs(name) {
			name = filepath.Join(pkg.Dir, name)
		}
		r, err := os.Open(name)
		if err != nil {
			return nil, err
		}
		file, err := parser.ParseFile(fileSet, name, r, parser.ParseComments)
		r.Close()
		if err != nil {
			if list, isList := err.(scanner.ErrorList); isList {
				if len(list) > 10 {
					list = append(list[:10], &scanner.Error{Pos: list[9].Pos, Msg: "too many errors"})
				}
				for _, entry := range list {
					errList = append(errList, entry)
				}
				continue
			}
			errList = append(errList, err)
			continue
		}

		switch pkg.ImportPath {
		case "crypto/rand", "encoding/gob", "encoding/json", "expvar", "go/token", "log", "math/big", "math/rand", "regexp", "testing", "time":
			for _, spec := range file.Imports {
				path, _ := strconv.Unquote(spec.Path.Value)
				if path == "sync" {
					if spec.Name == nil {
						spec.Name = ast.NewIdent("sync")
					}
					spec.Path.Value = `"github.com/gopherjs/gopherjs/nosync"`
				}
			}
		}

		for _, decl := range file.Decls {
			switch d := decl.(type) {
			case *ast.FuncDecl:
				if replacedDeclNames[funcName(d)] {
					d.Name = ast.NewIdent("_")
				}
			case *ast.GenDecl:
				switch d.Tok {
				case token.TYPE:
					for _, spec := range d.Specs {
						s := spec.(*ast.TypeSpec)
						if replacedDeclNames[s.Name.Name] {
							s.Name = ast.NewIdent("_")
						}
					}
				case token.VAR, token.CONST:
					for _, spec := range d.Specs {
						s := spec.(*ast.ValueSpec)
						for i, name := range s.Names {
							if replacedDeclNames[name.Name] {
								s.Names[i] = ast.NewIdent("_")
							}
						}
					}
				}
			}
		}
		files = append(files, file)
	}
	if errList != nil {
		return nil, errList
	}
	return files, nil
}

type Options struct {
	GOROOT        string
	GOPATH        string
	Verbose       bool
	Quiet         bool
	Watch         bool
	CreateMapFile bool
	Minify        bool
	Color         bool
	BuildTags     []string
}

func (o *Options) PrintError(format string, a ...interface{}) {
	if o.Color {
		format = "\x1B[31m" + format + "\x1B[39m"
	}
	fmt.Fprintf(os.Stderr, format, a...)
}

func (o *Options) PrintSuccess(format string, a ...interface{}) {
	if o.Color {
		format = "\x1B[32m" + format + "\x1B[39m"
	}
	fmt.Fprintf(os.Stderr, format, a...)
}

type PackageData struct {
	*build.Package
	JSFiles    []string
	IsTest     bool // IsTest is true if the package is being built for running tests.
	SrcModTime time.Time
	UpToDate   bool
}

type Session struct {
	options  *Options
	Archives map[string]*compiler.Archive
	Types    map[string]*types.Package
	Watcher  *fsnotify.Watcher
}

func NewSession(options *Options) *Session {
	if options.GOROOT == "" {
		options.GOROOT = build.Default.GOROOT
	}
	if options.GOPATH == "" {
		options.GOPATH = build.Default.GOPATH
	}
	options.Verbose = options.Verbose || options.Watch

	s := &Session{
		options:  options,
		Archives: make(map[string]*compiler.Archive),
	}
	s.Types = make(map[string]*types.Package)
	if options.Watch {
		if out, err := exec.Command("ulimit", "-n").Output(); err == nil {
			if n, err := strconv.Atoi(strings.TrimSpace(string(out))); err == nil && n < 1024 {
				fmt.Printf("Warning: The maximum number of open file descriptors is very low (%d). Change it with 'ulimit -n 8192'.\n", n)
			}
		}

		var err error
		s.Watcher, err = fsnotify.NewWatcher()
		if err != nil {
			panic(err)
		}
	}
	return s
}

func (s *Session) InstallSuffix() string {
	if s.options.Minify {
		return "min"
	}
	return ""
}

func (s *Session) BuildDir(packagePath string, importPath string, pkgObj string) error {
	if s.Watcher != nil {
		s.Watcher.Add(packagePath)
	}
	buildPkg, err := NewBuildContext(s.InstallSuffix(), s.options.BuildTags).ImportDir(packagePath, 0)
	if err != nil {
		return err
	}
	pkg := &PackageData{Package: buildPkg}
	jsFiles, err := jsFilesFromDir(pkg.Dir)
	if err != nil {
		return err
	}
	pkg.JSFiles = jsFiles
	archive, err := s.BuildPackage(pkg)
	if err != nil {
		return err
	}
	if pkgObj == "" {
		pkgObj = filepath.Base(packagePath) + ".js"
	}
	if pkg.IsCommand() && !pkg.UpToDate {
		if err := s.WriteCommandPackage(archive, pkgObj); err != nil {
			return err
		}
	}
	return nil
}

func (s *Session) BuildFiles(filenames []string, pkgObj string, packagePath string) error {
	pkg := &PackageData{
		Package: &build.Package{
			Name:       "main",
			ImportPath: "main",
			Dir:        packagePath,
		},
	}

	for _, file := range filenames {
		if strings.HasSuffix(file, ".inc.js") {
			pkg.JSFiles = append(pkg.JSFiles, file)
			continue
		}
		pkg.GoFiles = append(pkg.GoFiles, file)
	}

	archive, err := s.BuildPackage(pkg)
	if err != nil {
		return err
	}
	if s.Types["main"].Name() != "main" {
		return fmt.Errorf("cannot build/run non-main package")
	}
	return s.WriteCommandPackage(archive, pkgObj)
}

func (s *Session) BuildImportPath(path string) (*compiler.Archive, error) {
	_, archive, err := s.buildImportPathWithSrcDir(path, "")
	return archive, err
}

func (s *Session) buildImportPathWithSrcDir(path string, srcDir string) (*PackageData, *compiler.Archive, error) {
	pkg, err := importWithSrcDir(path, srcDir, 0, s.InstallSuffix(), s.options.BuildTags)
	if s.Watcher != nil && pkg != nil { // add watch even on error
		s.Watcher.Add(pkg.Dir)
	}
	if err != nil {
		return nil, nil, err
	}

	archive, err := s.BuildPackage(pkg)
	if err != nil {
		return nil, nil, err
	}

	return pkg, archive, nil
}

func (s *Session) BuildPackage(pkg *PackageData) (*compiler.Archive, error) {
	if archive, ok := s.Archives[pkg.ImportPath]; ok {
		return archive, nil
	}

	if pkg.PkgObj != "" {
		var fileInfo os.FileInfo
		gopherjsBinary, err := osext.Executable()
		if err == nil {
			fileInfo, err = os.Stat(gopherjsBinary)
			if err == nil {
				pkg.SrcModTime = fileInfo.ModTime()
			}
		}
		if err != nil {
			os.Stderr.WriteString("Could not get GopherJS binary's modification timestamp. Please report issue.\n")
			pkg.SrcModTime = time.Now()
		}

		for _, importedPkgPath := range pkg.Imports {
			ignored := true
			for _, pos := range pkg.ImportPos[importedPkgPath] {
				importFile := filepath.Base(pos.Filename)
				for _, file := range pkg.GoFiles {
					if importFile == file {
						ignored = false
						break
					}
				}
				if !ignored {
					break
				}
			}
			if importedPkgPath == "unsafe" || ignored {
				continue
			}
			pkg, _, err := s.buildImportPathWithSrcDir(importedPkgPath, pkg.Dir)
			if err != nil {
				return nil, err
			}
			impModeTime := pkg.SrcModTime
			if impModeTime.After(pkg.SrcModTime) {
				pkg.SrcModTime = impModeTime
			}
		}

		for _, name := range append(pkg.GoFiles, pkg.JSFiles...) {
			fileInfo, err := os.Stat(filepath.Join(pkg.Dir, name))
			if err != nil {
				return nil, err
			}
			if fileInfo.ModTime().After(pkg.SrcModTime) {
				pkg.SrcModTime = fileInfo.ModTime()
			}
		}

		pkgObjFileInfo, err := os.Stat(pkg.PkgObj)
		if err == nil && !pkg.SrcModTime.After(pkgObjFileInfo.ModTime()) {
			// package object is up to date, load from disk if library
			pkg.UpToDate = true
			if pkg.IsCommand() {
				return nil, nil
			}

			objFile, err := os.Open(pkg.PkgObj)
			if err != nil {
				return nil, err
			}
			defer objFile.Close()

			archive, err := compiler.ReadArchive(pkg.PkgObj, pkg.ImportPath, objFile, s.Types)
			if err != nil {
				return nil, err
			}

			s.Archives[pkg.ImportPath] = archive
			return archive, err
		}
	}

	fileSet := token.NewFileSet()
	files, err := parseAndAugment(pkg.Package, pkg.IsTest, fileSet)
	if err != nil {
		return nil, err
	}

	localImportPathCache := make(map[string]*compiler.Archive)
	importContext := &compiler.ImportContext{
		Packages: s.Types,
		Import: func(path string) (*compiler.Archive, error) {
			if archive, ok := localImportPathCache[path]; ok {
				return archive, nil
			}
			_, archive, err := s.buildImportPathWithSrcDir(path, pkg.Dir)
			if err != nil {
				return nil, err
			}
			localImportPathCache[path] = archive
			return archive, nil
		},
	}
	archive, err := compiler.Compile(pkg.ImportPath, files, fileSet, importContext, s.options.Minify)
	if err != nil {
		return nil, err
	}

	for _, jsFile := range pkg.JSFiles {
		code, err := ioutil.ReadFile(filepath.Join(pkg.Dir, jsFile))
		if err != nil {
			return nil, err
		}
		archive.IncJSCode = append(archive.IncJSCode, []byte("\t(function() {\n")...)
		archive.IncJSCode = append(archive.IncJSCode, code...)
		archive.IncJSCode = append(archive.IncJSCode, []byte("\n\t}).call($global);\n")...)
	}

	if s.options.Verbose {
		fmt.Println(pkg.ImportPath)
	}

	s.Archives[pkg.ImportPath] = archive

	if pkg.PkgObj == "" || pkg.IsCommand() {
		return archive, nil
	}

	if err := s.writeLibraryPackage(archive, pkg.PkgObj); err != nil {
		if strings.HasPrefix(pkg.PkgObj, s.options.GOROOT) {
			// fall back to first GOPATH workspace
			firstGopathWorkspace := filepath.SplitList(s.options.GOPATH)[0]
			if err := s.writeLibraryPackage(archive, filepath.Join(firstGopathWorkspace, pkg.PkgObj[len(s.options.GOROOT):])); err != nil {
				return nil, err
			}
			return archive, nil
		}
		return nil, err
	}

	return archive, nil
}

func (s *Session) writeLibraryPackage(archive *compiler.Archive, pkgObj string) error {
	if err := os.MkdirAll(filepath.Dir(pkgObj), 0777); err != nil {
		return err
	}

	objFile, err := os.Create(pkgObj)
	if err != nil {
		return err
	}
	defer objFile.Close()

	return compiler.WriteArchive(archive, objFile)
}

func (s *Session) WriteCommandPackage(archive *compiler.Archive, pkgObj string) error {
	if err := os.MkdirAll(filepath.Dir(pkgObj), 0777); err != nil {
		return err
	}
	codeFile, err := os.Create(pkgObj)
	if err != nil {
		return err
	}
	defer codeFile.Close()

	sourceMapFilter := &compiler.SourceMapFilter{Writer: codeFile}
	if s.options.CreateMapFile {
		m := &sourcemap.Map{File: filepath.Base(pkgObj)}
		mapFile, err := os.Create(pkgObj + ".map")
		if err != nil {
			return err
		}

		defer func() {
			m.WriteTo(mapFile)
			mapFile.Close()
			fmt.Fprintf(codeFile, "//# sourceMappingURL=%s.map\n", filepath.Base(pkgObj))
		}()

		sourceMapFilter.MappingCallback = NewMappingCallback(m, s.options.GOROOT, s.options.GOPATH)
	}

	deps, err := compiler.ImportDependencies(archive, func(path string) (*compiler.Archive, error) {
		if archive, ok := s.Archives[path]; ok {
			return archive, nil
		}
		_, archive, err := s.buildImportPathWithSrcDir(path, "")
		return archive, err
	})
	if err != nil {
		return err
	}
	return compiler.WriteProgramCode(deps, sourceMapFilter)
}

func NewMappingCallback(m *sourcemap.Map, goroot, gopath string) func(generatedLine, generatedColumn int, originalPos token.Position) {
	return func(generatedLine, generatedColumn int, originalPos token.Position) {
		if !originalPos.IsValid() {
			m.AddMapping(&sourcemap.Mapping{GeneratedLine: generatedLine, GeneratedColumn: generatedColumn})
			return
		}
		file := originalPos.Filename
		switch hasGopathPrefix, prefixLen := hasGopathPrefix(file, gopath); {
		case hasGopathPrefix:
			file = filepath.ToSlash(file[prefixLen+4:])
		case strings.HasPrefix(file, goroot):
			file = filepath.ToSlash(file[len(goroot)+4:])
		default:
			file = filepath.Base(file)
		}
		m.AddMapping(&sourcemap.Mapping{GeneratedLine: generatedLine, GeneratedColumn: generatedColumn, OriginalFile: file, OriginalLine: originalPos.Line, OriginalColumn: originalPos.Column})
	}
}

func jsFilesFromDir(dir string) ([]string, error) {
	files, err := ioutil.ReadDir(dir)
	if err != nil {
		return nil, err
	}
	var jsFiles []string
	for _, file := range files {
		if strings.HasSuffix(file.Name(), ".inc.js") && file.Name()[0] != '_' && file.Name()[0] != '.' {
			jsFiles = append(jsFiles, file.Name())
		}
	}
	return jsFiles, nil
}

// hasGopathPrefix returns true and the length of the matched GOPATH workspace,
// iff file has a prefix that matches one of the GOPATH workspaces.
func hasGopathPrefix(file, gopath string) (hasGopathPrefix bool, prefixLen int) {
	gopathWorkspaces := filepath.SplitList(gopath)
	for _, gopathWorkspace := range gopathWorkspaces {
		gopathWorkspace = filepath.Clean(gopathWorkspace)
		if strings.HasPrefix(file, gopathWorkspace) {
			return true, len(gopathWorkspace)
		}
	}
	return false, 0
}

func (s *Session) WaitForChange() {
	s.options.PrintSuccess("watching for changes...\n")
	for {
		select {
		case ev := <-s.Watcher.Events:
			if ev.Op&(fsnotify.Create|fsnotify.Write|fsnotify.Remove|fsnotify.Rename) == 0 || filepath.Base(ev.Name)[0] == '.' {
				continue
			}
			if !strings.HasSuffix(ev.Name, ".go") && !strings.HasSuffix(ev.Name, ".inc.js") {
				continue
			}
			s.options.PrintSuccess("change detected: %s\n", ev.Name)
		case err := <-s.Watcher.Errors:
			s.options.PrintError("watcher error: %s\n", err.Error())
		}
		break
	}

	go func() {
		for range s.Watcher.Events {
			// consume, else Close() may deadlock
		}
	}()
	s.Watcher.Close()
}


text:
package collections.bank;

import java.util.LinkedList;
import java.util.Queue;

public class BankSimulation extends Simulation {
    private Customer[] tellers;
    private Queue<Customer> customersQueue;
    private int totalCustomers;
    private double totalTime;

    private static final double INTERARRIVAL = 1;
    private static final double PROCESSING = 5;

    public BankSimulation(int numberOfTellers) {
        this.tellers = new Customer[numberOfTellers];
        this.customersQueue = new LinkedList<Customer>();
        this.totalCustomers = 0;
        this.totalTime = 0;
    }

    public void add(Customer c) {
        boolean added = false;
        for (int i = 0; !added && i < this.tellers.length; i++) {
            if (this.tellers[i] == null) {
                this.addToTeller(i, c);
                added = true;
            }
        }
        if (!added) {
            this.customersQueue.add(c);
        }
        super.addEvent(new ArrivalEvent(super.getCurrentTime() + super.expdist(PROCESSING)));
    }

    private void addToTeller(int i, Customer c) {
        this.tellers[i] = c;
        this.addEvent(new DepartureEvent(super.getCurrentTime() + super.expdist(PROCESSING), i));
    }

    public void remove(int i) {
        Customer c = this.tellers[i];
        this.tellers[i] = null;
        this.totalCustomers += 1;
        this.totalTime += super.getCurrentTime() - c.getArrivalTime();
        if (this.customersQueue.size() > 0) {
            this.addToTeller(i, this.customersQueue.remove());
        }
    }

    @Override
    public void display() {
        for (int i = 0; i < this.tellers.length; i++) {
            if (this.tellers[i] == null) {
                System.out.print('.');
            } else {
                System.out.print('C');
            }
        }
        System.out.print('<');
        int q = this.customersQueue.size();
        for (int i = 1; i <= q; i++) {
            System.out.print('C');
        }
        System.out.println();
    }

    @Override
    public void displaySummary() {
        double averageTime = 0;
        if (this.totalCustomers > 0) {
            averageTime = this.totalTime / this.totalCustomers;
        }
        System.out.println(this.totalCustomers  + " customers. Average time " + averageTime + " minutes .");
    }
}


text:
describe('Integration: ResourceManager class', () => {

	let global: any = window,
		UrlGenerator = global.azResource.UrlGenerator;

	Reflect.defineMetadata('Url', new UrlGenerator('/book-types/{id}'), BookType);

	function BookType() {

		this.id = undefined;

		this.name = undefined;

	}

	Reflect.defineMetadata('Url', new UrlGenerator('/book-keywords/{id}'), BookKeyword);

	function BookKeyword() {

		this.id = undefined;
		this.name = undefined;

	}

	Reflect.defineMetadata('Url', new UrlGenerator('/books/{id}'), Book);

	function Book() {

		this.id = undefined;

		this.title = undefined;

		this.type = undefined;

		this.keywords = [];

		this.addKeyword = function (keyword) {

			this.keywords.push(keyword);

			return this;
		}

		this.removeKeyword = function (keyword) {

			let index = this.keywords.indexOf(keyword);

			if (index > -1) {
				this.keywords.splice(index, 1);
			}

			return this;

		}

	}

	let resourceManager, http, registry, configuration;

	beforeEach(() => {

		http = angular.injector(['ng']).get('$http');

		registry = new global.azResource.ApiRegistry();

		configuration = new global.azResource.Configuration(registry);

		resourceManager = new global.azResource.ResourceManager(http, configuration);

	});

	it('should create resource class based on annotations', () => {

		expect(resourceManager.getResource(Book) instanceof global.azResource.Api).toBeTruthy();

	});

});


text:
 /*!
 * \file
 * \brief
 */ /*-------------------------------------------------------------------*/

/*!
 * \file esextcTextureBorderClampTests.cpp
 * \brief Test group for texture border clamp tests
 */ /*-------------------------------------------------------------------*/

#include "esextcTextureBorderClampTests.hpp"
#include "esextcTextureBorderClampGetTexParameterIErrors.hpp"
#include "esextcTextureBorderClampParameterBorderColorError.hpp"
#include "esextcTextureBorderClampParameterTextureBorderColor.hpp"
#include "esextcTextureBorderClampSamplerParameterIError.hpp"
#include "esextcTextureBorderClampSamplerParameterIWithWrongPname.hpp"
#include "esextcTextureBorderClampSamplingTexture.cpp"
#include "esextcTextureBorderClampSamplingTextureGroup.hpp"
#include "esextcTextureBorderClampTexParameterIErrors.hpp"
#include "glwEnums.hpp"

namespace glcts
{

/** Constructor
 *
 * @param context       Test context
 * @param glslVersion   GLSL version
 **/
TextureBorderClampTests::TextureBorderClampTests(glcts::Context& context, const ExtParameters& extParams)
	: TestCaseGroupBase(context, extParams, "texture_border_clamp", "Texture Border Clamp Tests")
{
	/* No implementation needed */
}

/** Initializes test cases for texture border clamp tests
 **/
void TextureBorderClampTests::init(void)
{
	/* Initialize base class */
	TestCaseGroupBase::init();

	/* Texture Border Clamp Border Color Errors (Test 1) */
	addChild(
		new TextureBorderClampParameterBorderColorErrorTest(m_context, m_extParams, "border_color_errors", "Test 1"));

	/* Texture Border Clamp glTexParameterIivEXT(), glTexParameterIuivEXT() Errors (Test 2) */
	addChild(new TextureBorderClampTexParameterIErrorsTest(m_context, m_extParams, "texparameteri_errors", "Test 2"));

	/* Texture Border Clamp glGetTexParameterIivEXT(), glGetTexParameterIuivEXT() Errors (Test 3)*/
	addChild(
		new TextureBorderClampGetTexParameterIErrorsTest(m_context, m_extParams, "gettexparameteri_errors", "Test 3"));

	/* Texture Border Clamp glGetSamplerParameterI* and glSamplerParameterI* errors for non generate sampler (Test 4)*/
	addChild(new TextureBorderClampSamplerParameterIErrorTest(m_context, m_extParams,
															  "samplerparameteri_non_gen_sampler_error", "Test 4"));

	/* Texture Border Clamp glGetSamplerParameterI* and glSamplerParameterI* errors for non generate sampler (Test 5)*/
	addChild(new TextureBorderClampSamplerParameterIWithWrongPnameTest(m_context, m_extParams,
																	   "samplerparameteri_with_wrong_pname", "Test 5"));

	/* Texture Border Clamp glGetSamplerParameterI* and glSamplerParameterI* errors for non GL_TEXTURE_BORDER_COLOR_EXT (Test 6)*/
	addChild(new TextureBorderClampParameterTextureBorderColor(m_context, m_extParams, "samplerparameteri_border_color",
															   "Test 6"));

	/* Texture Border Clamp Sampling Texture (Test 7) */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DRGBA32F(
		4, 4, GL_TEXTURE_2D, GL_RGBA32F, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 256, 256, 1, 0.0f, 1.0f, 0, 255,
		GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DRGBA32F", "Test 7", configurationTexture2DRGBA32F));

	/* GL_R32I */
	TestConfiguration<glw::GLint, glw::GLint> configurationTexture2DR32I(1, 4, GL_TEXTURE_2D, GL_R32I, GL_R32I,
																		 GL_NEAREST, GL_RED_INTEGER, GL_RGBA_INTEGER,
																		 256, 256, 1, 0, 255, 0, 255, GL_INT, GL_INT);

	addChild(new TextureBorderClampSamplingTexture<glw::GLint, glw::GLint>(m_context, m_extParams, "Texture2DR32I",
																		   "Test 7", configurationTexture2DR32I));

	/* GL_R32UI */
	TestConfiguration<glw::GLuint, glw::GLuint> configurationTexture2DR32UI(
		1, 4, GL_TEXTURE_2D, GL_R32UI, GL_R32UI, GL_NEAREST, GL_RED_INTEGER, GL_RGBA_INTEGER, 256, 256, 1, 0, 255, 0,
		255, GL_UNSIGNED_INT, GL_UNSIGNED_INT);

	addChild(new TextureBorderClampSamplingTexture<glw::GLuint, glw::GLuint>(m_context, m_extParams, "Texture2DR32UI",
																			 "Test 7", configurationTexture2DR32UI));

	/* GL_RGBA8 */
	TestConfiguration<glw::GLubyte, glw::GLubyte> configurationTexture2DRGBA8(
		4, 4, GL_TEXTURE_2D, GL_RGBA8, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 256, 256, 1, 0, 255, 0, 255,
		GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLubyte, glw::GLubyte>(m_context, m_extParams, "Texture2DRGBA8",
																			   "Test 7", configurationTexture2DRGBA8));

	/* GL_DEPTH_COMPONENT32F */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DDC32F(
		1, 1, GL_TEXTURE_2D, GL_DEPTH_COMPONENT32F, GL_R8, GL_NEAREST, GL_DEPTH_COMPONENT, GL_RED, 256, 256, 1, 0, 255,
		0, 255, GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(m_context, m_extParams, "Texture2DDC32F",
																			   "Test 7", configurationTexture2DDC32F));

	/* GL_DEPTH_COMPONENT16 */
	TestConfiguration<glw::GLushort, glw::GLubyte> configurationTexture2DDC16(
		1, 1, GL_TEXTURE_2D, GL_DEPTH_COMPONENT16, GL_R8, GL_NEAREST, GL_DEPTH_COMPONENT, GL_RED, 256, 256, 1, 0, 255,
		0, 255, GL_UNSIGNED_SHORT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLushort, glw::GLubyte>(m_context, m_extParams, "Texture2DDC16",
																				"Test 7", configurationTexture2DDC16));

	/* GL_COMPRESSED_RGBA8_ETC2_EAC */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DCompressed(
		4, 4, GL_TEXTURE_2D, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 64, 64, 1, 0, 1, 0,
		255, GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DCompressed", "Test 7", configurationTexture2DCompressed));

	/* Target GL_TEXTURE_2D_ARRAY */

	/* GL_RGBA32F */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DArrayRGBA32F(
		4, 4, GL_TEXTURE_2D_ARRAY, GL_RGBA32F, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 256, 256, 6, 0.0f, 1.0f, 0, 255,
		GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DArrayRGBA32F", "Test 7", configurationTexture2DArrayRGBA32F));

	/* GL_R32I */
	TestConfiguration<glw::GLint, glw::GLint> configurationTexture2DArrayR32I(
		1, 4, GL_TEXTURE_2D_ARRAY, GL_R32I, GL_R32I, GL_NEAREST, GL_RED_INTEGER, GL_RGBA_INTEGER, 256, 256, 6, 0, 255,
		0, 255, GL_INT, GL_INT);

	addChild(new TextureBorderClampSamplingTexture<glw::GLint, glw::GLint>(m_context, m_extParams, "Texture2DArrayR32I",
																		   "Test 7", configurationTexture2DArrayR32I));

	/* GL_R32UI */
	TestConfiguration<glw::GLuint, glw::GLuint> configurationTexture2DArrayR32UI(
		1, 4, GL_TEXTURE_2D_ARRAY, GL_R32UI, GL_R32UI, GL_NEAREST, GL_RED_INTEGER, GL_RGBA_INTEGER, 256, 256, 6, 0, 255,
		0, 255, GL_UNSIGNED_INT, GL_UNSIGNED_INT);

	addChild(new TextureBorderClampSamplingTexture<glw::GLuint, glw::GLuint>(
		m_context, m_extParams, "Texture2DArrayR32UI", "Test 7", configurationTexture2DArrayR32UI));

	/* GL_RGBA8 */
	TestConfiguration<glw::GLubyte, glw::GLubyte> configurationTexture2DArrayRGBA8(
		4, 4, GL_TEXTURE_2D_ARRAY, GL_RGBA8, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 256, 256, 6, 0, 255, 0, 255,
		GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLubyte, glw::GLubyte>(
		m_context, m_extParams, "Texture2DArrayRGBA8", "Test 7", configurationTexture2DArrayRGBA8));

	/* GL_COMPRESSED_RGBA8_ETC2_EAC */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DArrayCompressed(
		4, 4, GL_TEXTURE_2D_ARRAY, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 64, 64, 6, 0,
		1, 0, 255, GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DArrayCompressed", "Test 7", configurationTexture2DArrayCompressed));

	/* Target GL_TEXTURE_3D */

	/* GL_RGBA32F */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture3DRGBA32F(
		4, 4, GL_TEXTURE_3D, GL_RGBA32F, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 256, 256, 6, 0.0f, 1.0f, 0, 255,
		GL_FLOAT, GL_UNSIGNED_BYTE);
	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture3DRGBA32F", "Test 7", configurationTexture3DRGBA32F));

	/* GL_R32I */
	TestConfiguration<glw::GLint, glw::GLint> configurationTexture3DR32I(1, 4, GL_TEXTURE_3D, GL_R32I, GL_R32I,
																		 GL_NEAREST, GL_RED_INTEGER, GL_RGBA_INTEGER,
																		 256, 256, 6, 0, 255, 0, 255, GL_INT, GL_INT);

	addChild(new TextureBorderClampSamplingTexture<glw::GLint, glw::GLint>(m_context, m_extParams, "Texture3DR32I",
																		   "Test 7", configurationTexture3DR32I));

	/* GL_R32UI */
	TestConfiguration<glw::GLuint, glw::GLuint> configurationTexture3DR32UI(
		1, 4, GL_TEXTURE_3D, GL_R32UI, GL_R32UI, GL_NEAREST, GL_RED_INTEGER, GL_RGBA_INTEGER, 256, 256, 6, 0, 255, 0,
		255, GL_UNSIGNED_INT, GL_UNSIGNED_INT);

	addChild(new TextureBorderClampSamplingTexture<glw::GLuint, glw::GLuint>(m_context, m_extParams, "Texture3DR32UI",
																			 "Test 7", configurationTexture3DR32UI));

	/* GL_RGBA8 */
	TestConfiguration<glw::GLubyte, glw::GLubyte> configurationTexture3DRGBA8(
		4, 4, GL_TEXTURE_3D, GL_RGBA8, GL_RGBA8, GL_NEAREST, GL_RGBA, GL_RGBA, 256, 256, 6, 0, 255, 0, 255,
		GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLubyte, glw::GLubyte>(m_context, m_extParams, "Texture3DRGBA8",
																			   "Test 7", configurationTexture3DRGBA8));

	/* Filtering GL_LINEAR */

	/* Target GL_TEXTURE_2D */

	/* GL_RGBA32F */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DRGBA32FLinear(
		4, 4, GL_TEXTURE_2D, GL_RGBA32F, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 256, 256, 1, 0.0f, 1.0f, 0, 255,
		GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DRGBA32FLinear", "Test 7", configurationTexture2DRGBA32FLinear));

	/* GL_RGBA8 */
	TestConfiguration<glw::GLubyte, glw::GLubyte> configurationTexture2DRGBA8Linear(
		4, 4, GL_TEXTURE_2D, GL_RGBA8, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 256, 256, 1, 0, 255, 0, 255,
		GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLubyte, glw::GLubyte>(
		m_context, m_extParams, "Texture2DRGBA8Linear", "Test 7", configurationTexture2DRGBA8Linear));

	/* GL_DEPTH_COMPONENT32F */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DDC32FLinear(
		1, 1, GL_TEXTURE_2D, GL_DEPTH_COMPONENT32F, GL_R8, GL_LINEAR, GL_DEPTH_COMPONENT, GL_RED, 256, 256, 1, 0, 255,
		0, 255, GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DDC32FLinear", "Test 7", configurationTexture2DDC32FLinear));

	/* GL_DEPTH_COMPONENT16 */
	TestConfiguration<glw::GLushort, glw::GLubyte> configurationTexture2DDC16Linear(
		1, 1, GL_TEXTURE_2D, GL_DEPTH_COMPONENT16, GL_R8, GL_LINEAR, GL_DEPTH_COMPONENT, GL_RED, 256, 256, 1, 0, 255, 0,
		255, GL_UNSIGNED_SHORT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLushort, glw::GLubyte>(
		m_context, m_extParams, "Texture2DDC16Linear", "Test 7", configurationTexture2DDC16Linear));

	/* GL_COMPRESSED_RGBA8_ETC2_EAC */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DCompressedLinear(
		4, 4, GL_TEXTURE_2D, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 64, 64, 1, 0, 1, 0,
		255, GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DCompressedLinear", "Test 7", configurationTexture2DCompressedLinear));

	/* Target GL_TEXTURE_2D_ARRAY */

	/* GL_RGBA32F */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DArrayRGBA32FLinear(
		4, 4, GL_TEXTURE_2D_ARRAY, GL_RGBA32F, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 256, 256, 6, 0.0f, 1.0f, 0, 255,
		GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DArrayRGBA32FLinear", "Test 7", configurationTexture2DArrayRGBA32FLinear));

	/* GL_RGBA8 */
	TestConfiguration<glw::GLubyte, glw::GLubyte> configurationTexture2DArrayRGBA8Linear(
		4, 4, GL_TEXTURE_2D_ARRAY, GL_RGBA8, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 256, 256, 6, 0, 255, 0, 255,
		GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLubyte, glw::GLubyte>(
		m_context, m_extParams, "Texture2DArrayRGBA8Linear", "Test 7", configurationTexture2DArrayRGBA8Linear));

	/* GL_COMPRESSED_RGBA8_ETC2_EAC */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture2DArrayCompressedLinear(
		4, 4, GL_TEXTURE_2D_ARRAY, GL_COMPRESSED_RGBA8_ETC2_EAC, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 64, 64, 6, 0, 1,
		0, 255, GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture2DArrayCompressedLinear", "Test 7",
		configurationTexture2DArrayCompressedLinear));

	/* Target GL_TEXTURE_3D*/

	/* GL_RGBA32F */
	TestConfiguration<glw::GLfloat, glw::GLubyte> configurationTexture3DRGBA32FLinear(
		4, 4, GL_TEXTURE_3D, GL_RGBA32F, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 256, 256, 6, 0.0f, 1.0f, 0, 255,
		GL_FLOAT, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLfloat, glw::GLubyte>(
		m_context, m_extParams, "Texture3DRGBA32FLinear", "Test 7", configurationTexture3DRGBA32FLinear));

	/* GL_RGBA8 */
	TestConfiguration<glw::GLubyte, glw::GLubyte> configurationTexture3DRGBA8Linear(
		4, 4, GL_TEXTURE_3D, GL_RGBA8, GL_RGBA8, GL_LINEAR, GL_RGBA, GL_RGBA, 256, 256, 6, 0, 255, 0, 255,
		GL_UNSIGNED_BYTE, GL_UNSIGNED_BYTE);

	addChild(new TextureBorderClampSamplingTexture<glw::GLubyte, glw::GLubyte>(
		m_context, m_extParams, "Texture3DRGBA8Linear", "Test 7", configurationTexture3DRGBA8Linear));
}

} // namespace glcts


text:
@interface SCLeftTitleRightImg : UIButton

@end


text:
require "chef/resource"
require "chef/provider/http_request"

class Chef
  class Resource
    class HttpRequest < Chef::Resource

      identity_attr :url

      default_action :get
      allowed_actions :get, :put, :post, :delete, :head, :options

      def initialize(name, run_context = nil)
        super
        @message = name
        @url = nil
        @headers = {}
      end

      def url(args = nil)
        set_or_return(
          :url,
          args,
          :kind_of => String,
        )
      end

      def message(args = nil, &block)
        args = block if block_given?
        set_or_return(
          :message,
          args,
          :kind_of => Object,
        )
      end

      def headers(args = nil)
        set_or_return(
          :headers,
          args,
          :kind_of => Hash,
        )
      end

    end
  end
end


text:
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;

namespace WcfClientProxyGenerator
{
    /// <summary>
    /// Configuration options for the generated WCF proxy
    /// </summary>
    public interface IProxyConfigurator
    {
        /// <summary>
        /// Uses the default endpoint configuration from the web.config or app.config
        /// </summary>
        void UseDefaultEndpoint();

        /// <summary>
        /// Specifies the endpoint configuration to use
        /// </summary>
        /// <param name="endpointConfigurationName"></param>
        void SetEndpoint(string endpointConfigurationName);

        /// <summary>
        /// Specifies the binding and address to use
        /// </summary>
        /// <param name="binding"></param>
        /// <param name="endpointAddress"></param>
        void SetEndpoint(Binding binding, EndpointAddress endpointAddress);

        /// <summary>
        /// Specifies the binding, address to use and callbackInstance to use with DuplexChannel
        /// </summary>
        /// <param name="binding"></param>
        /// <param name="endpointAddress"></param>
        /// <param name="callbackInstance"></param>
        void SetEndpoint(Binding binding, EndpointAddress endpointAddress, object callbackInstance);

        /// <summary>
        /// Specifies the binding, address to use and callbackInstance to use with DuplexChannel
        /// </summary>
        /// <param name="binding"></param>
        /// <param name="endpointAddress"></param>
        /// <param name="instanceContext"></param>
        void SetEndpoint<TCallback>(Binding binding, EndpointAddress endpointAddress, InstanceContext<TCallback> instanceContext);

        /// <summary>
        /// Specifies the endpoint configuration to use.
        /// </summary>
        /// <param name="endpoint"></param>
        void SetEndpoint(ServiceEndpoint endpoint);

        /// <summary>
        /// Specifies the endpoint configuration to use.
        /// </summary>
        /// <param name="endpoint"></param>
        /// <param name="instanceContext"></param>
        void SetEndpoint<TCallback>(ServiceEndpoint endpoint, InstanceContext<TCallback> instanceContext);

        /// <summary>
        /// Event that is fired immediately before the service method will be called. This event
        /// is called only once per request.
        /// </summary>
        event OnCallBeginHandler OnCallBegin;

        /// <summary>
        /// Event that is fired immediately after the request successfully completes.
        /// </summary>
        event OnCallSuccessHandler OnCallSuccess;

        /// <summary>
        /// Event that is fired when the method is about to be called.
        /// The event is fired for every attempt to call the service method.
        /// </summary>
        event OnInvokeHandler OnBeforeInvoke;

        /// <summary>
        /// Event that is fired after the service method has been called.
        /// This event fires only when the method has been successfully called.
        /// </summary>
        event OnInvokeHandler OnAfterInvoke;

        /// <summary>
        /// Event that is fired if the service call fails with an exception.
        /// This event is fired for every failed attempt to call the service method.
        /// </summary>
        event OnExceptionHandler OnException;

        /// <summary>
        /// Allows access to WCF extensibility features.
        /// </summary>
        /// <remarks>
        /// Make sure this is called after any other endpoint-modifying configuration operations,
        /// as not doing so will not produce expected results.
        /// </remarks>
        ChannelFactory ChannelFactory { get; }

        #region HandleRequestArgument

        /// <summary>
        /// Allows inspection or modification of request arguments immediately before sending the request.
        /// </summary>
        /// <typeparam name="TArgument">Type or parent type/interface of the argument</typeparam>
        /// <param name="where">Predicate to filter the request arguments by properties of the request, or the parameter name</param>
        /// <param name="handler">Delegate that takes a <typeparamref name="TArgument"/></param>
        void HandleRequestArgument<TArgument>(Func<TArgument, string, bool> where, Action<TArgument> handler);

        /// <summary>
        /// Allows inspection or modification of request arguments immediately before sending the request.
        /// </summary>
        /// <typeparam name="TArgument">Type or parent type/interface of the argument</typeparam>
        /// <param name="handler">Delegate that takes a <typeparamref name="TArgument"/></param>
        void HandleRequestArgument<TArgument>(Action<TArgument> handler);

        /// <summary>
        /// Allows inspection or modification of request arguments immediately before sending the request.
        /// </summary>
        /// <typeparam name="TArgument">Type or parent type/interface of the argument</typeparam>
        /// <param name="where">Predicate to filter the request arguments by properties of the request, or the parameter name</param>
        /// <param name="handler">Delegate that takes a <typeparamref name="TArgument"/> and returns a <typeparamref name="TArgument"/></param>
        void HandleRequestArgument<TArgument>(Func<TArgument, string, bool> where, Func<TArgument, TArgument> handler);

        /// <summary>
        /// Allows inspection or modification of request arguments immediately before sending the request.
        /// </summary>
        /// <typeparam name="TArgument">Type or parent type/interface of the argument</typeparam>
        /// <param name="handler">Delegate that takes a <typeparamref name="TArgument"/> and returns a <typeparamref name="TArgument"/></param>
        void HandleRequestArgument<TArgument>(Func<TArgument, TArgument> handler);

        #endregion

        #region HandleResponse

        /// <summary>
        /// Allows inspecting and modifying the <typeparamref name="TResponse"/> object
        /// before returning the response to the calling method.
        /// </summary>
        /// <typeparam name="TResponse">Type or parent type/interface of the response</typeparam>
        /// <param name="where">Predicate to filter responses based on its parameters</param>
        /// <param name="handler">
        /// Delegate that takes a <typeparamref name="TResponse"/>
        /// </param>
        void HandleResponse<TResponse>(Predicate<TResponse> where, Action<TResponse> handler);

        /// <summary>
        /// Allows inspecting and modifying the <typeparamref name="TResponse"/> object
        /// before returning the response to the calling method.
        /// </summary>
        /// <typeparam name="TResponse">Type or parent type/interface of the response</typeparam>
        /// <param name="handler">
        /// Delegate that takes a <typeparamref name="TResponse"/>
        /// </param>
        void HandleResponse<TResponse>(Action<TResponse> handler);

        /// <summary>
        /// Allows inspecting and modifying the <typeparamref name="TResponse"/> object
        /// before returning the response to the calling method.
        /// </summary>
        /// <typeparam name="TResponse">Type or parent type/interface of the response</typeparam>
        /// <param name="where">Predicate to filter responses based on its parameters</param>
        /// <param name="handler">
        /// Delegate that takes a <typeparamref name="TResponse"/> and returns a <typeparamref name="TResponse"/>
        /// </param>
        void HandleResponse<TResponse>(Predicate<TResponse> where, Func<TResponse, TResponse> handler);

        /// <summary>
        /// Allows inspecting and modifying the <typeparamref name="TResponse"/> object
        /// before returning the response to the calling method.
        /// </summary>
        /// <typeparam name="TResponse">Type or parent type/interface of the response</typeparam>
        /// <param name="handler">
        /// Delegate that takes a <typeparamref name="TResponse"/> and returns a <typeparamref name="TResponse"/>
        /// </param>
        void HandleResponse<TResponse>(Func<TResponse, TResponse> handler);

        #endregion
    }
}


text:
package com.netopyr.reduxfx.examples.treeview.actions;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

public class AddSprintAction {
	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
			.toString();
	}
}


text:
  Genouilly est
       un village
       localisé dans le département de Cher en Centre. On dénombrait 727 habitants en 2008.

À coté de Genouilly sont situées les communes de
Graçay située à 6 km, 1 527 habitants,
Thénioux située à 7 km, 591 habitants,
Nohant-en-Graçay située à 6 km, 311 habitants,
Orville localisée à 8 km, 125 habitants,
Anjouin située à 6 km, 351 habitants,
Saint-Outrille située à 6 km, 213 habitants,
 entre autres. De plus, Genouilly est située à seulement quatorze km de Vierzon.

La commune compte quelques  aménagements, elle propose entre autres un terrain de tennis, un terrain de sport et une boucle de randonnée.

À Genouilly, la valorisation moyenne à l'achat d'un appartement s'évalue à zero € du m² en vente. Le prix moyen d'une maison à l'achat se situe à 1 202 € du m². À la location le prix moyen se situe à 0 € du m² par mois.

Si vous pensez demenager à Genouilly, vous pourrez facilement trouver une maison à vendre.

Le parc de logements, à Genouilly, était réparti en 2011 en cinq appartements et 455 maisons soit
 un marché relativement équilibré.


text:
$(document).ready(function () {
  $('.js-prepaid-promo-code').click(function (event) {
    var code = $(event.target).text();
    $('#promotional_code_promo_code').val(code);
    return false;
  });
})


text:
import { INC, DEC } from './actionTypes'

function reducer(state = 0, action) {
  switch (action.type) {
    case INC:
      return state + action.by
    case DEC:
      return state > action.by ? state - action.by : 0
    default:
      return state
  }
}

const getValue = state => state

export default reducer
export { getValue }


text:
Package.describe({
  summary: 'Telescope blank package – use as template for your own packages',
  version: '0.1.0',
  name: 'telescope-trackfire'
});

Npm.depends({
  // NPM package dependencies
});

Package.onUse(function (api) {

  // --------------------------- 1. Meteor packages dependencies ---------------------------

  // automatic (let the package specify where it's needed)

  api.use([
    'tap:i18n',                   // internationalization package
    'iron:router',                // routing package
    'telescope-base',             // basic Telescope hooks and objects
    'telescope-lib',              // useful functions
    'telescope-settings',
    'telescope-i18n',             // internationalization wrapper
    'fourseven:scss'              // SCSS compilation package
  ]);

  // client

  api.use([
    'jquery',                     // useful for DOM interactions
    'underscore',                 // JavaScript swiss army knife library
    'templating'                  // required for client-side templates
  ], ['client']);

  // server

  api.use([
    //
  ], ['server']);

  // ---------------------------------- 2. Files to include ----------------------------------

  // i18n config (must come first)

  api.add_files([
    'package-tap.i18n'
  ], ['client', 'server']);

  // both

  api.add_files([
    'lib/custom_fields.js',
    'lib/hooks.js',
    'lib/main.js',
    'lib/routes.js',
    'lib/settings.js',
    'lib/templates.js'
  ], ['client', 'server']);

  // client

  api.add_files([
    'lib/client/templates/custom_template.html',
    'lib/client/templates/custom_template.js',
    'lib/client/templates/customPostTitle.html',
    'lib/client/templates/customPostTitle.js',
    'lib/client/stylesheets/custom.scss',
    'lib/client/templates/trackfireUpvotes.html',
    'lib/client/templates/trackfirePostsList.html',
    'lib/client/templates/trackfireNav.html',
    'lib/client/templates/trackfireCategoryList.html',
    'lib/client/templates/trackfireCategoryList.js',
    'lib/client/templates/trackfireCategoryItem.html',
    'lib/client/templates/trackfireCategoryItem.js',
    'lib/client/templates/trackfirePostInfo.html',
    'lib/client/templates/trackfirePostInfo.js',
    'lib/client/templates/trackfirePostDomain.html',
    'lib/client/templates/trackfirePostAuthor.html',
    'lib/client/templates/trackfirePostCategories.html',
    'lib/client/templates/trackfirePostCategories.js',
    'lib/client/templates/trackfireCategories.html',
    'lib/client/templates/trackfireSubCategoryItem.html',
    'lib/client/templates/trackfireSubCategoryItem.js',
    'lib/client/templates/trackfireSubCategoryList.js'

  ], ['client']);

  // server

  api.add_files([
    'lib/server/publications.js',
    'lib/server/getSoundcloudEmbed.js'
  ], ['server']);

  // i18n languages (must come last)

  api.add_files([
    'i18n/en.i18n.json',
  ], ['client', 'server']);

  // -------------------------------- 3. Variables to export --------------------------------

  api.export([
    'myFunction'
  ]);

});


text:
#include "gyroscopeIndicator.h"

#include <QString>
#include <QPainter>

#include <trikControl/gyroSensorInterface.h>

using namespace trikGui;

static constexpr int MAX_GYROSCOPE_VAL = 100000;
static constexpr int ARC_DRAWING_CONST = 16;

GyroscopeIndicator::GyroscopeIndicator(trikControl::GyroSensorInterface *gyroscope
		, QWidget *parent)
	: AbstractIndicator(parent)
	, mTitle(tr("Gyroscope"))
	, mGyroscope(gyroscope)
{
	mTitle.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
	mValueX.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
	mValueY.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
	mValueZ.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
	mCircle.setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);

	mLayout.addWidget(&mTitle);
	mLayout.addWidget(&mValueX);
	mLayout.addWidget(&mValueY);
	mLayout.addWidget(&mValueZ);

	mLayout.addWidget(&mCircle);

	setLayout(&mLayout);
}

void GyroscopeIndicator::renew()
{
	const auto &value = mGyroscope != nullptr ? mGyroscope->read() : QVector<int>();

	const auto &text = [&value](int i, int &out) {
		return value.size() > i ? QString::number(out = value[i]) : tr("Error");
	};

	mValueX.setText(QString("x: ") + text(0, mX));
	mValueY.setText(QString("y: ") + text(1, mY));
	mValueZ.setText(QString("z: ") + text(2, mZ));

	update();
}

void GyroscopeIndicator::resizeEvent(QResizeEvent *)
{
	auto size = qMin(mCircle.width(), mCircle.height());
	QPointF topleft((mCircle.width() - size) / 2, (mCircle.height() - size) / 2);
	mBounds = QRectF(topleft, QSize(size, size));
}

template<typename T>
T constrain(T value, T max, T min)
{
	return (value > max) ? max : (value < min) ? min : value;
}

void GyroscopeIndicator::paintEvent(QPaintEvent *)
{
	QPixmap pixmap(mCircle.size());
	pixmap.fill(Qt::transparent);

	QPainter painter(&pixmap);

	painter.setRenderHint(QPainter::HighQualityAntialiasing);

	painter.setPen(QPen(QBrush(Qt::black), mBounds.width() * 0.003));
	painter.setBrush(QBrush(Qt::transparent));
	painter.drawEllipse(mBounds);

	// draw crosshair
	painter.setPen(QPen(QBrush(Qt::black), mBounds.width() * 0.001));
	painter.drawLine(QPointF(mBounds.left(), mBounds.center().y()), QPointF(mBounds.right(), mBounds.center().y()));
	painter.drawLine(QPointF(mBounds.center().x(), mBounds.top()), QPointF(mBounds.center().x(), mBounds.bottom()));

	// draw x, y lines
	painter.setPen(QPen(QBrush(Qt::blue), mBounds.width() * 0.02));
	auto xShift = constrain(mX, MAX_GYROSCOPE_VAL, -MAX_GYROSCOPE_VAL) * mBounds.width() / (2 * MAX_GYROSCOPE_VAL);
	painter.drawLine(mBounds.center(), QPointF(mBounds.center().x() + xShift, mBounds.center().y()));

	painter.setPen(QPen(QBrush(Qt::green), mBounds.width() * 0.02));
	auto yShift = constrain(mY, MAX_GYROSCOPE_VAL, -MAX_GYROSCOPE_VAL) * mBounds.width() / (2 * MAX_GYROSCOPE_VAL);
	painter.drawLine(mBounds.center(), QPointF(mBounds.center().x(), mBounds.center().y() + yShift));

	// draw z arc
	painter.setPen(QPen(QBrush(Qt::red), mBounds.width() * 0.02));
	int startAngle = 90 * ARC_DRAWING_CONST;
	int spanAngle = constrain(mZ, MAX_GYROSCOPE_VAL, -MAX_GYROSCOPE_VAL) * ARC_DRAWING_CONST / MAX_GYROSCOPE_VAL * 180;
	painter.drawArc(mBounds, startAngle, spanAngle);

	mCircle.setPixmap(pixmap);
}


text:
/* style.css */
.fakeshadow {
  border-style: solid;
  border-left-width: 4px;
  border-left-color: #888;
  border-right-width: 2px;
  border-right-color: #ccc; }


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- Container for Fragment -->
    <FrameLayout
        android:id="@+id/fragment_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</RelativeLayout>


text:
package io.craigmiller160.schedule.persist;

import javax.transaction.Transactional;

import org.hibernate.SessionFactory;
import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.MySQLDialect;
import org.hibernate.engine.spi.SessionFactoryImplementor;

/**
 * Utility class for performing unit testing on the database
 * connection managed by the <tt>Hibernate</tt> framework.
 * It provides the means to reset the auto-increment counter
 * after running test database operations. This prevents unit
 * testing from using up tons of available values in that count.
 *

 * This class is intended only for use by <tt>JUnit</tt> test
 * cases. It also manages its own transactions internally, because
 * the transactions performed by this class need to be committed,
 * unlike the transactions of a test case which should be rolled back.
 * Any use of this class in the test case should avoid causing the
 * transactions of this class to be propagated as a part of the
 * transactions.
 *

 * THREAD SAFETY: This class is thread-safe and has no
 * mutable state.
 *
 * @author craig
 * @version 1.0
 */
public class HibernateTestUtil {

	/**
	 * The <tt>SessionFactory</tt> to create database sessions for this class.
	 */
	private final SessionFactory sessionFactory;

	/**
	 * Create a new <tt>HiberanteTestUtil</tt> with the necessary
	 * <tt>SessionFactory</tt>. If the factory parameter is set to
	 * null, this class will not be able to function.
	 *
	 * @param sessionFactory the <tt>SessionFactory</tt> this class requires.
	 */
	public HibernateTestUtil(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	/**
	 * Reset the auto-increment counter on the student table. If
	 * the <tt>SessionFactory</tt> was set to null, an exception
	 * will be thrown.
	 *
	 * @throws NullPointerException if the <tt>SessionFactory</tt>
	 * was set to null.
	 */
	@Transactional
	public void resetStudentAutoIncrement(){
		Dialect dialect = ((SessionFactoryImplementor) sessionFactory).getDialect();
		if(dialect instanceof MySQLDialect){
			sessionFactory.getCurrentSession()
			.createSQLQuery("alter table student auto_increment = 1")
			.executeUpdate();
		}
		else{
			throw new UnsupportedOperationException(
					"Method is only compatible with MySQL database");
		}
	}

	/**
	 * Reset the auto-increment counter on the course table. If
	 * the <tt>SessionFactory</tt> was set to null, an exception
	 * will be thrown.
	 *
	 * @throws NullPointerException if the <tt>SessionFactory</tt>
	 * was set to null.
	 */
	@Transactional
	public void resetCourseAutoIncrement(){
		Dialect dialect = ((SessionFactoryImplementor) sessionFactory).getDialect();
		if(dialect instanceof MySQLDialect){
			sessionFactory.getCurrentSession()
			.createSQLQuery("alter table course auto_increment = 1")
			.executeUpdate();
		}
		else{
			throw new UnsupportedOperationException(
					"Method is only compatible with MySQL database");
		}
	}

}


text:
namespace em = enterprise_management;

namespace enterprise_reporting {

ProfileReportGenerator::ProfileReportGenerator(
    ReportingDelegateFactory* delegate_factory)
    : delegate_(delegate_factory->GetProfileReportGeneratorDelegate()) {}

ProfileReportGenerator::~ProfileReportGenerator() = default;

void ProfileReportGenerator::set_extensions_enabled(bool enabled) {
  extensions_enabled_ = enabled;
}

void ProfileReportGenerator::set_policies_enabled(bool enabled) {
  policies_enabled_ = enabled;
}

std::unique_ptr<em::ChromeUserProfileInfo>
ProfileReportGenerator::MaybeGenerate(const base::FilePath& path,
                                      const std::string& name,
                                      ReportType report_type) {
  if (!delegate_->Init(path)) {
    return nullptr;
  }

  report_ = std::make_unique<em::ChromeUserProfileInfo>();

  switch (report_type) {
    case ReportType::kFull:
      report_->set_id(path.AsUTF8Unsafe());
      break;
    case ReportType::kProfileReport:
      report_->set_id(ObfuscateFilePath(path.AsUTF8Unsafe()));
      break;
    case ReportType::kBrowserVersion:
      NOTREACHED();
      break;
  }

  report_->set_name(name);
  report_->set_is_detail_available(true);

  delegate_->GetSigninUserInfo(report_.get());
  if (extensions_enabled_) {
    delegate_->GetExtensionInfo(report_.get());
  }
  delegate_->GetExtensionRequest(report_.get());

  if (policies_enabled_) {
    // TODO(crbug.com/983151): Upload policy error as their IDs.
    auto client = delegate_->MakePolicyConversionsClient();
    policies_ = policy::DictionaryPolicyConversions(std::move(client))
                    .EnableConvertTypes(false)
                    .EnablePrettyPrint(false)
                    .ToValue();
    GetChromePolicyInfo();
    GetExtensionPolicyInfo();
    GetPolicyFetchTimestampInfo();
  }

  return std::move(report_);
}

void ProfileReportGenerator::GetChromePolicyInfo() {
  AppendChromePolicyInfoIntoProfileReport(policies_, report_.get());
}

void ProfileReportGenerator::GetExtensionPolicyInfo() {
  AppendExtensionPolicyInfoIntoProfileReport(policies_, report_.get());
}

void ProfileReportGenerator::GetPolicyFetchTimestampInfo() {
#if !BUILDFLAG(IS_CHROMEOS_ASH)
  AppendMachineLevelUserCloudPolicyFetchTimestamp(
      report_.get(), delegate_->GetCloudPolicyManager());
#endif  // !BUILDFLAG(IS_CHROMEOS_ASH)
}

}  // namespace enterprise_reporting