Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java	(revision 1890)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeifc/ITaskInfo.java	(revision 1891)
@@ -56,18 +56,4 @@
     /**
      * <p>
-     * returns the value of the measure identified through the given metric if the task is
-     * observed in the given context, i.e. parent task. The result is Integer.MIN_VALUE if there
-     * is no value for this measure in a context.
-     * </p>
-     *
-     * @param metric  the metric for which the value is to be returned
-     * @param context the context for which the measure value is to be returned
-     * 
-     * @return as described
-     */
-    public int getMeasureValue(TaskMetric metric, ITask context);
-
-    /**
-     * <p>
      * represents a measure for a specific metric
      * </p>
@@ -95,14 +81,4 @@
         public int getValue();
         
-        /**
-         * <p>
-         * returns the value of the measure if the task was observed in a specific context, i.e.
-         * parent task
-         * </p>
-         * 
-         * @return as described
-         */
-        public int getValue(ITask context);
-        
     }
 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java	(revision 1890)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInfo.java	(revision 1891)
@@ -16,5 +16,4 @@
 
 import java.util.ArrayList;
-import java.util.HashMap;
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
@@ -89,18 +88,4 @@
 
     /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInfo#getMeasureValue(java.lang.String, de.ugoe.cs.autoquest.tasktrees.treeifc.ITask)
-     */
-    @Override
-    public int getMeasureValue(TaskMetric metric, ITask context) {
-        Measure measure = getMeasure(metric);
-        
-        if (measure == null) {
-            throw new IllegalArgumentException("unknown metric " + metric);
-        }
-        
-        return measure.getValue(context);
-    }
-
-    /* (non-Javadoc)
      * @see java.lang.Object#toString()
      */
@@ -112,5 +97,5 @@
     /**
      * <p>
-     * must be called to indicate that a new new measures for the provided metric are about to
+     * must be called to indicate that new measures for the provided metric are about to
      * be calculated and added.
      * </p>
@@ -131,12 +116,11 @@
     /**
      * <p>
-     * sets a specific value for a measure of a specific metric in the provided context of the task
+     * sets a specific value for a measure of a specific metric
      * </p>
      * 
      * @param metric  the metric to which the value belongs
-     * @param context the context of the task in which the measure was recorded
      * @param value   the value of the measure
      */
-    void setCount(TaskMetric metric, ITask context, int value) {
+    void setCount(TaskMetric metric, int value) {
         Measure measure = getMeasure(metric);
         
@@ -146,18 +130,16 @@
         }
         
-        measure.set(context, value);
-    }
-
-    /**
-     * <p>
-     * increases a specific value for a measure of a specific metric in the provided context of the
-     * task
+        measure.set(value);
+    }
+
+    /**
+     * <p>
+     * increases a specific value for a measure of a specific metric
      * </p>
      * 
      * @param metric    the metric to which the value belongs
-     * @param context   the context of the task in which the measure was recorded
      * @param increment the increment to be added to the value of the measure
      */
-    void increaseCount(TaskMetric metric, ITask context, int increment) {
+    void increaseCount(TaskMetric metric, int increment) {
         Measure measure = getMeasure(metric);
         
@@ -167,5 +149,5 @@
         }
         
-        measure.increase(context, increment);
+        measure.increase(increment);
     }
 
