text:
<?xml version="1.0" ?>
<source_library title="source library">
  <source name="RCW86" type="DiffuseSource">
    <spectrum normPar="Prefactor" type="PowerLaw">
      <parameter error="0.3" free="1" max="100" min="0" name="Prefactor" scale="1e-14" value="1.11"/>
      <parameter error="0.1" free="1" max="5" min="0" name="Index" scale="-1" value="1.42"/>
      <parameter free="0" max="100" min="1" name="Scale" scale="1000" value="10"/>
    </spectrum>
    <spatialModel file="$(LATEXTDIR)/Templates/RCW86.fits" map_based_integral="true" type="SpatialMap">
      <parameter free="0" max="1" min="1" name="Prefactor" scale="1" value="1"/>
    </spatialModel>
  </source>
</source_library>

redpajama_set_name: RedPajamaGithub


text:
<?xml version="1.0" standalone="no"?>

<!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">

<s1 title="Migration">
    <s2 title="Migration Archive">

For migration information to &XercesCName; 2.7.0 or earlier,
          please refer to <jump href="migrate_archive.html">Migration Archive. </jump>

    </s2>

    <s2 title="Migrating from &XercesCName; 2.7.0 to &XercesCName; &XercesCVersion;">

The following section is a discussion of the technical differences between
      &XercesCName; 2.7.0 code base and the &XercesCName; &XercesCVersion;.

Topics discussed are:

<link anchor="NewFeatures280">New features in &XercesCName; &XercesCVersion;</link>

<link anchor="API280">Public API Changes</link>

<link anchor="NewAPI280">New Public API</link>

<link anchor="ModifiedAPI280">Modified Public API</link>

<link anchor="DeprecatedAPI280">Deprecated/Removed Public API</link>

    <anchor name="NewFeatures280"/>
    <s3 title="New features in &XercesCName; &XercesCVersion;">

Exponential growth of memory block (from 16KB to 128KB) that are allocated by the DOM heap.

The NODE_CLONED notification is now sent to each node's user data handler when cloning the entire DOMDocument.

On Windows extract the registry code page from MIME\Database\Charset\<encoding>\@InternetEncoding instead of MIME\Database\Charset\<encoding>\@Codepage.

Allow whitespace-only nodes to be added as children of a DOMDocument.

When a node is cloned or imported the type information (PSVI) is also copied.

When using SAX2, including XMLReaderFactory to use createXMLReader doesn't include xercesc/parsers/SAX2XMLReaderImpl.hpp anymore. If you need to cast the SAX2XMLReader to SAX2XMLReaderImpl,
            you need to include this header yourself.

    </s3>

    <anchor name="API280"/>
    <s3 title="Public API Changes">

The following lists the public API changes between the &XercesCName;
           2.7.0; and the &XercesCName; &XercesCVersion; releases
           of the parser.

        <anchor name="NewAPI280"/>
        <s4 title="New Public API">

XMLBufferMgr: getBufferCount and getAvailableBufferCount

        </s4>

        <anchor name="ModifiedAPI280"/>
        <s4 title="Modified Public API">
        </s4>

        <anchor name="DeprecatedAPI280"/>
        <s4 title="Deprecated/Removed Public API">
        </s4>

    </s3>
    </s2>

