Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/CMDperformUsabilityEvaluation.java	(revision 1217)
@@ -21,5 +21,5 @@
 import de.ugoe.cs.autoquest.CommandHelpers;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.rules.EmptyRuleset;
+import de.ugoe.cs.autoquest.usability.rules.PatternRuleset;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityResult;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityRuleset;
@@ -29,5 +29,5 @@
 /**
  * <p>
- * TODO comment
+ * Command to perform a automatic usability evaluation for a given task model.
  * </p>
  * 
@@ -36,13 +36,29 @@
 public class CMDperformUsabilityEvaluation implements Command {
 
+    /**
+     * <p>
+     * index for name of task model under which it could be retrieved from
+     * {@link GlobalDataContainer}
+     * </p>
+     */
     private final int taskModelParamaterIndex = 0;
-    
+
+    /**
+     * <p>
+     * index for name under which evaluation result should be stored in {@link GlobalDataContainer}
+     * </p>
+     */
     private final int evaluationResultParameterIndex = 1;
-    
+
+    /**
+     * <p>
+     * default name for evaluation result, which is used to store it in {@link GlobalDataContainer}
+     * </p>
+     */
     private final String defaultEvaluationResultParameterName = "usabilityEvaluationResult";
-    
-    private final UsabilityRuleset defaultUsabilityRuleset = new EmptyRuleset();
-    
-    /* (non-Javadoc)
+
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.util.console.Command#run(java.util.List)
      */
@@ -52,24 +68,25 @@
         Optional<ITaskModel> taskModel = getTaskModelFromDataContainer(nameOfTaskModel);
         if (taskModel.isPresent()) {
-            UsabilityRuleset ruleset = getUsabilityRuleset();
+            UsabilityRuleset ruleset = new PatternRuleset(taskModel.get());
             UsabilityResult result = UsabilityEvaluator.evaluate(taskModel.get()).using(ruleset);
             String evaluationResultParameterName = getEvaluationResultParameter(parameters);
             storeUsabilityResultInDataContainer(evaluationResultParameterName, result);
         }