@@ -204,15 +186,8 @@
         /**
          * <p>
-         * the observed values for the difference contexts of the task
-         * </p>
-         */
-        private HashMap<ITask, Integer> values;
-        
-        /**
-         * <p>
-         * the context free value of the measure independent of the task context
-         * </p>
-         */
-        private int contextFreeValue = 0;
+         * the value of the measure independent
+         * </p>
+         */
+        private int value = 0;
         
         /**
@@ -239,62 +214,23 @@
         @Override
         public int getValue() {
-            return contextFreeValue;
-        }
-
-        /* (non-Javadoc)
-         * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskInfo.IMeasure#getValue(de.ugoe.cs.autoquest.tasktrees.treeifc.ITask)
-         */
-        @Override
-        public int getValue(ITask context) {
-            if ((context != null) && (values != null)) {
-                Integer currentValue = values.get(context);
-                
-                if (currentValue != null) {
-                    return currentValue;
-                }
-            }
-            
-            return Integer.MIN_VALUE;
-        }
-
-        /**
-         * <p>
-         * sets the value of the measure context free as well as specific to the provided context
-         * </p>
-         */
-        private void set(ITask context, int value) {
-            contextFreeValue = value;
-            
-            if (context != null) {
-                if (values == null) {
-                    values = new HashMap<ITask, Integer>();
-                }
-                
-                values.put(context, value);
-            }
-        }
-
-        /**
-         * <p>
-         * increases the value of the measure context free as well as specific to the provided
-         * context according to the provided increment
-         * </p>
-         */
-        private void increase(ITask context, int increment) {
-            contextFreeValue += increment;
-            
-            if (context != null) {
-                if (values == null) {
-                    values = new HashMap<ITask, Integer>();
-                }
-                
-                Integer currentValue = values.get(context);
-                
-                if (currentValue == null) {
-                    currentValue = 0;
-                }
-                
-                values.put(context, currentValue + increment);
-            }
+            return value;
+        }
+
+        /**
+         * <p>
+         * sets the value of the measure
+         * </p>
+         */
+        private void set(int newValue) {
+            value = newValue;
+        }
+
+        /**
+         * <p>
+         * increases the value of the measure
+         * </p>
+         */
+        private void increase(int increment) {
+            value += increment;
         }
 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java	(revision 1890)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskInstance.java	(revision 1891)
@@ -102,5 +102,6 @@
         // task instances are only equal if they are identical or if they have the same id
         // (may happen, if they are cloned)
-        return (this == taskInstance) || (this.hashCode() == taskInstance.hashCode());
+        return (this == taskInstance) ||
+            ((taskInstance != null) && (this.hashCode() == taskInstance.hashCode()));
     }
 
Index: /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java
===================================================================
--- /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java	(revision 1890)
+++ /trunk/autoquest-core-tasktrees/src/main/java/de/ugoe/cs/autoquest/tasktrees/treeimpl/TaskModel.java	(revision 1891)
@@ -146,4 +146,13 @@
     }
 
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    @Override
+    public String toString() {
+        return "Task Model (" + userSessions.size() + " sessions, " + index.taskMap.size() +
+            " tasks, hash " + System.identityHashCode(this) + ")";
+    }
+
     /**
      * <p>
@@ -158,5 +167,5 @@
             for (IUserSession session : this.userSessions) {
                 for (ITaskInstance taskInstance : session) {
-                    index.handleTaskInstance(taskInstance, null);
+                    index.handleTaskInstance(taskInstance);
                 }
             }
@@ -187,5 +196,5 @@
                 
                 eventCoverageRatios[i++] = coverageRatio;
-                info.setCount(TaskMetric.EVENT_COVERAGE_RATIO, null, coverageRatio);
+                info.setCount(TaskMetric.EVENT_COVERAGE_RATIO, coverageRatio);
             }
             
@@ -201,5 +210,5 @@
                 quantile = 1000 * quantile / eventCoverageRatios.length;
                 
-                info.setCount(TaskMetric.EVENT_COVERAGE_QUANTILE, null, quantile);
+                info.setCount(TaskMetric.EVENT_COVERAGE_QUANTILE, quantile);
             }
             
@@ -242,5 +251,5 @@
          * </p>
          */
