@Override
    public boolean isSetY() {
        return y != null;
    }

/*
 * ----------------------------------------------------------------------------
 * This file is part of JSBML. Please visit <http://example.com>
 * for the latest version of JSBML and more information about SBML.
 *
 * 1. The University of Tuebingen, Germany
 * 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK
 * 3. The California Institute of Technology, Pasadena, CA, USA
 * 4. The University of California, San Diego, La Jolla, CA, USA
 * 5. The Babraham Institute, Cambridge, UK
 *
 * in the file named "LICENSE.txt" included with this software distribution
 * and also available online as <http://example.com>.
 * ----------------------------------------------------------------------------
 */
package org.sbml.jsbml.ext.render;

import java.util.Map;
import org.sbml.jsbml.PropertyUndefinedError;

/**
 * @author Eugen Netz
 * @author Alexander Diamantikos
 * @author Jakob Matthes
 * @author Jan Rudolph
 * @author David Emanuel Vetter
 * @since 1.0
 */
public class RenderPoint extends RenderCurveSegment {

    /**
     * Generated serial version identifier
     */
    private static final long serialVersionUID = 6792387139122188270L;

    private RelAbsVector x, y, z;

    /**
     * Creates a new {@link RenderPoint} instance
     */
    public RenderPoint() {
        super();
        initDefaults();
    }

