text:
update-amd64:
	@vagrant box remove obsd-current-amd64 -f
	@vagrant box add obsd-current-amd64 packer_amd64_libvirt.box

update-i386:
	@vagrant box remove obsd-current-i386 -f
	@vagrant box add obsd-current-i386 packer_i386_libvirt.box

amd64: packer_amd64_libvirt.box

packer_amd64_libvirt.box:
	@packer build -only=amd64 template.json

i386: packer_i386_libvirt.box
	@packer build -only=i386 template.json

all: packer_amd64_libvirt.box packer_i386_libvirt.box
	@packer build template.json

.PHONY: update-all clean
update-all: update-amd64 update-i386

clean:
	@rm -rf packer_*

redpajama_set_name: RedPajamaGithub


text:
import re

# First, we try to use setuptools. If it's not available locally,
# we fall back on ez_setup.
try:
    from setuptools import setup
except ImportError:
    from ez_setup import use_setuptools
    use_setuptools()
    from setuptools import setup

# Following the recommendations of PEP 396 we parse the version number
# out of the module.
def parseVersion(moduleFile):
    """
    Parses the version string from the specified file.

    This implementation is ugly, but there doesn't seem to be a good way
    to do this in general at the moment.
    """
    f = open(moduleFile)
    s = f.read()
    f.close()
    match = re.findall("__version__ = '([^']+)'", s)
    return match[0]

f = open("README.pypi.rst")
ga4ghReadme = f.read()
f.close()
ga4ghVersion = parseVersion("ga4gh/__init__.py")
# Flask must come after all other requirements that have "flask" as a prefix
# due to a setuptools bug.
requirements = ["avro", "flask-cors", "oic", "flask", "humanize",
                "pysam>=0.8.2", "requests"]

setup(
    name="ga4gh",
    version=ga4ghVersion,
    description="A reference implementation of the ga4gh API",
    license='Apache License 2.0',
    long_description=ga4ghReadme,
    packages=["ga4gh", "ga4gh.datamodel", "ga4gh.templates"],
    include_package_data=True,
    zip_safe=False,
    author="Global Alliance for Genomics and Health",
    author_email="theglobalalliance@genomicsandhealth.org",
    url="https://github.com/ga4gh/server",
    entry_points={
        'console_scripts': [
            'ga4gh_client=ga4gh.cli:client_main',
            'ga4gh_configtest=ga4gh.cli:configtest_main',
            'ga4gh_server=ga4gh.cli:server_main',
            'ga2vcf=ga4gh.cli:ga2vcf_main',
            'ga2sam=ga4gh.cli:ga2sam_main',
        ]
    },
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Science/Research',
        'License :: OSI Approved :: Apache Software License',
        'Natural Language :: English',

        # We should add other versions that we can confirm pass the tests
        # (2.6?)
        'Programming Language :: Python :: 2.7',

        'Topic :: Scientific/Engineering :: Bio-Informatics',
    ],
    keywords='genomics reference',
    install_requires=requirements,
)


text:
/**
 * PurConAmtQueForm.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter.
 */

package com.baosight.sts.st.ws.domain;

public class PurConAmtQueForm  implements java.io.Serializable {
    private java.lang.String contInputDateFrom;
    private java.lang.String contInputDateTo;
    private java.lang.String contractId;
    private java.lang.String customerId;
    private java.lang.String password;
    private java.lang.String segNo;

    public PurConAmtQueForm() {
    }

    public PurConAmtQueForm(
           java.lang.String contInputDateFrom,
           java.lang.String contInputDateTo,
           java.lang.String contractId,
           java.lang.String customerId,
           java.lang.String password,
           java.lang.String segNo) {
           this.contInputDateFrom = contInputDateFrom;
           this.contInputDateTo = contInputDateTo;
           this.contractId = contractId;
           this.customerId = customerId;
           this.password = password;
           this.segNo = segNo;
    }

    /**
     * Gets the contInputDateFrom value for this PurConAmtQueForm.
     *
     * @return contInputDateFrom
     */
    public java.lang.String getContInputDateFrom() {
        return contInputDateFrom;
    }

    /**
     * Sets the contInputDateFrom value for this PurConAmtQueForm.
     *
     * @param contInputDateFrom
     */
    public void setContInputDateFrom(java.lang.String contInputDateFrom) {
        this.contInputDateFrom = contInputDateFrom;
    }

    /**
     * Gets the contInputDateTo value for this PurConAmtQueForm.
     *
     * @return contInputDateTo
     */
    public java.lang.String getContInputDateTo() {
        return contInputDateTo;
    }

    /**
     * Sets the contInputDateTo value for this PurConAmtQueForm.
     *
     * @param contInputDateTo
     */
    public void setContInputDateTo(java.lang.String contInputDateTo) {
        this.contInputDateTo = contInputDateTo;
    }

    /**
     * Gets the contractId value for this PurConAmtQueForm.
     *
     * @return contractId
     */
    public java.lang.String getContractId() {
        return contractId;
    }

    /**
     * Sets the contractId value for this PurConAmtQueForm.
     *
     * @param contractId
     */
    public void setContractId(java.lang.String contractId) {
        this.contractId = contractId;
    }

    /**
     * Gets the customerId value for this PurConAmtQueForm.
     *
     * @return customerId
     */
    public java.lang.String getCustomerId() {
        return customerId;
    }

    /**
     * Sets the customerId value for this PurConAmtQueForm.
     *
     * @param customerId
     */
    public void setCustomerId(java.lang.String customerId) {
        this.customerId = customerId;
    }

    /**
     * Gets the password value for this PurConAmtQueForm.
     *
     * @return password
     */
    public java.lang.String getPassword() {
        return password;
    }

    /**
     * Sets the password value for this PurConAmtQueForm.
     *
     * @param password
     */
    public void setPassword(java.lang.String password) {
        this.password = password;
    }

    /**
     * Gets the segNo value for this PurConAmtQueForm.
     *
     * @return segNo
     */
    public java.lang.String getSegNo() {
        return segNo;
    }

