Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsAndEndsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsAndEndsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsAndEndsWithEventTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -46,5 +46,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).endsWith(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).containsEvent(TEXT_INPUT).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -66,5 +66,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).containsEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsEventTest.java	(revision 1218)
@@ -15,7 +15,7 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -45,5 +45,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).containsEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -64,5 +64,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).containsEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsPatternTest.java	(revision 1218)
@@ -15,7 +15,7 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.contains;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -50,7 +50,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern containsPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(TEXT_INPUT).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).contains(containsPattern).build();
+        InteractionPattern containsPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).containsPattern(containsPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -79,5 +78,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).containsEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithEventTest.java	(revision 1218)
@@ -15,6 +15,6 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.endswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -52,5 +52,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -83,5 +83,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithPatternTest.java	(revision 1218)
@@ -15,9 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.endswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -60,7 +60,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -98,7 +97,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).contains(TEXT_INPUT).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).containsEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventAndContainsEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventAndContainsEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventAndContainsEventTest.java	(revision 1218)
@@ -15,7 +15,7 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -52,5 +52,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -83,5 +83,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -52,5 +52,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -76,5 +76,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(ITERATION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternAndContainsPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternAndContainsPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternAndContainsPatternTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -55,9 +55,8 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build();
-        InteractionPattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containedPattern).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -84,9 +83,8 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build();
-        InteractionPattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containedPattern).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternTest.java	(revision 1218)
@@ -15,9 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -59,8 +59,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build();
-        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(endsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -90,8 +89,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build();
-        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithPattern(endsWithPattern).endsWithPattern(startsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsEventTest.java	(revision 1218)
@@ -15,7 +15,7 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -51,5 +51,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -82,5 +82,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsPatternTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -57,7 +57,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -93,7 +92,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndEndsWithPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndEndsWithPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndEndsWithPatternTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -50,7 +50,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -72,7 +71,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsEventEndsWithPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsEventEndsWithPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsEventEndsWithPatternTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -50,7 +50,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -72,7 +71,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithEventTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -60,7 +60,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build();
+        InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsPattern(containedPattern).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -92,7 +91,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build();
+        InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsPattern(containedPattern).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithPatternTest.java	(revision 1218)
@@ -15,9 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -61,8 +61,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(endsWithPattern).build();
+        InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsPattern(containedPattern).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -91,7 +90,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventTest.java	(revision 1218)
@@ -15,6 +15,6 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -39,5 +39,5 @@
         // Given
         String spec = "UserSession {" +
-        		      "  Selection sel1 {" +
+                      "  Selection sel1 {" +
                       "    EventTask target1 {}" +
                       "  }" +
@@ -50,5 +50,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -61,5 +61,5 @@
         // Given
         String spec = "UserSession {" +
-        		      "  Iteration iter1 {" +
+        	      "  Iteration iter1 {" +
                       "    Selection sel1 {" +
                       "      EventTask target2 {}" +
@@ -71,5 +71,5 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsEventTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -54,7 +54,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -79,7 +78,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(TEXT_INPUT).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsPatternTest.java	(revision 1218)
@@ -15,9 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -62,8 +62,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build();
-        InteractionPattern containedPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern containedPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containedPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -96,8 +95,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build();
-        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).containsEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithPattern(endsWithPattern).endsWithPattern(startsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndEndsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndEndsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndEndsWithEventTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -59,7 +59,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -90,7 +89,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithEventTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -59,7 +59,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -90,7 +89,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithPatternTest.java	(revision 1218)
@@ -15,9 +15,9 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.SCROLL;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.SCROLL;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -72,8 +72,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(endsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(MOUSE_CLICK).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -116,8 +115,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(SCROLL).endsWith(endsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern endsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsEvent(SCROLL).endsWithPattern(endsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsPatternAndEndsWithEventTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsPatternAndEndsWithEventTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsPatternAndEndsWithEventTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SELECTION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -62,8 +62,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern containsPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containsPattern).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -97,8 +96,7 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build();
-        InteractionPattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SELECTION).startsWithEvent(TEXT_INPUT).endsWithEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern containsPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).containsPattern(containsPattern).endsWithEvent(TEXT_INPUT).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
Index: trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternTest.java
===================================================================
--- trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternTest.java	(revision 1205)
+++ trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternTest.java	(revision 1218)
@@ -15,8 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns.visitors.startswith;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.MOUSE_CLICK;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
 import static org.fest.assertions.api.Assertions.assertThat;
 
@@ -57,7 +57,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(TEXT_INPUT).containsEvent(MOUSE_CLICK).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
@@ -86,7 +85,6 @@
                       "}";
         ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec);
-        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder();
-        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build();
-        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build();
+        InteractionPattern startsWithPattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK).endsWithEvent(TEXT_INPUT).patternFinished().build();
+        InteractionPattern pattern = InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithPattern(startsWithPattern).patternFinished().build();
         // When
         boolean patternContained = pattern.containedIn(taskTree);