</s1>


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Wildfly Camel Enricher
  %%
  Copyright (C) 2013 - 2014 RedHat
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.wildfly.camel</groupId>
        <artifactId>wildfly-camel-feature</artifactId>
        <version>10.3.0-SNAPSHOT</version>
    </parent>

    <name>Wildfly Camel :: Feature :: Modules</name>

    <artifactId>wildfly-camel-feature-modules</artifactId>
    <packaging>pom</packaging>

    <properties>
        <smartics.module.dir>${project.build.directory}/wildfly-patch/modules/system/layers/fuse</smartics.module.dir>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly.camel</groupId>
                <artifactId>wildfly-camel-bom</artifactId>
                <version>${project.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.api</groupId>
                <artifactId>api-ldap-codec-standalone</artifactId>
                <version>${version.apache.ds.codec}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.wildfly.camel</groupId>
            <artifactId>wildfly-camel-bom</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.wildfly.camel</groupId>
            <artifactId>wildfly-camel-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.camel</groupId>
            <artifactId>wildfly-camel-cxf-undertow</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.camel</groupId>
            <artifactId>wildfly-camel-subsystem-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.camel</groupId>
            <artifactId>wildfly-camel-subsystem-cdi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.camel</groupId>
            <artifactId>wildfly-camel-subsystem-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.camel</groupId>
            <artifactId>wildfly-camel-subsystem-undertow</artifactId>
        </dependency>

        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v21</artifactId>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v22</artifactId>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v23</artifactId>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v231</artifactId>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v24</artifactId>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v25</artifactId>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v251</artifactId>
        </dependency>
        <dependency>
            <groupId>ca.uhn.hapi</groupId>
            <artifactId>hapi-structures-v26</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
        </dependency>
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.cache</groupId>
            <artifactId>cache-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache-extras.beanshell</groupId>
            <artifactId>bsh</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-camel</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ahc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ahc-ws</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-amqp</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-apns</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-asn1</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-asterisk</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-atmosphere-websocket</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-atom</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-atomix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-avro</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-aws</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-azure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-barcode</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-base64</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-beanio</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-beanstalk</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-bean-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-bindy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-boon</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-box</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-braintree</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-caffeine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cassandraql</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-catalog</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cdi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-chronicle</artifactId>
        </dependency>
        <!-- jsonpath before chunk because of json-smart -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jsonpath</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-chunk</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cm-sms</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cmis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-coap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-connector</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-core-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-couchbase</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-couchdb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-crypto</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-crypto-cms</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-csv</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-cxf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-disruptor</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-digitalocean</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.mockito</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-dns</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-docker</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-dozer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-dropbox</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ehcache</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ejb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-elsql</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-etcd</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-exec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-facebook</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-fhir</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-flatpack</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-fop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-freemarker</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ftp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ganglia</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-geocoder</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-git</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-github</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-google-bigquery</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-google-calendar</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-google-drive</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-google-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-google-pubsub</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-grpc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-groovy</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-gson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-guava-eventbus</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-hazelcast</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-hipchat</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-hl7</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-http4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-headersmap</artifactId>
        </dependency>
        <!-- ribbon before hystrix because of archaius -->
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ribbon</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-hystrix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ical</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-iec60870</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-infinispan</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-influxdb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ipfs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-irc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jackson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jacksonxml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jasypt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jaxb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jbpm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jcache</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jgroups</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jibx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jing</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jms</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jmx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-johnzon</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jolt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jsch</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-json-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-jt400</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-kafka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-kubernetes</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ldap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ldif</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-leveldb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-linkedin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-lra</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-lucene</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-lumberjack</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-lzf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-master</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-metrics</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-micrometer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-milo</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mina2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mongodb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mongodb-gridfs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mongodb3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mllp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mqtt</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-msv</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mustache</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mvel</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mybatis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-nagios</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-nats</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-netty4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-nsq</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ognl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-olingo2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-olingo4</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-openstack</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-opentracing</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-optaplanner</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-paho</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-pdf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-pgevent</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-printer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-protobuf</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-pubnub</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-consul</artifactId><!-- consul after pubnub because of retrofit2 -->
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-quartz2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-quickfix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-rabbitmq</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-reactive-streams</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-reactor</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-rest-swagger</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-rmi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-rss</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-rxjava2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-salesforce</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-sap-netweaver</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.camel</groupId>
                    <artifactId>camel-http</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-saxon</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-schematron</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-script</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-servicenow</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-splunk</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-javaconfig</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-ws</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-soap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-solr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-batch</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-integration</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-ldap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-shiro</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-sjms</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-sip</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-sjms2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-slack</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-sql</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-smpp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-snakeyaml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-snmp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-ssh</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-stax</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-stringtemplate</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-stomp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-stream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-swagger-java</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-syslog</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-tagsoup</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-tarfile</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-telegram</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-thrift</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-tika</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-twilio</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-twitter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-undertow</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-univocity-parsers</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-vertx</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-velocity</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-weather</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-wordpress</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xchange</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xmlsecurity</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xmpp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-xstream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-yammer</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-zendesk</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-zipfile</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-zipkin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-zookeeper</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-zookeeper-master</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.directory.api</groupId>
            <artifactId>api-ldap-codec-standalone</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-to-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-backward-codecs</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-facet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-highlighter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-join</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-memory</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-spatial</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-suggest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-jsr223</artifactId>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.mylyn.github</groupId>
            <artifactId>org.eclipse.egit.github.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-jcache</artifactId>
        </dependency>
        <dependency>
            <groupId>rhino</groupId>
            <artifactId>js</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-galleon-pack</artifactId>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>io.hawt</groupId>
            <artifactId>hawtio-wildfly</artifactId>
            <type>war</type>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>de.smartics.maven.plugin</groupId>
                <artifactId>smartics-jboss-modules-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>create-modules-archive</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>create-modules-archive</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludeDependencyManagementDependenciesInPomProject>true</excludeDependencyManagementDependenciesInPomProject>
                    <generateFeaturePackDefinition>true</generateFeaturePackDefinition>
                    <targetFolder>${smartics.module.dir}</targetFolder>
                    <ignoreOptionalDependencies>true</ignoreOptionalDependencies>
                    <attach>false</attach>
                    <modules>
                        <dir>../common/etc/smartics</dir>
                        <dir>etc/smartics</dir>
                    </modules>
                    <dependencyExcludes>
                        <exclude>
                            <groupId>io.hawt</groupId>
                            <artifactId>hawtio-wildfly</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.apache.logging.log4j</groupId>
                            <artifactId>log4j-api-java9</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.osgi</groupId>
                            <artifactId>osgi_R4_core</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.wildfly.core</groupId>
                            <artifactId>wildfly-core-galleon-pack</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.wildfly</groupId>
                            <artifactId>wildfly-servlet-galleon-pack</artifactId>
                        </exclude>
                        <exclude>
                            <groupId>org.wildfly</groupId>
                            <artifactId>wildfly-galleon-pack</artifactId>
                        </exclude>
                    </dependencyExcludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>sync-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <ant antfile="${basedir}/scripts/sync-generated-modules.xml" inheritRefs="true" />
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.wildfly.galleon-plugins</groupId>
                <artifactId>wildfly-galleon-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>feature-pack-build</id>
                        <goals>
                            <goal>build-feature-pack</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>


text:
[![Build Status](https://github.com/Arkq/bluez-alsa/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/Arkq/bluez-alsa/actions/workflows/build-and-test.yaml)
[![Code Coverage](https://codecov.io/gh/Arkq/bluez-alsa/branch/master/graph/badge.svg)](https://codecov.io/gh/Arkq/bluez-alsa)

## About BlueALSA

This project is a rebirth of a direct integration between [BlueZ][] and
[ALSA][]. Since BlueZ >= 5, the built-in integration has been removed in favor
of 3rd party audio applications. From now on, BlueZ acts as a middleware
between an audio application, which implements Bluetooth audio profile, and a
Bluetooth audio device.

The current status quo is, that in order to stream audio from/to a Bluetooth
device, one has to install a general-purpose audio server such as [PipeWire][]
or [PulseAudio][], or use BlueZ version 4 which is deprecated and unmaintained.

[BlueZ]: http://www.bluez.org/
[ALSA]: https://www.alsa-project.org/
[PipeWire]: https://pipewire.org/
[PulseAudio]: https://www.freedesktop.org/wiki/Software/PulseAudio

This project created and maintains a product called BlueALSA, with which one
can achieve the same Bluetooth audio profile support as with PulseAudio, but
with fewer dependencies and at a lower level in the software stack.  BlueALSA
registers all known Bluetooth audio profiles in BlueZ, so in theory every
Bluetooth device (with audio capabilities) can be connected.

BlueALSA is designed specifically for use on small, low-powered, dedicated
audio or audio/visual systems where the high-level audio management features of
PulseAudio or PipeWire are not required. The target system must be able to
function correctly with all its audio applications interfacing directly with
ALSA. In such systems BlueALSA adds Bluetooth audio support to the existing
ALSA sound card support.

BlueALSA consists of the daemon `bluealsa`, ALSA plug-ins, and a number of
utilities. The basic context is shown in this diagram:

```mermaid
flowchart TD
classDef external fill:#eee,stroke:#333,stroke-width:4px,color:black;
classDef bluealsa fill:#bbf,stroke:#333,stroke-width:4px,color:black;

A[Bluetooth Adapter] <--> B((bluetoothd\ndaemon))
A <--> C((bluealsa daemon))
B <--> C
C <--> D((bluealsa-aplay))
C <--> E(("ALSA clients\n(via plugin)"))
C <--> F((other\nD-Bus clients))

class A,B external;
class C,D,E,F bluealsa;
```

The heart of BlueALSA is the daemon `bluealsa` which interfaces with the BlueZ
Bluetooth daemon `bluetoothd` and the local Bluetooth adapter. It handles the
profile connection and configuration logic for A2DP, HFP and HSP and presents
the resulting audio streams to applications via D-Bus.

BlueALSA includes ALSA plug-ins which hide all the D-Bus specifics and permit
applications to use the ALSA PCM and mixer interfaces, so that existing ALSA
applications can access Bluetooth audio devices in the same way as they use
sound card PCMs and mixers.

BlueALSA also includes a number of utility applications. Of particular note
are:

* bluealsa-aplay\
   an application to simplify the task of building a Bluetooth speaker using
   BlueALSA.

* bluealsa-cli\
   an application to allow command-line management of the BlueALSA system.

* bluealsa-rfcomm\
   a command-line application which provides access to the RFCOMM terminal for
   HFP/HSP devices.

## Installation

Build and install instructions are included in the file
[INSTALL.md](INSTALL.md) and more detailed guidance is available in the
[wiki](https://github.com/Arkq/bluez-alsa/wiki/Installation-from-source).

## Usage

### bluealsa daemon

The main component of BlueALSA is a program called `bluealsa`. By default, this
program shall be run as a root during system startup. It will register
`org.bluealsa` service in the D-Bus system bus, which can be used for accessing
configured audio devices. In general, BlueALSA acts as a proxy between BlueZ
and ALSA.

For details of command-line options to `bluealsa`, consult the [bluealsa manual
page](doc/bluealsa.8.rst).

### ALSA plug-ins

In order to stream audio to e.g. a Bluetooth headset, firstly one has to
connect the device. The most straightforward method is to use BlueZ CLI utility
called `bluetoothctl`. When the device is connected one can use the `bluealsa`
virtual PCM device with ALSA applications just like any other PCM device:

```sh
aplay -D bluealsa Bourree_in_E_minor.wav
```

If there is more than one Bluetooth device connected, the target one can be
specified as a parameter to the PCM:

```sh
aplay -D bluealsa:XX:XX:XX:XX:XX:XX, Bourree_in_E_minor.wav
```

Please note that this PCM device is based on the [ALSA software PCM I/O
plug-in][] - it will not be available in the [ALSA Kernel proc interface][].

[ALSA software PCM I/O plug-in]: https://www.alsa-project.org/alsa-doc/alsa-lib/pcm_external_plugins.html
[ALSA Kernel proc interface]: https://www.kernel.org/doc/html/latest/sound/designs/procfile.html

Setup parameters of the bluealsa PCM device can be set in the local `.asoundrc`
configuration file like this:

```sh
cat ~/.asoundrc
defaults.bluealsa.service "org.bluealsa"
defaults.bluealsa.device "XX:XX:XX:XX:XX:XX"
defaults.bluealsa.profile "a2dp"
defaults.bluealsa.delay 10000
```

BlueALSA also allows to capture audio from the connected Bluetooth device. To
do so, one has to use the capture PCM device, e.g.:

```sh
arecord -D bluealsa -f s16_le -c 2 -r 48000 capture.wav
```

In addition to A2DP profile, used for high quality audio, BlueALSA also allows
to use phone audio connection via SCO link. One can use either built-in HSP/HFP
support, which implements only audio related part of the specification, or use
[oFono][] service as a back-end. In order to open SCO audio connection one
shall switch to `sco` profile like follows:

[oFono]: https://01.org/ofono

```sh
aplay -D bluealsa:DEV=XX:XX:XX:XX:XX:XX,PROFILE=sco Bourree_in_E_minor.wav
```

In order to control input or output audio level, one can use provided
`bluealsa` control plug-in. This plug-in allows adjusting the volume of the
audio stream or simply mute/unmute it, e.g.:

```sh
amixer -D bluealsa sset '<control name>' 70%
```

where the control name is the name of a connected Bluetooth device with a
control element suffix, e.g.:

```sh
amixer -D bluealsa sset 'Jabra MOVE v2.3.0 A2DP' 50%
```

For full details of the BlueALSA ALSA PCM device and mixer device consult the
[BlueALSA plug-ins manual page](doc/bluealsa-plugins.7.rst).

There are also a number of articles on the [bluez-alsa project wiki][] giving
more examples of using these plug-ins.

[bluez-alsa project wiki]: https://github.com/Arkq/bluez-alsa/wiki

For more advanced ALSA configuration, consult the [asoundrc on-line
documentation][] provided by the AlsaProject wiki page.

[asoundrc on-line documentation]: https://www.alsa-project.org/main/index.php/Asoundrc

### bluealsa-aplay

It is possible to create Bluetooth-powered speaker using BlueALSA. For this it
is required to forward the audio signal from the BlueALSA capture PCM to some
other playback PCM (e.g. built-in audio card).  In order to simplify this task,
BlueALSA includes a program called `bluealsa-aplay`, which acts as a simple
BlueALSA player. Connect your Bluetooth device (e.g. smartphone) and do as
follows:

```sh
bluealsa-aplay XX:XX:XX:XX:XX:XX
```

For details of command-line options to `bluealsa-aplay`, consult the
[bluealsa-aplay manual page](doc/bluealsa-aplay.1.rst). There are also some
articles on the [bluez-alsa project wiki][] giving examples of its use.

The list of available BlueALSA PCMs (provided by connected Bluetooth devices
with audio capabilities) can be obtained directly from [BlueALSA D-Bus
API](doc/bluealsa-api.txt) or using `bluealsa-aplay` as a convenient wrapper as
follows:

```sh
bluealsa-aplay -L
```

## Troubleshooting

1. Using BlueALSA alongside PulseAudio or PipeWire.

   Due to BlueZ limitations, only one program can register as provider of
   Bluetooth audio profile implementation. So it is not possible to use
   BlueALSA if either PulseAudio or PipeWire are also running with their own
   Bluetooth modules enabled; it is first necessary to disable Bluetooth in
   those applications.

2. ALSA thread-safe API (alsa-lib >= 1.1.2, <= 1.1.3).

   ALSA library versions 1.1.2 and 1.1.3 had a bug in their thread-safe API
   functions. This bug does not affect hardware audio devices, but it affects
   many software plug-ins. Random deadlocks are inevitable. The best advice is
   to use a more recent alsa-lib release, or if that is not possible then
   disable the thread locking code via an environment variable, as follows:
   `export LIBASOUND_THREAD_SAFE=0`.

3. Couldn't acquire D-Bus name: org.bluealsa

   It is not possible to run more than one instance of the BlueALSA server per
   D-Bus interface. If one tries to run second instance, it will fail with the
   `"Couldn't acquire D-Bus name: org.bluealsa"` error message. This message
   might also appear when D-Bus policy does not allow acquiring "org.bluealsa"
   name for a particular user - by default only root is allowed to start
   BlueALSA server.

4. Couldn't get BlueALSA PCM: PCM not found

   In contrast to standard ALSA sound cards, BlueALSA does not expose all PCMs
   right away. In the first place it is required to connect remote Bluetooth
   device with desired Bluetooth profile - run `bluealsa --help` for the list
   of available profiles. For querying currently connected audio profiles (and
   connected devices), run `bluealsa-aplay --list-devices`. The common
   misconception is an attempt to use A2DP playback device as a capture one in
   case where A2DP is not listed in the "List of CAPTURE Bluetooth Devices"
   section.

   Additionally, the cause of the "PCM not found" error might be an incorrect
   ALSA PCM name. Run `bluealsa-aplay --list-pcms` for the list of currently
   available ALSA PCM names - it might give you a hint what is wrong with your
   `.asoundrc` entry. Also, take a look at the [bluealsa-plugins manual
   page](doc/bluealsa-plugins.7.rst).

## Contributing

This project welcomes contributions of code, documentation and testing. For
code and manual page contributions, please use GitHub Pull Requests. There is
no strict policy for PRs, each contribution will be evaluated individually. If
you wish to help by testing PRs or by making review comments please do so by
adding comments to the PR.

When preparing a pull request, if possible please configure with
`--enable-test`, and to catch as many coding errors as possible please compile
with:

```sh
make CFLAGS="-Wall -Wextra -Werror"
```

and then run the unit test suite:

```sh
make check
```

The project wiki is "public" and contributions there are also welcome.

## Bug reports, feature requests, and requests for help

Before raising a new issue, please search previous issues (both open and
closed), to see if your question has already been answered or problem resolved.
If reporting a problem, please clearly state the version of BlueALSA that you
are using, and give sufficient information for readers to be able to reproduce
the issue.

Please also look at the [wiki](https://github.com/Arkq/bluez-alsa/wiki) if you
require help as there is a great deal of useful information. Unfortunately the
wiki is not indexed by web search engines, so searching on-line for your issue
will not discover the information in there.

## License

BlueALSA is licensed under the terms of the MIT license. See the [LICENSE
file](LICENSE) for details.

## Resources

1. [Bluetooth Adopted Specifications](https://www.bluetooth.com/specifications/adopted-specifications)
2. [Bluetooth Design Guidelines](https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf)
3. [RTP Payload Format for MPEG-4](https://tools.ietf.org/html/rfc6416)
4. [Coding of MPEG-4 Audio](https://www.iso.org/standard/42739.html)
5. [ALSA project library reference](https://www.alsa-project.org/alsa-doc/alsa-lib/index.html)


text:
package main

import (
	"bytes"
	"flag"
	"fmt"
	"io/ioutil"
	"os"

	"gopkg.in/reform.v1"
)

var (
	execFlags  = flag.NewFlagSet("exec", flag.ExitOnError)
	execSplitF = execFlags.Bool("split", false, "Split statements by semicolon; does not handles them in string literals")
)

func init() {
	execFlags.Usage = func() {
		fmt.Fprintf(os.Stderr, "`exec` command executes SQL queries from given files or stdin.\n\n")
		fmt.Fprintf(os.Stderr, "Usage:\n")
		fmt.Fprintf(os.Stderr, "  %s [global flags] exec [exec flags] [file names]\n\n", os.Args[0])
		fmt.Fprintf(os.Stderr, "Global flags:\n")
		flag.PrintDefaults()
		fmt.Fprintf(os.Stderr, "\nExec flags:\n")
		execFlags.PrintDefaults()

		// TODO mention -split flag
		fmt.Fprintf(os.Stderr, `
Each file's content is executed as a single query. If it contains multiple
statements, make sure SQL driver supports them. If file names are not given,
a query is read from stdin until EOF, then executed.
`)
	}
}

// readFiles reads queries from given files, or from stdin, if files are not given
func readFiles(files []string, split bool) (queries []string) {
	// read stdin
	if len(files) == 0 {
		logger.Debugf("no files are given, reading stdin")
		b, err := ioutil.ReadAll(os.Stdin)
		if err != nil {
			logger.Fatalf("failed to read stdin: %s", err)
		}
		b = bytes.TrimSpace(b)
		if len(b) > 0 {
			if split {
				s := bytes.Split(b, []byte(";"))
				for _, ss := range s {
					ss = bytes.TrimSpace(ss)
					if len(ss) > 0 {
						queries = append(queries, string(ss))
					}
				}
			} else {
				queries = append(queries, string(b))
			}
		}

		return
	}

	// read files
	for _, f := range files {
		logger.Debugf("reading file %s", f)
		b, err := ioutil.ReadFile(f) //nolint:gosec
		if err != nil {
			logger.Fatalf("failed to read file %s: %s", f, err)
		}
		b = bytes.TrimSpace(b)
		if len(b) > 0 {
			if split {
				s := bytes.Split(b, []byte(";"))
				for _, ss := range s {
					ss = bytes.TrimSpace(ss)
					if len(ss) > 0 {
						queries = append(queries, string(ss))
					}
				}
			} else {
				queries = append(queries, string(b))
			}
		}
	}

	return
}

// cmdExec implements exec command.
func cmdExec(db *reform.DB, files []string) {
	queries := readFiles(files, *execSplitF)
	for _, q := range queries {
		if _, err := db.Exec(q); err != nil {
			logger.Fatalf("failed to execute %s: %s", q, err)
		}
	}
}


text:
namespace installer {

// Operations specific to the Chrome Binaries; see ProductOperations for general
// info.
class ChromeBinariesOperations : public ProductOperations {
 public:
  ChromeBinariesOperations() {}

  virtual void ReadOptions(const MasterPreferences& prefs,
                           std::set<std::wstring>* options) const OVERRIDE;

  virtual void ReadOptions(const CommandLine& uninstall_command,
                           std::set<std::wstring>* options) const OVERRIDE;

  virtual void AddKeyFiles(
      const std::set<std::wstring>& options,
      std::vector<base::FilePath>* key_files) const OVERRIDE;

  virtual void AddComDllList(
      const std::set<std::wstring>& options,
      std::vector<base::FilePath>* com_dll_list) const OVERRIDE;

  virtual void AppendProductFlags(
      const std::set<std::wstring>& options,
      CommandLine* cmd_line) const OVERRIDE;

  virtual void AppendRenameFlags(
      const std::set<std::wstring>& options,
      CommandLine* cmd_line) const OVERRIDE;

  virtual bool SetChannelFlags(const std::set<std::wstring>& options,
                               bool set,
                               ChannelInfo* channel_info) const OVERRIDE;

  virtual bool ShouldCreateUninstallEntry(
      const std::set<std::wstring>& options) const OVERRIDE;

  virtual void AddDefaultShortcutProperties(
      BrowserDistribution* dist,
      const base::FilePath& target_exe,
      ShellUtil::ShortcutProperties* properties) const OVERRIDE;

 private:
  DISALLOW_COPY_AND_ASSIGN(ChromeBinariesOperations);
};

}  // namespace installer

#endif  // CHROME_INSTALLER_UTIL_CHROME_BINARIES_OPERATIONS_H_


text:
var util = require("util");
var crypto = require('crypto');
var _ = require('lodash');
var uuid = require('uuid');

function Controller() {
    /**
     * The "before" filters registered on the controller.
     *
     * @var array
     * @protected
     */
    this.__beforeFilters = [];
}

/**
 * Set the route filterer implementation.
 *
 * @param  filterer
 * @return void
 * @static
 */
Controller.setFilterer = function (filterer) {
    Controller.filterer = filterer;
};

/**
 * Get the route filterer implementation.
 */
Controller.getFilterer = function () {
    return Controller.filterer;
};

/**
 *
 * @param Child
 * @returns {function}
 * @static
 */
Controller.extend = function (Child) {

    function ChildProxy() {
        ChildProxy.super_.call(this);
        Child.apply(this, arguments);
    }

    util.inherits(ChildProxy, this);
    ChildProxy.prototype = util._extend(ChildProxy.prototype, Child.prototype);
    ChildProxy.extend = this.extend;

    return ChildProxy;
};

/**
 * Execute an action on the controller.
 *
 * @param method
 * @param args
 */
Controller.prototype.callAction = function (method, args) {

    this[method].apply(this, args)
};

/**
 * Get the registered "before" filters.
 *
 * @return array
 */
Controller.prototype.getBeforeFilters = function () {
    return this.__beforeFilters.slice(0);
};

/**
 * Register a "before" filter on the controller.
 *
 * @param  filter
 * @param  options
 * @return void
 */
Controller.prototype.beforeFilter = function (filter, options) {
    if (!isset(options)) {
        options = {};
    }

    this.__beforeFilters.push(this.__parseFilter(filter, options));
};

/**
 * Parse the given filter and options.
 *
 * @param  filter
 * @param  options
 * @return Object
 * @protected
 */
Controller.prototype.__parseFilter = function (filter, options) {
    var original = filter;

    if (typeof filter === "function") {
        filter = this.__registerClosureFilter(filter);
    } else if (this.__isInstanceFilter(filter)) {
        filter = this.__registerInstanceFilter(filter);
    } else {
        filter = Controller.filterer.parseFilter(filter);
    }

    return {
        original: original,
        filter: Object.keys(filter)[0],
        parameters: filter[Object.keys(filter)[0]],
        options: options
    };
};

/**
 * Register an anonymous controller filter Closure.
 *
 * @param  filter
 * @return string
 * @protected
 * @note: name generation when same closure used multiple times(don't re reg existing)
 */
Controller.prototype.__registerClosureFilter = function (filter) {
    var name = uuid.v4();
    Controller.getFilterer().register('router.filter: ' + name, filter);

    var obj = {};
    obj[name] = [];

    return obj;
};

/**
 * Determine if a filter is a local method on the controller.
 *
 * @param  filter
 * @return boolean
 *
 * @throws Error
 * @protected
 */
Controller.prototype.__isInstanceFilter = function (filter) {
    if (_.isString(filter) && _.startsWith(filter, '@')) {
        if (typeof this[filter.substr(1)] === 'function') return true;

        throw new Error("Filter method " + filter + " does not exist.");
    }

    return false;
};

/**
 * Register a controller instance method as a filter.
 *
 * @param  filter
 * @return string
 */
Controller.prototype.__registerInstanceFilter = function (filter) {
    var name = uuid.v4();
    Controller.getFilterer().register('router.filter: ' + name/*filter*/, this[filter.substr(1)].bind(this));

    var obj = {};
    obj[name] = [];
    return obj/*filter*/;
};

/**
 * Handle calls to missing methods on the controller.
 *
 *
 */
Controller.prototype.missingMethod = function (request, response) {
    var notFoundError = new Error("Controller method not found.");
    notFoundError.status = 404;
    response.abort(notFoundError);
};

module.exports = Controller;


text:
<?php namespace Fisharebest\Localization\Language;

use Fisharebest\Localization\PluralRule\PluralRule2;
use Fisharebest\Localization\Territory\TerritoryBe;

class LanguageWa extends AbstractLanguage implements LanguageInterface {
	public function code() {
		return 'wa';
	}

	public function defaultTerritory() {
		return new TerritoryBe;
	}

	public function pluralRule() {
		return new PluralRule2;
	}
}


text:
cask "font-quattrocento" do
  version :latest
  sha256 :no_check

  url "https://github.com/google/fonts/trunk/ofl/quattrocento",
      verified: "github.com/google/fonts/",
      using:    :svn
  name "Quattrocento"
  homepage "https://fonts.google.com/specimen/Quattrocento"

  font "Quattrocento-Bold.ttf"
  font "Quattrocento-Regular.ttf"
end


text:
	#include "windows.h"
#else

#endif
string getFullPath_plat(const string&filePath){
	//on windows, full path is equals to path
	return filePath;
}

bool isFileExistsAtPath_plat(const string&path){
	//char* to LPCWSTR, see: http://user.qzone.qq.com/350479720/blog/1333813760
	const int max_len=200;
	WCHAR path_LPCWSTR[max_len];
    MultiByteToWideChar(0,0,path.c_str(),-1,path_LPCWSTR,max_len);
	//judge whether path exist
	//see http://blog.csdn.net/wangjieest/article/details/7000640
	//note, the above article has a error, the first method in this article is 'judge whether a directory is exist', not 'whether a directory or file is exist'
	//so here we have corrected it.
	//and see http://zhidao.baidu.com/link?url=E9bPjRsRuXx4NJbped99kepRZdfGCzqrgJIA8eDLELAvWHObrxAJtD-dkrJ9i413dry5btTMFfnIZQF6YcvTGq
    WIN32_FIND_DATA wfd;
    bool rValue = false;
    HANDLE hFind = FindFirstFile(path_LPCWSTR, &wfd);
    if ((hFind!=INVALID_HANDLE_VALUE))
    {
		if(wfd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY){
			//is a directory
		}else{
			//is a file
		}
		rValue = true;
    }
    FindClose(hFind);
    return rValue;
}


text:
import access
import mgwr
import spglm
import spint
import spreg
import spvcm
import tobler


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.trino.sql.planner;

import java.util.List;
import java.util.stream.IntStream;
import java.util.stream.Stream;

import static com.google.common.collect.ImmutableList.toImmutableList;
import static java.lang.String.format;

/**
 * This class tests cost-based optimization rules related to joins. It contains unmodified TPCDS queries.
 * This class is using Hive connector with mocked in memory thrift metastore with un-partitioned TPCDS tables.
 */
public class TestHiveTpcdsCostBasedPlan
        extends AbstractHiveCostBasedPlanTest
{
    /*
     * CAUTION: The expected plans here are not necessarily optimal yet. Their role is to prevent
     * inadvertent regressions. A conscious improvement to the planner may require changing some
     * of the expected plans, but any such change should be verified on an actual cluster with
     * large amount of data.
     */

    public static final String TPCDS_METADATA_DIR = "/hive_metadata/unpartitioned_tpcds";
    public static final List<String> TPCDS_SQL_FILES = IntStream.range(1, 100)
            .mapToObj(i -> format("q%02d", i))
            .map(queryId -> format("/sql/presto/tpcds/%s.sql", queryId))
            .collect(toImmutableList());

    @Override
    protected String getMetadataDir()
    {
        return TPCDS_METADATA_DIR;
    }

    @Override
    protected boolean isPartitioned()
    {
        return false;
    }

    @Override
    protected Stream<String> getQueryResourcePaths()
    {
        return TPCDS_SQL_FILES.stream();
    }

    public static void main(String[] args)
    {
        new TestHiveTpcdsCostBasedPlan().generate();
    }
}


text:
package com.babel.core.data.search.criteria;

import java.beans.PropertyDescriptor;
import java.io.Serializable;

import javax.persistence.Query;

import org.codehaus.jackson.annotate.JsonTypeInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")//http://www.cowtowncoder.com/blog/archives/2010/03/entry_372.html
public class Predicate implements Serializable {
	public static Logger logger=LoggerFactory.getLogger(Predicate.class);

	public static final String DEFAULT_FIELD_PREFIX = "t";
	private static final long serialVersionUID = -4060484141734017797L;
	private static final String POINTS = ":";
	private static final String STRING = "}";
	private static final String SEMICOLON = ";";
	private static final String BRACK = "{";
	private static final String PERCENTAGE_SIGN	= "%";

	private String fieldName;
	private String paramName;

	//private transient PropertyDescriptor field;//not serializable- see the getter
	private Operator operator=Operator.EQUALS_TO;
	private LogicalOperator logicalOperator = LogicalOperator.AND;
	private Object value;
	private String prefix=DEFAULT_FIELD_PREFIX;

	public Predicate(){}
	public Predicate(PropertyDescriptor prop, Operator operator,
			Object value) {
		// TODO: check value type
		super();
		//this.setField (field);
		this.fieldName=prop.getName();
		this.operator = operator;
		this.value = value;
	}

	public Predicate(LogicalOperator logicalOperator,
			PropertyDescriptor field, Operator operator, Object value) {
		this(field, operator, value);
		this.logicalOperator = logicalOperator;

	}

	public String buildQueryParam() {
		return this.logicalOperator.toString() + this.getOperand1()
		+ this.operator + POINTS + this.getParamName();

	}

	public void setQueryParam(Query q) {
		logger.debug("param {}:{}", this.getParamName(), this.getCorrectedValue());
		q.setParameter(this.getParamName(), this.getCorrectedValue());
	}

	/**
	 * override this for special cases like applying functions to certain field
	 * types
	 *
	 * @return
	 */
	protected String getOperand1() {
		return this.prefix+"."+this.fieldName;
	}

	@Override
	public String toString() {
		return new StringBuilder().append(super.toString()).append(BRACK)
				.append(logicalOperator).append(fieldName).append(SEMICOLON)
				.append(operator != null ? operator.toString() : "null").append(value).append(STRING)
				.toString();
	}

	public String getParamName() {
		if (this.paramName == null){
			return this.fieldName;
		} else {
			return this.paramName;
		}

	}

	public void setParamName(String paramName) {
		this.paramName = paramName;
	}

//	public PropertyDescriptor getField() {
//		return field;
//	}
//
//	public void setField(PropertyDescriptor field) {
//		this.field = field;
//
//	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

//	@Ignore
	protected Object getCorrectedValue(){
		Object correctedValue = getValue();
		if (getOperator().equals(Operator.LIKE) && correctedValue != null && correctedValue.getClass().equals(String.class)){
			correctedValue = PERCENTAGE_SIGN + correctedValue + PERCENTAGE_SIGN;
			System.err.println("corrected value for " + getFieldName() + ": " + correctedValue);
		}
		return correctedValue;
	}

	public Operator getOperator() {
		return operator;
	}

	public void setOperator(Operator operator) {
		this.operator = operator;
	}

	public LogicalOperator getLogicalOperator() {
		return logicalOperator;
	}

	public void setLogicalOperator(LogicalOperator logicalOperator) {
		this.logicalOperator = logicalOperator;
	}

	public String getPrefix() {
		return prefix;
	}

	public void setPrefix(String prefix) {
		this.prefix = prefix;
	}
	public String getFieldName() {
		return fieldName;
	}

}


text:
<resources>
    <string name="app_name">bluetoothconnectorlibrary</string>
</resources>


text:
package org.keycloak.models;

import org.keycloak.provider.Provider;

/**
 * @author Hiroyuki Wada
 */
public interface OAuth2DeviceUserCodeProvider extends Provider {

    /**
     * Generate a new user code for OAuth 2.0 Device Authorization Grant.
     *
     * @return Return a generated user code
     */
    String generate();

    /**
     * Get human-readability user code from original user code.
     *
     * @param userCode Original user code
     * @return Return a human-readability user code
     */
    String display(String userCode);

    /**
     * Format inputted user code.
     *
     * @param userCode Inputted user code.
     * @return
     */
    String format(String userCode);
}


text:
#ifndef SELF_DESCRIBING_JSON_H
#define SELF_DESCRIBING_JSON_H

#include <string>
#include "../constants.hpp"
#include "../thirdparty/json.hpp"

using std::string;
using json = nlohmann::json;

namespace snowplow {
/**
 * @brief Self-describing JSON object used for defining self-describing events or custom context entities.
 */
class SelfDescribingJson {
private:
  json m_json;

public:
  /**
   * @brief Construct a new Self Describing Json object
   *
   * @param schema Iglu schema (e.g., "iglu:com.snowplowanalytics.snowplow/timing/jsonschema/1-0-0")
   * @param data Data payload with unstructured set of properties
   */
  SelfDescribingJson(const string &schema, const json &data);

  /**
   * @brief Destroy the Self Describing Json object
   */
  ~SelfDescribingJson();

  /**
   * @brief Return the content of the self-describing JSON.
   *
   * @return json Content as a JSON object
   */
  json get() const;

  /**
   * @brief Return the content of the self-describing JSON as string.
   *
   * @return string Content as a JSON string
   */
  string to_string() const;
};
}

#endif


text:
/*

* Changeable.h

*

*  Created on: 14.07.2016

*      Author: frankp

*/

#ifndef CHANGEABLE_H_

#define CHANGEABLE_H_

class Changeable {

public:

       Changeable(int startValue);

       virtual ~Changeable();

       void setValue(int newValue);

       int getValue();

       void (*myCallback)(int);

       void setCallback(void (*callback)(int))

       {

              myCallback = callback;

       }

private :

       int value;

};

#endif /* CHANGEABLE_H_ */


text:
package se.sawano.java.security.otp.google.keyuri.parameters;

/**
 * OPTIONAL: The algorithm may have the values:
 *

 *
SHA1 (Default)

 *
SHA256

 *
SHA512

 *

 * See https://github.com/google/google-authenticator/wiki/Key-Uri-Format#algorithm
 */
public enum Algorithm implements Parameter {

    SHA1("SHA1"),
    SHA256("SHA256"),
    SHA512("SHA512");

    private final String value;

    Algorithm(final String value) {this.value = value;}

    public String value() {
        return value;
    }

    @Override
    public String parameterPair() {
        return "algorithm=" + value;
    }
}


text:
package org.apache.flink.runtime.state;

import org.apache.flink.api.common.state.StateDescriptor;
import org.apache.flink.api.common.typeutils.TypeSerializer;
import org.apache.flink.api.common.typeutils.UnloadableDummyTypeSerializer;
import org.apache.flink.api.common.typeutils.base.DoubleSerializer;
import org.apache.flink.api.common.typeutils.base.IntSerializer;
import org.apache.flink.api.common.typeutils.base.LongSerializer;
import org.apache.flink.api.common.typeutils.base.StringSerializer;
import org.apache.flink.core.memory.ByteArrayInputStreamWithPos;
import org.apache.flink.core.memory.ByteArrayOutputStreamWithPos;
import org.apache.flink.core.memory.DataInputViewStreamWrapper;
import org.apache.flink.core.memory.DataOutputViewStreamWrapper;
import org.apache.flink.runtime.state.metainfo.StateMetaInfoReader;
import org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshot;
import org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshotReadersWriters;
import org.apache.flink.testutils.ArtificialCNFExceptionThrowingClassLoader;

import org.junit.Assert;
import org.junit.Test;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import static org.apache.flink.runtime.state.metainfo.StateMetaInfoSnapshotReadersWriters.CURRENT_STATE_META_INFO_SNAPSHOT_VERSION;

public class SerializationProxiesTest {

	@Test
	public void testKeyedBackendSerializationProxyRoundtrip() throws Exception {

		TypeSerializer<?> keySerializer = IntSerializer.INSTANCE;
		TypeSerializer<?> namespaceSerializer = LongSerializer.INSTANCE;
		TypeSerializer<?> stateSerializer = DoubleSerializer.INSTANCE;

		List<StateMetaInfoSnapshot> stateMetaInfoList = new ArrayList<>();

		stateMetaInfoList.add(new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, "a", namespaceSerializer, stateSerializer).snapshot());
		stateMetaInfoList.add(new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, "b", namespaceSerializer, stateSerializer).snapshot());
		stateMetaInfoList.add(new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, "c", namespaceSerializer, stateSerializer).snapshot());

		KeyedBackendSerializationProxy<?> serializationProxy =
				new KeyedBackendSerializationProxy<>(keySerializer, stateMetaInfoList, true);

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			serializationProxy.write(new DataOutputViewStreamWrapper(out));
			serialized = out.toByteArray();
		}

		serializationProxy =
				new KeyedBackendSerializationProxy<>(Thread.currentThread().getContextClassLoader(), true);

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			serializationProxy.read(new DataInputViewStreamWrapper(in));
		}

		Assert.assertTrue(serializationProxy.isUsingKeyGroupCompression());
		Assert.assertEquals(keySerializer, serializationProxy.getKeySerializer());
		Assert.assertEquals(keySerializer.snapshotConfiguration(), serializationProxy.getKeySerializerConfigSnapshot());
		assertEqualStateMetaInfoSnapshotsLists(stateMetaInfoList, serializationProxy.getStateMetaInfoSnapshots());
	}

	@Test
	public void testKeyedBackendSerializationProxyRoundtripWithSerializerSerializationFailures() throws Exception {

		TypeSerializer<?> keySerializer = IntSerializer.INSTANCE;
		TypeSerializer<?> namespaceSerializer = LongSerializer.INSTANCE;
		TypeSerializer<?> stateSerializer = DoubleSerializer.INSTANCE;

		List<StateMetaInfoSnapshot> stateMetaInfoList = new ArrayList<>();

		stateMetaInfoList.add(new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, "a", namespaceSerializer, stateSerializer).snapshot());
		stateMetaInfoList.add(new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, "b", namespaceSerializer, stateSerializer).snapshot());
		stateMetaInfoList.add(new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, "c", namespaceSerializer, stateSerializer).snapshot());

		KeyedBackendSerializationProxy<?> serializationProxy =
			new KeyedBackendSerializationProxy<>(keySerializer, stateMetaInfoList, true);

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			serializationProxy.write(new DataOutputViewStreamWrapper(out));
			serialized = out.toByteArray();
		}

		Set<String> cnfThrowingSerializerClasses = new HashSet<>();
		cnfThrowingSerializerClasses.add(IntSerializer.class.getName());
		cnfThrowingSerializerClasses.add(LongSerializer.class.getName());
		cnfThrowingSerializerClasses.add(DoubleSerializer.class.getName());

		// we want to verify restore resilience when serializer presence is not required;
		// set isSerializerPresenceRequired to false
		serializationProxy =
			new KeyedBackendSerializationProxy<>(
				new ArtificialCNFExceptionThrowingClassLoader(
					Thread.currentThread().getContextClassLoader(),
					cnfThrowingSerializerClasses),
				false);

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			serializationProxy.read(new DataInputViewStreamWrapper(in));
		}

		Assert.assertEquals(true, serializationProxy.isUsingKeyGroupCompression());
		Assert.assertTrue(serializationProxy.getKeySerializer() instanceof UnloadableDummyTypeSerializer);
		Assert.assertEquals(keySerializer.snapshotConfiguration(), serializationProxy.getKeySerializerConfigSnapshot());

		for (StateMetaInfoSnapshot snapshot : serializationProxy.getStateMetaInfoSnapshots()) {
			final RegisteredKeyValueStateBackendMetaInfo<?, ?> restoredMetaInfo = new RegisteredKeyValueStateBackendMetaInfo<>(snapshot);
			Assert.assertTrue(restoredMetaInfo.getNamespaceSerializer() instanceof UnloadableDummyTypeSerializer);
			Assert.assertTrue(restoredMetaInfo.getStateSerializer() instanceof UnloadableDummyTypeSerializer);
			Assert.assertEquals(namespaceSerializer.snapshotConfiguration(), snapshot.getTypeSerializerConfigSnapshot(StateMetaInfoSnapshot.CommonSerializerKeys.NAMESPACE_SERIALIZER));
			Assert.assertEquals(stateSerializer.snapshotConfiguration(), snapshot.getTypeSerializerConfigSnapshot(StateMetaInfoSnapshot.CommonSerializerKeys.VALUE_SERIALIZER));
		}
	}

	@Test
	public void testKeyedStateMetaInfoSerialization() throws Exception {

		String name = "test";
		TypeSerializer<?> namespaceSerializer = LongSerializer.INSTANCE;
		TypeSerializer<?> stateSerializer = DoubleSerializer.INSTANCE;

		StateMetaInfoSnapshot metaInfo = new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, name, namespaceSerializer, stateSerializer).snapshot();

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			StateMetaInfoSnapshotReadersWriters.getWriter().
				writeStateMetaInfoSnapshot(metaInfo, new DataOutputViewStreamWrapper(out));
			serialized = out.toByteArray();
		}

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			final StateMetaInfoReader reader = StateMetaInfoSnapshotReadersWriters.getReader(
				CURRENT_STATE_META_INFO_SNAPSHOT_VERSION, StateMetaInfoSnapshotReadersWriters.StateTypeHint.KEYED_STATE);
			metaInfo = reader.readStateMetaInfoSnapshot(
				new DataInputViewStreamWrapper(in), Thread.currentThread().getContextClassLoader());
		}

		Assert.assertEquals(name, metaInfo.getName());
	}

	@Test
	public void testKeyedStateMetaInfoReadSerializerFailureResilience() throws Exception {
		String name = "test";
		TypeSerializer<?> namespaceSerializer = LongSerializer.INSTANCE;
		TypeSerializer<?> stateSerializer = DoubleSerializer.INSTANCE;

		StateMetaInfoSnapshot snapshot = new RegisteredKeyValueStateBackendMetaInfo<>(
			StateDescriptor.Type.VALUE, name, namespaceSerializer, stateSerializer).snapshot();

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			StateMetaInfoSnapshotReadersWriters.getWriter().
				writeStateMetaInfoSnapshot(snapshot, new DataOutputViewStreamWrapper(out));
			serialized = out.toByteArray();
		}

		Set<String> cnfThrowingSerializerClasses = new HashSet<>();
		cnfThrowingSerializerClasses.add(LongSerializer.class.getName());
		cnfThrowingSerializerClasses.add(DoubleSerializer.class.getName());

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			final StateMetaInfoReader reader = StateMetaInfoSnapshotReadersWriters.getReader(
				CURRENT_STATE_META_INFO_SNAPSHOT_VERSION, StateMetaInfoSnapshotReadersWriters.StateTypeHint.KEYED_STATE);
			final ClassLoader classLoader = new ArtificialCNFExceptionThrowingClassLoader(
				Thread.currentThread().getContextClassLoader(),
				cnfThrowingSerializerClasses);

			snapshot = reader.readStateMetaInfoSnapshot(
				new DataInputViewStreamWrapper(in), classLoader);
		}

		RegisteredKeyValueStateBackendMetaInfo<?, ?> restoredMetaInfo = new RegisteredKeyValueStateBackendMetaInfo<>(snapshot);

		Assert.assertEquals(name, restoredMetaInfo.getName());
		Assert.assertTrue(restoredMetaInfo.getNamespaceSerializer() instanceof UnloadableDummyTypeSerializer);
		Assert.assertTrue(restoredMetaInfo.getStateSerializer() instanceof UnloadableDummyTypeSerializer);
		Assert.assertEquals(namespaceSerializer.snapshotConfiguration(), snapshot.getTypeSerializerConfigSnapshot(StateMetaInfoSnapshot.CommonSerializerKeys.NAMESPACE_SERIALIZER));
		Assert.assertEquals(stateSerializer.snapshotConfiguration(), snapshot.getTypeSerializerConfigSnapshot(StateMetaInfoSnapshot.CommonSerializerKeys.VALUE_SERIALIZER));
	}

	@Test
	public void testOperatorBackendSerializationProxyRoundtrip() throws Exception {

		TypeSerializer<?> stateSerializer = DoubleSerializer.INSTANCE;
		TypeSerializer<?> keySerializer = DoubleSerializer.INSTANCE;
		TypeSerializer<?> valueSerializer = StringSerializer.INSTANCE;

		List<StateMetaInfoSnapshot> stateMetaInfoSnapshots = new ArrayList<>();

		stateMetaInfoSnapshots.add(new RegisteredOperatorStateBackendMetaInfo<>(
			"a", stateSerializer, OperatorStateHandle.Mode.SPLIT_DISTRIBUTE).snapshot());
		stateMetaInfoSnapshots.add(new RegisteredOperatorStateBackendMetaInfo<>(
			"b", stateSerializer, OperatorStateHandle.Mode.SPLIT_DISTRIBUTE).snapshot());
		stateMetaInfoSnapshots.add(new RegisteredOperatorStateBackendMetaInfo<>(
			"c", stateSerializer, OperatorStateHandle.Mode.UNION).snapshot());

		List<StateMetaInfoSnapshot> broadcastStateMetaInfoSnapshots = new ArrayList<>();

		broadcastStateMetaInfoSnapshots.add(new RegisteredBroadcastStateBackendMetaInfo<>(
				"d", OperatorStateHandle.Mode.BROADCAST, keySerializer, valueSerializer).snapshot());
		broadcastStateMetaInfoSnapshots.add(new RegisteredBroadcastStateBackendMetaInfo<>(
				"e", OperatorStateHandle.Mode.BROADCAST, valueSerializer, keySerializer).snapshot());

		OperatorBackendSerializationProxy serializationProxy =
				new OperatorBackendSerializationProxy(stateMetaInfoSnapshots, broadcastStateMetaInfoSnapshots);

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			serializationProxy.write(new DataOutputViewStreamWrapper(out));
			serialized = out.toByteArray();
		}

		serializationProxy =
				new OperatorBackendSerializationProxy(Thread.currentThread().getContextClassLoader());

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			serializationProxy.read(new DataInputViewStreamWrapper(in));
		}

		assertEqualStateMetaInfoSnapshotsLists(stateMetaInfoSnapshots, serializationProxy.getOperatorStateMetaInfoSnapshots());
		assertEqualStateMetaInfoSnapshotsLists(broadcastStateMetaInfoSnapshots, serializationProxy.getBroadcastStateMetaInfoSnapshots());
	}

	@Test
	public void testOperatorStateMetaInfoSerialization() throws Exception {

		String name = "test";
		TypeSerializer<?> stateSerializer = DoubleSerializer.INSTANCE;

		StateMetaInfoSnapshot snapshot =
			new RegisteredOperatorStateBackendMetaInfo<>(
				name, stateSerializer, OperatorStateHandle.Mode.UNION).snapshot();

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			StateMetaInfoSnapshotReadersWriters.getWriter().writeStateMetaInfoSnapshot(snapshot, new DataOutputViewStreamWrapper(out));

			serialized = out.toByteArray();
		}

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			final StateMetaInfoReader reader = StateMetaInfoSnapshotReadersWriters.getReader(
				CURRENT_STATE_META_INFO_SNAPSHOT_VERSION, StateMetaInfoSnapshotReadersWriters.StateTypeHint.OPERATOR_STATE);
			snapshot = reader.readStateMetaInfoSnapshot(
				new DataInputViewStreamWrapper(in), Thread.currentThread().getContextClassLoader());
		}

		RegisteredOperatorStateBackendMetaInfo<?> restoredMetaInfo =
			new RegisteredOperatorStateBackendMetaInfo<>(snapshot);

		Assert.assertEquals(name, restoredMetaInfo.getName());
		Assert.assertEquals(OperatorStateHandle.Mode.UNION, restoredMetaInfo.getAssignmentMode());
		Assert.assertEquals(stateSerializer, restoredMetaInfo.getPartitionStateSerializer());
	}

	@Test
	public void testBroadcastStateMetaInfoSerialization() throws Exception {

		String name = "test";
		TypeSerializer<?> keySerializer = DoubleSerializer.INSTANCE;
		TypeSerializer<?> valueSerializer = StringSerializer.INSTANCE;

		StateMetaInfoSnapshot snapshot =
			new RegisteredBroadcastStateBackendMetaInfo<>(
				name, OperatorStateHandle.Mode.BROADCAST, keySerializer, valueSerializer).snapshot();

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			StateMetaInfoSnapshotReadersWriters.getWriter().
				writeStateMetaInfoSnapshot(snapshot, new DataOutputViewStreamWrapper(out));

			serialized = out.toByteArray();
		}

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			final StateMetaInfoReader reader = StateMetaInfoSnapshotReadersWriters.getReader(
				CURRENT_STATE_META_INFO_SNAPSHOT_VERSION, StateMetaInfoSnapshotReadersWriters.StateTypeHint.OPERATOR_STATE);
			snapshot = reader.readStateMetaInfoSnapshot(
				new DataInputViewStreamWrapper(in), Thread.currentThread().getContextClassLoader());
		}

		RegisteredBroadcastStateBackendMetaInfo<?, ?> restoredMetaInfo =
			new RegisteredBroadcastStateBackendMetaInfo<>(snapshot);

		Assert.assertEquals(name, restoredMetaInfo.getName());
		Assert.assertEquals(
			OperatorStateHandle.Mode.BROADCAST,
			restoredMetaInfo.getAssignmentMode());
		Assert.assertEquals(keySerializer, restoredMetaInfo.getKeySerializer());
		Assert.assertEquals(valueSerializer, restoredMetaInfo.getValueSerializer());
	}

	@Test
	public void testOperatorStateMetaInfoReadSerializerFailureResilience() throws Exception {
		String name = "test";
		TypeSerializer<?> stateSerializer = DoubleSerializer.INSTANCE;

		StateMetaInfoSnapshot snapshot =
			new RegisteredOperatorStateBackendMetaInfo<>(
				name, stateSerializer, OperatorStateHandle.Mode.UNION).snapshot();

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			StateMetaInfoSnapshotReadersWriters.getWriter().
				writeStateMetaInfoSnapshot(snapshot, new DataOutputViewStreamWrapper(out));
			serialized = out.toByteArray();
		}

		Set<String> cnfThrowingSerializerClasses = new HashSet<>();
		cnfThrowingSerializerClasses.add(DoubleSerializer.class.getName());
		cnfThrowingSerializerClasses.add(StringSerializer.class.getName());

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			final StateMetaInfoReader reader = StateMetaInfoSnapshotReadersWriters.getReader(
				CURRENT_STATE_META_INFO_SNAPSHOT_VERSION, StateMetaInfoSnapshotReadersWriters.StateTypeHint.OPERATOR_STATE);
			final ClassLoader classLoader = new ArtificialCNFExceptionThrowingClassLoader(
				Thread.currentThread().getContextClassLoader(),
				cnfThrowingSerializerClasses);
			snapshot = reader.readStateMetaInfoSnapshot(new DataInputViewStreamWrapper(in), classLoader);
		}

		RegisteredOperatorStateBackendMetaInfo<?> restoredMetaInfo =
			new RegisteredOperatorStateBackendMetaInfo<>(snapshot);

		Assert.assertEquals(name, restoredMetaInfo.getName());
		Assert.assertTrue(restoredMetaInfo.getPartitionStateSerializer() instanceof UnloadableDummyTypeSerializer);
		Assert.assertEquals(
			stateSerializer.snapshotConfiguration(),
			snapshot.getTypeSerializerConfigSnapshot(StateMetaInfoSnapshot.CommonSerializerKeys.VALUE_SERIALIZER));
	}

	@Test
	public void testBroadcastStateMetaInfoReadSerializerFailureResilience() throws Exception {
		String broadcastName = "broadcastTest";
		TypeSerializer<?> keySerializer = DoubleSerializer.INSTANCE;
		TypeSerializer<?> valueSerializer = StringSerializer.INSTANCE;

		StateMetaInfoSnapshot snapshot =
			new RegisteredBroadcastStateBackendMetaInfo<>(
				broadcastName, OperatorStateHandle.Mode.BROADCAST, keySerializer, valueSerializer).snapshot();

		byte[] serialized;
		try (ByteArrayOutputStreamWithPos out = new ByteArrayOutputStreamWithPos()) {
			StateMetaInfoSnapshotReadersWriters.getWriter().
				writeStateMetaInfoSnapshot(snapshot, new DataOutputViewStreamWrapper(out));

			serialized = out.toByteArray();
		}

		Set<String> cnfThrowingSerializerClasses = new HashSet<>();
		cnfThrowingSerializerClasses.add(DoubleSerializer.class.getName());
		cnfThrowingSerializerClasses.add(StringSerializer.class.getName());

		try (ByteArrayInputStreamWithPos in = new ByteArrayInputStreamWithPos(serialized)) {
			final StateMetaInfoReader reader =
				StateMetaInfoSnapshotReadersWriters.getReader(
					CURRENT_STATE_META_INFO_SNAPSHOT_VERSION,
					StateMetaInfoSnapshotReadersWriters.StateTypeHint.OPERATOR_STATE);

			final ClassLoader classLoader = new ArtificialCNFExceptionThrowingClassLoader(
				Thread.currentThread().getContextClassLoader(),
				cnfThrowingSerializerClasses);

			snapshot = reader.readStateMetaInfoSnapshot(new DataInputViewStreamWrapper(in), classLoader);
		}

		RegisteredBroadcastStateBackendMetaInfo<?, ?> restoredMetaInfo =
			new RegisteredBroadcastStateBackendMetaInfo<>(snapshot);

		Assert.assertEquals(broadcastName, restoredMetaInfo.getName());
		Assert.assertEquals(OperatorStateHandle.Mode.BROADCAST, restoredMetaInfo.getAssignmentMode());
		Assert.assertTrue(restoredMetaInfo.getKeySerializer() instanceof UnloadableDummyTypeSerializer);
		Assert.assertEquals(keySerializer.snapshotConfiguration(), snapshot.getTypeSerializerConfigSnapshot(StateMetaInfoSnapshot.CommonSerializerKeys.KEY_SERIALIZER));
		Assert.assertTrue(restoredMetaInfo.getValueSerializer() instanceof UnloadableDummyTypeSerializer);
		Assert.assertEquals(valueSerializer.snapshotConfiguration(), snapshot.getTypeSerializerConfigSnapshot(StateMetaInfoSnapshot.CommonSerializerKeys.VALUE_SERIALIZER));
	}

	/**
	 * This test fixes the order of elements in the enum which is important for serialization. Do not modify this test
	 * except if you are entirely sure what you are doing.
	 */
	@Test
	public void testFixTypeOrder() {
		// ensure all elements are covered
		Assert.assertEquals(7, StateDescriptor.Type.values().length);
		// fix the order of elements to keep serialization format stable
		Assert.assertEquals(0, StateDescriptor.Type.UNKNOWN.ordinal());
		Assert.assertEquals(1, StateDescriptor.Type.VALUE.ordinal());
		Assert.assertEquals(2, StateDescriptor.Type.LIST.ordinal());
		Assert.assertEquals(3, StateDescriptor.Type.REDUCING.ordinal());
		Assert.assertEquals(4, StateDescriptor.Type.FOLDING.ordinal());
		Assert.assertEquals(5, StateDescriptor.Type.AGGREGATING.ordinal());
		Assert.assertEquals(6, StateDescriptor.Type.MAP.ordinal());
	}

	private void assertEqualStateMetaInfoSnapshotsLists(
		List<StateMetaInfoSnapshot> expected,
		List<StateMetaInfoSnapshot> actual) {
		Assert.assertEquals(expected.size(), actual.size());
		for (int i = 0; i < expected.size(); ++i) {
			assertEqualStateMetaInfoSnapshots(expected.get(i), actual.get(i));
		}
	}

	private void assertEqualStateMetaInfoSnapshots(StateMetaInfoSnapshot expected, StateMetaInfoSnapshot actual) {
		Assert.assertEquals(expected.getName(), actual.getName());
		Assert.assertEquals(expected.getBackendStateType(), actual.getBackendStateType());
		Assert.assertEquals(expected.getOptionsImmutable(), actual.getOptionsImmutable());
		Assert.assertEquals(expected.getSerializersImmutable(), actual.getSerializersImmutable());
		Assert.assertEquals(
			expected.getSerializerConfigSnapshotsImmutable(),
			actual.getSerializerConfigSnapshotsImmutable());
	}
}