    /**
     * Sets the segNo value for this PurConAmtQueForm.
     *
     * @param segNo
     */
    public void setSegNo(java.lang.String segNo) {
        this.segNo = segNo;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof PurConAmtQueForm)) return false;
        PurConAmtQueForm other = (PurConAmtQueForm) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true &&
            ((this.contInputDateFrom==null && other.getContInputDateFrom()==null) ||
             (this.contInputDateFrom!=null &&
              this.contInputDateFrom.equals(other.getContInputDateFrom()))) &&
            ((this.contInputDateTo==null && other.getContInputDateTo()==null) ||
             (this.contInputDateTo!=null &&
              this.contInputDateTo.equals(other.getContInputDateTo()))) &&
            ((this.contractId==null && other.getContractId()==null) ||
             (this.contractId!=null &&
              this.contractId.equals(other.getContractId()))) &&
            ((this.customerId==null && other.getCustomerId()==null) ||
             (this.customerId!=null &&
              this.customerId.equals(other.getCustomerId()))) &&
            ((this.password==null && other.getPassword()==null) ||
             (this.password!=null &&
              this.password.equals(other.getPassword()))) &&
            ((this.segNo==null && other.getSegNo()==null) ||
             (this.segNo!=null &&
              this.segNo.equals(other.getSegNo())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getContInputDateFrom() != null) {
            _hashCode += getContInputDateFrom().hashCode();
        }
        if (getContInputDateTo() != null) {
            _hashCode += getContInputDateTo().hashCode();
        }
        if (getContractId() != null) {
            _hashCode += getContractId().hashCode();
        }
        if (getCustomerId() != null) {
            _hashCode += getCustomerId().hashCode();
        }
        if (getPassword() != null) {
            _hashCode += getPassword().hashCode();
        }
        if (getSegNo() != null) {
            _hashCode += getSegNo().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(PurConAmtQueForm.class, true);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://domain.ws.go.ssbs.baosight.com", "PurConAmtQueForm"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("contInputDateFrom");
        elemField.setXmlName(new javax.xml.namespace.QName("http://domain.ws.go.ssbs.baosight.com", "contInputDateFrom"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("contInputDateTo");
        elemField.setXmlName(new javax.xml.namespace.QName("http://domain.ws.go.ssbs.baosight.com", "contInputDateTo"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("contractId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://domain.ws.go.ssbs.baosight.com", "contractId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("customerId");
        elemField.setXmlName(new javax.xml.namespace.QName("http://domain.ws.go.ssbs.baosight.com", "customerId"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("password");
        elemField.setXmlName(new javax.xml.namespace.QName("http://domain.ws.go.ssbs.baosight.com", "password"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("segNo");
        elemField.setXmlName(new javax.xml.namespace.QName("http://domain.ws.go.ssbs.baosight.com", "segNo"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType,
           java.lang.Class _javaType,
           javax.xml.namespace.QName _xmlType) {
        return
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}


text:
goog.module('grrUi.acl.requestApprovalDialogDirective');
goog.module.declareLegacyNamespace();

const {stringToList} = goog.require('grrUi.core.utils');

/**
 * Controller for RequestApprovalDialogDirective.
 *
 * @constructor
 * @param {!angular.Scope} $scope
 * @param {!angular.$q} $q
 * @param {!grrUi.core.apiService.ApiService} grrApiService
 * @ngInject
 */
const RequestApprovalDialogController =
    function($scope, $q, grrApiService) {
  /** @private {!angular.Scope} */
  this.scope_ = $scope;

  /** @private {!angular.$q} */
  this.q_ = $q;

  /** @private {!grrUi.core.apiService.ApiService} */
  this.grrApiService_ = grrApiService;

  /** @export {?string} */
  this.subjectTitle;

  /** @export {Array<string>} */
  this.ccAddresses = [];

  /** @export {Array<string>} */
  this.recentReasons;

  /** @export {string} */
  this.selectedRecentReason;

  /** @export {string} */
  this.approversList;

  /** @export {string} */
  this.reason = $scope.reason || '';

  /** @export {boolean} */
  this.useCcAddresses = true;

  /** @export {boolean} */
  this.keepClientAlive = true;

  this.scope_.$watch('approvalType', this.onApprovalTypeChange_.bind(this));
  this.scope_.$watch('controller.selectedRecentReason',
                     this.onSelectedRecentReasonChange_.bind(this));

  this.grrApiService_.getCached('/config/Email.approval_optional_cc_address')
      .then(this.onCcAddressResponse_.bind(this));
  this.grrApiService_.get('/users/me/approvals/client', {count: 7}).then(
      this.onLatestApprovalsResponse_.bind(this));
};

/**
 * Handles changes in approvalType binding.
 *
 * @param {string} newValue
 * @private
 */
RequestApprovalDialogController.prototype.onApprovalTypeChange_ = function(
    newValue) {
  if (angular.isString(newValue)) {
    this.subjectTitle = (newValue.charAt(0).toUpperCase() +
        newValue.slice(1).replace('-', ' '));
  }
};

/**
 * Handles changes in selectedRecentReason input binding.
 *
 * @param {string} newValue
 * @private
 */
RequestApprovalDialogController.prototype.onSelectedRecentReasonChange_ =
    function(newValue) {
  if (angular.isString(newValue) && newValue) {
    this.reason = newValue;
  }
};

/**
 * Handles API response that returns a list of CC addresses to be
 * used when sending the approval.
 *
 * @param {Object} response
 * @private
 */
RequestApprovalDialogController.prototype.onCcAddressResponse_ = function(
    response) {
  this.ccAddresses = stringToList(response['data']['value']['value']);
};

/**
 * Handles API response that returns a list of recent client approvals
 * that this user had requested.
 *
 * @param {Object} response
 * @private
 */
RequestApprovalDialogController.prototype.onLatestApprovalsResponse_ =
    function(response) {
  this.recentReasons = [];
  var items = response['data']['items'];
  for (var i = 0; i < items.length; ++i) {
    var reason = items[i]['value']['reason']['value'];
    if (this.recentReasons.indexOf(reason) === -1) {
      this.recentReasons.push(reason);
    }
  }
};

/**
 * Sends an approval creation request to the server.
 *
 * @return {!angular.$q.Promise} A promise indicating success or failure.
 * @export
 */
RequestApprovalDialogController.prototype.proceed = function() {
  var deferred = this.q_.defer();

  var url = this.scope_['createRequestUrl'];
  var args = angular.copy(this.scope_['createRequestArgs']);
  args['approval']['reason'] = this.reason;
  args['approval']['notified_users'] = stringToList(this.approversList);
  if (this.useCcAddresses && this.ccAddresses) {
    args['approval']['email_cc_addresses'] = this.ccAddresses;
  }
  if (this.scope_['approvalType'] === 'client' && this.keepClientAlive) {
    args['keep_client_alive'] = true;
  }

  this.grrApiService_.post(url, args).then(
      function success() {
        deferred.resolve('Approval request was sent.');
      }, function failure(response) {
        deferred.reject(response['data']['message']);
      });

  return deferred.promise;
};

/**
 * Directive that displays "request approval" dialog.
 *
 * @return {!angular.Directive} Directive definition object.
 */
exports.RequestApprovalDialogDirective = function() {
  return {
    scope: {
      approvalType: '=',
      createRequestUrl: '=',
      createRequestArgs: '=',
      accessErrorDescription: '=',
      reason: '=',
    },
    restrict: 'E',
    templateUrl: '/static/angular-components/acl/' +
        'request-approval-dialog.html',
    controller: RequestApprovalDialogController,
    controllerAs: 'controller'
  };
};

/**
 * Name of the directive in Angular.
 *
 * @const
 * @export
 */
exports.RequestApprovalDialogDirective.directive_name =
    'grrRequestApprovalDialog';


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <title>The gnu.lists package</title>

Contains utility classes and interfaces for sequences (lists), arrays, and trees.

Features:

The classes and interfaces are compatible with the Java2 Collections
framework, but do not require them.  A configuration option allows you
to specify whether Sequence extends java.util.List or not.

Positions in a Sequence and iterators are the same kind of object,
and are represented using magic cookies.  In most collections frameworks,
when you define a new class that implements a sequence, you would
typically define a new iterator class as well.  You never do that
with gnu.lists; instead you implement suitable methods
in the sequence class itself.  This approach may seem strange, but it has
important performance advantages, especially in applications
where you want to go up and down nested sequences (i.e. in trees, such
as XML elements), or remember sets of positions (such as XML node-sets).

The classes are designed for efficiency, especially concentrating on
minimizing object allocation.

The framework supports general multi-dimensional arrays.

The package is self-contained; it does not depend on classes or
features not in JDK 1.1.

Various useful sequence implementations, including Lisp-style linked
lists; arrays with various element types; adjustable arrays that use a
"buffer-gap" to make insertions and deletions more efficient; and
adjustable arrays that automatically update positions on insertions
and deletions.

 The TreeList class can compactly represent
a nested heterogenous tree.  One intended usage is as a very efficient
representation for XML data.

The Consumer interface is an abstraction of "data sinks" -
objects that can receive data and do something with them.  It is
similar to SAX's DocumentHandler but at a more abstract (and sometimes
more efficient) level.

The iteration and position framework

A position points between two elements in its "containing"
sequence, or it points before the first element (if any), or after the last.
Sometimes, we loosely say that the position refers to or points to
an element of the sequence; in that case we mean the position is
immediately before the element.

An iterator is an object that has a current position,
but that can be moved so it gets a new position.
 What needs to be emphasized is that all
Sequence implementations.
use the same SeqPosition
class to implement positions and iteration.
In other "collections frameworks" each sequence class has its corresponding
iterator class, but in this framework you instead add the methods
that handle iteration to the sequence class itself, extending
the AbstractSequence class.
A consequence of this is that if you have an unused
SeqPosition object, you can
use it to iterate over any Sequence you choose.
This potentially saves memory allocation, which gains you the most
when iterating over a nested sequence structure, like a tree of XML data.

We do this by requiring that any position be representable using a pair
of an int and an Object.
In other words, the state of an iterator is
restricted to be an (int, Object) pair.
Of course that is all you could need, since if you need more
state you can always create a helper object,
and store the extra state there.  The assumption we make though is that for
most Sequences, an (int, Object)
would be enough, without creating any new objects (beyond,
sometimes, the SeqPosition itself).

The int part of a position-state is normally
named ipos, and the Object part of a
position-state is named xpos.
Neither of these values have any meaning in themselves, they only have
meaning as interpreted by the specific Sequence.
For example, ipos might be the offset of the position in
the sequence, but it might also some "magic cookie".
If a Sequence supports insertions and deletions,
and you want positions to be automatically adjusted, then a position
has to be a magic cookie rather than an offset.
(A typical implementation is for such a position to be an index
into a table of positions managed by the Sequence itself.)
So a complete position is actually a (int, Object,
AbstractSequence) triple, where the AbstractSequence
component is the object that interprets the (int,
Object) pair.
Normally, the AbstractSequence part of a position triple is the
Sequence "containing" the position, but it can be any
AbstractSequence
that implements the various methods that provide the semantics
for the (int, Object) pair.

The  PositionContainer
interface is a more abstract version of SeqPosition, in
that it can represents more than one position.
For example, instead of an array of separately allocated
SeqPosition objects, you might use some data structure
that implements PositionContainer,
which is abstractly a list of (int, Object,
Sequence)-triples.

The consumer protocol

You typically use an iteration framework it process the elements
of a sequence in such a way that the data consumer is active
and in control, while the sequence itself (the data producer) is a
passive object. The Consumer
works the other way round:  The data producer is active and in control,
while the data consumer is passive, consuming elements when requested
by the data producer.  The Consumer is a more abstract
variant of SAX's
ContentHandler interface for processing "events";
however Consumer is intended for general value sequences,
and is less tied to XML.

Iteration

int iter = 0; // standard start position
for (;;)
{
  iter = list.nextPos(iter);
  if (iter == 0)
    break;
  Object value = list.getPosPrevious(iter);
  ... use value ...;
}

Position values for buffer-based sequences

The position encoding for sequences implemented using an array is simple.
Assume the next index (as returned by nextIndex) is <var>i</var>.
If the position is a before/backwards position, then position value
is (<var>i</var><<1).
If the position is an after/forwards position, then position value
is ((<var>i</var><<1))|1.

But what each each item in the buffer has variable size?
One example is a UTF-8 string.  Another example is a buffer of text
where each "item" is a line.
Then we have the choice:  Should the position value encode the
index (making nextIndex and get cheap), or
should it encode the offset into the buffer (making sequential access cheap)?
Since sequential access is preferred, we do the latter.
Thus for a before/backwards position, if the buffer offset for
item <var>i</var> is <var>pi</var>, then the position value
is (<var>pi</var> << 1).
However, there is a complication when moving forwards using
a ListIterator since using set or remove
affects the previous item.  It may be much more expensive to
calculate the buffer position of the previous item than the next item.
(Given <var>pi</var> it may be cheap to
calculate <var>pi+1</var> but expensive to
calculate <var>pi-1</var>.)
Therefore, we suggest using
(((<var>pi-1</var>+1)<<1))|1,
where <var>p-1</var> is defined as -1.
The addition of 1 allows us to handle the case of <var>i=0</var> without
conflicting with the use of -1 to mean end-of-sequence.
Plus it makes the previous case of a simple array a special case.


text:
@class PAYFormSectionBuilder;
@class PAYFormButtonGroup;

@interface PAYFormButtonGroupBuilder ()

@property (nonatomic, retain, nonnull) PAYFormButtonGroup *buttonGroup;
@property (nonatomic, retain, nonnull) PAYFormSectionBuilder *sectionBuilder;

@end


text:
import In from '../world/In';

export default class WorldGenerator {

  generateWorld(world) {
    this.spawnIn(world, new PIXI.Point(0, 0));
  }

  spawnIn(world, point) {
    this.spawnBuilding(world, new In(), point);
  }

  spawnBuilding(world, building, point) {
    building.x = point.x;
    building.y = point.y;
		building.level = 1;
		building.interactive = true;
		world.buildings.addChild(building);
  }

}


text:
namespace v8 {
namespace internal {
namespace compiler {

CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone,
                                     const CallInterfaceDescriptor& descriptor,
                                     Code::Kind kind, const char* name)
    : raw_assembler_(new RawMachineAssembler(
          isolate, new (zone) Graph(zone),
          Linkage::GetStubCallDescriptor(isolate, zone, descriptor, 0,
                                         CallDescriptor::kNoFlags))),
      kind_(kind),
      name_(name),
      code_generated_(false) {}

CodeStubAssembler::~CodeStubAssembler() {}

Handle<Code> CodeStubAssembler::GenerateCode() {
  DCHECK(!code_generated_);

  Schedule* schedule = raw_assembler_->Export();
  Handle<Code> code = Pipeline::GenerateCodeForCodeStub(
      isolate(), raw_assembler_->call_descriptor(), graph(), schedule, kind_,
      name_);

  code_generated_ = true;
  return code;
}

Node* CodeStubAssembler::Int32Constant(int value) {
  return raw_assembler_->Int32Constant(value);
}

Node* CodeStubAssembler::IntPtrConstant(intptr_t value) {
  return raw_assembler_->IntPtrConstant(value);
}

Node* CodeStubAssembler::NumberConstant(double value) {
  return raw_assembler_->NumberConstant(value);
}

Node* CodeStubAssembler::HeapConstant(Handle<HeapObject> object) {
  return raw_assembler_->HeapConstant(object);
}

Node* CodeStubAssembler::BooleanConstant(bool value) {
  return raw_assembler_->BooleanConstant(value);
}

Node* CodeStubAssembler::Parameter(int value) {
  return raw_assembler_->Parameter(value);
}

void CodeStubAssembler::Return(Node* value) {
  return raw_assembler_->Return(value);
}

Node* CodeStubAssembler::SmiShiftBitsConstant() {
  return Int32Constant(kSmiShiftSize + kSmiTagSize);
}

Node* CodeStubAssembler::SmiTag(Node* value) {
  return raw_assembler_->WordShl(value, SmiShiftBitsConstant());
}

Node* CodeStubAssembler::SmiUntag(Node* value) {
  return raw_assembler_->WordSar(value, SmiShiftBitsConstant());
}

Node* CodeStubAssembler::IntPtrAdd(Node* a, Node* b) {
  return raw_assembler_->IntPtrAdd(a, b);
}

Node* CodeStubAssembler::IntPtrSub(Node* a, Node* b) {
  return raw_assembler_->IntPtrSub(a, b);
}

Node* CodeStubAssembler::WordShl(Node* value, int shift) {
  return raw_assembler_->WordShl(value, Int32Constant(shift));
}

Node* CodeStubAssembler::LoadObjectField(Node* object, int offset) {
  return raw_assembler_->Load(MachineType::AnyTagged(), object,
                              IntPtrConstant(offset - kHeapObjectTag));
}

Node* CodeStubAssembler::CallN(CallDescriptor* descriptor, Node* code_target,
                               Node** args) {
  return raw_assembler_->CallN(descriptor, code_target, args);
}

Node* CodeStubAssembler::TailCallN(CallDescriptor* descriptor,
                                   Node* code_target, Node** args) {
  return raw_assembler_->TailCallN(descriptor, code_target, args);
}

Node* CodeStubAssembler::CallRuntime(Runtime::FunctionId function_id,
                                     Node* context, Node* arg1) {
  return raw_assembler_->CallRuntime1(function_id, arg1, context);
}

Node* CodeStubAssembler::CallRuntime(Runtime::FunctionId function_id,
                                     Node* context, Node* arg1, Node* arg2) {
  return raw_assembler_->CallRuntime2(function_id, arg1, arg2, context);
}

Node* CodeStubAssembler::TailCallRuntime(Runtime::FunctionId function_id,
                                         Node* context, Node* arg1) {
  return raw_assembler_->TailCallRuntime1(function_id, arg1, context);
}

Node* CodeStubAssembler::TailCallRuntime(Runtime::FunctionId function_id,
                                         Node* context, Node* arg1,
                                         Node* arg2) {
  return raw_assembler_->TailCallRuntime2(function_id, arg1, arg2, context);
}

// RawMachineAssembler delegate helpers:
Isolate* CodeStubAssembler::isolate() { return raw_assembler_->isolate(); }

Graph* CodeStubAssembler::graph() { return raw_assembler_->graph(); }

Zone* CodeStubAssembler::zone() { return raw_assembler_->zone(); }

}  // namespace compiler
}  // namespace internal
}  // namespace v8


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="CCaseConfig">
    <option name="checkoutReserved" value="false" />
    <option name="markExternalChangeAsUpToDate" value="true" />
    <option name="checkInUseHijack" value="true" />
    <option name="useUcmModel" value="true" />
    <option name="synchOutside" value="false" />
    <option name="isHistoryResticted" value="true" />
    <option name="useIdenticalSwitch" value="true" />
    <option name="synchActivitiesOnRefresh" value="true" />
    <option name="lastScr" value="" />
    <option name="scrTextFileName" value="" />
    <option name="historyRevisionsNumber" value="4" />
  </component>
  <component name="ClearCaseSharedConfig">
    <option name="myUseUcmModel" value="true" />
  </component>
  <component name="EntryPointsManager">
    <entry_points version="2.0" />
  </component>
  <component name="IdProvider" IDEtalkID="3D6627C39EDC459B91AD5F7F5CD461C2" />
  <component name="JavadocGenerationManager">
    <option name="OUTPUT_DIRECTORY" />
    <option name="OPTION_SCOPE" value="protected" />
    <option name="OPTION_HIERARCHY" value="true" />
    <option name="OPTION_NAVIGATOR" value="true" />
    <option name="OPTION_INDEX" value="true" />
    <option name="OPTION_SEPARATE_INDEX" value="true" />
    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
    <option name="OPTION_DEPRECATED_LIST" value="true" />
    <option name="OTHER_OPTIONS" value="" />
    <option name="HEAP_SIZE" />
    <option name="LOCALE" />
    <option name="OPEN_IN_BROWSER" value="true" />
  </component>
  <component name="MavenProjectsManager">
    <option name="originalFiles">
      <list>
        <option value="$PROJECT_DIR$/pom.xml" />
      </list>
    </option>
  </component>
  <component name="ModuleEditorState">
    <option name="LAST_EDITED_MODULE_NAME" />
    <option name="LAST_EDITED_TAB_NAME" />
  </component>
  <component name="ProjectKey">
    <option name="state" value="https://github.com/switchfly/switchfly-java.git" />
  </component>
  <component name="ProjectResources">
    <default-html-doctype>http://www.w3.org/1999/xhtml</default-html-doctype>
  </component>
  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
    <output url="file://$PROJECT_DIR$/out" />
  </component>
  <component name="WebServicesPlugin" addRequiredLibraries="true" />
</project>


text:
var __extends = (this && this.__extends) || function (d, b) {
    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
    function __() { this.constructor = d; }
    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
import { CompileDiDependencyMetadata, CompileProviderMetadata, CompileTokenMetadata } from '../compile_metadata';
import { ListWrapper, MapWrapper, StringMapWrapper } from '../facade/collection';
import { isBlank, isPresent } from '../facade/lang';
import { Identifiers, identifierToken, resolveIdentifier, resolveIdentifierToken } from '../identifiers';
import * as o from '../output/output_ast';
import { convertValueToOutputAst } from '../output/value_util';
import { ProviderAst, ProviderAstType } from '../template_parser/template_ast';
import { createDiTokenExpression } from '../util';
import { CompileMethod } from './compile_method';
import { CompileQuery, addQueryToTokenMap, createQueryList } from './compile_query';
import { InjectMethodVars } from './constants';
import { getPropertyInView, injectFromViewParentInjector } from './util';
export var CompileNode = (function () {
    function CompileNode(parent, view, nodeIndex, renderNode, sourceAst) {
        this.parent = parent;
        this.view = view;
        this.nodeIndex = nodeIndex;
        this.renderNode = renderNode;
        this.sourceAst = sourceAst;
    }
    CompileNode.prototype.isNull = function () { return isBlank(this.renderNode); };
    CompileNode.prototype.isRootElement = function () { return this.view != this.parent.view; };
    return CompileNode;
}());
export var CompileElement = (function (_super) {
    __extends(CompileElement, _super);
    function CompileElement(parent, view, nodeIndex, renderNode, sourceAst, component, _directives, _resolvedProvidersArray, hasViewContainer, hasEmbeddedView, references) {
        var _this = this;
        _super.call(this, parent, view, nodeIndex, renderNode, sourceAst);
        this.component = component;
        this._directives = _directives;
        this._resolvedProvidersArray = _resolvedProvidersArray;
        this.hasViewContainer = hasViewContainer;
        this.hasEmbeddedView = hasEmbeddedView;
        this._compViewExpr = null;
        this.instances = new Map();
        this._queryCount = 0;
        this._queries = new Map();
        this._componentConstructorViewQueryLists = [];
        this.contentNodesByNgContentIndex = null;
        this.referenceTokens = {};
        references.forEach(function (ref) { return _this.referenceTokens[ref.name] = ref.value; });
        this.elementRef =
            o.importExpr(resolveIdentifier(Identifiers.ElementRef)).instantiate([this.renderNode]);
        this.instances.set(resolveIdentifierToken(Identifiers.ElementRef).reference, this.elementRef);
        this.injector = o.THIS_EXPR.callMethod('injector', [o.literal(this.nodeIndex)]);
        this.instances.set(resolveIdentifierToken(Identifiers.Injector).reference, this.injector);
        this.instances.set(resolveIdentifierToken(Identifiers.Renderer).reference, o.THIS_EXPR.prop('renderer'));
        if (this.hasViewContainer || this.hasEmbeddedView || isPresent(this.component)) {
            this._createAppElement();
        }
    }
    CompileElement.createNull = function () {
        return new CompileElement(null, null, null, null, null, null, [], [], false, false, []);
    };
    CompileElement.prototype._createAppElement = function () {
        var fieldName = "_appEl_" + this.nodeIndex;
        var parentNodeIndex = this.isRootElement() ? null : this.parent.nodeIndex;
        // private is fine here as no child view will reference an AppElement
        this.view.fields.push(new o.ClassField(fieldName, o.importType(resolveIdentifier(Identifiers.AppElement)), [o.StmtModifier.Private]));
        var statement = o.THIS_EXPR.prop(fieldName)
            .set(o.importExpr(resolveIdentifier(Identifiers.AppElement)).instantiate([
            o.literal(this.nodeIndex), o.literal(parentNodeIndex), o.THIS_EXPR, this.renderNode
        ]))
            .toStmt();
        this.view.createMethod.addStmt(statement);
        this.appElement = o.THIS_EXPR.prop(fieldName);
        this.instances.set(resolveIdentifierToken(Identifiers.AppElement).reference, this.appElement);
    };
    CompileElement.prototype.createComponentFactoryResolver = function (entryComponents) {
        if (!entryComponents || entryComponents.length === 0) {
            return;
        }
        var createComponentFactoryResolverExpr = o.importExpr(resolveIdentifier(Identifiers.CodegenComponentFactoryResolver)).instantiate([
            o.literalArr(entryComponents.map(function (entryComponent) { return o.importExpr(entryComponent); })),
            injectFromViewParentInjector(resolveIdentifierToken(Identifiers.ComponentFactoryResolver), false)
        ]);
        var provider = new CompileProviderMetadata({
            token: resolveIdentifierToken(Identifiers.ComponentFactoryResolver),
            useValue: createComponentFactoryResolverExpr
        });
        // Add ComponentFactoryResolver as first provider as it does not have deps on other providers
        // ProviderAstType.PrivateService as only the component and its view can see it,
        // but nobody else
        this._resolvedProvidersArray.unshift(new ProviderAst(provider.token, false, true, [provider], ProviderAstType.PrivateService, [], this.sourceAst.sourceSpan));
    };
    CompileElement.prototype.setComponentView = function (compViewExpr) {
        this._compViewExpr = compViewExpr;
        this.contentNodesByNgContentIndex =
            ListWrapper.createFixedSize(this.component.template.ngContentSelectors.length);
        for (var i = 0; i < this.contentNodesByNgContentIndex.length; i++) {
            this.contentNodesByNgContentIndex[i] = [];
        }
    };
    CompileElement.prototype.setEmbeddedView = function (embeddedView) {
        this.embeddedView = embeddedView;
        if (isPresent(embeddedView)) {
            var createTemplateRefExpr = o.importExpr(resolveIdentifier(Identifiers.TemplateRef_)).instantiate([
                this.appElement, this.embeddedView.viewFactory
            ]);
            var provider = new CompileProviderMetadata({
                token: resolveIdentifierToken(Identifiers.TemplateRef),
                useValue: createTemplateRefExpr
            });
            // Add TemplateRef as first provider as it does not have deps on other providers
            this._resolvedProvidersArray.unshift(new ProviderAst(provider.token, false, true, [provider], ProviderAstType.Builtin, [], this.sourceAst.sourceSpan));
        }
    };
    CompileElement.prototype.beforeChildren = function () {
        var _this = this;
        if (this.hasViewContainer) {
            this.instances.set(resolveIdentifierToken(Identifiers.ViewContainerRef).reference, this.appElement.prop('vcRef'));
        }
        this._resolvedProviders = new Map();
        this._resolvedProvidersArray.forEach(function (provider) { return _this._resolvedProviders.set(provider.token.reference, provider); });
        // create all the provider instances, some in the view constructor,
        // some as getters. We rely on the fact that they are already sorted topologically.
        MapWrapper.values(this._resolvedProviders).forEach(function (resolvedProvider) {
            var providerValueExpressions = resolvedProvider.providers.map(function (provider) {
                if (isPresent(provider.useExisting)) {
                    return _this._getDependency(resolvedProvider.providerType, new CompileDiDependencyMetadata({ token: provider.useExisting }));
                }
                else if (isPresent(provider.useFactory)) {
                    var deps = isPresent(provider.deps) ? provider.deps : provider.useFactory.diDeps;
                    var depsExpr = deps.map(function (dep) { return _this._getDependency(resolvedProvider.providerType, dep); });
                    return o.importExpr(provider.useFactory).callFn(depsExpr);
                }
                else if (isPresent(provider.useClass)) {
                    var deps = isPresent(provider.deps) ? provider.deps : provider.useClass.diDeps;
                    var depsExpr = deps.map(function (dep) { return _this._getDependency(resolvedProvider.providerType, dep); });
                    return o.importExpr(provider.useClass)
                        .instantiate(depsExpr, o.importType(provider.useClass));
                }
                else {
                    return convertValueToOutputAst(provider.useValue);
                }
            });
            var propName = "_" + resolvedProvider.token.name + "_" + _this.nodeIndex + "_" + _this.instances.size;
            var instance = createProviderProperty(propName, resolvedProvider, providerValueExpressions, resolvedProvider.multiProvider, resolvedProvider.eager, _this);
            _this.instances.set(resolvedProvider.token.reference, instance);
        });
        for (var i = 0; i < this._directives.length; i++) {
            var directive = this._directives[i];
            var directiveInstance = this.instances.get(identifierToken(directive.type).reference);
            directive.queries.forEach(function (queryMeta) { _this._addQuery(queryMeta, directiveInstance); });
        }
        var queriesWithReads = [];
        MapWrapper.values(this._resolvedProviders).forEach(function (resolvedProvider) {
            var queriesForProvider = _this._getQueriesFor(resolvedProvider.token);
            ListWrapper.addAll(queriesWithReads, queriesForProvider.map(function (query) { return new _QueryWithRead(query, resolvedProvider.token); }));
        });
        StringMapWrapper.forEach(this.referenceTokens, function (_, varName) {
            var token = _this.referenceTokens[varName];
            var varValue;
            if (isPresent(token)) {
                varValue = _this.instances.get(token.reference);
            }
            else {
                varValue = _this.renderNode;
            }
            _this.view.locals.set(varName, varValue);
            var varToken = new CompileTokenMetadata({ value: varName });
            ListWrapper.addAll(queriesWithReads, _this._getQueriesFor(varToken).map(function (query) { return new _QueryWithRead(query, varToken); }));
        });
        queriesWithReads.forEach(function (queryWithRead) {
            var value;
            if (isPresent(queryWithRead.read.identifier)) {
                // query for an identifier
                value = _this.instances.get(queryWithRead.read.reference);
            }
            else {
                // query for a reference
                var token = _this.referenceTokens[queryWithRead.read.value];
                if (isPresent(token)) {
                    value = _this.instances.get(token.reference);
                }
                else {
                    value = _this.elementRef;
                }
            }
            if (isPresent(value)) {
                queryWithRead.query.addValue(value, _this.view);
            }
        });
        if (isPresent(this.component)) {
            var componentConstructorViewQueryList = isPresent(this.component) ?
                o.literalArr(this._componentConstructorViewQueryLists) :
                o.NULL_EXPR;
            var compExpr = isPresent(this.getComponent()) ? this.getComponent() : o.NULL_EXPR;
            this.view.createMethod.addStmt(this.appElement
                .callMethod('initComponent', [compExpr, componentConstructorViewQueryList, this._compViewExpr])
                .toStmt());
        }
    };
    CompileElement.prototype.afterChildren = function (childNodeCount) {
        var _this = this;
        MapWrapper.values(this._resolvedProviders).forEach(function (resolvedProvider) {
            // Note: afterChildren is called after recursing into children.
            // This is good so that an injector match in an element that is closer to a requesting element
            // matches first.
            var providerExpr = _this.instances.get(resolvedProvider.token.reference);
            // Note: view providers are only visible on the injector of that element.
            // This is not fully correct as the rules during codegen don't allow a directive
            // to get hold of a view provdier on the same element. We still do this semantic
            // as it simplifies our model to having only one runtime injector per element.
            var providerChildNodeCount = resolvedProvider.providerType === ProviderAstType.PrivateService ? 0 : childNodeCount;
            _this.view.injectorGetMethod.addStmt(createInjectInternalCondition(_this.nodeIndex, providerChildNodeCount, resolvedProvider, providerExpr));
        });
        MapWrapper.values(this._queries)
            .forEach(function (queries) { return queries.forEach(function (query) { return query.afterChildren(_this.view.createMethod, _this.view.updateContentQueriesMethod); }); });
    };
    CompileElement.prototype.addContentNode = function (ngContentIndex, nodeExpr) {
        this.contentNodesByNgContentIndex[ngContentIndex].push(nodeExpr);
    };
    CompileElement.prototype.getComponent = function () {
        return isPresent(this.component) ?
            this.instances.get(identifierToken(this.component.type).reference) :
            null;
    };
    CompileElement.prototype.getProviderTokens = function () {
        return MapWrapper.values(this._resolvedProviders)
            .map(function (resolvedProvider) { return createDiTokenExpression(resolvedProvider.token); });
    };
    CompileElement.prototype._getQueriesFor = function (token) {
        var result = [];
        var currentEl = this;
        var distance = 0;
        var queries;
        while (!currentEl.isNull()) {
            queries = currentEl._queries.get(token.reference);
            if (isPresent(queries)) {
                ListWrapper.addAll(result, queries.filter(function (query) { return query.meta.descendants || distance <= 1; }));
            }
            if (currentEl._directives.length > 0) {
                distance++;
            }
            currentEl = currentEl.parent;
        }
        queries = this.view.componentView.viewQueries.get(token.reference);
        if (isPresent(queries)) {
            ListWrapper.addAll(result, queries);
        }
        return result;
    };
    CompileElement.prototype._addQuery = function (queryMeta, directiveInstance) {
        var propName = "_query_" + queryMeta.selectors[0].name + "_" + this.nodeIndex + "_" + this._queryCount++;
        var queryList = createQueryList(queryMeta, directiveInstance, propName, this.view);
        var query = new CompileQuery(queryMeta, queryList, directiveInstance, this.view);
        addQueryToTokenMap(this._queries, query);
        return query;
    };
    CompileElement.prototype._getLocalDependency = function (requestingProviderType, dep) {
        var result = null;
        // constructor content query
        if (isBlank(result) && isPresent(dep.query)) {
            result = this._addQuery(dep.query, null).queryList;
        }
        // constructor view query
        if (isBlank(result) && isPresent(dep.viewQuery)) {
            result = createQueryList(dep.viewQuery, null, "_viewQuery_" + dep.viewQuery.selectors[0].name + "_" + this.nodeIndex + "_" + this._componentConstructorViewQueryLists.length, this.view);
            this._componentConstructorViewQueryLists.push(result);
        }
        if (isPresent(dep.token)) {
            // access builtins with special visibility
            if (isBlank(result)) {
                if (dep.token.reference ===
                    resolveIdentifierToken(Identifiers.ChangeDetectorRef).reference) {
                    if (requestingProviderType === ProviderAstType.Component) {
                        return this._compViewExpr.prop('ref');
                    }
                    else {
                        return getPropertyInView(o.THIS_EXPR.prop('ref'), this.view, this.view.componentView);
                    }
                }
            }
            // access regular providers on the element
            if (isBlank(result)) {
                var resolvedProvider = this._resolvedProviders.get(dep.token.reference);
                // don't allow directives / public services to access private services.
                // only components and private services can access private services.
                if (resolvedProvider && (requestingProviderType === ProviderAstType.Directive ||
                    requestingProviderType === ProviderAstType.PublicService) &&
                    resolvedProvider.providerType === ProviderAstType.PrivateService) {
                    return null;
                }
                result = this.instances.get(dep.token.reference);
            }
        }
        return result;
    };
    CompileElement.prototype._getDependency = function (requestingProviderType, dep) {
        var currElement = this;
        var result = null;
        if (dep.isValue) {
            result = o.literal(dep.value);
        }
        if (isBlank(result) && !dep.isSkipSelf) {
            result = this._getLocalDependency(requestingProviderType, dep);
        }
        // check parent elements
        while (isBlank(result) && !currElement.parent.isNull()) {
            currElement = currElement.parent;
            result = currElement._getLocalDependency(ProviderAstType.PublicService, new CompileDiDependencyMetadata({ token: dep.token }));
        }
        if (isBlank(result)) {
            result = injectFromViewParentInjector(dep.token, dep.isOptional);
        }
        if (isBlank(result)) {
            result = o.NULL_EXPR;
        }
        return getPropertyInView(result, this.view, currElement.view);
    };
    return CompileElement;
}(CompileNode));
function createInjectInternalCondition(nodeIndex, childNodeCount, provider, providerExpr) {
    var indexCondition;
    if (childNodeCount > 0) {
        indexCondition = o.literal(nodeIndex)
            .lowerEquals(InjectMethodVars.requestNodeIndex)
            .and(InjectMethodVars.requestNodeIndex.lowerEquals(o.literal(nodeIndex + childNodeCount)));
    }
    else {
        indexCondition = o.literal(nodeIndex).identical(InjectMethodVars.requestNodeIndex);
    }
    return new o.IfStmt(InjectMethodVars.token.identical(createDiTokenExpression(provider.token)).and(indexCondition), [new o.ReturnStatement(providerExpr)]);
}
function createProviderProperty(propName, provider, providerValueExpressions, isMulti, isEager, compileElement) {
    var view = compileElement.view;
    var resolvedProviderValueExpr;
    var type;
    if (isMulti) {
        resolvedProviderValueExpr = o.literalArr(providerValueExpressions);
        type = new o.ArrayType(o.DYNAMIC_TYPE);
    }
    else {
        resolvedProviderValueExpr = providerValueExpressions[0];
        type = providerValueExpressions[0].type;
    }
    if (isBlank(type)) {
        type = o.DYNAMIC_TYPE;
    }
    if (isEager) {
        view.fields.push(new o.ClassField(propName, type));
        view.createMethod.addStmt(o.THIS_EXPR.prop(propName).set(resolvedProviderValueExpr).toStmt());
    }
    else {
        var internalField = "_" + propName;
        view.fields.push(new o.ClassField(internalField, type));
        var getter = new CompileMethod(view);
        getter.resetDebugInfo(compileElement.nodeIndex, compileElement.sourceAst);
        // Note: Equals is important for JS so that it also checks the undefined case!
        getter.addStmt(new o.IfStmt(o.THIS_EXPR.prop(internalField).isBlank(), [o.THIS_EXPR.prop(internalField).set(resolvedProviderValueExpr).toStmt()]));
        getter.addStmt(new o.ReturnStatement(o.THIS_EXPR.prop(internalField)));
        view.getters.push(new o.ClassGetter(propName, getter.finish(), type));
    }
    return o.THIS_EXPR.prop(propName);
}
var _QueryWithRead = (function () {
    function _QueryWithRead(query, match) {
        this.query = query;
        this.read = isPresent(query.meta.read) ? query.meta.read : match;
    }
    return _QueryWithRead;
}());
//# sourceMappingURL=compile_element.js.map


text:
<?php
/**
 * TOP API: taobao.wlb.waybill.i.get request
 *
 * @author auto create
 * @since 1.0, 2016.02.29
 */
class WlbWaybillIGetRequest
{
	/**
	 * 面单申请
	 **/
	private $waybillApplyNewRequest;

	private $apiParas = array();

	public function setWaybillApplyNewRequest($waybillApplyNewRequest)
	{
		$this->waybillApplyNewRequest = $waybillApplyNewRequest;
		$this->apiParas["waybill_apply_new_request"] = $waybillApplyNewRequest;
	}

	public function getWaybillApplyNewRequest()
	{
		return $this->waybillApplyNewRequest;
	}

	public function getApiMethodName()
	{
		return "taobao.wlb.waybill.i.get";
	}

	public function getApiParas()
	{
		return $this->apiParas;
	}

	public function check()
	{

	}

	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}


text:
set -u

git fetch --all --tags

if [ -z "${TAG:-}" ]; then
  echo "TAG must be set. Exiting."
  exit 1
fi

if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null; then
  echo "Git tag ${TAG} already exists. Exiting."
  exit 1
fi

previous_release_in_changelog=$(cat CHANGELOG.md | grep "a name" | head -n 1 | cut -d'"' -f2)

if ! git rev-parse -q --verify "refs/tags/${previous_release_in_changelog}" >/dev/null; then
  echo "Previous release ${previous_release_in_changelog} listed in CHANGELOG.md does not have a corresponding tag. Exiting."
  exit 1
fi


text:
package tk.zielony.carbonsamples.widget;

import android.os.Bundle;

import java.text.Format;
import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import carbon.beta.TableLayout;
import carbon.widget.TableView;
import tk.zielony.carbonsamples.SampleAnnotation;
import tk.zielony.carbonsamples.R;
import tk.zielony.carbonsamples.ThemedActivity;

@SampleAnnotation(layoutId = R.layout.activity_tablelayout, titleId = R.string.tableLayoutActivity_title)
public class TableLayoutActivity extends ThemedActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        initToolbar();

        TableLayout tableLayout = findViewById(R.id.tableLayout);
        List<List<Object>> items = new ArrayList<>();
        items.add(Arrays.asList(new Object[]{"Samsung", "GT-9001", 0.32f, false}));
        items.add(Arrays.asList(new Object[]{"Sony", "Z3c", 0.14f, false}));
        items.add(Arrays.asList(new Object[]{"Google", "emulator", 0.10f, true}));
        List<String> names = Arrays.asList("Manufacturer", "Model", "Percentage", "Emulator");
        List<Class> classes = Arrays.asList(new Class[]{String.class, String.class, Float.class, Boolean.class});
        tableLayout.setAdapter(new MyTableAdapter(tableLayout.getTableView(), items, names, classes));
    }

    public static class MyTableAdapter extends TableView.Adapter {

        private final List<List<Object>> items;
        private List<String> names;
        private final List<Class> classes;

        public MyTableAdapter(TableView tableView, List<List<Object>> items, List<String> names, List<Class> classes) {
            super(tableView);
            this.items = items;
            this.names = names;
            this.classes = classes;
        }

        @Override
        public String getColumnName(int column) {
            return names.get(column);
        }

        @Override
        public Class getColumnClass(int column) {
            return classes.get(column);
        }

        @Override
        public int getColumnCount() {
            return names.size();
        }

        @Override
        public List<Object> getItem(int position) {
            return items.get(position);
        }

        @Override
        public int getItemCount() {
            return items.size();
        }

        @Override
        public Format getColumnFormat(int column) {
            if (column == 2)
                return NumberFormat.getPercentInstance();
            return null;
        }
    }
}


text:
{% extends "base.html" %}

{% load staticfiles %}
{% load crispy_forms_tags %}

{% block head %}

{{ form.media }}
{% endblock head %}

{% block title %}

Assignment

{% endblock title %}

{% block content %}

                {{ message }}

                {% if type_post == 'reset' %}
                   <form action="{% url 'gradapp:reset_assignmentype' assignmentype_id %}" method="post" enctype="multipart/form-data">
                {% elif type_post == 'create' %}
                   <form action="{% url 'gradapp:create_assignmentype' %}" method="post" enctype="multipart/form-data">
                {% elif type_post == 'modify' %}
                   <form action="{% url 'gradapp:modify_assignmentype' assignmentype_id %}" method="post" enctype="multipart/form-data">
                {% endif %}
                       {% csrf_token %}
                       {{ form|crispy }}
                       {% if error %}

{{ error }}

                       {% endif %}

<input type="submit" value="Submit" />

                </form>

                  {% if type_post == 'modify' %}
                     Add a question

                     Remove a question
                  {% endif %}

{% endblock content %}


text:
<?php

class Core_Controller_Action_UserDashboard extends Zend_Controller_Action
{
    /**
     *
     * @var type Model_User
     */
    protected $_currUser = null;

    public function init()
    {
        parent::init();
        $this->_currUser = $this->_helper->auth->getCurrUser();
        $this->view->assign('contentTitle', 'account_dashboard');
    }

    public function postDispatch()
    {
        if (!$this->getRequest()->isXmlHttpRequest()) {
            $this->view->assign('showBottomSidebar', true);
            $this->view->assign('dashboardContent', $this->view->render($this->getViewScript()));
            $this->renderScript('_partials/dashboard.phtml');

            parent::postDispatch();
        }
    }
}


text:
@interface PodsDummy_Pods_BitStoreToday_DMListener : NSObject
@end
@implementation PodsDummy_Pods_BitStoreToday_DMListener
@end


text:
import { compileToFunctions } from 'vue-template-compiler'
import mount from '~src/mount'

describe('hasAttribute', () => {
  it('returns true if wrapper contains attribute matching value', () => {
    const attribute = 'attribute'
    const value = 'value'
    const compiled = compileToFunctions(`<div ${attribute}=${value}></div>`)
    const wrapper = mount(compiled)
    expect(wrapper.hasAttribute(attribute, value)).to.equal(true)
  })

  it('returns false if wrapper does not contain attribute', () => {
    const compiled = compileToFunctions('<div />')
    const wrapper = mount(compiled)
    expect(wrapper.hasAttribute('attribute', 'value')).to.equal(false)
  })

  it('returns false if wrapper element is null', () => {
    const compiled = compileToFunctions('<div />')
    const wrapper = mount(compiled)
    wrapper.element = null
    expect(wrapper.hasAttribute('attribute', 'value')).to.equal(false)
  })

  it('throws an error if attribute is not a string', () => {
    const compiled = compileToFunctions('<div />')
    const wrapper = mount(compiled)
    const message = '[vue-test-utils]: wrapper.hasAttribute() must be passed attribute as a string'
    const fn = () => wrapper.hasAttribute(undefined, 'value')
    expect(fn).to.throw().with.property('message', message)
  })

  it('throws an error if value is not a string', () => {
    const compiled = compileToFunctions('<div />')
    const wrapper = mount(compiled)
    const message = '[vue-test-utils]: wrapper.hasAttribute() must be passed value as a string'
    const fn = () => wrapper.hasAttribute('attribute', undefined)
    expect(fn).to.throw().with.property('message', message)
  })
})


text:
/*
 * $Id: MultiTopicDataReaderBase.cpp 5991 2013-08-09 22:20:28Z labancap $
 *
 *
 * Distributed under the OpenDDS License.
 * See: http://www.opendds.org/license.html
 */

#include "DCPS/DdsDcps_pch.h" //Only the _pch include should start with DCPS/
#ifndef OPENDDS_NO_MULTI_TOPIC

#include "MultiTopicDataReaderBase.h"
#include "SubscriberImpl.h"
#include "DomainParticipantImpl.h"
#include "TypeSupportImpl.h"

#include <stdexcept>
#include <sstream>

namespace {
  struct MatchesIncomingName { // predicate for std::find_if()
    const std::string& look_for_;
    explicit MatchesIncomingName(const std::string& s) : look_for_(s) {}
    bool operator()(const OpenDDS::DCPS::MultiTopicImpl::SubjectFieldSpec& sfs)
      const {
      return sfs.incoming_name_ == look_for_;
    }
  };
}

namespace OpenDDS {
namespace DCPS {

void MultiTopicDataReaderBase::init(const DDS::DataReaderQos& dr_qos,
  DDS::DataReaderListener_ptr a_listener, DDS::StatusMask mask,
  SubscriberImpl* parent, MultiTopicImpl* multitopic)
{
  using namespace std;
  DDS::DataReader_var dr = multitopic->get_type_support()->create_datareader();
  resulting_reader_ = DataReaderEx::_narrow(dr);
  DataReaderImpl* resulting_impl =
    dynamic_cast<DataReaderImpl*>(resulting_reader_.in());

  resulting_impl->raw_latency_buffer_size() = parent->raw_latency_buffer_size();
  resulting_impl->raw_latency_buffer_type() = parent->raw_latency_buffer_type();

  DDS::DomainParticipant_var participant = parent->get_participant();
  resulting_impl->init(multitopic, dr_qos, a_listener, mask,
    dynamic_cast<DomainParticipantImpl*>(participant.in()), parent,
    resulting_reader_);

  init_typed(resulting_reader_);
  listener_ = new Listener(this);

  std::map<string, string> fieldToTopic;

  // key: name of field that's a key for the 'join'
  // mapped: set of topicNames that have this key in common
  std::map<string, set<string> > joinKeys;

  const vector<string>& selection = multitopic->get_selection();
  for (size_t i = 0; i < selection.size(); ++i) {

    const DDS::Duration_t no_wait = {0, 0};
    DDS::Topic_var t = participant->find_topic(selection[i].c_str(), no_wait);
    if (!t.in()) {
      throw runtime_error("Topic: " + selection[i] + " not found.");
    }

    DDS::DataReader_var incoming =
      parent->create_datareader(t, dr_qos, listener_, ALL_STATUS_MASK);
    if (!incoming.in()) {
      throw runtime_error("Could not create incoming DataReader "
        + selection[i]);
    }

    QueryPlan& qp = query_plans_[selection[i]];
    qp.data_reader_ = incoming;
    const MetaStruct& meta = metaStructFor(incoming);

    for (const char** names = meta.getFieldNames(); *names; ++names) {
      if (fieldToTopic.count(*names)) { // already seen this field name
        set<string>& topics = joinKeys[*names];
        topics.insert(fieldToTopic[*names]);
        topics.insert(selection[i]);
      } else {
        fieldToTopic[*names] = selection[i];
      }
    }
  }

  const vector<SubjectFieldSpec>& aggregation = multitopic->get_aggregation();
  if (aggregation.size() == 0) { // "SELECT * FROM ..."
    const MetaStruct& meta = getResultingMeta();
    for (const char** names = meta.getFieldNames(); *names; ++names) {
      std::map<string, string>::const_iterator found =
        fieldToTopic.find(*names);
      if (found == fieldToTopic.end()) {
        if (DCPS_debug_level > 1) {
          ACE_DEBUG((LM_WARNING,
                     ACE_TEXT("(%P|%t) WARNING: ")
                     ACE_TEXT("MultiTopicDataReaderBase::init(), in SELECT * ")
                     ACE_TEXT("resulting field %C has no corresponding ")
                     ACE_TEXT("incoming field.\n"), *names));
        }
      } else {
        query_plans_[found->second].projection_.push_back(
          SubjectFieldSpec(*names));
      }
    }
  } else { // "SELECT A, B FROM ..."
    for (size_t i = 0; i < aggregation.size(); ++i) {
      std::map<string, string>::const_iterator found =
        fieldToTopic.find(aggregation[i].incoming_name_);
      if (found == fieldToTopic.end()) {
        throw std::runtime_error("Projected field " +
          aggregation[i].incoming_name_ + " has no incoming field.");
      } else {
        query_plans_[found->second].projection_.push_back(aggregation[i]);
      }
    }
  }

  typedef std::map<string, set<string> >::const_iterator iter_t;
  for (iter_t iter = joinKeys.begin(); iter != joinKeys.end(); ++iter) {
    const string& field = iter->first;
    const set<string>& topics = iter->second;
    for (set<string>::const_iterator iter2 = topics.begin();
         iter2 != topics.end(); ++iter2) {
      const string& topic = *iter2;
      QueryPlan& qp = query_plans_[topic];
      if (find_if(qp.projection_.begin(), qp.projection_.end(),
                  MatchesIncomingName(field)) == qp.projection_.end()) {
        qp.keys_projected_out_.push_back(field);
      }
      for (set<string>::const_iterator iter3 = topics.begin();
           iter3 != topics.end(); ++iter3) {
        if (topic != *iter3) { // other topics
          qp.adjacent_joins_.insert(pair<const string, string>(*iter3, field));
        }
      }
    }
  }
}

std::string MultiTopicDataReaderBase::topicNameFor(DDS::DataReader_ptr reader)
{
  DDS::TopicDescription_var td = reader->get_topicdescription();
  CORBA::String_var topic = td->get_name();
  return topic.in();
}

const MetaStruct&
MultiTopicDataReaderBase::metaStructFor(DDS::DataReader_ptr reader)
{
  DDS::TopicDescription_var td = reader->get_topicdescription();
  TopicDescriptionImpl* tdi = dynamic_cast<TopicDescriptionImpl*>(td.in());
  TypeSupportImpl* ts = dynamic_cast<TypeSupportImpl*>(tdi->get_type_support());
  return ts->getMetaStructForType();
}

void MultiTopicDataReaderBase::data_available(DDS::DataReader_ptr reader)
{
  using namespace std;
  using namespace DDS;

  const string topic = topicNameFor(reader);
  DataReaderImpl* dri = dynamic_cast<DataReaderImpl*>(reader);
  DataReaderImpl::GenericBundle gen;
  ReturnCode_t rc = dri->read_generic(gen, NOT_READ_SAMPLE_STATE,
                                      ANY_VIEW_STATE, ANY_INSTANCE_STATE,false);
  if (rc == RETCODE_NO_DATA) {
    return;
  } else if (rc != RETCODE_OK) {
    ostringstream rc_ss;
    rc_ss << rc;
    throw runtime_error("Incoming DataReader for " + topic +
      " could not be read, error #" + rc_ss.str());
  }

  const MetaStruct& meta = metaStructFor(reader);
  const QueryPlan& qp = query_plans_[topic];
  for (CORBA::ULong i = 0; i < gen.samples_.size(); ++i) {
    if (gen.info_[i].valid_data) {
      incoming_sample(gen.samples_[i], gen.info_[i], topic.c_str(), meta);
    } else if (gen.info_[i].instance_state != ALIVE_INSTANCE_STATE) {
      DataReaderImpl* resulting_impl =
        dynamic_cast<DataReaderImpl*>(resulting_reader_.in());
      set<pair<InstanceHandle_t, InstanceHandle_t> >::const_iterator
        iter = qp.instances_.begin();
      while (iter != qp.instances_.end() &&
             iter->first != gen.info_[i].instance_handle) ++iter;
      for (; iter != qp.instances_.end() &&
           iter->first == gen.info_[i].instance_handle; ++iter) {
        resulting_impl->set_instance_state(iter->second,
                                           gen.info_[i].instance_state);
      }
    }
  }
}

void MultiTopicDataReaderBase::Listener::on_requested_deadline_missed(
  DDS::DataReader_ptr, const DDS::RequestedDeadlineMissedStatus&)
{
}

void MultiTopicDataReaderBase::Listener::on_requested_incompatible_qos(
  DDS::DataReader_ptr, const DDS::RequestedIncompatibleQosStatus&)
{
}

void MultiTopicDataReaderBase::Listener::on_sample_rejected(
  DDS::DataReader_ptr, const DDS::SampleRejectedStatus&)
{
}

void MultiTopicDataReaderBase::Listener::on_liveliness_changed(
  DDS::DataReader_ptr, const DDS::LivelinessChangedStatus&)
{
}

void MultiTopicDataReaderBase::Listener::on_data_available(
  DDS::DataReader_ptr reader)
{
  try {
    outer_->data_available(reader);
  } catch (std::exception& e) {
    if (DCPS_debug_level) {
      ACE_DEBUG((LM_ERROR, "(%P|%t) MultiTopicDataReaderBase::Listener::"
                 "on_data_available(): %C", e.what()));
    }
  }
}

void MultiTopicDataReaderBase::Listener::on_subscription_matched(
  DDS::DataReader_ptr, const DDS::SubscriptionMatchedStatus&)
{
}

void MultiTopicDataReaderBase::Listener::on_sample_lost(DDS::DataReader_ptr,
  const DDS::SampleLostStatus&)
{
}

void MultiTopicDataReaderBase::set_status_changed_flag(DDS::StatusKind status,
  bool flag)
{
  dynamic_cast<DataReaderImpl*>(resulting_reader_.in())
    ->set_status_changed_flag(status, flag);
}

bool MultiTopicDataReaderBase::have_sample_states(
  DDS::SampleStateMask sample_states) const
{
  return dynamic_cast<DataReaderImpl*>(resulting_reader_.in())
    ->have_sample_states(sample_states);
}

void MultiTopicDataReaderBase::cleanup()
{
  DDS::Subscriber_var sub = resulting_reader_->get_subscriber();
  for (std::map<std::string, QueryPlan>::iterator it = query_plans_.begin();
       it != query_plans_.end(); ++it) {
    sub->delete_datareader(it->second.data_reader_);
  }
  DataReaderImpl* dri = dynamic_cast<DataReaderImpl*>(resulting_reader_.in());
  SubscriberImpl* si = dynamic_cast<SubscriberImpl*>(sub.in());
  si->remove_from_datareader_set(dri);
  dri->cleanup();
}

DDS::InstanceHandle_t MultiTopicDataReaderBase::get_instance_handle()
{
  return resulting_reader_->get_instance_handle();
}

DDS::ReturnCode_t MultiTopicDataReaderBase::enable()
{
  return resulting_reader_->enable();
}

DDS::StatusCondition_ptr MultiTopicDataReaderBase::get_statuscondition()
{
  return resulting_reader_->get_statuscondition();
}

DDS::StatusMask MultiTopicDataReaderBase::get_status_changes()
{
  return resulting_reader_->get_status_changes();
}

DDS::ReadCondition_ptr MultiTopicDataReaderBase::create_readcondition(
  DDS::SampleStateMask sample_states, DDS::ViewStateMask view_states,
  DDS::InstanceStateMask instance_states)
{
  return resulting_reader_->create_readcondition(sample_states, view_states,
    instance_states);
}

#ifndef OPENDDS_NO_QUERY_CONDITION
DDS::QueryCondition_ptr MultiTopicDataReaderBase::create_querycondition(
  DDS::SampleStateMask sample_states, DDS::ViewStateMask view_states,
  DDS::InstanceStateMask instance_states, const char* query_expression,
  const DDS::StringSeq& query_parameters)
{
  return resulting_reader_->create_querycondition(sample_states, view_states,
    instance_states, query_expression, query_parameters);
}
#endif

DDS::ReturnCode_t MultiTopicDataReaderBase::delete_readcondition(
  DDS::ReadCondition_ptr a_condition)
{
  return resulting_reader_->delete_readcondition(a_condition);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::delete_contained_entities()
{
  return resulting_reader_->delete_contained_entities();
}

DDS::ReturnCode_t MultiTopicDataReaderBase::set_qos(
  const DDS::DataReaderQos& qos)
{
  return resulting_reader_->set_qos(qos);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_qos(DDS::DataReaderQos& qos)
{
  return resulting_reader_->get_qos(qos);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::set_listener(
  DDS::DataReaderListener_ptr a_listener, DDS::StatusMask mask)
{
  return resulting_reader_->set_listener(a_listener, mask);
}

DDS::DataReaderListener_ptr MultiTopicDataReaderBase::get_listener()
{
  return resulting_reader_->get_listener();
}

DDS::TopicDescription_ptr MultiTopicDataReaderBase::get_topicdescription()
{
  return resulting_reader_->get_topicdescription();
}

DDS::Subscriber_ptr MultiTopicDataReaderBase::get_subscriber()
{
  return resulting_reader_->get_subscriber();
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_sample_rejected_status(
  DDS::SampleRejectedStatus& status)
{
  return resulting_reader_->get_sample_rejected_status(status);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_liveliness_changed_status(
  DDS::LivelinessChangedStatus& status)
{
  return resulting_reader_->get_liveliness_changed_status(status);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_requested_deadline_missed_status(
  DDS::RequestedDeadlineMissedStatus& status)
{
  return resulting_reader_->get_requested_deadline_missed_status(status);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_requested_incompatible_qos_status(
  DDS::RequestedIncompatibleQosStatus& status)
{
  return resulting_reader_->get_requested_incompatible_qos_status(status);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_subscription_matched_status(
  DDS::SubscriptionMatchedStatus& status)
{
  return resulting_reader_->get_subscription_matched_status(status);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_sample_lost_status(
  DDS::SampleLostStatus& status)
{
  return resulting_reader_->get_sample_lost_status(status);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::wait_for_historical_data(
  const DDS::Duration_t& max_wait)
{
  return resulting_reader_->wait_for_historical_data(max_wait);
}

DDS::ReturnCode_t MultiTopicDataReaderBase::get_matched_publications(
  DDS::InstanceHandleSeq& publication_handles)
{
  return resulting_reader_->get_matched_publications(publication_handles);
}

#ifndef DDS_HAS_MINIMUM_BIT
DDS::ReturnCode_t MultiTopicDataReaderBase::get_matched_publication_data(
  DDS::PublicationBuiltinTopicData& publication_data,
  DDS::InstanceHandle_t publication_handle)
{
  return resulting_reader_->get_matched_publication_data(publication_data,
    publication_handle);
}
#endif

void MultiTopicDataReaderBase::get_latency_stats(LatencyStatisticsSeq& stats)
{
  resulting_reader_->get_latency_stats(stats);
}

void MultiTopicDataReaderBase::reset_latency_stats()
{
  resulting_reader_->reset_latency_stats();
}

CORBA::Boolean MultiTopicDataReaderBase::statistics_enabled()
{
  return resulting_reader_->statistics_enabled();
}

void MultiTopicDataReaderBase::statistics_enabled(
  CORBA::Boolean statistics_enabled)
{
  resulting_reader_->statistics_enabled(statistics_enabled);
}

}
}

#endif


text:
package org.apache.accumulo.server.problems;

import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

import java.util.Collection;
import java.util.concurrent.atomic.AtomicBoolean;

import org.apache.accumulo.core.client.impl.Table;
import org.apache.accumulo.core.data.ByteSequence;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
import org.apache.accumulo.core.iterators.system.InterruptibleIterator;
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;

public class ProblemReportingIteratorTest {
  private static final Table.ID TABLE_ID = Table.ID.of("table");
  private static final String RESOURCE = "resource";

  private InterruptibleIterator ii;
  private ProblemReportingIterator pri;

  @Before
  public void setUp() throws Exception {
    ii = EasyMock.createMock(InterruptibleIterator.class);
    pri = new ProblemReportingIterator(null, TABLE_ID, RESOURCE, false, ii);
  }

  @Test
  public void testBasicGetters() {
    Key key = EasyMock.createMock(Key.class);
    expect(ii.getTopKey()).andReturn(key);
    Value value = EasyMock.createMock(Value.class);
    expect(ii.getTopValue()).andReturn(value);
    expect(ii.hasTop()).andReturn(true);
    replay(ii);
    assertSame(key, pri.getTopKey());
    assertSame(value, pri.getTopValue());
    assertTrue(pri.hasTop());
    assertFalse(pri.sawError());
    assertEquals(RESOURCE, pri.getResource());
  }

  @Test(expected = UnsupportedOperationException.class)
  public void testInit() throws Exception {
    pri.init(null, null, null);
  }

  @Test
  public void testNext() throws Exception {
    ii.next();
    replay(ii);
    pri.next();
    verify(ii);
    assertFalse(pri.sawError());
  }

  @Test
  public void testSeek() throws Exception {
    Range r = EasyMock.createMock(Range.class);
    Collection<ByteSequence> f = new java.util.HashSet<>();
    ii.seek(r, f, true);
    replay(ii);
    pri.seek(r, f, true);
    verify(ii);
    assertFalse(pri.sawError());
  }

  @Test
  public void testSetInterruptFlag() {
    AtomicBoolean flag = new AtomicBoolean(true);
    ii.setInterruptFlag(flag);
    replay(ii);
    pri.setInterruptFlag(flag);
    verify(ii);
  }
}


text:
import { AnchorTagBuilder } from '../../src/anchor-tag-builder';
import { Match } from '../../src/match/match';

describe('Autolinker.match.Match', function () {
    let tagBuilder = new AnchorTagBuilder();

    class ConcreteMatch extends Match {
        getType() {
            return 'concrete-match';
        }
        getAnchorHref() {
            return this.matchedText + '_href';
        }
        getAnchorText() {
            return this.matchedText + '_text';
        }
    }

    describe('getMatchedText()', function () {
        it('should return the configured `matchedText` if it was an empty string', function () {
            let match = new ConcreteMatch({
                tagBuilder: tagBuilder,
                matchedText: '',
                offset: 0,
            });

            expect(match.getMatchedText()).toBe('');
        });

        it('should return the configured `matchedText` if it was a string other than an empty string', function () {
            let match = new ConcreteMatch({
                tagBuilder: tagBuilder,
                matchedText: 'abc',
                offset: 2,
            });

            expect(match.getMatchedText()).toBe('abc');
        });
    });

    describe('getOffset()', function () {
        it('should return the configured `offset` if it was 0', function () {
            let match = new ConcreteMatch({
                tagBuilder: tagBuilder,
                matchedText: 'abc',
                offset: 0,
            });

            expect(match.getOffset()).toBe(0);
        });

        it('should return the configured `offset` if it was a number other than 0', function () {
            let match = new ConcreteMatch({
                tagBuilder: tagBuilder,
                matchedText: 'abc',
                offset: 2,
            });

            expect(match.getOffset()).toBe(2);
        });
    });

    describe('buildTag()', function () {
        it('should return an Autolinker.HtmlTag instance, configured for how the Match is configured', function () {
            let match = new ConcreteMatch({
                    tagBuilder: tagBuilder,
                    matchedText: 'abc',
                    offset: 0,
                }),
                htmlTag = match.buildTag();

            expect(htmlTag.toAnchorString()).toBe('abc_text');
        });
    });
});


text:
BuildRequires += $(LibDir)/libgmp.la  # static-gmp
BuildRequires += $(LibDir)/libmpfr.la  # static-mpfr

include ../../Library/GNU.mk

Description=	C library for arbitrary precision arithmetic on complex numbers
Summary=	The GNU MPC library
Title=		GNU MPC
Name=		mpc
Version=	1.0.3
Revision=	0
Site=		http://www.multiprecision.org/
Source=		ftp://ftp.gnu.org/gnu/mpc//$(Name)-$(Version).tar.gz
Checksum=	b8be66396c726fdc36ebb0f692ed8a8cca3bcc66
License=	LGPLv3
LicenseFile=	$(SourceDir)/COPYING.LESSER

GnuConfigureExtra += --with-pic

ifeq ($(OSXVersion),10.6)
RUDIX_UNIVERSAL=no
endif

define test_inner_hook
test -f $(LibDir)/libmpc.la
endef