    /**
     * Clone constructor
     *
     * @param obj the {@link RenderPoint} instance to clone
     */
    public RenderPoint(RenderPoint obj) {
        super(obj);
        x = obj.x;
        y = obj.y;
        z = obj.z;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.AbstractSBase#clone()
   */
    @Override
    public RenderPoint clone() {
        return new RenderPoint(this);
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.AbstractSBase#getElementName()
   */
    @Override
    public String getElementName() {
        return RenderConstants.renderPoint;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#getX()
   */
    @Override
    public RelAbsVector getX() {
        if (isSetX()) {
            return x;
        }
        // This is necessary if we cannot return null here.
        throw new PropertyUndefinedError(RenderConstants.x, this);
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#getY()
   */
    @Override
    public RelAbsVector getY() {
        if (isSetY()) {
            return y;
        }
        // This is necessary if we cannot return null here.
        throw new PropertyUndefinedError(RenderConstants.y, this);
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#getZ()
   */
    @Override
    public RelAbsVector getZ() {
        if (isSetZ()) {
            return z;
        }
        // This is necessary if we cannot return null here.
        throw new PropertyUndefinedError(RenderConstants.z, this);
    }

    /**
     * Initializes the default values using the namespace.
     */
    public void initDefaults() {
        setPackageVersion(-1);
        packageName = RenderConstants.shortLabel;
        setType(Type.RENDER_POINT);
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#isSetX()
   */
    @Override
    public boolean isSetX() {
        return x != null;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#isSetY()
   */

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#isSetZ()
   */
    @Override
    public boolean isSetZ() {
        return z != null;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#setX(java.lang.Double)
   */
    @Override
    public void setX(RelAbsVector x) {
        RelAbsVector oldX = this.x;
        this.x = x;
        firePropertyChange(RenderConstants.x, oldX, this.x);
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#setY(java.lang.Double)
   */
    @Override
    public void setY(RelAbsVector y) {
        RelAbsVector oldY = this.y;
        this.y = y;
        firePropertyChange(RenderConstants.y, oldY, this.y);
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#setZ(java.lang.Double)
   */
    @Override
    public void setZ(RelAbsVector z) {
        RelAbsVector oldZ = this.z;
        this.z = z;
        firePropertyChange(RenderConstants.z, oldZ, this.z);
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#unsetX()
   */
    @Override
    public boolean unsetX() {
        if (isSetX()) {
            RelAbsVector oldX = x;
            x = null;
            firePropertyChange(RenderConstants.x, oldX, x);
            return true;
        }
        return false;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#unsetY()
   */
    @Override
    public boolean unsetY() {
        if (isSetY()) {
            RelAbsVector oldY = y;
            y = null;
            firePropertyChange(RenderConstants.y, oldY, y);
            return true;
        }
        return false;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.ext.render.RenderPoint#unsetZ()
   */
    @Override
    public boolean unsetZ() {
        if (isSetZ()) {
            RelAbsVector oldZ = z;
            z = null;
            firePropertyChange(RenderConstants.z, oldZ, z);
            return true;
        }
        return false;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.AbstractSBase#writeXMLAttributes()
   */
    @Override
    public Map<String, String> writeXMLAttributes() {
        Map<String, String> attributes = super.writeXMLAttributes();
        if (isSetX()) {
            attributes.put(RenderConstants.shortLabel + ':' + RenderConstants.x, getX().getCoordinate());
        }
        if (isSetY()) {
            attributes.put(RenderConstants.shortLabel + ':' + RenderConstants.y, getY().getCoordinate());
        }
        if (isSetZ()) {
            attributes.put(RenderConstants.shortLabel + ':' + RenderConstants.z, getZ().getCoordinate());
        }
        return attributes;
    }

    /* (non-Javadoc)
   * @see org.sbml.jsbml.AbstractSBase#readAttribute(java.lang.String, java.lang.String, java.lang.String)
   */
    @Override
    public boolean readAttribute(String attributeName, String prefix, String value) {
        boolean isAttributeRead = super.readAttribute(attributeName, prefix, value);
        if (!isAttributeRead) {
            isAttributeRead = true;
            if (attributeName.equals(RenderConstants.x)) {
                setX(new RelAbsVector(value));
            } else if (attributeName.equals(RenderConstants.y)) {
                setY(new RelAbsVector(value));
            } else if (attributeName.equals(RenderConstants.z)) {
                setZ(new RelAbsVector(value));
            } else {
                isAttributeRead = false;
            }
        }
        return isAttributeRead;
    }

    /* (non-Javadoc)
   * @see java.lang.Object#hashCode()
   */
    @Override
    public int hashCode() {
        final int prime = 3187;
        int result = super.hashCode();
        result = prime * result + ((x == null) ? 0 : x.hashCode());
        result = prime * result + ((y == null) ? 0 : y.hashCode());
        result = prime * result + ((z == null) ? 0 : z.hashCode());
        return result;
    }

    /* (non-Javadoc)
   * @see java.lang.Object#equals(java.lang.Object)
   */
    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!super.equals(obj)) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        RenderPoint other = (RenderPoint) obj;
        if (x == null) {
            if (other.x != null) {
                return false;
            }
        } else if (!x.equals(other.x)) {
            return false;
        }
        if (y == null) {
            if (other.y != null) {
                return false;
            }
        } else if (!y.equals(other.y)) {
            return false;
        }
        if (z == null) {
            if (other.z != null) {
                return false;
            }
        } else if (!z.equals(other.z)) {
            return false;
        }
        return true;
    }
}


public abstract double extractScore(Score<T> s);

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.southwestern.evolution.fitness;

import edu.southwestern.parameters.Parameters;
import edu.southwestern.scores.Score;
import edu.southwestern.util.stats.Statistic;
import java.util.ArrayList;

/**
 * This is a process that tracks performance in a particular objective (or any
 * score really) and modifies some aspect of the domain as the objective
 * achieves a particular goal. The domain should become more challenging with
 * each such update.
 *
 * The general approach has some similarities to TUG.
 *
 * @author Jacob
 */
public abstract class FitnessBasedIncrementalEvolutionProcess<T> {

    private final double minRWA;

    private double goal;

    private double recencyWeightedAverage;

    private double alpha;

    // needed
    private FitnessBasedIncrementalEvolutionProcessLog stateHistory;

    // resumes
    // e.g. Average
    private Statistic performanceStat;

    private final boolean writeOutput;

    public FitnessBasedIncrementalEvolutionProcess(double minRWA, double goal, String name) {
        this.minRWA = minRWA;
        this.goal = goal;
        this.writeOutput = Parameters.parameters.booleanParameter("io");
        if (writeOutput) {
            this.stateHistory = new FitnessBasedIncrementalEvolutionProcessLog(name, this);
        }
    }

    public void updateRecencyWeightedAverage(ArrayList<Score<T>> parentScores, int generation) {
        double[] scores = new double[parentScores.size()];
        for (int i = 0; i < parentScores.size(); i++) {
            scores[i] = extractScore(parentScores.get(i));
        }
        double performance = performanceStat.stat(scores);
        recencyWeightedAverage += alpha * (performance - recencyWeightedAverage);
        if (recencyWeightedAverage > goal && performance > goal) {
            // second
            // check
            increaseDifficulty();
            recencyWeightedAverage = minRWA;
        }
        if (writeOutput) {
            ArrayList<Double> logData = new ArrayList<Double>();
            logData.add(performance);
            logData.add(goal);
            logData.add(recencyWeightedAverage);
            stateHistory.log(logData, generation);
        }
    }

    public void loadState(double performance, double goal, double rwa) {
        this.goal = goal;
        this.recencyWeightedAverage = rwa;
    }

    /**
     * Given scores of organism, extract the one score that matters to
     * incremental evolution.
     *
     * @param s
     *            Score instance containing all scores associated with
     *            organism's performance.
     * @return
     */

    /**
     * Make the task harder somehow
     */
    public abstract void increaseDifficulty();
}


public void setMatricula(String value) {
        this.matricula = value;
    }

// Este arquivo foi gerado pela Arquitetura JavaTM para Implementação de Referência (JAXB) de Bind XML, v2.2.8-b130911.1802
// Todas as modificações neste arquivo serão perdidas após a recompilação do esquema de origem.
package br.jus.tst.esocial.esquemas.eventos.cdbenalt;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

/**
 * CHAVE_GRUPO: {cpfTrab}, {matricula}
 *
 *
Classe Java de T_ideVinculo complex type.
 *
 *
O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
 *
 *

 * <complexType name="T_ideVinculo">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="cpfTrab" type="{http://www.esocial.gov.br/schema/evt/evtCdBenAlt/v_S_01_00_00}TS_cpfTrab"/>
 *         <element name="matricula" type="{http://www.esocial.gov.br/schema/evt/evtCdBenAlt/v_S_01_00_00}TS_codigo_esocial"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "T_ideVinculo", propOrder = { "cpfTrab", "matricula" })
public class TIdeVinculo {

    @XmlElement(required = true)
    protected String cpfTrab;

    @XmlElement(required = true)
    protected String matricula;

    public String getCpfTrab() {
        return cpfTrab;
    }

    /**
     * Define o valor da propriedade cpfTrab.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     */
    public void setCpfTrab(String value) {
        this.cpfTrab = value;
    }

    public String getMatricula() {
        return matricula;
    }

    /**
     * Define o valor da propriedade matricula.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     */


@PostMapping("/form/complex")
    public void formComplex(ParameterA parameterA) {
    }

package cn.willingxyz.restdoc.spring.examples.parameter;

import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/parameter")
public class ParameterController {

    @GetMapping("/queryString")
    public void queryString(@RequestParam int param1, @RequestParam(required = false) String param2) {
    }

    /**
     * 查询参数数组
     * @param array 字符串参数数组
     * @param parameterAS 参数A数组
     */
    @GetMapping("/queryString/array")
    public void queryStringArray(String[] array, ParameterA[] parameterAS) {
    }

    /**
     * 查询字符串 复杂参数
     */
    @GetMapping("/queryString/complex")
    public void // todo
    queryStringComplex(// todo
    ParameterA parameterA) {
    }

    /**
     * 表单post
     */

    /**
     * body 中的简单数组
     */
    @PostMapping("/body/array/simple")
    public void simpleArray(@RequestBody String[] arr) {
    }

    /**
     * body 中的复杂数组
     */
    @PostMapping("/body/array/complex")
    public void complexArray(@RequestBody ParameterA[] arr) {
    }

    /**
     * body 里的复杂对象
     */
    @PostMapping("/body/complex")
    public void complex(@RequestBody ParameterA obj) {
    }

    /**
     * path 变量
     * @param parameterA  参数A
     * @param parameterB  参数B
     */
    @PostMapping("/path/{parameterA}/{parameterB}")
    public void path(@PathVariable String parameterA, @PathVariable String parameterB) {
    }

    @PostMapping("/body/generic/complex")
    public void bodyGenericComplex(@RequestBody GenericParameter<ParameterA> parameterAGenericParameter) {
    }

    @PostMapping("/body/generic/simple")
    public void bodyGenericSimple(@RequestBody GenericParameter<Integer> parameter) {
    }

    @PostMapping("/body/generic/multi")
    public void bodyGenericMulti(@RequestBody MultipartGenericParameter<Integer, ParameterA> parameter) {
    }
}


while (it.hasNext()) {
                if (it.next().equals(kInterfaceName)) {
                    return proxy;
                }
            }

package android.hardware.radio.config.V1_0;

import android.internal.hidl.base.V1_0.DebugInfo;
import android.internal.hidl.base.V1_0.IBase;
import android.os.HidlSupport;
import android.os.HwBinder;
import android.os.HwBlob;
import android.os.HwParcel;
import android.os.IHwBinder;
import android.os.IHwInterface;
import android.os.NativeHandle;
import android.os.RemoteException;
import com.android.internal.telephony.dataconnection.TransportManager;
import com.android.internal.telephony.uicc.AnswerToReset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.Objects;

public interface IRadioConfigIndication extends IBase {

    public static final String kInterfaceName = "android.hardware.radio.config@1.0::IRadioConfigIndication";

    IHwBinder asBinder();

    void debug(NativeHandle nativeHandle, ArrayList<String> arrayList) throws RemoteException;

    DebugInfo getDebugInfo() throws RemoteException;

    ArrayList<byte[]> getHashChain() throws RemoteException;

    ArrayList<String> interfaceChain() throws RemoteException;

    String interfaceDescriptor() throws RemoteException;

    boolean linkToDeath(IHwBinder.DeathRecipient deathRecipient, long j) throws RemoteException;

    void notifySyspropsChanged() throws RemoteException;

    void ping() throws RemoteException;

    void setHALInstrumentation() throws RemoteException;

    void simSlotsStatusChanged(int i, ArrayList<SimSlotStatus> arrayList) throws RemoteException;

    boolean unlinkToDeath(IHwBinder.DeathRecipient deathRecipient) throws RemoteException;

    static IRadioConfigIndication asInterface(IHwBinder binder) {
        if (binder == null) {
            return null;
        }
        IHwInterface iface = binder.queryLocalInterface(kInterfaceName);
        if (iface != null && (iface instanceof IRadioConfigIndication)) {
            return (IRadioConfigIndication) iface;
        }
        IRadioConfigIndication proxy = new Proxy(binder);
        try {
            Iterator<String> it = proxy.interfaceChain().iterator();

        } catch (RemoteException e) {
        }
        return null;
    }

    static IRadioConfigIndication castFrom(IHwInterface iface) {
        if (iface == null) {
            return null;
        }
        return asInterface(iface.asBinder());
    }

    static IRadioConfigIndication getService(String serviceName, boolean retry) throws RemoteException {
        return asInterface(HwBinder.getService(kInterfaceName, serviceName, retry));
    }

    static IRadioConfigIndication getService(boolean retry) throws RemoteException {
        return getService(TransportManager.IWLAN_OPERATION_MODE_DEFAULT, retry);
    }

    static IRadioConfigIndication getService(String serviceName) throws RemoteException {
        return asInterface(HwBinder.getService(kInterfaceName, serviceName));
    }

    static IRadioConfigIndication getService() throws RemoteException {
        return getService(TransportManager.IWLAN_OPERATION_MODE_DEFAULT);
    }

    public static final class Proxy implements IRadioConfigIndication {

        private IHwBinder mRemote;

        public Proxy(IHwBinder remote) {
            this.mRemote = (IHwBinder) Objects.requireNonNull(remote);
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public IHwBinder asBinder() {
            return this.mRemote;
        }

        public String toString() {
            try {
                return interfaceDescriptor() + "@Proxy";
            } catch (RemoteException e) {
                return "[class or subclass of android.hardware.radio.config@1.0::IRadioConfigIndication]@Proxy";
            }
        }

        public final boolean equals(Object other) {
            return HidlSupport.interfacesEqual(this, other);
        }

        public final int hashCode() {
            return asBinder().hashCode();
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public void simSlotsStatusChanged(int type, ArrayList<SimSlotStatus> slotStatus) throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken(IRadioConfigIndication.kInterfaceName);
            _hidl_request.writeInt32(type);
            SimSlotStatus.writeVectorToParcel(_hidl_request, slotStatus);
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(1, _hidl_request, _hidl_reply, 1);
                _hidl_request.releaseTemporaryStorage();
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public ArrayList<String> interfaceChain() throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(256067662, _hidl_request, _hidl_reply, 0);
                _hidl_reply.verifySuccess();
                _hidl_request.releaseTemporaryStorage();
                return _hidl_reply.readStringVector();
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public void debug(NativeHandle fd, ArrayList<String> options) throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            _hidl_request.writeNativeHandle(fd);
            _hidl_request.writeStringVector(options);
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(256131655, _hidl_request, _hidl_reply, 0);
                _hidl_reply.verifySuccess();
                _hidl_request.releaseTemporaryStorage();
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public String interfaceDescriptor() throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(256136003, _hidl_request, _hidl_reply, 0);
                _hidl_reply.verifySuccess();
                _hidl_request.releaseTemporaryStorage();
                return _hidl_reply.readString();
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public ArrayList<byte[]> getHashChain() throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(256398152, _hidl_request, _hidl_reply, 0);
                _hidl_reply.verifySuccess();
                _hidl_request.releaseTemporaryStorage();
                ArrayList<byte[]> _hidl_out_hashchain = new ArrayList<>();
                HwBlob _hidl_blob = _hidl_reply.readBuffer(16);
                int _hidl_vec_size = _hidl_blob.getInt32(8);
                HwBlob childBlob = _hidl_reply.readEmbeddedBuffer((long) (_hidl_vec_size * 32), _hidl_blob.handle(), 0, true);
                _hidl_out_hashchain.clear();
                for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
                    byte[] _hidl_vec_element = new byte[32];
                    childBlob.copyToInt8Array((long) (_hidl_index_0 * 32), _hidl_vec_element, 32);
                    _hidl_out_hashchain.add(_hidl_vec_element);
                }
                return _hidl_out_hashchain;
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public void setHALInstrumentation() throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(256462420, _hidl_request, _hidl_reply, 1);
                _hidl_request.releaseTemporaryStorage();
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public boolean linkToDeath(IHwBinder.DeathRecipient recipient, long cookie) throws RemoteException {
            return this.mRemote.linkToDeath(recipient, cookie);
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public void ping() throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(256921159, _hidl_request, _hidl_reply, 0);
                _hidl_reply.verifySuccess();
                _hidl_request.releaseTemporaryStorage();
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public DebugInfo getDebugInfo() throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(257049926, _hidl_request, _hidl_reply, 0);
                _hidl_reply.verifySuccess();
                _hidl_request.releaseTemporaryStorage();
                DebugInfo _hidl_out_info = new DebugInfo();
                _hidl_out_info.readFromParcel(_hidl_reply);
                return _hidl_out_info;
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public void notifySyspropsChanged() throws RemoteException {
            HwParcel _hidl_request = new HwParcel();
            _hidl_request.writeInterfaceToken("android.hidl.base@1.0::IBase");
            HwParcel _hidl_reply = new HwParcel();
            try {
                this.mRemote.transact(257120595, _hidl_request, _hidl_reply, 1);
                _hidl_request.releaseTemporaryStorage();
            } finally {
                _hidl_reply.release();
            }
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public boolean unlinkToDeath(IHwBinder.DeathRecipient recipient) throws RemoteException {
            return this.mRemote.unlinkToDeath(recipient);
        }
    }

    public static abstract class Stub extends HwBinder implements IRadioConfigIndication {

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public IHwBinder asBinder() {
            return this;
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final ArrayList<String> interfaceChain() {
            return new ArrayList<>(Arrays.asList(IRadioConfigIndication.kInterfaceName, "android.hidl.base@1.0::IBase"));
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public void debug(NativeHandle fd, ArrayList<String> arrayList) {
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final String interfaceDescriptor() {
            return IRadioConfigIndication.kInterfaceName;
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final ArrayList<byte[]> getHashChain() {
            return new ArrayList<>(Arrays.asList(new byte[] { 34, -117, 46, -29, -56, -62, 118, -55, -16, -81, -83, 45, -61, 19, -54, 61, 107, -67, -98, 72, 45, -33, 49, 60, 114, 4, -58, 10, -39, -74, 54, -85 }, new byte[] { -20, Byte.MAX_VALUE, -41, -98, -48, 45, -6, -123, -68, 73, -108, 38, -83, -82, 62, -66, 35, -17, 5, 36, -13, -51, 105, 87, 19, -109, 36, -72, AnswerToReset.DIRECT_CONVENTION, 24, -54, 76 }));
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final void setHALInstrumentation() {
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final boolean linkToDeath(IHwBinder.DeathRecipient recipient, long cookie) {
            return true;
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final void ping() {
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final DebugInfo getDebugInfo() {
            DebugInfo info = new DebugInfo();
            info.pid = HidlSupport.getPidIfSharable();
            info.ptr = 0;
            info.arch = 0;
            return info;
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final void notifySyspropsChanged() {
            HwBinder.enableInstrumentation();
        }

        // android.hardware.radio.config.V1_0.IRadioConfigIndication
        @Override
        public final boolean unlinkToDeath(IHwBinder.DeathRecipient recipient) {
            return true;
        }

        public IHwInterface queryLocalInterface(String descriptor) {
            if (IRadioConfigIndication.kInterfaceName.equals(descriptor)) {
                return this;
            }
            return null;
        }

        public void registerAsService(String serviceName) throws RemoteException {
            registerService(serviceName);
        }

        public String toString() {
            return interfaceDescriptor() + "@Stub";
        }

        public void onTransact(int _hidl_code, HwParcel _hidl_request, HwParcel _hidl_reply, int _hidl_flags) throws RemoteException {
            boolean _hidl_is_oneway = false;
            boolean _hidl_is_oneway2 = true;
            switch(_hidl_code) {
                case 1:
                    if ((_hidl_flags & 1) != 0) {
                        _hidl_is_oneway = true;
                    }
                    if (!_hidl_is_oneway) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface(IRadioConfigIndication.kInterfaceName);
                    simSlotsStatusChanged(_hidl_request.readInt32(), SimSlotStatus.readVectorFromParcel(_hidl_request));
                    return;
                case 256067662:
                    if ((_hidl_flags & 1) == 0) {
                        _hidl_is_oneway2 = false;
                    }
                    if (_hidl_is_oneway2) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    ArrayList<String> _hidl_out_descriptors = interfaceChain();
                    _hidl_reply.writeStatus(0);
                    _hidl_reply.writeStringVector(_hidl_out_descriptors);
                    _hidl_reply.send();
                    return;
                case 256131655:
                    if ((_hidl_flags & 1) == 0) {
                        _hidl_is_oneway2 = false;
                    }
                    if (_hidl_is_oneway2) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    debug(_hidl_request.readNativeHandle(), _hidl_request.readStringVector());
                    _hidl_reply.writeStatus(0);
                    _hidl_reply.send();
                    return;
                case 256136003:
                    if ((_hidl_flags & 1) == 0) {
                        _hidl_is_oneway2 = false;
                    }
                    if (_hidl_is_oneway2) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    String _hidl_out_descriptor = interfaceDescriptor();
                    _hidl_reply.writeStatus(0);
                    _hidl_reply.writeString(_hidl_out_descriptor);
                    _hidl_reply.send();
                    return;
                case 256398152:
                    if ((_hidl_flags & 1) == 0) {
                        _hidl_is_oneway2 = false;
                    }
                    if (_hidl_is_oneway2) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    ArrayList<byte[]> _hidl_out_hashchain = getHashChain();
                    _hidl_reply.writeStatus(0);
                    HwBlob _hidl_blob = new HwBlob(16);
                    int _hidl_vec_size = _hidl_out_hashchain.size();
                    _hidl_blob.putInt32(8, _hidl_vec_size);
                    _hidl_blob.putBool(12, false);
                    HwBlob childBlob = new HwBlob(_hidl_vec_size * 32);
                    for (int _hidl_index_0 = 0; _hidl_index_0 < _hidl_vec_size; _hidl_index_0++) {
                        long _hidl_array_offset_1 = (long) (_hidl_index_0 * 32);
                        byte[] _hidl_array_item_1 = _hidl_out_hashchain.get(_hidl_index_0);
                        if (_hidl_array_item_1 == null || _hidl_array_item_1.length != 32) {
                            throw new IllegalArgumentException("Array element is not of the expected length");
                        }
                        childBlob.putInt8Array(_hidl_array_offset_1, _hidl_array_item_1);
                    }
                    _hidl_blob.putBlob(0, childBlob);
                    _hidl_reply.writeBuffer(_hidl_blob);
                    _hidl_reply.send();
                    return;
                case 256462420:
                    if ((_hidl_flags & 1) != 0) {
                        _hidl_is_oneway = true;
                    }
                    if (!_hidl_is_oneway) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    setHALInstrumentation();
                    return;
                case 256660548:
                    if ((_hidl_flags & 1) != 0) {
                        _hidl_is_oneway = true;
                    }
                    if (_hidl_is_oneway) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    return;
                case 256921159:
                    if ((_hidl_flags & 1) == 0) {
                        _hidl_is_oneway2 = false;
                    }
                    if (_hidl_is_oneway2) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    ping();
                    _hidl_reply.writeStatus(0);
                    _hidl_reply.send();
                    return;
                case 257049926:
                    if ((_hidl_flags & 1) == 0) {
                        _hidl_is_oneway2 = false;
                    }
                    if (_hidl_is_oneway2) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    DebugInfo _hidl_out_info = getDebugInfo();
                    _hidl_reply.writeStatus(0);
                    _hidl_out_info.writeToParcel(_hidl_reply);
                    _hidl_reply.send();
                    return;
                case 257120595:
                    if ((_hidl_flags & 1) != 0) {
                        _hidl_is_oneway = true;
                    }
                    if (!_hidl_is_oneway) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    _hidl_request.enforceInterface("android.hidl.base@1.0::IBase");
                    notifySyspropsChanged();
                    return;
                case 257250372:
                    if ((_hidl_flags & 1) != 0) {
                        _hidl_is_oneway = true;
                    }
                    if (_hidl_is_oneway) {
                        _hidl_reply.writeStatus(Integer.MIN_VALUE);
                        _hidl_reply.send();
                        return;
                    }
                    return;
                default:
                    return;
            }
        }
    }
}


private String getValue() {
            return valueField.getText();
        }

package com.jetbrains.heroku.ui;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.ui.DialogWrapper;
import com.jetbrains.heroku.notification.Notifications;
import com.jetbrains.heroku.service.HerokuProjectService;
import com.jgoodies.forms.builder.DefaultFormBuilder;
import com.jgoodies.forms.layout.FormLayout;
import javax.swing.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author mh
 * @since 26.12.11
 */
public class HerokuConfigWindow extends HerokuToolWindow {

    private AtomicInteger selectedRow;

    private MapTableModel tableModel;

    @Override
    protected void setWindowInfo(ContentInfo contentInfo) {
        contentInfo.describe("Environment", "/debugger/threadGroup.png", "Heroku and Addon environment variables");
    }

    @Override
    protected JComponent createContentPane() {
        tableModel = new MapTableModel(load(), "Parameter", "Value");
        selectedRow = new AtomicInteger(-1);
        return GuiUtil.table(tableModel, selectedRow);
    }

    public void doUpdate() {
        setEnabled(herokuProjectService.isHerokuProject());
        tableModel.update(load());
    }

    private Map load() {
        if (!herokuProjectService.isHerokuProject())
            return Collections.emptyMap();
        return (Map) herokuProjectService.getApplicationConfig();
    }

    class AddConfigVariableDialog extends DialogWrapper {

        private JTextField keyField;

        private JTextField valueField;

        protected AddConfigVariableDialog() {
            super(true);
            setTitle("Add Config Variable");
            init();
        }

        @Override
        protected JComponent createCenterPanel() {
            final DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("right:pref, 6dlu, pref:grow", "pref"));
            builder.append("Key", keyField = new JTextField(30));
            builder.append("Value:", valueField = new JTextField(50));
            return builder.getPanel();
        }

        public boolean validateInput() {
            super.validate();
            String msg = "";
            if (getKey().isEmpty())
                msg += "Key is empty ";
            if (getValue().isEmpty())
                msg += "Value is empty";
            if (msg.isEmpty())
                return true;
            Notifications.notifyImportantError(getProject(), "Invalid input", msg);
            return false;
        }

        /* incompatible package change of ValidationInfo, replaced by some custom code
                @Override
                protected ValidationInfo doValidate() {
                    if (getKey().isEmpty()) return new ValidationInfo("Key is empty", keyField);
                    if (getValue().isEmpty()) return new ValidationInfo("Value is empty",valueField);
                    return super.doValidate();
                }
        */

        public String getKey() {
            return keyField.getText();
        }
    }

    @Override
    protected List<AnAction> createActions() {
        return Arrays.asList(new AnAction("Add Config Variable", "", icon("/general/add.png")) {

            public void actionPerformed(AnActionEvent anActionEvent) {
                final AddConfigVariableDialog dialog = new AddConfigVariableDialog();
                dialog.show();
                if (dialog.getExitCode() == AddConfigVariableDialog.OK_EXIT_CODE && dialog.validateInput()) {
                    herokuProjectService.addConfigVar(dialog.getKey(), dialog.getValue());
                    HerokuConfigWindow.this.doUpdate();
                }
            }
        }, new AnAction("Remove Config Variable", "", icon("/general/remove.png")) {

            public void actionPerformed(AnActionEvent anActionEvent) {
                final String varName = tableModel.getKey(selectedRow.get());
                herokuProjectService.removeConfigVar(varName);
                HerokuConfigWindow.this.doUpdate();
            }
        }, new AnAction("Update", "", icon("/actions/sync.png")) {

            public void actionPerformed(AnActionEvent anActionEvent) {
                HerokuConfigWindow.this.doUpdate();
            }
        });
    }

    public HerokuConfigWindow(HerokuProjectService herokuProjectService) {
        super(herokuProjectService);
    }
}


boolean getDaemonFunEnable(int r1) {
        /*
        // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.oppo.media.DaemonFunControl.getDaemonFunEnable(int):boolean, dex:
        */
        throw new UnsupportedOperationException("Method not decompiled: com.oppo.media.DaemonFunControl.getDaemonFunEnable(int):boolean");
    }

package com.oppo.media;

import android.content.Context;

/*  JADX ERROR: NullPointerException in pass: ExtractFieldInit
    java.lang.NullPointerException
    	at jadx.core.utils.BlockUtils.isAllBlocksEmpty(BlockUtils.java:546)
    	at jadx.core.dex.visitors.ExtractFieldInit.getConstructorsList(ExtractFieldInit.java:221)
    	at jadx.core.dex.visitors.ExtractFieldInit.moveCommonFieldsInit(ExtractFieldInit.java:121)
    	at jadx.core.dex.visitors.ExtractFieldInit.visit(ExtractFieldInit.java:46)
    	at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:12)
    	at jadx.core.ProcessClass.process(ProcessClass.java:32)
    	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
    	at jadx.api.JavaClass.decompile(JavaClass.java:62)
    	at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
    */
public class DaemonFunControl {

    private static final String TAG = "OppoMultimediaService_FunControl";

    private final Context mContext;

    private String[] mFunControlName;

    private OppoDaemonListHelper mOppoDaemonListHelper;

    /*  JADX ERROR: Method load error
        jadx.core.utils.exceptions.DecodeException: Load method exception: bogus opcode: 00e8 in method: com.oppo.media.DaemonFunControl.<init>(android.content.Context, com.oppo.media.OppoDaemonListHelper):void, dex:
        	at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:118)
        	at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:248)
        	at jadx.core.ProcessClass.process(ProcessClass.java:29)
        	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
        	at jadx.api.JavaClass.decompile(JavaClass.java:62)
        	at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
        Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e8
        	at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1227)
        	at com.android.dx.io.OpcodeInfo.getName(OpcodeInfo.java:1234)
        	at jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:581)
        	at jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:74)
        	at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:104)
        	... 5 more
        */
    public DaemonFunControl(android.content.Context r1, com.oppo.media.OppoDaemonListHelper r2) {
        /*
        // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.oppo.media.DaemonFunControl.<init>(android.content.Context, com.oppo.media.OppoDaemonListHelper):void, dex:
        */
        throw new UnsupportedOperationException("Method not decompiled: com.oppo.media.DaemonFunControl.<init>(android.content.Context, com.oppo.media.OppoDaemonListHelper):void");
    }

    /*  JADX ERROR: Method load error
        jadx.core.utils.exceptions.DecodeException: Load method exception: bogus opcode: 00e5 in method: com.oppo.media.DaemonFunControl.getDaemonFunEnable(int):boolean, dex:
        	at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:118)
        	at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:248)
        	at jadx.core.ProcessClass.process(ProcessClass.java:29)
        	at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:292)
        	at jadx.api.JavaClass.decompile(JavaClass.java:62)
        	at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)
        Caused by: java.lang.IllegalArgumentException: bogus opcode: 00e5
        	at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1227)
        	at com.android.dx.io.OpcodeInfo.getName(OpcodeInfo.java:1234)
        	at jadx.core.dex.instructions.InsnDecoder.decode(InsnDecoder.java:581)
        	at jadx.core.dex.instructions.InsnDecoder.process(InsnDecoder.java:74)
        	at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:104)
        	... 5 more
        */


public void setPrintOutput(boolean printOutput) {
        if (printOutput == false) {
            par.printLevel = PrintLevel.OFF;
        } else {
            par.printLevel = PrintLevel.BASIC;
        }
    }

package net.kanjitomo;

import static net.kanjitomo.DictionaryType.*;
import static net.kanjitomo.dictionary.SearchMode.CONTAINS;
import static net.kanjitomo.dictionary.SearchMode.STARTS_WITH;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
import net.kanjitomo.area.AreaDetector;
import net.kanjitomo.area.AreaTask;
import net.kanjitomo.area.Column;
import net.kanjitomo.area.SubImage;
import net.kanjitomo.dictionary.MultiSearchResult;
import net.kanjitomo.dictionary.SearchManager;
import net.kanjitomo.ocr.OCRManager;
import net.kanjitomo.ocr.OCRResult;
import net.kanjitomo.ocr.OCRTask;
import net.kanjitomo.ocr.ReferenceMatrixCacheLoader;
import net.kanjitomo.util.Parameters;
import net.kanjitomo.util.PrintLevel;

/**
 * Main class of the KanjiTomo OCR library
 */
public class KanjiTomo {

    private Parameters par = Parameters.getInstance();

    private OCRManager ocr;

    private SearchManager searchManager;

    private AreaTask areaTask;

    private List<SubImage> subImages;

    private List<Rectangle> locations;

    private List<OCRTask> ocrTasks;

    private List<String> characters;

    private List<List<Integer>> ocrScores;

    private MultiSearchResult multiSearchResult;

    private OCRResults results;

    /**
     * Loads data structures into memory. This should be called first on it's own
     * thread as the program starts because loading data can take couple of seconds.
     * It's allowed to call this multiple times, results are cached and further calls
     * don't take any more time unless dictionary is changed.
     */
    public void loadData() throws Exception {
        if (ocr == null) {
            ocr = new OCRManager();
            ocr.loadReferenceData();
            new ReferenceMatrixCacheLoader().load();
            searchManager = new SearchManager();
        }
        if (par.primaryDictionary != null) {
            searchManager.loadData();
            searchManager.waitForIndexing();
        }
    }

    /**
     * Sets the target image. This can be a screenshot around target characters or a whole page.
     */
    public void setTargetImage(BufferedImage image) throws Exception {
        if (ocr == null) {
            loadData();
        }
        long started = System.currentTimeMillis();
        detectAreas(image);
        long time = System.currentTimeMillis() - started;
        if (par.isPrintDebug()) {
            System.out.println("Target image processed, " + time + " ms\n");
        }
        if (par.isPrintOutput() && !par.isPrintDebug()) {
            System.out.println("Target image processed\n");
        }
    }

    /**
     * Gets columns detected from target image
     */
    public List<net.kanjitomo.Column> getColumns() {
        if (areaTask == null) {
            return new ArrayList<net.kanjitomo.Column>();
        }
        List<net.kanjitomo.Column> simpleColumns = new ArrayList<>();
        for (Column column : areaTask.getColumns()) {
            net.kanjitomo.Column simpleColumn = column.getSimpleColumn();
            if (column.getPreviousColumn() != null) {
                simpleColumn.previousColumn = column.getPreviousColumn().getSimpleColumn();
            }
            if (column.getNextColumn() != null) {
                simpleColumn.nextColumn = column.getNextColumn().getSimpleColumn();
            }
            simpleColumns.add(simpleColumn);
        }
        return simpleColumns;
    }

    /**
     * Runs OCR starting from a point.
     *
     * @param point Coordinates inside target image. Closest character near this point
     * will be selected as the first target character. Point should correspond to mouse
     * cursor position relative to target image.
     *
     * @return null if no characters found near point
     */
    public OCRResults runOCR(Point point) throws Exception {
        if (areaTask == null) {
            throw new Exception("Target image not set");
        }
        if (par.isPrintOutput()) {
            System.out.println("Run OCR at point:" + (int) point.getX() + "," + (int) point.getY());
        }
        // select areas near point
        subImages = areaTask.getSubImages(point);
        return runOCR();
    }

    /**
     * Runs OCR inside pre-defined areas where each rectangle contains single characters.
     * This can be used if area detection is done externally and KanjiTomo is only used for final OCR.
     */
    public OCRResults runOCR(List<Rectangle> areas) throws Exception {
        if (areaTask == null) {
            throw new Exception("Target image not set");
        }
        if (par.isPrintOutput()) {
            System.out.println("Run OCR rectangle list");
        }
        // build subimages from argument areas
        subImages = areaTask.getSubImages(areas);
        return runOCR();
    }

    /**
     * Runs OCR for target areas (SubImages)
     */
    private OCRResults runOCR() throws Exception {
        long started = System.currentTimeMillis();
        // get target locations
        locations = new ArrayList<Rectangle>();
        for (SubImage subImage : subImages) {
            locations.add(subImage.location);
            verticalOrientation = subImage.isVertical();
        }
        if (subImages.size() == 0) {
            if (par.isPrintOutput()) {
                System.out.println("No characters identified");
            }
            return null;
        }
        // run ocr for each character
        ocrTasks = new ArrayList<OCRTask>();
        int charIndex = 0;
        Column lastColumn = null;
        for (SubImage subImage : subImages) {
            OCRTask ocrTask = new OCRTask(subImage.image);
            ocrTask.charIndex = charIndex++;
            ocrTasks.add(ocrTask);
            if (lastColumn == null) {
                lastColumn = subImage.column;
            } else {
                if (lastColumn != subImage.column) {
                    ocrTask.columnChanged = true;
                }
            }
            ocr.addTask(ocrTask);
        }
        ocr.waitUntilDone();
        // collect identified characters
        characters = new ArrayList<>();
        ocrScores = new ArrayList<>();
        for (OCRTask ocrTask : ocrTasks) {
            characters.add(ocrTask.getResultString());
            List<Integer> scores = new ArrayList<Integer>();
            for (OCRResult result : ocrTask.results) {
                scores.add(result.getScore());
            }
            ocrScores.add(scores);
        }
        if (par.primaryDictionary != null) {
            // cut off characters from other columns
            // This is used to restrict multisearch to characters within single column, multi-column
            // multisearch is too unreliable since it can often connect unrelated characters into single word.
            int maxWidth = 0;
            for (OCRTask task : ocrTasks) {
                if (task.columnChanged) {
                    break;
                }
                ++maxWidth;
            }
            multiSearchResult = searchManager.multiSearch(characters, ocrScores, maxWidth);
        }
        // wrap results into final object
        if (par.primaryDictionary != null) {
            results = new OCRResults(characters, locations, ocrScores, multiSearchResult.words, multiSearchResult.searchStr, verticalOrientation);
        } else {
            results = new OCRResults(characters, locations, ocrScores, null, null, verticalOrientation);
        }
        long time = System.currentTimeMillis() - started;
        if (par.isPrintOutput()) {
            System.out.println(results + "\n");
        }
        if (par.isPrintDebug()) {
            System.out.println("OCR runtime " + time + " ms\n");
        }
        return results;
    }

    /**
     * Analyzes the image and detects areas that might contain characters.
     */
    private void detectAreas(BufferedImage image) throws Exception {
        areaTask = new AreaTask(image);
        new AreaDetector().run(areaTask);
    }

    /**
     * Vertical orientation was used in the area closest to selected point
     */
    private boolean verticalOrientation = true;

    /**
     * Searches words from selected dictionary.
     *
     * @param searchString Search term supplied by the user or read from OCR results
     *
     * @param startsWith If true, only words starting with the searchString are
     * considered. If false, searchString can appear anywhere in the word (kanji or
     * kana fields, search from description field is not supported)
     *
     * @return List of maching words sorted by increasing length of kanji/kana field
     */
    public List<Word> searchDictionary(String searchString, boolean startsWith) throws Exception {
        return searchManager.search(searchString, startsWith ? STARTS_WITH : CONTAINS);
    }

    /**
     * Sets which dictionary is used. It's recommended to call loadData() after changing the dictionary
     * in background thread before user interaction. It's possible to turn off dictionary search
     * by setting primaryDictionary to null but this is not recommended since search is used to
     * refine OCR results.
     *
     * @param primaryDictionary First dictionary used for searching
     * @param secondaryDictionary If a match is not found from primary dictionary, secondary is used for searching
     */
    public void setDictionary(DictionaryType primaryDictionary, DictionaryType secondaryDictionary) {
        par.primaryDictionary = primaryDictionary;
        par.secondaryDictionary = secondaryDictionary;
        if (primaryDictionary == CHINESE || secondaryDictionary == CHINESE) {
            throw new Error("Chinese dictionary is not implemented");
        }
    }

    /**
     * Sets the reading direction. Default is automatic.
     *
     * Target image needs to be re-analyzed after changing the orientation by calling setTargetImage again.
     */
    public void setOrientation(Orientation orientation) {
        par.orientationTarget = orientation;
    }

    /**
     * Sets character and background color. Black and white characters work best,
     * but coloured characters might also work if there's enough contrast.
     *
     * Target image needs to be re-analyzed after changing the color by calling setTargetImage again.
     *
     * Default: CharacterColor.AUTOMATIC
     */
    public void setCharacterColor(CharacterColor color) {
        par.colorTarget = color;
    }

    /**
     * If true, OCR results are printed to stdout.
     * If false, nothing is printed.
     * Default: false
     */

    /**
     * Stops all threads. This should be called before closing the program.
     */
    public void close() {
        ocr.stopThreads();
    }
}


package org.scale7.zookeeper.cages;

public interface IMultiPathLock extends ILock {

    /**
     * Get all the read lock paths the lock will acquire
     *
     * @return							The read lock paths
     */

    /**
     * Get all the write lock paths the lock will acquire
     *
     * @return							The write lock paths
     */
    String[] getWriteLockPaths();

    /**
     * Discover whether the multilock is or will lock a specific path
     *
     * @param lockPath						The lock path to query
     * @return								The type of lock on that path. LockType.None if no lock for path
     */
    LockType contains(String lockPath);
}


public List<String> generateParenthesis(int n) {
        List<String> res = new ArrayList<>();
        _generate(0, 0, n, "", res);
        return res;
    }

package com.uanei;

import java.util.ArrayList;
import java.util.List;

public class LeetCode_22_286 {

    /**
     * 思路：n就是递归层数，左括号或者右括号出现的次数等于n，左出现之后才能有右
     */

    private void _generate(int left, int right, int n, String s, List<String> res) {
        // 终结条件：出现的对数够了
        if (left == n && right == n) {
            res.add(s);
            return;
        }
        // 左括号先出现，递归层数限制之内
        if (left < n)
            _generate(left + 1, right, n, s + "(", res);
        // 右括号必须在有左括号前提下才能出现，层数已经有左括号限制了
        if (left > right)
            _generate(left, right + 1, n, s + ")", res);
    }
}


public void setOperationTimeout(int operationTimeout, TimeUnit unit) {
        checkArgument(operationTimeout >= 0);
        confData.setOperationTimeoutMs(unit.toMillis(operationTimeout));
    }

package org.apache.pulsar.client.api;

import static com.google.common.base.Preconditions.checkArgument;
import java.io.Serializable;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.pulsar.client.api.PulsarClientException.UnsupportedAuthenticationException;
import org.apache.pulsar.client.impl.conf.ClientConfigurationData;

/**
 * Class used to specify client side configuration like authentication, etc..
 *
 * @deprecated Use {@link PulsarClient#builder()} to construct and configure a new {@link PulsarClient} instance
 */
@Deprecated
public class ClientConfiguration implements Serializable {

    private static final long serialVersionUID = 1L;

    private final ClientConfigurationData confData = new ClientConfigurationData();

    /**
     * @return the authentication provider to be used
     */
    public Authentication getAuthentication() {
        return confData.getAuthentication();
    }

    /**
     * Set the authentication provider to use in the Pulsar client instance.
     *

     * Example:
     *

     *
     *

     *
     * ClientConfiguration confData = new ClientConfiguration();
     * String authPluginClassName = "org.apache.pulsar.client.impl.auth.MyAuthentication";
     * String authParamsString = "key1:val1,key2:val2";
     * Authentication auth = AuthenticationFactory.create(authPluginClassName, authParamsString);
     * confData.setAuthentication(auth);
     * PulsarClient client = PulsarClient.create(serviceUrl, confData);
     * ....
     *
     *

     *
     * @param authentication
     */
    public void setAuthentication(Authentication authentication) {
        confData.setAuthentication(authentication);
    }

    /**
     * Set the authentication provider to use in the Pulsar client instance.
     *

     * Example:
     *

     *
     *

     *
     * ClientConfiguration confData = new ClientConfiguration();
     * String authPluginClassName = "org.apache.pulsar.client.impl.auth.MyAuthentication";
     * String authParamsString = "key1:val1,key2:val2";
     * confData.setAuthentication(authPluginClassName, authParamsString);
     * PulsarClient client = PulsarClient.create(serviceUrl, confData);
     * ....
     *
     *

     *
     * @param authPluginClassName
     *            name of the Authentication-Plugin you want to use
     * @param authParamsString
     *            string which represents parameters for the Authentication-Plugin, e.g., "key1:val1,key2:val2"
     * @throws UnsupportedAuthenticationException
     *             failed to instantiate specified Authentication-Plugin
     */
    public void setAuthentication(String authPluginClassName, String authParamsString) throws UnsupportedAuthenticationException {
        confData.setAuthentication(AuthenticationFactory.create(authPluginClassName, authParamsString));
    }

    /**
     * Set the authentication provider to use in the Pulsar client instance.
     *

     * Example:
     *

     *
     *

     *
     * ClientConfiguration confData = new ClientConfiguration();
     * String authPluginClassName = "org.apache.pulsar.client.impl.auth.MyAuthentication";
     * Map<String, String> authParams = new HashMap<String, String>();
     * authParams.put("key1", "val1");
     * confData.setAuthentication(authPluginClassName, authParams);
     * PulsarClient client = PulsarClient.create(serviceUrl, confData);
     * ....
     *
     *

     *
     * @param authPluginClassName
     *            name of the Authentication-Plugin you want to use
     * @param authParams
     *            map which represents parameters for the Authentication-Plugin
     * @throws UnsupportedAuthenticationException
     *             failed to instantiate specified Authentication-Plugin
     */
    public void setAuthentication(String authPluginClassName, Map<String, String> authParams) throws UnsupportedAuthenticationException {
        confData.setAuthentication(AuthenticationFactory.create(authPluginClassName, authParams));
    }

    /**
     * @return the operation timeout in ms
     */
    public long getOperationTimeoutMs() {
        return confData.getOperationTimeoutMs();
    }

    /**
     * Set the operation timeout (default: 30 seconds)
     *

     * Producer-create, subscribe and unsubscribe operations will be retried until this interval, after which the
     * operation will be marked as failed
     *
     * @param operationTimeout
     *            operation timeout
     * @param unit
     *            time unit for {@code operationTimeout}
     */

/**
     * @return the number of threads to use for handling connections
     */
    public int getIoThreads() {
        return confData.getNumIoThreads();
    }

    /**
     * Set the number of threads to be used for handling connections to brokers (default: 1 thread)
     *
     * @param numIoThreads
     */
    public void setIoThreads(int numIoThreads) {
        checkArgument(numIoThreads > 0);
        confData.setNumIoThreads(numIoThreads);
    }

    /**
     * @return the number of threads to use for message listeners
     */
    public int getListenerThreads() {
        return confData.getNumListenerThreads();
    }

    /**
     * Set the number of threads to be used for message listeners (default: 1 thread)
     *
     * @param numListenerThreads
     */
    public void setListenerThreads(int numListenerThreads) {
        checkArgument(numListenerThreads > 0);
        confData.setNumListenerThreads(numListenerThreads);
    }

    /**
     * @return the max number of connections per single broker
     */
    public int getConnectionsPerBroker() {
        return confData.getConnectionsPerBroker();
    }

    /**
     * Sets the max number of connection that the client library will open to a single broker.
     *

     * By default, the connection pool will use a single connection for all the producers and consumers. Increasing this
     * parameter may improve throughput when using many producers over a high latency connection.
     *

     *
     * @param connectionsPerBroker
     *            max number of connections per broker (needs to be greater than 0)
     */
    public void setConnectionsPerBroker(int connectionsPerBroker) {
        checkArgument(connectionsPerBroker > 0, "Connections per broker need to be greater than 0");
        confData.setConnectionsPerBroker(connectionsPerBroker);
    }

    /**
     * @return whether TCP no-delay should be set on the connections
     */
    public boolean isUseTcpNoDelay() {
        return confData.isUseTcpNoDelay();
    }

    /**
     * Configure whether to use TCP no-delay flag on the connection, to disable Nagle algorithm.
     *

     * No-delay features make sure packets are sent out on the network as soon as possible, and it's critical to achieve
     * low latency publishes. On the other hand, sending out a huge number of small packets might limit the overall
     * throughput, so if latency is not a concern, it's advisable to set the useTcpNoDelay flag to false.
     *

     * Default value is true
     *
     * @param useTcpNoDelay
     */
    public void setUseTcpNoDelay(boolean useTcpNoDelay) {
        confData.setUseTcpNoDelay(useTcpNoDelay);
    }

    /**
     * @return whether TLS encryption is used on the connection
     */
    public boolean isUseTls() {
        return confData.isUseTls();
    }

    /**
     * Configure whether to use TLS encryption on the connection (default: false)
     *
     * @param useTls
     */
    public void setUseTls(boolean useTls) {
        confData.setUseTls(useTls);
    }

    /**
     * @return path to the trusted TLS certificate file
     */
    public String getTlsTrustCertsFilePath() {
        return confData.getTlsTrustCertsFilePath();
    }

    /**
     * Set the path to the trusted TLS certificate file
     *
     * @param tlsTrustCertsFilePath
     */
    public void setTlsTrustCertsFilePath(String tlsTrustCertsFilePath) {
        confData.setTlsTrustCertsFilePath(tlsTrustCertsFilePath);
    }

    /**
     * @return whether the Pulsar client accept untrusted TLS certificate from broker
     */
    public boolean isTlsAllowInsecureConnection() {
        return confData.isTlsAllowInsecureConnection();
    }

    /**
     * Configure whether the Pulsar client accept untrusted TLS certificate from broker (default: false)
     *
     * @param tlsAllowInsecureConnection
     */
    public void setTlsAllowInsecureConnection(boolean tlsAllowInsecureConnection) {
        confData.setTlsAllowInsecureConnection(tlsAllowInsecureConnection);
    }

    /**
     * Stats will be activated with positive statsIntervalSeconds
     *
     * @return the interval between each stat info (default: 60 seconds)
     */
    public long getStatsIntervalSeconds() {
        return confData.getStatsIntervalSeconds();
    }

    /**
     * Set the interval between each stat info (default: 60 seconds) Stats will be activated with positive
     * statsIntervalSeconds It should be set to at least 1 second
     *
     * @param statsInterval
     *            the interval between each stat info
     * @param unit
     *            time unit for {@code statsInterval}
     */
    public void setStatsInterval(long statsInterval, TimeUnit unit) {
        confData.setStatsIntervalSeconds(unit.toSeconds(statsInterval));
    }

    /**
     * Get configured total allowed concurrent lookup-request.
     *
     * @return
     */
    public int getConcurrentLookupRequest() {
        return confData.getConcurrentLookupRequest();
    }

    /**
     * Number of concurrent lookup-requests allowed on each broker-connection to prevent overload on broker.
     * (default: 50000) It should be configured with higher value only in case of it requires to
     * produce/subscribe on thousands of topic using created {@link PulsarClient}
     *
     * @param concurrentLookupRequest
     */
    public void setConcurrentLookupRequest(int concurrentLookupRequest) {
        confData.setConcurrentLookupRequest(concurrentLookupRequest);
    }

    /**
     * Get configured max number of reject-request in a time-frame (30 seconds) after which connection will be closed
     *
     * @return
     */
    public int getMaxNumberOfRejectedRequestPerConnection() {
        return confData.getMaxNumberOfRejectedRequestPerConnection();
    }

    /**
     * Set max number of broker-rejected requests in a certain time-frame (30 seconds) after which current connection
     * will be closed and client creates a new connection that give chance to connect a different broker (default:
     * 50)
     *
     * @param maxNumberOfRejectedRequestPerConnection
     */
    public void setMaxNumberOfRejectedRequestPerConnection(int maxNumberOfRejectedRequestPerConnection) {
        confData.setMaxNumberOfRejectedRequestPerConnection(maxNumberOfRejectedRequestPerConnection);
    }

    public boolean isTlsHostnameVerificationEnable() {
        return confData.isTlsHostnameVerificationEnable();
    }

    /**
     * It allows to validate hostname verification when client connects to broker over tls. It validates incoming x509
     * certificate and matches provided hostname(CN/SAN) with expected broker's host name. It follows RFC 2818, 3.1.
     * Server Identity hostname verification.
     *
     * @see rfc2818
     *
     * @param tlsHostnameVerificationEnable
     */
    public void setTlsHostnameVerificationEnable(boolean tlsHostnameVerificationEnable) {
        confData.setTlsHostnameVerificationEnable(tlsHostnameVerificationEnable);
    }

    public ClientConfiguration setServiceUrl(String serviceUrl) {
        confData.setServiceUrl(serviceUrl);
        return this;
    }

    /**
     * Set the duration of time to wait for a connection to a broker to be established. If the duration
     * passes without a response from the broker, the connection attempt is dropped.
     *
     * @param duration the duration to wait
     * @param unit the time unit in which the duration is defined
     */
    public void setConnectionTimeout(int duration, TimeUnit unit) {
        confData.setConnectionTimeoutMs((int) unit.toMillis(duration));
    }

    /**
     * Get the duration of time for which the client will wait for a connection to a broker to be
     * established before giving up.
     *
     * @return the duration, in milliseconds
     */
    public long getConnectionTimeoutMs() {
        return confData.getConnectionTimeoutMs();
    }

    public ClientConfigurationData getConfigurationData() {
        return confData;
    }
}


public DocumentOcrResultSet readOcrOutputFile(GoogleStorageLocation jsonFile) {
        if (!jsonFile.isFile()) {
            throw new IllegalArgumentException("Provided jsonOutputFile location is not a valid file location: " + jsonFile);
        }
        Blob jsonOutputBlob = this.storage.get(BlobId.of(jsonFile.getBucketName(), jsonFile.getBlobName()));
        return new DocumentOcrResultSet(Collections.singletonList(jsonOutputBlob));
    }

package com.google.cloud.spring.vision;

import java.util.Collections;
import java.util.List;
import java.util.concurrent.Executor;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import com.google.api.core.ApiFutureCallback;
import com.google.api.core.ApiFutures;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.Page;
import com.google.cloud.spring.storage.GoogleStorageLocation;
import com.google.cloud.storage.Blob;
import com.google.cloud.storage.BlobId;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.Storage.BlobListOption;
import com.google.cloud.vision.v1.AsyncAnnotateFileRequest;
import com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse;
import com.google.cloud.vision.v1.Feature;
import com.google.cloud.vision.v1.Feature.Type;
import com.google.cloud.vision.v1.GcsDestination;
import com.google.cloud.vision.v1.GcsSource;
import com.google.cloud.vision.v1.ImageAnnotatorClient;
import com.google.cloud.vision.v1.InputConfig;
import com.google.cloud.vision.v1.OperationMetadata;
import com.google.cloud.vision.v1.OutputConfig;
import com.google.cloud.vision.v1.TextAnnotation;
import org.springframework.util.Assert;
import org.springframework.util.concurrent.ListenableFuture;
import org.springframework.util.concurrent.SettableListenableFuture;

/**
 * Template providing convenient operations for interfacing with Google Cloud Vision's
 * Document OCR feature, which allows you to run OCR algorithms on documents (PDF or TIFF format)
 * stored on Google Cloud Storage.
 *
 * @author Daniel Zou
 */
public class DocumentOcrTemplate {

    private static final Feature DOCUMENT_OCR_FEATURE = Feature.newBuilder().setType(Type.DOCUMENT_TEXT_DETECTION).build();

    private final ImageAnnotatorClient imageAnnotatorClient;

    private final Storage storage;

    private final Executor executor;

    private final int jsonOutputBatchSize;

    public DocumentOcrTemplate(ImageAnnotatorClient imageAnnotatorClient, Storage storage, Executor executor, int jsonOutputBatchSize) {
        this.imageAnnotatorClient = imageAnnotatorClient;
        this.storage = storage;
        this.executor = executor;
        this.jsonOutputBatchSize = jsonOutputBatchSize;
    }

    /**
     * Runs OCR processing for a specified {@code document} and generates OCR output files
     * under the path specified by {@code outputFilePathPrefix}.
     *
     *

     * For example, if you specify an {@code outputFilePathPrefix} of
     * "gs://bucket_name/ocr_results/myDoc_", all the output files of OCR processing will be
     * saved under prefix, such as:
     *
     *

     *
gs://bucket_name/ocr_results/myDoc_output-1-to-5.json
     *
gs://bucket_name/ocr_results/myDoc_output-6-to-10.json
     *
gs://bucket_name/ocr_results/myDoc_output-11-to-15.json
     *

     *
     *

     * Note: OCR processing operations may take several minutes to complete, so it may not be
     * advisable to block on the completion of the operation. One may use the returned
     * {@link ListenableFuture} to register callbacks or track the status of the operation.
     *
     * @param document The {@link GoogleStorageLocation} of the document to run OCR processing
     * @param outputFilePathPrefix The {@link GoogleStorageLocation} of a file, folder, or a
     *     bucket describing the path for which all output files shall be saved under
     *
     * @return A {@link ListenableFuture} allowing you to register callbacks or wait for the
     * completion of the operation.
     */
    public ListenableFuture<DocumentOcrResultSet> runOcrForDocument(GoogleStorageLocation document, GoogleStorageLocation outputFilePathPrefix) {
        Assert.isTrue(document.isFile(), "Provided document location is not a valid file location: " + document);
        GcsSource gcsSource = GcsSource.newBuilder().setUri(document.uriString()).build();
        String contentType = extractContentType(document);
        InputConfig inputConfig = InputConfig.newBuilder().setMimeType(contentType).setGcsSource(gcsSource).build();
        GcsDestination gcsDestination = GcsDestination.newBuilder().setUri(outputFilePathPrefix.uriString()).build();
        OutputConfig outputConfig = OutputConfig.newBuilder().setGcsDestination(gcsDestination).setBatchSize(this.jsonOutputBatchSize).build();
        AsyncAnnotateFileRequest request = AsyncAnnotateFileRequest.newBuilder().addFeatures(DOCUMENT_OCR_FEATURE).setInputConfig(inputConfig).setOutputConfig(outputConfig).build();
        OperationFuture<AsyncBatchAnnotateFilesResponse, OperationMetadata> result = imageAnnotatorClient.asyncBatchAnnotateFilesAsync(Collections.singletonList(request));
        return extractOcrResultFuture(result);
    }

    /**
     * Parses the OCR output files who have the specified {@code jsonFilesetPrefix}. This
     * method assumes that all of the OCR output files with the prefix are a part of the same
     * document.
     *
     * @param jsonOutputFilePathPrefix the folder location containing all of the JSON files of
     *     OCR output
     * @return A {@link DocumentOcrResultSet} describing the OCR content of a document
     */
    public DocumentOcrResultSet readOcrOutputFileSet(GoogleStorageLocation jsonOutputFilePathPrefix) {
        String nonNullPrefix = (jsonOutputFilePathPrefix.getBlobName() == null) ? "" : jsonOutputFilePathPrefix.getBlobName();
        Page<Blob> blobsInFolder = this.storage.list(jsonOutputFilePathPrefix.getBucketName(), BlobListOption.currentDirectory(), BlobListOption.prefix(nonNullPrefix));
        List<Blob> blobPages = StreamSupport.stream(blobsInFolder.getValues().spliterator(), false).filter(blob -> blob.getContentType().equals("application/octet-stream")).collect(Collectors.toList());
        return new DocumentOcrResultSet(blobPages);
    }

    /**
     * Parses a single JSON output file and returns the list of pages stored in the file.
     *
     *

     * Each page of the document is represented as a {@link TextAnnotation} which contains the
     * parsed OCR data.
     *
     * @param jsonFile the location of the JSON output file
     * @return the list of {@link TextAnnotation} containing the OCR results
     * @throws RuntimeException if the JSON file cannot be deserialized into a
     *     {@link TextAnnotation} object
     */

    private ListenableFuture<DocumentOcrResultSet> extractOcrResultFuture(OperationFuture<AsyncBatchAnnotateFilesResponse, OperationMetadata> grpcFuture) {
        SettableListenableFuture<DocumentOcrResultSet> result = new SettableListenableFuture<>();
        ApiFutures.addCallback(grpcFuture, new ApiFutureCallback<AsyncBatchAnnotateFilesResponse>() {

            @Override
            public void onFailure(Throwable throwable) {
                result.setException(throwable);
            }

            @Override
            public void onSuccess(AsyncBatchAnnotateFilesResponse asyncBatchAnnotateFilesResponse) {
                String outputLocationUri = asyncBatchAnnotateFilesResponse.getResponsesList().get(0).getOutputConfig().getGcsDestination().getUri();
                GoogleStorageLocation outputFolderLocation = new GoogleStorageLocation(outputLocationUri);
                result.set(readOcrOutputFileSet(outputFolderLocation));
            }
        }, this.executor);
        return result;
    }

    private String extractContentType(GoogleStorageLocation document) {
        Blob documentBlob = this.storage.get(BlobId.of(document.getBucketName(), document.getBlobName()));
        if (documentBlob == null) {
            throw new IllegalArgumentException("Provided document does not exist: " + document);
        }
        return documentBlob.getContentType();
    }
}


package com.alibaba.smart.framework.engine.model.instance;

import java.util.Date;
import java.util.List;

/**
 * @author 高海军 帝奇  2016.11.11
 * @author ettear 2016.04.13
 */
public interface ActivityInstance extends Instance {

    String getProcessDefinitionIdAndVersion();

    void setProcessDefinitionIdAndVersion(String processDefinitionIdAndVersion);

    /**
     * 获取活动ID
     *
     * @return 活动ID
     */
    String getProcessDefinitionActivityId();

    void setProcessDefinitionActivityId(String processDefinitionActivityId);

    /**
     * 获取流程实例ID
     *
     * @return 流程实例ID
     */
    String getProcessInstanceId();

    /**
     * 设置流程实例ID
     *
     * @param processInstanceId 流程实例ID
     */

    void setExecutionInstanceList(List<ExecutionInstance> executionInstanceList);

    List<ExecutionInstance> getExecutionInstanceList();

    // * @param transitionInstance 进入活动的关联
    Date getStartTime();

    void setStartTime(Date startTime);

    String getBlockId();

    void setBlockId(String blockId);
}


public void setSupportEmailTitle(String supportemailTitle) {
        this.supportEmailTitle = supportemailTitle;
    }

package org.oscm.ui.beans;

import java.io.Serializable;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import org.oscm.ui.common.ADMStringUtils;
import org.oscm.ui.common.ExceptionHandler;
import org.oscm.ui.common.UiDelegate;
import org.oscm.ui.dialog.mp.subscriptionDetails.ManageSubscriptionModel;
import org.oscm.validator.ADMValidator;
import org.oscm.internal.types.enumtypes.SubscriptionStatus;
import org.oscm.internal.types.exception.ObjectNotFoundException;
import org.oscm.internal.types.exception.SaaSApplicationException;
import org.oscm.internal.types.exception.ValidationException;

/**
 * Backing bean for handling of sending of issue e-mails to the suppliers
 * support email contact.
 *
 * @author yuyin
 */
@ManagedBean
@RequestScoped
public class ReportIssueBean extends BaseBean implements Serializable {

    private static final long serialVersionUID = -577075617302574650L;

    private static final String ERROR_SUBSCRIPTION_NOT_ACCESSIBLE = "error.subscription.notAccessible";

    private static final String OUTCOME_SUBSCRIPTION_NOT_AVAILABLE = "subscriptionNotAccessible";

    private String supportEmailTitle;

    private String supportEmailContent;

    private static final String SUBSCRIPTIONDETAILS_MODEL = "manageSubscriptionModel";

    UiDelegate ui = new UiDelegate();

    public String init() {
        supportEmailTitle = null;
        supportEmailContent = null;
        // reset the values of all UIInput children
        resetUIInputChildren();
        return null;
    }

    /**
     * Maximum allowed character length of the subject field.
     */
    public int getSubjectLen() {
        return ADMValidator.LENGTH_EMAIL_SUBJECT;
    }

    /**
     * Maximum allowed character length of the content text area.
     */
    public int getContentLen() {
        return ADMValidator.LENGTH_EMAIL_CONTENT;
    }

    /**
     * @param supportemailTitle
     *            the supportemailTitle to set
     */

    /**
     * @return the supportemailTitle
     */
    public String getSupportEmailTitle() {
        return supportEmailTitle;
    }

    /**
     * @param supportemailContent
     *            the supportemailContent to set
     */
    public void setSupportEmailContent(String supportemailContent) {
        this.supportEmailContent = supportemailContent;
    }

    /**
     * @return the supportemailContent
     */
    public String getSupportEmailContent() {
        return supportEmailContent;
    }

    /**
     * Invoke sending of the support email.
     *
     * @return the navigation outcome string according the result of the
     *         operation.
     */
    public String reportIssue(String selectedSubscriptionId) {
        try {
            if (selectedSubscriptionId == null || ADMStringUtils.isBlank(selectedSubscriptionId))
                throw new ValidationException();
            if (validateSubscriptionStatus()) {
                ui.handleError(null, ERROR_SUBSCRIPTION_NOT_ACCESSIBLE, selectedSubscriptionId);
                return OUTCOME_SUBSCRIPTION_NOT_AVAILABLE;
            }
            getSubscriptionService().reportIssue(selectedSubscriptionId, getSupportEmailTitle(), getSupportEmailContent());
        } catch (SaaSApplicationException e) {
            handleException(e);
            return OUTCOME_ERROR;
        } finally {
            this.supportEmailContent = null;
            this.supportEmailTitle = null;
        }
        addMessage(null, FacesMessage.SEVERITY_INFO, INFO_ORGANIZATION_SUPPORTMAIL_SENT);
        return OUTCOME_SUCCESS;
    }

    protected void handleException(SaaSApplicationException e) {
        ExceptionHandler.execute(e);
    }

    /**
     * This method add the "save successful" message to the faces context. The
     * method is used in the context of modal window handling.
     */
    public String refreshSendSuccessMessage() {
        addMessage(null, FacesMessage.SEVERITY_INFO, INFO_ORGANIZATION_SUPPORTMAIL_SENT);
        return OUTCOME_SUCCESS;
    }

    boolean validateSubscriptionStatus() {
        try {
            SubscriptionStatus status = getSubscriptionDetailsService().loadSubscriptionStatus(getSelectedSubscriptionKey()).getResult(SubscriptionStatus.class);
            return status.isInvalidOrDeactive();
        } catch (ObjectNotFoundException e) {
            return true;
        }
    }

    long getSelectedSubscriptionKey() {
        ManageSubscriptionModel model = ui.findBean(SUBSCRIPTIONDETAILS_MODEL);
        return model.getSubscription().getKey();
    }
}


MutableConvertibleMultiValues<V> remove(CharSequence key, V value);

package io.micronaut.core.convert.value;

import java.util.List;

/**
 * @param <V> The generic value
 * @author Graeme Rocher
 * @since 1.0
 */
public interface MutableConvertibleMultiValues<V> extends ConvertibleMultiValues<V>, MutableConvertibleValues<List<V>> {

    /**
     * Adds a value for the given key. Note that this method will not remove items currently associated with the key.
     *
     * @param key   The key
     * @param value The value
     * @return This instance
     */
    MutableConvertibleMultiValues<V> add(CharSequence key, V value);

    /**
     * Remove the given value from the given key.
     *
     * @param key   The key
     * @param value The value
     * @return This instance
     */

    /**
     * Clear all values.
     *
     * @return This instance
     */
    @Override
    MutableConvertibleMultiValues<V> clear();
}


package org.apache.hadoop.hbase.regionserver;

/**
 * An MBean exposing various region ops and info.
 */
public interface IdxRegionMBean {

    /**
     * Checks whether the region being exposed by this MBean is still alive.
     *
     * @return whether the region being exposed by this MBean is still alive.
     */
    boolean isValid();

    /**
     * The number of keys in the index which is equivalent to the number of top
     * level rows in this region.
     *
     * @return the number of keys in the index.
     */
    int getNumberOfIndexedKeys();

    /**
     * The total heap size, in bytes, used by the indexes and their overhead.
     *
     * @return the total index heap size in bytes.
     */
    long getIndexesTotalHeapSize();

    /**
     * Gets the total number of indexed scan since the last reset.
     *
     * @return the total number of indexed scans.
     */
    public long getTotalIndexedScans();

    /**
     * Resets the total number of indexed scans.
     *
     * @return the number of indexed scans just before the reset
     */
    public long resetTotalIndexedScans();

    /**
     * Gets the total number of non indexed scan since the last reset.
     *
     * @return the total number of indexed scans.
     */
    public long getTotalNonIndexedScans();

    /**
     * Resets the total number of non indexed scans.
     *
     * @return the number of indexed scans just before the reset
     */
    public long resetTotalNonIndexedScans();

    /**
     * Exposes the number of indexed scans currently ongoing in the system.
     *
     * @return the number of ongoing indexed scans
     */

    /**
     * Gets the index build times buffer as a comma delimited string
     * where each item is the milliseconds required to rebuild the indexes.
     *
     * @return a rolling buffer of index build times
     */
    public String getIndexBuildTimes();

    /**
     * Resets the index build times buffer.
     *
     * @return the previous build times buffer
     */
    public String resetIndexBuildTimes();
}


while (hasEnoughRoomLeft(eventsQueue)) {
                List<Event> events = persistenceHandler.fetchAndDeleteOverflowedEvents();
                if (events.isEmpty()) {
                    break;
                } else {
                    for (Event event : events) {
                        LocalOutputPipe.pushEventToQueues(persistenceHandler, eventsQueue, overflowedQueue, event);
                    }
                }
            }

package com.datorama.oss.timbermill.cron;

import com.datorama.oss.timbermill.common.KamonConstants;
import com.datorama.oss.timbermill.common.persistence.PersistenceHandler;
import com.datorama.oss.timbermill.pipe.LocalOutputPipe;
import com.datorama.oss.timbermill.unit.Event;
import kamon.metric.Timer;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.BlockingQueue;
import static com.datorama.oss.timbermill.common.ElasticsearchUtil.*;

@DisallowConcurrentExecution
public class EventsPersistentFetchJob implements Job {

    private static final Logger LOG = LoggerFactory.getLogger(EventsPersistentFetchJob.class);

    @Override
    public void execute(JobExecutionContext context) {
        PersistenceHandler persistenceHandler = (PersistenceHandler) context.getJobDetail().getJobDataMap().get(PERSISTENCE_HANDLER);
        BlockingQueue<Event> eventsQueue = (BlockingQueue<Event>) context.getJobDetail().getJobDataMap().get(EVENTS_QUEUE);
        BlockingQueue<Event> overflowedQueue = (BlockingQueue<Event>) context.getJobDetail().getJobDataMap().get(OVERFLOWED_EVENTS_QUEUE);
        if (persistenceHandler != null && hasEnoughRoomLeft(eventsQueue)) {
            KamonConstants.CURRENT_DATA_IN_DB_GAUGE.withTag("type", "overflowed_events_lists_amount").update(persistenceHandler.overFlowedEventsListsAmount());
            String flowId = "Overflowed Event Persistent Fetch Job - " + UUID.randomUUID().toString();
            MDC.put("id", flowId);
            LOG.info("Overflowed Events Fetch Job started.");
            Timer.Started start = KamonConstants.EVENTS_FETCH_JOB_LATENCY.withoutTags().start();

            start.stop();
            LOG.info("Overflowed Events Fetch Job ended.");
        }
    }

    private boolean hasEnoughRoomLeft(BlockingQueue<Event> eventsQueue) {
        // Only when queue had at least 20% free we will start adding persistent events
        double threshold = (eventsQueue.remainingCapacity() + eventsQueue.size()) * 0.2;
        return eventsQueue.remainingCapacity() > threshold;
    }
}


int decreaseAccount(@Param("userId") String userId, @Param("amount") Double amount);

package io.seata.samples.integration.account.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import io.seata.samples.integration.account.entity.TAccount;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * * @author lidong
 * @since 2019-09-04
 */
public interface TAccountMapper extends BaseMapper<TAccount> {

    /**
     * 减少账户余额
     * @param userId
     * @param amount
     * @return
     */