Merge branch 'main' into bugfix/UIMA-6399-RutaPatternCache-prevents-CPEEngine-from-terminating

* main: (120 commits)
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release ruta-3.1.0
  Revert "[maven-release-plugin] prepare release ruta-3.1.0"
  [maven-release-plugin] prepare release ruta-3.1.0
  [UIMA-6362] Ruta: update versions and notice in eclipse plugin bundles
  [UIMA-6361] p2-layout-resolver upgrade required for Java 16 builds
  [UIMA-6362] Ruta: update versions and notice in eclipse plugin bundles
  [UIMA-6362] Ruta: update versions and notice in eclipse plugin bundles
  no jira - manual rollback
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release ruta-3.1.0
  [UIMA-6360] UIMA Ruta 3.1.0 release
  Revert "[maven-release-plugin] prepare release ruta-3.1.0"
  Revert "[maven-release-plugin] prepare for next development iteration"
  [UIMA-6360] UIMA Ruta 3.1.0 release
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release ruta-3.1.0
  [UIMA-6360] UIMA Ruta 3.1.0 release
  [UIMA-6360] UIMA Ruta 3.1.0 release
  Revert "[maven-release-plugin] prepare release ruta-3.1.0"
  ...
diff --git a/README b/README
index 9631e49..c673e7e 100644
--- a/README
+++ b/README
@@ -1,7 +1,10 @@
 

-Apache UIMA Ruta (TM) v2.8.1

+Apache UIMA Ruta (TM) v3.1.0

 -------------------------------------------------------------------------

 

+This release is compatible with UIMA v3, but not compatible with UIMA v2. 

+For compatibility to UIMA v2, please refer to the latest UIMA Ruta v2 release, e.g., 2.8.0.

+

 Building from the Source Distribution

 -------------------------------------

 

diff --git a/RELEASE_NOTES.html b/RELEASE_NOTES.html
index d660e5a..7ce943c 100644
--- a/RELEASE_NOTES.html
+++ b/RELEASE_NOTES.html
@@ -21,10 +21,10 @@
    -->

 

 <head>

-  <title>Apache UIMA Ruta v2.8.1 Release Notes</title>

+  <title>Apache UIMA Ruta v3.1.0 Release Notes</title>

 </head>

 <body>

-<h1>Apache UIMA Ruta&#8482; v2.8.1 Release Notes</h1>

+<h1>Apache UIMA Ruta&#8482; v3.1.0 Release Notes</h1>

 

 <h2>Contents</h2>

 <p>

@@ -37,25 +37,44 @@
    

 <h2><a name="what.is.uima-ruta">1. What is UIMA Ruta?</a></h2>

 

-     <p>

-  			Apache UIMA Ruta&#8482; is a rule-based script language supported by Eclipse-based tooling.

-      The language is designed to enable rapid development of text processing applications within Apache UIMA&#8482;. 

-      A special focus lies on the intuitive and flexible domain specific language for defining 

-      patterns of annotations. The Eclipse-based tooling for Ruta, called the Ruta Workbench,

-      was created to support the user and to facilitate every step when writing Ruta rules. Both the 

-      Ruta rule language and the Ruta Workbench integrate smoothly with Apache UIMA.

-			</p>

+<p>

+  Apache UIMA Ruta&#8482; is a rule-based script language supported by Eclipse-based tooling.

+  The language is designed to enable rapid development of text processing applications within Apache UIMA&#8482;. 

+  A special focus lies on the intuitive and flexible domain specific language for defining 

+  patterns of annotations. The Eclipse-based tooling for Ruta, called the Ruta Workbench,

+  was created to support the user and to facilitate every step when writing Ruta rules. Both the 

+  Ruta rule language and the Ruta Workbench integrate smoothly with Apache UIMA.

+</p>

 

 <h2><a name="major.changes">2. Major Changes in this Release</a></h2>

 

 <p>

+  This release provides compatibility to UIMA v3. An upgrade from UIMA Ruta v2 to this version requires 

+  also an update to UIMA v3 of the overall application or Eclipse installation. Please refer to the 

+  UIMA v3 user's guide for detailed information: https://uima.apache.org/d/uimaj-3.0.0/version_3_users_guide.html

+</p>

+<p>

   <p>UIMA Ruta Language and Analysis Engine:</p>

   <ul>

-  	<li>Fixed broken literal string matching.</li>

-  	<li>Fixed variable initialization with other variables.</li>

-  	<li>Fixed assignment of lists to variables.</li>

-  	<li>Fixed assignment of annotation comparison expression to variables.</li>

-    <li>PARSE condition supports additional argument that represents the string to be parsed.</li>

+  	<li>New config parameter for internal indexing strategy.</li>

+  	<li>New config parameter for indexing all debug information.</li>

+  	<li>New config parameter for type disambiguation.</li>

+  	<li>TextSeeder is the new default seeder (faster, no MARKUP annotations).</li>

+    <li>Improved null check using label expression.</li>

+    <li>Improved conjunctive and disjunctive rule elements.</li>

+    <li>Improved conjunct rules.</li>

+    <li>Improved implementation of SPLIT, FILL, ADD, REMOVE, AFTER.</li>

+    <li>Improved documentation.</li>

+  </ul>

+  <p>UIMA Ruta Workbench:</p>

+  <ul>

+    <li>Fixed problems launching script using newer Java versions (LayerInstantiationException).</li>

+    <li>Fixed console logging when launching scripts.</li>

+    <li>Improved compatibility with dark mode.</li>

+  </ul>

+  <p>UIMA Ruta Maven Plugin:</p>

+  <ul>

+    <li>Fail on error by default.</li>

   </ul>

 </p>

  

diff --git a/example-projects/ruta-ep-example-extensions/.gitignore b/example-projects/ruta-ep-example-extensions/.gitignore
index 718773c..7e3a306 100644
--- a/example-projects/ruta-ep-example-extensions/.gitignore
+++ b/example-projects/ruta-ep-example-extensions/.gitignore
@@ -1 +1 @@
-META-INF/
+META-INF/
\ No newline at end of file
diff --git a/example-projects/ruta-ep-example-extensions/pom.xml b/example-projects/ruta-ep-example-extensions/pom.xml
index 5c488cc..09e280a 100644
--- a/example-projects/ruta-ep-example-extensions/pom.xml
+++ b/example-projects/ruta-ep-example-extensions/pom.xml
@@ -17,17 +17,14 @@
   specific language governing permissions and limitations

   under the License.

 -->

-

-<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">

+<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>

   <artifactId>ruta-ep-example-extensions</artifactId>

   <name>Apache UIMA Ruta: ${project.artifactId}</name>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -55,7 +52,6 @@
     <dependency>

       <groupId>org.antlr</groupId>

       <artifactId>antlr-runtime</artifactId>

-      <version>3.5.2</version>

       <exclusions>

         <exclusion>

           <groupId>org.antlr</groupId>

diff --git a/example-projects/ruta-maven-example/pom.xml b/example-projects/ruta-maven-example/pom.xml
index ead9775..61cff9e 100644
--- a/example-projects/ruta-maven-example/pom.xml
+++ b/example-projects/ruta-maven-example/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
   <artifactId>ruta-maven-example</artifactId>
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../../ruta-parent/pom.xml</relativePath>
   </parent>
   <url>${uimaWebsiteUrl}</url>
@@ -36,9 +34,9 @@
   </properties>
 
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
diff --git a/pom.xml b/pom.xml
index 11ec603..742e290 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>ruta-parent/pom.xml</relativePath>

   </parent>

 

@@ -35,10 +33,10 @@
   <description>The top project for Apache UIMA Ruta</description>

   <url>${uimaWebsiteUrl}</url>

   <properties>

-    <jiraVersion>12346562</jiraVersion>

-    <!--

-      <assembly.attach>false</assembly.attach>

-    -->

+    <jiraVersion>12348278</jiraVersion>

+    <!-- 

+     <assembly.attach>false</assembly.attach>

+     -->

   </properties>

 

   <!-- override pom setting in the build project. JIRA 5.1 needs different URL -->

@@ -52,9 +50,9 @@
     elements from the chain of parent poms, if this is omitted. Keeping this a bit factored allows cutting/pasting

     the <scm> element, and just changing the following two properties -->

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

@@ -254,12 +252,8 @@
                 <phase>package</phase>

                 <configuration>

                   <target>

-                    <zip

-                      destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip"

-                      update="true">

-                      <zipfileset dir="${basedir}/example-projects/ExampleProject/"

-                        includes=".project"

-                        prefix="${project.artifactId}-${project.version}/example-projects/ExampleProject/" />

+                    <zip destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" update="true">

+                      <zipfileset dir="${basedir}/example-projects/ExampleProject/" includes=".project" prefix="${project.artifactId}-${project.version}/example-projects/ExampleProject/" />

                     </zip>

                     <!-- <zip -->

                     <!-- destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" -->

@@ -268,14 +262,10 @@
                     <!-- dir="${basedir}/example-projects/ExtensionsExample/" -->

                     <!-- includes=".project" -->

                     <!-- prefix="${project.artifactId}-${project.version}/example-projects/ExtensionsExample/" 

-                      /> -->

+                          /> -->

                     <!-- </zip> -->

-                    <zip

-                      destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip"

-                      update="true">

-                      <zipfileset dir="${basedir}/example-projects/TextRulerExample/"

-                        includes=".project"

-                        prefix="${project.artifactId}-${project.version}/example-projects/TextRulerExample/" />

+                    <zip destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" update="true">

+                      <zipfileset dir="${basedir}/example-projects/TextRulerExample/" includes=".project" prefix="${project.artifactId}-${project.version}/example-projects/TextRulerExample/" />

                     </zip>

                     <!-- <zip -->

                     <!-- destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" -->

@@ -283,14 +273,10 @@
                     <!-- <zipfileset dir="${basedir}/example-projects/GermanNovels/" -->

                     <!-- includes=".project" -->

                     <!-- prefix="${project.artifactId}-${project.version}/example-projects/GermanNovels/" 

-                      /> -->

+                          /> -->

                     <!-- </zip> -->

-                    <zip

-                      destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip"

-                      update="true">

-                      <zipfileset dir="${basedir}/example-projects/Misc/"

-                        includes=".project"

-                        prefix="${project.artifactId}-${project.version}/example-projects/Misc/" />

+                    <zip destfile="${project.build.directory}/${project.artifactId}-${project.version}-source-release.zip" update="true">

+                      <zipfileset dir="${basedir}/example-projects/Misc/" includes=".project" prefix="${project.artifactId}-${project.version}/example-projects/Misc/" />

                     </zip>

                   </target>

                 </configuration>

diff --git a/ruta-basic-type/pom.xml b/ruta-basic-type/pom.xml
index 7e57731..e2675e0 100644
--- a/ruta-basic-type/pom.xml
+++ b/ruta-basic-type/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
   <artifactId>ruta-basic-type</artifactId>
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
 
@@ -38,9 +36,9 @@
   <name>Apache UIMA Ruta: ${project.artifactId}</name>
 
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
diff --git a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java b/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
index a2b80f6..dd204b5 100644
--- a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
+++ b/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic.java
@@ -18,6 +18,8 @@
  */
 package org.apache.uima.ruta.type;
 
+import java.lang.invoke.CallSite;
+import java.lang.invoke.MethodHandle;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -25,18 +27,17 @@
 
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.TypeSystem;
+import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.cas.impl.TypeSystemImpl;
 import org.apache.uima.cas.text.AnnotationFS;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.cas.TOP_Type;
 import org.apache.uima.jcas.tcas.Annotation;
 
 /**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012 XML source:
- * D:/work/workspace-uima6/uimaj-ruta/src
- * /main/java/org/apache/uima/ruta/engine/InternalTypeSystem.xml
+ * Updated by JCasGen Fri Feb 16 11:29:59 CET 2018 XML source:
+ * C:/work/ws/ws-uima-ruta/ruta-v3/ruta-typesystem/target/jcasgen/typesystem.xml
  * 
  * @generated
  */
@@ -348,45 +349,85 @@
    * @generated
    * @ordered
    */
+  @SuppressWarnings("hiding")
+  public final static String _TypeName = "org.apache.uima.ruta.type.RutaBasic";
+
+  /**
+   * @generated
+   * @ordered
+   */
+  @SuppressWarnings("hiding")
   public final static int typeIndexID = JCasRegistry.register(RutaBasic.class);
 
   /**
    * @generated
    * @ordered
    */
+  @SuppressWarnings("hiding")
   public final static int type = typeIndexID;
 
-  /** @generated */
+  /**
+   * @generated
+   * @return index of the type
+   */
   @Override
   public int getTypeIndexID() {
     return typeIndexID;
   }
 
+  /*
+   * ******************* Feature Offsets *
+   *******************/
+
+  public final static String _FeatName_replacement = "replacement";
+
+  /* Feature Adjusted Offsets */
+  private final static CallSite _FC_replacement = TypeSystemImpl.createCallSite(RutaBasic.class,
+          "replacement");
+
+  private final static MethodHandle _FH_replacement = _FC_replacement.dynamicInvoker();
+
   /**
    * Never called. Disable default constructor
    * 
    * @generated
    */
-  protected RutaBasic() {/* intentionally empty block */
-  }
+  protected RutaBasic() {
+    /* intentionally empty block */}
 
   /**
    * Internal - constructor used by generator
    * 
    * @generated
+   * @param casImpl
+   *          the CAS this Feature Structure belongs to
+   * @param type
+   *          the type of this Feature Structure
    */
-  public RutaBasic(int addr, TOP_Type type) {
-    super(addr, type);
+  public RutaBasic(TypeImpl type, CASImpl casImpl) {
+    super(type, casImpl);
     readObject();
   }
 
-  /** @generated */
+  /**
+   * @generated
+   * @param jcas
+   *          JCas to which this Feature Structure belongs
+   */
   public RutaBasic(JCas jcas) {
     super(jcas);
     readObject();
   }
 
-  /** @generated */
+  /**
+   * @generated
+   * @param jcas
+   *          JCas to which this Feature Structure belongs
+   * @param begin
+   *          offset to the begin spot in the SofA
+   * @param end
+   *          offset to the end spot in the SofA
+   */
   public RutaBasic(JCas jcas, int begin, int end) {
     super(jcas);
     setBegin(begin);
@@ -396,36 +437,34 @@
 
   /**
    * <!-- begin-user-doc --> Write your own initialization here <!-- end-user-doc -->
-   * 
+   *
    * @generated modifiable
    */
   private void readObject() {
-  }
+    /* default - does nothing empty block */}
 
   // *--------------*
-  // * Feature: Replacement
+  // * Feature: replacement
 
   /**
-   * getter for Replacement - gets
+   * getter for replacement - gets
    * 
    * @generated
+   * @return value of the feature
    */
   public String getReplacement() {
-    if (RutaBasic_Type.featOkTst && ((RutaBasic_Type) jcasType).casFeat_replacement == null)
-      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    return jcasType.ll_cas.ll_getStringValue(addr,
-            ((RutaBasic_Type) jcasType).casFeatCode_replacement);
+    return _getStringValueNc(wrapGetIntCatchException(_FH_replacement));
   }
 
   /**
-   * setter for Replacement - sets
+   * setter for replacement - sets
    * 
    * @generated
+   * @param v
+   *          value to set into the feature
    */
   public void setReplacement(String v) {
-    if (RutaBasic_Type.featOkTst && ((RutaBasic_Type) jcasType).casFeat_replacement == null)
-      jcasType.jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    jcasType.ll_cas.ll_setStringValue(addr, ((RutaBasic_Type) jcasType).casFeatCode_replacement, v);
+    _setStringValueNfc(wrapGetIntCatchException(_FH_replacement), v);
   }
 
 }
diff --git a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java b/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java
deleted file mode 100644
index 0b6f364..0000000
--- a/ruta-basic-type/src/main/java/org/apache/uima/ruta/type/RutaBasic_Type.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.uima.ruta.type;
-
-import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
-import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
-import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.jcas.JCasRegistry;
-import org.apache.uima.jcas.tcas.Annotation_Type;
-
-/**
- * Updated by JCasGen Thu Jul 12 10:42:33 CEST 2012
- * 
- * @generated
- */
-public class RutaBasic_Type extends Annotation_Type {
-  /** @generated */
-  @SuppressWarnings({ "unchecked", "rawtypes" })
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
-  }
-
-  /** @generated */
-  @SuppressWarnings("rawtypes")
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (RutaBasic_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = RutaBasic_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new RutaBasic(addr, RutaBasic_Type.this);
-          RutaBasic_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new RutaBasic(addr, RutaBasic_Type.this);
-    }
-  };
-
-  /** @generated */
-  public final static int typeIndexID = RutaBasic.typeIndexID;
-
-  /**
-   * @generated
-   * @modifiable
-   */
-  public final static boolean featOkTst = JCasRegistry
-          .getFeatOkTst("org.apache.uima.ruta.type.RutaBasic");
-
-  /** @generated */
-  final Feature casFeat_replacement;
-
-  /** @generated */
-  final int casFeatCode_replacement;
-
-  /** @generated */
-  public String getReplacement(int addr) {
-    if (featOkTst && casFeat_replacement == null)
-      jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    return ll_cas.ll_getStringValue(addr, casFeatCode_replacement);
-  }
-
-  /** @generated */
-  public void setReplacement(int addr, String v) {
-    if (featOkTst && casFeat_replacement == null)
-      jcas.throwFeatMissing("replacement", "org.apache.uima.ruta.type.RutaBasic");
-    ll_cas.ll_setStringValue(addr, casFeatCode_replacement, v);
-  }
-
-  /**
-   * initialize variables to correspond with Cas Type and Features
-   * 
-   * @generated
-   */
-  public RutaBasic_Type(JCas jcas, Type casType) {
-    super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
-
-    casFeat_replacement = jcas.getRequiredFeatureDE(casType, "replacement", "uima.cas.String",
-            featOkTst);
-    casFeatCode_replacement = (null == casFeat_replacement) ? JCas.INVALID_FEATURE_CODE
-            : ((FeatureImpl) casFeat_replacement).getCode();
-
-  }
-}
diff --git a/ruta-core-ext/pom.xml b/ruta-core-ext/pom.xml
index 6d87740..f05dbe0 100644
--- a/ruta-core-ext/pom.xml
+++ b/ruta-core-ext/pom.xml
@@ -17,9 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
   <artifactId>ruta-core-ext</artifactId>
 
@@ -30,7 +28,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
 
@@ -40,9 +38,9 @@
   </properties>
 
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
diff --git a/ruta-core/pom.xml b/ruta-core/pom.xml
index 3005c7d..c1af68a 100644
--- a/ruta-core/pom.xml
+++ b/ruta-core/pom.xml
@@ -17,15 +17,14 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-core</artifactId>

+

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

 

@@ -39,9 +38,9 @@
   <name>Apache UIMA Ruta: ${project.artifactId}</name>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

@@ -62,7 +61,6 @@
     <dependency>

       <groupId>org.antlr</groupId>

       <artifactId>antlr-runtime</artifactId>

-      <version>3.5.2</version>

       <exclusions>

         <exclusion>

           <groupId>org.antlr</groupId>

@@ -74,19 +72,16 @@
     <dependency>

       <groupId>org.htmlparser</groupId>

       <artifactId>htmlparser</artifactId>

-      <version>1.6</version>

     </dependency>

 

     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-text</artifactId>

-      <version>1.6</version>

     </dependency>

 

     <dependency>

       <groupId>commons-collections</groupId>

       <artifactId>commons-collections</artifactId>

-      <version>3.2.1</version>

     </dependency>

 

     <dependency>

@@ -105,19 +100,16 @@
     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-lang3</artifactId>

-      <version>3.8.1</version>

     </dependency>

     

     <dependency>

       <groupId>com.github.ben-manes.caffeine</groupId>

       <artifactId>caffeine</artifactId>

-      <version>2.8.3</version>

     </dependency>

 

     <dependency>

       <groupId>org.apache.uima</groupId>

       <artifactId>uimafit-core</artifactId>

-      <version>${uimafit-version}</version>

       <!-- Exclude aop stuff, which is not need by uimafit and only introduces a non-asl license -->

       <exclusions>

         <exclusion>

@@ -135,14 +127,12 @@
     <dependency>

       <groupId>commons-io</groupId>

       <artifactId>commons-io</artifactId>

-      <version>2.4</version>

     </dependency>

 

     <!-- needed for ruta-ep-textruler/ruta-ep-addons - TODO this should be moved to engine? -->

     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-math3</artifactId>