-        private int[] handleTaskInstance(ITaskInstance taskInstance, ITask context) {
+        private int[] handleTaskInstance(ITaskInstance taskInstance) {
             int eventTaskInstancesCovered = 0;
             int depth = 0;
@@ -248,5 +257,5 @@
             if (taskInstance instanceof ITaskInstanceList) {
                 for (ITaskInstance child : (ITaskInstanceList) taskInstance) {
-                    int[] measures = handleTaskInstance(child, taskInstance.getTask());
+                    int[] measures = handleTaskInstance(child);
                     eventTaskInstancesCovered += measures[0];
                     depth = Math.max(depth, measures[1]);
@@ -257,10 +266,10 @@
                 {
                     // ensure also empty task infos for unselected variants
-                    ensureTaskInfo(((IIteration) taskInstance.getTask()).getMarkedTask(), context);
+                    ensureTaskInfo(((IIteration) taskInstance.getTask()).getMarkedTask());
                 }
             }
             else if (taskInstance instanceof ISelectionInstance) {
                 ITaskInstance child = ((ISelectionInstance) taskInstance).getChild();
-                int[] measures = handleTaskInstance(child, taskInstance.getTask());
+                int[] measures = handleTaskInstance(child);
                 eventTaskInstancesCovered += measures[0];
                 depth = Math.max(depth, measures[1]);
@@ -268,5 +277,5 @@
                 // ensure also empty task infos for unselected variants
                 for (ITask otherChildTask : ((ISelection) taskInstance.getTask()).getChildren()) {
-                    ensureTaskInfo(otherChildTask, context);
+                    ensureTaskInfo(otherChildTask);
                 }
             }
@@ -274,5 +283,5 @@
                 ITaskInstance child = ((IOptionalInstance) taskInstance).getChild();
                 if (child != null) {
-                    int[] measures = handleTaskInstance(child, taskInstance.getTask());
+                    int[] measures = handleTaskInstance(child);
                     eventTaskInstancesCovered += measures[0];
                     depth = Math.max(depth, measures[1]);
@@ -280,5 +289,5 @@
                 else {
                     // ensure also empty task infos for unselected variants
-                    ensureTaskInfo(((IOptional) taskInstance.getTask()).getMarkedTask(), context);
+                    ensureTaskInfo(((IOptional) taskInstance.getTask()).getMarkedTask());
                 }
             }
@@ -289,5 +298,5 @@
             depth++;
             
-            ensureTaskInfo(taskInstance.getTask(), context, eventTaskInstancesCovered, depth);
+            ensureTaskInfo(taskInstance.getTask(), eventTaskInstancesCovered, depth);
             
             return new int[] { eventTaskInstancesCovered, depth };
@@ -299,14 +308,14 @@
          * </p>
          */
-        private void ensureTaskInfo(ITask task, ITask context) {
-            ensureTaskInfo(task, context, 0, 0);
+        private void ensureTaskInfo(ITask task) {
+            ensureTaskInfo(task, 0, 0);
             
             if (task instanceof IStructuringTemporalRelationship) {
                 for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) {
-                    ensureTaskInfo(child, task);
+                    ensureTaskInfo(child);
                 }
             }
             else if (task instanceof IMarkingTemporalRelationship) {
-                ensureTaskInfo(((IMarkingTemporalRelationship) task).getMarkedTask(), task);
+                ensureTaskInfo(((IMarkingTemporalRelationship) task).getMarkedTask());
             }
         
@@ -322,5 +331,4 @@
          */
         private void ensureTaskInfo(ITask task,
-                                    ITask context,
                                     int   eventTaskInstancesCovered,
                                     int   depth)
@@ -335,11 +343,11 @@
                 taskMap.put(task, taskInfo);
                 
-                taskInfo.setCount(TaskMetric.DEPTH, null, getDepth(task));
-            }
-
-            taskInfo.increaseCount(TaskMetric.COUNT, context, 1);
-            taskInfo.increaseCount(TaskMetric.EVENT_COVERAGE, context, eventTaskInstancesCovered);
-
-            taskInfo.setCount(TaskMetric.DEPTH, context, depth);
+                taskInfo.setCount(TaskMetric.DEPTH, getDepth(task));
+            }
+
+            taskInfo.increaseCount(TaskMetric.COUNT, 1);
+            taskInfo.increaseCount(TaskMetric.EVENT_COVERAGE, eventTaskInstancesCovered);
+
+            taskInfo.setCount(TaskMetric.DEPTH, depth);
         }
 