-        return;
     }
 
     /**
      * <p>
-     * TODO: comment
+     * Gets name of task model from list of parameters.
      * </p>
-     *
+     * 
      * @param parameters
-     * @return
+     *            parameters for the command
+     * @return name of task model
      */
     private String getTaskModelParameter(List<Object> parameters) {
         try {
             return (String) parameters.get(taskModelParamaterIndex);
-        } catch (Exception e) {
+        }
+        catch (Exception e) {
             throw new IllegalArgumentException("must provide a task model name");
         }
@@ -78,32 +95,37 @@
     /**
      * <p>
-     * TODO: comment
+     * Gets name under which evaluation result should be stored in {@link GlobalDataContainer} from
+     * list of parameters. If not present, the default value {@code usabilityEvaluationResult} is
+     * used!
      * </p>
-     *
+     * 
      * @param parameters
-     * @return
+     *            parameters for the command
+     * @return name under which evaluation result should be stored
      */
     private String getEvaluationResultParameter(List<Object> parameters) {
-        if(parameters.size() == 2) {
+        if (parameters.size() == 2) {
             return (String) parameters.get(evaluationResultParameterIndex);
         }
         return defaultEvaluationResultParameterName;
     }
-    
+
     /**
      * <p>
-     * TODO: comment
+     * Retrieves task model from {@link GlobalDataContainer}.
      * </p>
-     *
+     * 
      * @param nameOfTaskModel
-     * @return
+     *            name of task model, under which it is stored in {@link GlobalDataContainer}
+     * @return if present, task model
      */
     private Optional<ITaskModel> getTaskModelFromDataContainer(String nameOfTaskModel) {
         Object dataObject = GlobalDataContainer.getInstance().getData(nameOfTaskModel);
-        if(dataObject != null) {
-            if(dataObject instanceof ITaskModel) {
+        if (dataObject != null) {
+            if (dataObject instanceof ITaskModel) {
                 ITaskModel taskModel = (ITaskModel) dataObject;
                 return Optional.of(taskModel);
-            } else {
+            }
+            else {
                 CommandHelpers.objectNotType(nameOfTaskModel, "ITaskModel");
                 return Optional.absent();
@@ -113,32 +135,25 @@
         return Optional.absent();
     }
-    
+
     /**
      * <p>
-     * TODO: comment
+     * Stores usability evaluation in {@link GlobalDataContainer}.
      * </p>
-     *
-     * @return
+     * 
+     * @param evaluationResultParameterName
+     *            name under which usability result should be stored in {@link GlobalDataContainer}
+     * 
      */
-    private UsabilityRuleset getUsabilityRuleset() {
-        // TODO Auto-generated method stub
-        System.out.println("TODO: implement CMDperformUsabilityEvaluation.getUsabilityRuleset ");
-        return this.defaultUsabilityRuleset;
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * @param evaluationResultParameterName 
-     *
-     */
-    private void storeUsabilityResultInDataContainer(String evaluationResultParameterName, UsabilityResult result) {
+    private void storeUsabilityResultInDataContainer(String evaluationResultParameterName,
+                                                     UsabilityResult result)
+    {
         if (GlobalDataContainer.getInstance().addData(evaluationResultParameterName, result)) {
             CommandHelpers.dataOverwritten(evaluationResultParameterName);
-        }   
+        }
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.util.console.Command#help()
      */
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/EvaluationMethodCaller.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/EvaluationMethodCaller.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/EvaluationMethodCaller.java	(revision 1217)
@@ -17,11 +17,11 @@
 import com.google.common.base.Optional;
 
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityMetric;
-import de.ugoe.cs.autoquest.usability.rules.UsabilityUsageDefect;
+import de.ugoe.cs.autoquest.usability.rules.UsabilityUsageProblem;
 
 /**
  * <p>
- * TODO comment
+ * Helper class, which calls the evaluation method depending on the type of the usability rule.
  * </p>
  * 
@@ -29,11 +29,31 @@
  */
 public class EvaluationMethodCaller {
-    
-    public Optional<UsabilityDefect> check(UsabilityMetric metric) {
+
+    /**
+     * 
+     * <p>
+     * Calls evaluation method of a usability metric.
+     * </p>
+     * 
+     * @param metric
+     *            on which evaluation method should be called
+     * @return description of metric/defect, iff metric exceeds predefined threshold
+     */
+    public Optional<UsabilityProblemDescription> check(UsabilityMetric metric) {
         return metric.calculate();
     }
-    
-    public Optional<UsabilityDefect> check(UsabilityUsageDefect pattern) {
-        return pattern.check();
+
+    /**
+     * 
+     * <p>
+     * Calls evaluation method of a usability usage defect.
+     * </p>
+     * 
+     * @param usageDefect
+     *            on which evaluation method should be called
+     * @return description of usage defect, iff it was detected during the usability evaluation
+     */
+    public Optional<UsabilityProblemDescription> check(UsabilityUsageProblem usageDefect) {
+        return usageDefect.check();
     }
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluator.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluator.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluator.java	(revision 1217)
@@ -20,5 +20,5 @@
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityResult;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityRule;
@@ -28,5 +28,6 @@
 /**
  * <p>
- * TODO comment
+ * The usability evaluator is responsible for performing a usability evaluation on a task model.
+ * Therefore he uses a {@link UsabilityRuleset}.
  * </p>
  * 
@@ -34,30 +35,37 @@
  */
 public class UsabilityEvaluator {
-    
+
+    /**
+     * <p>
+     * The task model, which should be evaluated.
+     * </p>
+     */
     private ITaskModel taskModel;
 
-    private UsabilityEvaluator(ITaskModel taskTree) {
-        this.taskModel = taskTree;
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param taskTree
-     * @return
-     */
-    public static UsabilityEvaluator evaluate(ITaskModel taskTree) {
-        return new UsabilityEvaluator(taskTree);
+    private UsabilityEvaluator(ITaskModel taskModel) {
+        this.taskModel = taskModel;
     }
 
     /**
      * <p>
-     * TODO: comment
+     * Creates and initializes a new instance.
      * </p>
-     *
-     * @param object
-     * @return
+     * 
+     * @param taskModel
+     *            task model, which is subject of usability evaluation
+     * @return instance of {@link UsabilityEvaluator}
+     */
+    public static UsabilityEvaluator evaluate(ITaskModel taskModel) {
+        return new UsabilityEvaluator(taskModel);
+    }
+
+    /**
+     * <p>
+     * Starts usability evaluation, using given {@link UsabilityRuleset}.
+     * </p>
+     * 
+     * @param ruleset
+     *            {@link UsabilityRuleset} used for usability evaluation
+     * @return result of usability evaluation as {@link UsabilityResult}
      */
     public UsabilityResult using(UsabilityRuleset ruleset) {
@@ -65,8 +73,9 @@
         EvaluationMethodCaller evaluationMethodCaller = new EvaluationMethodCaller();
         UsabilityResult result = new UsabilityResult();
-        for(UsabilityRule rule : ruleset.evaluationRules()) {
-            Optional<UsabilityDefect> defect = rule.callEvaluationMethod(evaluationMethodCaller);
-            if(defect.isPresent()) {
-                result.addDefect(defect.get());
+        for (UsabilityRule rule : ruleset.evaluationRules()) {
+            Optional<UsabilityProblemDescription> defect =
+                rule.callEvaluationMethod(evaluationMethodCaller);
+            if (defect.isPresent()) {
+                result.addProblem(defect.get());
             }
         }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/DefectDescriptionResolver.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/DefectDescriptionResolver.java	(revision 1213)
+++ 	(revision )
@@ -1,208 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.usability.result;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.EnumMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import jodd.props.Props;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Maps;
-
-import de.ugoe.cs.util.console.Console;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class DefectDescriptionResolver {
-
-    private final String defectDescriptionFile = "defects.props";
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @param name
-     * @return
-     */
-    public UsabilityDefect descriptionFor(String usabilityRuleName) {
-        Props allProperties = initProperties();
-        Map<String, String> usabilityRuleProperties =
-            allUsabilityRuleProperties(allProperties, usabilityRuleName);
-        return createUsabilityDefect(usabilityRuleProperties);
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @return
-     */
-    private Props initProperties() {
-        Optional<File> defectDescriptionFile = getDefectDescriptionFile();
-        Props props = new Props();
-        props.setEscapeNewLineValue("\n");
-        props.setValueTrimLeft(true);
-        if (defectDescriptionFile.isPresent()) {
-            loadProperties(defectDescriptionFile, props);
-        }
-        return props;
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @return
-     */
-    private Optional<File> getDefectDescriptionFile() {
-        try {
-            return Optional.fromNullable(new File(ClassLoader
-                .getSystemResource(defectDescriptionFile).toURI()));
-        }
-        catch (URISyntaxException e) {
-            Console.printerr("Error while loading defect description file.");
-            Console.logException(e);
-            return Optional.absent();
-        }
-    }
-
-    private void loadProperties(Optional<File> defectDescriptionFile, Props props) {
-        try {
-            props.load(defectDescriptionFile.get());
-        }
-        catch (IOException e) {
-            Console.logException(e);
-        }
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @return
-     */
-    private Map<String, String> allUsabilityRuleProperties(Props allProperties,
-                                                                   String usabilityRuleName)
-    {
-        Map<String, String> usabilityRuleProperties = Maps.newHashMap();
-        allProperties.extractSubProps(usabilityRuleProperties, usabilityRuleName + ".*");
-        return usabilityRuleProperties;
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @param usabilityRuleProperties
-     * @return
-     */
-    private UsabilityDefect createUsabilityDefect(Map<String, String> usabilityRuleProperties) {
-        String description =
-            Iterables.getOnlyElement(Maps.filterKeys(usabilityRuleProperties, descriptionProperty()).values());
-        EnumMap<UsabilityDefectSeverityLevel, Double> severity =
-            getSeverityMap(usabilityRuleProperties);
-        return new UsabilityDefect(description, severity);
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @return
-     */
-    private Predicate<String> descriptionProperty() {
-        return new Predicate<String>() {
-
-            public boolean apply(String key) {
-                return key.endsWith("description");
-            }
-
-        };
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @param usabilityRuleProperties
-     * @return
-     */
-    private EnumMap<UsabilityDefectSeverityLevel, Double> getSeverityMap(Map<String, String> usabilityRuleProperties)
-    {
-        EnumMap<UsabilityDefectSeverityLevel, Double> severityMap =
-            Maps.newEnumMap(UsabilityDefectSeverityLevel.class);
-        Map<String, String> allSeverityProperties =
-            Maps.filterEntries(usabilityRuleProperties, allSeverityProperties());
-        for (Entry<String, String> severityProperty : allSeverityProperties.entrySet()) {
-            UsabilityDefectSeverityLevel severityLevel =
-                getSeverityLevel(severityProperty.getKey());
-            Double rule = Double.valueOf(severityProperty.getValue());
-            severityMap.put(severityLevel, rule);
-        }
-        return severityMap;
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @param key
-     * @return
-     */
-    private UsabilityDefectSeverityLevel getSeverityLevel(String severityProperty) {
-        int startSeverityLevel = severityProperty.lastIndexOf(".") + 1;
-        String severitLevelIdentifier =
-            severityProperty.substring(startSeverityLevel).toUpperCase();
-        return UsabilityDefectSeverityLevel.valueOf(severitLevelIdentifier);
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * 
-     * @return
-     */
-    private Predicate<Entry<String, String>> allSeverityProperties() {
-        return new Predicate<Map.Entry<String, String>>() {
-
-            public boolean apply(Map.Entry<String, String> entry) {
-                return entry.getKey().contains("severity");
-            }
-
-        };
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityDefect.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityDefect.java	(revision 1213)
+++ 	(revision )
@@ -1,121 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.usability.result;
-
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.Map;
-
-import com.google.common.base.Optional;
-import com.google.common.base.Predicate;
-import com.google.common.collect.BiMap;
-import com.google.common.collect.HashBiMap;
-import com.google.common.collect.Maps;
-
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class UsabilityDefect {
-
-    private UsabilityDefectSeverityLevel severityLevel = UsabilityDefectSeverityLevel.NONE;
-    
-    private String description;
-    
-    private final EnumMap<UsabilityDefectSeverityLevel, Double> severity;
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param description
-     * @param severity
-     */
-    public UsabilityDefect(String description,
-                           EnumMap<UsabilityDefectSeverityLevel, Double> severity)
-    {
-        this.description = description;
-        this.severity = severity;
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
-     */
-    public UsabilityDefectSeverityLevel getSeverityLevel() {
-        return this.severityLevel;
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param evaluationMetric
-     * @return
-     */
-    public Optional<UsabilityDefect> isPresent(float evaluationMetric) {
-        Optional<UsabilityDefect> defect = Optional.absent();
-        Map<UsabilityDefectSeverityLevel, Double> matchingSeverityLevels = Maps.filterValues(this.severity, severityForMetric(evaluationMetric));
-        if(matchingSeverityLevels.isEmpty()) {
-            return defect;
-        }
-        setDefectAttributes(matchingSeverityLevels, evaluationMetric);
-        return Optional.of(this);
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param matchingSeverityLevels
-     * @param evaluationMetric
-     */
-    private void setDefectAttributes(Map<UsabilityDefectSeverityLevel, Double> matchingSeverityLevels,
-                                     float evaluationMetric)
-    {
-        BiMap<Double, UsabilityDefectSeverityLevel> inverse = HashBiMap.create(matchingSeverityLevels).inverse();
-        this.severityLevel = inverse.get(Collections.max(inverse.keySet()));
-        this.description = String.format(this.description, evaluationMetric);
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     * @param evaluationMetric 
-     *
-     * @return
-     */
-    private Predicate< Double> severityForMetric(final float evaluationMetric) {
-        return new Predicate<Double>() {
-            
-            public boolean apply(Double severityThreshold) {
-                return evaluationMetric == severityThreshold || evaluationMetric > severityThreshold;
-            }
-            
-        };
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityDefectSeverityLevel.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityDefectSeverityLevel.java	(revision 1213)
+++ 	(revision )
@@ -1,28 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.usability.result;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public enum UsabilityDefectSeverityLevel {
-    
-    NONE, INFO, LOW, MEDIUM, HIGH;
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemDescription.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemDescription.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemDescription.java	(revision 1217)
@@ -0,0 +1,149 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.result;
+
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.Map;
+
+import com.google.common.base.Optional;
+import com.google.common.base.Predicate;
+import com.google.common.collect.BiMap;
+import com.google.common.collect.HashBiMap;
+import com.google.common.collect.Maps;
+
+/**
+ * <p>
+ * Description for a usability problem.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class UsabilityProblemDescription {
+    /**
+     * <p>
+     * The severity of the defect.
+     * </p>
+     */
+
+    private UsabilityProblemSeverityLevel severityLevel = UsabilityProblemSeverityLevel.NONE;
+
+    /**
+     * <p>
+     * A detailed description of the defect.
+     * </p>
+     */
+    private String description;
+
+    /**
+     * <p>
+     * Assignment of all possible severity values to a certain threshold. This is used, to determine
+     * the severity level during the usability evaluation.
+     * </p>
+     */
+    private final EnumMap<UsabilityProblemSeverityLevel, Double> severity;
+
+    /**
+     * <p>
+     * Constructor. Creates a new UsabilityDefectDescription for given description and all possible
+     * severity level.
+     * </p>
+     * 
+     * @param description
+     *            description of the defect
+     * @param severity
+     *            all possible severity level and their threshold
+     */
+    public UsabilityProblemDescription(String description,
+                                      EnumMap<UsabilityProblemSeverityLevel, Double> severity)
+    {
+        this.description = description;
+        this.severity = severity;
+    }
+
+    /**
+     * <p>
+     * Gets the severity level of this defect.
+     * </p>
+     * 
+     * @return severity level of this defect
+     */
+    public UsabilityProblemSeverityLevel getSeverityLevel() {
+        return this.severityLevel;
+    }
+
+    /**
+     * <p>
+     * Checks, if a defect is present. Therefore it uses a value, which is used to determine the
+     * severity level.
+     * </p>
+     * 
+     * @param evaluationMetric
+     *            value, which determines the severity level of a defect
+     * @return iff defect is present, a {@linkplain UsabilityProblemDescription} of the defect
+     */
+    public Optional<UsabilityProblemDescription> isPresent(float evaluationMetric) {
+        Optional<UsabilityProblemDescription> defect = Optional.absent();
+        Map<UsabilityProblemSeverityLevel, Double> matchingSeverityLevels =
+            Maps.filterValues(this.severity, severityForMetric(evaluationMetric));
+        if (matchingSeverityLevels.isEmpty()) {
+            return defect;
+        }
+        setDefectAttributes(matchingSeverityLevels, evaluationMetric);
+        return Optional.of(this);
+    }
+
+    /**
+     * <p>
+     * Initializes the properties of a {@linkplain UsabilityProblemDescription}.
+     * </p>
+     * 
+     * @param matchingSeverityLevels
+     *            all severity level, where {@linkplain evaluationMetric} exceeds the threshold
+     * @param evaluationMetric
+     *            measure for the defect
+     */
+    private void setDefectAttributes(Map<UsabilityProblemSeverityLevel, Double> matchingSeverityLevels,
+                                     float evaluationMetric)
+    {
+        BiMap<Double, UsabilityProblemSeverityLevel> inverse =
+            HashBiMap.create(matchingSeverityLevels).inverse();
+        this.severityLevel = inverse.get(Collections.max(inverse.keySet()));
+        this.description = String.format(this.description, evaluationMetric);
+    }
+
+    /**
+     * <p>
+     * Gets severity level depending on a measurement for the defect.
+     * </p>
+     * 
+     * @param evaluationMetric
+     *            measure for the defect
+     * 
+     * @return severity level, if measurement is equal or bigger as the threshold of the severity
+     *         level
+     */
+    private Predicate<Double> severityForMetric(final float evaluationMetric) {
+        return new Predicate<Double>() {
+
+            public boolean apply(Double severityThreshold) {
+                return evaluationMetric == severityThreshold ||
+                    evaluationMetric > severityThreshold;
+            }
+
+        };
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemDescriptionResolver.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemDescriptionResolver.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemDescriptionResolver.java	(revision 1217)
@@ -0,0 +1,235 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.result;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.EnumMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import jodd.props.Props;
+
+import com.google.common.base.Optional;
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Maps;
+
+import de.ugoe.cs.util.console.Console;
+
+/**
+ * <p>
+ * Helper class, which creates a {@link UsabilityProblemDescription} for a usability rule.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class UsabilityProblemDescriptionResolver {
+
+    /**
+     * <p>
+     * .properties file, which contains all details concerning a usability defect.
+     * </p>
+     */
+    private final String defectDescriptionFile = "defects.props";
+
+    /**
+     * <p>
+     * Creates a defect description for a {@link UsabilityRule}.
+     * </p>
+     * 
+     * @param name
+     *            of usability rule
+     * @return defect description for usability rule
+     */
+    public UsabilityProblemDescription descriptionFor(String usabilityRuleName) {
+        Props allProperties = initProperties();
+        Map<String, String> usabilityRuleProperties =
+            allUsabilityRuleProperties(allProperties, usabilityRuleName);
+        return createUsabilityDefect(usabilityRuleProperties);
+    }
+
+    /**
+     * <p>
+     * Initializes the properties, which are used to create the defect description.
+     * </p>
+     * 
+     * @return properties needed to create defect description
+     */
+    private Props initProperties() {
+        Optional<File> defectDescriptionFile = getDefectDescriptionFile();
+        Props props = new Props();
+        props.setEscapeNewLineValue("\n");
+        props.setValueTrimLeft(true);
+        if (defectDescriptionFile.isPresent()) {
+            loadProperties(defectDescriptionFile, props);
+        }
+        return props;
+    }
+
+    /**
+     * <p>
+     * Loads the .properties file from the system.
+     * </p>
+     * 
+     * @return iff present, {@link File} object of the .properties file
+     */
+    private Optional<File> getDefectDescriptionFile() {
+        try {
+            return Optional.fromNullable(new File(ClassLoader
+                .getSystemResource(defectDescriptionFile).toURI()));
+        }
+        catch (URISyntaxException e) {
+            Console.printerr("Error while loading defect description file.");
+            Console.logException(e);
+            return Optional.absent();
+        }
+    }
+
+    /**
+     * 
+     * <p>
+     * Loads the values from the .properties.
+     * </p>
+     * 
+     * @param defectDescriptionFile
+     *            .properties file
+     * @param props
+     *            object, which stores the loaded values
+     */
+    private void loadProperties(Optional<File> defectDescriptionFile, Props props) {
+        try {
+            props.load(defectDescriptionFile.get());
+        }
+        catch (IOException e) {
+            Console.logException(e);
+        }
+    }
+
+    /**
+     * <p>
+     * Returns all existing properties for a given usability rule.
+     * </p>
+     * 
+     * @param allProperties
+     *            all properties available
+     * @param usabilityRuleName
+     *            name of usability rule
+     * @return all properties of certain usability rule
+     */
+    private Map<String, String> allUsabilityRuleProperties(Props allProperties,
+                                                           String usabilityRuleName)
+    {
+        Map<String, String> usabilityRuleProperties = Maps.newHashMap();
+        allProperties.extractSubProps(usabilityRuleProperties, usabilityRuleName + ".*");
+        return usabilityRuleProperties;
+    }
+
+    /**
+     * <p>
+     * Creates the usability defect.
+     * </p>
+     * 
+     * @param usabilityRuleProperties
+     *            all properties needed for creation.
+     * @return defect description for a usability rule
+     */
+    private UsabilityProblemDescription createUsabilityDefect(Map<String, String> usabilityRuleProperties)
+    {
+        String description =
+            Iterables.getOnlyElement(Maps
+                .filterKeys(usabilityRuleProperties, descriptionProperty()).values());
+        EnumMap<UsabilityProblemSeverityLevel, Double> severity =
+            getSeverityMap(usabilityRuleProperties);
+        return new UsabilityProblemDescription(description, severity);
+    }
+
+    /**
+     * <p>
+     * Gets the description property.
+     * </p>
+     * 
+     * @return description property
+     */
+    private Predicate<String> descriptionProperty() {
+        return new Predicate<String>() {
+
+            public boolean apply(String key) {
+                return key.endsWith("description");
+            }
+
+        };
+    }
+
+    /**
+     * <p>
+     * Creates severity level map for defect description, by matching all entried from .properties
+     * file to corresponding {@link UsabilityProblemSeverityLevel}.
+     * </p>
+     * 
+     * @param usabilityRuleProperties
+     *            all properties of certain usability rule
+     * @return assignment of {@link UsabilityProblemSeverityLevel} and corresponding threshold
+     */
+    private EnumMap<UsabilityProblemSeverityLevel, Double> getSeverityMap(Map<String, String> usabilityRuleProperties)
+    {
+        EnumMap<UsabilityProblemSeverityLevel, Double> severityMap =
+            Maps.newEnumMap(UsabilityProblemSeverityLevel.class);
+        Map<String, String> allSeverityProperties =
+            Maps.filterEntries(usabilityRuleProperties, allSeverityProperties());
+        for (Entry<String, String> severityProperty : allSeverityProperties.entrySet()) {
+            UsabilityProblemSeverityLevel severityLevel =
+                getSeverityLevel(severityProperty.getKey());
+            Double rule = Double.valueOf(severityProperty.getValue());
+            severityMap.put(severityLevel, rule);
+        }
+        return severityMap;
+    }
+
+    /**
+     * <p>
+     * Matches severity level from .properties file against {@link UsabilityProblemSeverityLevel}.
+     * </p>
+     * 
+     * @param severityProperty
+     *            severity level from .properties file
+     * @return matching {@link UsabilityProblemSeverityLevel}
+     */
+    private UsabilityProblemSeverityLevel getSeverityLevel(String severityProperty) {
+        int startSeverityLevel = severityProperty.lastIndexOf(".") + 1;
+        String severityLevelIdentifier =
+            severityProperty.substring(startSeverityLevel).toUpperCase();
+        return UsabilityProblemSeverityLevel.valueOf(severityLevelIdentifier);
+    }
+
+    /**
+     * <p>
+     * Gets the severity level properties.
+     * </p>
+     * 
+     * @return severity level
+     */
+    private Predicate<Entry<String, String>> allSeverityProperties() {
+        return new Predicate<Map.Entry<String, String>>() {
+
+            public boolean apply(Map.Entry<String, String> entry) {
+                return entry.getKey().contains("severity");
+            }
+
+        };
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemSeverityLevel.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemSeverityLevel.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/result/UsabilityProblemSeverityLevel.java	(revision 1217)
@@ -0,0 +1,28 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.result;
+
+/**
+ * <p>
+ * All possible severity level for usability defects.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public enum UsabilityProblemSeverityLevel {
+
+    NONE, INFO, LOW, MEDIUM, HIGH;
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/EmptyRuleset.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/EmptyRuleset.java	(revision 1213)
+++ 	(revision )
@@ -1,38 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.usability.rules;
-
-import java.util.Collections;
-import java.util.List;
-
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class EmptyRuleset implements UsabilityRuleset {
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.usability.UsabilityRuleset#evaluationRules()
-     */
-    @Override
-    public List<UsabilityRule> evaluationRules() {
-        return Collections.emptyList();
-    }
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/PatternRuleset.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/PatternRuleset.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/PatternRuleset.java	(revision 1217)
@@ -0,0 +1,51 @@
+
+package de.ugoe.cs.autoquest.usability.rules;
+
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.rules.patterns.LongFormUsageProblem;
+
+/**
+ * 
+ * <p>
+ * A ruleset containing interaction patterns, which might be indicators for potential usability
+ * problems.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class PatternRuleset implements UsabilityRuleset {
+
+    /**
+     * 
+     */
+    private final ITaskModel taskModel;
+
+    /**
+     * 
+     * <p>
+     * Constructor. Creates new {@code PatternRuleset} for a given task model.
+     * </p>
+     * 
+     * @param taskModel
+     */
+    public PatternRuleset(ITaskModel taskModel) {
+        this.taskModel = taskModel;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRuleset#evaluationRules()
+     */
+    @Override
+    public List<UsabilityRule> evaluationRules() {
+        List<UsabilityRule> rules = Lists.newArrayList();
+        rules.add(new LongFormUsageProblem(this.taskModel));
+        return rules;
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetric.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetric.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetric.java	(revision 1217)
@@ -17,9 +17,10 @@
 import com.google.common.base.Optional;
 
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
 
 /**
  * <p>
- * TODO comment
+ * Interface for usability metrics. A metric is a way of measuring or evaluating a particular
+ * phenomenon or thing, in this case usability.
  * </p>
  * 
@@ -27,6 +28,15 @@
  */
 public interface UsabilityMetric {
-    
-    public Optional<UsabilityDefect> calculate();
+
+    /**
+     * 
+     * <p>
+     * Calculates the metric.
+     * </p>
+     * 
+     * @return Detailed description of the usability problem, if calculated metric exceeds defined
+     *         threshold.
+     */
+    public Optional<UsabilityProblemDescription> calculate();
 
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetricsRuleset.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetricsRuleset.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetricsRuleset.java	(revision 1217)
@@ -26,5 +26,6 @@
 /**
  * <p>
- * TODO comment
+ * A ruleset containing usability metrics, which might be indicators for potential usability
+ * problems.
  * </p>
  * 
@@ -34,10 +35,10 @@
 
     private List<UsabilityRule> metrics;
-    
+
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates new {@code UsabilityMetricsRuleset} for a given task model.
      * </p>
-     *
+     * 
      */
     private UsabilityMetricsRuleset(ITaskModel taskModel) {
@@ -48,5 +49,7 @@
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.autoquest.usability.UsabilityRuleset#evaluationRules()
      */
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityResult.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityResult.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityResult.java	(revision 1217)
@@ -18,11 +18,10 @@
 import com.google.common.collect.Multimap;
 
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefectSeverityLevel;
-
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemSeverityLevel;
 
 /**
  * <p>
- * TODO comment
+ * The result of the usability evaluation, which contains all detected problems.
  * </p>
  * 
@@ -30,24 +29,45 @@
  */
 public class UsabilityResult {
-    
-    private Multimap<UsabilityDefectSeverityLevel, UsabilityDefect> detectedDefects;
-    
+
+    /**
+     * <p>
+     * All detected problems and their appropriate severity level.
+     * </p>
+     */
+    private Multimap<UsabilityProblemSeverityLevel, UsabilityProblemDescription> detectedProblems;
+
+    /**
+     * 
+     * <p>
+     * Constructor. Creates a new result.
+     * </p>
+     * 
+     */
     public UsabilityResult() {
-        this.detectedDefects = ArrayListMultimap.create();
+        this.detectedProblems = ArrayListMultimap.create();
     }
 
     /**
      * <p>
-     * TODO: comment
+     * Adds a usability problem to the result.
      * </p>
-     *
-     * @param usabilityDefect
+     * 
+     * @param usabilityProblem
+     *            the problem, which should be added.
      */
-    public void addDefect(UsabilityDefect usabilityDefect) {
-        this.detectedDefects.put(usabilityDefect.getSeverityLevel(), usabilityDefect);
+    public void addProblem(UsabilityProblemDescription usabilityProblem) {
+        this.detectedProblems.put(usabilityProblem.getSeverityLevel(), usabilityProblem);
     }
-    
-    public boolean hasDefects() {
-        return !this.detectedDefects.isEmpty();
+
+    /**
+     * 
+     * <p>
+     * Checks, if problems were found during the usability evaluation.
+     * </p>
+     * 
+     * @return true, iff problems were found
+     */
+    public boolean hasDetectedProblems() {
+        return !this.detectedProblems.isEmpty();
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRule.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRule.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRule.java	(revision 1217)
@@ -19,9 +19,10 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
 
 /**
  * <p>
- * TODO comment
+ * A {@code UsabilityRule} is a abstract class, representing a usability guideline, metric
+ * interaction pattern etc., which should be checked during a automatic usability evaluation.
  * </p>
  * 
@@ -29,22 +30,48 @@
  */
 public abstract class UsabilityRule {
-    
-    protected final ITaskModel taskModel;
-    
-    protected String name;
-    
-    protected UsabilityDefect defect;
-    
+
     /**
      * <p>
-     * TODO: comment
+     * {@link ITaskModel}, which is evaluated
      * </p>
-     *
+     */
+    protected final ITaskModel taskModel;
+
+    /**
+     * <p>
+     * Name of the usability rule
+     * </p>
+     */
+    protected String name;
+
+    /**
+     * <p>
+     * Corresponding defect description.
+     * </p>
+     */
+    protected UsabilityProblemDescription defect;
+
+    /**
+     * <p>
+     * Constructor. Creates a new {@code UsabilityRule} for a given task model
+     * </p>
+     * 
      */
     public UsabilityRule(ITaskModel taskModel) {
         this.taskModel = taskModel;
     }
-    
-    public abstract Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller);
+
+    /**
+     * 
+     * <p>
+     * Calls the evaluation method of this {@code UsabilityRule}.
+     * </p>
+     * 
+     * @param evaluationMethodCaller
+     *            helper class, which calls the evaluation method based on the type of the
+     *            {@code UsabilityRule}
+     * @return {@link UsabilityProblemDescription}, iff violation against usability rule was detected
+     */
+    public abstract Optional<UsabilityProblemDescription> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller);
 
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRuleset.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRuleset.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRuleset.java	(revision 1217)
@@ -19,5 +19,5 @@
 /**
  * <p>
- * TODO comment
+ * A {@code UsabilityRuleset} is a container for {@link UsabilityRule}s.
  * </p>
  * 
@@ -28,8 +28,8 @@
     /**
      * <p>
-     * TODO: comment
+     * Gets all {@link UsabilityRule}s contained in the {@code UsabilityRuleset}.
      * </p>
-     *
-     * @return
+     * 
+     * @return all contained {@link UsabilityRule}s
      */
     public List<UsabilityRule> evaluationRules();
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityUsageDefect.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityUsageDefect.java	(revision 1213)
+++ 	(revision )
@@ -1,32 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.usability.rules;
-
-import com.google.common.base.Optional;
-
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public interface UsabilityUsageDefect {
-    
-    public Optional<UsabilityDefect> check();
-
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityUsageProblem.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityUsageProblem.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityUsageProblem.java	(revision 1217)
@@ -0,0 +1,41 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.rules;
+
+import com.google.common.base.Optional;
+
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
+
+/**
+ * <p>
+ * Common interface for usability problems. Simple speaking, a usability problem is a specific
+ * problem that negatively affects the usage of a application.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public interface UsabilityUsageProblem {
+
+    /**
+     * 
+     * <p>
+     * Checks, if usability problem is present.
+     * </p>
+     * 
+     * @return Detailed description of the usability problem, if it was detected.
+     */
+    public Optional<UsabilityProblemDescription> check();
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitRatioMetric.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitRatioMetric.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitRatioMetric.java	(revision 1217)
@@ -15,7 +15,7 @@
 package de.ugoe.cs.autoquest.usability.rules.metrics;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
 import static de.ugoe.cs.autoquest.usability.util.TextInputUtil.aggregateEnteredTextFromTextInputs;
-import static de.ugoe.cs.autoquest.usability.util.TextInputUtil.characterIsLetterOrDigitPredicate;
+import static de.ugoe.cs.autoquest.usability.util.TextInputUtil.characterIsNoLetterOrDigitPredicate;
 
 import java.util.List;
@@ -28,15 +28,16 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
-import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver;
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescriptionResolver;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityMetric;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityRule;
-import de.ugoe.cs.autoquest.usability.tasktree.FilterResult;
-import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.FilterResult;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.IterativeDFSFilterStrategy;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskModelFilter;
 
 /**
  * <p>
- * TODO comment
+ * Metric, which calculates the ratio ratio between non letter or digit characters and all entered
+ * characters.
  * </p>
  * 
@@ -47,33 +48,54 @@
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new {@code NoLetterOrDigitRatioMetric} for a given task model.
      * </p>
-     *
-     * @param taskTree
+     * 
+     * @param taskModel
      */
     public NoLetterOrDigitRatioMetric(ITaskModel taskModel) {
         super(taskModel);
         this.name = "NoLetterOrDigitRatio";
-        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName());
+        this.defect =
+            new UsabilityProblemDescriptionResolver().descriptionFor(this.getClass()
+                .getSimpleName());
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#check()
      */
     @Override
-    public Optional<UsabilityDefect> calculate() {
+    public Optional<UsabilityProblemDescription> calculate() {
         FilterResult textInputEvents = extractNodesFromTaskTree();
         float evaluationMetric = calculateEvaluationMetric(textInputEvents.tasksMatchedFilter());
         return this.defect.isPresent(evaluationMetric);
     }
-    
+
+    /**
+     * 
+     * <p>
+     * Filters all text input events from task model.
+     * </p>
+     * 
+     * @return {@code FilterResult}
+     */
     private FilterResult extractNodesFromTaskTree() {
         return new TaskModelFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT)
             .from(this.taskModel);
     }
-    
+
+    /**
+     * 
+     * <p>
+     * Calculates the metric.
+     * </p>
+     * 
+     * @param textInputEvents
+     *            all text input events
+     * @return ratio between non letter or digit characters and all entered characters
+     */
     private float calculateEvaluationMetric(List<ITask> textInputEvents) {
-        Multiset<String> enteredTextFragments =
-            aggregateEnteredTextFromTextInputs(textInputEvents);
+        Multiset<String> enteredTextFragments = aggregateEnteredTextFromTextInputs(textInputEvents);
         int allCharactersCount = 0;
         int noLetterOrDigitCount = 0;
@@ -82,6 +104,6 @@
             allCharactersCount += CharMatcher.ANY.countIn(textFragment) * occurencesOfTextFragment;
             noLetterOrDigitCount +=
-                CharMatcher.forPredicate(characterIsLetterOrDigitPredicate()).countIn(textFragment) *
-                    occurencesOfTextFragment;
+                CharMatcher.forPredicate(characterIsNoLetterOrDigitPredicate())
+                    .countIn(textFragment) * occurencesOfTextFragment;
         }
         return allCharactersCount != 0 ? (float) noLetterOrDigitCount / (float) allCharactersCount
@@ -89,9 +111,13 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest
+     * .usability.EvaluationMethodCaller)
      */
     @Override
-    public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
+    public Optional<UsabilityProblemDescription> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
     {
         return evaluationMethodCaller.check(this);
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsMetric.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsMetric.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsMetric.java	(revision 1217)
@@ -15,5 +15,5 @@
 package de.ugoe.cs.autoquest.usability.rules.metrics;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
 import static de.ugoe.cs.autoquest.usability.util.TextInputUtil.aggregateEnteredTextFromTextInputs;
 
@@ -28,15 +28,16 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
-import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver;
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescriptionResolver;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityMetric;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityRule;
-import de.ugoe.cs.autoquest.usability.tasktree.FilterResult;
-import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.FilterResult;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.IterativeDFSFilterStrategy;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskModelFilter;
 
 /**
  * <p>
- * TODO comment
+ * Metric, which measures either the repetition of entered words or the maximum repetition of a
+ * single word.
  * </p>
  * 
@@ -47,33 +48,54 @@
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new {@link TextInputEntryRepetitionsMetric} for a given task model.
      * </p>
-     *
-     * @param taskTree
+     * 
+     * @param taskModel
      */
     public TextInputEntryRepetitionsMetric(ITaskModel taskModel) {
         super(taskModel);
         this.name = "TextInputEntryRepetitions";
-        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName());
+        this.defect =
+            new UsabilityProblemDescriptionResolver().descriptionFor(this.getClass()
+                .getSimpleName());
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#check()
      */
     @Override
-    public Optional<UsabilityDefect> calculate() {
+    public Optional<UsabilityProblemDescription> calculate() {
         FilterResult textInputEvents = extractNodesFromTaskTree();
         float evaluationMetric = calculateEvaluationMetric(textInputEvents.tasksMatchedFilter());
         return this.defect.isPresent(evaluationMetric);
     }
-    
+
+    /**
+     * 
+     * <p>
+     * Filters all text input events from task model.
+     * </p>
+     * 
+     * @return {@code FilterResult}
+     */
     private FilterResult extractNodesFromTaskTree() {
         return new TaskModelFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT)
             .from(this.taskModel);
     }
-    
+
+    /**
+     * 
+     * <p>
+     * Calculates the metric.
+     * </p>
+     * 
+     * @param textInputEvents
+     *            all text input events
+     * @return either number of repeated words or the number of repetitions of the most entered word
+     */
     private float calculateEvaluationMetric(List<ITask> textInputEvents) {
-        Multiset<String> enteredTextFragments =
-            aggregateEnteredTextFromTextInputs(textInputEvents);
+        Multiset<String> enteredTextFragments = aggregateEnteredTextFromTextInputs(textInputEvents);
         Multiset<String> orderedTextFragmentsWithMultipleOccurences =
             onlyTextFragmentsWithMultipleOccurences(enteredTextFragments);
@@ -86,7 +108,17 @@
             orderedTextFragmentsWithMultipleOccurences
                 .count(wordWithHighestRepetitionInTextFragments);
-        return Math.max(numberOfRepeatedWords, maxRepetitions-1);
+        return Math.max(numberOfRepeatedWords, maxRepetitions - 1);
     }
-    
+
+    /**
+     * 
+     * <p>
+     * Return only words, which at least entered twice.
+     * </p>
+     * 
+     * @param allTextInputs
+     *            all text input events
+     * @return all word, which used min. twice
+     */
     private Multiset<String> onlyTextFragmentsWithMultipleOccurences(final Multiset<String> allTextInputs)
     {
@@ -104,12 +136,16 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest
+     * .usability.EvaluationMethodCaller)
      */
     @Override
-    public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
+    public Optional<UsabilityProblemDescription> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
     {
         return evaluationMethodCaller.check(this);
     }
-    
+
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioMetric.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioMetric.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioMetric.java	(revision 1217)
@@ -15,5 +15,5 @@
 package de.ugoe.cs.autoquest.usability.rules.metrics;
 
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter.TEXT_INPUT;
 
 import java.util.List;
@@ -27,15 +27,15 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
 import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
-import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver;
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescriptionResolver;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityMetric;
 import de.ugoe.cs.autoquest.usability.rules.UsabilityRule;
-import de.ugoe.cs.autoquest.usability.tasktree.FilterResult;
-import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.FilterResult;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.IterativeDFSFilterStrategy;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskModelFilter;
 
 /**
  * <p>
- * TODO comment
+ * Metric, which measures the ratio between the text input and the non text input events.
  * </p>
  * 
@@ -46,7 +46,7 @@
     /**
      * <p>
-     * TODO: comment
+     * Constructor. Creates a new {@code TextInputRatioMetric} for a given task model.
      * </p>
-     *
+     * 
      * @param taskTree
      */
@@ -54,23 +54,51 @@
         super(taskModel);
         this.name = "TextInputRatio";
-        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName());
+        this.defect =
+            new UsabilityProblemDescriptionResolver().descriptionFor(this.getClass()
+                .getSimpleName());
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#check()
      */
     @Override
-    public Optional<UsabilityDefect> calculate() {
+    public Optional<UsabilityProblemDescription> calculate() {
         FilterResult textInputEvents = extractNodesFromTaskTree();
-        float evaluationMetric = calculateEvaluationMetric(textInputEvents.tasksMatchedFilter(), textInputEvents.tasksNotMatchedFilter());
+        float evaluationMetric =
+            calculateEvaluationMetric(textInputEvents.tasksMatchedFilter(),
+                                      textInputEvents.tasksNotMatchedFilter());
         return this.defect.isPresent(evaluationMetric);
     }
-    
+
+    /**
+     * 
+     * <p>
+     * Filters all text input events from task model.
+     * </p>
+     * 
+     * @return {@code FilterResult}
+     */
     private FilterResult extractNodesFromTaskTree() {
         return new TaskModelFilter(new IterativeDFSFilterStrategy()).filterByEventType(TEXT_INPUT)
             .from(this.taskModel);
     }
-    
-    private float calculateEvaluationMetric(List<ITask> textInputEvents, List<ITask> nonTextInputEvents) {
+
+    /**
+     * 
+     * <p>
+     * Calculates the metric.
+     * </p>
+     * 
+     * @param textInputEvents
+     *            all text input events
+     * @param nonTextInputEvents
+     *            all non text input events
+     * @return ratio between text input and non text input events
+     */
+    private float calculateEvaluationMetric(List<ITask> textInputEvents,
+                                            List<ITask> nonTextInputEvents)
+    {
         float numberOfTextInputEvents = textInputEvents.size();
         float numberOfNonTextInputEvents = nrOfEventTasksNotMatchedFilter(nonTextInputEvents);
@@ -78,20 +106,33 @@
     }
 
+    /**
+     * 
+     * <p>
+     * Filters all {@link IEventTask}s from non text input event.
+     * </p>
+     * 
+     * @param nonTextInputEvents
+     *            all non text input events
+     * @return number of {@link IEventTask}s
+     */
     private int nrOfEventTasksNotMatchedFilter(List<ITask> nonTextInputEvents) {
-        return Iterables.size(Iterables.filter(nonTextInputEvents,
-                                               new Predicate<ITask>() {
+        return Iterables.size(Iterables.filter(nonTextInputEvents, new Predicate<ITask>() {
 
-                                                   @Override
-                                                   public boolean apply(ITask task) {
-                                                       return task instanceof IEventTask;
-                                                   }
-                                               }));
+            @Override
+            public boolean apply(ITask task) {
+                return task instanceof IEventTask;
+            }
+        }));
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest
+     * .usability.EvaluationMethodCaller)
      */
     @Override
-    public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
+    public Optional<UsabilityProblemDescription> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
     {
         return evaluationMethodCaller.check(this);
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPattern.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPattern.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPattern.java	(revision 1217)
@@ -15,5 +15,4 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns;
 
-import java.util.Arrays;
 import java.util.List;
 
@@ -24,11 +23,11 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.tasktree.IterativeDFSFilterStrategy;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskModelFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.IterativeDFSFilterStrategy;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskModelFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 
 /**
  * <p>
- * TODO comment
+ * A interaction pattern is a simple approach to describe the structure of usage behaviour.
  * </p>
  * 
@@ -36,110 +35,191 @@
  */
 public class InteractionPattern {
-    
+
+    /**
+     * <p>
+     * {@link TaskModelFilter}, which is used to filter a task model after different {@link ITask}s
+     * </p>
+     */
     private TaskModelFilter taskTreeFilter = new TaskModelFilter(new IterativeDFSFilterStrategy());
-    
-    private TaskTypeFilter concernedTask;
-
+
+    /**
+     * <p>
+     * Type of root task. Determines the order in which sub task appear.
+     * </p>
+     */
+    private TaskTypeFilter rootTask;
+
+    /**
+     * <p>
+     * Helper objects, which decide whether or not a defined pattern condition holds.
+     * </p>
+     */
     private List<InteractionPatternVisitor> patternVisitors;
-    
+
+    /**
+     * <p>
+     * Flag, which indicates if the interaction pattern was found within a given task model.
+     * </p>
+     */
     private boolean present = false;
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param concernedNode
-     * @param eventType
-     */
-    public InteractionPattern(TaskTypeFilter concernedNode,
-                        InteractionPatternVisitor... patternVisitor)
+
+    /**
+     * <p>
+     * Constructor. Creates a new interaction pattern for a given root task and a collection of
+     * {@link InteractionPatternVisitor}s.
+     * </p>
+     * 
+     * @param rootTask
+     *            Type of root task, which determines the order in which sub task appear.
+     * @param patternVisitors
+     *            {@link InteractionPatternVisitor}s, which decide whether or not a defined pattern
+     *            condition holds
+     */
+    public InteractionPattern(TaskTypeFilter rootTask,
+                              List<InteractionPatternVisitor> patternVisitors)
     {
-        this.patternVisitors = Arrays.asList(patternVisitor);
-        this.concernedTask = concernedNode;
-    }
-
+        this.patternVisitors = patternVisitors;
+        this.rootTask = rootTask;
+    }
+
+    /**
+     * 
+     * <p>
+     * Checks if a interaction pattern is contained in a given task model.
+     * </p>
+     * 
+     * @param taskModel
+     *            {@link ITaskModel}, which might contain the interaction pattern
+     * @return true, iff interaction pattern is contained
+     */
     public boolean containedIn(ITaskModel taskModel) {
         List<ITask> allConcernedTasks = filterAllConcernedTasksFrom(taskModel);
-        for(ITask concernedTask : allConcernedTasks) {
-            checkTask(concernedTask);  
-            if(this.present) break;
+        for (ITask concernedTask : allConcernedTasks) {
+            checkTask(concernedTask);
+            if (this.present)
+                break;
         }
         return this.present;
     }
 
-    private void checkTask(ITask concernedTask) {
-        applyAllVisitors(concernedTask);
-        if(allVisitorsArePresent()) {
+    /**
+     * 
+     * <p>
+     * Checks a single {@link ITask} for the interaction pattern.
+     * </p>
+     * 
+     * @param task
+     *            task, which might contain the interaction pattern
+     */
+    private void checkTask(ITask task) {
+        applyAllVisitors(task);
+        if (allVisitorsArePresent()) {
             this.present = true;
-        } else {
+        }
+        else {
             resetAllVisitors();
         }
     }
-    
+
+    /**
+     * 
+     * <p>
+     * Checks if a interaction pattern is contained in a given task.
+     * </p>
+     * 
+     * @param task
+     *            task, which might contain the interaction pattern
+     * @return true, iff interaction pattern is contained
+     */
     public boolean containedIn(ITask task) {
         checkTask(task);
-        return this.present;      
-    }
-
-    private void applyAllVisitors(ITask concernedTask) {
+        return this.present;
+    }
+
+    /**
+     * 
+     * <p>
+     * Method applys all {@link InteractionPatternVisitor}s, to check single interaction pattern
+     * conditions.
+     * </p>
+     * 
+     * @param task
+     *            task, which might contain the interaction pattern
+     */
+    private void applyAllVisitors(ITask task) {
         Optional<InteractionPatternVisitor> previousVisitor = Optional.absent();
-        for(InteractionPatternVisitor visitor : patternVisitors) {
-			if (appliedOnSelectionNode(previousVisitor)) {
-				for (ITask selection : previousVisitor.get().getRetainedSelectionNodes()) {
-					selection.accept(visitor);
-				}
-			} else {
-				previousVisitor = Optional.of(visitor);
-				concernedTask.accept(visitor);
-			}
-        }
-    }
-
-    private boolean appliedOnSelectionNode(Optional<InteractionPatternVisitor> previousVisitor) {
-        return previousVisitor.isPresent() && previousVisitor.get().hasExcludedSelectionNodes();
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param taskTree
-     * @return
+        for (InteractionPatternVisitor visitor : patternVisitors) {
+            if (appliedOnSelectionNode(previousVisitor)) {
+                for (ITask selection : previousVisitor.get().getRetainedSelectionNodes()) {
+                    selection.accept(visitor);
+                }
+            }
+            else {
+                previousVisitor = Optional.of(visitor);
+                task.accept(visitor);
+            }
+        }
+    }
+
+    /**
+     * 
+     * <p>
+     * Checks, if a {@link InteractionPatternVisitor} was applied on a {@link ISelection} task.
+     * </p>
+     * 
+     * @param interactionPatternVisitor
+     *            {@link InteractionPatternVisitor}
+     * @return true, iff {@link InteractionPatternVisitor} was applied on {@link ISelection} task
+     */
+    private boolean appliedOnSelectionNode(Optional<InteractionPatternVisitor> interactionPatternVisitor)
+    {
+        return interactionPatternVisitor.isPresent() &&
+            interactionPatternVisitor.get().hasExcludedSelectionNodes();
+    }
+
+    /**
+     * <p>
+     * Filters given task model after root task of interaction pattern.
+     * </p>
+     * 
+     * @param taskModel
+     *            {@link ITaskModel}
+     * @return all tasks of task model, which matches root task of interaction pattern
      */
     private List<ITask> filterAllConcernedTasksFrom(ITaskModel taskModel) {
-        return this.taskTreeFilter.filterByNodeType(this.concernedTask).from(taskModel).tasksMatchedFilter();
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+        return this.taskTreeFilter.filterByNodeType(this.rootTask).from(taskModel)
+            .tasksMatchedFilter();
+    }
+
+    /**
+     * <p>
+     * Checks, if all interaction pattern condition are evaluated to true.
+     * </p>
+     * 
+     * @return true, iff all interaction pattern condition are true
      */
     private boolean allVisitorsArePresent() {
-        Iterable<InteractionPatternVisitor> allPresent = Iterables.filter(this.patternVisitors, new Predicate<InteractionPatternVisitor>() {
-            
-            public boolean apply(InteractionPatternVisitor visitor) {
-                return visitor.isPresent();
-            }
-            
-        });
+        Iterable<InteractionPatternVisitor> allPresent =
+            Iterables.filter(this.patternVisitors, new Predicate<InteractionPatternVisitor>() {
+
+                public boolean apply(InteractionPatternVisitor visitor) {
+                    return visitor.isPresent();
+                }
+
+            });
         return Iterables.size(allPresent) == this.patternVisitors.size();
     }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
+
+    /**
+     * <p>
+     * Resets all interaction pattern condition.
+     * </p>
+     * 
      */
     private void resetAllVisitors() {
-        for(InteractionPatternVisitor visitor : this.patternVisitors) {
+        for (InteractionPatternVisitor visitor : this.patternVisitors) {
             visitor.reset();
         }
-        
+
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternBuilder.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternBuilder.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternBuilder.java	(revision 1217)
@@ -15,4 +15,8 @@
 package de.ugoe.cs.autoquest.usability.rules.patterns;
 
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
 import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.ContainsEventVisitor;
 import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.ContainsInteractionPatternVisitor;
@@ -21,10 +25,10 @@
 import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithEventVisitor;
 import de.ugoe.cs.autoquest.usability.rules.patterns.visitors.StartsWithInteractionPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 
 /**
  * <p>
- * TODO comment
+ * Helper class, which allows to create {@link InteractionPattern}s.
  * </p>
  * 
@@ -33,677 +37,192 @@
 public class InteractionPatternBuilder {
 
-    protected TaskTypeFilter concernedNode;
-    
+    /**
+     * <p>
+     * Type of root task. Determines the order in which sub task appear.
+     * </p>
+     */
+    protected TaskTypeFilter rootTask;
+
+    /**
+     * <p>
+     * Interaction pattern starts with event.
+     * </p>
+     */
     protected EventTypeFilter startsWithEvent;
-    
+
+    /**
+     * <p>
+     * Interaction pattern starts with interaction pattern.
+     * </p>
+     */
     protected InteractionPattern startsWithPattern;
-    
+
+    /**
+     * <p>
+     * Interaction pattern ends with event.
+     * </p>
+     */
     protected EventTypeFilter endsWithEvent;
-    
+
+    /**
+     * <p>
+     * Interaction pattern ends with interaction pattern.
+     * </p>
+     */
     protected InteractionPattern endsWithPattern;
-    
+
+    /**
+     * <p>
+     * Interaction pattern contains certain event.
+     * </p>
+     */
     protected EventTypeFilter containsEvent;
-    
+
+    /**
+     * <p>
+     * Interaction pattern contains certain interaction pattern.
+     * </p>
+     */
     protected InteractionPattern containsPattern;
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param sequence
-     * @return
-     */
-    public SpecifyPatternStep concernedNode(TaskTypeFilter concernedNode) {
-        this.concernedNode = concernedNode;
-        return new SpecifyPatternStep();
-    }
-    
-    public class SpecifyPatternStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithEventStep startsWith(EventTypeFilter startsWithType) {
-            InteractionPatternBuilder.this.startsWithEvent = startsWithType;
-            return new BuildStartsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param startsWithPattern
-         * @return
-         */
-        public BuildStartsWithPatternStep startsWith(InteractionPattern startsWithPattern) {
-            InteractionPatternBuilder.this.startsWithPattern = startsWithPattern;
-            return new BuildStartsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithType;
-            return new BuildEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
-            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildEndsWithPatternStep();
-        }
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildContainsEventStep contains(EventTypeFilter containsType) {
-            InteractionPatternBuilder.this.containsEvent = containsType;
-            return new BuildContainsEventStep();
-        }
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containsPattern
-         * @return
-         */
-        public BuildContainsPatternStep contains(InteractionPattern containsPattern) {
-            InteractionPatternBuilder.this.containsPattern = containsPattern;
-            return new BuildContainsPatternStep();
-        }
-        
-    }
-    
-    public class BuildStartsWithEventStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithType
-         * @return
-         */
-        public BuildStartsAndEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithType;
-            return new BuildStartsAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithEventAndEndsWithPattern endsWith(InteractionPattern endsWithPattern) {
-            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithEventAndEndsWithPattern();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithEventAndContainsEventStep contains(EventTypeFilter containsType) {
-            InteractionPatternBuilder.this.containsEvent = containsType;
-            return new BuildStartsWithEventAndContainsEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containedPattern
-         * @return
-         */
-        public BuildStartsWithEventAndContainsPatternStep contains(InteractionPattern containsPattern) {
-            InteractionPatternBuilder.this.containsPattern = containsPattern;
-            return new BuildStartsWithEventAndContainsPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
+
+    /**
+     * 
+     * <p>
+     * Starts creation of new interaction pattern.
+     * </p>
+     * 
+     * @return steps to create interaction pattern
+     */
+    public static SetConcernedTaskModelComponentStep newPattern() {
+        return new Steps();
+    }
+
+    public static interface SetConcernedTaskModelComponentStep {
+
+        public BuildPatternStep rootTask(TaskTypeFilter concernedNode);
+
+    }
+
+    public static interface BuildPatternStep {
+
+        public StartsWithStep startsWithEvent(EventTypeFilter startsWithEventType);
+
+        public StartsWithStep startsWithPattern(InteractionPattern endsWithPattern);
+
+        public ContainsStep containsEvent(EventTypeFilter containsEventType);
+
+        public ContainsStep containsPattern(InteractionPattern containsPattern);
+
+        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType);
+
+        public EndsWithStep endsWithPattern(InteractionPattern endsPattern);
+
+        public BuildStep patternFinished();
+
+    }
+
+    public static interface StartsWithStep {
+
+        public ContainsStep containsEvent(EventTypeFilter containsEventType);
+
+        public ContainsStep containsPattern(InteractionPattern containsPattern);
+
+        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType);
+
+        public EndsWithStep endsWithPattern(InteractionPattern endsPattern);
+
+        public BuildStep patternFinished();
+
+    }
+
+    public static interface ContainsStep {
+
+        public ContainsStep containsEvent(EventTypeFilter containsEventType);
+
+        public ContainsStep containsPattern(InteractionPattern containsPattern);
+
+        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType);
+
+        public EndsWithStep endsWithPattern(InteractionPattern endsPattern);
+
+        public BuildStep patternFinished();
+    }
+
+    public static interface EndsWithStep {
+
+        public BuildStep patternFinished();
+
+    }
+
+    public static interface BuildStep {
+
+        public InteractionPattern build();
+
+    }
+
+    private static class Steps implements SetConcernedTaskModelComponentStep, BuildPatternStep,
+        StartsWithStep, ContainsStep, EndsWithStep, BuildStep
+    {
+
+        private List<InteractionPatternVisitor> visitors = Lists.newArrayList();
+
+        private TaskTypeFilter concernedNode;
+
+        @Override
+        public BuildPatternStep rootTask(TaskTypeFilter concernedNode) {
+            this.concernedNode = concernedNode;
+            return this;
+        }
+
+        @Override
+        public StartsWithStep startsWithEvent(EventTypeFilter startsWithEventType) {
+            this.visitors.add(new StartsWithEventVisitor(startsWithEventType, concernedNode));
+            return this;
+        }
+
+        @Override
+        public StartsWithStep startsWithPattern(InteractionPattern startsWithPattern) {
+            this.visitors.add(new StartsWithInteractionPatternVisitor(startsWithPattern,
+                                                                      concernedNode));
+            return this;
+        }
+
+        @Override
+        public ContainsStep containsEvent(EventTypeFilter containsEventType) {
+            this.visitors.add(new ContainsEventVisitor(containsEventType, concernedNode));
+            return this;
+        }
+
+        @Override
+        public ContainsStep containsPattern(InteractionPattern containsPattern) {
+            this.visitors
+                .add(new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
+            return this;
+        }
+
+        @Override
+        public EndsWithStep endsWithEvent(EventTypeFilter endsWithEventType) {
+            this.visitors.add(new EndsWithEventVisitor(endsWithEventType, concernedNode));
+            return this;
+        }
+
+        @Override
+        public EndsWithStep endsWithPattern(InteractionPattern endsWithPattern) {
+            this.visitors
+                .add(new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
+            return this;
+
+        }
+
+        @Override
+        public BuildStep patternFinished() {
+            return this;
+        }
+
+        @Override
         public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containsEvent
-         * @return
-         */
-        public BuildStartsWithPatternAndContainsEventStep contains(EventTypeFilter containsEvent) {
-            InteractionPatternBuilder.this.containsEvent = containsEvent;
-            return new BuildStartsWithPatternAndContainsEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param containedPattern
-         * @return
-         */
-        public BuildStartsWithPatternAndContainsPatternStep contains(InteractionPattern containsPattern) {
-            InteractionPatternBuilder.this.containsPattern = containsPattern;
-            return new BuildStartsWithPatternAndContainsPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsWithPatternAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
-            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildEndsWithEventStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new EndsWithEventVisitor(endsWithEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildEndsWithPatternStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildContainsEventStep {
-
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildContainsAndEndsWithEventStep endsWith(EventTypeFilter endsWithType) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithType;
-            return new BuildContainsAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new ContainsEventVisitor(containsEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventAndEndsWithPattern {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventAndContainsEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsAndEndsWithEventAndContainsEventStep endsWith(EventTypeFilter endsWithEvent) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsAndEndsWithEventAndContainsEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithEventContainsEventAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
-            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithEventContainsEventAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternAndContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsContainsPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsContainsPatternAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsAndEndsWithPatternAndContainsPatternStep endsWith(InteractionPattern endsWithPattern) {
-            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsAndEndsWithPatternAndContainsPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventAndContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithEventContainsPatternAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsWithEventContainsPatternAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithEventContainsPatternAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
-            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithEventContainsPatternAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternAndContainsEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param textInput
-         * @return
-         */
-        public BuildStartsWithPatternContainsEventAndEndsWithEventStep endsWith(EventTypeFilter endsWithEvent) {
-            InteractionPatternBuilder.this.endsWithEvent = endsWithEvent;
-            return new BuildStartsWithPatternContainsEventAndEndsWithEventStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @param endsWithPattern
-         * @return
-         */
-        public BuildStartsWithPatternContainsEventAndEndsWithPatternStep endsWith(InteractionPattern endsWithPattern) {
-            InteractionPatternBuilder.this.endsWithPattern = endsWithPattern;
-            return new BuildStartsWithPatternContainsEventAndEndsWithPatternStep();
-        }
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithEventAndContainsEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsContainsPatternAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsAndEndsWithPatternAndContainsPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventContainsEventAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventContainsPatternAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithEventContainsPatternAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithEventVisitor(startsWithEvent, concernedNode), new ContainsInteractionPatternVisitor(containsPattern, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternContainsEventAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
-        }
-        
-    }
-    
-    public class BuildStartsWithPatternContainsEventAndEndsWithPatternStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new StartsWithInteractionPatternVisitor(startsWithPattern, concernedNode), new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithInteractionPatternVisitor(endsWithPattern, concernedNode));
-        }
-        
-    }
-    
-    public class BuildContainsAndEndsWithEventStep {
-        
-        /**
-         * <p>
-         * TODO: comment
-         * </p>
-         *
-         * @return
-         */
-        public InteractionPattern build() {
-            return new InteractionPattern(concernedNode, new ContainsEventVisitor(containsEvent, concernedNode), new EndsWithEventVisitor(endsWithEvent, concernedNode));
-        }
-        
+            return new InteractionPattern(concernedNode, this.visitors);
+        }
+
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternVisitor.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/InteractionPatternVisitor.java	(revision 1217)
@@ -25,9 +25,12 @@
 import de.ugoe.cs.autoquest.eventcore.StringEventType;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 
 /**
@@ -39,37 +42,42 @@
  */
 public abstract class InteractionPatternVisitor implements ITaskVisitor {
-    
-	protected TaskTypeFilter taskType;
-	
+
+    protected TaskTypeFilter taskType;
+
     protected EventTypeFilter eventType;
-    
+
     protected InteractionPattern containedPattern;
-    
+
     protected boolean present = false;
-    
+
     protected List<ITask> retainedSelectionTasks = Lists.newArrayList();
-    
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask)
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IEventTask)
      */
     public void visit(IEventTask event) {
-        if(!this.present && isEventVisitor()) {
+        if (!this.present && isEventVisitor()) {
             IEventType eventType = event.getEventType();
-            if(eventType instanceof StringEventType) {
+            if (eventType instanceof StringEventType) {
                 this.present = eventType.toString().equals(nameOfEventType());
-            } else {
+            }
+            else {
                 this.present = eventType.getClass().equals(this.eventType.clazz());
             }
         }
     }
-    
+
     public boolean isEventVisitor() {
         return this.eventType != null && this.containedPattern == null;
     }
-    
+
     protected String nameOfEventType() {
         String ret = StringUtils.EMPTY;
         Iterable<String> splitted = Splitter.on("_").split(this.eventType.name());
-        for(String str : splitted) {
+        for (String str : splitted) {
             str = str.toLowerCase();
             ret += Character.toString(str.charAt(0)).toUpperCase() + str.substring(1);
@@ -77,49 +85,68 @@
         return ret;
     }
-    
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#accept(de.ugoe.cs.autoquest.tasktrees.treeifc.ITask)
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#accept(de.ugoe.cs.autoquest.tasktrees.
+     * treeifc.ITask)
      */
     @Override
     public void visit(ITask task) {
-        task.accept(this);
-        
+        if (task instanceof ISequence) {
+            this.visit((ISequence) task);
+        }
+        else if (task instanceof IIteration) {
+            this.visit((IIteration) task);
+        }
+        else if (task instanceof ISelection) {
+            this.visit((ISelection) task);
+        }
+        else {
+            this.visit((IOptional) task);
+        }
     }
-    
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection)
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .ISelection)
      */
     public void visit(ISelection selection) {
-        if(isEventVisitor()) {
+        if (isEventVisitor()) {
             retainNodesWherePatternIsPresent(selection);
             this.present = patternIsPresent();
-        } else {
-            this.present = containedPattern.containedIn(selection);  
+        }
+        else {
+            this.present = containedPattern.containedIn(selection);
         }
     }
 
     @SuppressWarnings("unchecked")
-	protected void retainNodesWherePatternIsPresent(ISelection selection) {
-        for(ITask task : selection.getChildren()) {
+    protected void retainNodesWherePatternIsPresent(ISelection selection) {
+        for (ITask task : selection.getChildren()) {
             this.present = false;
             task.accept(this);
-            if(this.present && this.taskType.filterPredicate().apply(selection)) {
+            if (this.present && this.taskType.filterPredicate().apply(selection)) {
                 this.retainedSelectionTasks.add(selection);
             }
-            if(this.present) {
-            	break;
+            if (this.present) {
+                break;
             }
         }
     }
-    
+
     private boolean patternIsPresent() {
         return !this.retainedSelectionTasks.isEmpty();
     }
-    
+
     /**
      * <p>
      * TODO: comment
      * </p>
-     *
+     * 
      * @return
      */
@@ -132,5 +159,5 @@
      * TODO: comment
      * </p>
-     *
+     * 
      */
     public void reset() {
@@ -143,5 +170,5 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @return
      */
@@ -154,5 +181,5 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @return
      */
@@ -160,4 +187,4 @@
         return this.retainedSelectionTasks;
     }
-    
+
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageDefect.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageDefect.java	(revision 1213)
+++ 	(revision )
@@ -1,89 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.usability.rules.patterns;
-
-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.ITERATION;
-import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SEQUENCE;
-
-import com.google.common.base.Optional;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
-import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver;
-import de.ugoe.cs.autoquest.usability.result.UsabilityDefect;
-import de.ugoe.cs.autoquest.usability.rules.UsabilityRule;
-import de.ugoe.cs.autoquest.usability.rules.UsabilityUsageDefect;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class LongFormUsageDefect extends UsabilityRule implements UsabilityUsageDefect {
-
-    private InteractionPattern longFormUsagePattern;
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param taskTree
-     */
-    public LongFormUsageDefect(ITaskModel taskModel) {
-        super(taskModel);
-        this.name = "LongFormUsagePattern";
-        this.defect = new DefectDescriptionResolver().descriptionFor(this.getClass().getSimpleName());
-        initUsagePattern();
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     */
-    private void initUsagePattern() {
-        InteractionPatternBuilder builder = new InteractionPatternBuilder();
-        InteractionPattern fillFormPattern = builder.concernedNode(ITERATION).startsWith(TEXT_INPUT).endsWith(SCROLL).build();
-        this.longFormUsagePattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).contains(fillFormPattern).endsWith(MOUSE_CLICK).build();
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#check()
-     */
-    @Override
-    public Optional<UsabilityDefect> check() {
-        Optional<UsabilityDefect> present = Optional.absent();
-        if(this.longFormUsagePattern.containedIn(taskModel)) {
-            present = Optional.of(this.defect);
-        }
-        return present;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller)
-     */
-    @Override
-    public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
-    {
-        return evaluationMethodCaller.check(this);
-    }
-}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageProblem.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageProblem.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/LongFormUsageProblem.java	(revision 1217)
@@ -0,0 +1,101 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.rules.patterns;
+
+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.ITERATION;
+import static de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter.SEQUENCE;
+
+import com.google.common.base.Optional;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescriptionResolver;
+import de.ugoe.cs.autoquest.usability.result.UsabilityProblemDescription;
+import de.ugoe.cs.autoquest.usability.rules.UsabilityRule;
+import de.ugoe.cs.autoquest.usability.rules.UsabilityUsageProblem;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class LongFormUsageProblem extends UsabilityRule implements UsabilityUsageProblem {
+
+    private InteractionPattern longFormUsagePattern;
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     * 
+     * @param taskTree
+     */
+    public LongFormUsageProblem(ITaskModel taskModel) {
+        super(taskModel);
+        this.name = "LongFormUsagePattern";
+        this.defect =
+            new UsabilityProblemDescriptionResolver().descriptionFor(this.getClass()
+                .getSimpleName());
+        initUsagePattern();
+    }
+
+    /**
+     * <p>
+     * TODO: comment
+     * </p>
+     * 
+     */
+    private void initUsagePattern() {
+        InteractionPattern fillFormPattern =
+            InteractionPatternBuilder.newPattern().rootTask(ITERATION).startsWithEvent(TEXT_INPUT)
+                .endsWithEvent(SCROLL).patternFinished().build();
+        this.longFormUsagePattern =
+            InteractionPatternBuilder.newPattern().rootTask(SEQUENCE).startsWithEvent(MOUSE_CLICK)
+                .containsPattern(fillFormPattern).endsWithEvent(MOUSE_CLICK).patternFinished()
+                .build();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#check()
+     */
+    @Override
+    public Optional<UsabilityProblemDescription> check() {
+        Optional<UsabilityProblemDescription> present = Optional.absent();
+        if (this.longFormUsagePattern.containedIn(taskModel)) {
+            present = Optional.of(this.defect);
+        }
+        return present;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest
+     * .usability.EvaluationMethodCaller)
+     */
+    @Override
+    public Optional<UsabilityProblemDescription> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller)
+    {
+        return evaluationMethodCaller.check(this);
+    }
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsEventVisitor.java	(revision 1217)
@@ -22,6 +22,6 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 
 /**
@@ -38,5 +38,5 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @param containsType
      */
@@ -46,6 +46,10 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IIteration)
      */
     public void visit(IIteration iteration) {
@@ -53,6 +57,10 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IOptional)
      */
     public void visit(IOptional optional) {
@@ -60,11 +68,15 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .ISequence)
      */
     public void visit(ISequence sequence) {
         checkAllChildrenAndReturnIfPatternIsPresent(sequence.getChildren());
     }
-    
+
     private void checkAllChildrenAndReturnIfPatternIsPresent(List<ITask> children) {
         for (ITask task : children) {
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsInteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsInteractionPatternVisitor.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/ContainsInteractionPatternVisitor.java	(revision 1217)
@@ -22,5 +22,5 @@
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern;
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 
 /**
@@ -37,14 +37,20 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @param containsPattern
      */
-    public ContainsInteractionPatternVisitor(InteractionPattern containsPattern, TaskTypeFilter taskType) {
+    public ContainsInteractionPatternVisitor(InteractionPattern containsPattern,
+                                             TaskTypeFilter taskType)
+    {
         this.containedPattern = containsPattern;
         this.taskType = taskType;
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IIteration)
      */
     public void visit(IIteration iteration) {
@@ -52,6 +58,10 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IOptional)
      */
     public void visit(IOptional optional) {
@@ -59,14 +69,18 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .ISequence)
      */
     public void visit(ISequence sequence) {
         checkAllChildrenAndReturnIfPatternIsPresent(sequence);
     }
-    
+
     private void checkAllChildrenAndReturnIfPatternIsPresent(ISequence sequence) {
         for (ITask child : sequence.getChildren()) {
-            if(checkTaskAndReturnIfPatternIsPresent(child)) {
+            if (checkTaskAndReturnIfPatternIsPresent(child)) {
                 this.present = true;
                 break;
@@ -74,10 +88,11 @@
         }
     }
-    
+
     private boolean checkTaskAndReturnIfPatternIsPresent(ITask task) {
-        if(isEvent(task)) return false;
+        if (isEvent(task))
+            return false;
         return this.containedPattern.containedIn(task);
     }
-    
+
     private boolean isEvent(ITask task) {
         return task instanceof IEventTask;
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithEventVisitor.java	(revision 1217)
@@ -19,6 +19,6 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
 
@@ -36,5 +36,5 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @param eventType
      */
@@ -44,6 +44,10 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IIteration)
      */
     public void visit(IIteration iteration) {
@@ -51,6 +55,10 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IOptional)
      */
     public void visit(IOptional optional) {
@@ -58,10 +66,14 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .ISequence)
      */
     public void visit(ISequence sequence) {
-        PatternsVisitorUtil.lastNodeOf(sequence.getChildren()).accept(this);   
+        PatternsVisitorUtil.lastSubTaskOf(sequence.getChildren()).accept(this);
     }
-    
+
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithInteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithInteractionPatternVisitor.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/EndsWithInteractionPatternVisitor.java	(revision 1217)
@@ -22,5 +22,5 @@
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern;
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
 
@@ -38,36 +38,51 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @param endsWithPattern
      */
-    public EndsWithInteractionPatternVisitor(InteractionPattern endsWithPattern, TaskTypeFilter taskType) {
+    public EndsWithInteractionPatternVisitor(InteractionPattern endsWithPattern,
+                                             TaskTypeFilter taskType)
+    {
         this.containedPattern = endsWithPattern;
         this.taskType = taskType;
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IIteration)
      */
     public void visit(IIteration iteration) {
-        this.present = containedPattern.containedIn(iteration); 
+        this.present = containedPattern.containedIn(iteration);
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IOptional)
      */
     public void visit(IOptional optional) {
-        this.present = containedPattern.containedIn(optional); 
+        this.present = containedPattern.containedIn(optional);
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .ISequence)
      */
     public void visit(ISequence sequence) {
-        ITask lastTask = PatternsVisitorUtil.lastNodeOf(sequence.getChildren());
-        if(isEvent(lastTask)) {
+        ITask lastTask = PatternsVisitorUtil.lastSubTaskOf(sequence.getChildren());
+        if (isEvent(lastTask)) {
             this.present = containedPattern.containedIn(sequence);
-        } else {
+        }
+        else {
             this.present = containedPattern.containedIn(lastTask);
-        }    
+        }
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithEventVisitor.java	(revision 1217)
@@ -19,6 +19,6 @@
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
 
@@ -36,5 +36,5 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @param eventType
      */
@@ -44,13 +44,21 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IIteration)
      */
     public void visit(IIteration iteration) {
         iteration.getMarkedTask().accept(this);
     }
-    
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional)
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IOptional)
      */
     public void visit(IOptional optional) {
@@ -58,10 +66,14 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .ISequence)
      */
     public void visit(ISequence sequence) {
-        PatternsVisitorUtil.firstNodeOf(sequence.getChildren()).accept(this);   
+        PatternsVisitorUtil.firstSubtaskOf(sequence.getChildren()).accept(this);
     }
-    
+
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithInteractionPatternVisitor.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithInteractionPatternVisitor.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/StartsWithInteractionPatternVisitor.java	(revision 1217)
@@ -22,5 +22,5 @@
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern;
 import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
-import de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
 import de.ugoe.cs.autoquest.usability.util.PatternsVisitorUtil;
 
@@ -38,36 +38,51 @@
      * TODO: comment
      * </p>
-     *
+     * 
      * @param startsWithPattern
      */
-    public StartsWithInteractionPatternVisitor(InteractionPattern startsWithPattern, TaskTypeFilter taskType) {
+    public StartsWithInteractionPatternVisitor(InteractionPattern startsWithPattern,
+                                               TaskTypeFilter taskType)
+    {
         this.containedPattern = startsWithPattern;
         this.taskType = taskType;
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IIteration)
      */
     public void visit(IIteration iteration) {
-        this.present = containedPattern.containedIn(iteration);  
+        this.present = containedPattern.containedIn(iteration);
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.IOptional)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.TaskVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .IOptional)
      */
     public void visit(IOptional optional) {
-        this.present = containedPattern.containedIn(optional);  
+        this.present = containedPattern.containedIn(optional);
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor#visit(de.ugoe.cs.autoquest.tasktrees.treeifc
+     * .ISequence)
      */
     public void visit(ISequence sequence) {
-        ITask firstTask = PatternsVisitorUtil.firstNodeOf(sequence.getChildren());
-        if(isEvent(firstTask)) {
+        ITask firstTask = PatternsVisitorUtil.firstSubtaskOf(sequence.getChildren());
+        if (isEvent(firstTask)) {
             this.present = containedPattern.containedIn(sequence);
-        } else {
+        }
+        else {
             this.present = containedPattern.containedIn(firstTask);
-        }    
+        }
     }
 
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/FilterResult.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/FilterResult.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/FilterResult.java	(revision 1217)
@@ -0,0 +1,75 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter;
+
+import java.util.List;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Lists;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class FilterResult {
+
+    @SuppressWarnings("rawtypes")
+    private final Predicate filterPredicate;
+
+    private List<ITask> filteredTasks = Lists.newArrayList();
+
+    private List<ITask> tasksNotMatchedFilter = Lists.newArrayList();
+
+    @SuppressWarnings("rawtypes")
+    public FilterResult(Predicate filterPredicate) {
+        this.filterPredicate = filterPredicate;
+    }
+
+    @SuppressWarnings("unchecked")
+    public void addTask(ITask task) {
+        boolean notFilteredYet =
+            !filteredTasks.contains(task) && !tasksNotMatchedFilter.contains(task);
+        if (notFilteredYet) {
+            if (filterPredicate.apply(task)) {
+                filteredTasks.add(task);
+            }
+            else {
+                tasksNotMatchedFilter.add(task);
+            }
+        }
+    }
+
+    public List<ITask> tasksMatchedFilter() {
+        return this.filteredTasks;
+    }
+
+    public int nrOfTasksMatchedFilter() {
+        return this.filteredTasks.size();
+    }
+
+    public List<ITask> tasksNotMatchedFilter() {
+        return this.tasksNotMatchedFilter;
+    }
+
+    public int nrOfTasksNotMatchedFilter() {
+        return this.tasksNotMatchedFilter.size();
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/IterativeDFSFilterStrategy.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/IterativeDFSFilterStrategy.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/IterativeDFSFilterStrategy.java	(revision 1217)
@@ -0,0 +1,99 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter;
+
+import java.util.LinkedList;
+import java.util.Queue;
+
+import com.google.common.base.Predicate;
+
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IMarkingTemporalRelationship;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IStructuringTemporalRelationship;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class IterativeDFSFilterStrategy implements TaskModelFilterStrategy {
+
+    private FilterResult filterStatistic;
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public FilterResult filter(ITaskModel taskModel, EventTargetFilter eventTarget) {
+        Predicate<IEventTarget> filterPredicate = eventTarget.filterPredicate();
+        this.filterStatistic = new FilterResult(filterPredicate);
+        traverse(taskModel);
+        return this.filterStatistic;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType) {
+        Predicate<IEventType> filterPredicate = eventType.filterPredicate();
+        this.filterStatistic = new FilterResult(filterPredicate);
+        traverse(taskModel);
+        return this.filterStatistic;
+    }
+
+    @SuppressWarnings("unchecked")
+    @Override
+    public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType) {
+        Predicate<ITask> filterPredicate = nodeType.filterPredicate();
+        this.filterStatistic = new FilterResult(filterPredicate);
+        traverse(taskModel);
+        return this.filterStatistic;
+    }
+
+    private void traverse(ITaskModel taskModel) {
+        Queue<ITask> unvisitedTasks = new LinkedList<ITask>();
+        unvisitedTasks.addAll(taskModel.getTasks());
+        while (stillUnvisitedTasks(unvisitedTasks)) {
+            ITask task = unvisitedTasks.poll();
+            processCurrentTask(task);
+            processChildrenOfCurrentTask(unvisitedTasks, task);
+        }
+    }
+
+    private boolean stillUnvisitedTasks(Queue<ITask> unvisitedTasks) {
+        return !unvisitedTasks.isEmpty();
+    }
+
+    private void processCurrentTask(ITask task) {
+        this.filterStatistic.addTask(task);
+    }
+
+    private void processChildrenOfCurrentTask(Queue<ITask> unvisitedTasks, ITask task) {
+        if (task instanceof IStructuringTemporalRelationship) {
+            for (ITask child : ((IStructuringTemporalRelationship) task).getChildren()) {
+                unvisitedTasks.add(child);
+            }
+        }
+        else if (task instanceof IMarkingTemporalRelationship) {
+            unvisitedTasks.add(((IMarkingTemporalRelationship) task).getMarkedTask());
+        }
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilterStrategy.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilterStrategy.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/TaskModelFilterStrategy.java	(revision 1217)
@@ -0,0 +1,37 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTargetFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.EventTypeFilter;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.types.TaskTypeFilter;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public interface TaskModelFilterStrategy {
+
+    public FilterResult filter(ITaskModel taskModel, EventTargetFilter eventTarget);
+
+    public FilterResult filter(ITaskModel taskModel, EventTypeFilter eventType);
+
+    public FilterResult filter(ITaskModel taskModel, TaskTypeFilter nodeType);
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/EventTargetFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/EventTargetFilter.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/EventTargetFilter.java	(revision 1217)
@@ -0,0 +1,89 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter.types;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+import de.ugoe.cs.autoquest.eventcore.IEventTarget;
+import de.ugoe.cs.autoquest.eventcore.guimodel.ITextArea;
+import de.ugoe.cs.autoquest.eventcore.guimodel.ITextField;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+
+/**
+ * <p>
+ * Event target filter for {@link EventTask}s.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public enum EventTargetFilter implements TaskFilter<IEventTarget> {
+
+    TEXT_FIELD(ITextField.class),
+
+    TEXT_AREA(ITextArea.class);
+
+    private Class<? extends IEventTarget> eventTargetClazz;
+
+    private EventTargetFilter(Class<? extends IEventTarget> eventTargetClazz) {
+        this.eventTargetClazz = eventTargetClazz;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.tasktree.filters.TaskFilter#getId()
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public Class<IEventTarget> clazz() {
+        return (Class<IEventTarget>) eventTargetClazz;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.tasktree.filters.TaskFilter#getId()
+     */
+    @SuppressWarnings("rawtypes")
+    @Override
+    public Predicate filterPredicate() {
+        Predicate<Object> instanceOfIEventTaskPredicate = Predicates.instanceOf(IEventTask.class);
+        Predicate<ITask> taskHoldsInstanceOfFilterArgument =
+            Predicates.compose(Predicates.instanceOf(eventTargetClazz), taskExtractionFunction());
+        return Predicates.and(instanceOfIEventTaskPredicate, taskHoldsInstanceOfFilterArgument);
+    }
+
+    /**
+     * 
+     * <p>
+     * Gets the event target of a {@link ITask}.
+     * </p>
+     * 
+     * @return event target
+     */
+    private Function<ITask, IEventTarget> taskExtractionFunction() {
+        return new Function<ITask, IEventTarget>() {
+
+            @Override
+            public IEventTarget apply(ITask task) {
+                return ((IEventTask) task).getEventTarget();
+            }
+        };
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/EventTypeFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/EventTypeFilter.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/EventTypeFilter.java	(revision 1217)
@@ -0,0 +1,100 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter.types;
+
+import com.google.common.base.Function;
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+import de.ugoe.cs.autoquest.eventcore.IEventType;
+import de.ugoe.cs.autoquest.eventcore.gui.IInteraction;
+import de.ugoe.cs.autoquest.eventcore.gui.MouseButtonInteraction;
+import de.ugoe.cs.autoquest.eventcore.gui.MouseClick;
+import de.ugoe.cs.autoquest.eventcore.gui.MouseInteraction;
+import de.ugoe.cs.autoquest.eventcore.gui.Scroll;
+import de.ugoe.cs.autoquest.eventcore.gui.TextInput;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+
+/**
+ * <p>
+ * Event type filter for {@link EventTask}s.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public enum EventTypeFilter implements TaskFilter<IEventType> {
+
+    MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class),
+
+    MOUSE_CLICK(MouseClick.class),
+
+    MOUSE_INTERACTION(MouseInteraction.class),
+
+    TEXT_INPUT(TextInput.class),
+
+    SCROLL(Scroll.class),
+
+    USER_INTERACTION(IInteraction.class);
+
+    private Class<? extends IEventType> eventTypeClazz;
+
+    private EventTypeFilter(Class<? extends IEventType> eventTypeClazz) {
+        this.eventTypeClazz = eventTypeClazz;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.tasktree.filters.TaskFilter#getId()
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public Class<IEventType> clazz() {
+        return (Class<IEventType>) eventTypeClazz;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.tasktree.filters.TaskFilter#getId()
+     */
+    @SuppressWarnings("rawtypes")
+    @Override
+    public Predicate filterPredicate() {
+        Predicate<Object> instanceOfIEventTaskPredicate = Predicates.instanceOf(IEventTask.class);
+        Predicate<ITask> taskHoldsInstanceOfFilterArgument =
+            Predicates.compose(Predicates.instanceOf(eventTypeClazz), taskExtractionFunction());
+        return Predicates.and(instanceOfIEventTaskPredicate, taskHoldsInstanceOfFilterArgument);
+    }
+
+    /**
+     * 
+     * <p>
+     * Gets the event type of a {@link ITask}.
+     * </p>
+     * 
+     * @return event type
+     */
+    private Function<ITask, IEventType> taskExtractionFunction() {
+        return new Function<ITask, IEventType>() {
+
+            @Override
+            public IEventType apply(ITask task) {
+                return ((IEventTask) task).getEventType();
+            }
+        };
+    }
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskFilter.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskFilter.java	(revision 1217)
@@ -0,0 +1,49 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter.types;
+
+import com.google.common.base.Predicate;
+
+/**
+ * <p>
+ * A task filter allows to filter a collection of tasks, considering a provided predicate.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public interface TaskFilter<T> {
+
+    /**
+     * 
+     * <p>
+     * {@link Class} of type or property, which is used to filter tasks.
+     * </p>
+     * 
+     * @return
+     */
+    public Class<T> clazz();
+
+    /**
+     * 
+     * <p>
+     * Provides predicate to filter tasks.
+     * </p>
+     * 
+     * @return
+     */
+    @SuppressWarnings("rawtypes")
+    public Predicate filterPredicate();
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskModelFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskModelFilter.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskModelFilter.java	(revision 1217)
@@ -0,0 +1,92 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter.types;
+
+import com.google.common.base.Preconditions;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.FilterResult;
+import de.ugoe.cs.autoquest.usability.taskmodel.filter.TaskModelFilterStrategy;
+
+/**
+ * <p>
+ * TODO comment
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public class TaskModelFilter {
+
+    private final TaskModelFilterStrategy taskModelFilterStrategy;
+
+    public TaskModelFilter(TaskModelFilterStrategy treeTraversalStrategy) {
+        Preconditions.checkNotNull(treeTraversalStrategy);
+        this.taskModelFilterStrategy = treeTraversalStrategy;
+    }
+
+    public FilterEventTargetStep filterByEventTarget(EventTargetFilter eventTarget) {
+        return new FilterEventTargetStep(eventTarget);
+    }
+
+    public FilterEventTypeStep filterByEventType(EventTypeFilter eventType) {
+        return new FilterEventTypeStep(eventType);
+    }
+
+    public FilterNodeTypeStep filterByNodeType(TaskTypeFilter nodeType) {
+        return new FilterNodeTypeStep(nodeType);
+    }
+
+    public class FilterEventTargetStep {
+
+        private final EventTargetFilter eventTarget;
+
+        public FilterEventTargetStep(EventTargetFilter eventTarget) {
+            this.eventTarget = eventTarget;
+        }
+
+        public FilterResult from(ITaskModel taskModel) {
+            return taskModelFilterStrategy.filter(taskModel, eventTarget);
+        }
+
+    }
+
+    public class FilterEventTypeStep {
+
+        private final EventTypeFilter eventType;
+
+        public FilterEventTypeStep(EventTypeFilter eventType) {
+            this.eventType = eventType;
+        }
+
+        public FilterResult from(ITaskModel taskModel) {
+            return taskModelFilterStrategy.filter(taskModel, eventType);
+        }
+
+    }
+
+    public class FilterNodeTypeStep {
+
+        private final TaskTypeFilter nodeType;
+
+        public FilterNodeTypeStep(TaskTypeFilter nodeType) {
+            this.nodeType = nodeType;
+        }
+
+        public FilterResult from(ITaskModel taskModel) {
+            return taskModelFilterStrategy.filter(taskModel, nodeType);
+        }
+
+    }
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskTypeFilter.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskTypeFilter.java	(revision 1217)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/taskmodel/filter/types/TaskTypeFilter.java	(revision 1217)
@@ -0,0 +1,71 @@
+//   Copyright 2012 Georg-August-Universität Göttingen, Germany
+//
+//   Licensed under the Apache License, Version 2.0 (the "License");
+//   you may not use this file except in compliance with the License.
+//   You may obtain a copy of the License at
+//
+//       http://www.apache.org/licenses/LICENSE-2.0
+//
+//   Unless required by applicable law or agreed to in writing, software
+//   distributed under the License is distributed on an "AS IS" BASIS,
+//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//   See the License for the specific language governing permissions and
+//   limitations under the License.
+
+package de.ugoe.cs.autoquest.usability.taskmodel.filter.types;
+
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
+
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence;
+import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
+
+/**
+ * <p>
+ * Task type filter for {@link ITask}s.
+ * </p>
+ * 
+ * @author Alexander Deicke
+ */
+public enum TaskTypeFilter implements TaskFilter<ITask> {
+
+    EVENT_TASK_NODE(IEventTask.class),
+
+    ITERATION(IIteration.class),
+
+    SEQUENCE(ISequence.class),
+
+    SELECTION(ISelection.class);
+
+    private Class<? extends ITask> taskTypeClazz;
+
+    private TaskTypeFilter(Class<? extends ITask> taskTypeClazz) {
+        this.taskTypeClazz = taskTypeClazz;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.tasktree.filters.TaskFilter#getId()
+     */
+    @SuppressWarnings("unchecked")
+    @Override
+    public Class<ITask> clazz() {
+        return (Class<ITask>) this.taskTypeClazz;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see de.ugoe.cs.autoquest.usability.tasktree.filters.TaskFilter#getId()
+     */
+    @SuppressWarnings("rawtypes")
+    @Override
+    public Predicate filterPredicate() {
+        return Predicates.instanceOf(taskTypeClazz);
+    }
+
+}
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/NullNode.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/NullNode.java	(revision 1213)
+++ 	(revision )
@@ -1,79 +1,0 @@
-//   Copyright 2012 Georg-August-Universität Göttingen, Germany
-//
-//   Licensed under the Apache License, Version 2.0 (the "License");
-//   you may not use this file except in compliance with the License.
-//   You may obtain a copy of the License at
-//
-//       http://www.apache.org/licenses/LICENSE-2.0
-//
-//   Unless required by applicable law or agreed to in writing, software
-//   distributed under the License is distributed on an "AS IS" BASIS,
-//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//   See the License for the specific language governing permissions and
-//   limitations under the License.
-
-package de.ugoe.cs.autoquest.usability.util;
-
-import org.apache.commons.lang.StringUtils;
-
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskVisitor;
-
-/**
- * <p>
- * TODO comment
- * </p>
- * 
- * @author Alexander Deicke
- */
-public class NullNode implements ITask {
-
-	
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = -3325477932754494485L;
-
-	@Override
-	public int getId() {
-		return 0;
-	}
-	
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getName()
-     */
-    public String getName() {
-        return StringUtils.EMPTY;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getDescription()
-     */
-    public String getDescription() {
-        return StringUtils.EMPTY;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#equals(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode)
-     */
-    public boolean equals(ITask task) {
-        return false;
-    }
-    
-    /* (non-Javadoc)
-     * @see java.lang.Object#clone()
-     */
-    @Override
-    public NullNode clone() {
-        return (NullNode) this;
-    }
-
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#accept(de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor)
-     */
-    public void accept(ITaskVisitor visitor) {
-        
-    }
-    
-}
-
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/NullTask.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/NullTask.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/NullTask.java	(revision 1217)
@@ -22,5 +22,5 @@
 /**
  * <p>
- * TODO comment
+ * Implementation of Null Object pattern {@link http://en.wikipedia.org/wiki/Null_Object_pattern}.
  * </p>
  * 
@@ -29,8 +29,9 @@
 public class NullTask implements ITask {
 
-    /**  */
     private static final long serialVersionUID = 1236779392413787860L;
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITask#getId()
      */
@@ -39,6 +40,8 @@
         return -1;
     }
-    
-    /* (non-Javadoc)
+
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getName()
      */
@@ -47,5 +50,7 @@
     }
 
-    /* (non-Javadoc)
+    /*
+     * (non-Javadoc)
+     * 
      * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#getDescription()
      */
@@ -54,12 +59,18 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#equals(de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#equals(de.ugoe.cs.autoquest.tasktrees
+     * .treeifc.ITaskTreeNode)
      */
     public boolean equals(ITask task) {
         return false;
     }
-    
-    /* (non-Javadoc)
+
+    /*
+     * (non-Javadoc)
+     * 
      * @see java.lang.Object#clone()
      */
@@ -69,11 +80,14 @@
     }
 
-    /* (non-Javadoc)
-     * @see de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#accept(de.ugoe.cs.autoquest.tasktrees.treeifc.NodeVisitor)
+    /*
+     * (non-Javadoc)
+     * 
+     * @see
+     * de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode#accept(de.ugoe.cs.autoquest.tasktrees
+     * .treeifc.NodeVisitor)
      */
     public void accept(ITaskVisitor visitor) {
         // do nothing
     }
-    
+
 }
-
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/PatternsVisitorUtil.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/PatternsVisitorUtil.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/PatternsVisitorUtil.java	(revision 1217)
@@ -15,16 +15,14 @@
 package de.ugoe.cs.autoquest.usability.util;
 
-import java.util.List;
+import java.util.Collection;
 
 import com.google.common.collect.Iterables;
 
 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel;
-import de.ugoe.cs.autoquest.tasktrees.treeifc.IUserSession;
-import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskFactory;
+import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternVisitor;
 
 /**
  * <p>
- * TODO comment
+ * Util class for {@link InteractionPatternVisitor}.
  * </p>
  * 
@@ -36,26 +34,15 @@
         // no instantiation
     }
-    
+
     /**
      * <p>
-     * TODO: comment
+     * Gets the first sub task.
      * </p>
-     *
-     * @param taskTreeNode
-     * @return
+     * 
+     * @param tasks
+     *            collection of tasks
+     * @return first sub task
      */
-    public static ITaskModel createTaskModelFromUserSessions(List<IUserSession> userSessions) {
-        return new TaskFactory().createTaskModel(userSessions);
-    }
-    
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @param taskTreeNodes
-     * @return
-     */
-    public static ITask firstNodeOf(List<ITask> tasks) {
+    public static ITask firstSubtaskOf(Collection<ITask> tasks) {
         return Iterables.getFirst(tasks, new NullTask());
     }
@@ -63,13 +50,14 @@
     /**
      * <p>
-     * TODO: comment
+     * Gets the last sub task.
      * </p>
-     *
-     * @param taskTreeNodes
-     * @return
+     * 
+     * @param tasks
+     *            collection of tasks
+     * @return last sub task
      */
-    public static ITask lastNodeOf(List<ITask> tasks) {
+    public static ITask lastSubTaskOf(Collection<ITask> tasks) {
         return Iterables.getLast(tasks, new NullTask());
     }
-    
+
 }
Index: trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/TextInputUtil.java
===================================================================
--- trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/TextInputUtil.java	(revision 1213)
+++ trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/util/TextInputUtil.java	(revision 1217)
@@ -31,5 +31,5 @@
 /**
  * <p>
- * TODO comment
+ * Util class to handle text input events/tasks.
  * </p>
  * 
@@ -42,4 +42,14 @@
     }
 
+    /**
+     * 
+     * <p>
+     * Returns all entered words and signs of text input events.
+     * </p>
+     * 
+     * @param tasksWithTextInputEvents
+     *            tasks with event type {@link TextInput}
+     * @return set of all entered word and signs with unique entries
+     */
     public static Multiset<String> aggregateEnteredTextFromTextInputs(List<ITask> tasksWithTextInputEvents)
     {
@@ -52,11 +62,20 @@
     }
 
+    /**
+     * 
+     * <p>
+     * Splits entered text into words and signs.
+     * </p>
+     * 
+     * @param enteredText
+     *            entered text (e.g. from text input event)
+     * @return collection of words and signs
+     */
     public static Iterable<String> splitTextIntoWordsAndSigns(String enteredText) {
         CharMatcher onlyWords =
-            CharMatcher.WHITESPACE.or(CharMatcher
-                .forPredicate(characterIsJavaIdentifierPartPredicate()));
+            CharMatcher.WHITESPACE.or(CharMatcher.forPredicate(characterIsNoJavaIdentifierPart()));
         CharMatcher onlySigns =
-            CharMatcher.WHITESPACE.or(CharMatcher
-                .forPredicate(characterIsJavaIdentifierPartPredicate()).negate());
+            CharMatcher.WHITESPACE.or(CharMatcher.forPredicate(characterIsNoJavaIdentifierPart())
+                .negate());
         Iterable<String> words =
             Splitter.on(onlyWords).omitEmptyStrings().trimResults().split(enteredText);
@@ -66,5 +85,13 @@
     }
 
-    public static Predicate<Character> characterIsJavaIdentifierPartPredicate() {
+    /**
+     * 
+     * <p>
+     * Determines, if a character is not part of a Java identifier.
+     * </p>
+     * 
+     * @return true, iff no part of Java identifier
+     */
+    public static Predicate<Character> characterIsNoJavaIdentifierPart() {
         return new Predicate<Character>() {
 
@@ -77,5 +104,13 @@
     }
 
-    public static Predicate<Character> characterIsLetterOrDigitPredicate() {
+    /**
+     * 
+     * <p>
+     * Determines if the specified character is not a letter or digit.
+     * </p>
+     * 
+     * @return
+     */
+    public static Predicate<Character> characterIsNoLetterOrDigitPredicate() {
         return new Predicate<Character>() {
 