text:
# limit4j
Simple to use rate limiting library for Java applications.

## Example

### Rate limiting entire web application

```java
@WebFilter(urlPatterns={"/*"})
public class AwsomeWebFilter extends UsageLimitsFilter {

  /**
   * Limits usage to 100 requests in the last minute.
   */
  private final UsageLimits limits = UsageLimitsBuilder
    .minute()
    .withFramesSplitBySeconds(1)
    .withTotalLimit(100)
    .create();

  @Override
  protected UsageLimits limits(ServletRequest request) {
    return limits;
  }

}
```

### Session and path based rate limiting
```java
@WebFilter(urlPatterns={"/*"})
public class AwsomeWebFilter extends UsageLimitsFilter {

  /**
   * Builder for creating rate limiting instances for each session.
   */
  private final UsageLimitsBuilder defaultLimit = UsageLimitsBuilder
    .minute()
    .withFramesSplitBySeconds(1)
    .withTotalLimit(5);

  @Override
  protected UsageLimits limits(ServletRequest request) {
    HttpServletRequest httpRequest = (HttpServletRequest)request;

    HttpSession session = httpRequest.getSession(false);
    if(session == null)
    {
      // returning null results to HttpServletResponse.SC_UNAUTHORIZED
      return null;
    }
    else
    {
      String name = AwsomeWebFilter.class.getName();

      @SuppressWarnings("unchecked")
      FineGrainedLimits<String> limits = (FineGrainedLimits<String>)session
        .getAttribute(name);

      if(limits == null)
      {
        Map<String, UsageLimits> tmp = new HashMap<>();
        for(String path : Arrays.asList("/", "/path_1", "/path_2")) {
          tmp.put(path, defaultLimit.create());
        }

        limits = FineGrainedLimitsBuilder.fromMap(tmp);

        session.setAttribute(name, limits);
      }

      String group = httpRequest.getPathInfo();

      UsageLimits limit = limits.forGroup(group);
      if(limit == null)
      {
        // unknown paths will be rejected by HttpServletResponse.SC_FORBIDDEN
        limit = RejectedUsage.getInstance();
      }

      return limit;
    }
  }

}
```


text:
app.controller("loginController", function($scope, $rootScope, $cookies, $location, AuthService) {
  $scope.credential = {"username": "", "password": "", "grant_type": "password"};

  $scope.login = function() {
    $scope.loading = true;

    AuthService
      .login($scope.credential)
        .then(function success(token) {
          $location.path('/newPost');
          $scope.loading = false;
        }, function error() {
          $scope.error = "Invalid username or password. Try again.";
          $scope.loading = false;
        });
  };

  $scope.isAuthenticated = function() {
    return AuthService.isAuthenticated();
  };

  $scope.getUsername = function() {
    return AuthService.getUsername();
  };

  $scope.getEmail = function() {
    return AuthService.getEmail();
  };

  $scope.getAvatar = function() {
    return AuthService.getAvatar();
  };

  $scope.logout = function() {
    AuthService
      .logout()
        .then(function success() {
          $location.path('/');
        });
  };

});


text:
package io.soabase.stages.models;

public class Model3 {
}