-      <version>3.0</version>

     </dependency>

 

     <dependency>

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java b/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
index a6e630e..8dc7110 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/FilterManager.java
@@ -194,8 +194,11 @@
 

   public FSIterator<AnnotationFS> createFilteredIterator(CAS cas, Type basicType) {

     if (windowAnnotation != null) {

-      FSIterator<AnnotationFS> windowIt = cas.getAnnotationIndex(basicType)

-              .subiterator(windowAnnotation);

+      // TODO: UIMA-6281 replace select

+      FSIterator<AnnotationFS> windowIt = cas.getAnnotationIndex(basicType).select()

+              .coveredBy(windowAnnotation).fsIterator();

+//     was: FSIterator<AnnotationFS> windowIt = cas.getAnnotationIndex(basicType)

+//              .subiterator(windowAnnotation);

       FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(windowIt,

               createCurrentConstraint(false));

       return iterator;

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java b/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
index acc279d..6808395 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/RutaEnvironment.java
@@ -650,7 +650,6 @@
    */

   public void importPackage(String packageName, String alias) {

     List<String> aliases = packageImports.get(packageName);

-

     if (aliases == null) {

       aliases = new ArrayList<>(1);

       packageImports.put(packageName, aliases);

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
index a8f2036..3778925 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
@@ -53,7 +53,6 @@
 import org.apache.uima.cas.StringArrayFS;

 import org.apache.uima.cas.Type;

 import org.apache.uima.cas.TypeSystem;

-import org.apache.uima.cas.impl.FSIteratorImplBase;

 import org.apache.uima.cas.impl.TypeImpl;

 import org.apache.uima.cas.text.AnnotationFS;

 import org.apache.uima.cas.text.AnnotationIndex;

@@ -62,7 +61,6 @@
 import org.apache.uima.jcas.JCas;

 import org.apache.uima.jcas.tcas.Annotation;

 import org.apache.uima.ruta.block.RutaBlock;

-import org.apache.uima.ruta.engine.RutaEngine;

 import org.apache.uima.ruta.expression.AnnotationTypeExpression;

 import org.apache.uima.ruta.expression.IRutaExpression;

 import org.apache.uima.ruta.expression.annotation.IAnnotationExpression;

@@ -92,7 +90,7 @@
 import org.apache.uima.ruta.utils.UIMAUtils;

 import org.apache.uima.ruta.visitor.InferenceCrowd;

 

-public class RutaStream extends FSIteratorImplBase<AnnotationFS> {

+public class RutaStream {

 

   private final CAS cas;

 

@@ -205,9 +203,12 @@
   private void updateIterators(CAS cas, Type basicType, FilterManager filter,

           AnnotationFS additionalWindow) {

     if (additionalWindow != null) {

-      basicIt = cas.getAnnotationIndex(basicType).subiterator(additionalWindow);

+      // TODO UIMA-6281 replace select

+      this.basicIt = cas.getAnnotationIndex(basicType).select().coveredBy(additionalWindow)

+              .fsIterator();

+      // was: this.basicIt = cas.getAnnotationIndex(basicType).subiterator(additionalWindow);

     } else {

-      basicIt = cas.getAnnotationIndex(basicType).iterator();

+      this.basicIt = cas.getAnnotationIndex(basicType).iterator();

     }

     currentIt = filter.createFilteredIterator(cas, basicType);

   }

@@ -669,8 +670,7 @@
     return stream;

   }

 

-  @Override

-  public FSIterator<AnnotationFS> copy() {

+  public RutaStream copy() {

     RutaStream stream = new RutaStream(cas, basicType, beginAnchors, endAnchors, filter,

             lowMemoryProfile, simpleGreedyForComposed, emptyIsInvisible, typeUsage, crowd);

     stream.setDynamicAnchoring(dynamicAnchoring);

@@ -681,17 +681,14 @@
     return stream;

   }

 

-  @Override

   public AnnotationFS get() throws NoSuchElementException {

     return currentIt.get();

   }

 

-  @Override

   public boolean isValid() {

     return currentIt.isValid();

   }

 

-  @Override

   public void moveTo(FeatureStructure fs) {

     try {

       currentIt.moveTo(fs);

@@ -700,22 +697,26 @@
     }

   }

 

-  @Override

+  public boolean hasNext() {

+    return currentIt.hasNext();

+  }

+

+  public AnnotationFS next() {

+    return currentIt.next();

+  }

+

   public void moveToFirst() {

     currentIt.moveToFirst();

   }

 

-  @Override

   public void moveToLast() {

     currentIt.moveToLast();

   }

 

-  @Override

   public void moveToNext() {

     currentIt.moveToNext();

   }

 

-  @Override

   public void moveToPrevious() {

     currentIt.moveToPrevious();

   }

@@ -783,16 +784,7 @@
 

   public List<AnnotationFS> getAnnotationsInWindow(AnnotationFS windowAnnotation, Type type) {

 

-    if (windowAnnotation == null || type == null) {

-      return Collections.emptyList();

-    }

-    TypeSystem typeSystem = getCas().getTypeSystem();

-    List<AnnotationFS> result = new ArrayList<>();

-    if (typeSystem.subsumes(type, windowAnnotation.getType())) {

-      result.add(windowAnnotation);

-    }

-    result.addAll(CasUtil.selectCovered(cas, type, windowAnnotation));

-    return result;

+    return getAnnotationsInWindow(type, windowAnnotation, false);

   }

 

   public Collection<RutaBasic> getAllBasicsInWindow(AnnotationFS windowAnnotation) {

@@ -864,8 +856,12 @@
       return result;

     }

     FSMatchConstraint defaultConstraint = filter.getDefaultConstraint();

+    // TODO UIMA-6281 replace select

     FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(

-            cas.getAnnotationIndex(basicType).subiterator(windowAnnotation), defaultConstraint);

+            cas.getAnnotationIndex(basicType).select().coveredBy(windowAnnotation).fsIterator(),

+            defaultConstraint);

+//    FSIterator<AnnotationFS> iterator = cas.createFilteredIterator(

+//            cas.getAnnotationIndex(basicType).subiterator(windowAnnotation), defaultConstraint);

 

     while (iterator.isValid()) {

       result.add((RutaBasic) iterator.get());

@@ -902,6 +898,10 @@
     return basicIt;

   }

 

+  public FSIterator<AnnotationFS> getCurrentIterator() {

+    return currentIt;

+  }

+

   public AnnotationFS getDocumentAnnotation() {

     return documentAnnotation;

   }

@@ -1064,6 +1064,9 @@
     Set<Type> currentHiddenTypes = filter.getCurrentHiddenTypes();

     RutaBasic beginAnchor = getBeginAnchor(begin);

     if (beginAnchor != null) {

+      if (beginAnchor.isEmpty() && emptyIsInvisible) {

+        return false;

+      }

       for (Type type : currentHiddenTypes) {

         boolean partOf = beginAnchor.isPartOf(type);

         if (partOf) {

@@ -1073,6 +1076,9 @@
     }

     RutaBasic endAnchor = getEndAnchor(end);

     if (endAnchor != null) {

+      if (endAnchor.isEmpty() && emptyIsInvisible) {

+        return false;

+      }

       for (Type type : currentHiddenTypes) {

         boolean partOf = endAnchor.isPartOf(type);

         if (partOf) {

@@ -1092,7 +1098,6 @@
         }

       }

     }

-

     return true;

   }

 

@@ -1122,15 +1127,8 @@
     if (windowAnnotation != null

             && (windowAnnotation.getBegin() != cas.getDocumentAnnotation().getBegin()

                     || windowAnnotation.getEnd() != cas.getDocumentAnnotation().getEnd())) {

-      AnnotationFS frame = cas.createAnnotation(cas.getTypeSystem().getType(RutaEngine.FRAME_TYPE),

-              windowAnnotation.getBegin(), windowAnnotation.getEnd());

-      FSIterator<AnnotationFS> subiterator = cas.getAnnotationIndex(type).subiterator(frame);

-      while (subiterator.hasNext()) {

-        AnnotationFS each = subiterator.next();

-        if (isVisible(each)) {

-          result.add(each);

-        }

-      }

+

+      return getAnnotationsInWindow(type, windowAnnotation, true);

     } else {

       AnnotationIndex<AnnotationFS> annotationIndex = cas.getAnnotationIndex(type);

       for (AnnotationFS each : annotationIndex) {

@@ -1142,6 +1140,30 @@
     return result;

   }

 

+  public List<AnnotationFS> getAnnotationsInWindow(Type type, AnnotationFS windowAnnotation,

+          boolean sensitiveToVisibility) {

+

+    if (type == null || windowAnnotation == null) {

+      return Collections.emptyList();

+    }

+

+    List<AnnotationFS> result = new LinkedList<>();

+

+    if (cas.getTypeSystem().subsumes(type, windowAnnotation.getType())) {

+      if (!sensitiveToVisibility || isVisible(windowAnnotation)) {

+        result.add(windowAnnotation);

+      }

+    }

+

+    List<AnnotationFS> selectCovered = CasUtil.selectCovered(cas, type, windowAnnotation);

+    for (AnnotationFS each : selectCovered) {

+      if (!sensitiveToVisibility || isVisible(each)) {

+        result.add(each);

+      }

+    }

+    return result;

+  }

+

   public String getVisibleCoveredText(AnnotationFS annotationFS) {

     StringBuilder result = new StringBuilder();

     List<RutaBasic> basicsInWindow = getBasicsInWindow(annotationFS);

@@ -1199,12 +1221,12 @@
       if (value instanceof IStringListExpression) {

         IStringListExpression stringListExpr = (IStringListExpression) value;

         List<String> stringList = stringListExpr.getStringList(context, this);

-        StringArrayFS stringArray = FSCollectionFactory.createStringArray(cas, stringList);

+        StringArrayFS stringArray = FSCollectionFactory.createStringArrayFS(cas, stringList);

         annotation.setFeatureValue(feature, stringArray);

       } else if (value instanceof IStringExpression) {

         IStringExpression stringExpr = (IStringExpression) value;

         String string = stringExpr.getStringValue(context, this);

-        StringArrayFS array = FSCollectionFactory.createStringArray(cas, new String[] { string });

+        StringArrayFS array = FSCollectionFactory.createStringArrayFS(cas, new String[] { string });

         annotation.setFeatureValue(feature, array);

       }

     } else if (rangeName.equals(CAS.TYPE_NAME_INTEGER) || rangeName.equals(CAS.TYPE_NAME_LONG)

@@ -1226,12 +1248,13 @@
       if (value instanceof INumberExpression) {

         INumberExpression numberExpr = (INumberExpression) value;

         int v = numberExpr.getIntegerValue(context, this);

-        IntArrayFS array = FSCollectionFactory.createIntArray(cas, new int[] { v });

+        IntArrayFS array = FSCollectionFactory.createIntArrayFS(cas, new int[] { v });

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof INumberListExpression) {

         INumberListExpression expr = (INumberListExpression) value;

         List<Number> list = expr.getNumberList(context, this);

-        IntArrayFS array = FSCollectionFactory.createIntArray(cas, RutaListUtils.toIntArray(list));

+        IntArrayFS array = FSCollectionFactory.createIntArrayFS(cas,

+                RutaListUtils.toIntArray(list));

         annotation.setFeatureValue(feature, array);

       }

     } else if (rangeName.equals(CAS.TYPE_NAME_DOUBLE)) {

@@ -1244,12 +1267,12 @@
       if (value instanceof INumberExpression) {

         INumberExpression numberExpr = (INumberExpression) value;

         double v = numberExpr.getDoubleValue(context, this);

-        DoubleArrayFS array = FSCollectionFactory.createDoubleArray(cas, new double[] { v });

+        DoubleArrayFS array = FSCollectionFactory.createDoubleArrayFS(cas, new double[] { v });

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof INumberListExpression) {

         INumberListExpression expr = (INumberListExpression) value;

         List<Number> list = expr.getNumberList(context, this);

-        DoubleArrayFS array = FSCollectionFactory.createDoubleArray(cas,

+        DoubleArrayFS array = FSCollectionFactory.createDoubleArrayFS(cas,

                 RutaListUtils.toDoubleArray(list));

         annotation.setFeatureValue(feature, array);

       }

@@ -1263,12 +1286,12 @@
       if (value instanceof INumberExpression) {

         INumberExpression numberExpr = (INumberExpression) value;

         float v = numberExpr.getFloatValue(context, this);

-        FloatArrayFS array = FSCollectionFactory.createFloatArray(cas, new float[] { v });

+        FloatArrayFS array = FSCollectionFactory.createFloatArrayFS(cas, new float[] { v });

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof INumberListExpression) {

         INumberListExpression expr = (INumberListExpression) value;

         List<Number> list = expr.getNumberList(context, this);

-        FloatArrayFS array = FSCollectionFactory.createFloatArray(cas,

+        FloatArrayFS array = FSCollectionFactory.createFloatArrayFS(cas,

                 RutaListUtils.toFloatArray(list));

         annotation.setFeatureValue(feature, array);

       }

@@ -1282,12 +1305,12 @@
       if (value instanceof IBooleanListExpression) {

         IBooleanListExpression expr = (IBooleanListExpression) value;

         List<Boolean> list = expr.getBooleanList(context, this);

-        BooleanArrayFS array = FSCollectionFactory.createBooleanArray(cas, list);

+        BooleanArrayFS array = FSCollectionFactory.createBooleanArrayFS(cas, list);

         annotation.setFeatureValue(feature, array);

       } else if (value instanceof IBooleanExpression) {

         IBooleanExpression expr = (IBooleanExpression) value;

         Boolean v = expr.getBooleanValue(context, this);

-        BooleanArrayFS array = FSCollectionFactory.createBooleanArray(cas, new boolean[] { v });

+        BooleanArrayFS array = FSCollectionFactory.createBooleanArrayFS(cas, new boolean[] { v });

         annotation.setFeatureValue(feature, array);

       }

     } else if (value instanceof AnnotationTypeExpression && !range.isPrimitive()) {

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java b/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
index 4330eed..e788e7a 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/condition/NearCondition.java
@@ -67,7 +67,7 @@
     int minValue = min.getIntegerValue(context, stream);

     boolean forwardValue = forward.getBooleanValue(context, stream);

 

-    FSIterator<AnnotationFS> it = filtered.getBooleanValue(context, stream) ? stream

+    FSIterator<AnnotationFS> it = filtered.getBooleanValue(context, stream) ? stream.getCurrentIterator()

             : stream.getUnfilteredBasicIterator();

     AnnotationFS pointer = null;

     if (forwardValue) {

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/engine/Ruta.java b/ruta-core/src/main/java/org/apache/uima/ruta/engine/Ruta.java
index f934c95..cefd577 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/engine/Ruta.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/engine/Ruta.java
@@ -42,7 +42,7 @@
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

 import org.apache.uima.analysis_engine.metadata.AnalysisEngineMetaData;

 import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.impl.FeatureStructureImpl;

+import org.apache.uima.cas.FeatureStructure;

 import org.apache.uima.fit.factory.AnalysisEngineFactory;

 import org.apache.uima.fit.util.JCasUtil;

 import org.apache.uima.jcas.JCas;

@@ -58,6 +58,7 @@
 import org.apache.uima.ruta.type.DebugMatchedRuleMatch;

 import org.apache.uima.ruta.type.DebugRuleApply;

 import org.apache.uima.ruta.type.DebugRuleMatch;

+import org.apache.uima.ruta.type.DebugScriptApply;

 import org.apache.uima.util.CasCreationUtils;

 import org.apache.uima.util.FileUtils;

 import org.apache.uima.util.InvalidXMLException;

@@ -145,7 +146,7 @@
     int result = 0;

     if (annotation instanceof DebugBlockApply) {

       DebugBlockApply dba = (DebugBlockApply) annotation;

-      FSArray innerApply = dba.getInnerApply();

+      FSArray<DebugScriptApply> innerApply = dba.getInnerApply();

       for (int i = 0; i < innerApply.size(); i++) {

         Annotation each = (Annotation) innerApply.get(i);

         result += countRuleApplies(each);

@@ -160,14 +161,14 @@
   private static void collectRuleMatches(Annotation annotation, List<Annotation> result) {

     if (annotation instanceof DebugBlockApply) {

       DebugBlockApply dba = (DebugBlockApply) annotation;

-      FSArray innerApply = dba.getInnerApply();

+      FSArray<DebugScriptApply> innerApply = dba.getInnerApply();

       for (int i = 0; i < innerApply.size(); i++) {

         Annotation each = (Annotation) innerApply.get(i);

         collectRuleMatches(each, result);

       }

     } else if (annotation instanceof DebugRuleApply) {

       DebugRuleApply dra = (DebugRuleApply) annotation;

-      FSArray rules = dra.getRules();

+      FSArray<DebugRuleMatch> rules = dra.getRules();

       for (int i = 0; i < rules.size(); i++) {

         Annotation each = (Annotation) rules.get(i);

         collectRuleMatches(each, result);

@@ -214,11 +215,11 @@
     return sb.toString();

   }

 

-  public static String inject(String script, FeatureStructureImpl... annotations) {

+  public static String inject(String script, FeatureStructure... annotations) {

     return inject(script, "$", getAddresses(annotations));

   }

 

-  private static int[] getAddresses(FeatureStructureImpl[] annotations) {

+  private static int[] getAddresses(FeatureStructure[] annotations) {

     int[] result = new int[annotations.length];

     for (int i = 0; i < annotations.length; i++) {

       result[i] = annotations[i].getAddress();

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
index 97cafd4..a4cc901 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaEngine.java
@@ -344,6 +344,15 @@
   private Boolean debugWithMatches;

 

   /**

+   * This parameter specifies whether all debug annotation should be added to the indexes. By

+   * default this parameter is deactivated and only the root script apply is added.

+   */

+  public static final String PARAM_DEBUG_ADD_TO_INDEXES = "debugAddToIndexes";

+

+  @ConfigurationParameter(name = PARAM_DEBUG_ADD_TO_INDEXES, mandatory = false, defaultValue = "false")

+  private Boolean debugAddToIndexes;

+

+  /**

    * This parameter specifies a list of rule-ids that enumerate the rule for which debug information

    * should be created. No specific ids are given by default.

    */

@@ -853,7 +862,7 @@
   private InferenceCrowd initializeCrowd() {

     List<RutaInferenceVisitor> visitors = new ArrayList<RutaInferenceVisitor>();

     if (debug) {

-      visitors.add(new DebugInfoCollectorVisitor(debug, debugWithMatches,

+      visitors.add(new DebugInfoCollectorVisitor(debug, debugWithMatches, debugAddToIndexes,

               Arrays.asList(debugOnlyFor), verbalizer));

     }

     if (profile) {

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
index 87d7c61..5769578 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/engine/RutaTestUtils.java
@@ -35,7 +35,6 @@
 import java.util.Map.Entry;

 import java.util.Set;

 

-import org.apache.commons.io.IOUtils;

 import org.apache.uima.UIMAFramework;

 import org.apache.uima.analysis_engine.AnalysisEngine;

 import org.apache.uima.analysis_engine.AnalysisEngineDescription;

@@ -360,14 +359,10 @@
   public static void storeCas(CAS cas, String name) {

     File file = new File("input/" + name + ".xmi");

     file.getParentFile().mkdirs();

-    OutputStream fos = null;

-    try {

-      fos = new FileOutputStream(file);

+    try (OutputStream fos = new FileOutputStream(file)) {

       CasIOUtils.save(cas, fos, SerialFormat.XMI);

     } catch (IOException e) {

       throw new IllegalArgumentException(e);

-    } finally {

-      IOUtils.closeQuietly(fos);

     }

   }

 

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureMatchExpression.java b/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureMatchExpression.java
index afc64c5..94a66e7 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureMatchExpression.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/FeatureMatchExpression.java
@@ -159,7 +159,7 @@
       } else if (!feature.getRange().isPrimitive()

               && typeSystem.subsumes(typeSystem.getType(CAS.TYPE_NAME_FS_ARRAY), featureRangeType)

               && getArg() instanceof IAnnotationListExpression) {

-        ArrayFS fsArray = (ArrayFS) featureValue;

+        ArrayFS<?> fsArray = (ArrayFS<?>) featureValue;

         IAnnotationListExpression ale = (IAnnotationListExpression) getArg();

         List<AnnotationFS> annotationList = ale.getAnnotationList(context, stream);

         return compare(Arrays.asList(fsArray.toArray()), annotationList);

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java b/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
index 94119ac..f14e7e6 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/expression/feature/SimpleFeatureExpression.java
@@ -282,7 +282,7 @@
       this.collectFeatureStructures(next, tail, checkOnFeatureValue, collectOnlyAnnotations,

               lastValidFeatureStructure, result, stream, context);

     } else if (value instanceof FSArray && index >= 0) {

-      FSArray array = (FSArray) value;

+      FSArray<?> array = (FSArray<?>) value;

       if (index < array.size()) {

         FeatureStructure fs = array.get(index);

         if (fs instanceof AnnotationFS) {

@@ -292,7 +292,7 @@
         }

       }

     } else if (value instanceof FSArray) {

-      FSArray array = (FSArray) value;

+      FSArray<?> array = (FSArray<?>) value;

       for (int i = 0; i < array.size(); i++) {

         FeatureStructure fs = array.get(i);

         this.collectFeatureStructures(fs, tail, checkOnFeatureValue, collectOnlyAnnotations,

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java b/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
index 74047d7..4b6d9ff 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/resource/MultiTreeWordList.java
@@ -36,9 +36,7 @@
 import java.util.Map.Entry;

 import java.util.Set;

 

-import org.apache.commons.io.IOUtils;

 import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.FSIterator;

 import org.apache.uima.cas.Feature;

 import org.apache.uima.cas.Type;

 import org.apache.uima.cas.TypeSystem;

@@ -227,9 +225,7 @@
    *           When there is a problem reading the resource.

    */

   private void load(Resource resource, String name) throws IOException {

-    InputStream stream = null;

-    try {

-      stream = resource.getInputStream();

+    try (InputStream stream = resource.getInputStream()) {

       if (name == null) {

         throw new IllegalArgumentException("List does not have a name.");

       } else if (name.endsWith(".txt")) {

@@ -240,8 +236,6 @@
         throw new IllegalArgumentException(

                 "File name should end with .mtwl or .txt, found " + name);

       }

-    } finally {

-      IOUtils.closeQuietly(stream);

     }

   }

 

@@ -823,7 +817,7 @@
 

     Collection<AnnotationFS> results = new HashSet<AnnotationFS>();

     stream.moveToFirst();

-    FSIterator<AnnotationFS> streamPointer = stream.copy();

+    RutaStream streamPointer = stream.copy();

 

     while (stream.isValid()) {

       RutaBasic anchorBasic = (RutaBasic) stream.get();

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java b/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
index 7c9d6e7..297daec 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/resource/TreeWordList.java
@@ -37,7 +37,6 @@
 import java.util.zip.ZipOutputStream;

 

 import org.apache.commons.text.StringEscapeUtils;

-import org.apache.uima.cas.FSIterator;

 import org.apache.uima.cas.text.AnnotationFS;

 import org.apache.uima.internal.util.XMLUtils;

 import org.apache.uima.jcas.tcas.Annotation;

@@ -329,7 +328,7 @@
           char[] ignoreChars, int maxIgnoredChars, boolean ignoreWS) {

     ArrayList<AnnotationFS> results = new ArrayList<AnnotationFS>();

     stream.moveToFirst();

-    FSIterator<AnnotationFS> streamPointer = stream.copy();

+    RutaStream streamPointer = stream.copy();

     while (stream.isValid()) {

       RutaBasic anchorBasic = (RutaBasic) stream.get();

       streamPointer.moveTo(anchorBasic);

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java
index 8c3ab92..c053d20 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/AnnotationListFSIterator.java
@@ -18,13 +18,17 @@
  */
 package org.apache.uima.ruta.rule;
 
+import java.util.Comparator;
 import java.util.List;
 import java.util.NoSuchElementException;
 
+import org.apache.commons.lang3.NotImplementedException;
 import org.apache.uima.cas.FSIterator;
 import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.impl.FSIteratorImplBase;
+import org.apache.uima.cas.impl.LowLevelIndex;
 import org.apache.uima.cas.text.AnnotationFS;
+import org.apache.uima.jcas.cas.TOP;
 
 public class AnnotationListFSIterator extends FSIteratorImplBase<AnnotationFS> {
 
@@ -89,4 +93,94 @@
     return new AnnotationListFSIterator(list);
   }
 
+  @Override
+  public int ll_indexSizeMaybeNotCurrent() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public LowLevelIndex<AnnotationFS> ll_getIndex() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public int ll_maxAnnotSpan() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public boolean isIndexesHaveBeenUpdated() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public boolean maybeReinitIterator() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToFirstNoReinit() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToLastNoReinit() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToNoReinit(FeatureStructure fs) {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public Comparator<TOP> getComparator() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public AnnotationFS getNvc() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToNextNvc() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void moveToPreviousNvc() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public boolean hasPrevious() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public AnnotationFS previous() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public int nextIndex() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public int previousIndex() {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void set(AnnotationFS e) {
+    throw new NotImplementedException("Not supported.");
+  }
+
+  @Override
+  public void add(AnnotationFS e) {
+    throw new NotImplementedException("Not supported.");
+  }
+
 }
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java
index 0fa25e1..e1ac291 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/RutaAnnotationTypeMatcher.java
@@ -26,7 +26,6 @@
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
-import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.StringUtils;
 import org.apache.uima.cas.CAS;
@@ -61,11 +60,11 @@
       // avoid null lists here
       return result != null ? result : emptyList();
     }
-    
+
     if (expression.getAnnotationExpression() != null) {
       return asList(expression.getAnnotation(context, stream));
     }
-    
+
     // TODO defer to getter of expression?
     List<Type> types;
     if (expression.getTypeListExpression() != null) {
@@ -73,7 +72,7 @@
     } else {
       types = asList(getType(context.getParent(), stream));
     }
-    
+
     Collection<AnnotationFS> result = new ArrayList<>();
     for (Type type : types) {
       if (type == null) {
@@ -83,14 +82,13 @@
       Type overallDAType = stream.getCas().getDocumentAnnotation().getType();
       String name = type.getName();
       if (CAS.TYPE_NAME_DOCUMENT_ANNOTATION.equals(name)
-              || "org.apache.uima.ruta.type.Document".equals(name)
-              || overallDAType.equals(type)) {
+              || "org.apache.uima.ruta.type.Document".equals(name) || overallDAType.equals(type)) {
         // TODO what about dynamic windowing?
         result.add(stream.getDocumentAnnotation());
       } else {
         result.addAll(stream.getAnnotations(type));
       }
-      
+
       // TODO: Throwing away the result so far in this for loop seems odd
       if (expression.getFeatureExpression() != null) {
         @SuppressWarnings("unchecked")
@@ -99,7 +97,7 @@
         result = r;
       }
     }
-    
+
     return result;
   }
 
@@ -107,99 +105,70 @@
   public Collection<? extends AnnotationFS> getAnnotationsAfter(RutaRuleElement ruleElement,
           AnnotationFS annotation, RutaBlock parent, RutaStream stream) {
     if (annotation.getEnd() == stream.getDocumentAnnotation().getEnd()) {
-      return emptyList();
+      return Collections.emptyList();
     }
-    
-    RutaBasic lastBasic = stream.getEndAnchor(annotation.getEnd());
-    int end = 0;
-    if (lastBasic == null) {
-      if (annotation.getEnd() != 0) {
-        return emptyList();
-      }
-    } else {
-      end = lastBasic.getEnd();
-    }
-    
-    if (end == stream.getDocumentAnnotation().getBegin()) {
-      // non existing wildcard match
-      stream.moveToFirst();
-    } else if (annotation.getEnd() > 0) {
-      stream.moveTo(lastBasic);
-      if (stream.isVisible(lastBasic) && stream.isValid()
-              && stream.get().getEnd() == lastBasic.getEnd()) {
-        stream.moveToNext();
-      }
-    } else {
-      stream.moveToFirst();
-    }
-
-    if (!stream.isValid()) {
-      return emptyList();
-    }
-    
-    RutaBasic nextBasic = (RutaBasic) stream.get();
-    // TODO HOTFIX for annotation of length 0
-    while (stream.isValid() && nextBasic.getBegin() < end) {
-      stream.moveToNext();
-      if (stream.isValid()) {
-        nextBasic = (RutaBasic) stream.get();
-      }
+    RutaBasic nextBasic = stream.getBasicNextTo(false, annotation);
+    if (nextBasic == null) {
+      return Collections.emptyList();
     }
 
     MatchContext context = new MatchContext(parent);
     // just for forcing expression top initialize
     expression.getType(context, stream);
     if (expression.getAnnotationExpression() != null) {
-      AnnotationFS ref = expression.getAnnotation(context, stream);
-      
-      if (ref == null) {
-        return emptyList();
-      }
 
-      if (nextBasic.getBegin() == ref.getBegin()) {
-        return asList(ref);
-      }
-      
-      return emptyList();
-    }
-    
-    if (expression.getAnnotationListExpression() != null) {
-      RutaBasic referenceElement = nextBasic;
-      return expression.getAnnotationList(context, stream).stream()
-          .filter(each -> referenceElement.getBegin() == each.getBegin())
-          .collect(Collectors.toList());
-    } 
-    
-    List<Type> types;
-    if (expression.getTypeListExpression() != null) {
-      types = expression.getTypeListExpression().getTypeList(context, stream);
-    } else {
-      types = asList(getType(context.getParent(), stream));
-    }
-    
-    List<AnnotationFS> annotations = new ArrayList<>();
-    for (Type type : types) {
-      Collection<AnnotationFS> beginAnchors = nextBasic.getBeginAnchors(type);
-      Collection<AnnotationFS> anchors = new ArrayList<>(beginAnchors.size());
-      
-      if (beginAnchors != null) {
-        for (AnnotationFS afs : beginAnchors) {
-          if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()
-                  && afs.getEnd() <= stream.getDocumentAnnotation().getEnd()) {
-            anchors.add(afs);
-          }
+      AnnotationFS ref = expression.getAnnotation(context, stream);
+      if (ref != null) {
+        boolean beginsWith = nextBasic.getBegin() == ref.getBegin();
+        if (beginsWith) {
+          Collection<AnnotationFS> result = new ArrayList<>(1);
+          result.add(ref);
+          return result;
         }
       }
-      
-      if (expression.getFeatureExpression() != null) {
-        annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
-                CHECK_ON_FEATURE, context, stream));
-      } else {
-        annotations.addAll(anchors);
+    } else if (expression.getAnnotationListExpression() != null) {
+      List<AnnotationFS> annotations = expression.getAnnotationList(context, stream);
+      Collection<AnnotationFS> result = new ArrayList<>();
+      for (AnnotationFS each : annotations) {
+        boolean beginsWith = nextBasic.getBegin() == each.getBegin();
+        if (beginsWith) {
+          result.add(each);
+        }
       }
+      return result;
+    } else {
+      List<Type> types = null;
+      if (expression.getTypeListExpression() != null) {
+        types = expression.getTypeListExpression().getTypeList(context, stream);
+      } else {
+        Type type = getType(context.getParent(), stream);
+        types = new ArrayList<>(1);
+        types.add(type);
+      }
+      List<AnnotationFS> annotations = new ArrayList<>();
+      for (Type type : types) {
+        Collection<AnnotationFS> anchors = new ArrayList<>();
+        Collection<AnnotationFS> beginAnchors = nextBasic.getBeginAnchors(type);
+        if (beginAnchors != null) {
+          for (AnnotationFS afs : beginAnchors) {
+            if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()
+                    && afs.getEnd() <= stream.getDocumentAnnotation().getEnd()) {
+              anchors.add(afs);
+            }
+          }
+        }
+        if (expression.getFeatureExpression() != null) {
+          annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
+                  CHECK_ON_FEATURE, context, stream));
+        } else {
+          annotations.addAll(anchors);
+        }
+
+      }
+      return annotations;
     }
-    
-    return annotations;
+
+    return Collections.emptyList();
   }
 
   @Override
@@ -208,82 +177,63 @@
     if (annotation.getBegin() == stream.getDocumentAnnotation().getBegin()) {
       return Collections.emptyList();
     }
-    
-    RutaBasic firstBasic = stream.getBeginAnchor(annotation.getBegin());
-    if (firstBasic == null) {
+    RutaBasic nextBasic = stream.getBasicNextTo(true, annotation);
+    if (nextBasic == null) {
       return Collections.emptyList();
     }
-    
-    stream.moveTo(firstBasic);
-    if (stream.isVisible(firstBasic)) {
-      stream.moveToPrevious();
-    }
-    if (firstBasic.getBegin() == stream.getDocumentAnnotation().getEnd()) {
-      // non existing wildcard match
-      stream.moveToLast();
-    }
-
-    if (!stream.isValid()) {
-      return emptyList();
-    }
-
-    RutaBasic nextBasic = (RutaBasic) stream.get();
-    // TODO HOTFIX for annotation of length 0
-    while (stream.isValid() && nextBasic.getEnd() > firstBasic.getBegin()) {
-      stream.moveToPrevious();
-      if (stream.isValid()) {
-        nextBasic = (RutaBasic) stream.get();
-      }
-    }
 
     MatchContext context = new MatchContext(parent);
     // just for forcing expression top initialize
     expression.getType(context, stream);
     if (expression.getAnnotationExpression() != null) {
       AnnotationFS ref = expression.getAnnotationExpression().getAnnotation(context, stream);
-      
-      if (nextBasic.getEnd() == ref.getEnd()) {
-        return asList(ref);
+      boolean endsWith = nextBasic.getEnd() == ref.getEnd();
+      if (endsWith) {
+        Collection<AnnotationFS> result = new ArrayList<>(1);
+        result.add(ref);
+        return result;
       }
-      
-      return emptyList();
-    } 
-    
-    if (expression.getAnnotationListExpression() != null) {
-      RutaBasic referenceElement = nextBasic;
-      return expression.getAnnotationListExpression().getAnnotationList(context, stream).stream()
-          .filter(each -> referenceElement.getEnd() == each.getEnd())
-          .collect(Collectors.toList());
-    }
-    
-    List<Type> types;
-    if (expression.getTypeListExpression() != null) {
-      types = expression.getTypeListExpression().getTypeList(context, stream);
-    } else {
-      types = asList(getType(context.getParent(), stream));
-    }
-    
-    List<AnnotationFS> annotations = new ArrayList<>();
-    for (Type type : types) {
-      Collection<AnnotationFS> endAnchors = nextBasic.getEndAnchors(type);
-      Collection<AnnotationFS> anchors = new ArrayList<>(endAnchors.size());
-      if (endAnchors != null) {
-        for (AnnotationFS afs : endAnchors) {
-          if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()) {
-            anchors.add(afs);
-          }
+    } else if (expression.getAnnotationListExpression() != null) {
+      List<AnnotationFS> annotations = expression.getAnnotationListExpression()
+              .getAnnotationList(context, stream);
+      for (AnnotationFS each : annotations) {
+        boolean endsWith = nextBasic.getEnd() == each.getEnd();
+        if (endsWith) {
+          Collection<AnnotationFS> result = new ArrayList<>();
+          result.add(each);
+          return result;
         }
       }
-      
-      if (expression.getFeatureExpression() != null) {
-        annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
-                CHECK_ON_FEATURE, context, stream));
+    } else {
+      List<Type> types = null;
+      if (expression.getTypeListExpression() != null) {
+        types = expression.getTypeListExpression().getTypeList(context, stream);
       } else {
-        annotations.addAll(anchors);
+        Type type = getType(context.getParent(), stream);
+        types = new ArrayList<>(1);
+        types.add(type);
       }
+      List<AnnotationFS> annotations = new ArrayList<>();
+      for (Type type : types) {
+        Collection<AnnotationFS> anchors = new ArrayList<>();
+        Collection<AnnotationFS> endAnchors = nextBasic.getEndAnchors(type);
+        if (endAnchors != null) {
+          for (AnnotationFS afs : endAnchors) {
+            if (afs.getBegin() >= stream.getDocumentAnnotation().getBegin()) {
+              anchors.add(afs);
+            }
+          }
+        }
+        if (expression.getFeatureExpression() != null) {
+          annotations.addAll(expression.getFeatureExpression().getAnnotations(anchors,
+                  CHECK_ON_FEATURE, context, stream));
+        } else {
+          annotations.addAll(anchors);
+        }
+      }
+      return annotations;
     }
-    
-    return annotations;
+    return Collections.emptyList();
   }
 
   @Override
diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java b/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
index c2aa66d..94d07d5 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/rule/WildCardRuleElement.java
@@ -30,11 +30,9 @@
 import org.apache.commons.lang3.tuple.ImmutablePair;

 import org.apache.commons.lang3.tuple.Pair;

 import org.apache.uima.cas.CAS;

-import org.apache.uima.cas.CASException;

 import org.apache.uima.cas.FSIterator;

 import org.apache.uima.cas.Type;

 import org.apache.uima.cas.text.AnnotationFS;

-import org.apache.uima.jcas.JCas;

 import org.apache.uima.ruta.RutaEnvironment;

 import org.apache.uima.ruta.RutaStream;

 import org.apache.uima.ruta.action.AbstractRutaAction;

@@ -44,7 +42,6 @@
 import org.apache.uima.ruta.expression.AnnotationTypeExpression;

 import org.apache.uima.ruta.expression.string.IStringExpression;

 import org.apache.uima.ruta.type.RutaBasic;

-import org.apache.uima.ruta.type.RutaFrame;

 import org.apache.uima.ruta.visitor.InferenceCrowd;

 

 public class WildCardRuleElement extends AbstractRuleElement {

@@ -508,14 +505,20 @@
     } else {

       iterator = getIteratorOfType(after, defaultType, annotation, stream);

     }

-    if (iterator != null && iterator.isValid() && iterator.get().equals(annotation)) {

-      moveOn(after, iterator, stream);

+    if (annotation != null && iterator != null && iterator.isValid()) {

+      AnnotationFS pointer = iterator.get();

+      if ((after && pointer.getEnd() == annotation.getEnd())

+              || (!after && pointer.getBegin() == annotation.getBegin())) {

+        moveOn(after, iterator, stream);

+      }

     }

     return iterator;

   }

 

   private FSIterator<AnnotationFS> getIteratorOfType(boolean after, Type type,

           AnnotationFS annotation, RutaStream stream) {

+    // TODO reimplement with cas select logic

+

     CAS cas = stream.getCas();

     // TODO adapt logic to changes in UIMA iterator behavior!

     FSIterator<AnnotationFS> result = null;

@@ -562,23 +565,17 @@
         }

       }

     } else {

-      JCas jcas = null;

-      try {

-        jcas = cas.getJCas();

-      } catch (CASException e) {

-        e.printStackTrace();

-      }

-      RutaFrame window = new RutaFrame(jcas, stream.getDocumentAnnotation().getBegin(),

-              stream.getDocumentAnnotation().getEnd());

+      // TODO UIMA-6281 replace select and rewrite complete block

+      result = cas.getAnnotationIndex(type).select().coveredBy(stream.getDocumentAnnotation())

+              .fsIterator();

       if (annotation == null) {

-        result = cas.getAnnotationIndex(type).subiterator(window);

       } else {

-        result = cas.getAnnotationIndex(type).subiterator(window);

         AnnotationFS pointer = stream.getAnchor(after, annotation);

         result.moveTo(pointer);

+

         if (!result.isValid()) {

           if (after) {

-            // result.moveToFirst();

+//            result.moveToFirst();

           } else {

             // TODO due to type priorities: RutaBasic is last -> moveTo will not work

             result.moveToLast();

@@ -591,6 +588,7 @@
             }

           }

         } else {

+          // uimaj-core 3.2.0

           if (!after) {

             result.moveToPrevious();

           }

@@ -748,8 +746,7 @@
 

     RuleElementMatch result = new RuleElementMatch(this, containerMatch);

     result.setRuleAnchor(ruleAnchor);

-    List<EvaluatedCondition> evaluatedConditions = new ArrayList<>(

-            conditions.size());

+    List<EvaluatedCondition> evaluatedConditions = new ArrayList<>(conditions.size());

     boolean base = true;

 

     MatchContext context = new MatchContext(annotation, this, ruleMatch, true);

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/utils/UIMAUtils.java b/ruta-core/src/main/java/org/apache/uima/ruta/utils/UIMAUtils.java
index 560a88a..cac0a9a 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/utils/UIMAUtils.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/utils/UIMAUtils.java
@@ -31,8 +31,9 @@
 

 public class UIMAUtils {

 

-  public static FSArray toFSArray(JCas jCas, List<? extends FeatureStructure> fsList) {

-    FSArray fsArray = new FSArray(jCas, fsList.size());

+  public static FSArray<? extends FeatureStructure> toFSArray(JCas jCas,

+          List<? extends FeatureStructure> fsList) {

+    FSArray<FeatureStructure> fsArray = new FSArray<FeatureStructure>(jCas, fsList.size());

     fsArray.copyFromArray(fsList.toArray(new FeatureStructure[fsList.size()]), 0, 0, fsList.size());

     return fsArray;

   }

@@ -55,7 +56,8 @@
     return uimaSArray;

   }

 

-  public static <T extends FeatureStructure> List<T> toList(FSArray fsArray, Class<T> cls) {

+  public static <T extends FeatureStructure> List<T> toList(FSArray<FeatureStructure> fsArray,

+          Class<T> cls) {

     List<T> list = new ArrayList<T>();

     if (fsArray == null) {

       return list;

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoCollectorVisitor.java b/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoCollectorVisitor.java
index 98ee21e..b32a20b 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoCollectorVisitor.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoCollectorVisitor.java
@@ -19,7 +19,6 @@
 

 package org.apache.uima.ruta.visitor;

 

-import java.util.ArrayList;

 import java.util.HashMap;

 import java.util.List;

 import java.util.Map;

@@ -50,17 +49,20 @@
 

   private boolean withMatches;

 

+  private boolean addToIndexes;

+

   private ScriptApply rootApply;

 

   private Map<RutaStatement, Stack<ScriptApply>> applies;

 

   private Stack<RutaElement> callStack;

 

-  public DebugInfoCollectorVisitor(boolean createDebugInfo, boolean withMatches, List<String> ids,

-          RutaVerbalizer verbalizer) {

+  public DebugInfoCollectorVisitor(boolean createDebugInfo, boolean withMatches,

+          boolean addToIndexes, List<String> ids, RutaVerbalizer verbalizer) {

     super();

     this.createDebugInfo = createDebugInfo;

     this.withMatches = withMatches;

+    this.addToIndexes = addToIndexes;

     this.ids = ids;

 

     debugFactory = new DebugInfoFactory(verbalizer);

@@ -68,10 +70,9 @@
     callStack = new Stack<RutaElement>();

   }

 

-  public DebugInfoCollectorVisitor(boolean createDebugInfo) {

-    super();

-    this.createDebugInfo = createDebugInfo;

-    this.ids = new ArrayList<String>();

+  public DebugInfoCollectorVisitor(boolean createDebugInfo, boolean withMatches, List<String> ids,

+          RutaVerbalizer verbalizer) {

+    this(createDebugInfo, withMatches, false, ids, verbalizer);

   }

 

   public boolean isCreateDebugInfo() {

@@ -167,7 +168,7 @@
       Map<RutaElement, Long> timeInfo = getTimeInfo(visitors);

 

       DebugScriptApply debugScriptApply = debugFactory.createDebugScriptApply(rootApply, stream,

-              false, withMatches, timeInfo);

+              addToIndexes, withMatches, timeInfo);

       debugScriptApply.setTimestamp(System.currentTimeMillis());

       debugScriptApply.addToIndexes();

     }

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoFactory.java b/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoFactory.java
index 65bf634..b71cf29 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoFactory.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/visitor/DebugInfoFactory.java
@@ -56,7 +56,6 @@
 import org.apache.uima.ruta.type.DebugRuleElementMatches;

 import org.apache.uima.ruta.type.DebugRuleMatch;

 import org.apache.uima.ruta.type.DebugScriptApply;

-import org.apache.uima.ruta.utils.UIMAUtils;

 import org.apache.uima.ruta.verbalize.RutaVerbalizer;

 

 public class DebugInfoFactory {

@@ -115,18 +114,18 @@
         ruleMatches.add(createDebugRuleMatch(ruleMatch, stream, addToIndex, withMatches, timeInfo));

         dummyBlockApply.setApplied(1);

         dummyBlockApply.setTried(1);

-        dummyBlockApply.setRules(UIMAUtils.toFSArray(cas, ruleMatches));

+        dummyBlockApply.setRules(FSCollectionFactory.createFSArray(cas, ruleMatches));

         List<DebugScriptApply> innerInnerApply = new ArrayList<DebugScriptApply>();

         for (ScriptApply each : list) {

           DebugScriptApply eachInnerInner = createDebugScriptApply(each, stream, addToIndex,

                   withMatches, timeInfo);

           innerInnerApply.add(eachInnerInner);

         }

-        dummyBlockApply.setInnerApply(UIMAUtils.toFSArray(cas, innerInnerApply));

+        dummyBlockApply.setInnerApply(FSCollectionFactory.createFSArray(cas, innerInnerApply));

         innerApply.add(dummyBlockApply);

         counter++;

       }

-      dba.setInnerApply(UIMAUtils.toFSArray(cas, innerApply));

+      dba.setInnerApply(FSCollectionFactory.createFSArray(cas, innerApply));

       dba.setElement(verbalize);

       DebugRuleApply ruleApply = createDebugRuleApply(blockApply.getRuleApply(), stream, addToIndex,

               withMatches, timeInfo);

@@ -147,7 +146,7 @@
       for (ScriptApply each : blockApply.getInnerApplies()) {

         innerApply.add(createDebugScriptApply(each, stream, addToIndex, withMatches, timeInfo));

       }

-      dba.setInnerApply(UIMAUtils.toFSArray(cas, innerApply));

+      dba.setInnerApply(FSCollectionFactory.createFSArray(cas, innerApply));

       dba.setElement(verbalize);

       DebugRuleApply ruleApply = createDebugRuleApply(blockApply.getRuleApply(), stream, addToIndex,

               withMatches, timeInfo);

@@ -187,7 +186,7 @@
     if (begin >= end) {

       begin = end;

     }

-    dra.setRules(UIMAUtils.toFSArray(cas, ruleMatches));

+    dra.setRules(FSCollectionFactory.createFSArray(cas, ruleMatches));

     RutaElement element = ruleApply.getElement();

     String namespace = "";

     if (element instanceof RutaStatement) {

@@ -231,7 +230,7 @@
       for (ScriptApply rem : ((RuleMatch) match).getDelegateApply().values()) {

         delegates.add(createDebugScriptApply(rem, stream, addToIndex, withMatches, timeInfo));

       }

-      drm.setDelegates(UIMAUtils.toFSArray(cas, delegates));

+      drm.setDelegates(FSCollectionFactory.createFSArray(cas, delegates));

       // }

     } else if (match instanceof RegExpRuleMatch) {

       RegExpRuleMatch rerm = (RegExpRuleMatch) match;

@@ -264,14 +263,14 @@
             remList.add(drem);

           }

         }

-        drems.setMatches(UIMAUtils.toFSArray(cas, remList));

+        drems.setMatches(FSCollectionFactory.createFSArray(cas, remList));

         if (addToIndex) {

           drems.addToIndexes();

         }

         ruleElementMatches.add(drems);

       }

 

-      drm.setElements(UIMAUtils.toFSArray(cas, ruleElementMatches));

+      drm.setElements(FSCollectionFactory.createFSArray(cas, ruleElementMatches));

     }

     if (timeInfo != null) {

       long time = timeInfo.get(match.getRule());

@@ -302,7 +301,7 @@
               createDebugRuleElementMatches(re, rems, stream, addToIndex, withMatches, timeInfo));

     }

 

-    drm.setElements(UIMAUtils.toFSArray(stream.getJCas(), ruleElementMatches));

+    drm.setElements(FSCollectionFactory.createFSArray(stream.getJCas(), ruleElementMatches));

   }

 

   private void setInnerMatches(RutaStream stream, boolean addToIndex, boolean withMatches,

@@ -317,7 +316,7 @@
       ruleElementMatches.add(

               createDebugRuleElementMatches(re, rems, stream, addToIndex, withMatches, timeInfo));

     }

-    drm.setElements(UIMAUtils.toFSArray(stream.getJCas(), ruleElementMatches));

+    drm.setElements(FSCollectionFactory.createFSArray(stream.getJCas(), ruleElementMatches));

   }

 

   public DebugRuleElementMatches createDebugRuleElementMatches(RuleElement re,

@@ -336,8 +335,8 @@
         } else {

           rem = createDebugRuleElementMatch(each, stream, addToIndex);

         }

-        FSArray inlinedConditionBlocks = createInlinedBlocks(each.getInlinedConditionRules(),

-                stream, true, addToIndex, withMatches, timeInfo);

+        FSArray<DebugInlinedBlock> inlinedConditionBlocks = createInlinedBlocks(

+                each.getInlinedConditionRules(), stream, true, addToIndex, withMatches, timeInfo);

         rem.setInlinedConditionBlocks(inlinedConditionBlocks);

         if (rem != null) {

           remList.add(rem);

@@ -347,10 +346,10 @@
     if (rems != null && !rems.isEmpty()) {

       drems.setRuleAnchor(rems.get(0).isRuleAnchor());

     }

-    drems.setMatches(UIMAUtils.toFSArray(cas, remList));

+    drems.setMatches(FSCollectionFactory.createFSArray(cas, remList));

 

-    FSArray inlinedActionBlocks = createInlinedActionBlocks(rems, stream, addToIndex, withMatches,

-            timeInfo);

+    FSArray<DebugInlinedBlock> inlinedActionBlocks = createInlinedActionBlocks(rems, stream,

+            addToIndex, withMatches, timeInfo);

     drems.setInlinedActionBlocks(inlinedActionBlocks);

 

     if (addToIndex)

@@ -358,8 +357,8 @@
     return drems;

   }

 

-  private FSArray createInlinedBlocks(List<List<ScriptApply>> blocks, RutaStream stream,

-          boolean asCondition, boolean addToIndex, boolean withMatches,

+  private FSArray<DebugInlinedBlock> createInlinedBlocks(List<List<ScriptApply>> blocks,

+          RutaStream stream, boolean asCondition, boolean addToIndex, boolean withMatches,

           Map<RutaElement, Long> timeInfo) {

     JCas jcas = stream.getJCas();

     if (blocks == null || blocks.isEmpty()) {

@@ -394,8 +393,9 @@
     return FSCollectionFactory.createFSArray(jcas, blockList);

   }

 

-  private FSArray createInlinedActionBlocks(List<RuleElementMatch> rems, RutaStream stream,

-          boolean addToIndex, boolean withMatches, Map<RutaElement, Long> timeInfo) {

+  private FSArray<DebugInlinedBlock> createInlinedActionBlocks(List<RuleElementMatch> rems,

+          RutaStream stream, boolean addToIndex, boolean withMatches,

+          Map<RutaElement, Long> timeInfo) {

     if (rems == null || rems.isEmpty()) {

       return null;

     }

@@ -467,8 +467,8 @@
     return drem;

   }

 

-  private FSArray createEvaluatedConditions(RuleElementMatch rem, RutaStream stream,

-          boolean addToIndex) {

+  private FSArray<DebugEvaluatedCondition> createEvaluatedConditions(RuleElementMatch rem,

+          RutaStream stream, boolean addToIndex) {

     JCas cas = stream.getJCas();

     List<DebugEvaluatedCondition> ecs = new ArrayList<DebugEvaluatedCondition>();

     if (rem.getConditions() != null) {

@@ -480,12 +480,12 @@
         ecs.add(ec);

       }

     }

-    FSArray result = UIMAUtils.toFSArray(cas, ecs);

+    FSArray<DebugEvaluatedCondition> result = FSCollectionFactory.createFSArray(cas, ecs);

     return result;

   }

 

-  private FSArray createEvaluatedConditions(EvaluatedCondition eval, RutaStream stream,

-          boolean addToIndex) {

+  private FSArray<DebugEvaluatedCondition> createEvaluatedConditions(EvaluatedCondition eval,

+          RutaStream stream, boolean addToIndex) {

     JCas cas = stream.getJCas();

     List<DebugEvaluatedCondition> ecs = new ArrayList<DebugEvaluatedCondition>();

     for (EvaluatedCondition each : eval.getConditions()) {

@@ -495,7 +495,7 @@
       ec.setConditions(createEvaluatedConditions(each, stream, addToIndex));

       ecs.add(ec);

     }

-    FSArray result = UIMAUtils.toFSArray(cas, ecs);

+    FSArray<DebugEvaluatedCondition> result = FSCollectionFactory.createFSArray(cas, ecs);

     return result;

   }

 

diff --git a/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicEngine.xml b/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicEngine.xml
index 487c3b4..b789b81 100644
--- a/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicEngine.xml
+++ b/ruta-core/src/main/resources/org/apache/uima/ruta/engine/BasicEngine.xml
@@ -58,6 +58,12 @@
         <mandatory>false</mandatory>

       </configurationParameter>

       <configurationParameter>

+        <name>debugAddToIndexes</name>

+        <type>Boolean</type>

+        <multiValued>false</multiValued>

+        <mandatory>false</mandatory>

+      </configurationParameter>

+      <configurationParameter>

         <name>statistics</name>

         <type>Boolean</type>

         <multiValued>false</multiValued>

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/ReindexUpdateModeTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/ReindexUpdateModeTest.java
index 86e24e9..dd054d3 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/ReindexUpdateModeTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/ReindexUpdateModeTest.java
@@ -27,6 +27,7 @@
 import org.apache.uima.ruta.engine.Ruta;
 import org.apache.uima.ruta.engine.RutaEngine;
 import org.apache.uima.ruta.engine.RutaTestUtils;
+import org.junit.Ignore;
 import org.junit.Test;
 
 public class ReindexUpdateModeTest {
@@ -230,6 +231,7 @@
   }
 
   @Test
+  @Ignore
   public void testSafeAdditive() throws Exception {
 
     Map<String, Object> params = new LinkedHashMap<>();
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java
index 4dc4595..2cb8fc9 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/engine/MultipleSeedersTest.java
@@ -1,50 +1,50 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.uima.ruta.engine;
-
-import org.apache.uima.analysis_engine.AnalysisEngine;
-import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
-import org.apache.uima.fit.factory.AnalysisEngineFactory;
-import org.apache.uima.fit.util.JCasUtil;
-import org.apache.uima.jcas.JCas;
-import org.apache.uima.resource.ResourceInitializationException;
-import org.apache.uima.ruta.type.ALL;
-import org.apache.uima.ruta.type.TruePositive;
-import org.junit.Assert;
-import org.junit.Test;
-
-public class MultipleSeedersTest {
-
-  @Test
-  public void test() throws ResourceInitializationException, AnalysisEngineProcessException {
-    
-    AnalysisEngine ae = AnalysisEngineFactory.createEngine(RutaEngine.class, 
-            RutaEngine.PARAM_RULES, "TokenSeed{-> TruePositive};",
-            RutaEngine.PARAM_SEEDERS, new String[] {DummySeeder.class.getName(),DummySeeder.class.getName()});
-    
-    JCas jcas = ae.newJCas();
-    jcas.setDocumentText("Dummy text.");
-    ae.process(jcas);
-    
-    Assert.assertEquals(2, JCasUtil.select(jcas, TruePositive.class).size());
-    Assert.assertEquals(0, JCasUtil.select(jcas, ALL.class).size());
-    
-  }
-  
-}
+/*

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you 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 org.apache.uima.ruta.engine;

+

+import org.apache.uima.analysis_engine.AnalysisEngine;

+import org.apache.uima.analysis_engine.AnalysisEngineProcessException;

+import org.apache.uima.fit.factory.AnalysisEngineFactory;

+import org.apache.uima.fit.util.JCasUtil;

+import org.apache.uima.jcas.JCas;

+import org.apache.uima.resource.ResourceInitializationException;

+import org.apache.uima.ruta.type.ALL;

+import org.apache.uima.ruta.type.TruePositive;

+import org.junit.Assert;

+import org.junit.Test;

+

+public class MultipleSeedersTest {

+

+  @Test

+  public void test() throws ResourceInitializationException, AnalysisEngineProcessException {

+    

+    AnalysisEngine ae = AnalysisEngineFactory.createEngine(RutaEngine.class, 

+            RutaEngine.PARAM_RULES, "TokenSeed{-> TruePositive};",

+            RutaEngine.PARAM_SEEDERS, new String[] {DummySeeder.class.getName(),DummySeeder.class.getName()});

+    

+    JCas jcas = ae.newJCas();

+    jcas.setDocumentText("Dummy text.");

+    ae.process(jcas);

+    

+    Assert.assertEquals(2, JCasUtil.select(jcas, TruePositive.class).size());

+    Assert.assertEquals(0, JCasUtil.select(jcas, ALL.class).size());

+    

+  }

+  

+}

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/engine/RulesParamTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/engine/RulesParamTest.java
index aa4ce4d..79e2d79 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/engine/RulesParamTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/engine/RulesParamTest.java
@@ -49,16 +49,10 @@
     AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);

     ae.setConfigParameterValue(RutaEngine.PARAM_RULES, script);

     ae.reconfigure();

-    CAS cas = null;

-    try {

-      cas = RutaTestUtils.getCAS(document);

-      ae.process(cas);

-    } catch (Exception e) {

-      e.printStackTrace();

-    }

+

+    CAS cas = RutaTestUtils.getCAS(document);

+    ae.process(cas);

 

     RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "text");

-

-    cas.release();

   }

 }

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java
index 506c706..6af0aad 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/engine/RutaTest.java
@@ -30,7 +30,6 @@
 import org.apache.uima.cas.CAS;

 import org.apache.uima.cas.FSIterator;

 import org.apache.uima.cas.Type;

-import org.apache.uima.cas.impl.AnnotationImpl;

 import org.apache.uima.cas.text.AnnotationFS;

 import org.apache.uima.cas.text.AnnotationIndex;

 import org.apache.uima.jcas.JCas;

@@ -153,8 +152,7 @@
   public void testSelectWithInjection() throws Exception {

     String document = "Some text.";

     CAS cas = RutaTestUtils.getCAS(document);

-    AnnotationImpl t1 = (AnnotationImpl) cas.createAnnotation(RutaTestUtils.getTestType(cas, 1), 5,

-            9);

+    Annotation t1 = (Annotation) cas.createAnnotation(RutaTestUtils.getTestType(cas, 1), 5, 9);

     cas.addFsToIndexes(t1);

     JCas jcas = cas.getJCas();

     List<Annotation> select1 = Ruta.select(jcas, Ruta.inject("W $;", t1));

@@ -177,8 +175,7 @@
   public void testMatchesWithInjection() throws Exception {

     String document = "Some text.";

     CAS cas = RutaTestUtils.getCAS(document);

-    AnnotationImpl t1 = (AnnotationImpl) cas.createAnnotation(RutaTestUtils.getTestType(cas, 1), 5,

-            9);

+    Annotation t1 = (Annotation) cas.createAnnotation(RutaTestUtils.getTestType(cas, 1), 5, 9);

     cas.addFsToIndexes(t1);

     JCas jcas = cas.getJCas();

     Assert.assertTrue(Ruta.matches(jcas, Ruta.inject("W $;", t1)));

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationAddressExpressionTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationAddressExpressionTest.java
index 634580e..89a02ff 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationAddressExpressionTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationAddressExpressionTest.java
@@ -31,9 +31,9 @@
 import org.apache.uima.cas.FSIterator;
 import org.apache.uima.cas.Feature;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.AnnotationImpl;
 import org.apache.uima.cas.text.AnnotationFS;
 import org.apache.uima.cas.text.AnnotationIndex;
+import org.apache.uima.jcas.tcas.Annotation;
 import org.apache.uima.ruta.engine.Ruta;
 import org.apache.uima.ruta.engine.RutaTestUtils;
 import org.apache.uima.ruta.engine.RutaTestUtils.TestFeature;
@@ -55,8 +55,8 @@
     AnnotationFS a1 = cas.createAnnotation(t1, 5, 9);
     cas.addFsToIndexes(a1);
     int ref = 0;
-    if (a1 instanceof AnnotationImpl) {
-      AnnotationImpl aImpl = (AnnotationImpl) a1;
+    if (a1 instanceof Annotation) {
+      Annotation aImpl = (Annotation) a1;
       ref = aImpl.getAddress();
     }
 
@@ -91,8 +91,7 @@
     featureMap.put(typeName, list);
     String fn = "a";
     list.add(new TestFeature(fn, "", "uima.tcas.Annotation"));
-    
-    
+
     CAS cas = null;
     try {
       cas = RutaTestUtils.getCAS(document, typeMap, featureMap);
@@ -103,13 +102,13 @@
     AnnotationFS a1 = cas.createAnnotation(t1, 5, 9);
     cas.addFsToIndexes(a1);
     int ref = 0;
-    if (a1 instanceof AnnotationImpl) {
-      AnnotationImpl aImpl = (AnnotationImpl) a1;
+    if (a1 instanceof Annotation) {
+      Annotation aImpl = (Annotation) a1;
       ref = aImpl.getAddress();
     }
 
     String script = "";
-    script += "CREATE(Struct, \"a\" = $"+ref+");";
+    script += "CREATE(Struct, \"a\" = $" + ref + ");";
     try {
       Ruta.apply(cas, script);
     } catch (Exception e) {
@@ -137,5 +136,5 @@
     }
 
   }
-  
+
 }
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationFeatureExpressionTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationFeatureExpressionTest.java
index 715c40f..0d24944 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationFeatureExpressionTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationFeatureExpressionTest.java
@@ -175,7 +175,7 @@
     AnnotationFS a2 = cas.createAnnotation(type1, 5, 9);
     FeatureStructure fs1 = cas.createFS(type2);
     FeatureStructure fs2 = cas.createFS(type2);
-    FSArray fsArray1 = FSCollectionFactory.createFSArray(cas.getJCas(),
+    FSArray<FeatureStructure> fsArray1 = FSCollectionFactory.createFSArray(cas.getJCas(),
             new FeatureStructure[] { fs1, fs2 });
     fs1.setStringValue(type2s, "1");
     fs2.setStringValue(type2s, "2");
@@ -236,7 +236,7 @@
     CAS cas = RutaTestUtils.getCAS(document, complexTypes, features);
     Ruta.apply(cas, script);
 
-    RutaTestUtils.assertAnnotationsEquals(cas, 1,1, "a");
+    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "a");
   }
 
   @Test
@@ -257,19 +257,18 @@
     features.put("Struct1", struct1Features);
     struct1Features.add(new TestFeature("smallW", "", "uima.cas.FSArray"));
     struct1Features.add(new TestFeature("capitalW", "", "uima.cas.FSArray"));
-    
+
     List<TestFeature> wordFeatures = new ArrayList<RutaTestUtils.TestFeature>();
     features.put("Word", wordFeatures);
     wordFeatures.add(new TestFeature("small", "", "uima.cas.Boolean"));
-    
+
     CAS cas = RutaTestUtils.getCAS(document, complexTypes, features);
     Ruta.apply(cas, script);
-    
+
     RutaTestUtils.assertAnnotationsEquals(cas, 1, 2, "is", "a");
     RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "This", "Test");
   }
-  
-  
+
   @Test
   public void testPartofOnNullMatch() throws Exception {
     String document = "Some text.";
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java
index e220a7c..c4738aa 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationLabelExpressionTest.java
@@ -441,7 +441,7 @@
     FeatureStructure featureValueA = null;

     FeatureStructure featureValueAS = null;

     Annotation a = null;

-    FSArray as = null;

+    FSArray<?> as = null;

 

     type = cas.getTypeSystem().getType("Struct1");

     featureA = type.getFeatureByBaseName("a");

@@ -457,7 +457,7 @@
     Assert.assertTrue(featureValueA instanceof Annotation);

     Assert.assertTrue(featureValueAS instanceof FSArray);

     a = (Annotation) featureValueA;

-    as = (FSArray) featureValueAS;

+    as = (FSArray<?>) featureValueAS;

     Assert.assertEquals("Some text", a.getCoveredText());

     Assert.assertEquals("Annotation", a.getType().getShortName());

     Assert.assertEquals(1, as.size());

@@ -478,7 +478,7 @@
     Assert.assertTrue(featureValueA instanceof Annotation);

     Assert.assertTrue(featureValueAS instanceof FSArray);

     a = (Annotation) featureValueA;

-    as = (FSArray) featureValueAS;

+    as = (FSArray<?>) featureValueAS;

     Assert.assertEquals("Some", a.getCoveredText());

     Assert.assertEquals("CW", a.getType().getShortName());

     Assert.assertEquals(2, as.size());

@@ -501,7 +501,7 @@
     Assert.assertTrue(featureValueA instanceof Annotation);

     Assert.assertTrue(featureValueAS instanceof FSArray);

     a = (Annotation) featureValueA;

-    as = (FSArray) featureValueAS;

+    as = (FSArray<?>) featureValueAS;

     Assert.assertEquals("Some text", a.getCoveredText());

     Assert.assertEquals("Annotation", a.getType().getShortName());

     Assert.assertEquals(1, as.size());

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationVariableExpressionTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationVariableExpressionTest.java
index 1897e50..34da8e5 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationVariableExpressionTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/expression/annotation/AnnotationVariableExpressionTest.java
@@ -163,7 +163,7 @@
     iterator = ai.iterator();
     next = iterator.next();
     assertEquals("text", next.getCoveredText());
-    FSArray array = (FSArray) next.getFeatureValue(f1);
+    FSArray<?> array = (FSArray<?>) next.getFeatureValue(f1);
     assertNotNull("Feature value is null!", array);
     assertEquals(2, array.size());
   }
@@ -204,7 +204,7 @@
     iterator = ai.iterator();
     next = iterator.next();
     assertEquals("text", next.getCoveredText());
-    FSArray array = (FSArray) next.getFeatureValue(f1);
+    FSArray<?> array = (FSArray<?>) next.getFeatureValue(f1);
     assertNotNull("Feature value is null!", array);
     assertEquals(2, array.size());
   }
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/expression/feature/FeatureStructureTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/expression/feature/FeatureStructureTest.java
index bb31678..cf6164e 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/expression/feature/FeatureStructureTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/expression/feature/FeatureStructureTest.java
@@ -38,7 +38,6 @@
 
 public class FeatureStructureTest {
 
-
   @Test
   public void testFeatureStructureFeature() throws Exception {
 
@@ -79,7 +78,7 @@
     AnnotationFS a2 = cas.createAnnotation(type1, 5, 9);
     FeatureStructure fs1 = cas.createFS(type2);
     FeatureStructure fs2 = cas.createFS(type2);
-    FSArray fsArray1 = FSCollectionFactory.createFSArray(cas.getJCas(),
+    FSArray<FeatureStructure> fsArray1 = FSCollectionFactory.createFSArray(cas.getJCas(),
             new FeatureStructure[] { fs1, fs2 });
     fs1.setStringValue(type2s, "1");
     fs2.setStringValue(type2s, "2");
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java
index 927226c..6588a91 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/resource/CSVTableTest.java
@@ -1,76 +1,76 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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 org.apache.uima.ruta.resource;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.io.IOException;
-
-import org.junit.Test;
-
-public class CSVTableTest {
-  private static final String CUSTOM_SEPARATOR = "#|#";
-
-  @Test
-  public void testDefaultLookup() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CSVTable.DEFAULT_CSV_SEPARATOR);
-    checkValue(csvTable, 0, 0, "this is the first line first column");
-    checkValue(csvTable, 0, 1, "ONE");
-    checkValue(csvTable, 1, 0, "this is the second line first column");
-    checkValue(csvTable, 1, 1, "TWO");
-    checkValue(csvTable, 2, 0, "this is the a line with custom");
-    checkValue(csvTable, 2, 1, " non default separator used#|#THREE");
-  }
-
-  @Test
-  public void testDefaultLookupWithEmptyColumn() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CSVTable.DEFAULT_CSV_SEPARATOR);
-    checkValue(csvTable, 3, 0, "line with empty column");
-    checkValue(csvTable, 3, 1, " "); // spacer added by table implementation
-    checkValue(csvTable, 3, 2, "AFTER_EMPTY_COLUMN");
-  }
-
-  @Test
-  public void testLookupWithCustomSeparator() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CUSTOM_SEPARATOR);
-    checkValue(csvTable, 0, 0, "this is the first line first column;ONE");
-    checkValue(csvTable, 1, 0, "this is the second line first column;TWO");
-    checkValue(csvTable, 2, 0, "this is the a line with custom; non default separator used");
-    checkValue(csvTable, 2, 1, "THREE");
-  }
-
-  @Test
-  public void testLookupWithCustomSeparatorAndEmptyColumn() throws IOException {
-    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),
-            CUSTOM_SEPARATOR);
-    checkValue(csvTable, 4, 0, "line with empty column custom separator");
-    checkValue(csvTable, 4, 1, " "); // spacer added by table implementation
-    checkValue(csvTable, 4, 2, "AFTER_EMPTY_COLUMN2");
-  }
-
-  private void checkValue(CSVTable table, int row, int column, String expectedValue) {
-    String actualValue = table.getEntry(row, column);
-    assertThat(actualValue, is(expectedValue));
-  }
-
+/*

+ * Licensed to the Apache Software Foundation (ASF) under one

+ * or more contributor license agreements.  See the NOTICE file

+ * distributed with this work for additional information

+ * regarding copyright ownership.  The ASF licenses this file

+ * to you 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 org.apache.uima.ruta.resource;

+

+import static org.hamcrest.CoreMatchers.is;

+import static org.junit.Assert.assertThat;

+

+import java.io.IOException;

+

+import org.junit.Test;

+

+public class CSVTableTest {

+  private static final String CUSTOM_SEPARATOR = "#|#";

+

+  @Test

+  public void testDefaultLookup() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CSVTable.DEFAULT_CSV_SEPARATOR);

+    checkValue(csvTable, 0, 0, "this is the first line first column");

+    checkValue(csvTable, 0, 1, "ONE");

+    checkValue(csvTable, 1, 0, "this is the second line first column");

+    checkValue(csvTable, 1, 1, "TWO");

+    checkValue(csvTable, 2, 0, "this is the a line with custom");

+    checkValue(csvTable, 2, 1, " non default separator used#|#THREE");

+  }

+

+  @Test

+  public void testDefaultLookupWithEmptyColumn() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CSVTable.DEFAULT_CSV_SEPARATOR);

+    checkValue(csvTable, 3, 0, "line with empty column");

+    checkValue(csvTable, 3, 1, " "); // spacer added by table implementation

+    checkValue(csvTable, 3, 2, "AFTER_EMPTY_COLUMN");

+  }

+

+  @Test

+  public void testLookupWithCustomSeparator() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CUSTOM_SEPARATOR);

+    checkValue(csvTable, 0, 0, "this is the first line first column;ONE");

+    checkValue(csvTable, 1, 0, "this is the second line first column;TWO");

+    checkValue(csvTable, 2, 0, "this is the a line with custom; non default separator used");

+    checkValue(csvTable, 2, 1, "THREE");

+  }

+

+  @Test

+  public void testLookupWithCustomSeparatorAndEmptyColumn() throws IOException {

+    CSVTable csvTable = new CSVTable(CSVTable.class.getResourceAsStream("test_csvfile.csv"),

+            CUSTOM_SEPARATOR);

+    checkValue(csvTable, 4, 0, "line with empty column custom separator");

+    checkValue(csvTable, 4, 1, " "); // spacer added by table implementation

+    checkValue(csvTable, 4, 2, "AFTER_EMPTY_COLUMN2");

+  }

+

+  private void checkValue(CSVTable table, int row, int column, String expectedValue) {

+    String actualValue = table.getEntry(row, column);

+    assertThat(actualValue, is(expectedValue));

+  }

+

 }
\ No newline at end of file
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java b/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java
index 270719b..38dabdf 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCard2Test.java
@@ -275,11 +275,26 @@
   public void testLabelForFailedLookahead() throws Exception {

     String document = "A x B x C x D";

     String script = "(w1:CW{REGEXP(\"A\")} # w2:CW{REGEXP(\"C\")})->{w1{->T1};};";

+	

+	CAS cas = RutaTestUtils.getCAS(document, null, null, false);

+    Ruta.apply(cas, script);

+	

+	RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "A");

+  }

+

+

+  @Test

+  public void testLastElementAlsoAnnotatedWithLookahead() throws Exception {

+    String document = "a b c. a b c.";

+    String script = "ANY+{-PARTOF({PERIOD, T1})->T1};\n";

+    script += "\"a\" -> T2, T3;\n";

+    script += "\"c\" -> T3;\n";

+    script += "T1 -> { T2 # T3{-> T4};};\n";

 

     CAS cas = RutaTestUtils.getCAS(document, null, null, false);

     Ruta.apply(cas, script);

 

-    RutaTestUtils.assertAnnotationsEquals(cas, 1, 1, "A");

+    RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "c", "c");

   }

 

 }

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCardInWindowTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCardInWindowTest.java
index a803fce..1775603 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCardInWindowTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/rule/WildCardInWindowTest.java
@@ -46,14 +46,16 @@
   public void testMultiMidOut() throws Exception {
     String document = ". A x 1 1 : x 2 % 3 x ; . A x B 1 C 1 : x 4 % 5 x ; .";
     String script = "";
-    script += "PERIOD #{-> T1} PERIOD;";
-    script += "T1 -> {CW{-> T4} # @COLON # NUM{-> T2} SPECIAL NUM{-> T3} # SEMICOLON;};";
+    script += "PERIOD ANY+{-PARTOF(PERIOD) -> T1} PERIOD;";
+    script += "T1 -> {CW{-> T4} # @COLON;};";
+    script += "T1 -> {CW{-> T5} # @COLON # NUM{-> T2} SPECIAL NUM{-> T3} # SEMICOLON;};";
     CAS cas = RutaTestUtils.getCAS(document);
     Ruta.apply(cas, script);
 
     RutaTestUtils.assertAnnotationsEquals(cas, 2, 2, "2", "4");
     RutaTestUtils.assertAnnotationsEquals(cas, 3, 2, "3", "5");
     RutaTestUtils.assertAnnotationsEquals(cas, 4, 2, "A", "C");
+    RutaTestUtils.assertAnnotationsEquals(cas, 5, 2, "A", "C");
 
   }
 
@@ -106,4 +108,24 @@
     RutaTestUtils.assertAnnotationsEquals(cas, 3, 1, "some text");
   }
 
+  @Test
+  public void testRightToLeftCombination() throws Exception {
+    String document = "bla . x x x A x x 1 : x x x 2 x x . bla";
+
+    // Both NUM/T3 should be removed
+    String script = "";
+    script += "PERIOD ANY+{-PARTOF(PERIOD) -> T1} PERIOD;";
+    script += "CW{->T2};";
+    script += "NUM{->T3};";
+    script += "T1->{";
+    script += "T2 # n1:T3 ANY[0,5]{-PARTOF(T3)} COLON # n2:@T3{-> UNMARK(n2)};";
+    script += "T2 # n:T3{ -> UNMARK(n)} COLON;";
+    script += "};";
+
+    CAS cas = RutaTestUtils.getCAS(document);
+    Ruta.apply(cas, script);
+
+    RutaTestUtils.assertAnnotationsEquals(cas, 3, 0);
+  }
+
 }
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/visitor/DebugAddToIndexesTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/visitor/DebugAddToIndexesTest.java
new file mode 100644
index 0000000..41b5139
--- /dev/null
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/visitor/DebugAddToIndexesTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 org.apache.uima.ruta.visitor;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.uima.cas.CAS;
+import org.apache.uima.fit.util.JCasUtil;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.ruta.engine.Ruta;
+import org.apache.uima.ruta.engine.RutaEngine;
+import org.apache.uima.ruta.engine.RutaTestUtils;
+import org.apache.uima.ruta.type.DebugRuleApply;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class DebugAddToIndexesTest {
+
+  @Test
+  public void test() throws Exception {
+
+    String document = "This is a test.";
+    String script = "";
+    script += "CW;";
+
+    CAS cas = RutaTestUtils.getCAS(document);
+    Map<String, Object> parameters = new HashMap<>();
+    parameters.put(RutaEngine.PARAM_DEBUG, Boolean.TRUE);
+    parameters.put(RutaEngine.PARAM_DEBUG_WITH_MATCHES, Boolean.TRUE);
+    parameters.put(RutaEngine.PARAM_DEBUG_ADD_TO_INDEXES, Boolean.TRUE);
+
+    Ruta.apply(cas, script, parameters);
+
+    JCas jcas = cas.getJCas();
+
+    Collection<DebugRuleApply> debugRuleApplies = JCasUtil.select(jcas, DebugRuleApply.class);
+    Assert.assertEquals(3, debugRuleApplies.size());
+    Iterator<DebugRuleApply> iterator = debugRuleApplies.iterator();
+    iterator.next();
+    Assert.assertEquals("Document;", iterator.next().getElement());
+    Assert.assertEquals("CW;", iterator.next().getElement());
+  }
+}
diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/visitor/InlinedRulesExplanationTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/visitor/InlinedRulesExplanationTest.java
index 3c14a6d..36e097a 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/visitor/InlinedRulesExplanationTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/visitor/InlinedRulesExplanationTest.java
@@ -32,10 +32,12 @@
 import org.apache.uima.ruta.engine.RutaEngine;

 import org.apache.uima.ruta.engine.RutaTestUtils;

 import org.apache.uima.ruta.type.DebugBlockApply;

+import org.apache.uima.ruta.type.DebugInlinedBlock;

 import org.apache.uima.ruta.type.DebugMatchedRuleMatch;

 import org.apache.uima.ruta.type.DebugRuleApply;

 import org.apache.uima.ruta.type.DebugRuleElementMatch;

 import org.apache.uima.ruta.type.DebugRuleElementMatches;

+import org.apache.uima.ruta.type.DebugRuleMatch;

 import org.apache.uima.ruta.type.DebugScriptApply;

 import org.junit.Assert;

 import org.junit.Test;

@@ -64,20 +66,20 @@
     Assert.assertTrue(debugScriptApply instanceof DebugBlockApply);

     DebugBlockApply debugBlockApply = (DebugBlockApply) debugScriptApply;

 

-    FSArray innerApply = debugBlockApply.getInnerApply();

+    FSArray<DebugScriptApply> innerApply = debugBlockApply.getInnerApply();

     Assert.assertEquals(1, innerApply.size());

     FeatureStructure innerApplyFS = innerApply.get(0);

     Assert.assertTrue(debugScriptApply instanceof DebugRuleApply);

     DebugRuleApply debugRuleApply = (DebugRuleApply) innerApplyFS;

 

-    FSArray rules = debugRuleApply.getRules();

+    FSArray<DebugRuleMatch> rules = debugRuleApply.getRules();

     Assert.assertEquals(1, rules.size());

     FeatureStructure ruleMatchFS = rules.get(0);

     Assert.assertTrue(ruleMatchFS instanceof DebugMatchedRuleMatch);

     DebugMatchedRuleMatch debugMatchedRuleMatch = (DebugMatchedRuleMatch) ruleMatchFS;

     Assert.assertEquals(0, debugMatchedRuleMatch.getDelegates().size());

 

-    FSArray reMatchesArray = debugMatchedRuleMatch.getElements();

+    FSArray<DebugRuleElementMatches> reMatchesArray = debugMatchedRuleMatch.getElements();

     Assert.assertEquals(2, reMatchesArray.size());

     FeatureStructure reMatches1FS = reMatchesArray.get(0);

     FeatureStructure reMatches2FS = reMatchesArray.get(1);

@@ -86,8 +88,8 @@
     DebugRuleElementMatches re1Matches = (DebugRuleElementMatches) reMatches1FS;

     DebugRuleElementMatches re2Matches = (DebugRuleElementMatches) reMatches2FS;

 

-    FSArray inlinedActionRules1 = re1Matches.getInlinedActionBlocks();

-    FSArray inlinedActionRules2 = re2Matches.getInlinedActionBlocks();

+    FSArray<DebugInlinedBlock> inlinedActionRules1 = re1Matches.getInlinedActionBlocks();

+    FSArray<DebugInlinedBlock> inlinedActionRules2 = re2Matches.getInlinedActionBlocks();

 

     Assert.assertEquals(1, inlinedActionRules1.size());

     Assert.assertEquals(2, inlinedActionRules2.size());

@@ -95,8 +97,8 @@
     DebugRuleElementMatch re1Match = (DebugRuleElementMatch) re1Matches.getMatches().get(0);

     DebugRuleElementMatch re2Match = (DebugRuleElementMatch) re2Matches.getMatches().get(0);

 

-    FSArray inlinedConditionRules1 = re1Match.getInlinedConditionBlocks();

-    FSArray inlinedConditionRules2 = re2Match.getInlinedConditionBlocks();

+    FSArray<DebugInlinedBlock> inlinedConditionRules1 = re1Match.getInlinedConditionBlocks();

+    FSArray<DebugInlinedBlock> inlinedConditionRules2 = re2Match.getInlinedConditionBlocks();

 

     Assert.assertEquals(2, inlinedConditionRules1.size());

     Assert.assertEquals(1, inlinedConditionRules2.size());

diff --git a/ruta-docbook/pom.xml b/ruta-docbook/pom.xml
index 1e64680..0dc97ca 100644
--- a/ruta-docbook/pom.xml
+++ b/ruta-docbook/pom.xml
@@ -17,20 +17,19 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-docbook</artifactId>

   <packaging>pom</packaging>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

   <name>Apache UIMA Ruta Documentation</name>

   <url>${uimaWebsiteUrl}</url>

+

   <properties>

     <uimaScmProject>${project.artifactId}</uimaScmProject>

     <bookNameRoot>tools.ruta.book</bookNameRoot>

@@ -38,9 +37,9 @@
   </properties>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

diff --git a/ruta-docbook/src/docbook/tools.ruta.howtos.xml b/ruta-docbook/src/docbook/tools.ruta.howtos.xml
index 39e8532..3cecf68 100644
--- a/ruta-docbook/src/docbook/tools.ruta.howtos.xml
+++ b/ruta-docbook/src/docbook/tools.ruta.howtos.xml
@@ -250,7 +250,7 @@
 		<programlisting><![CDATA[<plugin>
 <groupId>org.apache.uima</groupId>
 <artifactId>ruta-maven-plugin</artifactId>
-<version>2.8.1</version>
+<version>3.0.1</version>
 <configuration>
 
  <!-- This is a exemplary configuration, which explicitly specifies the 
@@ -403,7 +403,7 @@
     <programlisting><![CDATA[<plugin>
 <groupId>org.apache.uima</groupId>
 <artifactId>ruta-maven-plugin</artifactId>
-<version>2.8.1</version>
+<version>3.0.1</version>
 <configuration></configuration>
 <executions>
 <execution>
@@ -456,7 +456,7 @@
     <programlisting><![CDATA[<plugin>
 <groupId>org.apache.uima</groupId>
 <artifactId>ruta-maven-plugin</artifactId>
-<version>2.8.1</version>
+<version>3.0.1</version>
 <configuration></configuration>
 <executions>
 <execution>
@@ -527,7 +527,7 @@
     </para>  
     
     <programlisting><![CDATA[mvn archetype:generate -DarchetypeGroupId=org.apache.uima 
-    -DarchetypeArtifactId=ruta-maven-archetype -DarchetypeVersion=2.8.1
+    -DarchetypeArtifactId=ruta-maven-archetype -DarchetypeVersion=3.0.1
     -DgroupId=my.domain -DartifactId=my-ruta-project]]></programlisting>
     
     <para>
diff --git a/ruta-docbook/src/docbook/tools.ruta.language.internal_indexing.xml b/ruta-docbook/src/docbook/tools.ruta.language.internal_indexing.xml
index 74a7ebb..595407b 100644
--- a/ruta-docbook/src/docbook/tools.ruta.language.internal_indexing.xml
+++ b/ruta-docbook/src/docbook/tools.ruta.language.internal_indexing.xml
@@ -23,38 +23,38 @@
    stores and updates additional indexing information directly in the CAS. 
    This indexing is not related to the annotation indexes of UIMA itself. 
    The internal indexing provides additional information, which is only utilized 
-   by the Ruta rules. This section provides an overview why and how it is included in
-   UIMA Ruta. And how Ruta can be configured in order to optimize its performance.
+   by the Ruta rules. This section provides an overview on why and how it is integrated in
+   UIMA Ruta, and how Ruta can be configured in order to optimize its performance.
   </para>
   <section id="ugr.tools.ruta.language.internal_indxexing.why">
     <title>Why additional indexing?</title>
     <para>
-	  The internal indexing is utilized for many different parts of functionality within Ruta.
+	  The internal indexing plays a an essential role in different parts of functionality within Ruta.
 	  The need for the indexing is motivated by two main and important features. 
 	</para>
 	<para>
-	  Ruta provides different language elements, for example conditions, which are fulfill 
+	  Ruta provides different language elements like conditions, which are fulfilled 
 	  depending on some investigation of the CAS annotation indexes. There are several 
-	  condition like PARTOF which require many index operations in worst case. Here, potentially
-	  the complete index needed to be iterated in order to validate if a specific annotation 
-	  is part of another annotation of a specific type. And this check need to be performed 
-	  for each considered annotation and for each rule match and for each rule where a PARTOF 
-	  condition is used. Without additional internal indexing Ruta would be too slow to 
-	  actually be useful. With this feature, it is just a fast lookup. This situation applies also for many other language elements and 
+	  conditions like PARTOF, which require many index operations in the worst case. Here, potentially
+	  the complete index needs to be iterated in order to validate if a specific annotation 
+	  is part of another annotation of a specific type. This check needs to be performed 
+	  for each considered annotation, for each rule match and for each rule where a PARTOF 
+	  condition is used. Without additional internal indexing, Ruta would be too slow to 
+	  actually be useful. With this feature, the process is just a fast lookup. This situation applies also for many other language elements and 
 	  conditions like STARTSWITH and ENDSWITH.
     </para>
     <para>
       A second necessity is the coverage-based visibility concept of Ruta.
       Annotations and any text spans are invisible if their begin or end is covered by some 
       invisible annotation, i.e., an annotation of a type that is configured to be invisible.
-      This is a powerful feature that enables many different engineering approaches and makes
-      rules also more maintainable. For a (reasonably fast) implementation of this features, 
-      it is necessary to know for each position if it is covered by annotations of specific types.
+      This is a powerful feature that enables many different engineering approaches and makes the
+      rules more maintainable as well. For a (reasonably fast) implementation of this feature, 
+      it is necessary to know for each position, if it is covered by annotations of specific types.
     </para>
     <para>
-      The internal indexing comes, however, with some costs. The indexing requires time and memory.
-      the information needs to be collected and/or updated for every Ruta script (RutaEngine) 
-      in a pipeline. This may require many operations if many annotations are available.
+      The internal indexing comes, however, at some costs. The indexing requires time and memory.
+      The information needs to be collected and/or updated for every Ruta script (RutaEngine) 
+      in a pipeline. This may be expensive operation-wise, if the scripts consist of many annotations to be checked.
       Straightforward, the storage of this information at potentially all text positions 
       requires a lot memory. Nevertheless, the advantages outweigh the disadvantages considerably. 
     </para>
@@ -84,13 +84,13 @@
     <para>
       The information is stored in additional annotations of the type RutaBasic, 
       which provides by implementation, and not by features, additional fields for
-      these three kinds of information. RutaBasic provide a complete disjunct 
+      these three kinds of information. RutaBasic types provide a complete disjunct 
       partitioning of the document. They begin and end at every position where an 
       annotation starts and ends. This also includes, for examples, one RutaBasic for each 
       SPACE annotation, registering which annotation start and end at these offsets.
       They are automatically created and also extended if new smaller annotations are added.
-      Their initial creation is called <quote>indexing</quote> and their updating
-      if RutaBasics are available, but other Java analysis engines potentially added or
+      Their initial creation is called <quote>indexing</quote> and their updating,
+      if RutaBasics are available, while other Java analysis engines potentially added or
       removed annotations, is called <quote>reindexing</quote>. 
     </para>
     <para> 
@@ -103,16 +103,16 @@
       e.g., a PARTOF condition is still fulfilled although the annotation is not present in the 
       UIMA indexes anymore. This problem can be avoided (if necessary) either by switching to a more costly
       ReindexUpdateMode COMPLETE, or by updating the internal indexing directly in the Java analysis
-      engine if necessary by using the class RutaBasicUtils.
+      engine by using the class RutaBasicUtils.
     </para>
   </section>
   <section id="ugr.tools.ruta.language.internal_indxexing.optimize">
     <title>How to optimize the performance?</title>
     <para>
       The are many different options and possibilities to optimize the runtime performance and
-      memory footprint of Ruta script, by configuring the RutaEngine. The most useful configuration, 
+      memory footprint of a Ruta script, by configuring the RutaEngine. The most useful configuration, 
       however, depends on the actual situation: How much information is available about the pipeline
-      and the types of annotations and their update operations? In the following a selection 
+      and the types of annotations and their update operations? In the following, a selection 
       of optimizations are discussed.
     </para>
     <para>
@@ -128,7 +128,7 @@
       Thus, the set of types that need to be considered for internal indexing can be restricted, which
       makes the indexing faster and requires less memory.
     </para>
-      For a reindexing/updating step the corresponding reindex parameters need to be considered.
+      For a reindexing/updating step, the corresponding reindex parameters need to be considered.
       Even relevant annotations do not need to be reindexed/updated all the time.
       The updating can, for example, be restricted to
       types that have been potentially modified by previous Java analysis engines according to their capabilities.
@@ -137,13 +137,13 @@
       Tokens and similar annotations. They do not need to be reindexed, which can be configured using the
       reindexSkipTypes parameter.
     <para>
-      An extension to this is the parameter indexOnlyMentionTypes/reindexOnlyMentionedTypes. 
+      An extension to this is the parameter indexOnlyMentionedTypes/reindexOnlyMentionedTypes. 
       Here, the relevant types are collected using the
       actual script:  the types that are actually used in the rules and thus their internal indexing needs
-      to be up to date. This mainly can increase the indexing speed. This feature is highlighted with example:
+      to be up to date. This can increase the indexing speed. This feature is highlighted in the following example:
       Considering a larger pipeline with many annotations of different types, and also with many 
       modifications since the last RutaEngine, a script with one rule does not require much reindexing,
-      only the types that are used in this rule.
+      except the exclusive types used in this rule.
     </para>
   </section>
 </section>
\ No newline at end of file
diff --git a/ruta-docbook/src/docbook/tools.ruta.overview.xml b/ruta-docbook/src/docbook/tools.ruta.overview.xml
index ce38508..ed30da0 100644
--- a/ruta-docbook/src/docbook/tools.ruta.overview.xml
+++ b/ruta-docbook/src/docbook/tools.ruta.overview.xml
@@ -1002,6 +1002,13 @@
                 </row>

                 <row>

                   <entry>

+                    <link linkend='ugr.tools.ruta.ae.basic.parameter.debugAddToIndexes'>debugAddToIndexes</link>

+                  </entry>

+                  <entry>Option to add all debug information to the indexes.</entry>

+                  <entry>Single Boolean</entry>

+                </row>

+                <row>

+                  <entry>

                     <link linkend='ugr.tools.ruta.ae.basic.parameter.debugOnlyFor'>debugOnlyFor</link>

                   </entry>

                   <entry>List of rule ids. If provided, then debug information is only created for

@@ -1379,6 +1386,13 @@
             The default value of this parameter is set to false.

           </para>

         </section>

+        <section id="ugr.tools.ruta.ae.basic.parameter.debugAddToIndexes">

+          <title>debugAddToIndexes</title>

+          <para>

+            This parameter specifies whether all debug annotation should be added to the indexes. By

+            default this parameter is deactivated and only the root script apply is added.

+          </para>

+        </section>

         <section id="ugr.tools.ruta.ae.basic.parameter.debugOnlyFor">

           <title>debugOnlyFor</title>

           <para>

diff --git a/ruta-eclipse-feature/pom.xml b/ruta-eclipse-feature/pom.xml
index 6c2308c..a3e4563 100644
--- a/ruta-eclipse-feature/pom.xml
+++ b/ruta-eclipse-feature/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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/maven-v4_0_0.xsd">

+<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/maven-v4_0_0.xsd">

   <modelVersion>4.0.0</modelVersion>

 

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

 

@@ -41,9 +39,9 @@
     elements from the chain of parent poms, if this is omitted. Keeping this a bit factored allows cutting/pasting

     the <scm> element, and just changing the following two properties -->

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

diff --git a/ruta-eclipse-update-site/category.xml b/ruta-eclipse-update-site/category.xml
index fea9ffa..f1ff1f0 100644
--- a/ruta-eclipse-update-site/category.xml
+++ b/ruta-eclipse-update-site/category.xml
@@ -20,7 +20,7 @@
    ***************************************************************
    -->
 <site>
-   <feature url="features/org.apache.uima.ruta.feature_2.8.1.jar" id="org.apache.uima.ruta.feature" version="2.8.1">
+   <feature url="features/org.apache.uima.ruta.feature_3.1.0.jar" id="org.apache.uima.ruta.feature" version="3.1.0">
       <category name="apache-uima-ruta"/>
    </feature>
    <category-def name="apache-uima-ruta" label="Apache UIMA Ruta">
diff --git a/ruta-eclipse-update-site/pom.xml b/ruta-eclipse-update-site/pom.xml
index 02e26c3..cf3aa5d 100644
--- a/ruta-eclipse-update-site/pom.xml
+++ b/ruta-eclipse-update-site/pom.xml
@@ -24,34 +24,36 @@
   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>parent-pom</artifactId>

-    <version>14-SNAPSHOT</version>

+    <version>14</version>

     <relativePath />

   </parent>

-  

-	<artifactId>ruta-eclipse-update-site</artifactId>

-	<packaging>pom</packaging>

-	<version>2.9.0-SNAPSHOT</version>

-  

-	<name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

+

+  <artifactId>ruta-eclipse-update-site</artifactId>

+  <packaging>pom</packaging>

+  <version>3.1.0</version>

+

+  <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>

   <description>The UIMA Ruta Eclipse update site</description>

   <url>${uimaWebsiteUrl}</url>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

   

   <properties>

     <uimaScmProject>${project.artifactId}</uimaScmProject>

     <eclipseUpdateSiteComponent>ruta</eclipseUpdateSiteComponent>

-    <eclipseUpdateSubSite>${project.build.directory}/eclipse-update-site/${eclipseUpdateSiteComponent}</eclipseUpdateSubSite>

+    <eclipseUpdateSubSite>${project.build.directory}/eclipse-update-site-v3/${eclipseUpdateSiteComponent}</eclipseUpdateSubSite>

     <dropPrevVersions>false</dropPrevVersions>

   </properties>

-	<build>

-		<plugins>

-			<plugin>

+

+  <build>

+    

+    <plugins>

+      <plugin>

         <groupId>org.apache.maven.plugins</groupId>

         <artifactId>maven-dependency-plugin</artifactId>

         <executions>

@@ -130,7 +132,8 @@
             </configuration>

           </execution>

         </executions>

-			</plugin>

+      </plugin>

+

       <plugin>

         <artifactId>maven-antrun-plugin</artifactId>

         <executions>

@@ -178,21 +181,16 @@
 	                        <delete dir="${eclipseUpdateSubSite}" quiet="true" />

 	                        <exec executable="svn" failonerror="true">

 	                          <arg value="checkout" />

-	                          <arg value="${distsvnroot}repos/dist/release/uima/eclipse-update-site/${eclipseUpdateSiteComponent}" />

+	                          <arg value="${distsvnroot}repos/dist/release/uima/eclipse-update-site-v3/${eclipseUpdateSiteComponent}" />
 	                          <arg value="${eclipseUpdateSubSite}" />

 	                        </exec> 

 	                        

-	                        <!-- abandon safety for now

-	                        <echo>switching this checkout to ...dev... for safety</echo>

-	                        <exec executable="svn">

-	                          <arg value="switch" />

-	                          <arg value="- -force" />  remove space between 2 dashes if uncommented

-	                          <arg value="- -accept" />  remove space between 2 dashes if uncommented

-	                          <arg value="mine-full" />

-	                          <arg value="${distsvnroot}repos/dist/dev/uima/eclipse-update-site/${eclipseUpdateSiteComponent}" />

-	                          <arg value="${eclipseUpdateSubSite}" />

-	                        </exec> 

-	                         -->

+                        <echo>Saving original content and artifacts for the site</echo>
+                        <copy todir="${project.build.directory}/saved" failonerror="true">
+                          <fileset dir="${eclipseUpdateSubSite}"
+                            includes="content.jar,artifacts.jar" />
+                        </copy>
+        
 	                      </then>

 	                      <else>

 	                        <echo>skipping checkout of current svn dist release (because not apache-release)</echo>

@@ -284,33 +282,9 @@
             </configuration>

           </execution>

         </executions>

-        <dependencies>

-          <dependency>

-            <groupId>ant-contrib</groupId>

-            <artifactId>ant-contrib</artifactId>

-            <version>1.0b3</version>

-            <scope>runtime</scope>

-            <exclusions>

-              <exclusion>

-                <artifactId>ant</artifactId>

-                <groupId>ant</groupId>

-              </exclusion>

-            </exclusions>

-          </dependency>

-          <dependency>

-            <groupId>org.apache.ant</groupId>

-            <artifactId>ant-apache-regexp</artifactId>

-            <version>1.9.2</version>

-            <scope>compile</scope>

-          </dependency>

-          <dependency>

-            <groupId>jakarta-regexp</groupId>

-            <artifactId>jakarta-regexp</artifactId>

-            <version>1.4</version>

-            <scope>compile</scope>

-          </dependency>

-        </dependencies>

       </plugin>

-		</plugins>

-	</build>

-</project>
\ No newline at end of file
+

+   </plugins>

+  </build>

+

+</project>

diff --git a/ruta-ep-addons/pom.xml b/ruta-ep-addons/pom.xml
index a96032f..28a4624 100644
--- a/ruta-ep-addons/pom.xml
+++ b/ruta-ep-addons/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-ep-addons</artifactId>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -36,9 +34,9 @@
   <description>Provides addons for the UIMA Ruta Workbench in Eclipse</description>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

@@ -143,7 +141,6 @@
     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

     </dependency>

   </dependencies>

 

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectView.java
index c5e523f..f711899 100644
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ConstraintSelectView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.uima.ruta.cde.ui;
 
 import org.eclipse.swt.SWT;
@@ -66,7 +65,7 @@
     super.init(site, memento);
   }
 
-//Not sure why we need to add this... but here we go...
+  //Not sure why we need to add this... but here we go...
   @SuppressWarnings({ "unchecked", "rawtypes" })
   @Override
   public Object getAdapter(Class aAdapter) {
diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentView.java
index 678310a..41382dd 100644
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/DocumentView.java
@@ -70,7 +70,8 @@
     super.init(site, memento);
   }
 
-//Not sure why we need to add this... but here we go...
+
+  //Not sure why we need to add this... but here we go...
   @SuppressWarnings({ "unchecked", "rawtypes" })
   @Override
   public Object getAdapter(Class aAdapter) {
diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultView.java
index 71f65f8..0c1db5f 100644
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/cde/ui/ResultView.java
@@ -42,7 +42,7 @@
     this.resultViewComposite.setFocus();

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckView.java
index 52a0571..238fa3a 100644
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/check/AnnotationCheckView.java
@@ -67,7 +67,7 @@
     super.init(site, memento);

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyView.java
index 88df819..ce5a29a 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/apply/ApplyView.java
@@ -42,7 +42,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByView.java
index ffff87d..07e3b99 100644
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/createdBy/CreatedByView.java
@@ -41,8 +41,8 @@
     }

     return result;

   }

-

-//Not sure why we need to add this... but here we go...

+  

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementView.java
index 612b09b..e957f0b 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/element/ElementView.java
@@ -42,7 +42,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedView.java
index 9333282..23928bc 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/failed/FailedView.java
@@ -42,7 +42,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/inlined/InlinedView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/inlined/InlinedView.java
index 0513222..9a4fada 100644
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/inlined/InlinedView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/inlined/InlinedView.java
@@ -42,7 +42,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedView.java
index 63434db..8b9b641 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/matched/MatchedView.java
@@ -42,7 +42,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListView.java
index f63150c..bd0c50b 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/rulelist/RuleListView.java
@@ -42,7 +42,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionView.java
index 935114d..ba7ccfe 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/selection/ExplainSelectionView.java
@@ -42,7 +42,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
index 1268cbe..9c0ea11 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/ExplainTree.java
@@ -107,7 +107,7 @@
             debugInlinedBlock.getAsCondition(), debugInlinedBlock.getMatched(), ts);

     parent.addChild(inlinedBlockNode);

 

-    FSArray inlinedRules = debugInlinedBlock.getInlinedRules();

+    FSArray<DebugScriptApply> inlinedRules = debugInlinedBlock.getInlinedRules();

     if (inlinedRules != null) {

       for (FeatureStructure each : inlinedRules) {

         buildTree(each, inlinedBlockNode, ts, offset, onlyRules);

@@ -234,7 +234,7 @@
       }

     }

 

-    FSArray inlinedActionBlocks = fs.getInlinedActionBlocks();

+    FSArray<DebugInlinedBlock> inlinedActionBlocks = fs.getInlinedActionBlocks();

     if (inlinedActionBlocks != null) {

       InlinedRootNode inlinedRootNode = new InlinedRootNode(remsNode, ts);

       remsNode.setInlined(inlinedRootNode);

@@ -269,7 +269,7 @@
         buildTree(each, remNode, ts, offset, onlyRules);

       }

     }

-    FSArray inlinedConditionBlocks = fs.getInlinedConditionBlocks();

+    FSArray<DebugInlinedBlock> inlinedConditionBlocks = fs.getInlinedConditionBlocks();

     if (inlinedConditionBlocks != null) {

       InlinedRootNode inlinedRootNode = new InlinedRootNode(remNode, ts);

       remNode.setInlined(inlinedRootNode);

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
index 2ef1a35..39d8fe0 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/explain/tree/RuleElementMatchNode.java
@@ -27,8 +27,8 @@
 import org.apache.uima.ruta.caseditor.view.tree.IAnnotationNode;

 import org.apache.uima.ruta.explain.ExplainConstants;

 

-public class RuleElementMatchNode extends ExplainAbstractTreeNode implements IEvaluatedNode,

-        IAnnotationNode {

+public class RuleElementMatchNode extends ExplainAbstractTreeNode

+        implements IEvaluatedNode, IAnnotationNode {

 

   private boolean matched;

 

@@ -40,7 +40,8 @@
     matched = baseFS.getBooleanValue(baseFeat);

 

     f = fs.getType().getFeatureByBaseName(ExplainConstants.CONDITIONS);

-    ArrayFS value = (ArrayFS) fs.getFeatureValue(f);

+    @SuppressWarnings("unchecked")

+    ArrayFS<FeatureStructure> value = (ArrayFS<FeatureStructure>) fs.getFeatureValue(f);

     if (value != null) {

       FeatureStructure[] fsarray = value.toArray();

       for (FeatureStructure each : fsarray) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryView.java
index 8817c1a..fc1f0a6 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/query/ui/QueryView.java
@@ -39,14 +39,14 @@
   }
 
   @Override
-  public void createPartControl(Composite parent) {
+public void createPartControl(Composite parent) {
     viewContent = new QueryComposite(parent, SWT.NULL);
     if (memento != null) {
       viewContent.restoreState(memento);
       memento = null;
     }
   }
-
+  
   public void setViewTitle(String title) {
     setPartName(title);
   }
@@ -75,7 +75,7 @@
     return viewContent;
   }
 
-//Not sure why we need to add this... but here we go...
+  //Not sure why we need to add this... but here we go...
   @SuppressWarnings({ "unchecked", "rawtypes" })
   @Override
   public Object getAdapter(Class aAdapter) {
diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsView.java
index f065082..3d22126 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/statistics/StatisticsView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations

  * under the License.

  */

-

 package org.apache.uima.ruta.statistics;

 

 import org.apache.uima.caseditor.editor.AnnotationEditor;

@@ -43,8 +42,8 @@
     }

     return result;

   }

-

-//Not sure why we need to add this... but here we go...

+  

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestPageBookView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestPageBookView.java
index 1d80968..3662b82 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestPageBookView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/TestPageBookView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.uima.ruta.testing.ui.views;
 
 import org.eclipse.core.resources.IResource;
@@ -69,7 +68,7 @@
 
   @Override
   protected void doDestroyPage(IWorkbenchPart part, PageRec pageRecord) {
-    TestViewPage testViewPage = (TestViewPage) pageRecord.page;
+    TestViewPage testViewPage = (TestViewPage)pageRecord.page;
     testViewPage.saveState(memento);
     testViewPage.dispose();
   }
@@ -99,7 +98,7 @@
     return part.getSite().getId().equals("org.apache.uima.ruta.ide.ui.editor.RutaEditor");
   }
 
-//Not sure why we need to add this... but here we go...
+  //Not sure why we need to add this... but here we go...
   @SuppressWarnings({ "unchecked", "rawtypes" })
   @Override
   public Object getAdapter(Class aAdapter) {
diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fn/FalseNegativeView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fn/FalseNegativeView.java
index a33a890..6f8b745 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fn/FalseNegativeView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fn/FalseNegativeView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.uima.ruta.testing.ui.views.fn;
 
 import org.apache.uima.caseditor.editor.AnnotationEditor;
@@ -45,7 +44,7 @@
     return result;
   }
 
-//Not sure why we need to add this... but here we go...
+  //Not sure why we need to add this... but here we go...
   @SuppressWarnings({ "unchecked", "rawtypes" })
   @Override
   public Object getAdapter(Class aAdapter) {
diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fp/FalsePositiveView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fp/FalsePositiveView.java
index 0fe5db1..c954fc5 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fp/FalsePositiveView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/fp/FalsePositiveView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations

  * under the License.

  */

-

 package org.apache.uima.ruta.testing.ui.views.fp;

 

 import org.apache.uima.caseditor.editor.AnnotationEditor;

@@ -45,7 +44,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tp/TruePositiveView.java b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tp/TruePositiveView.java
index 093dad9..3a4125e 100755
--- a/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tp/TruePositiveView.java
+++ b/ruta-ep-addons/src/main/java/org/apache/uima/ruta/testing/ui/views/tp/TruePositiveView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations

  * under the License.

  */

-

 package org.apache.uima.ruta.testing.ui.views.tp;

 

 import org.apache.uima.caseditor.editor.AnnotationEditor;

@@ -44,8 +43,8 @@
     }

     return result;

   }

-

-// Not sure why we need to add this... but here we go...

+  

+  // Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-caseditor/.gitignore b/ruta-ep-caseditor/.gitignore
index 718773c..7e3a306 100644
--- a/ruta-ep-caseditor/.gitignore
+++ b/ruta-ep-caseditor/.gitignore
@@ -1 +1 @@
-META-INF/
+META-INF/
\ No newline at end of file
diff --git a/ruta-ep-caseditor/pom.xml b/ruta-ep-caseditor/pom.xml
index f2309c0..d2cec6a 100644
--- a/ruta-ep-caseditor/pom.xml
+++ b/ruta-ep-caseditor/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-ep-caseditor</artifactId>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

   <properties>

@@ -36,9 +34,9 @@
   <description>Provides additional views for the CAS Editor</description>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

@@ -104,7 +102,6 @@
     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

     </dependency>

   </dependencies>

 

diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/browser/AnnotationBrowserView.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/browser/AnnotationBrowserView.java
index 2fcfeee..bdaa57b 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/browser/AnnotationBrowserView.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/browser/AnnotationBrowserView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-
 package org.apache.uima.ruta.caseditor.view.browser;
 
 import org.apache.uima.caseditor.editor.AnnotationEditor;
@@ -56,5 +55,4 @@
   public Object getAdapter(Class aAdapter) {
     return super.getAdapter(aAdapter);
   }
-
 }
diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlView.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlView.java
index bf2fbee..09ca6ab 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlView.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/html/HtmlView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations

  * under the License.

  */

-

 package org.apache.uima.ruta.caseditor.view.html;

 

 import org.apache.uima.caseditor.editor.AnnotationEditor;

@@ -24,31 +23,35 @@
 import org.apache.uima.caseditor.editor.ICasEditor;

 import org.eclipse.ui.part.IPageBookViewPage;

 

-public class HtmlView extends CasEditorView {

+public class HtmlView

+    extends CasEditorView

+{

 

-  public static final String ID = "org.apache.uima.caseditor.html";

+    public static final String ID = "org.apache.uima.caseditor.html";

 

-  public static final String HTML_SOURCE = "org.apache.uima.caseditor.html.source";

+    public static final String HTML_SOURCE = "org.apache.uima.caseditor.html.source";

 

-  public HtmlView() {

-    super("The instance view is currently not available.");

-  }

-

-  @Override

-  protected IPageBookViewPage doCreatePage(ICasEditor editor) {

-    IPageBookViewPage result = null;

-    if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

-      HtmlViewPage page = new HtmlViewPage((AnnotationEditor) editor);

-      result = page;

+    public HtmlView()

+    {

+        super("The instance view is currently not available.");

     }

-    return result;

-  }

 

-//Not sure why we need to add this... but here we go...

-  @SuppressWarnings({ "unchecked", "rawtypes" })

-  @Override

-  public Object getAdapter(Class aAdapter) {

-    return super.getAdapter(aAdapter);

-  }

+    @Override

+    protected IPageBookViewPage doCreatePage(ICasEditor editor)

+    {

+        IPageBookViewPage result = null;

+        if (editor.getDocument() != null && editor instanceof AnnotationEditor) {

+            HtmlViewPage page = new HtmlViewPage((AnnotationEditor) editor);

+            result = page;

+        }

+        return result;

+    }

 

+    // Not sure why we need to add this... but here we go...

+    @SuppressWarnings({ "unchecked", "rawtypes" })

+    @Override

+    public Object getAdapter(Class aAdapter)

+    {

+        return super.getAdapter(aAdapter);

+    }

 }

diff --git a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/selection/SelectionView.java b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/selection/SelectionView.java
index 4bda807..5a7451c 100644
--- a/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/selection/SelectionView.java
+++ b/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/selection/SelectionView.java
@@ -16,7 +16,6 @@
  * specific language governing permissions and limitations

  * under the License.

  */

-

 package org.apache.uima.ruta.caseditor.view.selection;

 

 import org.apache.uima.caseditor.editor.AnnotationEditor;

@@ -45,7 +44,7 @@
     return result;

   }

 

-//Not sure why we need to add this... but here we go...

+  //Not sure why we need to add this... but here we go...

   @SuppressWarnings({ "unchecked", "rawtypes" })

   @Override

   public Object getAdapter(Class aAdapter) {

diff --git a/ruta-ep-core-ext/pom.xml b/ruta-ep-core-ext/pom.xml
index ff9f0d0..b5da444 100644
--- a/ruta-ep-core-ext/pom.xml
+++ b/ruta-ep-core-ext/pom.xml
@@ -17,16 +17,14 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
   <artifactId>ruta-ep-core-ext</artifactId>
   <name>Apache UIMA Ruta Eclipse: ${project.artifactId}</name>
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-ep-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../ruta-ep-parent/pom.xml</relativePath>
   </parent>
   <properties>
@@ -35,9 +33,9 @@
   <url>${uimaWebsiteUrl}</url>
 
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
@@ -68,7 +66,6 @@
     <dependency>
       <groupId>org.antlr</groupId>
       <artifactId>antlr-runtime</artifactId>
-      <version>3.5.2</version>
       <exclusions>
         <exclusion>
           <groupId>org.antlr</groupId>
diff --git a/ruta-ep-engine/.gitignore b/ruta-ep-engine/.gitignore
index 718773c..7e3a306 100644
--- a/ruta-ep-engine/.gitignore
+++ b/ruta-ep-engine/.gitignore
@@ -1 +1 @@
-META-INF/
+META-INF/
\ No newline at end of file
diff --git a/ruta-ep-engine/pom.xml b/ruta-ep-engine/pom.xml
index f0bfb38..6b4946e 100644
--- a/ruta-ep-engine/pom.xml
+++ b/ruta-ep-engine/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-ep-engine</artifactId>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-parent/pom.xml</relativePath>

   </parent>

 

@@ -44,9 +42,9 @@
   </properties>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

@@ -78,7 +76,6 @@
     <dependency>

       <groupId>org.antlr</groupId>

       <artifactId>antlr-runtime</artifactId>

-      <version>3.5.2</version>

       <scope>compile</scope>

       <exclusions>

         <exclusion>

@@ -90,37 +87,26 @@
     <dependency>

       <groupId>org.htmlparser</groupId>

       <artifactId>htmlparser</artifactId>

-      <version>1.6</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>commons-collections</groupId>

       <artifactId>commons-collections</artifactId>

-      <version>3.2.1</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-text</artifactId>

-      <version>1.6</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-lang3</artifactId>

-      <version>3.4</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>commons-lang</groupId>

-      <artifactId>commons-lang</artifactId>

-      <version>2.6</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>org.apache.uima</groupId>

       <artifactId>uimafit-core</artifactId>

-      <version>${uimafit-version}</version>

       <scope>compile</scope>

       <!-- Exclude aop stuff, which is not need by uimafit

         and only introduces a non-asl license -->

@@ -138,37 +124,31 @@
     <dependency>

       <groupId>commons-io</groupId>

       <artifactId>commons-io</artifactId>

-      <version>2.4</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-math3</artifactId>

-      <version>3.0</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>commons-logging</groupId>

       <artifactId>commons-logging</artifactId>

-      <version>1.1.1</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>commons-logging</groupId>

       <artifactId>commons-logging-api</artifactId>

-      <version>1.1</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>org.springframework</groupId>

       <artifactId>spring-core</artifactId>

-      <version>3.1.2.RELEASE</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>org.springframework</groupId>

       <artifactId>spring-context</artifactId>

-      <version>3.1.2.RELEASE</version>

       <scope>compile</scope>

       <!-- Exclude aop stuff, which is not need by uimafit

         and only introduces a non-asl license -->

@@ -186,28 +166,30 @@
     <dependency>

       <groupId>org.springframework</groupId>

       <artifactId>spring-expression</artifactId>

-      <version>3.1.2.RELEASE</version>

       <scope>compile</scope>

     </dependency>

     <dependency>

       <groupId>org.springframework</groupId>

       <artifactId>spring-beans</artifactId>

-      <version>3.1.2.RELEASE</version>

-      <scope>compile</scope>

-    </dependency>

-    <dependency>

-      <groupId>org.springframework</groupId>

-      <artifactId>spring-asm</artifactId>

-      <version>3.1.2.RELEASE</version>

       <scope>compile</scope>

     </dependency>

     

     <dependency>

       <groupId>com.github.ben-manes.caffeine</groupId>

       <artifactId>caffeine</artifactId>

-      <version>2.8.3</version>

     </dependency>

     

+    <dependency>

+      <groupId>org.slf4j</groupId>

+      <artifactId>slf4j-simple</artifactId>

+      <version>1.7.30</version>

+    </dependency>

+    <dependency>

+      <groupId>org.slf4j</groupId>

+      <artifactId>slf4j-api</artifactId>

+      <version>1.7.30</version>

+    </dependency>

+

   </dependencies>

 

   <build>

@@ -236,6 +218,7 @@
                   org.apache.uima.ruta.condition,

                   org.apache.uima.ruta.constraint,

                   org.apache.uima.ruta.descriptor,

+                  org.apache.uima.ruta.cache,

                   org.apache.uima.ruta.engine,

                   org.apache.uima.ruta.expression,

                   org.apache.uima.ruta.expression.annotation,

@@ -275,7 +258,6 @@
                 </_exportcontents>

 

                 <Import-Package>

-                  <!-- -->

                   org.apache.uima.*,

                   !bsh, !com.sun.net.httpserver,

                   !edu.emory.mathcs.backport.java.util.concurrent,

diff --git a/ruta-ep-engine/src/main/readme_bin/LICENSE b/ruta-ep-engine/src/main/readme_bin/LICENSE
index 9273ed3..c69e482 100644
--- a/ruta-ep-engine/src/main/readme_bin/LICENSE
+++ b/ruta-ep-engine/src/main/readme_bin/LICENSE
@@ -458,20 +458,19 @@
 

 ====================================================================================================   

 

-This product contains Spring Framework libraries.

+SPRING FRAMEWORK 4.3.30.RELEASE SUBCOMPONENTS:

 

-SPRING FRAMEWORK 3.1 SUBCOMPONENTS: 

-

-Spring Framework 3.1 includes a number of subcomponents with

-separate copyright notices and license terms.  The product that 

-includes this file does not necessarily use all the open source 

+Spring Framework 4.3.30.RELEASE includes a number of subcomponents

+with separate copyright notices and license terms. The product that

+includes this file does not necessarily use all the open source

 subcomponents referred to below. Your use of the source

 code for these subcomponents is subject to the terms and

-conditions of the following licenses. 

+conditions of the following licenses.

 

->>> asm-2.2.3:

 

-Copyright (c) 2000-2005 INRIA, France Telecom

+>>> ASM 6.0 (org.ow2.asm:asm:6.0, org.ow2.asm:asm-commons:6.0):

+

+Copyright (c) 2000-2011 INRIA, France Telecom

 All rights reserved.

 

 Redistribution and use in source and binary forms, with or without

@@ -501,27 +500,84 @@
 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF

 THE POSSIBILITY OF SUCH DAMAGE.

 

-Copyright (c) 1999-2009, OW2 Consortium <http://www.ow2.org/> 

-    

-=======================================================================   

+Copyright (c) 1999-2009, OW2 Consortium <https://www.ow2.org/>

 

-To the extent any open source subcomponents are licensed under the EPL and/or other 

-similar licenses that require the source code and/or modifications to 

-source code to be made available (as would be noted above), you may obtain a 

-copy of the source code corresponding to the binaries for such open source 

-components and modifications thereto, if any, (the "Source Files"), by 

-downloading the Source Files from http://www.springsource.org/download, 

-or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview 

-Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com.  All 

-such requests should clearly specify:  OPEN SOURCE FILES REQUEST, Attention General 

-Counsel.  VMware shall mail a copy of the Source Files to you on a CD or equivalent 

-physical medium.  This offer to obtain a copy of the Source Files is valid for three 

-years from the date you acquired this Software product.

+

+>>> CGLIB 3.2.6 (cglib:cglib:3.2.6):

+

+Per the LICENSE file in the CGLIB JAR distribution downloaded from

+https://github.com/cglib/cglib/releases/download/RELEASE_3_2_6/cglib-3.2.6.jar,

+CGLIB 3.2.6 is licensed under the Apache License, version 2.0, the text of

+which is included above.

+

+

+>>> Objenesis 2.6 (org.objenesis:objenesis:2.6):

+

+Per the LICENSE file in the Objenesis ZIP distribution downloaded from

+http://objenesis.org/download.html, Objenesis 2.6 is licensed under the

+Apache License, version 2.0, the text of which is included above.

+

+Per the NOTICE file in the Objenesis ZIP distribution downloaded from

+http://objenesis.org/download.html and corresponding to section 4d of the

+Apache License, Version 2.0, in this case for Objenesis:

+

+Objenesis

+Copyright 2006-2017 Joe Walnes, Henri Tremblay, Leonardo Mesquita

+

+

+===============================================================================

+

+To the extent any open source components are licensed under the EPL and/or

+other similar licenses that require the source code and/or modifications to

+source code to be made available (as would be noted above), you may obtain a

+copy of the source code corresponding to the binaries for such open source

+components and modifications thereto, if any, (the "Source Files"), by

+downloading the Source Files from https://spring.io/projects, Pivotal's website

+at https://network.pivotal.io/open-source, or by sending a request, with your

+name and address to: Pivotal Software, Inc., 875 Howard Street, 5th floor, San

+Francisco, CA 94103, Attention: General Counsel. All such requests should

+clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. Pivotal

+can mail a copy of the Source Files to you on a CD or equivalent physical

+medium.

+

+This offer to obtain a copy of the Source Files is valid for three years from

+the date you acquired this Software product. Alternatively, the Source Files

+may accompany the Software.

 

 ==================================================================================================== 

 

 This product contains Commons Math libraries (http://commons.apache.org/proper/commons-math/).

 

+Apache Commons Math includes the following code provided to the ASF under the

+Apache License 2.0:

+

+ - The inverse error function implementation in the Erf class is based on CUDA

+   code developed by Mike Giles, Oxford-Man Institute of Quantitative Finance,

+   and published in GPU Computing Gems, volume 2, 2010 (grant received on

+   March 23th 2013)

+ - The LinearConstraint, LinearObjectiveFunction, LinearOptimizer,

+   RelationShip, SimplexSolver and SimplexTableau classes in package

+   org.apache.commons.math3.optimization.linear include software developed by

+   Benjamin McCann (http://www.benmccann.com) and distributed with

+   the following copyright: Copyright 2009 Google Inc. (grant received on

+   March 16th 2009)

+ - The class "org.apache.commons.math3.exception.util.LocalizedFormatsTest" which

+   is an adapted version of "OrekitMessagesTest" test class for the Orekit library

+ - The "org.apache.commons.math3.analysis.interpolation.HermiteInterpolator"

+   has been imported from the Orekit space flight dynamics library.

+

+===============================================================================

+ 

+

+

+APACHE COMMONS MATH DERIVATIVE WORKS: 

+

+The Apache commons-math library includes a number of subcomponents

+whose implementation is derived from original sources written

+in C or Fortran.  License terms of the original sources

+are reproduced below.

+

+===============================================================================

 For the lmder, lmpar and qrsolv Fortran routine from minpack and translated in

 the LevenbergMarquardtOptimizer class in package

 org.apache.commons.math3.optimization.general 

@@ -611,47 +667,6 @@
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 ===============================================================================

 

-Copyright and license statement for the original lapack fortran routines

-translated in EigenDecompositionImpl class in package

-org.apache.commons.math3.linear:

-

-Copyright (c) 1992-2008 The University of Tennessee.  All rights reserved.

-

-$COPYRIGHT$

-

-Additional copyrights may follow

-

-$HEADER$

-

-Redistribution and use in source and binary forms, with or without

-modification, are permitted provided that the following conditions are

-met:

-

-- Redistributions of source code must retain the above copyright

-  notice, this list of conditions and the following disclaimer. 

-  

-- Redistributions in binary form must reproduce the above copyright

-  notice, this list of conditions and the following disclaimer listed

-  in this license in the documentation and/or other materials

-  provided with the distribution.

-  

-- Neither the name of the copyright holders nor the names of its

-  contributors may be used to endorse or promote products derived from

-  this software without specific prior written permission.

-  

-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT  

-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR

-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 

-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT

-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,

-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY

-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  

-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

-===============================================================================

-

 Copyright and license statement for the original Mersenne twister C

 routines translated in MersenneTwister class in package 

 org.apache.commons.math3.random:

@@ -686,3 +701,215 @@
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS

    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 

+===============================================================================

+

+The initial code for shuffling an array (originally in class

+"org.apache.commons.math3.random.RandomDataGenerator", now replaced by

+a method in class "org.apache.commons.math3.util.MathArrays") was

+inspired from the algorithm description provided in

+"Algorithms", by Ian Craw and John Pulham (University of Aberdeen 1999).

+The textbook (containing a proof that the shuffle is uniformly random) is

+available here:

+  http://citeseerx.ist.psu.edu/viewdoc/download;?doi=10.1.1.173.1898&rep=rep1&type=pdf

+

+===============================================================================

+License statement for the direction numbers in the resource files for Sobol sequences.

+

+-----------------------------------------------------------------------------

+Licence pertaining to sobol.cc and the accompanying sets of direction numbers

+

+-----------------------------------------------------------------------------

+Copyright (c) 2008, Frances Y. Kuo and Stephen Joe

+All rights reserved.

+

+Redistribution and use in source and binary forms, with or without

+modification, are permitted provided that the following conditions are met:

+

+    * Redistributions of source code must retain the above copyright

+      notice, this list of conditions and the following disclaimer.

+

+    * Redistributions in binary form must reproduce the above copyright

+      notice, this list of conditions and the following disclaimer in the

+      documentation and/or other materials provided with the distribution.

+

+    * Neither the names of the copyright holders nor the names of the

+      University of New South Wales and the University of Waikato

+      and its contributors may be used to endorse or promote products derived

+      from this software without specific prior written permission.

+

+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY

+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY

+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES

+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND

+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS

+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+===============================================================================

+

+The initial commit of package "org.apache.commons.math3.ml.neuralnet" is

+an adapted version of code developed in the context of the Data Processing

+and Analysis Consortium (DPAC) of the "Gaia" project of the European Space

+Agency (ESA).

+===============================================================================

+

+The initial commit of the class "org.apache.commons.math3.special.BesselJ" is

+an adapted version of code translated from the netlib Fortran program, rjbesl

+http://www.netlib.org/specfun/rjbesl by R.J. Cody at Argonne National

+Laboratory (USA).  There is no license or copyright statement included with the

+original Fortran sources.

+===============================================================================

+

+

+The BracketFinder (package org.apache.commons.math3.optimization.univariate)

+and PowellOptimizer (package org.apache.commons.math3.optimization.general)

+classes are based on the Python code in module "optimize.py" (version 0.5)

+developed by Travis E. Oliphant for the SciPy library (http://www.scipy.org/)

+Copyright © 2003-2009 SciPy Developers.

+

+SciPy license

+Copyright © 2001, 2002 Enthought, Inc.

+All rights reserved.

+

+Copyright © 2003-2013 SciPy Developers.

+All rights reserved.

+

+Redistribution and use in source and binary forms, with or without

+modification, are permitted provided that the following conditions are met:

+

+    * Redistributions of source code must retain the above copyright

+      notice, this list of conditions and the following disclaimer.

+

+    * Redistributions in binary form must reproduce the above copyright

+      notice, this list of conditions and the following disclaimer in the

+      documentation and/or other materials provided with the distribution.

+

+    * Neither the name of Enthought nor the names of the SciPy Developers may

+      be used to endorse or promote products derived from this software without

+      specific prior written permission.

+

+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY

+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

+DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY

+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES

+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND

+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT

+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS

+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+===============================================================================

+

+This product contains SLF4J, licensed and distributed under the MIT license:

+

+Copyright (c) 2004-2017 QOS.ch

+ All rights reserved.

+

+ Permission is hereby granted, free  of charge, to any person obtaining

+ a  copy  of this  software  and  associated  documentation files  (the

+ "Software"), to  deal in  the Software without  restriction, including

+ without limitation  the rights to  use, copy, modify,  merge, publish,

+ distribute,  sublicense, and/or sell  copies of  the Software,  and to

+ permit persons to whom the Software  is furnished to do so, subject to

+ the following conditions:

+ 

+ The  above  copyright  notice  and  this permission  notice  shall  be

+ included in all copies or substantial portions of the Software.

+ 

+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,

+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF

+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND

+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE

+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION

+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION

+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 

+=======================================================================

+

+SPRING FRAMEWORK 4.3.30.RELEASE SUBCOMPONENTS:

+

+Spring Framework 4.3.30.RELEASE includes a number of subcomponents

+with separate copyright notices and license terms. The product that

+includes this file does not necessarily use all the open source

+subcomponents referred to below. Your use of the source

+code for these subcomponents is subject to the terms and

+conditions of the following licenses.

+

+

+>>> ASM 6.0 (org.ow2.asm:asm:6.0, org.ow2.asm:asm-commons:6.0):

+

+Copyright (c) 2000-2011 INRIA, France Telecom

+All rights reserved.

+

+Redistribution and use in source and binary forms, with or without

+modification, are permitted provided that the following conditions

+are met:

+

+1. Redistributions of source code must retain the above copyright

+   notice, this list of conditions and the following disclaimer.

+

+2. Redistributions in binary form must reproduce the above copyright

+   notice, this list of conditions and the following disclaimer in the

+   documentation and/or other materials provided with the distribution.

+

+3. Neither the name of the copyright holders nor the names of its

+   contributors may be used to endorse or promote products derived from

+   this software without specific prior written permission.

+

+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"

+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE

+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE

+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR

+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF

+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS

+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN

+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)

+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF

+THE POSSIBILITY OF SUCH DAMAGE.

+

+Copyright (c) 1999-2009, OW2 Consortium <https://www.ow2.org/>

+

+

+>>> CGLIB 3.2.6 (cglib:cglib:3.2.6):

+

+Per the LICENSE file in the CGLIB JAR distribution downloaded from

+https://github.com/cglib/cglib/releases/download/RELEASE_3_2_6/cglib-3.2.6.jar,

+CGLIB 3.2.6 is licensed under the Apache License, version 2.0, the text of

+which is included above.

+

+

+>>> Objenesis 2.6 (org.objenesis:objenesis:2.6):

+

+Per the LICENSE file in the Objenesis ZIP distribution downloaded from

+http://objenesis.org/download.html, Objenesis 2.6 is licensed under the

+Apache License, version 2.0, the text of which is included above.

+

+Per the NOTICE file in the Objenesis ZIP distribution downloaded from

+http://objenesis.org/download.html and corresponding to section 4d of the

+Apache License, Version 2.0, in this case for Objenesis:

+

+Objenesis

+Copyright 2006-2017 Joe Walnes, Henri Tremblay, Leonardo Mesquita

+

+

+===============================================================================

+

+To the extent any open source components are licensed under the EPL and/or

+other similar licenses that require the source code and/or modifications to

+source code to be made available (as would be noted above), you may obtain a

+copy of the source code corresponding to the binaries for such open source

+components and modifications thereto, if any, (the "Source Files"), by

+downloading the Source Files from https://spring.io/projects, Pivotal's website

+at https://network.pivotal.io/open-source, or by sending a request, with your

+name and address to: Pivotal Software, Inc., 875 Howard Street, 5th floor, San

+Francisco, CA 94103, Attention: General Counsel. All such requests should

+clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. Pivotal

+can mail a copy of the Source Files to you on a CD or equivalent physical

+medium.

+

+This offer to obtain a copy of the Source Files is valid for three years from

+the date you acquired this Software product. Alternatively, the Source Files

+may accompany the Software.

diff --git a/ruta-ep-engine/src/main/readme_bin/NOTICE b/ruta-ep-engine/src/main/readme_bin/NOTICE
index 1ba86b7..8806bb9 100644
--- a/ruta-ep-engine/src/main/readme_bin/NOTICE
+++ b/ruta-ep-engine/src/main/readme_bin/NOTICE
@@ -9,76 +9,93 @@
 the Universität Würzburg.
 Copyright (c) 2006, 2011 Universität Würzburg.
 
+################################################################################
+
 This product contains htmlparser libraries (http://htmlparser.sourceforge.net/), 
 licensed under the Common Public License.
 
+################################################################################
+
+This product contains Checker Framework qualifiers 
+(Copyright 2004-present by the Checker Framework developers) 
+licensed under the MIT License.
+
+################################################################################
+
+This product contains Apache Commons Collections
+Copyright 2001-2015 The Apache Software Foundation
+
+################################################################################
+
+This product contains Apache Commons IO
+Copyright 2002-2020 The Apache Software Foundation
+
+################################################################################
+
+This product contains Apache Commons Lang
+Copyright 2001-2021 The Apache Software Foundation
+
+################################################################################
+
+This product contains Apache Commons Logging.
 Apache Commons Logging (http://commons.apache.org/proper/commons-logging/):
 This product includes/uses software(s) developed by 'an unknown organization'
   - Unnamed - avalon-framework:avalon-framework:jar:4.1.3
   - Unnamed - log4j:log4j:jar:1.2.12
   - Unnamed - logkit:logkit:jar:1.0.1
 
-This product contains uimaFIT - Core: 
+################################################################################
+
+This product contains Apache Commons Math3.
+Copyright 2001-2016 The Apache Software Foundation
+
+This product includes software developed for Orekit by
+CS Systèmes d'Information (http://www.c-s.fr/)
+Copyright 2010-2012 CS Systèmes d'Information
+
+################################################################################
+
+This product contains Apache Commons Text
+Copyright 2014-2020 The Apache Software Foundation
+
+################################################################################
+
+This product contains Spring Framework 4.3.30.RELEASE
+Copyright (c) 2002-2020 Pivotal, Inc.
+
+This product is licensed to you under the Apache License, Version 2.0
+(the "License"). You may not use this product except in compliance with
+the License.
+
+This product may include a number of subcomponents with separate
+copyright notices and license terms. Your use of the source code for
+these subcomponents is subject to the terms and conditions of the
+subcomponent's license, as noted in the license.txt file.
+
+----------------------------------------------------------------
+
+AnnotationLiteral.java
+
+Licensed under the Apache License, Version 2.0.
+File was copied from the javax.enterprise cdi-api version 1.0.
+
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag.
+
+
+The complete text of licenses and disclaimers associated with the the original
+sources enumerated above at the time of code translation are in the LICENSE file.
+
+################################################################################
+
+This product contains Apache UIMA uimaFIT - Core
+Copyright 2013-2021 The Apache Software Foundation
+
 Copyright 2009-2012 Regents of the University of Colorado.
-All rights reserved,
+All rights reserved.
+
 Copyright 2009-2012 Ubiquitous Knowledge Processing (UKP) Lab.
 Technische Universität Darmstadt.
 All rights reserved.
 
-This product contains Spring Framework 3.1:
-Copyright (c) 2002-2011 SpringSource, a division of VMware, Inc.
-This product may include a number of subcomponents with separate
-copyright notices and license terms. 
-Your use of the source code for the these subcomponents is subject to
-the terms and conditions of the subcomponent's license, as noted in the
-LICENSE file.
-
-This product contains Apache Commons Math (http://commons.apache.org/proper/commons-math/):
-===============================================================================
-The BracketFinder (package org.apache.commons.math3.optimization.univariate)
-and PowellOptimizer (package org.apache.commons.math3.optimization.general)
-classes are based on the Python code in module "optimize.py" (version 0.5)
-developed by Travis E. Oliphant for the SciPy library (http://www.scipy.org/)
-Copyright © 2003-2009 SciPy Developers.
-===============================================================================
-The LinearConstraint, LinearObjectiveFunction, LinearOptimizer,
-RelationShip, SimplexSolver and SimplexTableau classes in package
-org.apache.commons.math3.optimization.linear include software developed by
-Benjamin McCann (http://www.benmccann.com) and distributed with
-the following copyright: Copyright 2009 Google Inc.
-===============================================================================
-This product includes software developed by the
-University of Chicago, as Operator of Argonne National
-Laboratory.
-The LevenbergMarquardtOptimizer class in package
-org.apache.commons.math3.optimization.general includes software
-translated from the lmder, lmpar and qrsolv Fortran routines
-from the Minpack package
-Minpack Copyright Notice (1999) University of Chicago.  All rights reserved
-===============================================================================
-The GraggBulirschStoerIntegrator class in package
-org.apache.commons.math3.ode.nonstiff includes software translated
-from the odex Fortran routine developed by E. Hairer and G. Wanner.
-Original source copyright:
-Copyright (c) 2004, Ernst Hairer
-===============================================================================
-The EigenDecompositionImpl class in package
-org.apache.commons.math3.linear includes software translated
-from some LAPACK Fortran routines.  Original source copyright:
-Copyright (c) 1992-2008 The University of Tennessee.  All rights reserved.
-===============================================================================
-The MersenneTwister class in package org.apache.commons.math3.random
-includes software translated from the 2002-01-26 version of
-the Mersenne-Twister generator written in C by Makoto Matsumoto and Takuji
-Nishimura. Original source copyright:
-Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
-All rights reserved
-===============================================================================
-The LocalizedFormatsTest class in the unit tests is an adapted version of
-the OrekitMessagesTest class from the orekit library distributed under the
-terms of the Apache 2 licence. Original source copyright:
-Copyright 2010 CS Communication & Systèmes
-===============================================================================
-The complete text of licenses and disclaimers associated with the the original
-sources enumerated above at the time of code translation are in the LICENSE.txt
-file.
\ No newline at end of file
diff --git a/ruta-ep-ide-ui/.gitignore b/ruta-ep-ide-ui/.gitignore
index 718773c..7e3a306 100644
--- a/ruta-ep-ide-ui/.gitignore
+++ b/ruta-ep-ide-ui/.gitignore
@@ -1 +1 @@
-META-INF/
+META-INF/
\ No newline at end of file
diff --git a/ruta-ep-ide-ui/pom.xml b/ruta-ep-ide-ui/pom.xml
index 0de71f8..ca8e57b 100644
--- a/ruta-ep-ide-ui/pom.xml
+++ b/ruta-ep-ide-ui/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-ep-ide-ui</artifactId>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

 

@@ -38,9 +36,9 @@
   </properties>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

@@ -196,7 +194,6 @@
     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

     </dependency>

   </dependencies>

 

diff --git a/ruta-ep-ide/.gitignore b/ruta-ep-ide/.gitignore
index 718773c..7e3a306 100644
--- a/ruta-ep-ide/.gitignore
+++ b/ruta-ep-ide/.gitignore
@@ -1 +1 @@
-META-INF/
+META-INF/
\ No newline at end of file
diff --git a/ruta-ep-ide/pom.xml b/ruta-ep-ide/pom.xml
index f7e0401..ff0ac97 100644
--- a/ruta-ep-ide/pom.xml
+++ b/ruta-ep-ide/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-ep-ide</artifactId>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

 

@@ -39,9 +37,9 @@
   </properties>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

@@ -115,13 +113,12 @@
     <dependency>

       <groupId>${eclipseP2RepoId}</groupId>

       <artifactId>org.eclipse.jdt.core</artifactId>

-      <version>[3.16.0,4.0.0)</version>

+      <version>[3.3.0,6.0.0)</version>

       <scope>provided</scope>

     </dependency>

     <dependency>

       <groupId>org.apache.commons</groupId>

       <artifactId>commons-lang3</artifactId>

-      <version>3.1</version>

     </dependency>

   </dependencies>

 

diff --git a/ruta-ep-parent/pom.xml b/ruta-ep-parent/pom.xml
index 9985dc1..56523a6 100644
--- a/ruta-ep-parent/pom.xml
+++ b/ruta-ep-parent/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
 
@@ -45,9 +43,9 @@
     Keeping this a bit factored allows cutting/pasting the <scm>
     element, and just changing the following two properties -->
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
@@ -168,83 +166,6 @@
         <artifactId>org.eclipse.core.contenttype</artifactId>
         <version>[3.7.200,4.0.0)</version>
       </dependency>
-      <!--  
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.core.commands</artifactId>
-        <version>0.11.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.core.di</artifactId>
-        <version>[1.5.0,2.0.0)</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.core.services</artifactId>
-        <version>[2.0.0,3.0.0)</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.bindings</artifactId>
-        <version>0.11.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.di</artifactId>
-        <version>1.1.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.workbench</artifactId>
-        <version>1.3.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.workbench3</artifactId>
-        <version>0.13.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.css.core</artifactId>
-        <version>0.11.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.css.swt</artifactId>
-        <version>0.12.0</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.e4.ui.css.swt</groupId>
-        <artifactId>theme</artifactId>
-        <version>0.10.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.model.workbench</artifactId>
-        <version>[1.1.100,2.0.0)</version>
-      </dependency>
-      <dependency>
-        <groupId>org.eclipse.e4.ui.workbench</groupId>
-        <artifactId>swt</artifactId>
-        <version>0.13.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.workbench.addons.swt</artifactId>
-        <version>[1.2.0,2.0.0)</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.workbench.renderers.swt</artifactId>
-        <version>0.13.0</version>
-      </dependency>
-      <dependency>
-        <groupId>${eclipseP2RepoId}</groupId>
-        <artifactId>org.eclipse.e4.ui.widgets</artifactId>
-        <version>[1.1.0,2.0.0)</version>
-      </dependency>
-      -->
       <dependency>
         <groupId>${eclipseP2RepoId}</groupId>
         <artifactId>org.eclipse.emf.ecore</artifactId>
@@ -298,7 +219,7 @@
       <plugin>
         <groupId>org.openntf.maven</groupId>
         <artifactId>p2-layout-resolver</artifactId>
-        <version>1.2.0</version>
+        <version>1.3.0</version>
         <extensions>true</extensions>
       </plugin>
     </plugins>
@@ -313,5 +234,4 @@
       </plugins>
     </pluginManagement>
   </build>
-
 </project>
diff --git a/ruta-ep-textruler/.gitignore b/ruta-ep-textruler/.gitignore
index 718773c..7e3a306 100644
--- a/ruta-ep-textruler/.gitignore
+++ b/ruta-ep-textruler/.gitignore
@@ -1 +1 @@
-META-INF/
+META-INF/
\ No newline at end of file
diff --git a/ruta-ep-textruler/pom.xml b/ruta-ep-textruler/pom.xml
index 3be7315..b96e67d 100644
--- a/ruta-ep-textruler/pom.xml
+++ b/ruta-ep-textruler/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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">

+<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>

   <artifactId>ruta-ep-textruler</artifactId>

   <parent>

     <groupId>org.apache.uima</groupId>

     <artifactId>ruta-ep-parent</artifactId>

-    <version>2.9.0-SNAPSHOT</version>

+    <version>3.1.1-SNAPSHOT</version>

     <relativePath>../ruta-ep-parent/pom.xml</relativePath>

   </parent>

 

@@ -38,9 +36,9 @@
   </properties>

 

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

diff --git a/ruta-maven-archetype/pom.xml b/ruta-maven-archetype/pom.xml
index dcf9266..d56c6f2 100644
--- a/ruta-maven-archetype/pom.xml
+++ b/ruta-maven-archetype/pom.xml
@@ -17,9 +17,7 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
   <artifactId>ruta-maven-archetype</artifactId>
   <name>Apache UIMA Maven: ${project.artifactId}</name>
@@ -28,7 +26,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
   <properties>
@@ -37,9 +35,9 @@
   <url>${uimaWebsiteUrl}</url>
 
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
diff --git a/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml b/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml
index 55a3da4..3eea8b2 100644
--- a/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml
+++ b/ruta-maven-archetype/src/main/resources/archetype-resources/pom.xml
@@ -35,7 +35,7 @@
 
   <properties>
     <junit-version>4.11</junit-version>
-    <uima-version>2.10.4</uima-version>
+    <uima-version>3.1.1</uima-version>
     <ruta-version>${archetypeVersion}</ruta-version>
   </properties>
 
diff --git a/ruta-maven-plugin/pom.xml b/ruta-maven-plugin/pom.xml
index 887c9ea..756d7b8 100644
--- a/ruta-maven-plugin/pom.xml
+++ b/ruta-maven-plugin/pom.xml
@@ -17,12 +17,10 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
   <!-- This artifact name follows the conventions described http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-custom-plugin.html
-    where patterns like xxx-maven-plugin and maven-xxx-plugin can be invoked just using xxx if the right 
+    where patterns like xxx-maven-plugin and maven-xxx-plugin can be invoked just using xxx if the right
     settings are in place -->
   <artifactId>ruta-maven-plugin</artifactId>
   <packaging>maven-plugin</packaging>
@@ -34,7 +32,7 @@
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
   <properties>
@@ -43,9 +41,9 @@
   <url>${uimaWebsiteUrl}</url>
 
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
@@ -142,7 +140,7 @@
             </execution>
           </executions>
         </plugin>
-        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence 
+        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence
           on the Maven build itself. -->
         <plugin>
           <groupId>org.eclipse.m2e</groupId>
diff --git a/ruta-parent/pom.xml b/ruta-parent/pom.xml
index ff4c852..aa26bdc 100644
--- a/ruta-parent/pom.xml
+++ b/ruta-parent/pom.xml
@@ -17,9 +17,7 @@
   specific language governing permissions and limitations

   under the License.

 -->

-<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/maven-v4_0_0.xsd">

+<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/maven-v4_0_0.xsd">

   <modelVersion>4.0.0</modelVersion>

 

   <parent>

@@ -31,32 +29,30 @@
 

   <artifactId>ruta-parent</artifactId>

   <packaging>pom</packaging>

-  <version>2.9.0-SNAPSHOT</version>

+  <version>3.1.1-SNAPSHOT</version>

   <name>Apache UIMA Ruta: ${project.artifactId}</name>

   <url>${uimaWebsiteUrl}</url>

   <inceptionYear>2011</inceptionYear>

   <description>The common parent pom for the UIMA Ruta</description>

 

-  <!-- Special inheritance note

-    even though the <scm> element that follows is exactly the

-    same as those in super poms, it cannot be inherited because

-    there is some special code that computes the connection elements

-    from the chain of parent poms, if this is omitted.

-

-    Keeping this a bit factored allows cutting/pasting the <scm>

-    element, and just changing the following two properties -->

+  <!-- Special inheritance note even though the <scm> element that follows 

+    is exactly the same as those in super poms, it cannot be inherited because 

+    there is some special code that computes the connection elements from the 

+    chain of parent poms, if this is omitted. Keeping this a bit factored allows 

+    cutting/pasting the <scm> element, and just changing the following two properties -->

   <scm>

-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>

-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>

-    <url>https://github.com/apache/uima-ruta</url>

+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>

+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>

+    <url>https://github.com/apache/uima-ruta/</url>

     <tag>HEAD</tag>

   </scm>

 

-  <!-- The repositories and pluginRepositories section is duplicated from the parent pom one, and adds

-    the Apache Snapshot Nexus repository where UIMA snapshots are deployed. This is needed if for instance,

-    a project depends on some new SNAPSHOT level of a build tool, where the users hasn't checked out 

-    the

-    build tooling. This allows maven to find the snapshots when looking for the parent of this pom -->

+  <!-- The repositories and pluginRepositories section is duplicated from 

+    the parent pom one, and adds the Apache Snapshot Nexus repository where UIMA 

+    snapshots are deployed. This is needed if for instance, a project depends 

+    on some new SNAPSHOT level of a build tool, where the users hasn't checked 

+    out the build tooling. This allows maven to find the snapshots when looking 

+    for the parent of this pom -->

   <repositories>

     <!-- modify central repository access: Turn on checksum checking -->

     <repository>

@@ -107,33 +103,123 @@
   <properties>

     <uniWueNoticeText>Portions of UIMA Ruta were originally developed by

       the Universität Würzburg.

-      Copyright (c) 2006, 2011 Universität Würzburg.</uniWueNoticeText>

+      Copyright (c) 2006, 2011 Universität

+      Würzburg.</uniWueNoticeText>

     <postNoticeText>${uniWueNoticeText}

 

-      This product contains icons developed by Mark James

+      This product contains icons

+      developed by Mark James

       (http://www.famfamfam.com/lab/icons/silk/), licensed under the

       Creative Commons Attribution 3.0 License.

     </postNoticeText>

-    <uimaVersion>2.10.4</uimaVersion>

-    <uimafit-version>2.5.0</uimafit-version>

-    <spring-version>4.3.22.RELEASE</spring-version>

-    <!--

-      BACKWARD_COMPATIBLE_IMPLEMENTER - patch version (=.=.+)

-      BACKWARD_COMPATIBLE_USER - minor version (=.+.0)

-      NON_BACKWARD_COMPATIBLE - major version (+.0.0)

-    -->

 

-    <compat.level>NON_BACKWARD_COMPATIBLE</compat.level>

-    <compat.previous.version>2.6.0</compat.previous.version>

+    <uimaVersion>3.2.0</uimaVersion>

+    <uimafit-version>3.2.0</uimafit-version>

+    <spring-version>4.3.30.RELEASE</spring-version>

+

+    <antlr-version>3.5.2</antlr-version>

+    <htmlparser-version>1.6</htmlparser-version>

+    <commons-collections-version>3.2.2</commons-collections-version>

+    <commons-text-version>1.9</commons-text-version>

+    <commons-lang3-version>3.12.0</commons-lang3-version>

+    <commons-io-version>2.8.0</commons-io-version>

+    <commons-math3-version>3.6.1</commons-math3-version>

+    <commons-logging-version>1.1.1</commons-logging-version>

+    <commons-logging-api-version>1.1</commons-logging-api-version>

+    <caffeine-version>2.8.3</caffeine-version>

+    <!-- BACKWARD_COMPATIBLE_IMPLEMENTER - patch version (=.=.+) BACKWARD_COMPATIBLE_USER 

+      - minor version (=.+.0) NON_BACKWARD_COMPATIBLE - major version (+.0.0) -->

+

+    <compat.level>BACKWARD_COMPATIBLE_USER</compat.level>

+    <compat.previous.version>3.0.1</compat.previous.version>

+

     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

     <maven.compiler.target>1.8</maven.compiler.target>

     <maven.compiler.source>1.8</maven.compiler.source>

-    <api_check_oldVersion>2.6.1</api_check_oldVersion>

+

+    <api_check_oldVersion>3.0.1</api_check_oldVersion>

   </properties>

 

   <dependencyManagement>

     <dependencies>

       <dependency>

+        <groupId>org.antlr</groupId>

+        <artifactId>antlr-runtime</artifactId>

+        <version>${antlr-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.htmlparser</groupId>

+        <artifactId>htmlparser</artifactId>

+        <version>${htmlparser-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>commons-collections</groupId>

+        <artifactId>commons-collections</artifactId>

+        <version>${commons-collections-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.apache.commons</groupId>

+        <artifactId>commons-text</artifactId>

+        <version>${commons-text-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.apache.commons</groupId>

+        <artifactId>commons-lang3</artifactId>

+        <version>${commons-lang3-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.apache.uima</groupId>

+        <artifactId>uimafit-core</artifactId>

+        <version>${uimafit-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>commons-io</groupId>

+        <artifactId>commons-io</artifactId>

+        <version>${commons-io-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.apache.commons</groupId>

+        <artifactId>commons-math3</artifactId>

+        <version>${commons-math3-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>commons-logging</groupId>

+        <artifactId>commons-logging</artifactId>

+        <version>${commons-logging-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>commons-logging</groupId>

+        <artifactId>commons-logging-api</artifactId>

+        <version>${commons-logging-api-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.springframework</groupId>

+        <artifactId>spring-core</artifactId>

+        <version>${spring-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.springframework</groupId>

+        <artifactId>spring-context</artifactId>

+        <version>${spring-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.springframework</groupId>

+        <artifactId>spring-expression</artifactId>

+        <version>${spring-version}</version>

+      </dependency>

+      <dependency>

+        <groupId>org.springframework</groupId>

+        <artifactId>spring-beans</artifactId>

+        <version>${spring-version}</version>

+      </dependency>

+

+      <dependency>

+        <groupId>com.github.ben-manes.caffeine</groupId>

+        <artifactId>caffeine</artifactId>

+        <version>${caffeine-version}</version>

+      </dependency>

+

+      <dependency>

         <groupId>junit</groupId>

         <artifactId>junit</artifactId>

         <version>4.12</version>

diff --git a/ruta-typesystem/pom.xml b/ruta-typesystem/pom.xml
index 8e64cbc..9213a19 100644
--- a/ruta-typesystem/pom.xml
+++ b/ruta-typesystem/pom.xml
@@ -17,15 +17,13 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<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">
+<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>
   <artifactId>ruta-typesystem</artifactId>
   <parent>
     <groupId>org.apache.uima</groupId>
     <artifactId>ruta-parent</artifactId>
-    <version>2.9.0-SNAPSHOT</version>
+    <version>3.1.1-SNAPSHOT</version>
     <relativePath>../ruta-parent/pom.xml</relativePath>
   </parent>
 
@@ -38,9 +36,9 @@
   </properties>
 
   <scm>
-    <connection>scm:git:git://github.com/apache/uima-ruta</connection>
-    <developerConnection>scm:git:git@github.com:apache/uima-ruta.git</developerConnection>
-    <url>https://github.com/apache/uima-ruta</url>
+    <connection>scm:git:https://github.com/apache/uima-ruta/</connection>
+    <developerConnection>scm:git:https://github.com/apache/uima-ruta/</developerConnection>
+    <url>https://github.com/apache/uima-ruta/</url>
     <tag>HEAD</tag>
   </scm>
 
diff --git a/ruta-typesystem/src/main/resources/org/apache/uima/ruta/engine/RutaInternalTypeSystem.xml b/ruta-typesystem/src/main/resources/org/apache/uima/ruta/engine/RutaInternalTypeSystem.xml
index 902077f..dd6e351 100644
--- a/ruta-typesystem/src/main/resources/org/apache/uima/ruta/engine/RutaInternalTypeSystem.xml
+++ b/ruta-typesystem/src/main/resources/org/apache/uima/ruta/engine/RutaInternalTypeSystem.xml
@@ -295,9 +295,14 @@
       <features>
         <featureDescription>
           <name>original</name>
-          <description/>
+          <description>The annotation that caused this outcome.</description>
           <rangeTypeName>uima.tcas.Annotation</rangeTypeName>
         </featureDescription>
+        <featureDescription>
+          <name>group</name>
+          <description>Identifier for the group of annotations and types in the evaluation.</description>
+          <rangeTypeName>uima.cas.String</rangeTypeName>
+        </featureDescription>
       </features>
     </typeDescription>
     <typeDescription>